@arcgis/core 4.23.0-next.20220127 → 4.23.0-next.20220128

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 (312) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/0463ba46df855a92b9c0.js +1 -0
  3. package/assets/esri/core/workers/chunks/{e657ba0cab29f05d02da.js → 0cd0a6eef51fc5b9ea61.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{e4896cf85fb2da8a9cc7.js → 17de7a324dfa7f57ad5d.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{c36f84daa7736878418d.js → 197ec52641aed20029c6.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{0317f37b6c8705b363fd.js → 1c733b7db092a2a88ef3.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{9387db408f496e7dd003.js → 214910032945dd2d86b0.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{d835b2a683fcd8aeeed8.js → 27474b007988855bea9d.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{8001b0e514bfffe9d7f8.js → 357033117dfe61eb81ea.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{5948923e07bd1662c24a.js → 37c03cfc19086ce631c6.js} +1 -1
  11. package/assets/esri/core/workers/chunks/3c673495e5f507c4a9e5.js +1 -0
  12. package/assets/esri/core/workers/chunks/44f0c3663b293afbd172.js +1 -0
  13. package/assets/esri/core/workers/chunks/483d5d8593d96d0f0b15.js +1 -0
  14. package/assets/esri/core/workers/chunks/49a1a633bb0d93764aae.js +1 -0
  15. package/assets/esri/core/workers/chunks/{5f1dcb6556820cd0aa31.js → 4be35af7d6babbfe9d84.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{f9ff3eaf4eb324429fbd.js → 5457962a70bd3c557a75.js} +1 -1
  17. package/assets/esri/core/workers/chunks/57856b4a9b8784a69844.js +1 -0
  18. package/assets/esri/core/workers/chunks/{56274b37ff74ca0d68a6.js → 5d11b97b667921d67ae7.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{ba5eb394f098968c22d2.js → 655b55ac0cd533d7e9d7.js} +1 -1
  20. package/assets/esri/core/workers/chunks/7903a3e2e0faff0f86c0.js +1 -0
  21. package/assets/esri/core/workers/chunks/918bb7a7d901544a7367.js +1 -0
  22. package/assets/esri/core/workers/chunks/949b2269457302ffc64b.js +1 -0
  23. package/assets/esri/core/workers/chunks/{601e697dc7414bda128a.js → 952980635afc7ec81804.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{e8741bf421f80213f1d3.js → 9876a1bae350795fab36.js} +1 -1
  25. package/assets/esri/core/workers/chunks/99619fcb772807c74f3b.js +1 -0
  26. package/assets/esri/core/workers/chunks/{3f343f792fd9f44d6f25.js → b3f5e91116112b0b612a.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{4c76146014dc15143ba3.js → be588873c16770ceb9ef.js} +1 -1
  28. package/assets/esri/core/workers/chunks/d1fe53b597351dc58305.js +1 -0
  29. package/assets/esri/core/workers/chunks/{b62e3dccd9f662c0afeb.js → db3c729ce0c0b2690dc9.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{199670a3a564ebe3bd79.js → e218bde41ffbcc5194f5.js} +1 -1
  31. package/assets/esri/core/workers/chunks/e21b211913aefde47e30.js +1 -0
  32. package/assets/esri/core/workers/chunks/{c9cbf8135e95f0f42cd9.js → e287f49184d076af17e2.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{bde1d5b0a7717350986e.js → e4019b63a1fe74e2c842.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{6e6a3c5866e8d8820457.js → eb82ff10cef2bde6e57f.js} +1 -1
  35. package/assets/esri/core/workers/chunks/ebc6f4764b82d4104c65.js +1 -0
  36. package/assets/esri/core/workers/chunks/{842db82733635dbf25cb.js → ee6e0db58dc64410e687.js} +1 -1
  37. package/assets/esri/core/workers/chunks/f0a9f161805fc7a30fc5.js +1 -0
  38. package/assets/esri/core/workers/chunks/ff6abdc72076f3994659.js +981 -0
  39. package/chunks/BlendLayers.glsl.js +2 -2
  40. package/chunks/ChapmanAtmosphere.glsl.js +17 -17
  41. package/chunks/CheckerBoard.glsl.js +3 -3
  42. package/chunks/Clouds.glsl.js +2 -2
  43. package/chunks/CloudsComposition.glsl.js +1 -1
  44. package/chunks/ColorMaterial.glsl.js +12 -12
  45. package/chunks/ComponentShader.glsl.js +3 -3
  46. package/chunks/Compositing.glsl.js +1 -1
  47. package/chunks/DefaultMaterial.glsl.js +33 -33
  48. package/chunks/EdgeShaderProgram.glsl.js +7 -7
  49. package/chunks/Fog.glsl.js +10 -12
  50. package/chunks/HUDMaterial.glsl.js +2 -2
  51. package/chunks/HighlightComposition.glsl.js +5 -5
  52. package/chunks/ImageMaterial.glsl.js +6 -6
  53. package/chunks/LaserlinePath.glsl.js +8 -8
  54. package/chunks/LineCallout.glsl.js +6 -6
  55. package/chunks/MeasurementArrow.glsl.js +1 -1
  56. package/chunks/NativeLine.glsl.js +1 -1
  57. package/chunks/Path.glsl.js +5 -5
  58. package/chunks/Pattern.glsl.js +9 -9
  59. package/chunks/PointRenderer.glsl.js +14 -14
  60. package/chunks/Precipitation.glsl.js +2 -2
  61. package/chunks/RealisticTree.glsl.js +21 -21
  62. package/chunks/RibbonLine.glsl.js +11 -11
  63. package/chunks/SMAA.glsl.js +40 -40
  64. package/chunks/ShadedColorMaterial.glsl.js +12 -12
  65. package/chunks/ShadowCast.glsl.js +6 -6
  66. package/chunks/ShadowHighlight.glsl.js +4 -4
  67. package/chunks/SimpleAtmosphere.glsl.js +3 -3
  68. package/chunks/SlicePlaneMaterial.glsl.js +3 -3
  69. package/chunks/Stars.glsl.js +3 -3
  70. package/chunks/Terrain.glsl.js +11 -11
  71. package/chunks/TextureOnly.glsl.js +2 -2
  72. package/chunks/WaterSurface.glsl.js +5 -5
  73. package/chunks/boundedPlane.js +1 -1
  74. package/core/accessorSupport/watch.js +1 -1
  75. package/core/loadAll.js +1 -1
  76. package/geometry/support/frustum.js +1 -1
  77. package/geometry/support/plane.js +1 -1
  78. package/interfaces.d.ts +204 -10
  79. package/layers/VectorTileLayer.js +1 -1
  80. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  81. package/layers/graphics/featureConversionUtils.js +1 -1
  82. package/layers/support/LayerContingentValuesCache.js +1 -1
  83. package/layers/support/TileInfo.js +1 -1
  84. package/package.json +1 -1
  85. package/smartMapping/statistics/support/predominanceUtils.d.ts +4 -0
  86. package/support/revision.js +1 -1
  87. package/symbols/FillSymbol3DLayer.js +1 -1
  88. package/symbols/IconSymbol3DLayer.js +1 -1
  89. package/symbols/ObjectSymbol3DLayer.js +1 -1
  90. package/symbols/Symbol3D.js +1 -1
  91. package/symbols/WebStyleSymbol.js +1 -1
  92. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  93. package/symbols/support/IconSymbol3DLayerResource.js +1 -1
  94. package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
  95. package/symbols/support/Symbol3DAnchorPosition2D.js +1 -1
  96. package/symbols/support/Symbol3DAnchorPosition3D.js +1 -1
  97. package/symbols/support/Symbol3DFillMaterial.js +1 -1
  98. package/symbols/support/Symbol3DIconOutline.js +1 -1
  99. package/symbols/support/Symbol3DOutline.js +1 -1
  100. package/symbols/support/Thumbnail.js +1 -1
  101. package/symbols/support/webStyleSymbolUtils.js +1 -1
  102. package/views/2d/engine/vectorTiles/SchemaHelper.js +1 -1
  103. package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
  104. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  105. package/views/3d/environment/CloudsComposition.glsl.js +1 -1
  106. package/views/3d/environment/CloudsGenerator.js +1 -1
  107. package/views/3d/environment/Fog.glsl.js +1 -1
  108. package/views/3d/environment/Fog.js +1 -1
  109. package/views/3d/environment/PanoramicAtmosphere.js +1 -1
  110. package/views/3d/environment/Precipitation.glsl.js +1 -1
  111. package/views/3d/environment/Precipitation.js +1 -1
  112. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  113. package/views/3d/environment/SimpleAtmosphere.glsl.js +1 -1
  114. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  115. package/views/3d/environment/Stars.glsl.js +1 -1
  116. package/views/3d/environment/Stars.js +1 -1
  117. package/views/3d/interactive/analysisTools/slice/sliceToolUtils.js +1 -1
  118. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  119. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  120. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  121. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  122. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  123. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  124. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  125. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  126. package/views/3d/layers/I3SMeshView3D.js +1 -1
  127. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  128. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  129. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  130. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  131. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  132. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  133. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  134. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  135. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  136. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  137. package/views/3d/layers/graphics/lineUtils.js +1 -1
  138. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  139. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  140. package/views/3d/layers/graphics/symbolComplexity.js +1 -1
  141. package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
  142. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  143. package/views/3d/layers/support/HeatmapFeatureProcessor.js +5 -0
  144. package/views/3d/layers/support/overlayImageUtils.js +1 -1
  145. package/views/3d/layers/support/patternUtils.js +1 -1
  146. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  147. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  148. package/views/3d/support/LaserLineRenderer.js +1 -1
  149. package/views/3d/support/LaserlinePathData.js +1 -1
  150. package/views/3d/terrain/OverlayRenderer.js +1 -1
  151. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  152. package/views/3d/terrain/TerrainRenderer.js +1 -1
  153. package/views/3d/terrain/TerrainSurface.js +1 -1
  154. package/views/3d/terrain/Tile.js +1 -1
  155. package/views/3d/terrain/terrainUtils.js +1 -1
  156. package/views/3d/terrain/tileUtils.js +1 -1
  157. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  158. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  159. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  160. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +10 -10
  161. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  162. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  163. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  164. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  165. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +2 -2
  166. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl.js +2 -2
  167. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.js +2 -2
  168. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +2 -2
  169. package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
  170. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +1 -1
  171. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js +1 -1
  172. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
  173. package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +1 -1
  174. package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +3 -3
  175. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js +1 -1
  176. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +6 -6
  177. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +12 -12
  178. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTextureCoordinates.glsl.js +4 -4
  179. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +1 -1
  180. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +16 -16
  181. package/views/3d/webgl-engine/core/shaderLibrary/default/RealisticTree.glsl.js +1 -1
  182. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +5 -5
  183. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +3 -3
  184. package/views/3d/webgl-engine/core/shaderLibrary/raster/BasicGrid.glsl.js +2 -2
  185. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js +6 -6
  186. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +2 -2
  187. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js +10 -11
  188. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +2 -2
  189. package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +2 -2
  190. package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js +2 -2
  191. package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +6 -6
  192. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +4 -4
  193. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +6 -6
  194. package/views/3d/webgl-engine/core/shaderLibrary/shading/Reprojection.glsl.js +4 -4
  195. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +5 -5
  196. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
  197. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +10 -10
  198. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Terrain.glsl.js +1 -1
  199. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
  200. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +4 -4
  201. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  202. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  203. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  204. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  205. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  206. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  207. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  208. package/views/3d/webgl-engine/lib/MagnifierHelper.js +1 -1
  209. package/views/3d/webgl-engine/lib/Material.js +1 -1
  210. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  211. package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
  212. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  213. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  214. package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
  215. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  216. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  217. package/views/3d/webgl-engine/lib/TextureUniformName.js +4 -0
  218. package/views/3d/webgl-engine/lib/UniformName.js +4 -0
  219. package/views/3d/webgl-engine/lib/VertexAttribute.js +5 -0
  220. package/views/3d/webgl-engine/lib/basicInterfaces.js +1 -1
  221. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  222. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  223. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
  224. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  225. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  226. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  227. package/views/3d/webgl-engine/lib/lodRendering/RenderInstanceData.js +1 -1
  228. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  229. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  230. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  231. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  232. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  233. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  234. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  235. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  236. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  237. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  238. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  239. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  240. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  241. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  242. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  243. package/views/3d/webgl-engine/materials/VisualVariableMaterialParameters.js +1 -1
  244. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  245. package/views/3d/webgl-engine/materials/internal/DefaultBufferWriter.js +1 -1
  246. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  247. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  248. package/views/3d/webgl-engine/materials/internal/waterMaterialUtils.js +1 -1
  249. package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
  250. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  251. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  252. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  253. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  254. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  255. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  256. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  257. package/views/3d/webgl-engine/shaders/HighlightComposition.glsl.js +1 -1
  258. package/views/3d/webgl-engine/shaders/HighlightTechnique.js +1 -1
  259. package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
  260. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  261. package/views/3d/webgl-engine/shaders/LaserlinePath.glsl.js +1 -1
  262. package/views/3d/webgl-engine/shaders/LaserlinePathTechnique.js +1 -1
  263. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  264. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  265. package/views/3d/webgl-engine/shaders/Magnifier.glsl.js +1 -1
  266. package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
  267. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
  268. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  269. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  270. package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
  271. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  272. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  273. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  274. package/views/3d/webgl-engine/shaders/SMAA.glsl.js +1 -1
  275. package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
  276. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  277. package/views/3d/webgl-engine/shaders/ShadowCastTechnique.js +1 -1
  278. package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
  279. package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
  280. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  281. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +10 -10
  282. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DiscardShortEdges.glsl.js +1 -1
  283. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeShaderProgram.glsl.js +1 -1
  284. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +21 -21
  285. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +6 -6
  286. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +13 -13
  287. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/UnpackAttributes.glsl.js +6 -6
  288. package/views/SceneView.js +1 -1
  289. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  290. package/views/support/WatchUpdatingTracking.js +1 -1
  291. package/views/webgl/BufferObject.js +1 -1
  292. package/views/webgl/InstanceCounter.js +1 -1
  293. package/views/webgl/Program.js +1 -1
  294. package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
  295. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  296. package/widgets/Search/support/locatorUtils.js +1 -1
  297. package/widgets/Search.js +1 -1
  298. package/assets/esri/core/workers/chunks/12c0cabb6c59e65d8546.js +0 -1
  299. package/assets/esri/core/workers/chunks/322d917e8cb398816a93.js +0 -1
  300. package/assets/esri/core/workers/chunks/392b6382e06652dd4c80.js +0 -1
  301. package/assets/esri/core/workers/chunks/3aa73119b055e05bbbeb.js +0 -1
  302. package/assets/esri/core/workers/chunks/52ea678ba1da0e349919.js +0 -1
  303. package/assets/esri/core/workers/chunks/5ee497d5d7b0e580526a.js +0 -1
  304. package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +0 -1
  305. package/assets/esri/core/workers/chunks/83b8fec1650e061aaa56.js +0 -1
  306. package/assets/esri/core/workers/chunks/9796d54ff12b6429164a.js +0 -1
  307. package/assets/esri/core/workers/chunks/d07440469fe7d181c4fd.js +0 -1
  308. package/assets/esri/core/workers/chunks/dbf192b4ce7e608610f6.js +0 -1
  309. package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +0 -981
  310. package/assets/esri/core/workers/chunks/dee9929d95e9fe26929c.js +0 -1
  311. package/assets/esri/core/workers/chunks/e12d91ef44d6f879a02a.js +0 -1
  312. package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Logger.js";import{isSome as t,isNone as r}from"../../../../core/maybe.js";import{createRenderScreenPointArray3 as s}from"../../../../core/screenUtils.js";import{c as i}from"../../../../chunks/vec2.js";import{s as o,f as n,d as a,a as u,b as c,g as l,l as f,i as m,m as p}from"../../../../chunks/vec3.js";import{c as h}from"../../../../chunks/vec3f64.js";import{PlaneIndex as d}from"../../../../geometry/support/frustum.js";import{create as g,distance2 as O,fromPoints as A,closestLineSegmentPoint as P}from"../../../../geometry/support/lineSegment.js";import{create as T,fromPoints as b,signedDistance as S,normal as _}from"../../../../geometry/support/plane.js";import{BufferViewVec3f as j,BufferViewVec2f as C}from"../../../../geometry/support/buffer/BufferView.js";import{ShaderOutput as v}from"../core/shaderLibrary/ShaderOutputOptions.js";import{VertexAttribute as y}from"../lib/basicInterfaces.js";import{computeAttachmentOriginLines as E}from"../lib/geometryDataUtils.js";import I from"../lib/GLMaterial.js";import{Material as N,materialParametersDefaults as R}from"../lib/Material.js";import{RenderSlot as x}from"../lib/RenderSlot.js";import{isTranslationMatrix as L}from"../lib/Util.js";import{writeDefaultAttributes as q}from"./internal/bufferWriterUtils.js";import{PositionColorLayout as w,PositionLayout as U,DefaultBufferWriter as B}from"./internal/DefaultBufferWriter.js";import{intersectDrapedRenderLineGeometry as M}from"./internal/MaterialUtil.js";import{isInstanceHidden as D}from"./renderers/utils.js";import{NativeLineTechniqueConfiguration as V,NativeLineTechnique as H}from"../shaders/NativeLineTechnique.js";const G=e.getLogger("esri.views.3d.webgl-engine.materials.NativeLineMaterial");var X;!function(e){e[e.START=0]="START",e[e.END=1]="END"}(X||(X={}));class k extends N{constructor(e){super(e,Q),this._techniqueConfig=new V}getTechniqueConfig(e,r){this._techniqueConfig.output=e,this._techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this._techniqueConfig.vertexColors=this.parameters.vertexColors,this._techniqueConfig.transparent=this.parameters.color[3]<1||this.parameters.width<1,this._techniqueConfig.draped=r.slot===x.DRAPED_MATERIAL;const s=t(this.parameters.stipplePattern);return this._techniqueConfig.stippleEnabled=s,this._techniqueConfig.stippleOffColorEnabled=s&&t(this.parameters.stippleOffColor),this._techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this._techniqueConfig.stipplePreferContinuous=this.parameters.stipplePreferContinuous,this._techniqueConfig}getPassParameters(){return this.parameters}intersect(e,r,s,i,o,n,a,u,c){t(c)?M(e,i,c,n,1,a):this._intersectLineGeometry(e,r,s,i,a)}_intersectLineGeometry(e,t,r,s,p){if(!s.options.selectionMode||D(t))return;if(!L(r))return void G.error("intersection assumes a translation-only matrix");const h=e.vertexAttributes.get(y.POSITION).data,g=s.camera,T=ie;i(T,s.point);const j=2;o(oe[0],T[0]-j,T[1]+j,0),o(oe[1],T[0]+j,T[1]+j,0),o(oe[2],T[0]+j,T[1]-j,0),o(oe[3],T[0]-j,T[1]-j,0);for(let i=0;i<4;i++)if(!g.unprojectFromRenderScreen(oe[i],ne[i]))return;b(g.eye,ne[0],ne[1],ae),b(g.eye,ne[1],ne[2],ue),b(g.eye,ne[2],ne[3],ce),b(g.eye,ne[3],ne[0],le);let C=Number.MAX_VALUE,v=0;for(let i=0;i<h.length-5;i+=3){if(z[0]=h[i]+r[12],z[1]=h[i+1]+r[13],z[2]=h[i+2]+r[14],J[0]=h[i+3]+r[12],J[1]=h[i+4]+r[13],J[2]=h[i+5]+r[14],S(ae,z)<0&&S(ae,J)<0||S(ue,z)<0&&S(ue,J)<0||S(ce,z)<0&&S(ce,J)<0||S(le,z)<0&&S(le,J)<0)continue;if(g.projectToRenderScreen(z,Z),g.projectToRenderScreen(J,$),Z[2]<0&&$[2]>0){n(K,z,J);const e=g.frustum,t=-S(e[d.NEAR],z)/a(K,_(e[d.NEAR]));u(K,K,t),c(z,z,K),g.projectToRenderScreen(z,Z)}else if(Z[2]>0&&$[2]<0){n(K,J,z);const e=g.frustum,t=-S(e[d.NEAR],J)/a(K,_(e[d.NEAR]));u(K,K,t),c(J,J,K),g.projectToRenderScreen(J,$)}else if(Z[2]<0&&$[2]<0)continue;Z[2]=0,$[2]=0;const e=O(A(Z,$,re),T);e<C&&(C=e,l(ee,z),l(te,J),v=i/3)}const E=s.rayBegin,I=s.rayEnd;if(C<j*j){let e=Number.MAX_VALUE;if(P(A(ee,te,re),A(E,I,se),Y)){n(Y,Y,E);const t=f(Y);u(Y,Y,1/t),e=t/m(E,I)}p(e,Y,v,!1)}}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return!1;const s=r.get(y.POSITION);return E(s,null,!1,t)}requiresSlot(e){return e===x.OPAQUE_MATERIAL||e===x.DRAPED_MATERIAL}createGLMaterial(e){return e.output===v.Color||e.output===v.Highlight?new F(e):null}createBufferWriter(){const e=this.parameters.vertexColors?w:U;return r(this.parameters.stipplePattern)?new B(e):new W(e.clone().vec3f(y.AUXPOS1).vec2f(y.UV0))}}class F extends I{updateParameters(e){return this.ensureTechnique(H,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output===v.Color&&this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}class W{constructor(e){this.vertexBufferLayout=e}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(y.POSITION).length}write(e,t,r,s){q(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,r,s),this._writeAuxpos1(e,t,r,s),this._writeUV0(e,t,r,s)}_writeAuxpos1(e,t,r,s){const i=r.getField(y.AUXPOS1,j),o=t.indices.get(y.POSITION),n=t.vertexAttributes.get(y.POSITION).data,a=e.transformation,u=i.typedBufferStride,c=i.typedBuffer;s*=u;for(let l=0;l<o.length-1;l+=2)for(const e of[1,0]){const t=3*o[l+e],r=n[t],i=n[t+1],f=n[t+2],m=a[0]*r+a[4]*i+a[8]*f+a[12],p=a[1]*r+a[5]*i+a[9]*f+a[13],h=a[2]*r+a[6]*i+a[10]*f+a[14];c[s]=m,c[s+1]=p,c[s+2]=h,s+=u}}_writeUV0(e,t,r,s){var i;const n=r.getField(y.UV0,C),a=t.indices.get(y.POSITION),u=t.vertexAttributes.get(y.POSITION).data,c=null==(i=t.vertexAttributes.get(y.DISTANCETOSTART))?void 0:i.data,f=e.transformation,h=n.typedBufferStride,d=n.typedBuffer;let g=0;d[s*=h]=X.START,d[s+1]=g,s+=h;const O=3*a[0],A=o(z,u[O],u[O+1],u[O+2]);f&&p(A,A,f);const P=J,T=a.length-1;let b=1;const S=c?(e,t,r)=>g=c[r]:(e,t,r)=>g+=m(e,t);for(let m=1;m<T;m+=2){const e=3*a[m];o(P,u[e],u[e+1],u[e+2]),f&&p(P,P,f),S(A,P,b++);for(let t=0;t<2;++t)d[s]=1-t,d[s+1]=g,s+=h;l(A,P)}const _=3*a[T];o(P,u[_],u[_+1],u[_+2]),f&&p(P,P,f),S(A,P,b),d[s]=X.END,d[s+1]=g}}const Q={color:[1,1,1,1],vertexColors:!1,slicePlaneEnabled:!1,width:1,stipplePattern:null,stippleOffColor:null,stipplePreferContinuous:!0,sceneHasOcludees:!1,...R},z=h(),J=h(),K=h(),Y=h(),Z=s(),$=s(),ee=h(),te=h(),re=g(),se=g(),ie=h(),oe=[s(),s(),s(),s()],ne=[h(),h(),h(),h()],ae=T(),ue=T(),ce=T(),le=T();export{k as NativeLineMaterial};
5
+ import e from"../../../../core/Logger.js";import{isSome as t,isNone as r}from"../../../../core/maybe.js";import{createRenderScreenPointArray3 as s}from"../../../../core/screenUtils.js";import{c as i}from"../../../../chunks/vec2.js";import{s as o,f as n,d as a,a as u,b as l,g as c,l as f,i as m,m as p}from"../../../../chunks/vec3.js";import{c as h}from"../../../../chunks/vec3f64.js";import{PlaneIndex as d}from"../../../../geometry/support/frustum.js";import{create as g,distance2 as A,fromPoints as O,closestLineSegmentPoint as P}from"../../../../geometry/support/lineSegment.js";import{create as T,fromPoints as b,signedDistance as S,normal as _}from"../../../../geometry/support/plane.js";import{BufferViewVec3f as j,BufferViewVec2f as C}from"../../../../geometry/support/buffer/BufferView.js";import{ShaderOutput as v}from"../core/shaderLibrary/ShaderOutputOptions.js";import{computeAttachmentOriginLines as y}from"../lib/geometryDataUtils.js";import E from"../lib/GLMaterial.js";import{Material as x,DefaultMaterialParameters as N}from"../lib/Material.js";import{RenderSlot as R}from"../lib/RenderSlot.js";import{isTranslationMatrix as I}from"../lib/Util.js";import{VertexAttribute as L}from"../lib/VertexAttribute.js";import{writeDefaultAttributes as q}from"./internal/bufferWriterUtils.js";import{PositionColorLayout as w,PositionLayout as U,DefaultBufferWriter as B}from"./internal/DefaultBufferWriter.js";import{intersectDrapedRenderLineGeometry as M}from"./internal/MaterialUtil.js";import{isInstanceHidden as D}from"./renderers/utils.js";import{NativeLineTechniqueConfiguration as V,NativeLineTechnique as H}from"../shaders/NativeLineTechnique.js";const G=e.getLogger("esri.views.3d.webgl-engine.materials.NativeLineMaterial");var X;!function(e){e[e.START=0]="START",e[e.END=1]="END"}(X||(X={}));class k extends x{constructor(e){super(e,Q),this._techniqueConfig=new V}getTechniqueConfig(e,r){this._techniqueConfig.output=e,this._techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this._techniqueConfig.vertexColors=this.parameters.vertexColors,this._techniqueConfig.transparent=this.parameters.color[3]<1||this.parameters.width<1,this._techniqueConfig.draped=r.slot===R.DRAPED_MATERIAL;const s=t(this.parameters.stipplePattern);return this._techniqueConfig.stippleEnabled=s,this._techniqueConfig.stippleOffColorEnabled=s&&t(this.parameters.stippleOffColor),this._techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this._techniqueConfig.stipplePreferContinuous=this.parameters.stipplePreferContinuous,this._techniqueConfig}getPassParameters(){return this.parameters}intersect(e,r,s,i,o,n,a,u,l){t(l)?M(e,i,l,n,1,a):this._intersectLineGeometry(e,r,s,i,a)}_intersectLineGeometry(e,t,r,s,p){if(!s.options.selectionMode||D(t))return;if(!I(r))return void G.error("intersection assumes a translation-only matrix");const h=e.vertexAttributes.get(L.POSITION).data,g=s.camera,T=ie;i(T,s.point);const j=2;o(oe[0],T[0]-j,T[1]+j,0),o(oe[1],T[0]+j,T[1]+j,0),o(oe[2],T[0]+j,T[1]-j,0),o(oe[3],T[0]-j,T[1]-j,0);for(let i=0;i<4;i++)if(!g.unprojectFromRenderScreen(oe[i],ne[i]))return;b(g.eye,ne[0],ne[1],ae),b(g.eye,ne[1],ne[2],ue),b(g.eye,ne[2],ne[3],le),b(g.eye,ne[3],ne[0],ce);let C=Number.MAX_VALUE,v=0;for(let i=0;i<h.length-5;i+=3){if(z[0]=h[i]+r[12],z[1]=h[i+1]+r[13],z[2]=h[i+2]+r[14],J[0]=h[i+3]+r[12],J[1]=h[i+4]+r[13],J[2]=h[i+5]+r[14],S(ae,z)<0&&S(ae,J)<0||S(ue,z)<0&&S(ue,J)<0||S(le,z)<0&&S(le,J)<0||S(ce,z)<0&&S(ce,J)<0)continue;if(g.projectToRenderScreen(z,Z),g.projectToRenderScreen(J,$),Z[2]<0&&$[2]>0){n(K,z,J);const e=g.frustum,t=-S(e[d.NEAR],z)/a(K,_(e[d.NEAR]));u(K,K,t),l(z,z,K),g.projectToRenderScreen(z,Z)}else if(Z[2]>0&&$[2]<0){n(K,J,z);const e=g.frustum,t=-S(e[d.NEAR],J)/a(K,_(e[d.NEAR]));u(K,K,t),l(J,J,K),g.projectToRenderScreen(J,$)}else if(Z[2]<0&&$[2]<0)continue;Z[2]=0,$[2]=0;const e=A(O(Z,$,re),T);e<C&&(C=e,c(ee,z),c(te,J),v=i/3)}const y=s.rayBegin,E=s.rayEnd;if(C<j*j){let e=Number.MAX_VALUE;if(P(O(ee,te,re),O(y,E,se),Y)){n(Y,Y,y);const t=f(Y);u(Y,Y,1/t),e=t/m(y,E)}p(e,Y,v,!1)}}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return!1;const s=r.get(L.POSITION);return y(s,null,!1,t)}requiresSlot(e){return e===R.OPAQUE_MATERIAL||e===R.DRAPED_MATERIAL}createGLMaterial(e){return e.output===v.Color||e.output===v.Highlight?new F(e):null}createBufferWriter(){const e=this.parameters.vertexColors?w:U;return r(this.parameters.stipplePattern)?new B(e):new W(e.clone().vec3f(L.AUXPOS1).vec2f(L.UV0))}}class F extends E{updateParameters(e){return this.ensureTechnique(H,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output===v.Color&&this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}class W{constructor(e){this.vertexBufferLayout=e}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(L.POSITION).length}write(e,t,r,s){q(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,r,s),this._writeAuxpos1(e,t,r,s),this._writeUV0(e,t,r,s)}_writeAuxpos1(e,t,r,s){const i=r.getField(L.AUXPOS1,j),o=t.indices.get(L.POSITION),n=t.vertexAttributes.get(L.POSITION).data,a=e.transformation,u=i.typedBufferStride,l=i.typedBuffer;s*=u;for(let c=0;c<o.length-1;c+=2)for(const e of[1,0]){const t=3*o[c+e],r=n[t],i=n[t+1],f=n[t+2],m=a[0]*r+a[4]*i+a[8]*f+a[12],p=a[1]*r+a[5]*i+a[9]*f+a[13],h=a[2]*r+a[6]*i+a[10]*f+a[14];l[s]=m,l[s+1]=p,l[s+2]=h,s+=u}}_writeUV0(e,t,r,s){var i;const n=r.getField(L.UV0,C),a=t.indices.get(L.POSITION),u=t.vertexAttributes.get(L.POSITION).data,l=null==(i=t.vertexAttributes.get(L.DISTANCETOSTART))?void 0:i.data,f=e.transformation,h=n.typedBufferStride,d=n.typedBuffer;let g=0;d[s*=h]=X.START,d[s+1]=g,s+=h;const A=3*a[0],O=o(z,u[A],u[A+1],u[A+2]);f&&p(O,O,f);const P=J,T=a.length-1;let b=1;const S=l?(e,t,r)=>g=l[r]:(e,t,r)=>g+=m(e,t);for(let m=1;m<T;m+=2){const e=3*a[m];o(P,u[e],u[e+1],u[e+2]),f&&p(P,P,f),S(O,P,b++);for(let t=0;t<2;++t)d[s]=1-t,d[s+1]=g,s+=h;c(O,P)}const _=3*a[T];o(P,u[_],u[_+1],u[_+2]),f&&p(P,P,f),S(O,P,b),d[s]=X.END,d[s+1]=g}}const Q={color:[1,1,1,1],vertexColors:!1,slicePlaneEnabled:!1,width:1,stipplePattern:null,stippleOffColor:null,stipplePreferContinuous:!0,sceneHasOcludees:!1,...N},z=h(),J=h(),K=h(),Y=h(),Z=s(),$=s(),ee=h(),te=h(),re=g(),se=g(),ie=h(),oe=[s(),s(),s(),s()],ne=[h(),h(),h(),h()],ae=T(),ue=T(),le=T(),ce=T();export{k as NativeLineMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as e}from"../../../../core/mathUtils.js";import{isNone as t}from"../../../../core/maybe.js";import{fromValues as r}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec4f as i}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as a}from"../core/shaderLibrary/ShaderOutputOptions.js";import{Normals as o}from"../core/shaderLibrary/shading/Normals.glsl.js";import{VertexAttribute as n}from"../lib/basicInterfaces.js";import{computeAttachmentOriginLines as u}from"../lib/geometryDataUtils.js";import l from"../lib/GLMaterial.js";import{materialParametersDefaults as h,Material as c}from"../lib/Material.js";import{isPathGeometry as d}from"../lib/PathGeometry.js";import{RenderPass as p}from"../lib/RenderPass.js";import{RenderSlot as m}from"../lib/RenderSlot.js";import{assert as f}from"../lib/Util.js";import{pathVertexAttributeLocations as b,PathTechniqueConfiguration as v,PathTechnique as S}from"./PathTechnique.js";import E from"./VisualVariableMaterialParameters.js";import{writeDefaultAttributes as A,writeBufferVec4 as g}from"./internal/bufferWriterUtils.js";import{intersectAabbInvDir as P}from"./internal/MaterialUtil.js";const O=f;class T extends c{constructor(e){super(e,M),this.supportsEdges=!0,this._vertexAttributeLocations=b,this.techniqueConfig=new v,this.vertexBufferLayout=T.getVertexBufferLayout(this.parameters)}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.vvOpacity=this.parameters.vvOpacityEnabled,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,e!==a.Color&&e!==a.Alpha||(this.techniqueConfig.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?o.DoubleSidedMode.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?o.DoubleSidedMode.WindingOrder:o.DoubleSidedMode.None,this.techniqueConfig.receiveShadows=this.parameters.receiveShadows,this.techniqueConfig.receiveSSAO=!!t.ssaoEnabled&&this.parameters.receiveSSAO),this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}getPassParameters(){return this.parameters}isVisibleInPass(e){return e!==p.MATERIAL_DEPTH_SHADOWMAP_ALL&&e!==p.MATERIAL_DEPTH_SHADOWMAP_DEFAULT&&e!==p.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT||this.parameters.castShadows}isVisible(){const e=this.parameters;return!!super.isVisible()&&e.opacity>0}intersect(i,s,a,o,n,u,l){const h=i;if(!d(h))return;const c=h.path,p=[this.parameters.size[0],this.parameters.size[1]];if(this.parameters.vvSizeEnabled){const t=this.parameters.vvSizeOffset,r=this.parameters.vvSizeFactor,i=this.parameters.vvSizeMinSize,s=this.parameters.vvSizeMaxSize,a=c.sizeAttributeValue;p[0]*=e(t[0]+a*r[0],i[0],s[0]),p[1]*=e(t[2]+a*r[2],i[2],s[2])}const m=Math.max(p[0],p[1]),f=i.boundingInfo;if(t(f))return void this._intersectTriangles(c,p,n,u,l);const b=r(f.bbMin[0]-m,f.bbMin[1]-m,f.bbMin[2]-m,f.bbMax[0]+m,f.bbMax[1]+m,f.bbMax[2]+m),v=[u[0]-n[0],u[1]-n[1],u[2]-n[2]],S=Math.sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]),E=[S/v[0],S/v[1],S/v[2]];P(b,n,E,o.tolerance)&&this._intersectTriangles(c,p,n,u,l)}_intersectTriangles(e,t,r,i,s){e.baked.size&&e.baked.size[0]===t[0]&&e.baked.size[1]===t[1]||e.baked.bake(t),e.baked.intersect(r,i,s)}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return null;const i=r.get(n.POSITION);return u(i,null,!1,t)}createBufferWriter(){return new y(this.vertexBufferLayout)}requiresSlot(e){return e===(this.parameters.transparent?m.TRANSPARENT_MATERIAL:m.OPAQUE_MATERIAL)||e===m.DRAPED_MATERIAL}createGLMaterial(e){return e.output===a.Color||e.output===a.Alpha||e.output===a.Depth||e.output===a.Normal||e.output===a.Highlight||e.output===a.Shadow&&this.parameters.castShadows?new L(e):null}static getVertexBufferLayout(e){let t=s().vec3f(n.POSITION).vec4f(n.PROFILERIGHT).vec4f(n.PROFILEUP).vec4f(n.PROFILEVERTEXANDNORMAL);return(e.vvColorEnabled||e.vvSizeEnabled||e.vvOpacityEnabled)&&(t=t.vec4f(n.FEATUREVALUE)),t}}class L extends l{updateParameters(e){return this.ensureTechnique(S,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}_updateShadowState(e){(t(this.technique)||e.shadowMappingEnabled!==this.technique.configuration.receiveShadows)&&this._material.setParameters({receiveShadows:e.shadowMappingEnabled})}beginSlot(e){return this._output!==a.Color&&this._output!==a.Alpha||(this._updateShadowState(e),this._updateOccludeeState(e)),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}const M={size:[1,1,1],ambient:[.2,.2,.2],diffuse:[.8,.8,.8],specular:[0,0,0],opacity:1,doubleSided:!1,doubleSidedType:"normal",receiveSSAO:!0,receiveShadows:!1,castShadows:!0,slicePlaneEnabled:!1,transparent:!1,sceneHasOcludees:!1,...E.Default,...h};class y{constructor(e){this.vertexBufferLayout=e}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(n.POSITION).length}write(e,t,r,s){const a=e=>{if(t.vertexAttributes.has(e)){const a=t.vertexAttributes.get(e),o=t.indices.get(e);O(4===a.size);const n=r.getField(e,i);if(!n)throw new Error("unable to acquire view for "+e);g(o,a.data,n,s)}};a(n.PROFILERIGHT),a(n.PROFILEUP),a(n.PROFILEVERTEXANDNORMAL),this.vertexBufferLayout.hasField(n.FEATUREVALUE)&&a(n.FEATUREVALUE),A(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,r,s)}}export{T as PathMaterial};
5
+ import{clamp as e}from"../../../../core/mathUtils.js";import{isNone as t}from"../../../../core/maybe.js";import{fromValues as r}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec4f as i}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as a}from"../core/shaderLibrary/ShaderOutputOptions.js";import{NormalsDoubleSidedMode as n}from"../core/shaderLibrary/shading/Normals.glsl.js";import{computeAttachmentOriginLines as o}from"../lib/geometryDataUtils.js";import u from"../lib/GLMaterial.js";import{Material as h,DefaultMaterialParameters as l}from"../lib/Material.js";import{isPathGeometry as c}from"../lib/PathGeometry.js";import{RenderPass as p}from"../lib/RenderPass.js";import{RenderSlot as d}from"../lib/RenderSlot.js";import{assert as m}from"../lib/Util.js";import{VertexAttribute as f}from"../lib/VertexAttribute.js";import{pathVertexAttributeLocations as b,PathTechniqueConfiguration as v,PathTechnique as A}from"./PathTechnique.js";import{VisualVariableDefaultMaterialParameters as E}from"./VisualVariableMaterialParameters.js";import{writeDefaultAttributes as S,writeBufferVec4 as g}from"./internal/bufferWriterUtils.js";import{intersectAabbInvDir as P}from"./internal/MaterialUtil.js";class O extends h{constructor(e){super(e,L),this.supportsEdges=!0,this._vertexAttributeLocations=b,this.techniqueConfig=new v,this.vertexBufferLayout=O.getVertexBufferLayout(this.parameters)}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.vvOpacity=this.parameters.vvOpacityEnabled,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,e!==a.Color&&e!==a.Alpha||(this.techniqueConfig.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?n.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?n.WindingOrder:n.None,this.techniqueConfig.receiveShadows=this.parameters.receiveShadows,this.techniqueConfig.receiveSSAO=!!t.ssaoEnabled&&this.parameters.receiveSSAO),this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}getPassParameters(){return this.parameters}isVisibleInPass(e){return e!==p.MATERIAL_DEPTH_SHADOWMAP_ALL&&e!==p.MATERIAL_DEPTH_SHADOWMAP_DEFAULT&&e!==p.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT||this.parameters.castShadows}isVisible(){const e=this.parameters;return!!super.isVisible()&&e.opacity>0}intersect(i,s,a,n,o,u,h){const l=i;if(!c(l))return;const p=l.path,d=[this.parameters.size[0],this.parameters.size[1]];if(this.parameters.vvSizeEnabled){const t=this.parameters.vvSizeOffset,r=this.parameters.vvSizeFactor,i=this.parameters.vvSizeMinSize,s=this.parameters.vvSizeMaxSize,a=p.sizeAttributeValue;d[0]*=e(t[0]+a*r[0],i[0],s[0]),d[1]*=e(t[2]+a*r[2],i[2],s[2])}const m=Math.max(d[0],d[1]),f=i.boundingInfo;if(t(f))return void this._intersectTriangles(p,d,o,u,h);const b=r(f.bbMin[0]-m,f.bbMin[1]-m,f.bbMin[2]-m,f.bbMax[0]+m,f.bbMax[1]+m,f.bbMax[2]+m),v=[u[0]-o[0],u[1]-o[1],u[2]-o[2]],A=Math.sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]),E=[A/v[0],A/v[1],A/v[2]];P(b,o,E,n.tolerance)&&this._intersectTriangles(p,d,o,u,h)}_intersectTriangles(e,t,r,i,s){e.baked.size&&e.baked.size[0]===t[0]&&e.baked.size[1]===t[1]||e.baked.bake(t),e.baked.intersect(r,i,s)}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return null;const i=r.get(f.POSITION);return o(i,null,!1,t)}createBufferWriter(){return new M(this.vertexBufferLayout)}requiresSlot(e){return e===(this.parameters.transparent?d.TRANSPARENT_MATERIAL:d.OPAQUE_MATERIAL)||e===d.DRAPED_MATERIAL}createGLMaterial(e){return e.output===a.Color||e.output===a.Alpha||e.output===a.Depth||e.output===a.Normal||e.output===a.Highlight||e.output===a.Shadow&&this.parameters.castShadows?new T(e):null}static getVertexBufferLayout(e){let t=s().vec3f(f.POSITION).vec4f(f.PROFILERIGHT).vec4f(f.PROFILEUP).vec4f(f.PROFILEVERTEXANDNORMAL);return(e.vvColorEnabled||e.vvSizeEnabled||e.vvOpacityEnabled)&&(t=t.vec4f(f.FEATUREVALUE)),t}}class T extends u{updateParameters(e){return this.ensureTechnique(A,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}_updateShadowState(e){(t(this.technique)||e.shadowMappingEnabled!==this.technique.configuration.receiveShadows)&&this._material.setParameters({receiveShadows:e.shadowMappingEnabled})}beginSlot(e){return this._output!==a.Color&&this._output!==a.Alpha||(this._updateShadowState(e),this._updateOccludeeState(e)),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}const L={size:[1,1,1],ambient:[.2,.2,.2],diffuse:[.8,.8,.8],specular:[0,0,0],opacity:1,doubleSided:!1,doubleSidedType:"normal",receiveSSAO:!0,receiveShadows:!1,castShadows:!0,slicePlaneEnabled:!1,transparent:!1,sceneHasOcludees:!1,...E,...l};class M{constructor(e){this.vertexBufferLayout=e}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(f.POSITION).length}write(e,t,r,s){const a=e=>{if(t.vertexAttributes.has(e)){const a=t.vertexAttributes.get(e),n=t.indices.get(e);m(4===a.size);const o=r.getField(e,i);if(!o)throw new Error("unable to acquire view for "+e);g(n,a.data,o,s)}};a(f.PROFILERIGHT),a(f.PROFILEUP),a(f.PROFILEVERTEXANDNORMAL),this.vertexBufferLayout.hasField(f.FEATUREVALUE)&&a(f.FEATUREVALUE),S(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,r,s)}}export{O as PathMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as o}from"../core/shaderLibrary/Slice.glsl.js";import{setVVUniforms as i}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{bindVertexNormalUniforms as t}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{bindMultipassTerrainTexture as s}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{Normals as a}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as n}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapView as l}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindProjectionMatrix as p,bindNearFar as d,bindView as u,bindCameraPosition as c}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as h}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as m}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as g,ShaderTechniqueConfiguration as v}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{VertexAttribute as f,TransparencyPassType as b}from"../lib/basicInterfaces.js";import{blendingDefault as y,oitBlending as S,oitDepthTest as T,OITPolygonOffset as O}from"../lib/OrderIndependentTransparency.js";import{Program as P}from"../lib/Program.js";import{stencilWriteMaskOn as E,stencilBaseAllZerosParams as j}from"../lib/StencilUtils.js";import{P as M}from"../../../../chunks/Path.glsl.js";import{makePipelineState as w,frontFaceCullingParams as C,defaultDepthWriteParams as N,defaultColorWriteParams as U}from"../../../webgl/renderState.js";const A=new Map([[f.POSITION,0],[f.PROFILERIGHT,1],[f.PROFILEUP,2],[f.PROFILEVERTEXANDNORMAL,3],[f.FEATUREVALUE,4]]);class L extends m{initializeProgram(e){const r=L.shader.get(),o=this.configuration,i=r.build({OITEnabled:o.transparencyPassType===b.Color,output:o.output,viewingMode:e.viewingMode,slicePlaneEnabled:o.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,receiveShadows:o.receiveShadows,vvSize:o.vvSize,vvColor:o.vvColor,vvInstancingEnabled:!0,vvOpacity:o.vvOpacity,pbrMode:n.Disabled,useCustomDTRExponentForWater:!1,receiveAmbientOcclusion:o.receiveSSAO,doubleSidedMode:o.doubleSidedMode,multipassTerrainEnabled:o.multipassTerrainEnabled,cullAboveGround:o.cullAboveGround});return new P(e.rctx,i,A)}bindPass(e,o){var t,a;p(this.program,o.camera.projectionMatrix),this.program.setUniform3fv("size",e.size),o.multipassTerrainEnabled&&(this.program.setUniform2fv("cameraNearFar",o.camera.nearFar),this.program.setUniform2fv("inverseViewport",o.inverseViewport),s(this.program,o)),this.configuration.output!==r.Color&&this.configuration.output!==r.Alpha||this.program.setUniform1f("opacity",e.opacity),this.configuration.output===r.Color?(o.lighting.setUniforms(this.program,!1),this.program.setUniform3fv("ambient",e.ambient),this.program.setUniform3fv("diffuse",e.diffuse),this.program.setUniform3fv("specular",e.specular),this.program.setUniform1f("opacity",e.opacity)):this.configuration.output!==r.Depth&&this.configuration.output!==r.Shadow||d(this.program,o.camera.nearFar),i(this.program,e),null==(t=o.shadowMap)||t.bind(this.program),null==(a=o.ssaoHelper)||a.bind(this.program,o.camera)}bindDraw(e){u(this.program,e),o(this.program,this.configuration,e),this.program.rebindTextures(),this.configuration.output!==r.Color&&this.configuration.output!==r.Alpha||c(this.program,e.origin,e.camera.viewInverseTransposeMatrix),this.configuration.output===r.Color&&l(this.program,e),this.configuration.output===r.Normal&&t(this.program,e.camera.viewInverseTransposeMatrix)}_setPipelineState(e){const o=this.configuration,i=e===b.NONE,t=e===b.FrontFace,s=e=>!e.slicePlaneEnabled&&!(e.transparent||e.doubleSidedMode===a.DoubleSidedMode.None);return w({blending:o.output!==r.Color&&o.output!==r.Alpha||!o.transparent?null:i?y:S(e),culling:s(o)&&C,depthTest:{func:T(e)},depthWrite:i||t?N:null,colorWrite:U,stencilWrite:o.sceneHasOcludees?E:null,stencilTest:o.sceneHasOcludees?j:null,polygonOffset:i||t?null:O})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}L.shader=new h(M,(()=>import("../shaders/Path.glsl.js")));class x extends v{constructor(){super(...arguments),this.output=r.Color,this.doubleSidedMode=a.DoubleSidedMode.None,this.receiveShadows=!1,this.receiveSSAO=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.slicePlaneEnabled=!1,this.transparent=!1,this.sceneHasOcludees=!1,this.transparencyPassType=b.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}e([g({count:r.COUNT})],x.prototype,"output",void 0),e([g({count:a.DoubleSidedMode.COUNT})],x.prototype,"doubleSidedMode",void 0),e([g()],x.prototype,"receiveShadows",void 0),e([g()],x.prototype,"receiveSSAO",void 0),e([g()],x.prototype,"vvSize",void 0),e([g()],x.prototype,"vvColor",void 0),e([g()],x.prototype,"vvOpacity",void 0),e([g()],x.prototype,"slicePlaneEnabled",void 0),e([g()],x.prototype,"transparent",void 0),e([g()],x.prototype,"sceneHasOcludees",void 0),e([g({count:b.COUNT})],x.prototype,"transparencyPassType",void 0),e([g()],x.prototype,"multipassTerrainEnabled",void 0),e([g()],x.prototype,"cullAboveGround",void 0);export{L as PathTechnique,x as PathTechniqueConfiguration,A as pathVertexAttributeLocations};
5
+ import{_ as r}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as e}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as i}from"../core/shaderLibrary/Slice.glsl.js";import{setVVUniforms as o}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{bindVertexNormalUniforms as t}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{bindMultipassTerrainTexture as s}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{NormalsDoubleSidedMode as a}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as n}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapView as l}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindProjectionMatrix as p,bindView as d,bindCameraPosition as u}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as c}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as h}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as m,ShaderTechniqueConfiguration as v}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as g}from"../lib/basicInterfaces.js";import{blendingDefault as f,oitBlending as b,oitDepthTest as y,OITPolygonOffset as S}from"../lib/OrderIndependentTransparency.js";import{Program as T}from"../lib/Program.js";import{stencilWriteMaskOn as P,stencilBaseAllZerosParams as O}from"../lib/StencilUtils.js";import{VertexAttribute as E}from"../lib/VertexAttribute.js";import{P as j}from"../../../../chunks/Path.glsl.js";import{makePipelineState as w,frontFaceCullingParams as M,defaultDepthWriteParams as U,defaultColorWriteParams as A}from"../../../webgl/renderState.js";const C=new Map([[E.POSITION,0],[E.PROFILERIGHT,1],[E.PROFILEUP,2],[E.PROFILEVERTEXANDNORMAL,3],[E.FEATUREVALUE,4]]);class N extends h{initializeProgram(r){const e=N.shader.get(),i=this.configuration,o=e.build({oitEnabled:i.transparencyPassType===g.Color,output:i.output,viewingMode:r.viewingMode,slicePlaneEnabled:i.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,receiveShadows:i.receiveShadows,vvSize:i.vvSize,vvColor:i.vvColor,vvInstancingEnabled:!0,vvOpacity:i.vvOpacity,pbrMode:n.Disabled,useCustomDTRExponentForWater:!1,receiveAmbientOcclusion:i.receiveSSAO,doubleSidedMode:i.doubleSidedMode,multipassTerrainEnabled:i.multipassTerrainEnabled,cullAboveGround:i.cullAboveGround});return new T(r.rctx,o,C)}bindPass(r,i){var t,a;p(this.program,i.camera.projectionMatrix),this.program.setUniform3fv("size",r.size),i.multipassTerrainEnabled&&(this.program.setUniform2fv("nearFar",i.camera.nearFar),this.program.setUniform2fv("inverseViewport",i.inverseViewport),s(this.program,i)),this.configuration.output!==e.Color&&this.configuration.output!==e.Alpha||this.program.setUniform1f("opacity",r.opacity),this.configuration.output===e.Color?(i.lighting.setUniforms(this.program,!1),this.program.setUniform3fv("ambient",r.ambient),this.program.setUniform3fv("diffuse",r.diffuse),this.program.setUniform3fv("specular",r.specular),this.program.setUniform1f("opacity",r.opacity)):this.configuration.output!==e.Depth&&this.configuration.output!==e.Shadow||this.program.setUniform2fv("nearFar",i.camera.nearFar),o(this.program,r),null==(t=i.shadowMap)||t.bind(this.program),null==(a=i.ssaoHelper)||a.bind(this.program,i.camera)}bindDraw(r){d(this.program,r),i(this.program,this.configuration,r),this.program.rebindTextures(),this.configuration.output!==e.Color&&this.configuration.output!==e.Alpha||u(this.program,r.origin,r.camera.viewInverseTransposeMatrix),this.configuration.output===e.Color&&l(this.program,r),this.configuration.output===e.Normal&&t(this.program,r.camera.viewInverseTransposeMatrix)}_setPipelineState(r){const i=this.configuration,o=r===g.NONE,t=r===g.FrontFace,s=r=>!r.slicePlaneEnabled&&!(r.transparent||r.doubleSidedMode===a.None);return w({blending:i.output!==e.Color&&i.output!==e.Alpha||!i.transparent?null:o?f:b(r),culling:s(i)&&M,depthTest:{func:y(r)},depthWrite:o||t?U:null,colorWrite:A,stencilWrite:i.sceneHasOcludees?P:null,stencilTest:i.sceneHasOcludees?O:null,polygonOffset:o||t?null:S})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}N.shader=new c(j,(()=>import("../shaders/Path.glsl.js")));class L extends v{constructor(){super(...arguments),this.output=e.Color,this.doubleSidedMode=a.None,this.receiveShadows=!1,this.receiveSSAO=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.slicePlaneEnabled=!1,this.transparent=!1,this.sceneHasOcludees=!1,this.transparencyPassType=g.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}r([m({count:e.COUNT})],L.prototype,"output",void 0),r([m({count:a.COUNT})],L.prototype,"doubleSidedMode",void 0),r([m()],L.prototype,"receiveShadows",void 0),r([m()],L.prototype,"receiveSSAO",void 0),r([m()],L.prototype,"vvSize",void 0),r([m()],L.prototype,"vvColor",void 0),r([m()],L.prototype,"vvOpacity",void 0),r([m()],L.prototype,"slicePlaneEnabled",void 0),r([m()],L.prototype,"transparent",void 0),r([m()],L.prototype,"sceneHasOcludees",void 0),r([m({count:g.COUNT})],L.prototype,"transparencyPassType",void 0),r([m()],L.prototype,"multipassTerrainEnabled",void 0),r([m()],L.prototype,"cullAboveGround",void 0);export{N as PathTechnique,L as PathTechniqueConfiguration,C as pathVertexAttributeLocations};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{BufferViewMat3f as e,BufferViewVec4f as t,BufferViewVec4u8 as r,BufferViewVec3f as i}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as a}from"../core/shaderLibrary/ShaderOutputOptions.js";import{CullFaceOptions as n,VertexAttribute as o}from"../lib/basicInterfaces.js";import l from"../lib/GLMaterial.js";import{outputFromPass as u}from"../lib/GLMaterials.js";import{materialParametersDefaults as c,Material as h}from"../lib/Material.js";import{OITPolygonOffsetLimit as p}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as f}from"../lib/RenderSlot.js";import{assert as m}from"../lib/Util.js";import{Style as d}from"./PatternStyle.js";import{writeBufferVec4 as g,writeColor as b,writePosition as C}from"./internal/bufferWriterUtils.js";import{DefaultBufferWriter as P}from"./internal/DefaultBufferWriter.js";import{intersectTriangleGeometry as A}from"./internal/MaterialUtil.js";import{patternVertexAttributeLocations as O,PatternTechniqueConfiguration as E,PatternTechnique as T}from"../shaders/PatternTechnique.js";class q extends h{constructor(e){super(e,R),this.supportsEdges=!0,this._vertexAttributeLocations=O,this.techniqueConfig=new E}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.parameters.cullFace,this.techniqueConfig.vertexColors=this.parameters.vertexColors,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.polygonOffset=this.parameters.polygonOffset,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.style=this.parameters.style,this.techniqueConfig.patternSpacing=this.parameters.patternSpacing,this.techniqueConfig.lineWidth=this.parameters.lineWidth,this.techniqueConfig.draped=this.parameters.draped,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.enableOffset=t.camera.relativeElevation<p,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}getPassParameters(){return this.parameters}intersect(e,t,r,i,s,a,n){A(e,t,i,s,a,void 0,n)}requiresSlot(e,t){if(e===f.DRAPED_MATERIAL)return!0;if(u(t)===a.Highlight)return e===f.OPAQUE_MATERIAL;return e===(this.parameters.writeDepth?f.TRANSPARENT_MATERIAL:f.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL)}createGLMaterial(e){return e.output===a.Color||e.output===a.Alpha||e.output===a.Highlight||e.output===a.Depth&&this.parameters.writeLinearDepth?new y(e):null}createBufferWriter(){const e=s().vec3f(o.POSITION).vec4u8(o.COLOR).vec4f(o.UVMAPSPACE);return this.parameters.draped||e.mat3f(o.BOUNDINGRECT),new S(e)}}class y extends l{updateParameters(e){return this.ensureTechnique(T,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==a.Color&&this._output!==a.Alpha||this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}class S extends P{write(s,a,n,l){for(const u of this.vertexBufferLayout.fieldNames){const c=a.vertexAttributes.get(u),h=a.indices.get(u);if(c&&h)switch(u){case o.POSITION:{m(3===c.size);const e=n.getField(u,i);e&&C(h,c.data,s.transformation,e,l);break}case o.COLOR:{m(3===c.size||4===c.size);const e=n.getField(u,r);e&&b(h,c.data,c.size,e,l);break}case o.UVMAPSPACE:{m(4===c.size);const e=n.getField(u,t);e&&g(h,c.data,e,l);break}case o.BOUNDINGRECT:{m(9===c.size);const t=n.getField(u,e);t&&this.writeBoundingRect(h,c.data,s.transformation,t,l);break}}}}writeBoundingRect(e,t,r,i,s){const a=r,n=i.typedBuffer,o=i.typedBufferStride,l=e.length;s*=o;for(let u=0;u<l;++u){const r=9*e[u],i=t[r],l=t[r+1],c=t[r+2];n[s]=a[0]*i+a[4]*l+a[8]*c+a[12],n[s+1]=a[1]*i+a[5]*l+a[9]*c+a[13],n[s+2]=a[2]*i+a[6]*l+a[10]*c+a[14];for(let e=3;e<9;++e)n[s+e]=t[r+e];s+=o}}}const R={color:[1,1,1,1],writeDepth:!0,writeLinearDepth:!1,vertexColors:!1,polygonOffset:!1,slicePlaneEnabled:!1,cullFace:n.None,sceneHasOcludees:!1,style:d.Cross,patternSpacing:10,lineWidth:1,draped:!0,...c};export{q as PatternMaterial};
5
+ import{BufferViewMat3f as e,BufferViewVec4f as t,BufferViewVec4u8 as r,BufferViewVec3f as i}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as a}from"../core/shaderLibrary/ShaderOutputOptions.js";import{CullFaceOptions as n}from"../lib/basicInterfaces.js";import o from"../lib/GLMaterial.js";import{outputFromPass as l}from"../lib/GLMaterials.js";import{DefaultMaterialParameters as u,Material as c}from"../lib/Material.js";import{OITPolygonOffsetLimit as h}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as p}from"../lib/RenderSlot.js";import{assert as f}from"../lib/Util.js";import{VertexAttribute as m}from"../lib/VertexAttribute.js";import{Style as d}from"./PatternStyle.js";import{writeBufferVec4 as g,writeColor as b,writePosition as C}from"./internal/bufferWriterUtils.js";import{DefaultBufferWriter as A}from"./internal/DefaultBufferWriter.js";import{intersectTriangleGeometry as P}from"./internal/MaterialUtil.js";import{patternVertexAttributeLocations as O,PatternTechniqueConfiguration as E,PatternTechnique as T}from"../shaders/PatternTechnique.js";class q extends c{constructor(e){super(e,R),this.supportsEdges=!0,this._vertexAttributeLocations=O,this.techniqueConfig=new E}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.parameters.cullFace,this.techniqueConfig.vertexColors=this.parameters.vertexColors,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.polygonOffset=this.parameters.polygonOffset,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.style=this.parameters.style,this.techniqueConfig.patternSpacing=this.parameters.patternSpacing,this.techniqueConfig.lineWidth=this.parameters.lineWidth,this.techniqueConfig.draped=this.parameters.draped,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.enableOffset=t.camera.relativeElevation<h,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}getPassParameters(){return this.parameters}intersect(e,t,r,i,s,a,n){P(e,t,i,s,a,void 0,n)}requiresSlot(e,t){if(e===p.DRAPED_MATERIAL)return!0;if(l(t)===a.Highlight)return e===p.OPAQUE_MATERIAL;return e===(this.parameters.writeDepth?p.TRANSPARENT_MATERIAL:p.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL)}createGLMaterial(e){return e.output===a.Color||e.output===a.Alpha||e.output===a.Highlight||e.output===a.Depth&&this.parameters.writeLinearDepth?new y(e):null}createBufferWriter(){const e=s().vec3f(m.POSITION).vec4u8(m.COLOR).vec4f(m.UVMAPSPACE);return this.parameters.draped||e.mat3f(m.BOUNDINGRECT),new S(e)}}class y extends o{updateParameters(e){return this.ensureTechnique(T,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==a.Color&&this._output!==a.Alpha||this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}class S extends A{write(s,a,n,o){for(const l of this.vertexBufferLayout.fieldNames){const u=a.vertexAttributes.get(l),c=a.indices.get(l);if(u&&c)switch(l){case m.POSITION:{f(3===u.size);const e=n.getField(l,i);e&&C(c,u.data,s.transformation,e,o);break}case m.COLOR:{f(3===u.size||4===u.size);const e=n.getField(l,r);e&&b(c,u.data,u.size,e,o);break}case m.UVMAPSPACE:{f(4===u.size);const e=n.getField(l,t);e&&g(c,u.data,e,o);break}case m.BOUNDINGRECT:{f(9===u.size);const t=n.getField(l,e);t&&this.writeBoundingRect(c,u.data,s.transformation,t,o);break}}}}writeBoundingRect(e,t,r,i,s){const a=r,n=i.typedBuffer,o=i.typedBufferStride,l=e.length;s*=o;for(let u=0;u<l;++u){const r=9*e[u],i=t[r],l=t[r+1],c=t[r+2];n[s]=a[0]*i+a[4]*l+a[8]*c+a[12],n[s+1]=a[1]*i+a[5]*l+a[9]*c+a[13],n[s+2]=a[2]*i+a[6]*l+a[10]*c+a[14];for(let e=3;e<9;++e)n[s+e]=t[r+e];s+=o}}}const R={color:[1,1,1,1],writeDepth:!0,writeLinearDepth:!1,vertexColors:!1,polygonOffset:!1,slicePlaneEnabled:!1,cullFace:n.None,sceneHasOcludees:!1,style:d.Cross,patternSpacing:10,lineWidth:1,draped:!0,...u};export{q as PatternMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{isSome as r}from"../../../../core/maybe.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{c as s}from"../../../../chunks/vec2.js";import{s as a,f as n,d as o,a as l,b as c,g as u,l as p,i as h,m}from"../../../../chunks/vec3.js";import{c as f}from"../../../../chunks/vec3f64.js";import{PlaneIndex as T}from"../../../../geometry/support/frustum.js";import{create as d,distance2 as E,fromPoints as A,closestLineSegmentPoint as _}from"../../../../geometry/support/lineSegment.js";import{create as v,fromPoints as R,signedDistance as O,normal as I}from"../../../../geometry/support/plane.js";import{newLayout as S}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as g}from"../core/shaderLibrary/ShaderOutputOptions.js";import{VertexAttribute as b}from"../lib/basicInterfaces.js";import{computeAttachmentOriginLines as C}from"../lib/geometryDataUtils.js";import L from"../lib/GLMaterial.js";import{outputFromPass as N}from"../lib/GLMaterials.js";import{materialParametersDefaults as P,Material as y,RenderOccludedFlag as D}from"../lib/Material.js";import{RenderSlot as q}from"../lib/RenderSlot.js";import{isTranslationMatrix as U}from"../lib/Util.js";import j from"./VisualVariableMaterialParameters.js";import{isInstanceHidden as F}from"./renderers/utils.js";import{C as x,N as M}from"../../../../chunks/RibbonLine.glsl.js";import{ribbonVertexAttributeLocations as w,RibbonLineTechniqueConfiguration as G,RibbonLineTechnique as J}from"../shaders/RibbonLineTechnique.js";const H=e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial");var z;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(z||(z={}));class B extends y{constructor(e){super(e,Z),this._vertexAttributeLocations=w,this.techniqueConfig=new G,this.layout=this.createLayout()}isClosed(e,t){return Y(this.parameters,e,t)}dispose(){}getPassParameters(){return this.parameters}getTechniqueConfig(e,t){this.techniqueConfig.output=e,this.techniqueConfig.draped=t.slot===q.DRAPED_MATERIAL;const i=r(this.parameters.stipplePattern);return this.techniqueConfig.stippleEnabled=i,this.techniqueConfig.stippleOffColorEnabled=i&&r(this.parameters.stippleOffColor),this.techniqueConfig.stippleScaleWithLineWidth=i&&this.parameters.stippleScaleWithLineWidth,this.techniqueConfig.stipplePreferContinuous=i&&this.parameters.stipplePreferContinuous,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this.techniqueConfig.roundJoins="round"===this.parameters.join,this.techniqueConfig.capType=this.parameters.cap,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.polygonOffset=this.parameters.polygonOffset,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.vvOpacity=this.parameters.vvOpacityEnabled,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.innerColorEnabled=this.parameters.innerWidth>0&&r(this.parameters.innerColor),this.techniqueConfig.falloffEnabled=this.parameters.falloff>0,this.techniqueConfig.occluder=this.parameters.renderOccluded===D.OccludeAndTransparentStencil,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig.wireframe=this.parameters.wireframe,this.techniqueConfig}intersect(e,t,i,s,a,n,o,l,c){r(c)?this._intersectDrapedLineGeometry(e,s,c,n,o):this._intersectLineGeometry(e,t,i,s,o)}_intersectDrapedLineGeometry(e,r,i,s,a){if(!r.options.selectionMode)return;const n=e.vertexAttributes.get(b.POSITION).data,o=e.vertexAttributes.get(b.SIZE);let l=this.parameters.width;if(this.parameters.vvSizeEnabled){const r=e.vertexAttributes.get(b.SIZEFEATUREATTRIBUTE).data[0];l*=t(this.parameters.vvSizeOffset[0]+r*this.parameters.vvSizeFactor[0],this.parameters.vvSizeMinSize[0],this.parameters.vvSizeMaxSize[0])}else o&&(l*=o.data[0]);const c=s[0],u=s[1],p=(l/2+4)*e.screenToWorldRatio;let h=Number.MAX_VALUE,m=0;for(let f=0;f<n.length-5;f+=3){const e=n[f],r=n[f+1],i=c-e,s=u-r,a=n[f+3]-e,o=n[f+4]-r,l=t((a*i+o*s)/(a*a+o*o),0,1),p=a*l-i,T=o*l-s,d=p*p+T*T;d<h&&(h=d,m=f/3)}h<p*p&&a(i.dist,i.normal,m,!1)}_intersectLineGeometry(e,r,i,m,f){if(!m.options.selectionMode||F(r))return;if(!U(i))return void H.error("intersection assumes a translation-only matrix");const d=e.vertexAttributes,v=d.get(b.POSITION).data;let S=this.parameters.width;if(this.parameters.vvSizeEnabled){const e=d.get(b.SIZEFEATUREATTRIBUTE).data[0];S*=t(this.parameters.vvSizeOffset[0]+e*this.parameters.vvSizeFactor[0],this.parameters.vvSizeMinSize[0],this.parameters.vvSizeMaxSize[0])}else d.has(b.SIZE)&&(S*=d.get(b.SIZE).data[0]);const g=m.camera,C=te;s(C,m.point);const L=S*g.pixelRatio/2+4*g.pixelRatio;a(pe[0],C[0]-L,C[1]+L,0),a(pe[1],C[0]+L,C[1]+L,0),a(pe[2],C[0]+L,C[1]-L,0),a(pe[3],C[0]-L,C[1]-L,0);for(let t=0;t<4;t++)if(!g.unprojectFromRenderScreen(pe[t],he[t]))return;R(g.eye,he[0],he[1],me),R(g.eye,he[1],he[2],fe),R(g.eye,he[2],he[3],Te),R(g.eye,he[3],he[0],de);let N=Number.MAX_VALUE,P=0;const y=X(this.parameters,d,e.indices)?v.length-2:v.length-5;for(let t=0;t<y;t+=3){Q[0]=v[t]+i[12],Q[1]=v[t+1]+i[13],Q[2]=v[t+2]+i[14];const e=(t+3)%v.length;if(K[0]=v[e]+i[12],K[1]=v[e+1]+i[13],K[2]=v[e+2]+i[14],O(me,Q)<0&&O(me,K)<0||O(fe,Q)<0&&O(fe,K)<0||O(Te,Q)<0&&O(Te,K)<0||O(de,Q)<0&&O(de,K)<0)continue;if(g.projectToRenderScreen(Q,re),g.projectToRenderScreen(K,ie),re[2]<0&&ie[2]>0){n($,Q,K);const e=g.frustum,t=-O(e[T.NEAR],Q)/o($,I(e[T.NEAR]));l($,$,t),c(Q,Q,$),g.projectToRenderScreen(Q,re)}else if(re[2]>0&&ie[2]<0){n($,K,Q);const e=g.frustum,t=-O(e[T.NEAR],K)/o($,I(e[T.NEAR]));l($,$,t),c(K,K,$),g.projectToRenderScreen(K,ie)}else if(re[2]<0&&ie[2]<0)continue;re[2]=0,ie[2]=0;const r=E(A(re,ie,ne),C);r<N&&(N=r,u(se,Q),u(ae,K),P=t/3)}const D=m.rayBegin,q=m.rayEnd;if(N<L*L){let e=Number.MAX_VALUE;if(_(A(se,ae,ne),A(D,q,oe),ee)){n(ee,ee,D);const t=p(ee);l(ee,ee,1/t),e=t/h(D,q)}f(e,ee,P,!1)}}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return null;const i=e.indices,s=r.get(b.POSITION);return C(s,i?i.get(b.POSITION):null,i&&X(this.parameters,r,i),t)}createLayout(){const e=S().vec3f(b.POSITION).f32(b.SUBDIVISIONFACTOR).vec2f(b.UV0).vec3f(b.AUXPOS1).vec3f(b.AUXPOS2);return this.parameters.vvSizeEnabled?e.f32(b.SIZEFEATUREATTRIBUTE):e.f32(b.SIZE),this.parameters.vvColorEnabled?e.f32(b.COLORFEATUREATTRIBUTE):e.vec4f(b.COLOR),this.parameters.vvOpacityEnabled&&e.f32(b.OPACITYFEATUREATTRIBUTE),e}createBufferWriter(){return new V(this.layout,this.parameters)}requiresSlot(e,t){if(e===q.DRAPED_MATERIAL)return!0;if(this.parameters.renderOccluded===D.OccludeAndTransparentStencil)return e===q.OPAQUE_MATERIAL||e===q.OCCLUDER_MATERIAL||e===q.TRANSPARENT_OCCLUDER_MATERIAL;const r=N(t);if(r===g.Color||r===g.Alpha){return e===(this.parameters.writeDepth?q.TRANSPARENT_MATERIAL:q.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL)}return e===q.OPAQUE_MATERIAL}createGLMaterial(e){return e.output===g.Color||e.output===g.Alpha||e.output===g.Highlight||e.output===g.Depth?new W(e):null}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),this._requiresTransparent(e)&&(e.transparent=!0)}_requiresTransparent(e){return!!((e.color&&e.color[3])<1||e.innerWidth>0&&this._colorRequiresTransparent(e.innerColor)||e.stipplePattern&&this._colorRequiresTransparent(e.stippleOffColor)||e.falloff>0)}_colorRequiresTransparent(e){return r(e)&&e[3]<1&&e[3]>0}}class W extends L{updateParameters(e){return this.ensureTechnique(J,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==g.Color&&this._output!==g.Alpha||this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}const Z={width:0,color:[1,1,1,1],join:"miter",cap:x.BUTT,miterLimit:5,writeDepth:!0,polygonOffset:!1,stipplePattern:null,stippleOffColor:null,stippleScaleWithLineWidth:!1,stipplePreferContinuous:!0,slicePlaneEnabled:!1,vvFastUpdate:!1,transparent:!1,isClosed:!1,falloff:0,innerWidth:0,innerColor:null,sceneHasOcludees:!1,wireframe:!1,...P,...j.Default};class V{constructor(e,t){this.parameters=t,this.numJoinSubdivisions=0,this.vertexBufferLayout=e;const r=t.stipplePattern?1:0;switch(this.parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=M+r}}_isClosed(e){return X(this.parameters,e.vertexAttributes,e.indices)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.indices.get(b.POSITION).length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this.parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,r,i){var s;const n=le,o=ce,l=ue,c=t.vertexAttributes.get(b.POSITION).data,p=t.indices&&t.indices.get(b.POSITION),f=null==(s=t.vertexAttributes.get(b.DISTANCETOSTART))?void 0:s.data;p&&p.length!==2*(c.length/3-1)&&console.warn("RibbonLineMaterial does not support indices");let T=1,d=0;this.parameters.vvSizeEnabled?d=t.vertexAttributes.get(b.SIZEFEATUREATTRIBUTE).data[0]:t.vertexAttributes.has(b.SIZE)&&(T=t.vertexAttributes.get(b.SIZE).data[0]);let E=[1,1,1,1],A=0;this.parameters.vvColorEnabled?A=t.vertexAttributes.get(b.COLORFEATUREATTRIBUTE).data[0]:t.vertexAttributes.has(b.COLOR)&&(E=t.vertexAttributes.get(b.COLOR).data);let _=0;this.parameters.vvOpacityEnabled&&(_=t.vertexAttributes.get(b.OPACITYFEATUREATTRIBUTE).data[0]);const v=c.length/3,R=e.transformation,O=new Float32Array(r.buffer),I=this.vertexBufferLayout.stride/4;let S=i*I;const g=S;let C=0;const L=(e,t,r,i,s,a,n)=>{if(O[S++]=t[0],O[S++]=t[1],O[S++]=t[2],O[S++]=i,O[S++]=n,O[S++]=s,O[S++]=e[0],O[S++]=e[1],O[S++]=e[2],O[S++]=r[0],O[S++]=r[1],O[S++]=r[2],this.parameters.vvSizeEnabled?O[S++]=d:O[S++]=T,this.parameters.vvColorEnabled)O[S++]=A;else{const e=Math.min(4*a,E.length-4);O[S++]=E[e+0],O[S++]=E[e+1],O[S++]=E[e+2],O[S++]=E[e+3]}this.parameters.vvOpacityEnabled&&(O[S++]=_)};S+=I,a(o,c[0],c[1],c[2]),R&&m(o,o,R);const N=this._isClosed(t);if(N){const e=c.length-3;a(n,c[e],c[e+1],c[e+2]),R&&m(n,n,R)}else u(n,o),a(l,c[3],c[4],c[5]),R&&m(l,l,R),L(n,o,l,1,z.LEFT_CAP_START,0,C),L(n,o,l,1,z.RIGHT_CAP_START,0,C),u(n,o),u(o,l);const P=N?0:1,y=N?v:v-1,D=f?(e,t,r)=>C=f[r]:(e,t,r)=>C+=h(e,t);for(let h=P;h<y;h++){const e=(h+1)%v*3;a(l,c[e+0],c[e+1],c[e+2]),R&&m(l,l,R),D(n,o,h),L(n,o,l,0,z.LEFT_JOIN_END,h,C),L(n,o,l,0,z.RIGHT_JOIN_END,h,C);const t=this.numJoinSubdivisions;for(let r=0;r<t;++r){const e=(r+1)/(t+1);L(n,o,l,e,z.LEFT_JOIN_END,h,C),L(n,o,l,e,z.RIGHT_JOIN_END,h,C)}L(n,o,l,1,z.LEFT_JOIN_START,h,C),L(n,o,l,1,z.RIGHT_JOIN_START,h,C),u(n,o),u(o,l)}N?(a(l,c[3],c[4],c[5]),R&&m(l,l,R),C=D(n,o,y),L(n,o,l,0,z.LEFT_JOIN_END,P,C),L(n,o,l,0,z.RIGHT_JOIN_END,P,C)):(C=D(n,o,y),L(n,o,l,0,z.LEFT_CAP_END,y,C),L(n,o,l,0,z.RIGHT_CAP_END,y,C)),k(O,g+I,O,g,I);S=k(O,S-I,O,S,I),this.parameters.wireframe&&this._addWireframeVertices(r,g,S,I)}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=k(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function k(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function X(e,t,r){return Y(e,t.get(b.POSITION).data,r?r.get(b.POSITION):null)}function Y(e,t,r){return!!e.isClosed&&(r?r.length>2:t.length>6)}const Q=f(),K=f(),$=f(),ee=f(),te=f(),re=i(),ie=i(),se=f(),ae=f(),ne=d(),oe=d(),le=f(),ce=f(),ue=f(),pe=[i(),i(),i(),i()],he=[f(),f(),f(),f()],me=v(),fe=v(),Te=v(),de=v();export{B as RibbonLineMaterial};
5
+ import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{isSome as r}from"../../../../core/maybe.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{c as s}from"../../../../chunks/vec2.js";import{s as a,f as n,d as o,a as l,b as c,g as u,l as p,i as h,m}from"../../../../chunks/vec3.js";import{c as f}from"../../../../chunks/vec3f64.js";import{PlaneIndex as T}from"../../../../geometry/support/frustum.js";import{create as d,distance2 as E,fromPoints as A,closestLineSegmentPoint as _}from"../../../../geometry/support/lineSegment.js";import{create as v,fromPoints as R,signedDistance as O,normal as I}from"../../../../geometry/support/plane.js";import{newLayout as S}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as g}from"../core/shaderLibrary/ShaderOutputOptions.js";import{computeAttachmentOriginLines as b}from"../lib/geometryDataUtils.js";import C from"../lib/GLMaterial.js";import{outputFromPass as L}from"../lib/GLMaterials.js";import{DefaultMaterialParameters as N,Material as P,RenderOccludedFlag as y}from"../lib/Material.js";import{RenderSlot as D}from"../lib/RenderSlot.js";import{isTranslationMatrix as q}from"../lib/Util.js";import{VertexAttribute as U}from"../lib/VertexAttribute.js";import{VisualVariableDefaultMaterialParameters as j}from"./VisualVariableMaterialParameters.js";import{isInstanceHidden as F}from"./renderers/utils.js";import{C as x,N as M}from"../../../../chunks/RibbonLine.glsl.js";import{ribbonVertexAttributeLocations as w,RibbonLineTechniqueConfiguration as G,RibbonLineTechnique as J}from"../shaders/RibbonLineTechnique.js";const H=e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial");var z;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(z||(z={}));class B extends P{constructor(e){super(e,V),this._vertexAttributeLocations=w,this.techniqueConfig=new G,this.layout=this.createLayout()}isClosed(e,t){return Y(this.parameters,e,t)}dispose(){}getPassParameters(){return this.parameters}getTechniqueConfig(e,t){this.techniqueConfig.output=e,this.techniqueConfig.draped=t.slot===D.DRAPED_MATERIAL;const i=r(this.parameters.stipplePattern);return this.techniqueConfig.stippleEnabled=i,this.techniqueConfig.stippleOffColorEnabled=i&&r(this.parameters.stippleOffColor),this.techniqueConfig.stippleScaleWithLineWidth=i&&this.parameters.stippleScaleWithLineWidth,this.techniqueConfig.stipplePreferContinuous=i&&this.parameters.stipplePreferContinuous,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this.techniqueConfig.roundJoins="round"===this.parameters.join,this.techniqueConfig.capType=this.parameters.cap,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.polygonOffset=this.parameters.polygonOffset,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.vvOpacity=this.parameters.vvOpacityEnabled,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.innerColorEnabled=this.parameters.innerWidth>0&&r(this.parameters.innerColor),this.techniqueConfig.falloffEnabled=this.parameters.falloff>0,this.techniqueConfig.occluder=this.parameters.renderOccluded===y.OccludeAndTransparentStencil,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig.wireframe=this.parameters.wireframe,this.techniqueConfig}intersect(e,t,i,s,a,n,o,l,c){r(c)?this._intersectDrapedLineGeometry(e,s,c,n,o):this._intersectLineGeometry(e,t,i,s,o)}_intersectDrapedLineGeometry(e,r,i,s,a){if(!r.options.selectionMode)return;const n=e.vertexAttributes.get(U.POSITION).data,o=e.vertexAttributes.get(U.SIZE);let l=this.parameters.width;if(this.parameters.vvSizeEnabled){const r=e.vertexAttributes.get(U.SIZEFEATUREATTRIBUTE).data[0];l*=t(this.parameters.vvSizeOffset[0]+r*this.parameters.vvSizeFactor[0],this.parameters.vvSizeMinSize[0],this.parameters.vvSizeMaxSize[0])}else o&&(l*=o.data[0]);const c=s[0],u=s[1],p=(l/2+4)*e.screenToWorldRatio;let h=Number.MAX_VALUE,m=0;for(let f=0;f<n.length-5;f+=3){const e=n[f],r=n[f+1],i=c-e,s=u-r,a=n[f+3]-e,o=n[f+4]-r,l=t((a*i+o*s)/(a*a+o*o),0,1),p=a*l-i,T=o*l-s,d=p*p+T*T;d<h&&(h=d,m=f/3)}h<p*p&&a(i.dist,i.normal,m,!1)}_intersectLineGeometry(e,r,i,m,f){if(!m.options.selectionMode||F(r))return;if(!q(i))return void H.error("intersection assumes a translation-only matrix");const d=e.vertexAttributes,v=d.get(U.POSITION).data;let S=this.parameters.width;if(this.parameters.vvSizeEnabled){const e=d.get(U.SIZEFEATUREATTRIBUTE).data[0];S*=t(this.parameters.vvSizeOffset[0]+e*this.parameters.vvSizeFactor[0],this.parameters.vvSizeMinSize[0],this.parameters.vvSizeMaxSize[0])}else d.has(U.SIZE)&&(S*=d.get(U.SIZE).data[0]);const g=m.camera,b=te;s(b,m.point);const C=S*g.pixelRatio/2+4*g.pixelRatio;a(pe[0],b[0]-C,b[1]+C,0),a(pe[1],b[0]+C,b[1]+C,0),a(pe[2],b[0]+C,b[1]-C,0),a(pe[3],b[0]-C,b[1]-C,0);for(let t=0;t<4;t++)if(!g.unprojectFromRenderScreen(pe[t],he[t]))return;R(g.eye,he[0],he[1],me),R(g.eye,he[1],he[2],fe),R(g.eye,he[2],he[3],Te),R(g.eye,he[3],he[0],de);let L=Number.MAX_VALUE,N=0;const P=X(this.parameters,d,e.indices)?v.length-2:v.length-5;for(let t=0;t<P;t+=3){Q[0]=v[t]+i[12],Q[1]=v[t+1]+i[13],Q[2]=v[t+2]+i[14];const e=(t+3)%v.length;if(K[0]=v[e]+i[12],K[1]=v[e+1]+i[13],K[2]=v[e+2]+i[14],O(me,Q)<0&&O(me,K)<0||O(fe,Q)<0&&O(fe,K)<0||O(Te,Q)<0&&O(Te,K)<0||O(de,Q)<0&&O(de,K)<0)continue;if(g.projectToRenderScreen(Q,re),g.projectToRenderScreen(K,ie),re[2]<0&&ie[2]>0){n($,Q,K);const e=g.frustum,t=-O(e[T.NEAR],Q)/o($,I(e[T.NEAR]));l($,$,t),c(Q,Q,$),g.projectToRenderScreen(Q,re)}else if(re[2]>0&&ie[2]<0){n($,K,Q);const e=g.frustum,t=-O(e[T.NEAR],K)/o($,I(e[T.NEAR]));l($,$,t),c(K,K,$),g.projectToRenderScreen(K,ie)}else if(re[2]<0&&ie[2]<0)continue;re[2]=0,ie[2]=0;const r=E(A(re,ie,ne),b);r<L&&(L=r,u(se,Q),u(ae,K),N=t/3)}const y=m.rayBegin,D=m.rayEnd;if(L<C*C){let e=Number.MAX_VALUE;if(_(A(se,ae,ne),A(y,D,oe),ee)){n(ee,ee,y);const t=p(ee);l(ee,ee,1/t),e=t/h(y,D)}f(e,ee,N,!1)}}computeAttachmentOrigin(e,t){const r=e.vertexAttributes;if(!r)return null;const i=e.indices,s=r.get(U.POSITION);return b(s,i?i.get(U.POSITION):null,i&&X(this.parameters,r,i),t)}createLayout(){const e=S().vec3f(U.POSITION).f32(U.SUBDIVISIONFACTOR).vec2f(U.UV0).vec3f(U.AUXPOS1).vec3f(U.AUXPOS2);return this.parameters.vvSizeEnabled?e.f32(U.SIZEFEATUREATTRIBUTE):e.f32(U.SIZE),this.parameters.vvColorEnabled?e.f32(U.COLORFEATUREATTRIBUTE):e.vec4f(U.COLOR),this.parameters.vvOpacityEnabled&&e.f32(U.OPACITYFEATUREATTRIBUTE),e}createBufferWriter(){return new Z(this.layout,this.parameters)}requiresSlot(e,t){if(e===D.DRAPED_MATERIAL)return!0;if(this.parameters.renderOccluded===y.OccludeAndTransparentStencil)return e===D.OPAQUE_MATERIAL||e===D.OCCLUDER_MATERIAL||e===D.TRANSPARENT_OCCLUDER_MATERIAL;const r=L(t);if(r===g.Color||r===g.Alpha){return e===(this.parameters.writeDepth?D.TRANSPARENT_MATERIAL:D.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL)}return e===D.OPAQUE_MATERIAL}createGLMaterial(e){return e.output===g.Color||e.output===g.Alpha||e.output===g.Highlight||e.output===g.Depth?new W(e):null}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),this._requiresTransparent(e)&&(e.transparent=!0)}_requiresTransparent(e){return!!((e.color&&e.color[3])<1||e.innerWidth>0&&this._colorRequiresTransparent(e.innerColor)||e.stipplePattern&&this._colorRequiresTransparent(e.stippleOffColor)||e.falloff>0)}_colorRequiresTransparent(e){return r(e)&&e[3]<1&&e[3]>0}}class W extends C{updateParameters(e){return this.ensureTechnique(J,e)}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==g.Color&&this._output!==g.Alpha||this._updateOccludeeState(e),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}const V={width:0,color:[1,1,1,1],join:"miter",cap:x.BUTT,miterLimit:5,writeDepth:!0,polygonOffset:!1,stipplePattern:null,stippleOffColor:null,stippleScaleWithLineWidth:!1,stipplePreferContinuous:!0,slicePlaneEnabled:!1,vvFastUpdate:!1,transparent:!1,isClosed:!1,falloff:0,innerWidth:0,innerColor:null,sceneHasOcludees:!1,wireframe:!1,...N,...j};class Z{constructor(e,t){this.parameters=t,this.numJoinSubdivisions=0,this.vertexBufferLayout=e;const r=t.stipplePattern?1:0;switch(this.parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=M+r}}_isClosed(e){return X(this.parameters,e.vertexAttributes,e.indices)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.indices.get(U.POSITION).length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this.parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,r,i){var s;const n=le,o=ce,l=ue,c=t.vertexAttributes.get(U.POSITION).data,p=t.indices&&t.indices.get(U.POSITION),f=null==(s=t.vertexAttributes.get(U.DISTANCETOSTART))?void 0:s.data;p&&p.length!==2*(c.length/3-1)&&console.warn("RibbonLineMaterial does not support indices");let T=1,d=0;this.parameters.vvSizeEnabled?d=t.vertexAttributes.get(U.SIZEFEATUREATTRIBUTE).data[0]:t.vertexAttributes.has(U.SIZE)&&(T=t.vertexAttributes.get(U.SIZE).data[0]);let E=[1,1,1,1],A=0;this.parameters.vvColorEnabled?A=t.vertexAttributes.get(U.COLORFEATUREATTRIBUTE).data[0]:t.vertexAttributes.has(U.COLOR)&&(E=t.vertexAttributes.get(U.COLOR).data);let _=0;this.parameters.vvOpacityEnabled&&(_=t.vertexAttributes.get(U.OPACITYFEATUREATTRIBUTE).data[0]);const v=c.length/3,R=e.transformation,O=new Float32Array(r.buffer),I=this.vertexBufferLayout.stride/4;let S=i*I;const g=S;let b=0;const C=(e,t,r,i,s,a,n)=>{if(O[S++]=t[0],O[S++]=t[1],O[S++]=t[2],O[S++]=i,O[S++]=n,O[S++]=s,O[S++]=e[0],O[S++]=e[1],O[S++]=e[2],O[S++]=r[0],O[S++]=r[1],O[S++]=r[2],this.parameters.vvSizeEnabled?O[S++]=d:O[S++]=T,this.parameters.vvColorEnabled)O[S++]=A;else{const e=Math.min(4*a,E.length-4);O[S++]=E[e+0],O[S++]=E[e+1],O[S++]=E[e+2],O[S++]=E[e+3]}this.parameters.vvOpacityEnabled&&(O[S++]=_)};S+=I,a(o,c[0],c[1],c[2]),R&&m(o,o,R);const L=this._isClosed(t);if(L){const e=c.length-3;a(n,c[e],c[e+1],c[e+2]),R&&m(n,n,R)}else u(n,o),a(l,c[3],c[4],c[5]),R&&m(l,l,R),C(n,o,l,1,z.LEFT_CAP_START,0,b),C(n,o,l,1,z.RIGHT_CAP_START,0,b),u(n,o),u(o,l);const N=L?0:1,P=L?v:v-1,y=f?(e,t,r)=>b=f[r]:(e,t,r)=>b+=h(e,t);for(let h=N;h<P;h++){const e=(h+1)%v*3;a(l,c[e+0],c[e+1],c[e+2]),R&&m(l,l,R),y(n,o,h),C(n,o,l,0,z.LEFT_JOIN_END,h,b),C(n,o,l,0,z.RIGHT_JOIN_END,h,b);const t=this.numJoinSubdivisions;for(let r=0;r<t;++r){const e=(r+1)/(t+1);C(n,o,l,e,z.LEFT_JOIN_END,h,b),C(n,o,l,e,z.RIGHT_JOIN_END,h,b)}C(n,o,l,1,z.LEFT_JOIN_START,h,b),C(n,o,l,1,z.RIGHT_JOIN_START,h,b),u(n,o),u(o,l)}L?(a(l,c[3],c[4],c[5]),R&&m(l,l,R),b=y(n,o,P),C(n,o,l,0,z.LEFT_JOIN_END,N,b),C(n,o,l,0,z.RIGHT_JOIN_END,N,b)):(b=y(n,o,P),C(n,o,l,0,z.LEFT_CAP_END,P,b),C(n,o,l,0,z.RIGHT_CAP_END,P,b)),k(O,g+I,O,g,I);S=k(O,S-I,O,S,I),this.parameters.wireframe&&this._addWireframeVertices(r,g,S,I)}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=k(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function k(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function X(e,t,r){return Y(e,t.get(U.POSITION).data,r?r.get(U.POSITION):null)}function Y(e,t,r){return!!e.isClosed&&(r?r.length>2:t.length>6)}const Q=f(),K=f(),$=f(),ee=f(),te=f(),re=i(),ie=i(),se=f(),ae=f(),ne=d(),oe=d(),le=f(),ce=f(),ue=f(),pe=[i(),i(),i(),i()],he=[f(),f(),f(),f()],me=v(),fe=v(),Te=v(),de=v();export{B as RibbonLineMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{n as e,s as t,a as r,b as i}from"../../../../chunks/vec3.js";import{c as s}from"../../../../chunks/vec3f64.js";import{center as a,scale as n}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as o}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as u}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as l}from"../core/shaderLibrary/ShaderOutputOptions.js";import{CullFaceOptions as c,VertexAttribute as h}from"../lib/basicInterfaces.js";import p from"../lib/GLMaterial.js";import{outputFromPass as f}from"../lib/GLMaterials.js";import{materialParametersDefaults as m,Material as d}from"../lib/Material.js";import{RenderSlot as b}from"../lib/RenderSlot.js";import{assert as E}from"../lib/Util.js";import{writeDefaultAttributes as g,writePosition as T}from"./internal/bufferWriterUtils.js";import{intersectTriangleGeometry as S}from"./internal/MaterialUtil.js";import{ShadedColorMaterialTechniqueConfiguration as A,ShadedColorMaterialVertexAttrLocations as P,ShadedColorMaterialTechnique as v}from"../shaders/ShadedColorMaterialTechnique.js";class F extends d{constructor(e){super(e,C),this.supportsEdges=!0,this.techniqueConfig=new A,this._vertexAttributeLocations=P}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.parameters.cullFace,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.screenSizeEnabled=this.parameters.screenSizeEnabled,this.techniqueConfig.shadingEnabled=this.parameters.shadingEnabled,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}getPassParameters(){return this.parameters}intersect(e,s,o,u,l,c,p){if(this.parameters.screenSizeEnabled){const o=e.vertexAttributes.get(h.OFFSET),f={applyToVertex:(e,s,a,n)=>{const l=t(L,o.data[3*n+0],o.data[3*n+1],o.data[3*n+2]),c=t(j,e,s,a);return r(l,l,this.parameters.screenSize*u.camera.computeRenderPixelSizeAt(l)),i(c,c,l),[c[0],c[1],c[2]]},applyToAabb:e=>{const t=a(e,L);return n(e,this.parameters.screenSize*u.camera.computeRenderPixelSizeAt(t))}};S(e,s,u,l,c,f,p)}else S(e,s,u,l,c,void 0,p)}requiresSlot(e,t){if(f(t)===l.Highlight)return e===b.OPAQUE_MATERIAL;let r=b.OPAQUE_MATERIAL;return this.parameters.transparent&&(r=this.parameters.writeDepth?b.TRANSPARENT_MATERIAL:b.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL),e===r||e===b.DRAPED_MATERIAL}createGLMaterial(e){return e.output===l.Color||e.output===l.Alpha||e.output===l.Highlight?new q(e):null}createBufferWriter(){return new O(this.parameters.screenSizeEnabled)}}class q extends p{updateParameters(e){return this.ensureTechnique(v,e)}beginSlot(e){return this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}const C={color:[1,1,1,1],shadingTint:[0,0,0,.25],shadingDirection:e(s(),[.5,-.5,-.5]),transparent:!1,writeDepth:!0,slicePlaneEnabled:!1,cullFace:c.None,screenSizeEnabled:!1,screenSize:14,shadingEnabled:!0,...m};class O{constructor(e){this.screenSizeEnabled=e;const t=u().vec3f(h.POSITION).vec3f(h.NORMAL);this.screenSizeEnabled&&t.vec3f(h.OFFSET),this.vertexBufferLayout=t}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(h.POSITION).length}write(e,t,r,i){if(g(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,r,i),this.screenSizeEnabled){if(!t.vertexAttributes.has(h.OFFSET))throw new Error(`${h.OFFSET} vertex attribute required for screenSizeEnabled ShadedColorMaterial`);{const s=t.vertexAttributes.get(h.OFFSET),a=t.indices.get(h.OFFSET);E(3===s.size);const n=r.getField(h.OFFSET,o);if(!n)throw new Error("unable to acquire view for "+h.OFFSET);T(a,s.data,e.invTranspTransformation,n,i)}}}}const L=s(),j=s();export{F as ShadedColorMaterial};
5
+ import{n as e,s as t,a as r,b as i}from"../../../../chunks/vec3.js";import{c as s}from"../../../../chunks/vec3f64.js";import{center as a,scale as n}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as o}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as u}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as l}from"../core/shaderLibrary/ShaderOutputOptions.js";import{CullFaceOptions as c}from"../lib/basicInterfaces.js";import h from"../lib/GLMaterial.js";import{outputFromPass as p}from"../lib/GLMaterials.js";import{DefaultMaterialParameters as f,Material as m}from"../lib/Material.js";import{RenderSlot as d}from"../lib/RenderSlot.js";import{assert as b}from"../lib/Util.js";import{VertexAttribute as E}from"../lib/VertexAttribute.js";import{writeDefaultAttributes as g,writePosition as T}from"./internal/bufferWriterUtils.js";import{intersectTriangleGeometry as S}from"./internal/MaterialUtil.js";import{ShadedColorMaterialTechniqueConfiguration as A,ShadedColorMaterialVertexAttrLocations as P,ShadedColorMaterialTechnique as v}from"../shaders/ShadedColorMaterialTechnique.js";class F extends m{constructor(e){super(e,C),this.supportsEdges=!0,this.techniqueConfig=new A,this._vertexAttributeLocations=P}getTechniqueConfig(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.parameters.cullFace,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.screenSizeEnabled=this.parameters.screenSizeEnabled,this.techniqueConfig.shadingEnabled=this.parameters.shadingEnabled,this.techniqueConfig.transparencyPassType=t.transparencyPassType,this.techniqueConfig.multipassTerrainEnabled=t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=t.cullAboveGround,this.techniqueConfig}getPassParameters(){return this.parameters}intersect(e,s,o,u,l,c,h){if(this.parameters.screenSizeEnabled){const o=e.vertexAttributes.get(E.OFFSET),p={applyToVertex:(e,s,a,n)=>{const l=t(j,o.data[3*n+0],o.data[3*n+1],o.data[3*n+2]),c=t(x,e,s,a);return r(l,l,this.parameters.screenSize*u.camera.computeRenderPixelSizeAt(l)),i(c,c,l),[c[0],c[1],c[2]]},applyToAabb:e=>{const t=a(e,j);return n(e,this.parameters.screenSize*u.camera.computeRenderPixelSizeAt(t))}};S(e,s,u,l,c,p,h)}else S(e,s,u,l,c,void 0,h)}requiresSlot(e,t){if(p(t)===l.Highlight)return e===d.OPAQUE_MATERIAL;let r=d.OPAQUE_MATERIAL;return this.parameters.transparent&&(r=this.parameters.writeDepth?d.TRANSPARENT_MATERIAL:d.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL),e===r||e===d.DRAPED_MATERIAL}createGLMaterial(e){return e.output===l.Color||e.output===l.Alpha||e.output===l.Highlight?new q(e):null}createBufferWriter(){return new O(this.parameters.screenSizeEnabled)}}class q extends h{updateParameters(e){return this.ensureTechnique(v,e)}beginSlot(e){return this.updateParameters(e)}bind(e,t){t.bindPass(this._material.getPassParameters(),e)}}const C={color:[1,1,1,1],shadingTint:[0,0,0,.25],shadingDirection:e(s(),[.5,-.5,-.5]),transparent:!1,writeDepth:!0,slicePlaneEnabled:!1,cullFace:c.None,screenSizeEnabled:!1,screenSize:14,shadingEnabled:!0,...f};class O{constructor(e){this.screenSizeEnabled=e;const t=u().vec3f(E.POSITION).vec3f(E.NORMAL);this.screenSizeEnabled&&t.vec3f(E.OFFSET),this.vertexBufferLayout=t}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(E.POSITION).length}write(e,t,r,i){if(g(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,r,i),this.screenSizeEnabled){if(!t.vertexAttributes.has(E.OFFSET))throw new Error(`${E.OFFSET} vertex attribute required for screenSizeEnabled ShadedColorMaterial`);{const s=t.vertexAttributes.get(E.OFFSET),a=t.indices.get(E.OFFSET);b(3===s.size);const n=r.getField(E.OFFSET,o);if(!n)throw new Error("unable to acquire view for "+E.OFFSET);T(a,s.data,e.invTranspTransformation,n,i)}}}}const j=s(),x=s();export{F as ShadedColorMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{unwrap as r}from"../../../../core/maybe.js";import{ShaderOutput as e}from"../core/shaderLibrary/ShaderOutputOptions.js";import{ShaderTechniqueConfiguration as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import i from"../lib/GLMaterial.js";import{Material as o,materialParametersDefaults as n}from"../lib/Material.js";import{RenderSlot as s}from"../lib/RenderSlot.js";import{DefaultBufferWriter as a,PositionUVLayout as u}from"./internal/DefaultBufferWriter.js";import{intersectTriangleGeometry as l}from"./internal/MaterialUtil.js";import{SlicePlaneMaterialTechnique as c}from"../shaders/SlicePlaneMaterialTechnique.js";class m extends o{constructor(r){super(r,f),this._config=new t}intersect(r,e,t,i,o,n,s){return l(r,e,i,o,n,void 0,s)}createBufferWriter(){return new a(u)}requiresSlot(r){return r===s.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL}createGLMaterial(r){return r.output===e.Color?new h(r):null}getTechniqueConfig(){return this._config}}class h extends i{constructor(r){super(r),this.ensureTechnique(c,null)}updateParameters(){return r(this.technique)}beginSlot(){return r(this.technique)}bind(r,e){e.bindPass(this._material.parameters,r)}}const f={backgroundColor:[1,0,0,.5],gridColor:[0,1,0,.5],gridWidth:4,...n};export{m as SlicePlaneMaterial};
5
+ import{unwrap as r}from"../../../../core/maybe.js";import{ShaderOutput as e}from"../core/shaderLibrary/ShaderOutputOptions.js";import{ShaderTechniqueConfiguration as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import i from"../lib/GLMaterial.js";import{Material as o,DefaultMaterialParameters as n}from"../lib/Material.js";import{RenderSlot as s}from"../lib/RenderSlot.js";import{DefaultBufferWriter as a,PositionUVLayout as u}from"./internal/DefaultBufferWriter.js";import{intersectTriangleGeometry as l}from"./internal/MaterialUtil.js";import{SlicePlaneMaterialTechnique as c}from"../shaders/SlicePlaneMaterialTechnique.js";class m extends o{constructor(r){super(r,f),this._config=new t}intersect(r,e,t,i,o,n,s){return l(r,e,i,o,n,void 0,s)}createBufferWriter(){return new a(u)}requiresSlot(r){return r===s.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL}createGLMaterial(r){return r.output===e.Color?new h(r):null}getTechniqueConfig(){return this._config}}class h extends i{constructor(r){super(r),this.ensureTechnique(c,null)}updateParameters(){return r(this.technique)}beginSlot(){return r(this.technique)}bind(r,e){e.bindPass(this._material.parameters,r)}}const f={backgroundColor:[1,0,0,.5],gridColor:[0,1,0,.5],gridWidth:4,...n};export{m as SlicePlaneMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{c as v}from"../../../../chunks/mat3f64.js";import{f as a}from"../../../../chunks/vec3f32.js";var o;!function(o){o.Default={vvSizeEnabled:!1,vvSizeMinSize:a(1,1,1),vvSizeMaxSize:a(100,100,100),vvSizeOffset:a(0,0,0),vvSizeFactor:a(1,1,1),vvSizeValue:a(1,1,1),vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],vvOpacityEnabled:!1,vvOpacityValues:[0,0,0,0,0,0,0,0],vvOpacityOpacities:[1,1,1,1,1,1,1,1],vvSymbolAnchor:[0,0,0],vvSymbolRotationMatrix:v()}}(o||(o={}));const e=o;export{e as default};
5
+ import{c as v}from"../../../../chunks/mat3f64.js";import{f as o}from"../../../../chunks/vec3f32.js";const e={vvSizeEnabled:!1,vvSizeMinSize:o(1,1,1),vvSizeMaxSize:o(100,100,100),vvSizeOffset:o(0,0,0),vvSizeFactor:o(1,1,1),vvSizeValue:o(1,1,1),vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],vvOpacityEnabled:!1,vvOpacityValues:[0,0,0,0,0,0,0,0],vvOpacityOpacities:[1,1,1,1,1,1,1,1],vvSymbolAnchor:[0,0,0],vvSymbolRotationMatrix:v()};export{e as VisualVariableDefaultMaterialParameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../../../chunks/tslib.es6.js";import e from"../../../../core/has.js";import{bindCloudsComposition as t}from"../../environment/CloudsComposition.js";import{ShaderOutput as o}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as i}from"../core/shaderLibrary/Slice.glsl.js";import{bindOutputHighlight as s}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as a}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{PBRMode as n}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapUniforms as p}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindSSRUniforms as l}from"../core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js";import{bindWaterDistortionUniforms as u}from"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import{bindProjectionMatrix as h,bindView as c,bindCameraPosition as d}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as m}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as g}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as f,ShaderTechniqueConfiguration as b}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as y}from"../lib/basicInterfaces.js";import{Default3D as v}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as T,oitBlending as S,oitDepthTest as j,oitDepthWrite as w,getOITPolygonOffset as P}from"../lib/OrderIndependentTransparency.js";import{Program as C}from"../lib/Program.js";import{W as E}from"../../../../chunks/WaterSurface.glsl.js";import{makePipelineState as x,defaultDepthWriteParams as O,defaultColorWriteParams as R}from"../../../webgl/renderState.js";class D extends g{constructor(r,e,t){super(r,e,t),this._textureRepository=r.waterTextureRepository}initializeProgram(r){const t=D.shader.get(),o=this.configuration,i=t.build({OITEnabled:o.transparencyPassType===y.Color,output:o.output,viewingMode:r.viewingMode,slicePlaneEnabled:o.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,receiveShadows:o.receiveShadows,pbrMode:n.Water,useCustomDTRExponentForWater:!0,ssrEnabled:o.useSSR,cloudsReflectionsEnable:e("enable-feature:clouds-reflections"),highStepCount:!0,multipassTerrainEnabled:o.multipassTerrainEnabled,cullAboveGround:o.cullAboveGround});return new C(r.rctx,i,v)}bindPass(r,i){h(this.program,i.camera.projectionMatrix),i.multipassTerrainEnabled&&(this.program.setUniform2fv("cameraNearFar",i.camera.nearFar),this.program.setUniform2fv("inverseViewport",i.inverseViewport),a(this.program,i)),this.configuration.output===o.Color&&(i.lighting.setUniforms(this.program,!1),l(this.program,i),e("enable-feature:clouds-reflections")&&t(this.program,i.camera,i.cloudsCompositionParams)),this.configuration.output!==o.Color&&this.configuration.output!==o.Normal||(u(this.program,r),this._textureRepository.bind(this.program)),this.program.setUniform4fv("waterColor",r.color),this.configuration.output===o.Highlight&&s(this.program,i)}bindDraw(r){c(this.program,r),this.program.rebindTextures(),this.configuration.output!==o.Color&&this.configuration.output!==o.Alpha||d(this.program,r.origin,r.camera.viewInverseTransposeMatrix),this.configuration.output===o.Color&&p(this.program,r),this.configuration.output!==o.Color&&this.configuration.output!==o.Alpha&&this.configuration.output!==o.Highlight||i(this.program,this.configuration,r)}_setPipelineState(r){const e=this.configuration,t=r===y.NONE,i=r===y.FrontFace;return x({blending:e.output!==o.Normal&&e.output!==o.Highlight&&e.transparent?t?T:S(r):null,depthTest:{func:j(r)},depthWrite:t?e.writeDepth&&O:w(r),colorWrite:R,polygonOffset:t||i?null:P(e.enableOffset)})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}D.shader=new m(E,(()=>import("../shaders/WaterSurface.glsl.js")));class L extends b{constructor(){super(...arguments),this.output=o.Color,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.transparent=!1,this.enableOffset=!0,this.writeDepth=!1,this.useSSR=!1,this.isDraped=!1,this.transparencyPassType=y.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}r([f({count:o.COUNT})],L.prototype,"output",void 0),r([f()],L.prototype,"receiveShadows",void 0),r([f()],L.prototype,"slicePlaneEnabled",void 0),r([f()],L.prototype,"transparent",void 0),r([f()],L.prototype,"enableOffset",void 0),r([f()],L.prototype,"writeDepth",void 0),r([f()],L.prototype,"useSSR",void 0),r([f()],L.prototype,"isDraped",void 0),r([f({count:y.COUNT})],L.prototype,"transparencyPassType",void 0),r([f()],L.prototype,"multipassTerrainEnabled",void 0),r([f()],L.prototype,"cullAboveGround",void 0);export{D as WaterTechnique,L as WaterTechniqueConfiguration};
5
+ import{_ as r}from"../../../../chunks/tslib.es6.js";import e from"../../../../core/has.js";import{bindCloudsComposition as t}from"../../environment/CloudsComposition.js";import{ShaderOutput as o}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as i}from"../core/shaderLibrary/Slice.glsl.js";import{bindOutputHighlight as s}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as a}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{PBRMode as n}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapUniforms as p}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindSSRUniforms as l}from"../core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js";import{bindWaterDistortionUniforms as u}from"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import{bindProjectionMatrix as h,bindView as c,bindCameraPosition as d}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as m}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as g}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as f,ShaderTechniqueConfiguration as b}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as y}from"../lib/basicInterfaces.js";import{Default3D as v}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as S,oitBlending as T,oitDepthTest as j,oitDepthWrite as w,getOITPolygonOffset as P}from"../lib/OrderIndependentTransparency.js";import{Program as C}from"../lib/Program.js";import{W as E}from"../../../../chunks/WaterSurface.glsl.js";import{makePipelineState as x,defaultDepthWriteParams as O,defaultColorWriteParams as R}from"../../../webgl/renderState.js";class D extends g{constructor(r,e,t){super(r,e,t),this._textureRepository=r.waterTextureRepository}initializeProgram(r){const t=D.shader.get(),o=this.configuration,i=t.build({oitEnabled:o.transparencyPassType===y.Color,output:o.output,viewingMode:r.viewingMode,slicePlaneEnabled:o.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,receiveShadows:o.receiveShadows,pbrMode:n.Water,useCustomDTRExponentForWater:!0,ssrEnabled:o.useSSR,cloudsReflectionsEnabled:e("enable-feature:clouds-reflections"),highStepCount:!0,multipassTerrainEnabled:o.multipassTerrainEnabled,cullAboveGround:o.cullAboveGround});return new C(r.rctx,i,v)}bindPass(r,i){h(this.program,i.camera.projectionMatrix),i.multipassTerrainEnabled&&(this.program.setUniform2fv("nearFar",i.camera.nearFar),this.program.setUniform2fv("inverseViewport",i.inverseViewport),a(this.program,i)),this.configuration.output===o.Color&&(i.lighting.setUniforms(this.program,!1),l(this.program,i),e("enable-feature:clouds-reflections")&&t(this.program,i.camera,i.cloudsCompositionParams)),this.configuration.output!==o.Color&&this.configuration.output!==o.Normal||(u(this.program,r),this._textureRepository.bind(this.program)),this.program.setUniform4fv("waterColor",r.color),this.configuration.output===o.Highlight&&s(this.program,i)}bindDraw(r){c(this.program,r),this.program.rebindTextures(),this.configuration.output!==o.Color&&this.configuration.output!==o.Alpha||d(this.program,r.origin,r.camera.viewInverseTransposeMatrix),this.configuration.output===o.Color&&p(this.program,r),this.configuration.output!==o.Color&&this.configuration.output!==o.Alpha&&this.configuration.output!==o.Highlight||i(this.program,this.configuration,r)}_setPipelineState(r){const e=this.configuration,t=r===y.NONE,i=r===y.FrontFace;return x({blending:e.output!==o.Normal&&e.output!==o.Highlight&&e.transparent?t?S:T(r):null,depthTest:{func:j(r)},depthWrite:t?e.writeDepth&&O:w(r),colorWrite:R,polygonOffset:t||i?null:P(e.enableOffset)})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}D.shader=new m(E,(()=>import("../shaders/WaterSurface.glsl.js")));class L extends b{constructor(){super(...arguments),this.output=o.Color,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.transparent=!1,this.enableOffset=!0,this.writeDepth=!1,this.useSSR=!1,this.isDraped=!1,this.transparencyPassType=y.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}r([f({count:o.COUNT})],L.prototype,"output",void 0),r([f()],L.prototype,"receiveShadows",void 0),r([f()],L.prototype,"slicePlaneEnabled",void 0),r([f()],L.prototype,"transparent",void 0),r([f()],L.prototype,"enableOffset",void 0),r([f()],L.prototype,"writeDepth",void 0),r([f()],L.prototype,"useSSR",void 0),r([f()],L.prototype,"isDraped",void 0),r([f({count:y.COUNT})],L.prototype,"transparencyPassType",void 0),r([f()],L.prototype,"multipassTerrainEnabled",void 0),r([f()],L.prototype,"cullAboveGround",void 0);export{D as WaterTechnique,L as WaterTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{newLayout as e}from"../../../support/buffer/InterleavedLayout.js";import{VertexAttribute as r}from"../../lib/basicInterfaces.js";import{writeDefaultAttributes as t}from"./bufferWriterUtils.js";const f=e().vec3f(r.POSITION),o=e().vec3f(r.POSITION).vec2f(r.UV0),s=e().vec3f(r.POSITION).vec4u8(r.COLOR);class a{constructor(e){this.vertexBufferLayout=e}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(r.POSITION).length}write(e,r,f,o){t(r,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,f,o)}}export{a as DefaultBufferWriter,s as PositionColorLayout,f as PositionLayout,o as PositionUVLayout};
5
+ import{newLayout as e}from"../../../support/buffer/InterleavedLayout.js";import{VertexAttribute as t}from"../../lib/VertexAttribute.js";import{writeDefaultAttributes as r}from"./bufferWriterUtils.js";const f=e().vec3f(t.POSITION),o=e().vec3f(t.POSITION).vec2f(t.UV0),u=e().vec3f(t.POSITION).vec4u8(t.COLOR);class i{constructor(e){this.vertexBufferLayout=e}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(t.POSITION).length}write(e,t,f,o){r(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,f,o)}}export{i as DefaultBufferWriter,u as PositionColorLayout,f as PositionLayout,o as PositionUVLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as t}from"../../../../../core/mathUtils.js";import{isNone as n,isSome as e}from"../../../../../core/maybe.js";import{s as i,c as o,n as r}from"../../../../../chunks/vec3.js";import{c as s}from"../../../../../chunks/vec3f64.js";import{create as c,setMin as f,setMax as a}from"../../../../../geometry/support/aaBoundingBox.js";import{PrimitiveType as l,VertexAttribute as u}from"../../lib/basicInterfaces.js";import{scale as m}from"../../lib/screenSizePerspectiveUtils.js";import{assert as p}from"../../lib/Util.js";import{isInstanceHidden as h}from"../renderers/utils.js";const d=c();function g(t,n,e,i,o,r,s){if(!h(n))if(t.boundingInfo){p(t.primitiveType===l.Triangle);const n=e.tolerance;b(t.boundingInfo,i,o,n,r,s)}else{const n=t.indices.get(u.POSITION),e=t.vertexAttributes.get(u.POSITION);v(i,o,0,n.length/3,n,e,void 0,r,s)}}const x=s();function b(t,i,o,r,s,c){if(n(t))return;const l=O(i,o,x);if(f(d,t.getBBMin()),a(d,t.getBBMax()),e(s)&&s.applyToAabb(d),A(d,i,l,r)){const{primitiveIndices:n,indices:e,position:f}=t,a=n?n.length:e.length/3;if(a>z){const n=t.getChildren();if(void 0!==n){for(let t=0;t<8;++t)void 0!==n[t]&&b(n[t],i,o,r,s,c);return}}v(i,o,0,a,e,f,n,s,c)}}const M=s();function v(t,n,i,o,r,s,c,f,a){if(c)return y(t,n,i,o,r,s,c,f,a);const l=s.data,u=s.stride||s.size,m=t[0],p=t[1],h=t[2],d=n[0]-m,g=n[1]-p,x=n[2]-h;for(let b=i,v=3*i;b<o;++b){let t=u*r[v++],n=l[t++],i=l[t++],o=l[t];t=u*r[v++];let s=l[t++],c=l[t++],y=l[t];t=u*r[v++];let I=l[t++],T=l[t++],O=l[t];e(f)&&([n,i,o]=f.applyToVertex(n,i,o,b),[s,c,y]=f.applyToVertex(s,c,y,b),[I,T,O]=f.applyToVertex(I,T,O,b));const A=s-n,N=c-i,P=y-o,S=I-n,L=T-i,V=O-o,B=g*V-L*x,E=x*S-V*d,U=d*L-S*g,z=A*B+N*E+P*U;if(Math.abs(z)<=Number.EPSILON)continue;const W=m-n,k=p-i,R=h-o,C=W*B+k*E+R*U;if(z>0){if(C<0||C>z)continue}else if(C>0||C<z)continue;const H=k*P-N*R,X=R*A-P*W,Y=W*N-A*k,Z=d*H+g*X+x*Y;if(z>0){if(Z<0||C+Z>z)continue}else if(Z>0||C+Z<z)continue;const _=(S*H+L*X+V*Y)/z;if(_>=0){a(_,j(A,N,P,S,L,V,M),b,!1)}}}function y(t,n,i,o,r,s,c,f,a){const l=s.data,u=s.stride||s.size,m=t[0],p=t[1],h=t[2],d=n[0]-m,g=n[1]-p,x=n[2]-h;for(let b=i;b<o;++b){const t=c[b];let n=3*t,i=u*r[n++],o=l[i++],s=l[i++],v=l[i];i=u*r[n++];let y=l[i++],I=l[i++],T=l[i];i=u*r[n];let O=l[i++],A=l[i++],N=l[i];e(f)&&([o,s,v]=f.applyToVertex(o,s,v,b),[y,I,T]=f.applyToVertex(y,I,T,b),[O,A,N]=f.applyToVertex(O,A,N,b));const P=y-o,S=I-s,L=T-v,V=O-o,B=A-s,E=N-v,U=g*E-B*x,z=x*V-E*d,W=d*B-V*g,k=P*U+S*z+L*W;if(Math.abs(k)<=Number.EPSILON)continue;const R=m-o,C=p-s,H=h-v,X=R*U+C*z+H*W;if(k>0){if(X<0||X>k)continue}else if(X>0||X<k)continue;const Y=C*L-S*H,Z=H*P-L*R,_=R*S-P*C,q=d*Y+g*Z+x*_;if(k>0){if(q<0||X+q>k)continue}else if(q>0||X+q<k)continue;const w=(V*Y+B*Z+E*_)/k;if(w>=0){a(w,j(P,S,L,V,B,E,M),t,!1)}}}const I=s(),T=s();function j(t,n,e,s,c,f,a){return i(I,t,n,e),i(T,s,c,f),o(a,I,T),r(a,a),a}function O(t,n,e){return i(e,1/(n[0]-t[0]),1/(n[1]-t[1]),1/(n[2]-t[2]))}function A(t,n,e,i){return N(t,n,e,i,1/0)}function N(t,n,e,i,o){const r=(t[0]-i-n[0])*e[0],s=(t[3]+i-n[0])*e[0];let c=Math.min(r,s),f=Math.max(r,s);const a=(t[1]-i-n[1])*e[1],l=(t[4]+i-n[1])*e[1];if(f=Math.min(f,Math.max(a,l)),f<0)return!1;if(c=Math.max(c,Math.min(a,l)),c>f)return!1;const u=(t[2]-i-n[2])*e[2],m=(t[5]+i-n[2])*e[2];return f=Math.min(f,Math.max(u,m)),!(f<0)&&(c=Math.max(c,Math.min(u,m)),!(c>f)&&c<o)}function P(n,e,i,o,r){let s=(i.screenLength||0)*n.pixelRatio;r&&(s=m(s,o,e,r));const c=s*Math.tan(.5*n.fovY)/(.5*n.fullHeight);return t(c*e,i.minWorldLength||0,null!=i.maxWorldLength?i.maxWorldLength:1/0)}function S(t,n,e){if(!t)return;const i=t.parameters,o=t.paddingPixelsOverride;n.setUniform4f(e,i.divisor,i.offset,i.minPixelSize,o)}function L(t,n){const e=n?L(n):{};for(const i in t){let n=t[i];n&&n.forEach&&(n=E(n)),null==n&&i in e||(e[i]=n)}return e}function V(t,n){let e=!1;for(const i in n){const o=n[i];void 0!==o&&(e=!0,Array.isArray(o)?t[i]=o.slice():t[i]=o)}return e}function B(n,e,i,o,r,s){if(!e.options.selectionMode)return;const c=n.vertexAttributes.get(u.POSITION).data,f=n.vertexAttributes.get(u.SIZE),a=f&&f.data[0],l=o[0],m=o[1],p=((a+r)/2+4)*n.screenToWorldRatio;let h=Number.MAX_VALUE,d=0;for(let u=0;u<c.length-5;u+=3){const n=c[u],e=c[u+1],i=l-n,o=m-e,r=c[u+3]-n,s=c[u+4]-e,f=t((r*i+s*o)/(r*r+s*s),0,1),a=r*f-i,p=s*f-o,g=a*a+p*p;g<h&&(h=g,d=u/3)}h<p*p&&s(i.dist,i.normal,d,!1)}function E(t){const n=[];return t.forEach((t=>n.push(t))),n}const U={multiply:1,ignore:2,replace:3,tint:4},z=1e3;export{S as bindScreenSizePerspective,U as colorMixModes,O as computeInvDir,j as computeNormal,L as copyParameters,A as intersectAabbInvDir,N as intersectAabbInvDirBefore,B as intersectDrapedRenderLineGeometry,g as intersectTriangleGeometry,v as intersectTriangles,V as updateParameters,P as verticalOffsetAtDistance};
5
+ import{clamp as t}from"../../../../../core/mathUtils.js";import{isNone as e,isSome as n}from"../../../../../core/maybe.js";import{s as i,c as o,n as r}from"../../../../../chunks/vec3.js";import{c as s}from"../../../../../chunks/vec3f64.js";import{create as c,setMin as f,setMax as a}from"../../../../../geometry/support/aaBoundingBox.js";import{PrimitiveType as l}from"../../lib/basicInterfaces.js";import{scale as u}from"../../lib/screenSizePerspectiveUtils.js";import{assert as m}from"../../lib/Util.js";import{VertexAttribute as p}from"../../lib/VertexAttribute.js";import{isInstanceHidden as h}from"../renderers/utils.js";const d=c();function g(t,e,n,i,o,r,s){if(!h(e))if(t.boundingInfo){m(t.primitiveType===l.Triangle);const e=n.tolerance;b(t.boundingInfo,i,o,e,r,s)}else{const e=t.indices.get(p.POSITION),n=t.vertexAttributes.get(p.POSITION);v(i,o,0,e.length/3,e,n,void 0,r,s)}}const x=s();function b(t,i,o,r,s,c){if(e(t))return;const l=A(i,o,x);if(f(d,t.getBBMin()),a(d,t.getBBMax()),n(s)&&s.applyToAabb(d),O(d,i,l,r)){const{primitiveIndices:e,indices:n,position:f}=t,a=e?e.length:n.length/3;if(a>z){const e=t.getChildren();if(void 0!==e){for(let t=0;t<8;++t)void 0!==e[t]&&b(e[t],i,o,r,s,c);return}}v(i,o,0,a,n,f,e,s,c)}}const M=s();function v(t,e,i,o,r,s,c,f,a){if(c)return y(t,e,i,o,r,s,c,f,a);const l=s.data,u=s.stride||s.size,m=t[0],p=t[1],h=t[2],d=e[0]-m,g=e[1]-p,x=e[2]-h;for(let b=i,v=3*i;b<o;++b){let t=u*r[v++],e=l[t++],i=l[t++],o=l[t];t=u*r[v++];let s=l[t++],c=l[t++],y=l[t];t=u*r[v++];let I=l[t++],T=l[t++],A=l[t];n(f)&&([e,i,o]=f.applyToVertex(e,i,o,b),[s,c,y]=f.applyToVertex(s,c,y,b),[I,T,A]=f.applyToVertex(I,T,A,b));const O=s-e,N=c-i,P=y-o,S=I-e,V=T-i,L=A-o,B=g*L-V*x,E=x*S-L*d,U=d*V-S*g,z=O*B+N*E+P*U;if(Math.abs(z)<=Number.EPSILON)continue;const W=m-e,k=p-i,R=h-o,C=W*B+k*E+R*U;if(z>0){if(C<0||C>z)continue}else if(C>0||C<z)continue;const H=k*P-N*R,X=R*O-P*W,Y=W*N-O*k,Z=d*H+g*X+x*Y;if(z>0){if(Z<0||C+Z>z)continue}else if(Z>0||C+Z<z)continue;const _=(S*H+V*X+L*Y)/z;if(_>=0){a(_,j(O,N,P,S,V,L,M),b,!1)}}}function y(t,e,i,o,r,s,c,f,a){const l=s.data,u=s.stride||s.size,m=t[0],p=t[1],h=t[2],d=e[0]-m,g=e[1]-p,x=e[2]-h;for(let b=i;b<o;++b){const t=c[b];let e=3*t,i=u*r[e++],o=l[i++],s=l[i++],v=l[i];i=u*r[e++];let y=l[i++],I=l[i++],T=l[i];i=u*r[e];let A=l[i++],O=l[i++],N=l[i];n(f)&&([o,s,v]=f.applyToVertex(o,s,v,b),[y,I,T]=f.applyToVertex(y,I,T,b),[A,O,N]=f.applyToVertex(A,O,N,b));const P=y-o,S=I-s,V=T-v,L=A-o,B=O-s,E=N-v,U=g*E-B*x,z=x*L-E*d,W=d*B-L*g,k=P*U+S*z+V*W;if(Math.abs(k)<=Number.EPSILON)continue;const R=m-o,C=p-s,H=h-v,X=R*U+C*z+H*W;if(k>0){if(X<0||X>k)continue}else if(X>0||X<k)continue;const Y=C*V-S*H,Z=H*P-V*R,_=R*S-P*C,q=d*Y+g*Z+x*_;if(k>0){if(q<0||X+q>k)continue}else if(q>0||X+q<k)continue;const w=(L*Y+B*Z+E*_)/k;if(w>=0){a(w,j(P,S,V,L,B,E,M),t,!1)}}}const I=s(),T=s();function j(t,e,n,s,c,f,a){return i(I,t,e,n),i(T,s,c,f),o(a,I,T),r(a,a),a}function A(t,e,n){return i(n,1/(e[0]-t[0]),1/(e[1]-t[1]),1/(e[2]-t[2]))}function O(t,e,n,i){return N(t,e,n,i,1/0)}function N(t,e,n,i,o){const r=(t[0]-i-e[0])*n[0],s=(t[3]+i-e[0])*n[0];let c=Math.min(r,s),f=Math.max(r,s);const a=(t[1]-i-e[1])*n[1],l=(t[4]+i-e[1])*n[1];if(f=Math.min(f,Math.max(a,l)),f<0)return!1;if(c=Math.max(c,Math.min(a,l)),c>f)return!1;const u=(t[2]-i-e[2])*n[2],m=(t[5]+i-e[2])*n[2];return f=Math.min(f,Math.max(u,m)),!(f<0)&&(c=Math.max(c,Math.min(u,m)),!(c>f)&&c<o)}function P(e,n,i,o,r){let s=(i.screenLength||0)*e.pixelRatio;r&&(s=u(s,o,n,r));const c=s*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return t(c*n,i.minWorldLength||0,null!=i.maxWorldLength?i.maxWorldLength:1/0)}function S(t,e,n){if(!t)return;const i=t.parameters,o=t.paddingPixelsOverride;e.setUniform4f(n,i.divisor,i.offset,i.minPixelSize,o)}function V(t,e){const n=e?V(e):{};for(const i in t){let e=t[i];e&&e.forEach&&(e=E(e)),null==e&&i in n||(n[i]=e)}return n}function L(t,e){let n=!1;for(const i in e){const o=e[i];void 0!==o&&(n=!0,Array.isArray(o)?t[i]=o.slice():t[i]=o)}return n}function B(e,n,i,o,r,s){if(!n.options.selectionMode)return;const c=e.vertexAttributes.get(p.POSITION).data,f=e.vertexAttributes.get(p.SIZE),a=f&&f.data[0],l=o[0],u=o[1],m=((a+r)/2+4)*e.screenToWorldRatio;let h=Number.MAX_VALUE,d=0;for(let p=0;p<c.length-5;p+=3){const e=c[p],n=c[p+1],i=l-e,o=u-n,r=c[p+3]-e,s=c[p+4]-n,f=t((r*i+s*o)/(r*r+s*s),0,1),a=r*f-i,m=s*f-o,g=a*a+m*m;g<h&&(h=g,d=p/3)}h<m*m&&s(i.dist,i.normal,d,!1)}function E(t){const e=[];return t.forEach((t=>e.push(t))),e}const U={multiply:1,ignore:2,replace:3,tint:4},z=1e3;export{S as bindScreenSizePerspective,U as colorMixModes,A as computeInvDir,j as computeNormal,V as copyParameters,O as intersectAabbInvDir,N as intersectAabbInvDirBefore,B as intersectDrapedRenderLineGeometry,g as intersectTriangleGeometry,v as intersectTriangles,L as updateParameters,P as verticalOffsetAtDistance};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{p as t}from"../../../../../chunks/mat4.js";import{BufferViewVec4f as e,BufferViewVec4u8 as f,BufferViewVec2f as o,BufferViewVec3f as r}from"../../../../../geometry/support/buffer/BufferView.js";import{VertexAttribute as s}from"../../lib/basicInterfaces.js";import{assert as n}from"../../lib/Util.js";function i(t,e,f,o){const r=f.typedBuffer,s=f.typedBufferStride,n=t.length;o*=s;for(let i=0;i<n;++i){const f=2*t[i];r[o]=e[f],r[o+1]=e[f+1],o+=s}}function c(t,e,f,o,r){const s=f.typedBuffer,n=f.typedBufferStride,i=t.length;if(o*=n,null==r||1===r)for(let c=0;c<i;++c){const f=3*t[c];s[o]=e[f],s[o+1]=e[f+1],s[o+2]=e[f+2],o+=n}else for(let c=0;c<i;++c){const f=3*t[c];for(let t=0;t<r;++t)s[o]=e[f],s[o+1]=e[f+1],s[o+2]=e[f+2],o+=n}}function l(t,e,f,o,r=1){const s=f.typedBuffer,n=f.typedBufferStride,i=t.length;if(o*=n,1===r)for(let c=0;c<i;++c){const f=4*t[c];s[o]=e[f],s[o+1]=e[f+1],s[o+2]=e[f+2],s[o+3]=e[f+3],o+=n}else for(let c=0;c<i;++c){const f=4*t[c];for(let t=0;t<r;++t)s[o]=e[f],s[o+1]=e[f+1],s[o+2]=e[f+2],s[o+3]=e[f+3],o+=n}}function d(t,e,f,o){const r=f.typedBuffer,s=f.typedBufferStride,n=t.length;o*=s;for(let i=0;i<n;++i){const f=9*t[i];for(let t=0;t<9;++t)r[o+t]=e[f+t];o+=s}}function u(t,e,f,o){const r=f.typedBuffer,s=f.typedBufferStride,n=t.length;o*=s;for(let i=0;i<n;++i){const f=16*t[i];for(let t=0;t<16;++t)r[o+t]=e[f+t];o+=s}}function a(t,e,f,o,r,s=1){if(!f)return void c(t,e,o,r,s);const n=o.typedBuffer,i=o.typedBufferStride,l=t.length,d=f[0],u=f[1],a=f[2],p=f[4],B=f[5],y=f[6],g=f[8],h=f[9],b=f[10],m=f[12],S=f[13],z=f[14];if(r*=i,1===s)for(let c=0;c<l;++c){const f=3*t[c],o=e[f],s=e[f+1],l=e[f+2];n[r]=d*o+p*s+g*l+m,n[r+1]=u*o+B*s+h*l+S,n[r+2]=a*o+y*s+b*l+z,r+=i}else for(let c=0;c<l;++c){const f=3*t[c],o=e[f],l=e[f+1],O=e[f+2],k=d*o+p*l+g*O+m,F=u*o+B*l+h*O+S,M=a*o+y*l+b*O+z;for(let t=0;t<s;++t)n[r]=k,n[r+1]=F,n[r+2]=M,r+=i}}function p(e,f,o,r,s,n=1){if(!o)return void c(e,f,r,s,n);const i=o,l=r.typedBuffer,d=r.typedBufferStride,u=e.length,a=i[0],p=i[1],B=i[2],y=i[4],g=i[5],h=i[6],b=i[8],m=i[9],S=i[10],z=!t(i),O=1e-6,k=1-O;if(s*=d,1===n)for(let t=0;t<u;++t){const o=3*e[t],r=f[o],n=f[o+1],i=f[o+2];let c=a*r+y*n+b*i,u=p*r+g*n+m*i,F=B*r+h*n+S*i;if(z){const t=c*c+u*u+F*F;if(t<k&&t>O){const e=1/Math.sqrt(t);c*=e,u*=e,F*=e}}l[s+0]=c,l[s+1]=u,l[s+2]=F,s+=d}else for(let t=0;t<u;++t){const o=3*e[t],r=f[o],i=f[o+1],c=f[o+2];let u=a*r+y*i+b*c,F=p*r+g*i+m*c,M=B*r+h*i+S*c;if(z){const t=u*u+F*F+M*M;if(t<k&&t>O){const e=1/Math.sqrt(t);u*=e,F*=e,M*=e}}for(let t=0;t<n;++t)l[s+0]=u,l[s+1]=F,l[s+2]=M,s+=d}}function B(e,f,o,r,s,n=1){if(!o)return void l(e,f,r,s,n);const i=o,c=r.typedBuffer,d=r.typedBufferStride,u=e.length,a=i[0],p=i[1],B=i[2],y=i[4],g=i[5],h=i[6],b=i[8],m=i[9],S=i[10],z=!t(i),O=1e-6,k=1-O;if(s*=d,1===n)for(let t=0;t<u;++t){const o=4*e[t],r=f[o],n=f[o+1],i=f[o+2],l=f[o+3];let u=a*r+y*n+b*i,F=p*r+g*n+m*i,M=B*r+h*n+S*i;if(z){const t=u*u+F*F+M*M;if(t<k&&t>O){const e=1/Math.sqrt(t);u*=e,F*=e,M*=e}}c[s+0]=u,c[s+1]=F,c[s+2]=M,c[s+3]=l,s+=d}else for(let t=0;t<u;++t){const o=4*e[t],r=f[o],i=f[o+1],l=f[o+2],u=f[o+3];let F=a*r+y*i+b*l,M=p*r+g*i+m*l,N=B*r+h*i+S*l;if(z){const t=F*F+M*M+N*N;if(t<k&&t>O){const e=1/Math.sqrt(t);F*=e,M*=e,N*=e}}for(let t=0;t<n;++t)c[s+0]=F,c[s+1]=M,c[s+2]=N,c[s+3]=u,s+=d}}function y(t,e,f,o,r,s=1){const n=o.typedBuffer,i=o.typedBufferStride,c=t.length;if(r*=i,1===s){if(4===f)for(let l=0;l<c;++l){const f=4*t[l];n[r]=e[f],n[r+1]=e[f+1],n[r+2]=e[f+2],n[r+3]=e[f+3],r+=i}else if(3===f)for(let l=0;l<c;++l){const f=3*t[l];n[r]=e[f],n[r+1]=e[f+1],n[r+2]=e[f+2],n[r+3]=255,r+=i}}else if(4===f)for(let l=0;l<c;++l){const f=4*t[l];for(let t=0;t<s;++t)n[r]=e[f],n[r+1]=e[f+1],n[r+2]=e[f+2],n[r+3]=e[f+3],r+=i}else if(3===f)for(let l=0;l<c;++l){const f=3*t[l];for(let t=0;t<s;++t)n[r]=e[f],n[r+1]=e[f+1],n[r+2]=e[f+2],n[r+3]=255,r+=i}}function g(t,c,l,d,u,g){for(const h of c.fieldNames){const c=t.vertexAttributes.get(h),b=t.indices.get(h);if(c&&b)switch(h){case s.POSITION:{n(3===c.size);const t=u.getField(h,r);t&&a(b,c.data,l,t,g);break}case s.NORMAL:{n(3===c.size);const t=u.getField(h,r);t&&p(b,c.data,d,t,g);break}case s.UV0:{n(2===c.size);const t=u.getField(h,o);t&&i(b,c.data,t,g);break}case s.COLOR:{n(3===c.size||4===c.size);const t=u.getField(h,f);t&&y(b,c.data,c.size,t,g);break}case s.SYMBOLCOLOR:{n(3===c.size||4===c.size);const t=u.getField(h,f);t&&y(b,c.data,c.size,t,g);break}case s.TANGENT:{n(4===c.size);const t=u.getField(h,e);t&&B(b,c.data,d,t,g);break}}}}export{d as writeBufferMat3f,u as writeBufferMat4f,i as writeBufferVec2,c as writeBufferVec3,l as writeBufferVec4,y as writeColor,g as writeDefaultAttributes,p as writeNormal,a as writePosition,B as writeTangent};
5
+ import{p as t}from"../../../../../chunks/mat4.js";import{BufferViewVec4f as e,BufferViewVec4u8 as f,BufferViewVec2f as o,BufferViewVec3f as r}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as s}from"../../lib/Util.js";import{VertexAttribute as n}from"../../lib/VertexAttribute.js";function i(t,e,f,o){const r=f.typedBuffer,s=f.typedBufferStride,n=t.length;o*=s;for(let i=0;i<n;++i){const f=2*t[i];r[o]=e[f],r[o+1]=e[f+1],o+=s}}function c(t,e,f,o,r){const s=f.typedBuffer,n=f.typedBufferStride,i=t.length;if(o*=n,null==r||1===r)for(let c=0;c<i;++c){const f=3*t[c];s[o]=e[f],s[o+1]=e[f+1],s[o+2]=e[f+2],o+=n}else for(let c=0;c<i;++c){const f=3*t[c];for(let t=0;t<r;++t)s[o]=e[f],s[o+1]=e[f+1],s[o+2]=e[f+2],o+=n}}function l(t,e,f,o,r=1){const s=f.typedBuffer,n=f.typedBufferStride,i=t.length;if(o*=n,1===r)for(let c=0;c<i;++c){const f=4*t[c];s[o]=e[f],s[o+1]=e[f+1],s[o+2]=e[f+2],s[o+3]=e[f+3],o+=n}else for(let c=0;c<i;++c){const f=4*t[c];for(let t=0;t<r;++t)s[o]=e[f],s[o+1]=e[f+1],s[o+2]=e[f+2],s[o+3]=e[f+3],o+=n}}function d(t,e,f,o){const r=f.typedBuffer,s=f.typedBufferStride,n=t.length;o*=s;for(let i=0;i<n;++i){const f=9*t[i];for(let t=0;t<9;++t)r[o+t]=e[f+t];o+=s}}function u(t,e,f,o){const r=f.typedBuffer,s=f.typedBufferStride,n=t.length;o*=s;for(let i=0;i<n;++i){const f=16*t[i];for(let t=0;t<16;++t)r[o+t]=e[f+t];o+=s}}function a(t,e,f,o,r,s=1){if(!f)return void c(t,e,o,r,s);const n=o.typedBuffer,i=o.typedBufferStride,l=t.length,d=f[0],u=f[1],a=f[2],p=f[4],B=f[5],y=f[6],g=f[8],h=f[9],b=f[10],m=f[12],S=f[13],z=f[14];if(r*=i,1===s)for(let c=0;c<l;++c){const f=3*t[c],o=e[f],s=e[f+1],l=e[f+2];n[r]=d*o+p*s+g*l+m,n[r+1]=u*o+B*s+h*l+S,n[r+2]=a*o+y*s+b*l+z,r+=i}else for(let c=0;c<l;++c){const f=3*t[c],o=e[f],l=e[f+1],O=e[f+2],k=d*o+p*l+g*O+m,F=u*o+B*l+h*O+S,M=a*o+y*l+b*O+z;for(let t=0;t<s;++t)n[r]=k,n[r+1]=F,n[r+2]=M,r+=i}}function p(e,f,o,r,s,n=1){if(!o)return void c(e,f,r,s,n);const i=o,l=r.typedBuffer,d=r.typedBufferStride,u=e.length,a=i[0],p=i[1],B=i[2],y=i[4],g=i[5],h=i[6],b=i[8],m=i[9],S=i[10],z=!t(i),O=1e-6,k=1-O;if(s*=d,1===n)for(let t=0;t<u;++t){const o=3*e[t],r=f[o],n=f[o+1],i=f[o+2];let c=a*r+y*n+b*i,u=p*r+g*n+m*i,F=B*r+h*n+S*i;if(z){const t=c*c+u*u+F*F;if(t<k&&t>O){const e=1/Math.sqrt(t);c*=e,u*=e,F*=e}}l[s+0]=c,l[s+1]=u,l[s+2]=F,s+=d}else for(let t=0;t<u;++t){const o=3*e[t],r=f[o],i=f[o+1],c=f[o+2];let u=a*r+y*i+b*c,F=p*r+g*i+m*c,M=B*r+h*i+S*c;if(z){const t=u*u+F*F+M*M;if(t<k&&t>O){const e=1/Math.sqrt(t);u*=e,F*=e,M*=e}}for(let t=0;t<n;++t)l[s+0]=u,l[s+1]=F,l[s+2]=M,s+=d}}function B(e,f,o,r,s,n=1){if(!o)return void l(e,f,r,s,n);const i=o,c=r.typedBuffer,d=r.typedBufferStride,u=e.length,a=i[0],p=i[1],B=i[2],y=i[4],g=i[5],h=i[6],b=i[8],m=i[9],S=i[10],z=!t(i),O=1e-6,k=1-O;if(s*=d,1===n)for(let t=0;t<u;++t){const o=4*e[t],r=f[o],n=f[o+1],i=f[o+2],l=f[o+3];let u=a*r+y*n+b*i,F=p*r+g*n+m*i,M=B*r+h*n+S*i;if(z){const t=u*u+F*F+M*M;if(t<k&&t>O){const e=1/Math.sqrt(t);u*=e,F*=e,M*=e}}c[s+0]=u,c[s+1]=F,c[s+2]=M,c[s+3]=l,s+=d}else for(let t=0;t<u;++t){const o=4*e[t],r=f[o],i=f[o+1],l=f[o+2],u=f[o+3];let F=a*r+y*i+b*l,M=p*r+g*i+m*l,N=B*r+h*i+S*l;if(z){const t=F*F+M*M+N*N;if(t<k&&t>O){const e=1/Math.sqrt(t);F*=e,M*=e,N*=e}}for(let t=0;t<n;++t)c[s+0]=F,c[s+1]=M,c[s+2]=N,c[s+3]=u,s+=d}}function y(t,e,f,o,r,s=1){const n=o.typedBuffer,i=o.typedBufferStride,c=t.length;if(r*=i,1===s){if(4===f)for(let l=0;l<c;++l){const f=4*t[l];n[r]=e[f],n[r+1]=e[f+1],n[r+2]=e[f+2],n[r+3]=e[f+3],r+=i}else if(3===f)for(let l=0;l<c;++l){const f=3*t[l];n[r]=e[f],n[r+1]=e[f+1],n[r+2]=e[f+2],n[r+3]=255,r+=i}}else if(4===f)for(let l=0;l<c;++l){const f=4*t[l];for(let t=0;t<s;++t)n[r]=e[f],n[r+1]=e[f+1],n[r+2]=e[f+2],n[r+3]=e[f+3],r+=i}else if(3===f)for(let l=0;l<c;++l){const f=3*t[l];for(let t=0;t<s;++t)n[r]=e[f],n[r+1]=e[f+1],n[r+2]=e[f+2],n[r+3]=255,r+=i}}function g(t,c,l,d,u,g){for(const h of c.fieldNames){const c=t.vertexAttributes.get(h),b=t.indices.get(h);if(c&&b)switch(h){case n.POSITION:{s(3===c.size);const t=u.getField(h,r);t&&a(b,c.data,l,t,g);break}case n.NORMAL:{s(3===c.size);const t=u.getField(h,r);t&&p(b,c.data,d,t,g);break}case n.UV0:{s(2===c.size);const t=u.getField(h,o);t&&i(b,c.data,t,g);break}case n.COLOR:{s(3===c.size||4===c.size);const t=u.getField(h,f);t&&y(b,c.data,c.size,t,g);break}case n.SYMBOLCOLOR:{s(3===c.size||4===c.size);const t=u.getField(h,f);t&&y(b,c.data,c.size,t,g);break}case n.TANGENT:{s(4===c.size);const t=u.getField(h,e);t&&B(b,c.data,d,t,g);break}}}}export{d as writeBufferMat3f,u as writeBufferMat4f,i as writeBufferVec2,c as writeBufferVec3,l as writeBufferVec4,y as writeColor,g as writeDefaultAttributes,p as writeNormal,a as writePosition,B as writeTangent};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{f as e}from"../../../../../chunks/vec2f64.js";import{materialParametersDefaults as t}from"../../lib/Material.js";const r={waveStrength:.06,waveTextureRepeat:32,waveDirection:e(1,0),waveVelocity:.05,flowStrength:.015,flowOffset:-.5,animationSpeed:.35,color:[0,0,0,0],transparent:!0,writeDepth:!0,slicePlaneEnabled:!1,isDraped:!1,receiveShadows:!0,ssrEnabled:!1,...t},a={"calm-small":{waveStrength:.005,perturbationStrength:.02,textureRepeat:12,waveVelocity:.01},"rippled-small":{waveStrength:.02,perturbationStrength:.09,textureRepeat:32,waveVelocity:.07},"slight-small":{waveStrength:.05,perturbationStrength:.07,textureRepeat:28,waveVelocity:.1},"moderate-small":{waveStrength:.075,perturbationStrength:.07,textureRepeat:24,waveVelocity:.1},"calm-medium":{waveStrength:.003125,perturbationStrength:.01,textureRepeat:8,waveVelocity:.02},"rippled-medium":{waveStrength:.035,perturbationStrength:.015,textureRepeat:12,waveVelocity:.07},"slight-medium":{waveStrength:.06,perturbationStrength:.015,textureRepeat:8,waveVelocity:.12},"moderate-medium":{waveStrength:.09,perturbationStrength:.03,textureRepeat:4,waveVelocity:.12},"calm-large":{waveStrength:.01,perturbationStrength:0,textureRepeat:4,waveVelocity:.05},"rippled-large":{waveStrength:.025,perturbationStrength:.01,textureRepeat:8,waveVelocity:.11},"slight-large":{waveStrength:.06,perturbationStrength:.02,textureRepeat:3,waveVelocity:.13},"moderate-large":{waveStrength:.14,perturbationStrength:.03,textureRepeat:2,waveVelocity:.15}};export{r as defaultWaterMaterialParameters,a as wavePresets};
5
+ import{f as e}from"../../../../../chunks/vec2f64.js";import{DefaultMaterialParameters as t}from"../../lib/Material.js";const r={waveStrength:.06,waveTextureRepeat:32,waveDirection:e(1,0),waveVelocity:.05,flowStrength:.015,flowOffset:-.5,animationSpeed:.35,color:[0,0,0,0],transparent:!0,writeDepth:!0,slicePlaneEnabled:!1,isDraped:!1,receiveShadows:!0,ssrEnabled:!1,...t},a={"calm-small":{waveStrength:.005,perturbationStrength:.02,textureRepeat:12,waveVelocity:.01},"rippled-small":{waveStrength:.02,perturbationStrength:.09,textureRepeat:32,waveVelocity:.07},"slight-small":{waveStrength:.05,perturbationStrength:.07,textureRepeat:28,waveVelocity:.1},"moderate-small":{waveStrength:.075,perturbationStrength:.07,textureRepeat:24,waveVelocity:.1},"calm-medium":{waveStrength:.003125,perturbationStrength:.01,textureRepeat:8,waveVelocity:.02},"rippled-medium":{waveStrength:.035,perturbationStrength:.015,textureRepeat:12,waveVelocity:.07},"slight-medium":{waveStrength:.06,perturbationStrength:.015,textureRepeat:8,waveVelocity:.12},"moderate-medium":{waveStrength:.09,perturbationStrength:.03,textureRepeat:4,waveVelocity:.12},"calm-large":{waveStrength:.01,perturbationStrength:0,textureRepeat:4,waveVelocity:.05},"rippled-large":{waveStrength:.025,perturbationStrength:.01,textureRepeat:8,waveVelocity:.11},"slight-large":{waveStrength:.06,perturbationStrength:.02,textureRepeat:3,waveVelocity:.13},"moderate-large":{waveStrength:.14,perturbationStrength:.03,textureRepeat:2,waveVelocity:.15}};export{r as defaultWaterMaterialParameters,a as wavePresets};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/basicInterfaces.js";export{b as build}from"../../../../chunks/CheckerBoard.glsl.js";
5
+ import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/VertexAttribute.js";export{b as build}from"../../../../chunks/CheckerBoard.glsl.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../../../chunks/tslib.es6.js";import{bindMultipassTerrainTexture as e}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindProjectionMatrix as t,bindView as o}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as i}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as a,ShaderTechniqueConfiguration as n}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as p}from"../lib/basicInterfaces.js";import{Default3D as l}from"../lib/DefaultVertexAttributeLocations.js";import{oitBlending as c,oitDepthTest as m,oitDepthWrite as d}from"../lib/OrderIndependentTransparency.js";import{Program as h}from"../lib/Program.js";import{C as u}from"../../../../chunks/CheckerBoard.glsl.js";import{BlendFactor as f}from"../../../webgl/enums.js";import{separateBlendingParams as g,makePipelineState as b,defaultDepthWriteParams as y,defaultColorWriteParams as T}from"../../../webgl/renderState.js";class v extends s{initializeProgram(r){const e=v.shader.get(),t=this.configuration,o=e.build({OITEnabled:t.transparencyPassType===p.Color,multipassTerrainEnabled:t.multipassTerrainEnabled,cullAboveGround:t.cullAboveGround});return new h(r.rctx,o,l)}bindPass(r,o){t(this.program,o.camera.projectionMatrix),this.program.setUniform2fv("size",r.size),this.program.setUniform4fv("color1",r.color1),this.program.setUniform4fv("color2",r.color2),o.multipassTerrainEnabled&&(this.program.setUniform2fv("cameraNearFar",o.camera.nearFar),this.program.setUniform2fv("inverseViewport",o.inverseViewport),e(this.program,o))}bindDraw(r){o(this.program,r)}_setPipelineState(r){const e=this.configuration,t=r===p.NONE,o=r===p.FrontFace;return b({blending:e.transparent?t?P:c(r):null,depthTest:{func:m(r)},depthWrite:t?e.writeDepth&&y:d(r),colorWrite:T,polygonOffset:t||o?e.polygonOffset&&j:{factor:-1,units:-25}})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}v.shader=new i(u,(()=>import("./CheckerBoard.glsl.js")));const j={factor:0,units:-25},P=g(f.SRC_ALPHA,f.ONE,f.ONE_MINUS_SRC_ALPHA,f.ONE_MINUS_SRC_ALPHA);class O extends n{constructor(){super(...arguments),this.transparent=!1,this.writeDepth=!0,this.polygonOffset=!1,this.transparencyPassType=p.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}r([a()],O.prototype,"transparent",void 0),r([a()],O.prototype,"writeDepth",void 0),r([a()],O.prototype,"polygonOffset",void 0),r([a({count:p.COUNT})],O.prototype,"transparencyPassType",void 0),r([a()],O.prototype,"multipassTerrainEnabled",void 0),r([a()],O.prototype,"cullAboveGround",void 0);export{v as CheckerBoardTechnique,O as CheckerBoardTechniqueConfiguration};
5
+ import{_ as r}from"../../../../chunks/tslib.es6.js";import{bindMultipassTerrainTexture as e}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindProjectionMatrix as t,bindView as o}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as i}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as a,ShaderTechniqueConfiguration as n}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as p}from"../lib/basicInterfaces.js";import{Default3D as l}from"../lib/DefaultVertexAttributeLocations.js";import{oitBlending as c,oitDepthTest as m,oitDepthWrite as d}from"../lib/OrderIndependentTransparency.js";import{Program as h}from"../lib/Program.js";import{C as u}from"../../../../chunks/CheckerBoard.glsl.js";import{BlendFactor as f}from"../../../webgl/enums.js";import{separateBlendingParams as g,makePipelineState as b,defaultDepthWriteParams as y,defaultColorWriteParams as T}from"../../../webgl/renderState.js";class v extends s{initializeProgram(r){const e=v.shader.get(),t=this.configuration,o=e.build({oitEnabled:t.transparencyPassType===p.Color,multipassTerrainEnabled:t.multipassTerrainEnabled,cullAboveGround:t.cullAboveGround});return new h(r.rctx,o,l)}bindPass(r,o){t(this.program,o.camera.projectionMatrix),this.program.setUniform2fv("size",r.size),this.program.setUniform4fv("color1",r.color1),this.program.setUniform4fv("color2",r.color2),o.multipassTerrainEnabled&&(this.program.setUniform2fv("nearFar",o.camera.nearFar),this.program.setUniform2fv("inverseViewport",o.inverseViewport),e(this.program,o))}bindDraw(r){o(this.program,r)}_setPipelineState(r){const e=this.configuration,t=r===p.NONE,o=r===p.FrontFace;return b({blending:e.transparent?t?P:c(r):null,depthTest:{func:m(r)},depthWrite:t?e.writeDepth&&y:d(r),colorWrite:T,polygonOffset:t||o?e.polygonOffset&&j:{factor:-1,units:-25}})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}v.shader=new i(u,(()=>import("./CheckerBoard.glsl.js")));const j={factor:0,units:-25},P=g(f.SRC_ALPHA,f.ONE,f.ONE_MINUS_SRC_ALPHA,f.ONE_MINUS_SRC_ALPHA);class w extends n{constructor(){super(...arguments),this.transparent=!1,this.writeDepth=!0,this.polygonOffset=!1,this.transparencyPassType=p.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}r([a()],w.prototype,"transparent",void 0),r([a()],w.prototype,"writeDepth",void 0),r([a()],w.prototype,"polygonOffset",void 0),r([a({count:p.COUNT})],w.prototype,"transparencyPassType",void 0),r([a()],w.prototype,"multipassTerrainEnabled",void 0),r([a()],w.prototype,"cullAboveGround",void 0);export{v as CheckerBoardTechnique,w as CheckerBoardTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/VertexColor.glsl.js";import"../core/shaderLibrary/output/OutputDepth.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/basicInterfaces.js";export{b as build}from"../../../../chunks/ColorMaterial.glsl.js";
5
+ import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/VertexColor.glsl.js";import"../core/shaderLibrary/output/OutputDepth.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/VertexAttribute.js";export{b as build}from"../../../../chunks/ColorMaterial.glsl.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as t}from"../core/shaderLibrary/Slice.glsl.js";import{bindOutputHighlight as i}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as o}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindProjectionMatrix as s,bindView as a}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as n}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as p,ShaderTechniqueConfiguration as c}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as u,TransparencyPassType as h}from"../lib/basicInterfaces.js";import{Default3D as d}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as m,oitBlending as f,oitDepthTest as g,getOITPolygonOffset as b}from"../lib/OrderIndependentTransparency.js";import{Program as y}from"../lib/Program.js";import{stencilWriteMaskOn as T,stencilToolMaskBaseParams as v,stencilBaseAllZerosParams as O}from"../lib/StencilUtils.js";import{C as P}from"../../../../chunks/ColorMaterial.glsl.js";import{makePipelineState as j,cullingParams as C,defaultDepthWriteParams as E,defaultColorWriteParams as x}from"../../../webgl/renderState.js";class S extends l{initializeProgram(e){const r=S.shader.get(),t=this.configuration,i=r.build({output:t.output,OITEnabled:t.transparencyPassType===h.Color,attributeColor:t.vertexColors,slicePlaneEnabled:t.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,multipassTerrainEnabled:t.multipassTerrainEnabled,cullAboveGround:t.cullAboveGround});return new y(e.rctx,i,d)}bindPass(e,t){s(this.program,t.camera.projectionMatrix),this.program.setUniform4fv("eColor",e.color),this.configuration.output===r.Highlight&&i(this.program,t),(this.configuration.output===r.Depth||t.multipassTerrainEnabled)&&this.program.setUniform2fv("cameraNearFar",t.camera.nearFar),t.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",t.inverseViewport),o(this.program,t))}bindDraw(e){a(this.program,e),this.program.rebindTextures(),t(this.program,this.configuration,e)}_createPipeline(e,t){const i=this.configuration,o=e===h.NONE,s=e===h.FrontFace;return j({blending:i.output!==r.Color&&i.output!==r.Alpha||!i.transparent?null:o?m:f(e),culling:C(i.cullFace),depthTest:{func:g(e)},depthWrite:o||s?i.writeDepth&&E:null,colorWrite:x,stencilWrite:i.sceneHasOcludees?T:null,stencilTest:i.sceneHasOcludees?t?v:O:null,polygonOffset:o||s?i.polygonOffset&&w:b(i.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._createPipeline(this.configuration.transparencyPassType,!0),this._createPipeline(this.configuration.transparencyPassType,!1)}getPipelineState(e,r){return r?this._occludeePipelineState:super.getPipelineState(e,r)}}S.shader=new n(P,(()=>import("./ColorMaterial.glsl.js")));const w={factor:1,units:1};class N extends c{constructor(){super(...arguments),this.output=r.Color,this.cullFace=u.None,this.slicePlaneEnabled=!1,this.vertexColors=!1,this.transparent=!1,this.polygonOffset=!1,this.enableOffset=!0,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparencyPassType=h.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}e([p({count:r.COUNT})],N.prototype,"output",void 0),e([p({count:u.COUNT})],N.prototype,"cullFace",void 0),e([p()],N.prototype,"slicePlaneEnabled",void 0),e([p()],N.prototype,"vertexColors",void 0),e([p()],N.prototype,"transparent",void 0),e([p()],N.prototype,"polygonOffset",void 0),e([p()],N.prototype,"enableOffset",void 0),e([p()],N.prototype,"writeDepth",void 0),e([p()],N.prototype,"sceneHasOcludees",void 0),e([p({count:h.COUNT})],N.prototype,"transparencyPassType",void 0),e([p()],N.prototype,"multipassTerrainEnabled",void 0),e([p()],N.prototype,"cullAboveGround",void 0);export{S as ColorMaterialTechnique,N as ColorMaterialTechniqueConfiguration};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as t}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as r}from"../core/shaderLibrary/Slice.glsl.js";import{bindOutputHighlight as i}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as o}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{bindProjectionMatrix as s,bindView as a}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as n}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as l}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as p,ShaderTechniqueConfiguration as c}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{CullFaceOptions as u,TransparencyPassType as h}from"../lib/basicInterfaces.js";import{Default3D as d}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as m,oitBlending as f,oitDepthTest as g,getOITPolygonOffset as b}from"../lib/OrderIndependentTransparency.js";import{Program as y}from"../lib/Program.js";import{stencilWriteMaskOn as T,stencilToolMaskBaseParams as v,stencilBaseAllZerosParams as P}from"../lib/StencilUtils.js";import{C as O}from"../../../../chunks/ColorMaterial.glsl.js";import{makePipelineState as j,cullingParams as C,defaultDepthWriteParams as E,defaultColorWriteParams as x}from"../../../webgl/renderState.js";class S extends l{initializeProgram(e){const t=S.shader.get(),r=this.configuration,i=t.build({output:r.output,oitEnabled:r.transparencyPassType===h.Color,attributeColor:r.vertexColors,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new y(e.rctx,i,d)}bindPass(e,r){s(this.program,r.camera.projectionMatrix),this.program.setUniform4fv("eColor",e.color),this.configuration.output===t.Highlight&&i(this.program,r),(this.configuration.output===t.Depth||r.multipassTerrainEnabled)&&this.program.setUniform2fv("nearFar",r.camera.nearFar),r.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",r.inverseViewport),o(this.program,r))}bindDraw(e){a(this.program,e),this.program.rebindTextures(),r(this.program,this.configuration,e)}_createPipeline(e,r){const i=this.configuration,o=e===h.NONE,s=e===h.FrontFace;return j({blending:i.output!==t.Color&&i.output!==t.Alpha||!i.transparent?null:o?m:f(e),culling:C(i.cullFace),depthTest:{func:g(e)},depthWrite:o||s?i.writeDepth&&E:null,colorWrite:x,stencilWrite:i.sceneHasOcludees?T:null,stencilTest:i.sceneHasOcludees?r?v:P:null,polygonOffset:o||s?i.polygonOffset&&w:b(i.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._createPipeline(this.configuration.transparencyPassType,!0),this._createPipeline(this.configuration.transparencyPassType,!1)}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}S.shader=new n(O,(()=>import("./ColorMaterial.glsl.js")));const w={factor:1,units:1};class F extends c{constructor(){super(...arguments),this.output=t.Color,this.cullFace=u.None,this.slicePlaneEnabled=!1,this.vertexColors=!1,this.transparent=!1,this.polygonOffset=!1,this.enableOffset=!0,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparencyPassType=h.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}e([p({count:t.COUNT})],F.prototype,"output",void 0),e([p({count:u.COUNT})],F.prototype,"cullFace",void 0),e([p()],F.prototype,"slicePlaneEnabled",void 0),e([p()],F.prototype,"vertexColors",void 0),e([p()],F.prototype,"transparent",void 0),e([p()],F.prototype,"polygonOffset",void 0),e([p()],F.prototype,"enableOffset",void 0),e([p()],F.prototype,"writeDepth",void 0),e([p()],F.prototype,"sceneHasOcludees",void 0),e([p({count:h.COUNT})],F.prototype,"transparencyPassType",void 0),e([p()],F.prototype,"multipassTerrainEnabled",void 0),e([p()],F.prototype,"cullAboveGround",void 0);export{S as ColorMaterialTechnique,F as ColorMaterialTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import"../../../ViewingMode.js";import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/Offset.glsl.js";import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import"../core/shaderLibrary/attributes/PositionAttribute.glsl.js";import"../core/shaderLibrary/attributes/SymbolColor.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/VerticalOffset.glsl.js";import"../core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/shading/Normals.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/HeaderComment.glsl.js";import"../core/shaderLibrary/util/MixExternalColor.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/basicInterfaces.js";export{b as build}from"../../../../chunks/DefaultMaterial.glsl.js";
5
+ import"../../../ViewingMode.js";import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/Offset.glsl.js";import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import"../core/shaderLibrary/attributes/PositionAttribute.glsl.js";import"../core/shaderLibrary/attributes/SymbolColor.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/VerticalOffset.glsl.js";import"../core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/shading/Normals.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/HeaderComment.glsl.js";import"../core/shaderLibrary/util/MixExternalColor.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/VertexAttribute.js";export{b as build}from"../../../../chunks/DefaultMaterial.glsl.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Logger.js";import{isSome as t}from"../../../../core/maybe.js";import{f as o}from"../../../../chunks/vec3f64.js";import{ShaderOutput as i}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniforms as s}from"../core/shaderLibrary/Slice.glsl.js";import{bindCustomOrigin as a}from"../core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as n}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as l}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{bindVerticalOffsetUniforms as p}from"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{bindOutputHighlight as c}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as u}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{Normals as h}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as d,bindPBRUniforms as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapViewCustomOrigin as f}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindVisualVariablesUniformsForSymbols as g}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{doublePrecisionRequiresObfuscation as v}from"../core/shaderLibrary/util/DoublePrecision.glsl.js";import{bindProjectionMatrix as b,bindViewCustomOrigin as y,bindCameraPosition as T}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as x}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as M}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as P,ShaderTechniqueConfiguration as S}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{AlphaDiscardMode as C,CullFaceOptions as O,TransparencyPassType as D}from"../lib/basicInterfaces.js";import{Default3D as A}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as j,oitBlending as w,oitDepthTest as N,getOITPolygonOffset as E}from"../lib/OrderIndependentTransparency.js";import{Program as U}from"../lib/Program.js";import{stencilWriteMaskOn as L,stencilToolMaskBaseParams as z,stencilBaseAllZerosParams as R}from"../lib/StencilUtils.js";import{colorMixModes as H,bindScreenSizePerspective as F}from"../materials/internal/MaterialUtil.js";import{D as B}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as I,cullingParams as k,defaultDepthWriteParams as q,defaultColorWriteParams as V}from"../../../webgl/renderState.js";const _=r.getLogger("esri.views.3d.webgl-engine.shaders.DefaultTechnique");class G extends M{initializeProgram(e){const r=G.shader.get(),t=this.configuration,o=r.build({OITEnabled:t.transparencyPassType===D.Color,output:t.output,viewingMode:e.viewingMode,receiveShadows:t.receiveShadows,slicePlaneEnabled:t.slicePlaneEnabled,sliceHighlightDisabled:t.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,symbolColor:t.symbolColors,vvSize:t.vvSize,vvColor:t.vvColor,vvInstancingEnabled:!0,instanced:t.instanced,instancedColor:t.instancedColor,instancedDoublePrecision:t.instancedDoublePrecision,pbrMode:t.usePBR?t.isSchematic?d.Schematic:d.Normal:d.Disabled,hasMetalnessAndRoughnessTexture:t.hasMetalnessAndRoughnessTexture,hasEmissionTexture:t.hasEmissionTexture,hasOcclusionTexture:t.hasOcclusionTexture,hasNormalTexture:t.hasNormalTexture,hasColorTexture:t.hasColorTexture,hasModelTransformation:t.hasModelTransformation,receiveAmbientOcclusion:t.receiveAmbientOcclusion,useCustomDTRExponentForWater:!1,normalType:t.normalsTypeDerivate?n.Type.ScreenDerivative:n.Type.Attribute,doubleSidedMode:t.doubleSidedMode,vertexTangents:t.vertexTangents,attributeTextureCoordinates:t.hasMetalnessAndRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture||t.hasColorTexture?l.AttributeType.Default:l.AttributeType.None,textureAlphaPremultiplied:t.textureAlphaPremultiplied,attributeColor:t.vertexColors,screenSizePerspectiveEnabled:t.screenSizePerspective,verticalOffsetEnabled:t.verticalOffset,offsetBackfaces:t.offsetBackfaces,doublePrecisionRequiresObfuscation:v(e.rctx),alphaDiscardMode:t.alphaDiscardMode,supportsTextureAtlas:!1,multipassTerrainEnabled:t.multipassTerrainEnabled,cullAboveGround:t.cullAboveGround});return new U(e.rctx,o,A)}bindPass(e,r){var o,s;b(this.program,r.camera.projectionMatrix);const a=this.configuration.output;this.configuration.hasModelTransformation&&(t(e.modelTransformation)?this.program.setUniformMatrix4fv("model",e.modelTransformation):_.warnOnce("hasModelTransformation true, but no modelTransformation found.")),(this.configuration.output===i.Depth||r.multipassTerrainEnabled||a===i.Shadow)&&this.program.setUniform2fv("cameraNearFar",r.camera.nearFar),r.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",r.inverseViewport),u(this.program,r)),a===i.Alpha&&(this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",H[e.colorMixMode])),a===i.Color?(r.lighting.setUniforms(this.program,!1),this.program.setUniform3fv("ambient",e.ambient),this.program.setUniform3fv("diffuse",e.diffuse),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",H[e.colorMixMode]),this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.configuration.usePBR&&m(this.program,e,this.configuration.isSchematic)):a===i.Highlight&&c(this.program,r),g(this.program,e),p(this.program,e,r),F(e.screenSizePerspective,this.program,"screenSizePerspectiveAlignment"),e.textureAlphaMode!==C.Mask&&e.textureAlphaMode!==C.MaskBlend||this.program.setUniform1f("textureAlphaCutoff",e.textureAlphaCutoff),null==(o=r.shadowMap)||o.bind(this.program),null==(s=r.ssaoHelper)||s.bind(this.program,r.camera)}bindDraw(e){const r=this.configuration.instancedDoublePrecision?o(e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]):e.origin;y(this.program,r,e.camera.viewMatrix),this.program.rebindTextures(),(this.configuration.output===i.Color||this.configuration.output===i.Alpha||this.configuration.output===i.Depth&&this.configuration.screenSizePerspective||this.configuration.output===i.Normal&&this.configuration.screenSizePerspective||this.configuration.output===i.Highlight&&this.configuration.screenSizePerspective)&&T(this.program,r,e.camera.viewInverseTransposeMatrix),this.configuration.output===i.Normal&&this.program.setUniformMatrix4fv("viewNormal",e.camera.viewInverseTransposeMatrix),this.configuration.instancedDoublePrecision&&a(this.program,r),s(this.program,this.configuration,e.slicePlane,r),this.configuration.output===i.Color&&f(this.program,e,r)}_setPipeline(e,r){const t=this.configuration,o=e===D.NONE,s=e===D.FrontFace;return I({blending:t.output!==i.Color&&t.output!==i.Alpha||!t.transparent?null:o?j:w(e),culling:W(t)&&k(t.cullFace),depthTest:{func:N(e)},depthWrite:o||s?t.writeDepth&&q:null,colorWrite:V,stencilWrite:t.sceneHasOcludees?L:null,stencilTest:t.sceneHasOcludees?r?z:R:null,polygonOffset:o||s?null:E(t.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipeline(this.configuration.transparencyPassType,!0),this._setPipeline(this.configuration.transparencyPassType,!1)}getPipelineState(e,r){return r?this._occludeePipelineState:super.getPipelineState(e,r)}}function W(e){return e.cullFace?e.cullFace!==O.None:!e.slicePlaneEnabled&&(!e.transparent&&!e.doubleSidedMode)}G.shader=new x(B,(()=>import("./DefaultMaterial.glsl.js")));class J extends S{constructor(){super(...arguments),this.output=i.Color,this.alphaDiscardMode=C.Opaque,this.doubleSidedMode=h.DoubleSidedMode.None,this.isSchematic=!1,this.vertexColors=!1,this.offsetBackfaces=!1,this.symbolColors=!1,this.vvSize=!1,this.vvColor=!1,this.verticalOffset=!1,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.sliceHighlightDisabled=!1,this.receiveAmbientOcclusion=!1,this.screenSizePerspective=!1,this.textureAlphaPremultiplied=!1,this.hasColorTexture=!1,this.usePBR=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.instanced=!1,this.instancedColor=!1,this.instancedDoublePrecision=!1,this.vertexTangents=!1,this.normalsTypeDerivate=!1,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparent=!1,this.enableOffset=!0,this.cullFace=O.None,this.transparencyPassType=D.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1,this.hasModelTransformation=!1}}e([P({count:i.COUNT})],J.prototype,"output",void 0),e([P({count:C.COUNT})],J.prototype,"alphaDiscardMode",void 0),e([P({count:h.DoubleSidedMode.COUNT})],J.prototype,"doubleSidedMode",void 0),e([P()],J.prototype,"isSchematic",void 0),e([P()],J.prototype,"vertexColors",void 0),e([P()],J.prototype,"offsetBackfaces",void 0),e([P()],J.prototype,"symbolColors",void 0),e([P()],J.prototype,"vvSize",void 0),e([P()],J.prototype,"vvColor",void 0),e([P()],J.prototype,"verticalOffset",void 0),e([P()],J.prototype,"receiveShadows",void 0),e([P()],J.prototype,"slicePlaneEnabled",void 0),e([P()],J.prototype,"sliceHighlightDisabled",void 0),e([P()],J.prototype,"receiveAmbientOcclusion",void 0),e([P()],J.prototype,"screenSizePerspective",void 0),e([P()],J.prototype,"textureAlphaPremultiplied",void 0),e([P()],J.prototype,"hasColorTexture",void 0),e([P()],J.prototype,"usePBR",void 0),e([P()],J.prototype,"hasMetalnessAndRoughnessTexture",void 0),e([P()],J.prototype,"hasEmissionTexture",void 0),e([P()],J.prototype,"hasOcclusionTexture",void 0),e([P()],J.prototype,"hasNormalTexture",void 0),e([P()],J.prototype,"instanced",void 0),e([P()],J.prototype,"instancedColor",void 0),e([P()],J.prototype,"instancedDoublePrecision",void 0),e([P()],J.prototype,"vertexTangents",void 0),e([P()],J.prototype,"normalsTypeDerivate",void 0),e([P()],J.prototype,"writeDepth",void 0),e([P()],J.prototype,"sceneHasOcludees",void 0),e([P()],J.prototype,"transparent",void 0),e([P()],J.prototype,"enableOffset",void 0),e([P({count:O.COUNT})],J.prototype,"cullFace",void 0),e([P({count:D.COUNT})],J.prototype,"transparencyPassType",void 0),e([P()],J.prototype,"multipassTerrainEnabled",void 0),e([P()],J.prototype,"cullAboveGround",void 0),e([P()],J.prototype,"hasModelTransformation",void 0);export{G as DefaultMaterialTechnique,J as DefaultMaterialTechniqueConfiguration};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Logger.js";import{isSome as t}from"../../../../core/maybe.js";import{f as o}from"../../../../chunks/vec3f64.js";import{ShaderOutput as i}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniforms as s}from"../core/shaderLibrary/Slice.glsl.js";import{bindCustomOrigin as a}from"../core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttributeType as n}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttributeType as l}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{bindVerticalOffsetUniforms as p}from"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{bindOutputHighlight as c}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as u}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{NormalsDoubleSidedMode as h}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as d,bindPBRUniforms as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapViewCustomOrigin as f}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindVisualVariablesUniformsForSymbols as g}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{doublePrecisionRequiresObfuscation as v}from"../core/shaderLibrary/util/DoublePrecision.glsl.js";import{bindProjectionMatrix as b,bindViewCustomOrigin as y,bindCameraPosition as T}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as x}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as M}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as P,ShaderTechniqueConfiguration as C}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{AlphaDiscardMode as S,CullFaceOptions as O,TransparencyPassType as D}from"../lib/basicInterfaces.js";import{Default3D as j}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as A,oitBlending as w,oitDepthTest as E,getOITPolygonOffset as N}from"../lib/OrderIndependentTransparency.js";import{Program as U}from"../lib/Program.js";import{stencilWriteMaskOn as L,stencilToolMaskBaseParams as z,stencilBaseAllZerosParams as R}from"../lib/StencilUtils.js";import{colorMixModes as H,bindScreenSizePerspective as F}from"../materials/internal/MaterialUtil.js";import{D as B}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as k,cullingParams as I,defaultDepthWriteParams as q,defaultColorWriteParams as V}from"../../../webgl/renderState.js";const _=r.getLogger("esri.views.3d.webgl-engine.shaders.DefaultTechnique");class G extends M{initializeProgram(e){const r=G.shader.get(),t=this.configuration,o=r.build({oitEnabled:t.transparencyPassType===D.Color,output:t.output,viewingMode:e.viewingMode,receiveShadows:t.receiveShadows,slicePlaneEnabled:t.slicePlaneEnabled,sliceHighlightDisabled:t.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,symbolColor:t.symbolColors,vvSize:t.vvSize,vvColor:t.vvColor,vvInstancingEnabled:!0,instanced:t.instanced,instancedColor:t.instancedColor,instancedDoublePrecision:t.instancedDoublePrecision,pbrMode:t.usePBR?t.isSchematic?d.Schematic:d.Normal:d.Disabled,hasMetalnessAndRoughnessTexture:t.hasMetalnessAndRoughnessTexture,hasEmissionTexture:t.hasEmissionTexture,hasOcclusionTexture:t.hasOcclusionTexture,hasNormalTexture:t.hasNormalTexture,hasColorTexture:t.hasColorTexture,hasModelTransformation:t.hasModelTransformation,receiveAmbientOcclusion:t.receiveAmbientOcclusion,useCustomDTRExponentForWater:!1,normalType:t.normalsTypeDerivate?n.ScreenDerivative:n.Attribute,doubleSidedMode:t.doubleSidedMode,vertexTangents:t.vertexTangents,attributeTextureCoordinates:t.hasMetalnessAndRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture||t.hasColorTexture?l.Default:l.None,textureAlphaPremultiplied:t.textureAlphaPremultiplied,attributeColor:t.vertexColors,screenSizePerspectiveEnabled:t.screenSizePerspective,verticalOffsetEnabled:t.verticalOffset,offsetBackfaces:t.offsetBackfaces,doublePrecisionRequiresObfuscation:v(e.rctx),alphaDiscardMode:t.alphaDiscardMode,supportsTextureAtlas:!1,multipassTerrainEnabled:t.multipassTerrainEnabled,cullAboveGround:t.cullAboveGround});return new U(e.rctx,o,j)}bindPass(e,r){var o,s;b(this.program,r.camera.projectionMatrix);const a=this.configuration.output;this.configuration.hasModelTransformation&&(t(e.modelTransformation)?this.program.setUniformMatrix4fv("model",e.modelTransformation):_.warnOnce("hasModelTransformation true, but no modelTransformation found.")),(this.configuration.output===i.Depth||r.multipassTerrainEnabled||a===i.Shadow)&&this.program.setUniform2fv("nearFar",r.camera.nearFar),r.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",r.inverseViewport),u(this.program,r)),a===i.Alpha&&(this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",H[e.colorMixMode])),a===i.Color?(r.lighting.setUniforms(this.program,!1),this.program.setUniform3fv("ambient",e.ambient),this.program.setUniform3fv("diffuse",e.diffuse),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",H[e.colorMixMode]),this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.configuration.usePBR&&m(this.program,e,this.configuration.isSchematic)):a===i.Highlight&&c(this.program,r),g(this.program,e),p(this.program,e,r),F(e.screenSizePerspective,this.program,"screenSizePerspectiveAlignment"),e.textureAlphaMode!==S.Mask&&e.textureAlphaMode!==S.MaskBlend||this.program.setUniform1f("textureAlphaCutoff",e.textureAlphaCutoff),null==(o=r.shadowMap)||o.bind(this.program),null==(s=r.ssaoHelper)||s.bind(this.program,r.camera)}bindDraw(e){const r=this.configuration.instancedDoublePrecision?o(e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]):e.origin;y(this.program,r,e.camera.viewMatrix),this.program.rebindTextures(),(this.configuration.output===i.Color||this.configuration.output===i.Alpha||this.configuration.output===i.Depth&&this.configuration.screenSizePerspective||this.configuration.output===i.Normal&&this.configuration.screenSizePerspective||this.configuration.output===i.Highlight&&this.configuration.screenSizePerspective)&&T(this.program,r,e.camera.viewInverseTransposeMatrix),this.configuration.output===i.Normal&&this.program.setUniformMatrix4fv("viewNormal",e.camera.viewInverseTransposeMatrix),this.configuration.instancedDoublePrecision&&a(this.program,r),s(this.program,this.configuration,e.slicePlane,r),this.configuration.output===i.Color&&f(this.program,e,r)}_setPipeline(e,r){const t=this.configuration,o=e===D.NONE,s=e===D.FrontFace;return k({blending:t.output!==i.Color&&t.output!==i.Alpha||!t.transparent?null:o?A:w(e),culling:W(t)&&I(t.cullFace),depthTest:{func:E(e)},depthWrite:o||s?t.writeDepth&&q:null,colorWrite:V,stencilWrite:t.sceneHasOcludees?L:null,stencilTest:t.sceneHasOcludees?r?z:R:null,polygonOffset:o||s?null:N(t.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipeline(this.configuration.transparencyPassType,!0),this._setPipeline(this.configuration.transparencyPassType,!1)}getPipelineState(e,r){return r?this._occludeePipelineState:super.getPipelineState(e,r)}}function W(e){return e.cullFace?e.cullFace!==O.None:!e.slicePlaneEnabled&&(!e.transparent&&!e.doubleSidedMode)}G.shader=new x(B,(()=>import("./DefaultMaterial.glsl.js")));class J extends C{constructor(){super(...arguments),this.output=i.Color,this.alphaDiscardMode=S.Opaque,this.doubleSidedMode=h.None,this.isSchematic=!1,this.vertexColors=!1,this.offsetBackfaces=!1,this.symbolColors=!1,this.vvSize=!1,this.vvColor=!1,this.verticalOffset=!1,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.sliceHighlightDisabled=!1,this.receiveAmbientOcclusion=!1,this.screenSizePerspective=!1,this.textureAlphaPremultiplied=!1,this.hasColorTexture=!1,this.usePBR=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.instanced=!1,this.instancedColor=!1,this.instancedDoublePrecision=!1,this.vertexTangents=!1,this.normalsTypeDerivate=!1,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparent=!1,this.enableOffset=!0,this.cullFace=O.None,this.transparencyPassType=D.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1,this.hasModelTransformation=!1}}e([P({count:i.COUNT})],J.prototype,"output",void 0),e([P({count:S.COUNT})],J.prototype,"alphaDiscardMode",void 0),e([P({count:h.COUNT})],J.prototype,"doubleSidedMode",void 0),e([P()],J.prototype,"isSchematic",void 0),e([P()],J.prototype,"vertexColors",void 0),e([P()],J.prototype,"offsetBackfaces",void 0),e([P()],J.prototype,"symbolColors",void 0),e([P()],J.prototype,"vvSize",void 0),e([P()],J.prototype,"vvColor",void 0),e([P()],J.prototype,"verticalOffset",void 0),e([P()],J.prototype,"receiveShadows",void 0),e([P()],J.prototype,"slicePlaneEnabled",void 0),e([P()],J.prototype,"sliceHighlightDisabled",void 0),e([P()],J.prototype,"receiveAmbientOcclusion",void 0),e([P()],J.prototype,"screenSizePerspective",void 0),e([P()],J.prototype,"textureAlphaPremultiplied",void 0),e([P()],J.prototype,"hasColorTexture",void 0),e([P()],J.prototype,"usePBR",void 0),e([P()],J.prototype,"hasMetalnessAndRoughnessTexture",void 0),e([P()],J.prototype,"hasEmissionTexture",void 0),e([P()],J.prototype,"hasOcclusionTexture",void 0),e([P()],J.prototype,"hasNormalTexture",void 0),e([P()],J.prototype,"instanced",void 0),e([P()],J.prototype,"instancedColor",void 0),e([P()],J.prototype,"instancedDoublePrecision",void 0),e([P()],J.prototype,"vertexTangents",void 0),e([P()],J.prototype,"normalsTypeDerivate",void 0),e([P()],J.prototype,"writeDepth",void 0),e([P()],J.prototype,"sceneHasOcludees",void 0),e([P()],J.prototype,"transparent",void 0),e([P()],J.prototype,"enableOffset",void 0),e([P({count:O.COUNT})],J.prototype,"cullFace",void 0),e([P({count:D.COUNT})],J.prototype,"transparencyPassType",void 0),e([P()],J.prototype,"multipassTerrainEnabled",void 0),e([P()],J.prototype,"cullAboveGround",void 0),e([P()],J.prototype,"hasModelTransformation",void 0);export{G as DefaultMaterialTechnique,J as DefaultMaterialTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../chunks/vec2.js";import"../../../../chunks/vec2f64.js";import"../../../../chunks/vec4f64.js";import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/hud/AlignPixel.glsl.js";import"../core/shaderLibrary/hud/HUD.glsl.js";import"../core/shaderLibrary/hud/HUDOcclusionPass.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/basicInterfaces.js";export{b as bindHUDMaterialUniforms,a as build,c as calculateAnchorPosForRendering}from"../../../../chunks/HUDMaterial.glsl.js";
5
+ import"../../../../chunks/vec2.js";import"../../../../chunks/vec2f64.js";import"../../../../chunks/vec4f64.js";import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/hud/AlignPixel.glsl.js";import"../core/shaderLibrary/hud/HUD.glsl.js";import"../core/shaderLibrary/hud/HUDOcclusionPass.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/VertexAttribute.js";export{b as bindHUDMaterialUniforms,a as build,c as calculateAnchorPosForRendering}from"../../../../chunks/HUDMaterial.glsl.js";