@arcgis/core 4.32.0-next.20250203 → 4.32.0-next.20250205

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 (242) hide show
  1. package/WebScene.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{d3a8aabdbfb59dd433e3.js → 01c3507d78398baaf61b.js} +1 -1
  4. package/assets/esri/core/workers/chunks/06f693780f70e5a627c4.js +1 -0
  5. package/assets/esri/core/workers/chunks/1a2e1a414e651e988435.js +2 -0
  6. package/assets/esri/core/workers/chunks/{bf9bc52a3c559108c19a.js.LICENSE.txt → 1a2e1a414e651e988435.js.LICENSE.txt} +1 -1
  7. package/assets/esri/core/workers/chunks/{6e25742ceedea7fb1b97.js → 287362f9af132fafe4de.js} +1 -1
  8. package/assets/esri/core/workers/chunks/308ec51ff4a66f7fcb0d.js.LICENSE.txt +1 -1
  9. package/assets/esri/core/workers/chunks/354531dc2f0dea2ad96f.js +2 -0
  10. package/assets/esri/core/workers/chunks/{6e8905f20101c1f4509d.js.LICENSE.txt → 354531dc2f0dea2ad96f.js.LICENSE.txt} +1 -1
  11. package/assets/esri/core/workers/chunks/41cd1a5c99ab3bbd1fb4.js +1 -0
  12. package/assets/esri/core/workers/chunks/44abd2cd17aae3299ede.js +1 -0
  13. package/assets/esri/core/workers/chunks/{adfa126cea32298c28e9.js → 48ecc5a74fecbb2b9c6f.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{af2a70d33afb12bb536f.js → 4d0a6ccb8434f8898377.js} +44 -44
  15. package/assets/esri/core/workers/chunks/{e9f0402fa3ac5a249807.js → 5196c43dbce48d1b81ae.js} +1 -1
  16. package/assets/esri/core/workers/chunks/568bcf809fcfd4d9c713.js +1 -0
  17. package/assets/esri/core/workers/chunks/{f2fae056a81f12b56b04.js → 5e7f16b312077ca8c18d.js} +1 -1
  18. package/assets/esri/core/workers/chunks/61243217aed5de012e93.js +1 -0
  19. package/assets/esri/core/workers/chunks/6d5bfcc7856cafe7b043.js +2 -0
  20. package/assets/esri/core/workers/chunks/{7d3a441d2eb18d709ef9.js.LICENSE.txt → 6d5bfcc7856cafe7b043.js.LICENSE.txt} +1 -1
  21. package/assets/esri/core/workers/chunks/72cf9192292e5c85c6df.js.LICENSE.txt +1 -1
  22. package/assets/esri/core/workers/chunks/73d03c208242778e67bf.js +1 -0
  23. package/assets/esri/core/workers/chunks/{bc50585615f07d5ec1a9.js → 746c964cf07e4306f21f.js} +1 -1
  24. package/assets/esri/core/workers/chunks/77764ca90bdd13ee2167.js +2 -0
  25. package/assets/esri/core/workers/chunks/{25c8cc30faade043c8dc.js.LICENSE.txt → 77764ca90bdd13ee2167.js.LICENSE.txt} +1 -1
  26. package/assets/esri/core/workers/chunks/{07360fde6ea65664e6ca.js → 82d26884127ed772cc4b.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{ba3c18d1efde46461231.js → 8438fba57e82e4cc7c11.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{d1678945cf6a58f76863.js → 858b191c078d04232342.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{0ef5b0f8aa8a09acd6e0.js → 8e90c5fee4ad7c7275dc.js} +1 -1
  30. package/assets/esri/core/workers/chunks/918bdba41fa470cf77fd.js +1 -0
  31. package/assets/esri/core/workers/chunks/{3ec51b75d1a86dad6cb1.js → 91d2bdfa6e34c10b7f50.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{12dd892cf61a76fb40ad.js → 991e0f619f1f81f94d56.js} +1 -1
  33. package/assets/esri/core/workers/chunks/9a27824d94df702e6e28.js +1 -0
  34. package/assets/esri/core/workers/chunks/9a2d7c98fa0c4f8a9fd5.js +314 -0
  35. package/assets/esri/core/workers/chunks/a2409d4921c02614169a.js +1 -0
  36. package/assets/esri/core/workers/chunks/{7810579a5a780933cdc9.js → ad3e692681b50bd1acc2.js} +1 -1
  37. package/assets/esri/core/workers/chunks/b21b152fa15896577242.js.LICENSE.txt +1 -1
  38. package/assets/esri/core/workers/chunks/{c7a94e569c905f97244a.js → b33122adfd1fb68f7c0f.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{da77eefaad83c0644380.js → b8fae500c69ca2cff62a.js} +1 -1
  40. package/assets/esri/core/workers/chunks/b9d9a1dc3c5d799e2685.js +1 -0
  41. package/assets/esri/core/workers/chunks/{79afe4674a0557eb26e4.js → bf26f58210755875748c.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{5adeb979f178944b9ce5.js → c4c2b94e5cee7b824093.js} +1 -1
  43. package/assets/esri/core/workers/chunks/c7b6f237efaab333459e.js +1 -0
  44. package/assets/esri/core/workers/chunks/{3e872e5e528dca7bee0c.js → cc75bbfd779f409943a3.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{4c5279fedf982a174706.js → d175953337fa655dc6b0.js} +1 -1
  46. package/assets/esri/core/workers/chunks/d35efcbe439500bf18bc.js +1 -0
  47. package/assets/esri/core/workers/chunks/d3d1dcb440588a295eba.js +1 -0
  48. package/assets/esri/core/workers/chunks/e26dc0c1654316bb1558.js +1 -0
  49. package/assets/esri/core/workers/chunks/{448ee44c7f594e5b2551.js → e410a09650530d7aad10.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{2345344be4b0e487d3a6.js → f198f4ba7d3d52882d98.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{881ddbdeb40336208e90.js → f29715459ecd46180829.js} +1 -1
  52. package/assets/esri/core/workers/chunks/f4e48bbdbc9da10ec71a.js +1 -0
  53. package/assets/esri/themes/base/widgets/_Directions.scss +74 -17
  54. package/assets/esri/themes/dark/main.css +1 -1
  55. package/assets/esri/themes/light/main.css +1 -1
  56. package/assets/esri/themes/light/view.css +1 -1
  57. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  58. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  59. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  60. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  61. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  62. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  63. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  64. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  65. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  66. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  67. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  68. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  69. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  70. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  71. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  72. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  73. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  74. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  75. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  76. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  77. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  78. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  79. package/assets/esri/widgets/Directions/t9n/Directions_no.json +1 -1
  80. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  81. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  82. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  83. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  84. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  85. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  86. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  87. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  88. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  89. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  90. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  91. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  92. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  93. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  94. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  95. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  96. package/chunks/ColorMaterial.glsl.js +4 -5
  97. package/chunks/ComponentShader.glsl.js +30 -30
  98. package/chunks/DefaultMaterial.glsl.js +19 -19
  99. package/chunks/HUDMaterial.glsl.js +34 -34
  100. package/chunks/MeasurementArrow.glsl.js +6 -6
  101. package/chunks/NativeLine.glsl.js +4 -4
  102. package/chunks/Pattern.glsl.js +1 -1
  103. package/chunks/QuadraticBezier.js +1 -1
  104. package/chunks/RealisticTree.glsl.js +14 -14
  105. package/chunks/RibbonLine.glsl.js +32 -32
  106. package/chunks/Terrain.glsl.js +31 -31
  107. package/chunks/WaterSurface.glsl.js +15 -15
  108. package/copyright.txt +0 -29
  109. package/core/Collection.js +1 -1
  110. package/core/has.js +1 -1
  111. package/geometry/operators/projectOperator.js +1 -1
  112. package/geometry/operators/shapePreservingProjectOperator.js +1 -1
  113. package/geometry/support/centroid.js +1 -1
  114. package/interfaces.d.ts +120 -13
  115. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  116. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  117. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  118. package/layers/mixins/ArcGISImageService.js +1 -1
  119. package/layers/mixins/ImageryTileMixin.js +1 -1
  120. package/layers/ogc/wcsUtils.js +1 -1
  121. package/layers/support/RasterFunctionTemplate.js +1 -1
  122. package/layers/support/Sublayer.js +1 -1
  123. package/layers/support/capabilities.js +1 -1
  124. package/layers/support/featureLayerUtils.js +1 -1
  125. package/layers/support/labelUtils.js +1 -1
  126. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  127. package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
  128. package/layers/support/rasterDatasets/multipartParser.js +1 -1
  129. package/layers/support/rasterDatasets/wcsCapabilitiesParser.js +1 -1
  130. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  131. package/package.json +4 -5
  132. package/popup/content/AttachmentsContent.js +1 -1
  133. package/popup/support/AttachmentsOrderByInfo.d.ts +4 -0
  134. package/popup/support/AttachmentsOrderByInfo.js +5 -0
  135. package/portal/schemas/definitions.js +1 -1
  136. package/rest/imageService/fetchRasterInfo.js +1 -1
  137. package/rest/query/operations/queryAttachments.js +1 -1
  138. package/rest/support/AttachmentQuery.js +1 -1
  139. package/support/revision.js +1 -1
  140. package/support/timeUtils.d.ts +0 -1
  141. package/support/timeUtils.js +1 -1
  142. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  143. package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
  144. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedShader.js +1 -1
  145. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  146. package/views/2d/engine/webgl/shaderGraph/techniques/line/gradientStrokeConstants.js +1 -1
  147. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
  148. package/views/2d/engine/webgl/util/LabelMatcher.js +1 -1
  149. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  150. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  151. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  152. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  153. package/views/2d/layers/LayerView2D.js +1 -1
  154. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  155. package/views/2d/layers/TileLayerView2D.js +1 -1
  156. package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
  157. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  158. package/views/2d/layers/support/util.js +1 -1
  159. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  160. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  161. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  162. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  163. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  164. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  165. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  166. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  167. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  168. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  169. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  170. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  171. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  172. package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
  173. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  174. package/views/3d/terrain/PatchRenderData.js +1 -1
  175. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  176. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  177. package/views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js +3 -3
  178. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  179. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  180. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  181. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  182. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  183. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  184. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  185. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  186. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  187. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  188. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  189. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  190. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  191. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  192. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  193. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  194. package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
  195. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
  196. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +8 -8
  197. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  198. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  199. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  200. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  201. package/views/layers/FeatureLayerView.js +1 -1
  202. package/views/layers/ImageryTileLayerView.d.ts +4 -0
  203. package/views/layers/ImageryTileLayerView.js +1 -1
  204. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  205. package/webscene/spec-certification/index.js +1 -1
  206. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  207. package/widgets/BasemapLayerList.js +1 -1
  208. package/widgets/Directions/DirectionsViewModel.js +1 -1
  209. package/widgets/Directions.js +1 -1
  210. package/widgets/Editor/UpdateWorkflow.js +1 -1
  211. package/widgets/Editor/support/EditorItem.js +1 -1
  212. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  213. package/widgets/Feature/FeatureViewModel.js +1 -1
  214. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  215. package/widgets/LayerList.js +1 -1
  216. package/widgets/Legend/LegendViewModel.js +1 -1
  217. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  218. package/widgets/Legend.js +1 -1
  219. package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
  220. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  221. package/widgets/support/geolocationUtils.js +1 -1
  222. package/assets/esri/core/workers/chunks/06d72622590dbd38c5de.js +0 -1
  223. package/assets/esri/core/workers/chunks/0a19e1aec6a5502e391a.js +0 -1
  224. package/assets/esri/core/workers/chunks/12964a4b16113cdc9c93.js +0 -1
  225. package/assets/esri/core/workers/chunks/1e3ab66d0e8a7f160f33.js +0 -1
  226. package/assets/esri/core/workers/chunks/25c8cc30faade043c8dc.js +0 -2
  227. package/assets/esri/core/workers/chunks/34d464dacee52739c98c.js +0 -1
  228. package/assets/esri/core/workers/chunks/402de76b5de05615e111.js +0 -1
  229. package/assets/esri/core/workers/chunks/4263eee3247aaf4e64bf.js +0 -1
  230. package/assets/esri/core/workers/chunks/4cab082b8432ddc05345.js +0 -1
  231. package/assets/esri/core/workers/chunks/613db14d698741886753.js +0 -1
  232. package/assets/esri/core/workers/chunks/6e8905f20101c1f4509d.js +0 -2
  233. package/assets/esri/core/workers/chunks/7d3a441d2eb18d709ef9.js +0 -2
  234. package/assets/esri/core/workers/chunks/ba37ab9e560644dc1f18.js +0 -1
  235. package/assets/esri/core/workers/chunks/bf9bc52a3c559108c19a.js +0 -2
  236. package/assets/esri/core/workers/chunks/c4b0e3f7dcad6c7ea620.js +0 -314
  237. package/assets/esri/core/workers/chunks/c74441fbe0f63633796f.js +0 -1
  238. package/assets/esri/core/workers/chunks/dd46ec81cebe1a0a7b9c.js +0 -1
  239. package/assets/esri/core/workers/chunks/e444ec05a8a1dfbd21a8.js +0 -1
  240. package/assets/esri/core/workers/chunks/f8367c21fa91435c7c53.js +0 -1
  241. package/assets/esri/core/workers/chunks/ffa2b9d70830aed03a8f.js +0 -1
  242. /package/{views/3d/webgl-engine/core/shaderLibrary/util → webscene/support}/AlphaCutoff.js +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{p as e,i as r,c as t,n as i,d as s,l as a,h as o,f as n,q as c}from"../../../../chunks/vec32.js";import{ZEROS as l,create as u,fromValues as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ViewingMode as f}from"../../../ViewingMode.js";import{newLayout as m}from"../../support/buffer/InterleavedLayout.js";import{is3DGeometryOutputMRT as p,isShadowRelatedOutput as d,is3DGeometryOutput as g,ShaderOutput as T,isColorOrColorEmission as x}from"../core/shaderLibrary/ShaderOutput.js";import{NormalType as _}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as v}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as b}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as S}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{alphaCutoff as O}from"../core/shaderLibrary/util/AlphaCutoff.js";import{olidEnabled as M}from"../effects/geometry/olidUtils.js";import{CullFaceOptions as w}from"../lib/basicInterfaces.js";import{GLTextureMaterial as R}from"../lib/GLTextureMaterial.js";import{Material as y}from"../lib/Material.js";import{OITPolygonOffsetLimit as C}from"../lib/OrderIndependentTransparency.js";import{intersectTriangleGeometry as A}from"../lib/RayIntersections.js";import{RenderSlot as I}from"../lib/RenderSlot.js";import{VertexAttribute as P}from"../lib/VertexAttribute.js";import{getVerticalOffsetObject3D as j}from"../lib/verticalOffsetUtils.js";import{DefaultBufferWriter as L}from"./DefaultBufferWriter.js";import{verticalOffsetAtDistance as D}from"./internal/MaterialUtil.js";import{DefaultMaterialTechnique as N,DefaultMaterialPassParameters as E}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as V}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as B}from"../shaders/RealisticTreeTechnique.js";class z extends y{constructor(e,r){super(e,U),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[I.OPAQUE_MATERIAL,e=>(p(e)||d(e))&&!this.parameters.transparent],[I.TRANSPARENT_MATERIAL,e=>(p(e)||d(e))&&this.parameters.transparent&&this.parameters.writeDepth],[I.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>(g(e)||d(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=k(this.parameters),this._configuration=new V(r.spherical,r.doublePrecisionRequiresObfuscation)}isVisibleForOutput(e){return e!==T.Shadow&&e!==T.ShadowExcludeHighlight&&e!==T.ShadowHighlight||this.parameters.castShadows}get visible(){const e=this.parameters;if(e.layerOpacity<O)return!1;const{hasInstancedColor:r,hasVertexColors:t,hasSymbolColors:i,vvColor:s}=e,a=r||s||i,o="replace"===e.colorMixMode,n=e.opacity>=O;if(t&&a)return o||n;const c=e.externalColor&&e.externalColor[3]>=O;return t?o?c:n:a?o||n:o?c:n}get hasEmissions(){return!!this.parameters.emissiveTextureId||!e(this.parameters.emissiveFactor,l)}getConfiguration(e,r){const t=this.parameters,{treeRendering:i,doubleSided:s,doubleSidedType:a}=t;return this._configuration.output=e,this._configuration.hasNormalTexture=!i&&!!t.normalTextureId,this._configuration.hasColorTexture=!!t.textureId,this._configuration.hasVertexTangents=!i&&t.hasVertexTangents,this._configuration.instanced=t.isInstanced,this._configuration.instancedDoublePrecision=t.instancedDoublePrecision,this._configuration.vvSize=!!t.vvSize,this._configuration.hasVerticalOffset=null!=t.verticalOffset,this._configuration.hasScreenSizePerspective=null!=t.screenSizePerspective,this._configuration.hasSlicePlane=t.hasSlicePlane,this._configuration.alphaDiscardMode=t.textureAlphaMode,this._configuration.normalType=i?_.Attribute:t.normalType,this._configuration.transparent=t.transparent,this._configuration.writeDepth=t.writeDepth,null!=t.customDepthTest&&(this._configuration.customDepthTest=t.customDepthTest),this._configuration.hasOccludees=r.hasOccludees,this._configuration.cullFace=t.hasSlicePlane?w.None:t.cullFace,this._configuration.cullAboveTerrain=r.cullAboveTerrain,this._configuration.hasModelTransformation=!i&&null!=t.modelTransformation,this._configuration.hasVertexColors=t.hasVertexColors,this._configuration.hasSymbolColors=t.hasSymbolColors,this._configuration.doubleSidedMode=i?b.WindingOrder:s&&"normal"===a?b.View:s&&"winding-order"===a?b.WindingOrder:b.None,this._configuration.instancedColor=t.hasInstancedColor,x(e)?(this._configuration.terrainDepthTest=r.terrainDepthTest,this._configuration.receiveShadows=t.receiveShadows,this._configuration.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=r.ssao):(this._configuration.terrainDepthTest=!1,this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1),this._configuration.vvColor=!!t.vvColor,this._configuration.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,this._configuration.pbrMode=t.usePBR?t.isSchematic?S.Schematic:S.Normal:S.Disabled,this._configuration.hasMetallicRoughnessTexture=!i&&!!t.metallicRoughnessTextureId,this._configuration.emissionSource=i?v.None:null!=t.emissiveTextureId?v.Texture:t.usePBR?v.Value:v.None,this._configuration.hasOcclusionTexture=!i&&!!t.occlusionTextureId,this._configuration.offsetBackfaces=!(!t.transparent||!t.offsetTransparentBackfaces),this._configuration.oitPass=r.oitPass,this._configuration.enableOffset=r.camera.relativeElevation<C,this._configuration.snowCover=W(r),this._configuration.hasColorTextureTransform=!!t.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix,this._configuration}intersect(e,l,u,h,m,p){if(null!=this.parameters.verticalOffset){const e=u.camera;r(Q,l[12],l[13],l[14]);let p=null;switch(u.viewingMode){case f.Global:p=i(Y,Q);break;case f.Local:p=t(Y,H)}let d=0;const g=s(K,Q,e.eye),T=a(g),x=o(g,g,1/T);let _=null;this.parameters.screenSizePerspective&&(_=n(p,x)),d+=D(e,T,this.parameters.verticalOffset,_??0,this.parameters.screenSizePerspective),o(p,p,d),c(J,p,u.transform.inverseRotation),h=s(F,h,J),m=s(G,m,J)}A(e,u,h,m,j(u.verticalOffset),p)}createGLMaterial(e){return new q(e)}createBufferWriter(){return new L(this._vertexBufferLayout)}}class q extends R{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const i=e.camera.viewInverseTransposeMatrix;return r(t.origin,i[3],i[7],i[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?B:N,e)}}class U extends E{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}}function W(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}function k(e){const r=m().vec3f(P.POSITION);e.normalType===_.Compressed?r.vec2i16(P.NORMALCOMPRESSED,{glNormalized:!0}):r.vec3f(P.NORMAL),e.hasVertexTangents&&r.vec4f(P.TANGENT);return(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&r.vec2f(P.UV0),e.hasVertexColors&&r.vec4u8(P.COLOR),e.hasSymbolColors&&r.vec4u8(P.SYMBOLCOLOR),M()&&r.vec4u8(P.OBJECTANDLAYERIDCOLOR),r}const F=u(),G=u(),H=h(0,0,1),Y=u(),J=u(),Q=u(),K=u();export{q as DefaultGLMaterial,z as DefaultMaterial,U as DefaultMaterialParameters};
5
+ import{p as e,i as r,c as t,n as i,d as s,l as a,h as o,f as n,q as c}from"../../../../chunks/vec32.js";import{ZEROS as l,create as u,fromValues as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ViewingMode as f}from"../../../ViewingMode.js";import{newLayout as m}from"../../support/buffer/InterleavedLayout.js";import{is3DGeometryOutputMRT as p,isShadowRelatedOutput as d,is3DGeometryOutput as g,ShaderOutput as T,isColorOrColorEmission as x}from"../core/shaderLibrary/ShaderOutput.js";import{NormalType as _}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as v}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as b}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as S}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as O}from"../effects/geometry/olidUtils.js";import{CullFaceOptions as M}from"../lib/basicInterfaces.js";import{GLTextureMaterial as w}from"../lib/GLTextureMaterial.js";import{Material as R}from"../lib/Material.js";import{OITPolygonOffsetLimit as C}from"../lib/OrderIndependentTransparency.js";import{intersectTriangleGeometry as y}from"../lib/RayIntersections.js";import{RenderSlot as A}from"../lib/RenderSlot.js";import{VertexAttribute as I}from"../lib/VertexAttribute.js";import{getVerticalOffsetObject3D as P}from"../lib/verticalOffsetUtils.js";import{DefaultBufferWriter as j}from"./DefaultBufferWriter.js";import{verticalOffsetAtDistance as D}from"./internal/MaterialUtil.js";import{DefaultMaterialTechnique as L,DefaultMaterialPassParameters as N}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as E}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as V}from"../shaders/RealisticTreeTechnique.js";import{alphaCutoff as B}from"../../../../webscene/support/AlphaCutoff.js";class z extends R{constructor(e,r){super(e,U),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[A.OPAQUE_MATERIAL,e=>(p(e)||d(e))&&!this.parameters.transparent],[A.TRANSPARENT_MATERIAL,e=>(p(e)||d(e))&&this.parameters.transparent&&this.parameters.writeDepth],[A.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>(g(e)||d(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=k(this.parameters),this._configuration=new E(r.spherical,r.doublePrecisionRequiresObfuscation)}isVisibleForOutput(e){return e!==T.Shadow&&e!==T.ShadowExcludeHighlight&&e!==T.ShadowHighlight||this.parameters.castShadows}get visible(){const e=this.parameters;if(e.layerOpacity<B)return!1;const{hasInstancedColor:r,hasVertexColors:t,hasSymbolColors:i,vvColor:s}=e,a=r||s||i,o="replace"===e.colorMixMode,n=e.opacity>=B;if(t&&a)return o||n;const c=e.externalColor&&e.externalColor[3]>=B;return t?o?c:n:a?o||n:o?c:n}get hasEmissions(){return!!this.parameters.emissiveTextureId||!e(this.parameters.emissiveFactor,l)}getConfiguration(e,r){const t=this.parameters,{treeRendering:i,doubleSided:s,doubleSidedType:a}=t;return this._configuration.output=e,this._configuration.hasNormalTexture=!i&&!!t.normalTextureId,this._configuration.hasColorTexture=!!t.textureId,this._configuration.hasVertexTangents=!i&&t.hasVertexTangents,this._configuration.instanced=t.isInstanced,this._configuration.instancedDoublePrecision=t.instancedDoublePrecision,this._configuration.vvSize=!!t.vvSize,this._configuration.hasVerticalOffset=null!=t.verticalOffset,this._configuration.hasScreenSizePerspective=null!=t.screenSizePerspective,this._configuration.hasSlicePlane=t.hasSlicePlane,this._configuration.alphaDiscardMode=t.textureAlphaMode,this._configuration.normalType=i?_.Attribute:t.normalType,this._configuration.transparent=t.transparent,this._configuration.writeDepth=t.writeDepth,null!=t.customDepthTest&&(this._configuration.customDepthTest=t.customDepthTest),this._configuration.hasOccludees=r.hasOccludees,this._configuration.cullFace=t.hasSlicePlane?M.None:t.cullFace,this._configuration.cullAboveTerrain=r.cullAboveTerrain,this._configuration.hasModelTransformation=!i&&null!=t.modelTransformation,this._configuration.hasVertexColors=t.hasVertexColors,this._configuration.hasSymbolColors=t.hasSymbolColors,this._configuration.doubleSidedMode=i?b.WindingOrder:s&&"normal"===a?b.View:s&&"winding-order"===a?b.WindingOrder:b.None,this._configuration.instancedColor=t.hasInstancedColor,x(e)?(this._configuration.terrainDepthTest=r.terrainDepthTest,this._configuration.receiveShadows=t.receiveShadows,this._configuration.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=r.ssao):(this._configuration.terrainDepthTest=!1,this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1),this._configuration.vvColor=!!t.vvColor,this._configuration.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,this._configuration.pbrMode=t.usePBR?t.isSchematic?S.Schematic:S.Normal:S.Disabled,this._configuration.hasMetallicRoughnessTexture=!i&&!!t.metallicRoughnessTextureId,this._configuration.emissionSource=i?v.None:null!=t.emissiveTextureId?v.Texture:t.usePBR?v.Value:v.None,this._configuration.hasOcclusionTexture=!i&&!!t.occlusionTextureId,this._configuration.offsetBackfaces=!(!t.transparent||!t.offsetTransparentBackfaces),this._configuration.oitPass=r.oitPass,this._configuration.enableOffset=r.camera.relativeElevation<C,this._configuration.snowCover=W(r),this._configuration.hasColorTextureTransform=!!t.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix,this._configuration}intersect(e,l,u,h,m,p){if(null!=this.parameters.verticalOffset){const e=u.camera;r(Q,l[12],l[13],l[14]);let p=null;switch(u.viewingMode){case f.Global:p=i(Y,Q);break;case f.Local:p=t(Y,H)}let d=0;const g=s(K,Q,e.eye),T=a(g),x=o(g,g,1/T);let _=null;this.parameters.screenSizePerspective&&(_=n(p,x)),d+=D(e,T,this.parameters.verticalOffset,_??0,this.parameters.screenSizePerspective),o(p,p,d),c(J,p,u.transform.inverseRotation),h=s(F,h,J),m=s(G,m,J)}y(e,u,h,m,P(u.verticalOffset),p)}createGLMaterial(e){return new q(e)}createBufferWriter(){return new j(this._vertexBufferLayout)}}class q extends w{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const i=e.camera.viewInverseTransposeMatrix;return r(t.origin,i[3],i[7],i[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?V:L,e)}}class U extends N{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}}function W(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}function k(e){const r=m().vec3f(I.POSITION);e.normalType===_.Compressed?r.vec2i16(I.NORMALCOMPRESSED,{glNormalized:!0}):r.vec3f(I.NORMAL),e.hasVertexTangents&&r.vec4f(I.TANGENT);return(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&r.vec2f(I.UV0),e.hasVertexColors&&r.vec4u8(I.COLOR),e.hasSymbolColors&&r.vec4u8(I.SYMBOLCOLOR),O()&&r.vec4u8(I.OBJECTANDLAYERIDCOLOR),r}const F=u(),G=u(),H=h(0,0,1),Y=u(),J=u(),Q=u(),K=u();export{q as DefaultGLMaterial,z as DefaultMaterial,U as DefaultMaterialParameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as e,deg2rad as t}from"../../../../core/mathUtils.js";import{fromMat4 as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as r}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as o,rotate as n}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as c,fromValues as l}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{i as f,t as h,n as p,d as u,h as m,c as d,l as g,j as O,g as S,q as T,f as b}from"../../../../chunks/vec32.js";import{create as v,fromValues as A}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as E,create as _,freeze as I}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isMat4 as R}from"../../../../core/libs/gl-matrix-2/types/mat4.js";import{create as x}from"../../../../geometry/support/aaBoundingRect.js";import{BufferViewVec4u8 as C}from"../../../../geometry/support/buffer/BufferView.js";import{evaluateModelTransformScale as P}from"../../layers/support/FastSymbolUpdates.js";import{debugFlags as y}from"../../support/debugFlags.js";import{newLayout as D}from"../../support/buffer/InterleavedLayout.js";import{isColorEmissionHighlightOrOID as F,isColorOrColorEmission as L}from"../core/shaderLibrary/ShaderOutput.js";import{HUDVerticalPixelOffset as j}from"../core/shaderLibrary/hud/HUD.glsl.js";import{alphaCutoff as N}from"../core/shaderLibrary/util/AlphaCutoff.js";import{olidEnabled as z}from"../effects/geometry/olidUtils.js";import{GLTextureMaterial as U,GLTextureMaterialBindParameters as M}from"../lib/GLTextureMaterial.js";import{Material as w,RenderOccludedFlag as B}from"../lib/Material.js";import{RenderSlot as V}from"../lib/RenderSlot.js";import{applyScaleFactor as q,applyPrecomputedScaleFactor as G,precomputeScaleFactor as H}from"../lib/screenSizePerspectiveUtils.js";import{assert as W}from"../lib/Util.js";import{VertexAttribute as X}from"../lib/VertexAttribute.js";import{ScaleInfo as Y}from"./ScaleInfo.js";import{writePosition as Z,writeNormal as k,writeColor as J,writeBufferFloat as K,writeBufferVec4 as Q,writeBufferVec4Zeros as $,writeObjectAndLayerIdColor as ee}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as te}from"./internal/MaterialUtil.js";import{c as se}from"../../../../chunks/HUDMaterial.glsl.js";import{HUDMaterialTechnique as ie}from"../shaders/HUDMaterialTechnique.js";import{HUDMaterialTechniqueConfiguration as re}from"../shaders/HUDMaterialTechniqueConfiguration.js";class ae extends w{constructor(e,t){super(e,ye),this.produces=new Map([[V.HUD_MATERIAL,e=>F(e)&&!this.parameters.drawAsLabel],[V.LABEL_MATERIAL,e=>F(e)&&this.parameters.drawAsLabel],[V.OCCLUSION_PIXELS,()=>this.parameters.occlusionTest],[V.DRAPED_MATERIAL,e=>this.parameters.draped&&F(e)]]),this._visible=!0,this._configuration=new re(t)}getConfiguration(e,t){return this._configuration.output=e,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=this.parameters.draped,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.occlusionPass=t.slot===V.OCCLUSION_PIXELS,this._configuration.occludedFragmentFade=this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||t.slot===V.OCCLUSION_PIXELS,L(e)&&(this._configuration.debugDrawLabelBorder=!!y.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,i,a,o,n){const{options:{selectionMode:c,hud:l,excludeLabels:S},point:T,camera:b}=i,{parameters:A}=this;if(!c||!l||S&&A.isLabel||!e.visible||!T)return;const{scaleX:E,scaleY:_}=this._getScreenScale(e,b.pixelRatio);s(Te,t),e.attributes.has(X.FEATUREATTRIBUTE)&&le(Te);const I=e.attributes.get(X.POSITION),R=e.attributes.get(X.SIZE),x=e.attributes.get(X.NORMAL),C=e.attributes.get(X.ROTATION),P=e.attributes.get(X.CENTEROFFSETANDDISTANCE);W(I.size>=3);const y=se(A),D="screen"===this.parameters.centerOffsetUnits;for(let s=0;s<I.data.length/I.size;s++){const e=s*I.size;f(pe,I.data[e],I.data[e+1],I.data[e+2]),h(pe,pe,t),h(pe,pe,b.viewMatrix);const a=s*P.size;if(f(Ae,P.data[a],P.data[a+1],P.data[a+2]),!D&&(pe[0]+=Ae[0],pe[1]+=Ae[1],0!==Ae[2])){const e=Ae[2];p(Ae,pe),u(pe,pe,m(Ae,Ae,e))}const o=s*x.size;if(f(ue,x.data[o],x.data[o+1],x.data[o+2]),ce(ue,Te,b,Ie),this._applyVerticalOffsetTransformationView(pe,Ie,b,he),b.applyProjection(pe,me),me[0]>-1){D&&(Ae[0]||Ae[1])&&(me[0]+=Ae[0]*b.pixelRatio,0!==Ae[1]&&(me[1]+=q(Ae[1],he.factorAlignment)*b.pixelRatio),b.unapplyProjection(me,pe)),me[0]+=this.parameters.screenOffset[0]*b.pixelRatio,me[1]+=this.parameters.screenOffset[1]*b.pixelRatio,me[0]=Math.floor(me[0]),me[1]=Math.floor(me[1]);const e=s*R.size;Ce[0]=R.data[e],Ce[1]=R.data[e+1],G(Ce,he.factor,Ce);const t=Re*b.pixelRatio;let a=0;if(A.textureIsSignedDistanceField){a=Math.min(A.outlineSize,.5*Ce[0])*b.pixelRatio/2}Ce[0]*=E,Ce[1]*=_;const o=s*C.size,c=A.rotation+C.data[o];if(fe(T,me[0],me[1],Ce,t,a,c,A,y)){const e=i.ray;if(h(ge,pe,r(ve,b.viewMatrix)),me[0]=T[0],me[1]=T[1],b.unprojectFromRenderScreen(me,pe)){const t=v();d(t,e.direction);const s=1/g(t);m(t,t,s);n(O(e.origin,pe)*s,t,-1,!0,1,ge)}}}}}intersectDraped(e,t,s,i,r,a){const o=e.attributes.get(X.POSITION),n=e.attributes.get(X.SIZE),c=e.attributes.get(X.ROTATION),l=this.parameters,f=se(l),{scaleX:h,scaleY:p}=this._getScreenScale(e,e.screenToWorldRatio),u=xe*e.screenToWorldRatio;for(let m=0;m<o.data.length/o.size;m++){const t=m*o.size,s=o.data[t],d=o.data[t+1],g=m*n.size;Ce[0]=n.data[g],Ce[1]=n.data[g+1];let O=0;if(l.textureIsSignedDistanceField){O=Math.min(l.outlineSize,.5*Ce[0])*e.screenToWorldRatio/2}Ce[0]*=h,Ce[1]*=p;const S=m*c.size,T=l.rotation+c.data[S];fe(i,s,d,Ce,u,O,T,l,f)&&r(a.dist,a.normal,-1,!1)}}createBufferWriter(){return new Le}_updateScaleInfo(e,t,s){const i=this.parameters;null!=i.screenSizePerspective?H(s,t,i.screenSizePerspective,e.factor):(e.factor.scale=1,e.factor.factor=0,e.factor.minScaleFactor=0),null!=i.screenSizePerspectiveAlignment?H(s,t,i.screenSizePerspectiveAlignment,e.factorAlignment):(e.factorAlignment.factor=e.factor.factor,e.factorAlignment.scale=e.factor.scale,e.factorAlignment.minScaleFactor=e.factor.minScaleFactor)}applyShaderOffsetsView(e,t,s,i,r,a,o){const n=ce(t,s,r,Ie);return this._applyVerticalGroundOffsetView(e,n,r,o),this._applyVerticalOffsetTransformationView(o,n,r,a),this._applyPolygonOffsetView(o,n,i[3],r,o),this._applyCenterOffsetView(o,i,o),o}applyShaderOffsetsNDC(e,t,s,i,r){return this._applyCenterOffsetNDC(e,t,s,i),null!=r&&d(r,i),this._applyPolygonOffsetNDC(i,t,s,i),i}_applyPolygonOffsetView(t,s,i,r,a){const o=r.aboveGround?1:-1;let n=Math.sign(i);0===n&&(n=o);const c=o*n;if(this.parameters.shaderPolygonOffset<=0)return d(a,t);const l=e(Math.abs(s.cosAngle),.01,1),f=1-Math.sqrt(1-l*l)/l/r.viewport[2];return m(a,t,c>0?f:1/f),a}_applyVerticalGroundOffsetView(e,t,s,i){const r=g(e),a=s.aboveGround?1:-1,o=s.computeRenderPixelSizeAtDist(r)*j,n=m(pe,t.normal,a*o);return S(i,e,n),i}_applyVerticalOffsetTransformationView(e,t,s,i){const r=this.parameters;if(!r.verticalOffset?.screenLength){if(r.screenSizePerspective||r.screenSizePerspectiveAlignment){const s=g(e);this._updateScaleInfo(i,s,t.cosAngle)}else i.factor.scale=1,i.factorAlignment.scale=1;return e}const a=g(e),o=r.screenSizePerspectiveAlignment??r.screenSizePerspective,n=te(s,a,r.verticalOffset,t.cosAngle,o);return this._updateScaleInfo(i,a,t.cosAngle),m(t.normal,t.normal,n),S(e,e,t.normal)}_applyCenterOffsetView(e,t,s){const i="screen"!==this.parameters.centerOffsetUnits;return s!==e&&d(s,e),i&&(s[0]+=t[0],s[1]+=t[1],t[2]&&(p(ue,s),S(s,s,m(ue,ue,t[2])))),s}_applyCenterOffsetNDC(e,t,s,i){const r="screen"!==this.parameters.centerOffsetUnits;return i!==e&&d(i,e),r||(i[0]+=t[0]/s.fullWidth*2,i[1]+=t[1]/s.fullHeight*2),i}_applyPolygonOffsetNDC(e,t,s,i){const r=this.parameters.shaderPolygonOffset;if(e!==i&&d(i,e),r){const e=s.aboveGround?1:-1,a=e*Math.sign(t[3]);i[2]-=(a||e)*r}return i}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:s}=this.parameters,i=e[3]>=N||t>=N&&s[3]>=N;return this._visible&&i}createGLMaterial(e){return new oe(e)}calculateRelativeScreenBounds(e,t,s=x()){return ne(this.parameters,e,t,s),s[2]=s[0]+e[0],s[3]=s[1]+e[1],s}_getScreenScale(e,t){const s=e.attributes.get(X.FEATUREATTRIBUTE);if(null==s)return{scaleX:t,scaleY:t};const i=E(s.data,_e);return P(Ee,this.parameters,i),{scaleX:Ee[0]*t,scaleY:Ee[1]*t}}}class oe extends U{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(ie,e)}}function ne(e,t,s,i){i[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*s,i[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*s}function ce(e,t,i,r){return R(t)&&(t=s(be,t)),T(r.normal,e,t),h(r.normal,r.normal,i.viewInverseTransposeMatrix),r.cosAngle=b(de,Pe),r}function le(e){const t=e[0],s=e[1],i=e[2],r=e[3],a=e[4],o=e[5],n=e[6],c=e[7],l=e[8],f=1/Math.sqrt(t*t+s*s+i*i),h=1/Math.sqrt(r*r+a*a+o*o),p=1/Math.sqrt(n*n+c*c+l*l);return e[0]=t*f,e[1]=s*f,e[2]=i*f,e[3]=r*h,e[4]=a*h,e[5]=o*h,e[6]=n*p,e[7]=c*p,e[8]=l*p,e}function fe(e,s,i,r,a,c,l,f,h){let p=s-a-r[0]*h[0],u=p+r[0]+2*a,m=i-a-r[1]*h[1],d=m+r[1]+2*a;const g=f.distanceFieldBoundingBox;return f.textureIsSignedDistanceField&&null!=g&&(p+=r[0]*g[0],m+=r[1]*g[1],u-=r[0]*(1-g[2]),d-=r[1]*(1-g[3]),p-=c,u+=c,m-=c,d+=c),o(Se,s,i),n(Oe,e,Se,t(l)),Oe[0]>p&&Oe[0]<u&&Oe[1]>m&&Oe[1]<d}const he=new Y,pe=v(),ue=v(),me=_(),de=v(),ge=v(),Oe=c(),Se=c(),Te=i(),be=i(),ve=a(),Ae=v(),Ee=v(),_e=_(),Ie={normal:de,cosAngle:0},Re=1,xe=2,Ce=[0,0],Pe=A(0,0,1);class ye extends M{constructor(){super(...arguments),this.renderOccluded=B.Occlude,this.isDecoration=!1,this.color=I(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=l(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=I(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=_(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusEffect="none",this.draped=!1,this.isLabel=!1}}const De=D().vec3f(X.POSITION).vec3f(X.NORMAL).vec2f(X.UV0).vec4u8(X.COLOR).vec2f(X.SIZE).f32(X.ROTATION).vec4f(X.CENTEROFFSETANDDISTANCE).vec4f(X.FEATUREATTRIBUTE),Fe=De.clone().vec4u8(X.OBJECTANDLAYERIDCOLOR);class Le{constructor(){this.vertexBufferLayout=z()?Fe:De}elementCount(e){return 6*e.get(X.POSITION).indices.length}write(e,t,s,i,r,a){Z(s.get(X.POSITION),e,r.position,a,6),k(s.get(X.NORMAL),t,r.normal,a,6);const o=s.get(X.UV0)?.data;let n=0,c=0,l=1,f=1;o&&o.length>=4&&(n=o[0],c=o[1],l=o[2],f=o[3]),l=Math.min(1.99999,l+1),f=Math.min(1.99999,f+1);let h=s.get(X.POSITION).indices.length,p=a;const u=r.uv0;for(let O=0;O<h;++O)u.set(p,0,n),u.set(p,1,c),p++,u.set(p,0,l),u.set(p,1,c),p++,u.set(p,0,l),u.set(p,1,f),p++,u.set(p,0,l),u.set(p,1,f),p++,u.set(p,0,n),u.set(p,1,f),p++,u.set(p,0,n),u.set(p,1,c),p++;J(s.get(X.COLOR),4,r.color,a,6);const{data:m,indices:d}=s.get(X.SIZE);h=d.length;const g=r.size;p=a;for(let O=0;O<h;++O){const e=m[2*d[O]],t=m[2*d[O]+1];for(let s=0;s<6;++s)g.set(p,0,e),g.set(p,1,t),p++}if(K(s.get(X.ROTATION),r.rotation,a,6),s.get(X.CENTEROFFSETANDDISTANCE)?Q(s.get(X.CENTEROFFSETANDDISTANCE),r.centerOffsetAndDistance,a,6):$(r.centerOffsetAndDistance,a,6*h),s.get(X.FEATUREATTRIBUTE)?Q(s.get(X.FEATUREATTRIBUTE),r.featureAttribute,a,6):$(r.featureAttribute,a,6*h),null!=i){const e=s.get(X.POSITION)?.indices;if(e){const t=e.length,s=r.getField(X.OBJECTANDLAYERIDCOLOR,C);ee(i,s,t,a,6)}}}}export{ae as HUDMaterial,ye as Parameters};
5
+ import{clamp as e,deg2rad as t}from"../../../../core/mathUtils.js";import{fromMat4 as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as r}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as o,rotate as n}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as c,fromValues as l}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{i as f,t as h,n as p,d as u,h as m,c as d,l as g,j as O,g as S,q as T,f as b}from"../../../../chunks/vec32.js";import{create as v,fromValues as A}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as E,create as _,freeze as I}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isMat4 as R}from"../../../../core/libs/gl-matrix-2/types/mat4.js";import{create as x}from"../../../../geometry/support/aaBoundingRect.js";import{BufferViewVec4u8 as C}from"../../../../geometry/support/buffer/BufferView.js";import{evaluateModelTransformScale as P}from"../../layers/support/FastSymbolUpdates.js";import{debugFlags as D}from"../../support/debugFlags.js";import{newLayout as y}from"../../support/buffer/InterleavedLayout.js";import{isColorEmissionHighlightOrOID as F,isColorOrColorEmission as j}from"../core/shaderLibrary/ShaderOutput.js";import{HUDVerticalPixelOffset as L}from"../core/shaderLibrary/hud/HUD.glsl.js";import{olidEnabled as N}from"../effects/geometry/olidUtils.js";import{GLTextureMaterial as z,GLTextureMaterialBindParameters as U}from"../lib/GLTextureMaterial.js";import{Material as M,RenderOccludedFlag as w}from"../lib/Material.js";import{RenderSlot as B}from"../lib/RenderSlot.js";import{applyScaleFactor as V,applyPrecomputedScaleFactor as q,precomputeScaleFactor as G}from"../lib/screenSizePerspectiveUtils.js";import{assert as H}from"../lib/Util.js";import{VertexAttribute as W}from"../lib/VertexAttribute.js";import{ScaleInfo as X}from"./ScaleInfo.js";import{writePosition as Y,writeNormal as Z,writeColor as k,writeBufferFloat as J,writeBufferVec4 as K,writeBufferVec4Zeros as Q,writeObjectAndLayerIdColor as $}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as ee}from"./internal/MaterialUtil.js";import{c as te}from"../../../../chunks/HUDMaterial.glsl.js";import{HUDMaterialTechnique as se}from"../shaders/HUDMaterialTechnique.js";import{HUDMaterialTechniqueConfiguration as ie}from"../shaders/HUDMaterialTechniqueConfiguration.js";import{alphaCutoff as re}from"../../../../webscene/support/AlphaCutoff.js";class ae extends M{constructor(e,t){super(e,De),this.produces=new Map([[B.HUD_MATERIAL,e=>F(e)&&!this.parameters.drawAsLabel],[B.LABEL_MATERIAL,e=>F(e)&&this.parameters.drawAsLabel],[B.OCCLUSION_PIXELS,()=>this.parameters.occlusionTest],[B.DRAPED_MATERIAL,e=>this.parameters.draped&&F(e)]]),this._visible=!0,this._configuration=new ie(t)}getConfiguration(e,t){return this._configuration.output=e,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=this.parameters.draped,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.occlusionPass=t.slot===B.OCCLUSION_PIXELS,this._configuration.occludedFragmentFade=this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||t.slot===B.OCCLUSION_PIXELS,j(e)&&(this._configuration.debugDrawLabelBorder=!!D.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,i,a,o,n){const{options:{selectionMode:c,hud:l,excludeLabels:S},point:T,camera:b}=i,{parameters:A}=this;if(!c||!l||S&&A.isLabel||!e.visible||!T)return;const{scaleX:E,scaleY:_}=this._getScreenScale(e,b.pixelRatio);s(Te,t),e.attributes.has(W.FEATUREATTRIBUTE)&&le(Te);const I=e.attributes.get(W.POSITION),R=e.attributes.get(W.SIZE),x=e.attributes.get(W.NORMAL),C=e.attributes.get(W.ROTATION),P=e.attributes.get(W.CENTEROFFSETANDDISTANCE);H(I.size>=3);const D=te(A),y="screen"===this.parameters.centerOffsetUnits;for(let s=0;s<I.data.length/I.size;s++){const e=s*I.size;f(pe,I.data[e],I.data[e+1],I.data[e+2]),h(pe,pe,t),h(pe,pe,b.viewMatrix);const a=s*P.size;if(f(Ae,P.data[a],P.data[a+1],P.data[a+2]),!y&&(pe[0]+=Ae[0],pe[1]+=Ae[1],0!==Ae[2])){const e=Ae[2];p(Ae,pe),u(pe,pe,m(Ae,Ae,e))}const o=s*x.size;if(f(ue,x.data[o],x.data[o+1],x.data[o+2]),ce(ue,Te,b,Ie),this._applyVerticalOffsetTransformationView(pe,Ie,b,he),b.applyProjection(pe,me),me[0]>-1){y&&(Ae[0]||Ae[1])&&(me[0]+=Ae[0]*b.pixelRatio,0!==Ae[1]&&(me[1]+=V(Ae[1],he.factorAlignment)*b.pixelRatio),b.unapplyProjection(me,pe)),me[0]+=this.parameters.screenOffset[0]*b.pixelRatio,me[1]+=this.parameters.screenOffset[1]*b.pixelRatio,me[0]=Math.floor(me[0]),me[1]=Math.floor(me[1]);const e=s*R.size;Ce[0]=R.data[e],Ce[1]=R.data[e+1],q(Ce,he.factor,Ce);const t=Re*b.pixelRatio;let a=0;if(A.textureIsSignedDistanceField){a=Math.min(A.outlineSize,.5*Ce[0])*b.pixelRatio/2}Ce[0]*=E,Ce[1]*=_;const o=s*C.size,c=A.rotation+C.data[o];if(fe(T,me[0],me[1],Ce,t,a,c,A,D)){const e=i.ray;if(h(ge,pe,r(ve,b.viewMatrix)),me[0]=T[0],me[1]=T[1],b.unprojectFromRenderScreen(me,pe)){const t=v();d(t,e.direction);const s=1/g(t);m(t,t,s);n(O(e.origin,pe)*s,t,-1,!0,1,ge)}}}}}intersectDraped(e,t,s,i,r,a){const o=e.attributes.get(W.POSITION),n=e.attributes.get(W.SIZE),c=e.attributes.get(W.ROTATION),l=this.parameters,f=te(l),{scaleX:h,scaleY:p}=this._getScreenScale(e,e.screenToWorldRatio),u=xe*e.screenToWorldRatio;for(let m=0;m<o.data.length/o.size;m++){const t=m*o.size,s=o.data[t],d=o.data[t+1],g=m*n.size;Ce[0]=n.data[g],Ce[1]=n.data[g+1];let O=0;if(l.textureIsSignedDistanceField){O=Math.min(l.outlineSize,.5*Ce[0])*e.screenToWorldRatio/2}Ce[0]*=h,Ce[1]*=p;const S=m*c.size,T=l.rotation+c.data[S];fe(i,s,d,Ce,u,O,T,l,f)&&r(a.dist,a.normal,-1,!1)}}createBufferWriter(){return new je}_updateScaleInfo(e,t,s){const i=this.parameters;null!=i.screenSizePerspective?G(s,t,i.screenSizePerspective,e.factor):(e.factor.scale=1,e.factor.factor=0,e.factor.minScaleFactor=0),null!=i.screenSizePerspectiveAlignment?G(s,t,i.screenSizePerspectiveAlignment,e.factorAlignment):(e.factorAlignment.factor=e.factor.factor,e.factorAlignment.scale=e.factor.scale,e.factorAlignment.minScaleFactor=e.factor.minScaleFactor)}applyShaderOffsetsView(e,t,s,i,r,a,o){const n=ce(t,s,r,Ie);return this._applyVerticalGroundOffsetView(e,n,r,o),this._applyVerticalOffsetTransformationView(o,n,r,a),this._applyPolygonOffsetView(o,n,i[3],r,o),this._applyCenterOffsetView(o,i,o),o}applyShaderOffsetsNDC(e,t,s,i,r){return this._applyCenterOffsetNDC(e,t,s,i),null!=r&&d(r,i),this._applyPolygonOffsetNDC(i,t,s,i),i}_applyPolygonOffsetView(t,s,i,r,a){const o=r.aboveGround?1:-1;let n=Math.sign(i);0===n&&(n=o);const c=o*n;if(this.parameters.shaderPolygonOffset<=0)return d(a,t);const l=e(Math.abs(s.cosAngle),.01,1),f=1-Math.sqrt(1-l*l)/l/r.viewport[2];return m(a,t,c>0?f:1/f),a}_applyVerticalGroundOffsetView(e,t,s,i){const r=g(e),a=s.aboveGround?1:-1,o=s.computeRenderPixelSizeAtDist(r)*L,n=m(pe,t.normal,a*o);return S(i,e,n),i}_applyVerticalOffsetTransformationView(e,t,s,i){const r=this.parameters;if(!r.verticalOffset?.screenLength){if(r.screenSizePerspective||r.screenSizePerspectiveAlignment){const s=g(e);this._updateScaleInfo(i,s,t.cosAngle)}else i.factor.scale=1,i.factorAlignment.scale=1;return e}const a=g(e),o=r.screenSizePerspectiveAlignment??r.screenSizePerspective,n=ee(s,a,r.verticalOffset,t.cosAngle,o);return this._updateScaleInfo(i,a,t.cosAngle),m(t.normal,t.normal,n),S(e,e,t.normal)}_applyCenterOffsetView(e,t,s){const i="screen"!==this.parameters.centerOffsetUnits;return s!==e&&d(s,e),i&&(s[0]+=t[0],s[1]+=t[1],t[2]&&(p(ue,s),S(s,s,m(ue,ue,t[2])))),s}_applyCenterOffsetNDC(e,t,s,i){const r="screen"!==this.parameters.centerOffsetUnits;return i!==e&&d(i,e),r||(i[0]+=t[0]/s.fullWidth*2,i[1]+=t[1]/s.fullHeight*2),i}_applyPolygonOffsetNDC(e,t,s,i){const r=this.parameters.shaderPolygonOffset;if(e!==i&&d(i,e),r){const e=s.aboveGround?1:-1,a=e*Math.sign(t[3]);i[2]-=(a||e)*r}return i}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:s}=this.parameters,i=e[3]>=re||t>=re&&s[3]>=re;return this._visible&&i}createGLMaterial(e){return new oe(e)}calculateRelativeScreenBounds(e,t,s=x()){return ne(this.parameters,e,t,s),s[2]=s[0]+e[0],s[3]=s[1]+e[1],s}_getScreenScale(e,t){const s=e.attributes.get(W.FEATUREATTRIBUTE);if(null==s)return{scaleX:t,scaleY:t};const i=E(s.data,_e);return P(Ee,this.parameters,i),{scaleX:Ee[0]*t,scaleY:Ee[1]*t}}}class oe extends z{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(se,e)}}function ne(e,t,s,i){i[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*s,i[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*s}function ce(e,t,i,r){return R(t)&&(t=s(be,t)),T(r.normal,e,t),h(r.normal,r.normal,i.viewInverseTransposeMatrix),r.cosAngle=b(de,Pe),r}function le(e){const t=e[0],s=e[1],i=e[2],r=e[3],a=e[4],o=e[5],n=e[6],c=e[7],l=e[8],f=1/Math.sqrt(t*t+s*s+i*i),h=1/Math.sqrt(r*r+a*a+o*o),p=1/Math.sqrt(n*n+c*c+l*l);return e[0]=t*f,e[1]=s*f,e[2]=i*f,e[3]=r*h,e[4]=a*h,e[5]=o*h,e[6]=n*p,e[7]=c*p,e[8]=l*p,e}function fe(e,s,i,r,a,c,l,f,h){let p=s-a-r[0]*h[0],u=p+r[0]+2*a,m=i-a-r[1]*h[1],d=m+r[1]+2*a;const g=f.distanceFieldBoundingBox;return f.textureIsSignedDistanceField&&null!=g&&(p+=r[0]*g[0],m+=r[1]*g[1],u-=r[0]*(1-g[2]),d-=r[1]*(1-g[3]),p-=c,u+=c,m-=c,d+=c),o(Se,s,i),n(Oe,e,Se,t(l)),Oe[0]>p&&Oe[0]<u&&Oe[1]>m&&Oe[1]<d}const he=new X,pe=v(),ue=v(),me=_(),de=v(),ge=v(),Oe=c(),Se=c(),Te=i(),be=i(),ve=a(),Ae=v(),Ee=v(),_e=_(),Ie={normal:de,cosAngle:0},Re=1,xe=2,Ce=[0,0],Pe=A(0,0,1);class De extends U{constructor(){super(...arguments),this.renderOccluded=w.Occlude,this.isDecoration=!1,this.color=I(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=l(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=I(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=_(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusEffect="none",this.draped=!1,this.isLabel=!1}}const ye=y().vec3f(W.POSITION).vec3f(W.NORMAL).vec2f(W.UV0).vec4u8(W.COLOR).vec2f(W.SIZE).f32(W.ROTATION).vec4f(W.CENTEROFFSETANDDISTANCE).vec4f(W.FEATUREATTRIBUTE),Fe=ye.clone().vec4u8(W.OBJECTANDLAYERIDCOLOR);class je{constructor(){this.vertexBufferLayout=N()?Fe:ye}elementCount(e){return 6*e.get(W.POSITION).indices.length}write(e,t,s,i,r,a){Y(s.get(W.POSITION),e,r.position,a,6),Z(s.get(W.NORMAL),t,r.normal,a,6);const o=s.get(W.UV0)?.data;let n=0,c=0,l=1,f=1;o&&o.length>=4&&(n=o[0],c=o[1],l=o[2],f=o[3]),l=Math.min(1.99999,l+1),f=Math.min(1.99999,f+1);let h=s.get(W.POSITION).indices.length,p=a;const u=r.uv0;for(let O=0;O<h;++O)u.set(p,0,n),u.set(p,1,c),p++,u.set(p,0,l),u.set(p,1,c),p++,u.set(p,0,l),u.set(p,1,f),p++,u.set(p,0,l),u.set(p,1,f),p++,u.set(p,0,n),u.set(p,1,f),p++,u.set(p,0,n),u.set(p,1,c),p++;k(s.get(W.COLOR),4,r.color,a,6);const{data:m,indices:d}=s.get(W.SIZE);h=d.length;const g=r.size;p=a;for(let O=0;O<h;++O){const e=m[2*d[O]],t=m[2*d[O]+1];for(let s=0;s<6;++s)g.set(p,0,e),g.set(p,1,t),p++}if(J(s.get(W.ROTATION),r.rotation,a,6),s.get(W.CENTEROFFSETANDDISTANCE)?K(s.get(W.CENTEROFFSETANDDISTANCE),r.centerOffsetAndDistance,a,6):Q(r.centerOffsetAndDistance,a,6*h),s.get(W.FEATUREATTRIBUTE)?K(s.get(W.FEATUREATTRIBUTE),r.featureAttribute,a,6):Q(r.featureAttribute,a,6*h),null!=i){const e=s.get(W.POSITION)?.indices;if(e){const t=e.length,s=r.getField(W.OBJECTANDLAYERIDCOLOR,C);$(i,s,t,a,6)}}}}export{ae as HUDMaterial,De as Parameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{safeToString as e}from"../../../../core/string.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newLayout as i}from"../../support/buffer/InterleavedLayout.js";import{isColorOrColorEmission as s}from"../core/shaderLibrary/ShaderOutput.js";import{alphaCutoff as n}from"../core/shaderLibrary/util/AlphaCutoff.js";import o from"../lib/GLMaterial.js";import{Material as a,MaterialParameters as c}from"../lib/Material.js";import{RenderSlot as l}from"../lib/RenderSlot.js";import{VertexAttribute as f}from"../lib/VertexAttribute.js";import{writePosition as h,writeNormal as u,writeBufferVec4 as m}from"./internal/bufferWriterUtils.js";import{LineCalloutTechnique as p}from"../shaders/LineCalloutTechnique.js";import{LineCalloutTechniqueConfiguration as d}from"../shaders/LineCalloutTechniqueConfiguration.js";class g extends a{constructor(e,t){super(e,T),this.produces=new Map([[l.LINE_CALLOUTS,e=>s(e)],[l.LINE_CALLOUTS_HUD_DEPTH,e=>s(e)]]),this._configuration=new d(t),this._uniqueMaterialIdentifier=O(this.parameters)}passParameters(){return this.parameters}getConfiguration(e,t){const r=t.slot===l.LINE_CALLOUTS_HUD_DEPTH;return this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hudDepth=r,this._configuration.hudDepthAlignStart=!!this.parameters.hudDepthAlignStart,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration}get visible(){return this.parameters.color[3]>=n||(this.parameters.borderColor?.[3]??0)>=n}intersect(){}createGLMaterial(e){return new S(e)}createBufferWriter(){return new b}validateParameters(e){this._uniqueMaterialIdentifier=O(e)}get uniqueMaterialIdentifier(){return this._uniqueMaterialIdentifier}}function O({renderOccluded:t,isDecoration:r,horizontalScreenOffset:i,color:s,size:n,occlusionTest:o,shaderPolygonOffset:a,hudDepthAlignStart:c,centerOffsetUnits:l,hasSlicePlane:f,screenSizePerspective:h,verticalOffset:u,borderColor:m}){return e`${t}:${r}:${i}:[${s}]:${n}:${o}:${a}:${c}:${l}:${f}:${null!=h}:{${u.screenLength}:${u.minWorldLength}:${u.maxWorldLength}}:[${m}]`}class S extends o{beginSlot(e){return this.getTechnique(p,e)}}class T extends c{constructor(){super(...arguments),this.horizontalScreenOffset=0,this.color=r(0,0,0,1),this.size=1,this.occlusionTest=!1,this.shaderPolygonOffset=1e-5,this.hudDepthAlignStart=!1,this.centerOffsetUnits="world",this.hasSlicePlane=!1}}const L=i().vec3f(f.POSITION).vec3f(f.NORMAL).vec2f(f.UV0).vec4f(f.CENTEROFFSETANDDISTANCE),_=[t(0,0),t(1,0),t(0,1),t(1,0),t(1,1),t(0,1)];class b{constructor(){this.vertexBufferLayout=L}elementCount(e){return 6*e.get(f.POSITION).indices.length}write(e,t,r,i,s,n){h(r.get(f.POSITION),e,s.position,n,6),u(r.get(f.NORMAL),t,s.normal,n,6),m(r.get(f.CENTEROFFSETANDDISTANCE),s.centerOffsetAndDistance,n,6);for(let o=0;o<_.length;++o)s.uv0.setVec(n+o,_[o])}}export{g as LineCalloutMaterial,T as Parameters,O as uniqueMaterialIdentifier};
5
+ import{safeToString as e}from"../../../../core/string.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newLayout as i}from"../../support/buffer/InterleavedLayout.js";import{isColorOrColorEmission as s}from"../core/shaderLibrary/ShaderOutput.js";import n from"../lib/GLMaterial.js";import{Material as o,MaterialParameters as a}from"../lib/Material.js";import{RenderSlot as c}from"../lib/RenderSlot.js";import{VertexAttribute as l}from"../lib/VertexAttribute.js";import{writePosition as f,writeNormal as h,writeBufferVec4 as u}from"./internal/bufferWriterUtils.js";import{LineCalloutTechnique as p}from"../shaders/LineCalloutTechnique.js";import{LineCalloutTechniqueConfiguration as m}from"../shaders/LineCalloutTechniqueConfiguration.js";import{alphaCutoff as g}from"../../../../webscene/support/AlphaCutoff.js";class d extends o{constructor(e,t){super(e,T),this.produces=new Map([[c.LINE_CALLOUTS,e=>s(e)],[c.LINE_CALLOUTS_HUD_DEPTH,e=>s(e)]]),this._configuration=new m(t),this._uniqueMaterialIdentifier=O(this.parameters)}passParameters(){return this.parameters}getConfiguration(e,t){const r=t.slot===c.LINE_CALLOUTS_HUD_DEPTH;return this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hudDepth=r,this._configuration.hudDepthAlignStart=!!this.parameters.hudDepthAlignStart,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration}get visible(){return this.parameters.color[3]>=g||(this.parameters.borderColor?.[3]??0)>=g}intersect(){}createGLMaterial(e){return new S(e)}createBufferWriter(){return new b}validateParameters(e){this._uniqueMaterialIdentifier=O(e)}get uniqueMaterialIdentifier(){return this._uniqueMaterialIdentifier}}function O({renderOccluded:t,isDecoration:r,horizontalScreenOffset:i,color:s,size:n,occlusionTest:o,shaderPolygonOffset:a,hudDepthAlignStart:c,centerOffsetUnits:l,hasSlicePlane:f,screenSizePerspective:h,verticalOffset:u,borderColor:p}){return e`${t}:${r}:${i}:[${s}]:${n}:${o}:${a}:${c}:${l}:${f}:${null!=h}:{${u.screenLength}:${u.minWorldLength}:${u.maxWorldLength}}:[${p}]`}class S extends n{beginSlot(e){return this.getTechnique(p,e)}}class T extends a{constructor(){super(...arguments),this.horizontalScreenOffset=0,this.color=r(0,0,0,1),this.size=1,this.occlusionTest=!1,this.shaderPolygonOffset=1e-5,this.hudDepthAlignStart=!1,this.centerOffsetUnits="world",this.hasSlicePlane=!1}}const L=i().vec3f(l.POSITION).vec3f(l.NORMAL).vec2f(l.UV0).vec4f(l.CENTEROFFSETANDDISTANCE),_=[t(0,0),t(1,0),t(0,1),t(1,0),t(1,1),t(0,1)];class b{constructor(){this.vertexBufferLayout=L}elementCount(e){return 6*e.get(l.POSITION).indices.length}write(e,t,r,i,s,n){f(r.get(l.POSITION),e,s.position,n,6),h(r.get(l.NORMAL),t,s.normal,n,6),u(r.get(l.CENTEROFFSETANDDISTANCE),s.centerOffsetAndDistance,n,6);for(let o=0;o<_.length;++o)s.uv0.setVec(n+o,_[o])}}export{d as LineCalloutMaterial,T as Parameters,O as uniqueMaterialIdentifier};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{i as e,I as t,t as r}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newLayout as a}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as s,isColor as n,isDepth as o,isColorHighlightOrDepth as h,isColorOrColorEmission as c}from"../core/shaderLibrary/ShaderOutput.js";import{alphaCutoff as m}from"../core/shaderLibrary/util/AlphaCutoff.js";import{GLTextureMaterial as p}from"../lib/GLTextureMaterial.js";import{Material as l,RenderOccludedFlag as u}from"../lib/Material.js";import{RenderSlot as T}from"../lib/RenderSlot.js";import{VertexAttribute as d}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as f}from"./VisualVariablePassParameters.js";import{vertexAttributeLocations as A,LineMarkerTechnique as _}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as v,LineMarkerSpace as E,LineMarkerAnchor as g}from"../shaders/LineMarkerTechniqueConfiguration.js";import{CapType as O}from"../shaders/RibbonLineTechniqueConfiguration.js";class S extends l{constructor(e){super(e,I),this._configuration=new v,this.vertexAttributeLocations=A,this.produces=new Map([[T.OPAQUE_MATERIAL,e=>e===s.Highlight||n(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>o(e)],[T.OCCLUDER_MATERIAL,e=>h(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.TRANSPARENT_OCCLUDER_MATERIAL,e=>h(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.TRANSPARENT_MATERIAL,e=>n(e)&&this.parameters.writeDepth],[T.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>n(e)&&!this.parameters.writeDepth],[T.DRAPED_MATERIAL,e=>c(e)||e===s.Highlight]]),this._layout=this.createLayout()}getConfiguration(e,t){return this._configuration.output=e,this._configuration.space=t.slot===T.DRAPED_MATERIAL?E.Draped:this.parameters.worldSpace?E.World:E.Screen,this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=this.parameters.cap!==O.BUTT,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasOccludees=t.hasOccludees,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.occluder=this.parameters.renderOccluded===u.OccludeAndTransparentStencil,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&c(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=m}intersect(){}createLayout(){const e=a().vec3f(d.POSITION).vec3f(d.PREVPOSITION).vec2f(d.UV0);return this.parameters.worldSpace&&e.vec3f(d.NORMAL),this.parameters.vvSize?e.f32(d.SIZEFEATUREATTRIBUTE):e.f32(d.SIZE),this.parameters.vvColor?e.f32(d.COLORFEATUREATTRIBUTE):e.vec4f(d.COLOR),this.parameters.vvOpacity&&e.f32(d.OPACITYFEATUREATTRIBUTE),e}createBufferWriter(){return new P(this._layout,this.parameters)}createGLMaterial(e){return new R(e)}}class R extends p{constructor(){super(...arguments),this._markerPrimitive=null}dispose(){super.dispose(),this._markerTextures.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){const t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this._material.setParameters(this.textureBindParameters),this.getTechnique(_,e)}}class I extends f{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive="arrow",this.placement="end",this.cap=O.BUTT,this.anchor=g.Center,this.hasTip=!1,this.worldSpace=!1,this.hideOnShortSegments=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.markerTexture=null}}class P{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t}elementCount(){return"begin-end"===this._parameters.placement?12:6}write(i,a,s,n,o,h){const c=s.get(d.POSITION).data,m=c.length/3;let p=[1,0,0];const l=s.get(d.NORMAL);this._parameters.worldSpace&&null!=l&&(p=l.data);let u=1,T=0;this._parameters.vvSize?T=s.get(d.SIZEFEATUREATTRIBUTE).data[0]:s.has(d.SIZE)&&(u=s.get(d.SIZE).data[0]);let f=[1,1,1,1],A=0;this._parameters.vvColor?A=s.get(d.COLORFEATUREATTRIBUTE).data[0]:s.has(d.COLOR)&&(f=s.get(d.COLOR).data);let _=0;this._parameters.vvOpacity&&(_=s.get(d.OPACITYFEATUREATTRIBUTE).data[0]);const v=new Float32Array(o.buffer);let E=h*(this.vertexBufferLayout.stride/4);const g=(e,t,r,i)=>{if(v[E++]=e[0],v[E++]=e[1],v[E++]=e[2],v[E++]=t[0],v[E++]=t[1],v[E++]=t[2],v[E++]=r[0],v[E++]=r[1],this._parameters.worldSpace&&(v[E++]=p[0],v[E++]=p[1],v[E++]=p[2]),this._parameters.vvSize?v[E++]=T:v[E++]=u,this._parameters.vvColor)v[E++]=A;else{const e=Math.min(4*i,f.length-4);v[E++]=f[e],v[E++]=f[e+1],v[E++]=f[e+2],v[E++]=f[e+3]}this._parameters.vvOpacity&&(v[E++]=_)};let O;!function(e){e[e.ASCENDING=1]="ASCENDING",e[e.DESCENDING=-1]="DESCENDING"}(O||(O={}));const S=(a,s)=>{const n=e(L,c[3*a],c[3*a+1],c[3*a+2]),o=C;let h=a+s;do{e(o,c[3*h],c[3*h+1],c[3*h+2]),h+=s}while(t(n,o)&&h>=0&&h<m);i&&(r(n,n,i),r(o,o,i)),g(n,o,[-1,-1],a),g(n,o,[1,-1],a),g(n,o,[1,1],a),g(n,o,[-1,-1],a),g(n,o,[1,1],a),g(n,o,[-1,1],a)},R=this._parameters.placement;"begin"!==R&&"begin-end"!==R||S(0,O.ASCENDING),"end"!==R&&"begin-end"!==R||S(m-1,O.DESCENDING)}}const L=i(),C=i();export{S as LineMarkerMaterial,I as Parameters};
5
+ import{i as e,I as t,t as r}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newLayout as a}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as s,isColor as n,isDepth as o,isColorHighlightOrDepth as h,isColorOrColorEmission as c}from"../core/shaderLibrary/ShaderOutput.js";import{GLTextureMaterial as p}from"../lib/GLTextureMaterial.js";import{Material as m,RenderOccludedFlag as l}from"../lib/Material.js";import{RenderSlot as u}from"../lib/RenderSlot.js";import{VertexAttribute as T}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as d}from"./VisualVariablePassParameters.js";import{vertexAttributeLocations as f,LineMarkerTechnique as A}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as _,LineMarkerSpace as v,LineMarkerAnchor as E}from"../shaders/LineMarkerTechniqueConfiguration.js";import{CapType as g}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as O}from"../../../../webscene/support/AlphaCutoff.js";class S extends m{constructor(e){super(e,I),this._configuration=new _,this.vertexAttributeLocations=f,this.produces=new Map([[u.OPAQUE_MATERIAL,e=>e===s.Highlight||n(e)&&this.parameters.renderOccluded===l.OccludeAndTransparentStencil],[u.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>o(e)],[u.OCCLUDER_MATERIAL,e=>h(e)&&this.parameters.renderOccluded===l.OccludeAndTransparentStencil],[u.TRANSPARENT_OCCLUDER_MATERIAL,e=>h(e)&&this.parameters.renderOccluded===l.OccludeAndTransparentStencil],[u.TRANSPARENT_MATERIAL,e=>n(e)&&this.parameters.writeDepth],[u.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>n(e)&&!this.parameters.writeDepth],[u.DRAPED_MATERIAL,e=>c(e)||e===s.Highlight]]),this._layout=this.createLayout()}getConfiguration(e,t){return this._configuration.output=e,this._configuration.space=t.slot===u.DRAPED_MATERIAL?v.Draped:this.parameters.worldSpace?v.World:v.Screen,this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=this.parameters.cap!==g.BUTT,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasOccludees=t.hasOccludees,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.occluder=this.parameters.renderOccluded===l.OccludeAndTransparentStencil,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&c(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=O}intersect(){}createLayout(){const e=a().vec3f(T.POSITION).vec3f(T.PREVPOSITION).vec2f(T.UV0);return this.parameters.worldSpace&&e.vec3f(T.NORMAL),this.parameters.vvSize?e.f32(T.SIZEFEATUREATTRIBUTE):e.f32(T.SIZE),this.parameters.vvColor?e.f32(T.COLORFEATUREATTRIBUTE):e.vec4f(T.COLOR),this.parameters.vvOpacity&&e.f32(T.OPACITYFEATUREATTRIBUTE),e}createBufferWriter(){return new P(this._layout,this.parameters)}createGLMaterial(e){return new R(e)}}class R extends p{constructor(){super(...arguments),this._markerPrimitive=null}dispose(){super.dispose(),this._markerTextures.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){const t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this._material.setParameters(this.textureBindParameters),this.getTechnique(A,e)}}class I extends d{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive="arrow",this.placement="end",this.cap=g.BUTT,this.anchor=E.Center,this.hasTip=!1,this.worldSpace=!1,this.hideOnShortSegments=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.markerTexture=null}}class P{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t}elementCount(){return"begin-end"===this._parameters.placement?12:6}write(i,a,s,n,o,h){const c=s.get(T.POSITION).data,p=c.length/3;let m=[1,0,0];const l=s.get(T.NORMAL);this._parameters.worldSpace&&null!=l&&(m=l.data);let u=1,d=0;this._parameters.vvSize?d=s.get(T.SIZEFEATUREATTRIBUTE).data[0]:s.has(T.SIZE)&&(u=s.get(T.SIZE).data[0]);let f=[1,1,1,1],A=0;this._parameters.vvColor?A=s.get(T.COLORFEATUREATTRIBUTE).data[0]:s.has(T.COLOR)&&(f=s.get(T.COLOR).data);let _=0;this._parameters.vvOpacity&&(_=s.get(T.OPACITYFEATUREATTRIBUTE).data[0]);const v=new Float32Array(o.buffer);let E=h*(this.vertexBufferLayout.stride/4);const g=(e,t,r,i)=>{if(v[E++]=e[0],v[E++]=e[1],v[E++]=e[2],v[E++]=t[0],v[E++]=t[1],v[E++]=t[2],v[E++]=r[0],v[E++]=r[1],this._parameters.worldSpace&&(v[E++]=m[0],v[E++]=m[1],v[E++]=m[2]),this._parameters.vvSize?v[E++]=d:v[E++]=u,this._parameters.vvColor)v[E++]=A;else{const e=Math.min(4*i,f.length-4);v[E++]=f[e],v[E++]=f[e+1],v[E++]=f[e+2],v[E++]=f[e+3]}this._parameters.vvOpacity&&(v[E++]=_)};let O;!function(e){e[e.ASCENDING=1]="ASCENDING",e[e.DESCENDING=-1]="DESCENDING"}(O||(O={}));const S=(a,s)=>{const n=e(L,c[3*a],c[3*a+1],c[3*a+2]),o=C;let h=a+s;do{e(o,c[3*h],c[3*h+1],c[3*h+2]),h+=s}while(t(n,o)&&h>=0&&h<p);i&&(r(n,n,i),r(o,o,i)),g(n,o,[-1,-1],a),g(n,o,[1,-1],a),g(n,o,[1,1],a),g(n,o,[-1,-1],a),g(n,o,[1,1],a),g(n,o,[-1,1],a)},R=this._parameters.placement;"begin"!==R&&"begin-end"!==R||S(0,O.ASCENDING),"end"!==R&&"begin-end"!==R||S(p-1,O.DESCENDING)}}const L=i(),C=i();export{S as LineMarkerMaterial,I as Parameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{i as t,n as e,d as r,e as s,j as o,t as i}from"../../../../chunks/vec32.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newLayout as c}from"../../support/buffer/InterleavedLayout.js";import{isColorOrColorEmission as l}from"../core/shaderLibrary/ShaderOutput.js";import{alphaCutoff as u}from"../core/shaderLibrary/util/AlphaCutoff.js";import f from"../lib/GLMaterial.js";import{Material as p,MaterialParameters as h}from"../lib/Material.js";import{RenderSlot as m}from"../lib/RenderSlot.js";import{VertexAttribute as d}from"../lib/VertexAttribute.js";import{vertexAttributeLocations as g,MeasurementArrowTechnique as O}from"../shaders/MeasurementArrowTechnique.js";import{MeasurementArrowTechniqueConfiguration as A}from"../shaders/MeasurementArrowTechniqueConfiguration.js";class b extends p{constructor(t){super(t,T),this._configuration=new A,this.vertexAttributeLocations=g,this.produces=new Map([[m.OPAQUE_MATERIAL,t=>!this._transparent&&l(t)],[m.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,t=>this._transparent&&l(t)]])}getConfiguration(t,e){return this._configuration.polygonOffsetEnabled=this.parameters.polygonOffset,this._configuration.transparent=this._transparent,this._configuration.oitPass=e.oitPass,this._configuration}get visible(){const{outlineColor:t,stripeEvenColor:e,stripeOddColor:r}=this.parameters;return t[3]>=u||e[3]>=u||r[3]>=u}intersect(){}createGLMaterial(t){return new v(t)}createBufferWriter(){return new E}get _transparent(){const{parameters:t}=this;return t.outlineColor[3]<1||t.stripeEvenColor[3]<1||t.stripeOddColor[3]<1}}class v extends f{beginSlot(t){return this.getTechnique(O,t)}}class T extends h{constructor(){super(...arguments),this.width=32,this.outlineSize=.2,this.outlineColor=a(1,.5,0,1),this.stripeEvenColor=a(1,1,1,1),this.stripeOddColor=a(1,.5,0,1),this.stripeLength=1,this.polygonOffset=!1}}const j=c().vec3f(d.POSITION).vec3f(d.NORMAL).vec2f(d.UV0).f32(d.LENGTH),C=n(),L=n(),_=n(),M=n(),w=n();class E{constructor(){this.vertexBufferLayout=j}elementCount(t){return 2*(t.get(d.POSITION).indices.length/2+1)}write(n,a,c,l,u,f){const{data:p,indices:h}=c.get(d.POSITION),m=c.get(d.NORMAL).data,g=p.length/3;h&&h.length!==2*(g-1)&&console.warn("MeasurementArrowMaterial does not support indices");const O=C,A=L,b=_,v=M,T=w,j=u.position,E=u.normal,I=u.uv0;let x=0;for(let d=0;d<g;++d){const c=3*d;if(t(O,p[c],p[c+1],p[c+2]),d<g-1){const o=3*(d+1);t(A,p[o],p[o+1],p[o+2]),t(T,m[o],m[o+1],m[o+2]),e(T,T),r(b,A,O),e(b,b),s(v,T,b),e(v,v)}const l=o(O,A);n&&a&&(i(O,O,n),i(A,A,n),i(v,v,a));const u=f+2*d,h=u+1;j.setVec(u,O),j.setVec(h,O),E.setVec(u,v),E.setVec(h,v),I.set(u,0,x),I.set(u,1,-1),I.set(h,0,x),I.set(h,1,1),d<g-1&&(x+=l)}const N=u.length;for(let t=0;t<2*g;++t)N.set(f+t,x)}}export{b as MeasurementArrowMaterial,T as Parameters};
5
+ import{i as t,n as e,d as r,e as s,j as o,t as i}from"../../../../chunks/vec32.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newLayout as c}from"../../support/buffer/InterleavedLayout.js";import{isColorOrColorEmission as l}from"../core/shaderLibrary/ShaderOutput.js";import u from"../lib/GLMaterial.js";import{Material as f,MaterialParameters as p}from"../lib/Material.js";import{RenderSlot as h}from"../lib/RenderSlot.js";import{VertexAttribute as m}from"../lib/VertexAttribute.js";import{vertexAttributeLocations as d,MeasurementArrowTechnique as g}from"../shaders/MeasurementArrowTechnique.js";import{MeasurementArrowTechniqueConfiguration as O}from"../shaders/MeasurementArrowTechniqueConfiguration.js";import{alphaCutoff as A}from"../../../../webscene/support/AlphaCutoff.js";class b extends f{constructor(t){super(t,T),this._configuration=new O,this.vertexAttributeLocations=d,this.produces=new Map([[h.OPAQUE_MATERIAL,t=>!this._transparent&&l(t)],[h.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,t=>this._transparent&&l(t)]])}getConfiguration(t,e){return this._configuration.polygonOffsetEnabled=this.parameters.polygonOffset,this._configuration.transparent=this._transparent,this._configuration.oitPass=e.oitPass,this._configuration}get visible(){const{outlineColor:t,stripeEvenColor:e,stripeOddColor:r}=this.parameters;return t[3]>=A||e[3]>=A||r[3]>=A}intersect(){}createGLMaterial(t){return new v(t)}createBufferWriter(){return new E}get _transparent(){const{parameters:t}=this;return t.outlineColor[3]<1||t.stripeEvenColor[3]<1||t.stripeOddColor[3]<1}}class v extends u{beginSlot(t){return this.getTechnique(g,t)}}class T extends p{constructor(){super(...arguments),this.width=32,this.outlineSize=.2,this.outlineColor=a(1,.5,0,1),this.stripeEvenColor=a(1,1,1,1),this.stripeOddColor=a(1,.5,0,1),this.stripeLength=1,this.polygonOffset=!1}}const j=c().vec3f(m.POSITION).vec3f(m.NORMAL).vec2f(m.UV0).f32(m.LENGTH),C=n(),_=n(),L=n(),M=n(),w=n();class E{constructor(){this.vertexBufferLayout=j}elementCount(t){return 2*(t.get(m.POSITION).indices.length/2+1)}write(n,a,c,l,u,f){const{data:p,indices:h}=c.get(m.POSITION),d=c.get(m.NORMAL).data,g=p.length/3;h&&h.length!==2*(g-1)&&console.warn("MeasurementArrowMaterial does not support indices");const O=C,A=_,b=L,v=M,T=w,j=u.position,E=u.normal,I=u.uv0;let x=0;for(let m=0;m<g;++m){const c=3*m;if(t(O,p[c],p[c+1],p[c+2]),m<g-1){const o=3*(m+1);t(A,p[o],p[o+1],p[o+2]),t(T,d[o],d[o+1],d[o+2]),e(T,T),r(b,A,O),e(b,b),s(v,T,b),e(v,v)}const l=o(O,A);n&&a&&(i(O,O,n),i(A,A,n),i(v,v,a));const u=f+2*m,h=u+1;j.setVec(u,O),j.setVec(h,O),E.setVec(u,v),E.setVec(h,v),I.set(u,0,x),I.set(u,1,-1),I.set(h,0,x),I.set(h,1,1),m<g-1&&(x+=l)}const N=u.length;for(let t=0;t<2*g;++t)N.set(f+t,x)}}export{b as MeasurementArrowMaterial,T as Parameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Logger.js";import{clamp as r}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as t}from"../../../../core/screenUtils.js";import{copy as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as i,f as a,h as n,g as c,c as m,l,j as f}from"../../../../chunks/vec32.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{PlaneIndex as h}from"../../../../geometry/support/frustum.js";import{create as g,distance2 as d,fromPoints as j,closestLineSegmentPoint as b}from"../../../../geometry/support/lineSegment.js";import{create as A,fromPoints as S,signedDistance as L,getNormal as x}from"../../../../geometry/support/plane.js";import{isColorHighlightOrOID as y}from"../core/shaderLibrary/ShaderOutput.js";import{alphaCutoff as N}from"../core/shaderLibrary/util/AlphaCutoff.js";import R from"../lib/GLMaterial.js";import{Material as v,MaterialParameters as E}from"../lib/Material.js";import{RenderSlot as M}from"../lib/RenderSlot.js";import{isTranslationMatrix as T}from"../lib/Util.js";import{VertexAttribute as _}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as w}from"./DefaultBufferWriter.js";import{PositionColorLayout as O,PositionLayout as V}from"./DefaultLayouts.js";import{NativeLineTechnique as C}from"../shaders/NativeLineTechnique.js";import{NativeLineTechniqueConfiguration as P}from"../shaders/NativeLineTechniqueConfiguration.js";class U extends v{constructor(e){super(e,q),this._configuration=new P,this.produces=new Map([[M.OPAQUE_MATERIAL,e=>y(e)]])}getConfiguration(e,r){return this._configuration.output=e,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.transparent=this.parameters.color[3]<1||this.parameters.width<1,this._configuration.hasOccludees=r.hasOccludees,this._configuration}get visible(){return this.parameters.color[3]>=N}intersect(r,t,u,p,g,A){if(!u.options.selectionMode||!r.visible)return;if(!T(t))return void e.getLogger("esri.views.3d.webgl-engine.materials.NativeLineMaterial").error("intersection assumes a translation-only matrix");const y=r.attributes.get(_.POSITION).data,N=u.camera,R=H;o(R,u.point);const v=2;s(J[0],R[0]-v,R[1]+v,0),s(J[1],R[0]+v,R[1]+v,0),s(J[2],R[0]+v,R[1]-v,0),s(J[3],R[0]-v,R[1]-v,0);for(let e=0;e<4;e++)if(!N.unprojectFromRenderScreen(J[e],K[e]))return;S(N.eye,K[0],K[1],Y),S(N.eye,K[1],K[2],$),S(N.eye,K[2],K[3],ee),S(N.eye,K[3],K[0],re);let E=Number.MAX_VALUE,M=0;for(let e=0;e<y.length-5;e+=3){if(B[0]=y[e]+t[12],B[1]=y[e+1]+t[13],B[2]=y[e+2]+t[14],D[0]=y[e+3]+t[12],D[1]=y[e+4]+t[13],D[2]=y[e+5]+t[14],L(Y,B)<0&&L(Y,D)<0||L($,B)<0&&L($,D)<0||L(ee,B)<0&&L(ee,D)<0||L(re,B)<0&&L(re,D)<0)continue;if(N.projectToRenderScreen(B,G),N.projectToRenderScreen(D,k),G[2]<0&&k[2]>0){i(W,B,D);const e=N.frustum,r=-L(e[h.NEAR],B)/a(W,x(e[h.NEAR]));n(W,W,r),c(B,B,W),N.projectToRenderScreen(B,G)}else if(G[2]>0&&k[2]<0){i(W,D,B);const e=N.frustum,r=-L(e[h.NEAR],D)/a(W,x(e[h.NEAR]));n(W,W,r),c(D,D,W),N.projectToRenderScreen(D,k)}else if(G[2]<0&&k[2]<0)continue;G[2]=0,k[2]=0;const r=d(j(G,k,Z),R);r<E&&(E=r,m(F,B),m(Q,D),M=e/3)}const w=u.rayBegin,O=u.rayEnd;if(E<v*v){let e=Number.MAX_VALUE;if(b(j(F,Q,Z),j(w,O,z),X)){i(X,X,w);const r=l(X);n(X,X,1/r),e=r/f(w,O)}A(e,X,M,!1)}}intersectDraped(e,t,o,s,i,a){if(!o.options.selectionMode)return;const n=e.attributes.get(_.POSITION).data,c=e.attributes.get(_.SIZE),m=c?c.data[0]:0,l=s[0],f=s[1],u=((m+1)/2+4)*e.screenToWorldRatio;let p=Number.MAX_VALUE,h=0;for(let g=0;g<n.length-5;g+=3){const e=n[g],t=n[g+1],o=l-e,s=f-t,i=n[g+3]-e,a=n[g+4]-t,c=r((i*o+a*s)/(i*i+a*a),0,1),m=i*c-o,u=a*c-s,d=m*m+u*u;d<p&&(p=d,h=g/3)}p<u*u&&i(a.dist,a.normal,h,!1)}createGLMaterial(e){return new I(e)}createBufferWriter(){const e=this.parameters.hasVertexColors?O:V;return new w(e)}}class I extends R{beginSlot(e){return this.getTechnique(C,e)}}class q extends E{constructor(){super(...arguments),this.color=p,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.width=1}}const B=u(),D=u(),W=u(),X=u(),G=t(),k=t(),F=u(),Q=u(),Z=g(),z=g(),H=u(),J=[t(),t(),t(),t()],K=[u(),u(),u(),u()],Y=A(),$=A(),ee=A(),re=A();export{U as NativeLineMaterial,q as Parameters};
5
+ import e from"../../../../core/Logger.js";import{clamp as r}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as t}from"../../../../core/screenUtils.js";import{copy as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as i,f as a,h as n,g as c,c as m,l,j as f}from"../../../../chunks/vec32.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{PlaneIndex as h}from"../../../../geometry/support/frustum.js";import{create as g,distance2 as d,fromPoints as j,closestLineSegmentPoint as b}from"../../../../geometry/support/lineSegment.js";import{create as A,fromPoints as S,signedDistance as x,getNormal as L}from"../../../../geometry/support/plane.js";import{isColorHighlightOrOID as y}from"../core/shaderLibrary/ShaderOutput.js";import N from"../lib/GLMaterial.js";import{Material as R,MaterialParameters as v}from"../lib/Material.js";import{RenderSlot as E}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as T}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as _}from"./DefaultBufferWriter.js";import{PositionColorLayout as w,PositionLayout as O}from"./DefaultLayouts.js";import{NativeLineTechnique as V}from"../shaders/NativeLineTechnique.js";import{NativeLineTechniqueConfiguration as C}from"../shaders/NativeLineTechniqueConfiguration.js";import{alphaCutoff as P}from"../../../../webscene/support/AlphaCutoff.js";class U extends R{constructor(e){super(e,q),this._configuration=new C,this.produces=new Map([[E.OPAQUE_MATERIAL,e=>y(e)]])}getConfiguration(e,r){return this._configuration.output=e,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.transparent=this.parameters.color[3]<1||this.parameters.width<1,this._configuration.hasOccludees=r.hasOccludees,this._configuration}get visible(){return this.parameters.color[3]>=P}intersect(r,t,u,p,g,A){if(!u.options.selectionMode||!r.visible)return;if(!M(t))return void e.getLogger("esri.views.3d.webgl-engine.materials.NativeLineMaterial").error("intersection assumes a translation-only matrix");const y=r.attributes.get(T.POSITION).data,N=u.camera,R=H;o(R,u.point);const v=2;s(J[0],R[0]-v,R[1]+v,0),s(J[1],R[0]+v,R[1]+v,0),s(J[2],R[0]+v,R[1]-v,0),s(J[3],R[0]-v,R[1]-v,0);for(let e=0;e<4;e++)if(!N.unprojectFromRenderScreen(J[e],K[e]))return;S(N.eye,K[0],K[1],Y),S(N.eye,K[1],K[2],$),S(N.eye,K[2],K[3],ee),S(N.eye,K[3],K[0],re);let E=Number.MAX_VALUE,_=0;for(let e=0;e<y.length-5;e+=3){if(B[0]=y[e]+t[12],B[1]=y[e+1]+t[13],B[2]=y[e+2]+t[14],D[0]=y[e+3]+t[12],D[1]=y[e+4]+t[13],D[2]=y[e+5]+t[14],x(Y,B)<0&&x(Y,D)<0||x($,B)<0&&x($,D)<0||x(ee,B)<0&&x(ee,D)<0||x(re,B)<0&&x(re,D)<0)continue;if(N.projectToRenderScreen(B,G),N.projectToRenderScreen(D,k),G[2]<0&&k[2]>0){i(W,B,D);const e=N.frustum,r=-x(e[h.NEAR],B)/a(W,L(e[h.NEAR]));n(W,W,r),c(B,B,W),N.projectToRenderScreen(B,G)}else if(G[2]>0&&k[2]<0){i(W,D,B);const e=N.frustum,r=-x(e[h.NEAR],D)/a(W,L(e[h.NEAR]));n(W,W,r),c(D,D,W),N.projectToRenderScreen(D,k)}else if(G[2]<0&&k[2]<0)continue;G[2]=0,k[2]=0;const r=d(j(G,k,Z),R);r<E&&(E=r,m(F,B),m(Q,D),_=e/3)}const w=u.rayBegin,O=u.rayEnd;if(E<v*v){let e=Number.MAX_VALUE;if(b(j(F,Q,Z),j(w,O,z),X)){i(X,X,w);const r=l(X);n(X,X,1/r),e=r/f(w,O)}A(e,X,_,!1)}}intersectDraped(e,t,o,s,i,a){if(!o.options.selectionMode)return;const n=e.attributes.get(T.POSITION).data,c=e.attributes.get(T.SIZE),m=c?c.data[0]:0,l=s[0],f=s[1],u=((m+1)/2+4)*e.screenToWorldRatio;let p=Number.MAX_VALUE,h=0;for(let g=0;g<n.length-5;g+=3){const e=n[g],t=n[g+1],o=l-e,s=f-t,i=n[g+3]-e,a=n[g+4]-t,c=r((i*o+a*s)/(i*i+a*a),0,1),m=i*c-o,u=a*c-s,d=m*m+u*u;d<p&&(p=d,h=g/3)}p<u*u&&i(a.dist,a.normal,h,!1)}createGLMaterial(e){return new I(e)}createBufferWriter(){const e=this.parameters.hasVertexColors?w:O;return new _(e)}}class I extends N{beginSlot(e){return this.getTechnique(V,e)}}class q extends v{constructor(){super(...arguments),this.color=p,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.width=1}}const B=u(),D=u(),W=u(),X=u(),G=t(),k=t(),F=u(),Q=u(),Z=g(),z=g(),H=u(),J=[t(),t(),t(),t()],K=[u(),u(),u(),u()],Y=A(),$=A(),ee=A(),re=A();export{U as NativeLineMaterial,q as Parameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as e}from"../../../../core/mathUtils.js";import{p as t}from"../../../../chunks/vec32.js";import{ZEROS as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as i}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as a,is3DGeometryOutputMRT as o,isColorOrColorEmission as n,ShaderOutput as h}from"../core/shaderLibrary/ShaderOutput.js";import{EmissionSource as c}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as u}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{alphaCutoff as p}from"../core/shaderLibrary/util/AlphaCutoff.js";import{olidEnabled as l}from"../effects/geometry/olidUtils.js";import f from"../lib/GLMaterial.js";import{Material as d}from"../lib/Material.js";import{isPathGeometry as b}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as g,intersectAabbInvDir as v}from"../lib/RayIntersections.js";import{RenderSlot as S}from"../lib/RenderSlot.js";import{VertexAttribute as _}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as A}from"./DefaultBufferWriter.js";import{vertexAttributeLocations as P,PathTechnique as R,PathPassParameters as j}from"./PathTechnique.js";import{PathTechniqueConfiguration as y}from"./PathTechniqueConfiguration.js";class L extends d{constructor(e,t){super(e,M),this._vertexBufferLayout=O(),this.vertexAttributeLocations=P,this.supportsEdges=!0,this.produces=new Map([[S.OPAQUE_MATERIAL,e=>(this.parameters.castShadows&&a(e)||o(e))&&!this.parameters.transparent],[S.TRANSPARENT_MATERIAL,e=>(this.parameters.castShadows&&a(e)||o(e))&&this.parameters.transparent]]),this._configuration=new y(t.spherical,t.doublePrecisionRequiresObfuscation)}get hasEmissions(){return!t(this.parameters.emissiveFactor,r)}getConfiguration(e,t){return this._configuration.output=e,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.parameters.transparent,this._configuration.hasOccludees=t.hasOccludees,n(e)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?u.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?u.WindingOrder:u.None,this._configuration.receiveShadows=t.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=t.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?m.Schematic:m.Disabled,this._configuration.emissionSource=this.parameters.usePBR?c.Value:c.None,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}isVisibleForOutput(e){return e!==h.Shadow&&e!==h.ShadowExcludeHighlight&&e!==h.ShadowHighlight||this.parameters.castShadows}get visible(){return this.parameters.opacity>=p}intersect(t,r,s,a,o,n){const h=t;if(!b(h))return;const c=h.path,u=[this.parameters.size[0],this.parameters.size[1]];if(this.parameters.vvSize){const{offset:t,factor:r,minSize:i,maxSize:s}=this.parameters.vvSize,a=c.sizeAttributeValue;u[0]*=e(t[0]+a*r[0],i[0],s[0]),u[1]*=e(t[2]+a*r[2],i[2],s[2])}const m=new g(!1,s.options.normalRequired),p=Math.max(u[0],u[1]),l=t.boundingInfo;if(null==l)return void E(c,u,a,o,m,n);const f=i(l.bbMin[0]-p,l.bbMin[1]-p,l.bbMin[2]-p,l.bbMax[0]+p,l.bbMax[1]+p,l.bbMax[2]+p),d=[o[0]-a[0],o[1]-a[1],o[2]-a[2]],S=Math.sqrt(d[0]*d[0]+d[1]*d[1]+d[2]*d[2]),_=[S/d[0],S/d[1],S/d[2]];v(f,a,_,s.tolerance)&&E(c,u,a,o,m,n)}createBufferWriter(){return new A(this._vertexBufferLayout)}createGLMaterial(e){return new T(e)}}function O(){const e=s().vec3f(_.POSITION).vec4f(_.PROFILERIGHT).vec4f(_.PROFILEUP).vec4f(_.PROFILEVERTEXANDNORMAL).vec4f(_.FEATUREVALUE);return l()&&e.vec4u8(_.OBJECTANDLAYERIDCOLOR),e}class T extends f{beginSlot(e){return this.getTechnique(R,e)}}function E(e,t,r,i,s,a){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,a)}class M extends j{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.transparent=!1,this.usePBR=!1}}export{M as Parameters,L as PathMaterial};
5
+ import{clamp as e}from"../../../../core/mathUtils.js";import{p as t}from"../../../../chunks/vec32.js";import{ZEROS as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as r}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as a,is3DGeometryOutputMRT as o,isColorOrColorEmission as n,ShaderOutput as c}from"../core/shaderLibrary/ShaderOutput.js";import{EmissionSource as h}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as u}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as p}from"../effects/geometry/olidUtils.js";import f from"../lib/GLMaterial.js";import{Material as l}from"../lib/Material.js";import{isPathGeometry as d}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as b,intersectAabbInvDir as g}from"../lib/RayIntersections.js";import{RenderSlot as v}from"../lib/RenderSlot.js";import{VertexAttribute as S}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as _}from"./DefaultBufferWriter.js";import{vertexAttributeLocations as A,PathTechnique as P,PathPassParameters as R}from"./PathTechnique.js";import{PathTechniqueConfiguration as j}from"./PathTechniqueConfiguration.js";import{alphaCutoff as O}from"../../../../webscene/support/AlphaCutoff.js";class y extends l{constructor(e,t){super(e,E),this._vertexBufferLayout=L(),this.vertexAttributeLocations=A,this.supportsEdges=!0,this.produces=new Map([[v.OPAQUE_MATERIAL,e=>(this.parameters.castShadows&&a(e)||o(e))&&!this.parameters.transparent],[v.TRANSPARENT_MATERIAL,e=>(this.parameters.castShadows&&a(e)||o(e))&&this.parameters.transparent]]),this._configuration=new j(t.spherical,t.doublePrecisionRequiresObfuscation)}get hasEmissions(){return!t(this.parameters.emissiveFactor,i)}getConfiguration(e,t){return this._configuration.output=e,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.parameters.transparent,this._configuration.hasOccludees=t.hasOccludees,n(e)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?u.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?u.WindingOrder:u.None,this._configuration.receiveShadows=t.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=t.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?m.Schematic:m.Disabled,this._configuration.emissionSource=this.parameters.usePBR?h.Value:h.None,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}isVisibleForOutput(e){return e!==c.Shadow&&e!==c.ShadowExcludeHighlight&&e!==c.ShadowHighlight||this.parameters.castShadows}get visible(){return this.parameters.opacity>=O}intersect(t,i,s,a,o,n){const c=t;if(!d(c))return;const h=c.path,u=[this.parameters.size[0],this.parameters.size[1]];if(this.parameters.vvSize){const{offset:t,factor:i,minSize:r,maxSize:s}=this.parameters.vvSize,a=h.sizeAttributeValue;u[0]*=e(t[0]+a*i[0],r[0],s[0]),u[1]*=e(t[2]+a*i[2],r[2],s[2])}const m=new b(!1,s.options.normalRequired),p=Math.max(u[0],u[1]),f=t.boundingInfo;if(null==f)return void w(h,u,a,o,m,n);const l=r(f.bbMin[0]-p,f.bbMin[1]-p,f.bbMin[2]-p,f.bbMax[0]+p,f.bbMax[1]+p,f.bbMax[2]+p),v=[o[0]-a[0],o[1]-a[1],o[2]-a[2]],S=Math.sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]),_=[S/v[0],S/v[1],S/v[2]];g(l,a,_,s.tolerance)&&w(h,u,a,o,m,n)}createBufferWriter(){return new _(this._vertexBufferLayout)}createGLMaterial(e){return new T(e)}}function L(){const e=s().vec3f(S.POSITION).vec4f(S.PROFILERIGHT).vec4f(S.PROFILEUP).vec4f(S.PROFILEVERTEXANDNORMAL).vec4f(S.FEATUREVALUE);return p()&&e.vec4u8(S.OBJECTANDLAYERIDCOLOR),e}class T extends f{beginSlot(e){return this.getTechnique(P,e)}}function w(e,t,i,r,s,a){e.baked.size&&e.baked.size[0]===t[0]&&e.baked.size[1]===t[1]||e.baked.bake(t),e.baked.intersect(i,r,s,a)}class E extends R{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.transparent=!1,this.usePBR=!1}}export{E as Parameters,y 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.32/esri/copyright.txt for details.
4
4
  */
5
- import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewMat3f as e,BufferViewVec4f as r}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as i,isColorOrColorEmission as o,isDepth as a,isColorEmissionHighlightOrOID as n}from"../core/shaderLibrary/ShaderOutput.js";import{alphaCutoff as f}from"../core/shaderLibrary/util/AlphaCutoff.js";import{olidEnabled as l}from"../effects/geometry/olidUtils.js";import{CullFaceOptions as c}from"../lib/basicInterfaces.js";import u from"../lib/GLMaterial.js";import{OITPolygonOffsetLimit as h}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as p}from"../lib/RenderSlot.js";import{assert as m}from"../lib/Util.js";import{VertexAttribute as d}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as g}from"./DefaultBufferWriter.js";import{Style as A}from"./PatternStyle.js";import{TriangleMaterial as T}from"./TriangleMaterial.js";import{VisualVariablePassParameters as b}from"./VisualVariablePassParameters.js";import{writeDefaultAttributes as v,writeBufferVec4 as O}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocationsOID as _,vertexAttributeLocations as j,PatternTechnique as C}from"../shaders/PatternTechnique.js";import{PatternTechniqueConfiguration as E}from"../shaders/PatternTechniqueConfiguration.js";class P extends T{constructor(t){super(t,I),this._configuration=new E,this.vertexAttributeLocations=l()?_:j,this.supportsEdges=!0,this.produces=new Map([[p.OPAQUE_MATERIAL,t=>i(t)],[p.TRANSPARENT_MATERIAL,t=>o(t)],[p.TRANSPARENT_MATERIAL_WITHOUT_NORMALS,t=>a(t)],[p.DRAPED_MATERIAL,t=>this.parameters.draped&&n(t)]])}getConfiguration(t,e){return this._configuration.output=t,this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.style=this.parameters.style,this._configuration.draped=this.parameters.draped,this._configuration.oitPass=e.oitPass,this._configuration.enableOffset=e.camera.relativeElevation<h,this._configuration.terrainDepthTest=e.terrainDepthTest&&o(t),this._configuration.cullAboveTerrain=e.cullAboveTerrain,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration}get visible(){return this.parameters.color[3]>=f}createGLMaterial(t){return new R(t)}createBufferWriter(){const t=s().vec3f(d.POSITION).vec4f(d.UVMAPSPACE);return this.parameters.draped||t.mat3f(d.BOUNDINGRECT),this.parameters.vvColor?t.f32(d.COLORFEATUREATTRIBUTE):t.vec4u8(d.COLOR),l()&&t.vec4u8(d.OBJECTANDLAYERIDCOLOR),new y(t)}}class R extends u{beginSlot(t){return this.getTechnique(C,t)}}class y extends g{write(t,s,i,o,a,n){v(i,o,this.vertexBufferLayout,t,s,a,n);for(const f of this.vertexBufferLayout.fields.keys()){const s=i.get(f),o=s?.indices;if(s&&o)switch(f){case d.UVMAPSPACE:{m(4===s.size);const t=a.getField(f,r);t&&O(s,t,n);break}case d.BOUNDINGRECT:{m(9===s.size);const r=a.getField(f,e);r&&L(s,t,r,n);break}}}}}function L(t,e,r,s){const{data:i,indices:o}=t,a=e,n=r.typedBuffer,f=r.typedBufferStride,l=o.length;s*=f;for(let c=0;c<l;++c){const t=9*o[c],e=i[t],r=i[t+1],l=i[t+2];n[s]=a[0]*e+a[4]*r+a[8]*l+a[12],n[s+1]=a[1]*e+a[5]*r+a[9]*l+a[13],n[s+2]=a[2]*e+a[6]*r+a[10]*l+a[14];for(let o=3;o<9;++o)n[s+o]=i[t+o];s+=f}}class I extends b{constructor(){super(...arguments),this.color=t(1,1,1,1),this.hasVertexColors=!1,this.polygonOffset=!1,this.hasSlicePlane=!1,this.cullFace=c.None,this.hasOccludees=!1,this.style=A.Cross,this.draped=!0}}export{I as Parameters,P as PatternMaterial};
5
+ import{fromValues as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewMat3f as t,BufferViewVec4f as r}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as i,isColorOrColorEmission as o,isDepth as a,isColorEmissionHighlightOrOID as n}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as f}from"../effects/geometry/olidUtils.js";import{CullFaceOptions as c}from"../lib/basicInterfaces.js";import l from"../lib/GLMaterial.js";import{OITPolygonOffsetLimit as u}from"../lib/OrderIndependentTransparency.js";import{RenderSlot as p}from"../lib/RenderSlot.js";import{assert as h}from"../lib/Util.js";import{VertexAttribute as m}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as d}from"./DefaultBufferWriter.js";import{Style as g}from"./PatternStyle.js";import{TriangleMaterial as A}from"./TriangleMaterial.js";import{VisualVariablePassParameters as T}from"./VisualVariablePassParameters.js";import{writeDefaultAttributes as b,writeBufferVec4 as v}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocationsOID as O,vertexAttributeLocations as _,PatternTechnique as j}from"../shaders/PatternTechnique.js";import{PatternTechniqueConfiguration as C}from"../shaders/PatternTechniqueConfiguration.js";import{alphaCutoff as E}from"../../../../webscene/support/AlphaCutoff.js";class P extends A{constructor(e){super(e,I),this._configuration=new C,this.vertexAttributeLocations=f()?O:_,this.supportsEdges=!0,this.produces=new Map([[p.OPAQUE_MATERIAL,e=>i(e)],[p.TRANSPARENT_MATERIAL,e=>o(e)],[p.TRANSPARENT_MATERIAL_WITHOUT_NORMALS,e=>a(e)],[p.DRAPED_MATERIAL,e=>this.parameters.draped&&n(e)]])}getConfiguration(e,t){return this._configuration.output=e,this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.style=this.parameters.style,this._configuration.draped=this.parameters.draped,this._configuration.oitPass=t.oitPass,this._configuration.enableOffset=t.camera.relativeElevation<u,this._configuration.terrainDepthTest=t.terrainDepthTest&&o(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration}get visible(){return this.parameters.color[3]>=E}createGLMaterial(e){return new R(e)}createBufferWriter(){const e=s().vec3f(m.POSITION).vec4f(m.UVMAPSPACE);return this.parameters.draped||e.mat3f(m.BOUNDINGRECT),this.parameters.vvColor?e.f32(m.COLORFEATUREATTRIBUTE):e.vec4u8(m.COLOR),f()&&e.vec4u8(m.OBJECTANDLAYERIDCOLOR),new y(e)}}class R extends l{beginSlot(e){return this.getTechnique(j,e)}}class y extends d{write(e,s,i,o,a,n){b(i,o,this.vertexBufferLayout,e,s,a,n);for(const f of this.vertexBufferLayout.fields.keys()){const s=i.get(f),o=s?.indices;if(s&&o)switch(f){case m.UVMAPSPACE:{h(4===s.size);const e=a.getField(f,r);e&&v(s,e,n);break}case m.BOUNDINGRECT:{h(9===s.size);const r=a.getField(f,t);r&&L(s,e,r,n);break}}}}}function L(e,t,r,s){const{data:i,indices:o}=e,a=t,n=r.typedBuffer,f=r.typedBufferStride,c=o.length;s*=f;for(let l=0;l<c;++l){const e=9*o[l],t=i[e],r=i[e+1],c=i[e+2];n[s]=a[0]*t+a[4]*r+a[8]*c+a[12],n[s+1]=a[1]*t+a[5]*r+a[9]*c+a[13],n[s+2]=a[2]*t+a[6]*r+a[10]*c+a[14];for(let o=3;o<9;++o)n[s+o]=i[e+o];s+=f}}class I extends T{constructor(){super(...arguments),this.color=e(1,1,1,1),this.hasVertexColors=!1,this.polygonOffset=!1,this.hasSlicePlane=!1,this.cullFace=c.None,this.hasOccludees=!1,this.style=g.Cross,this.draped=!0}}export{I as Parameters,P 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.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as r}from"../../../../core/screenUtils.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as a,f as n,h as o,g as l,c,l as p,j as h,t as f}from"../../../../chunks/vec32.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as u}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{PlaneIndex as T}from"../../../../geometry/support/frustum.js";import{create as d,distance2 as _,fromPoints as E,closestLineSegmentPoint as A}from"../../../../geometry/support/lineSegment.js";import{create as R,fromPoints as O,signedDistance as g,getNormal as I}from"../../../../geometry/support/plane.js";import{newLayout as S}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as v,isColorOrColorEmission as P,isDepth as N,isColorEmissionHighlightOIDOrDepth as L,is2DGeometryOutput as b,ShaderOutput as C}from"../core/shaderLibrary/ShaderOutput.js";import{alphaCutoff as U}from"../core/shaderLibrary/util/AlphaCutoff.js";import{olidEnabled as y}from"../effects/geometry/olidUtils.js";import D from"../lib/GLMaterial.js";import{Material as j,RenderOccludedFlag as F}from"../lib/Material.js";import{RenderSlot as w}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as x}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as B}from"./VisualVariablePassParameters.js";import{LineMarkerAnchor as J}from"../shaders/LineMarkerTechniqueConfiguration.js";import{r as H}from"../../../../chunks/RibbonLine.glsl.js";import{vertexAttributeLocations as z,RibbonLineTechnique as G}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as k,CapType as V}from"../shaders/RibbonLineTechniqueConfiguration.js";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 W extends j{constructor(e){super(e,q),this._configuration=new k,this.vertexAttributeLocations=z,this.produces=new Map([[w.OPAQUE_MATERIAL,e=>v(e)||P(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>N(e)],[w.OCCLUDER_MATERIAL,e=>L(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_OCCLUDER_MATERIAL,e=>L(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL,e=>P(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>P(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.DRAPED_MATERIAL,e=>b(e)]])}getConfiguration(e,t){this._configuration.output=e,this._configuration.oitPass=t.oitPass,this._configuration.draped=t.slot===w.DRAPED_MATERIAL;const r=null!=this.parameters.stipplePattern&&e!==C.Highlight;return this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&$(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=this.parameters.renderOccluded===F.OccludeAndTransparentStencil,this._configuration.terrainDepthTest=t.terrainDepthTest&&P(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration}get visible(){return this.parameters.color[3]>=U||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>U}intersectDraped({attributes:e,screenToWorldRatio:r},i,s,a,n,o){if(!s.options.selectionMode)return;const l=e.get(x.SIZE);let c=this.parameters.width;if(this.parameters.vvSize){const r=e.get(x.SIZEFEATUREATTRIBUTE).data[0];c*=t(this.parameters.vvSize.offset[0]+r*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else l&&(c*=l.data[0]);const p=a[0],h=a[1],f=(c/2+4)*r;let m=Number.MAX_VALUE,u=0;const T=e.get(x.POSITION).data,d=K(this.parameters,e)?T.length-2:T.length-5;for(let _=0;_<d;_+=3){const e=T[_],r=T[_+1],i=(_+3)%T.length,s=p-e,a=h-r,n=T[i]-e,o=T[i+1]-r,l=t((n*s+o*a)/(n*n+o*o),0,1),c=n*l-s,f=o*l-a,d=c*c+f*f;d<m&&(m=d,u=_/3)}m<f*f&&n(o.dist,o.normal,u,!1)}intersect(r,f,m,u,d,R){if(!m.options.selectionMode||!r.visible)return;if(!M(f))return void e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const S=r.attributes,v=S.get(x.POSITION).data;let P=this.parameters.width;if(this.parameters.vvSize){const e=S.get(x.SIZEFEATUREATTRIBUTE).data[0];P*=t(this.parameters.vvSize.offset[0]+e*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else S.has(x.SIZE)&&(P*=S.get(x.SIZE).data[0]);const N=m.camera,L=se;i(L,m.point);const b=P*N.pixelRatio/2+4*N.pixelRatio;s(ue[0],L[0]-b,L[1]+b,0),s(ue[1],L[0]+b,L[1]+b,0),s(ue[2],L[0]+b,L[1]-b,0),s(ue[3],L[0]-b,L[1]-b,0);for(let e=0;e<4;e++)if(!N.unprojectFromRenderScreen(ue[e],Te[e]))return;O(N.eye,Te[0],Te[1],de),O(N.eye,Te[1],Te[2],_e),O(N.eye,Te[2],Te[3],Ee),O(N.eye,Te[3],Te[0],Ae);let C=Number.MAX_VALUE,U=0;const y=K(this.parameters,S)?v.length-2:v.length-5;for(let e=0;e<y;e+=3){ee[0]=v[e]+f[12],ee[1]=v[e+1]+f[13],ee[2]=v[e+2]+f[14];const t=(e+3)%v.length;if(te[0]=v[t]+f[12],te[1]=v[t+1]+f[13],te[2]=v[t+2]+f[14],g(de,ee)<0&&g(de,te)<0||g(_e,ee)<0&&g(_e,te)<0||g(Ee,ee)<0&&g(Ee,te)<0||g(Ae,ee)<0&&g(Ae,te)<0)continue;if(N.projectToRenderScreen(ee,ae),N.projectToRenderScreen(te,ne),ae[2]<0&&ne[2]>0){a(re,ee,te);const e=N.frustum,t=-g(e[T.NEAR],ee)/n(re,I(e[T.NEAR]));o(re,re,t),l(ee,ee,re),N.projectToRenderScreen(ee,ae)}else if(ae[2]>0&&ne[2]<0){a(re,te,ee);const e=N.frustum,t=-g(e[T.NEAR],te)/n(re,I(e[T.NEAR]));o(re,re,t),l(te,te,re),N.projectToRenderScreen(te,ne)}else if(ae[2]<0&&ne[2]<0)continue;ae[2]=0,ne[2]=0;const r=_(E(ae,ne,ce),L);r<C&&(C=r,c(oe,ee),c(le,te),U=e/3)}const D=m.rayBegin,j=m.rayEnd;if(C<b*b){let e=Number.MAX_VALUE;if(A(E(oe,le,ce),E(D,j,pe),ie)){a(ie,ie,D);const t=p(ie);o(ie,ie,1/t),e=t/h(D,j)}R(e,ie,U,!1)}}get _layout(){const e=S().vec3f(x.POSITION).vec3f(x.PREVPOSITION).vec3f(x.NEXTPOSITION).f32(x.SUBDIVISIONFACTOR).vec2f(x.UV0);return this.parameters.vvSize?e.f32(x.SIZEFEATUREATTRIBUTE):e.f32(x.SIZE),this.parameters.vvColor?e.f32(x.COLORFEATUREATTRIBUTE):e.vec4f(x.COLOR),this.parameters.vvOpacity&&e.f32(x.OPACITYFEATUREATTRIBUTE),y()&&e.vec4u8(x.OBJECTANDLAYERIDCOLOR),e}createBufferWriter(){return new X(this._layout,this.parameters)}createGLMaterial(e){return new Y(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}}class Y extends D{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const t=this._material.parameters.stipplePattern;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(G,e)}}class q extends B{constructor(){super(...arguments),this.width=0,this.color=u,this.join="miter",this.cap=V.BUTT,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1}get transparent(){return this.color[3]<1||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}}class X{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t,this.numJoinSubdivisions=0;const r=t.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=H+r}}_isClosed(e){return K(this._parameters,e)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.get(x.POSITION).indices.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,a,n){const o=he,l=fe,p=me,m=r.get(x.POSITION),u=m.indices,T=m.data.length/3,d=r.get(x.DISTANCETOSTART)?.data;u&&u.length!==2*(T-1)&&console.warn("RibbonLineMaterial does not support indices");const _=r.get(x.SIZEFEATUREATTRIBUTE)?.data[0]??r.get(x.SIZE)?.data[0]??1;let E=[1,1,1,1],A=0;const R=this.vertexBufferLayout.fields.has(x.COLORFEATUREATTRIBUTE);R?A=r.get(x.COLORFEATUREATTRIBUTE).data[0]:r.has(x.COLOR)&&(E=r.get(x.COLOR).data);const O=this.vertexBufferLayout.fields.has(x.OPACITYFEATUREATTRIBUTE),g=O?r.get(x.OPACITYFEATUREATTRIBUTE).data[0]:0,I=new Float32Array(a.buffer),S=y()?new Uint8Array(a.buffer):null,v=this.vertexBufferLayout.stride/4;let P=n*v;const N=P;let L=0;const b=d?(e,t,r)=>L=d[r]:(e,t,r)=>L+=h(e,t),C=(e,t,r,s,a,n,o)=>{if(I[P++]=t[0],I[P++]=t[1],I[P++]=t[2],I[P++]=e[0],I[P++]=e[1],I[P++]=e[2],I[P++]=r[0],I[P++]=r[1],I[P++]=r[2],I[P++]=s,I[P++]=o,I[P++]=a,I[P++]=_,R)I[P++]=A;else{const e=Math.min(4*n,E.length-4);I[P++]=E[e],I[P++]=E[e+1],I[P++]=E[e+2],I[P++]=E[e+3]}O&&(I[P++]=g),y()&&(i&&(S[4*P]=i[0],S[4*P+1]=i[1],S[4*P+2]=i[2],S[4*P+3]=i[3]),P++)};P+=v,s(l,m.data[0],m.data[1],m.data[2]),e&&f(l,l,e);const U=this._isClosed(r);if(U){const t=m.data.length-3;s(o,m.data[t],m.data[t+1],m.data[t+2]),e&&f(o,o,e)}else s(p,m.data[3],m.data[4],m.data[5]),e&&f(p,p,e),C(l,l,p,1,Z.LEFT_CAP_START,0,0),C(l,l,p,1,Z.RIGHT_CAP_START,0,0),c(o,l),c(l,p);const D=U?0:1,j=U?T:T-1;for(let h=D;h<j;h++){const t=(h+1)%T*3;s(p,m.data[t],m.data[t+1],m.data[t+2]),e&&f(p,p,e),b(o,l,h),C(o,l,p,0,Z.LEFT_JOIN_END,h,L),C(o,l,p,0,Z.RIGHT_JOIN_END,h,L);const r=this.numJoinSubdivisions;for(let e=0;e<r;++e){const t=(e+1)/(r+1);C(o,l,p,t,Z.LEFT_JOIN_END,h,L),C(o,l,p,t,Z.RIGHT_JOIN_END,h,L)}C(o,l,p,1,Z.LEFT_JOIN_START,h,L),C(o,l,p,1,Z.RIGHT_JOIN_START,h,L),c(o,l),c(l,p)}U?(s(p,m.data[3],m.data[4],m.data[5]),e&&f(p,p,e),L=b(o,l,j),C(o,l,p,0,Z.LEFT_JOIN_END,D,L),C(o,l,p,0,Z.RIGHT_JOIN_END,D,L)):(L=b(o,l,j),C(o,l,l,0,Z.LEFT_CAP_END,j,L),C(o,l,l,0,Z.RIGHT_CAP_END,j,L)),Q(I,N+v,I,N,v);P=Q(I,P-v,I,P,v),this._parameters.wireframe&&this._addWireframeVertices(a,N,P,v)}_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=Q(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 Q(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function K(e,t){if(!e.isClosed)return!1;return t.get(x.POSITION).indices.length>2}function $(e){return e.anchor===J.Tip&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}const ee=m(),te=m(),re=m(),ie=m(),se=m(),ae=r(),ne=r(),oe=m(),le=m(),ce=d(),pe=d(),he=m(),fe=m(),me=m(),ue=[r(),r(),r(),r()],Te=[m(),m(),m(),m()],de=R(),_e=R(),Ee=R(),Ae=R();export{q as Parameters,W as RibbonLineMaterial};
5
+ import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as r}from"../../../../core/screenUtils.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as a,f as n,h as o,g as l,c,l as p,j as h,t as f}from"../../../../chunks/vec32.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as u}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{PlaneIndex as T}from"../../../../geometry/support/frustum.js";import{create as d,distance2 as _,fromPoints as E,closestLineSegmentPoint as A}from"../../../../geometry/support/lineSegment.js";import{create as R,fromPoints as O,signedDistance as g,getNormal as I}from"../../../../geometry/support/plane.js";import{newLayout as S}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as v,isColorOrColorEmission as P,isDepth as N,isColorEmissionHighlightOIDOrDepth as L,is2DGeometryOutput as b,ShaderOutput as C}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as U}from"../effects/geometry/olidUtils.js";import y from"../lib/GLMaterial.js";import{Material as D,RenderOccludedFlag as j}from"../lib/Material.js";import{RenderSlot as F}from"../lib/RenderSlot.js";import{isTranslationMatrix as w}from"../lib/Util.js";import{VertexAttribute as M}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as x}from"./VisualVariablePassParameters.js";import{LineMarkerAnchor as B}from"../shaders/LineMarkerTechniqueConfiguration.js";import{r as J}from"../../../../chunks/RibbonLine.glsl.js";import{vertexAttributeLocations as H,RibbonLineTechnique as z}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as G,CapType as k}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as V}from"../../../../webscene/support/AlphaCutoff.js";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 W extends D{constructor(e){super(e,q),this._configuration=new G,this.vertexAttributeLocations=H,this.produces=new Map([[F.OPAQUE_MATERIAL,e=>v(e)||P(e)&&this.parameters.renderOccluded===j.OccludeAndTransparentStencil],[F.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>N(e)],[F.OCCLUDER_MATERIAL,e=>L(e)&&this.parameters.renderOccluded===j.OccludeAndTransparentStencil],[F.TRANSPARENT_OCCLUDER_MATERIAL,e=>L(e)&&this.parameters.renderOccluded===j.OccludeAndTransparentStencil],[F.TRANSPARENT_MATERIAL,e=>P(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==j.OccludeAndTransparentStencil],[F.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>P(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==j.OccludeAndTransparentStencil],[F.DRAPED_MATERIAL,e=>b(e)]])}getConfiguration(e,t){this._configuration.output=e,this._configuration.oitPass=t.oitPass,this._configuration.draped=t.slot===F.DRAPED_MATERIAL;const r=null!=this.parameters.stipplePattern&&e!==C.Highlight;return this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&$(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=this.parameters.renderOccluded===j.OccludeAndTransparentStencil,this._configuration.terrainDepthTest=t.terrainDepthTest&&P(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration}get visible(){return this.parameters.color[3]>=V||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>V}intersectDraped({attributes:e,screenToWorldRatio:r},i,s,a,n,o){if(!s.options.selectionMode)return;const l=e.get(M.SIZE);let c=this.parameters.width;if(this.parameters.vvSize){const r=e.get(M.SIZEFEATUREATTRIBUTE).data[0];c*=t(this.parameters.vvSize.offset[0]+r*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else l&&(c*=l.data[0]);const p=a[0],h=a[1],f=(c/2+4)*r;let m=Number.MAX_VALUE,u=0;const T=e.get(M.POSITION).data,d=K(this.parameters,e)?T.length-2:T.length-5;for(let _=0;_<d;_+=3){const e=T[_],r=T[_+1],i=(_+3)%T.length,s=p-e,a=h-r,n=T[i]-e,o=T[i+1]-r,l=t((n*s+o*a)/(n*n+o*o),0,1),c=n*l-s,f=o*l-a,d=c*c+f*f;d<m&&(m=d,u=_/3)}m<f*f&&n(o.dist,o.normal,u,!1)}intersect(r,f,m,u,d,R){if(!m.options.selectionMode||!r.visible)return;if(!w(f))return void e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const S=r.attributes,v=S.get(M.POSITION).data;let P=this.parameters.width;if(this.parameters.vvSize){const e=S.get(M.SIZEFEATUREATTRIBUTE).data[0];P*=t(this.parameters.vvSize.offset[0]+e*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else S.has(M.SIZE)&&(P*=S.get(M.SIZE).data[0]);const N=m.camera,L=se;i(L,m.point);const b=P*N.pixelRatio/2+4*N.pixelRatio;s(ue[0],L[0]-b,L[1]+b,0),s(ue[1],L[0]+b,L[1]+b,0),s(ue[2],L[0]+b,L[1]-b,0),s(ue[3],L[0]-b,L[1]-b,0);for(let e=0;e<4;e++)if(!N.unprojectFromRenderScreen(ue[e],Te[e]))return;O(N.eye,Te[0],Te[1],de),O(N.eye,Te[1],Te[2],_e),O(N.eye,Te[2],Te[3],Ee),O(N.eye,Te[3],Te[0],Ae);let C=Number.MAX_VALUE,U=0;const y=K(this.parameters,S)?v.length-2:v.length-5;for(let e=0;e<y;e+=3){ee[0]=v[e]+f[12],ee[1]=v[e+1]+f[13],ee[2]=v[e+2]+f[14];const t=(e+3)%v.length;if(te[0]=v[t]+f[12],te[1]=v[t+1]+f[13],te[2]=v[t+2]+f[14],g(de,ee)<0&&g(de,te)<0||g(_e,ee)<0&&g(_e,te)<0||g(Ee,ee)<0&&g(Ee,te)<0||g(Ae,ee)<0&&g(Ae,te)<0)continue;if(N.projectToRenderScreen(ee,ae),N.projectToRenderScreen(te,ne),ae[2]<0&&ne[2]>0){a(re,ee,te);const e=N.frustum,t=-g(e[T.NEAR],ee)/n(re,I(e[T.NEAR]));o(re,re,t),l(ee,ee,re),N.projectToRenderScreen(ee,ae)}else if(ae[2]>0&&ne[2]<0){a(re,te,ee);const e=N.frustum,t=-g(e[T.NEAR],te)/n(re,I(e[T.NEAR]));o(re,re,t),l(te,te,re),N.projectToRenderScreen(te,ne)}else if(ae[2]<0&&ne[2]<0)continue;ae[2]=0,ne[2]=0;const r=_(E(ae,ne,ce),L);r<C&&(C=r,c(oe,ee),c(le,te),U=e/3)}const D=m.rayBegin,j=m.rayEnd;if(C<b*b){let e=Number.MAX_VALUE;if(A(E(oe,le,ce),E(D,j,pe),ie)){a(ie,ie,D);const t=p(ie);o(ie,ie,1/t),e=t/h(D,j)}R(e,ie,U,!1)}}get _layout(){const e=S().vec3f(M.POSITION).vec3f(M.PREVPOSITION).vec3f(M.NEXTPOSITION).f32(M.SUBDIVISIONFACTOR).vec2f(M.UV0);return this.parameters.vvSize?e.f32(M.SIZEFEATUREATTRIBUTE):e.f32(M.SIZE),this.parameters.vvColor?e.f32(M.COLORFEATUREATTRIBUTE):e.vec4f(M.COLOR),this.parameters.vvOpacity&&e.f32(M.OPACITYFEATUREATTRIBUTE),U()&&e.vec4u8(M.OBJECTANDLAYERIDCOLOR),e}createBufferWriter(){return new X(this._layout,this.parameters)}createGLMaterial(e){return new Y(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}}class Y extends y{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const t=this._material.parameters.stipplePattern;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(z,e)}}class q extends x{constructor(){super(...arguments),this.width=0,this.color=u,this.join="miter",this.cap=k.BUTT,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1}get transparent(){return this.color[3]<1||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}}class X{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t,this.numJoinSubdivisions=0;const r=t.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=J+r}}_isClosed(e){return K(this._parameters,e)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.get(M.POSITION).indices.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,a,n){const o=he,l=fe,p=me,m=r.get(M.POSITION),u=m.indices,T=m.data.length/3,d=r.get(M.DISTANCETOSTART)?.data;u&&u.length!==2*(T-1)&&console.warn("RibbonLineMaterial does not support indices");const _=r.get(M.SIZEFEATUREATTRIBUTE)?.data[0]??r.get(M.SIZE)?.data[0]??1;let E=[1,1,1,1],A=0;const R=this.vertexBufferLayout.fields.has(M.COLORFEATUREATTRIBUTE);R?A=r.get(M.COLORFEATUREATTRIBUTE).data[0]:r.has(M.COLOR)&&(E=r.get(M.COLOR).data);const O=this.vertexBufferLayout.fields.has(M.OPACITYFEATUREATTRIBUTE),g=O?r.get(M.OPACITYFEATUREATTRIBUTE).data[0]:0,I=new Float32Array(a.buffer),S=U()?new Uint8Array(a.buffer):null,v=this.vertexBufferLayout.stride/4;let P=n*v;const N=P;let L=0;const b=d?(e,t,r)=>L=d[r]:(e,t,r)=>L+=h(e,t),C=(e,t,r,s,a,n,o)=>{if(I[P++]=t[0],I[P++]=t[1],I[P++]=t[2],I[P++]=e[0],I[P++]=e[1],I[P++]=e[2],I[P++]=r[0],I[P++]=r[1],I[P++]=r[2],I[P++]=s,I[P++]=o,I[P++]=a,I[P++]=_,R)I[P++]=A;else{const e=Math.min(4*n,E.length-4);I[P++]=E[e],I[P++]=E[e+1],I[P++]=E[e+2],I[P++]=E[e+3]}O&&(I[P++]=g),U()&&(i&&(S[4*P]=i[0],S[4*P+1]=i[1],S[4*P+2]=i[2],S[4*P+3]=i[3]),P++)};P+=v,s(l,m.data[0],m.data[1],m.data[2]),e&&f(l,l,e);const y=this._isClosed(r);if(y){const t=m.data.length-3;s(o,m.data[t],m.data[t+1],m.data[t+2]),e&&f(o,o,e)}else s(p,m.data[3],m.data[4],m.data[5]),e&&f(p,p,e),C(l,l,p,1,Z.LEFT_CAP_START,0,0),C(l,l,p,1,Z.RIGHT_CAP_START,0,0),c(o,l),c(l,p);const D=y?0:1,j=y?T:T-1;for(let h=D;h<j;h++){const t=(h+1)%T*3;s(p,m.data[t],m.data[t+1],m.data[t+2]),e&&f(p,p,e),b(o,l,h),C(o,l,p,0,Z.LEFT_JOIN_END,h,L),C(o,l,p,0,Z.RIGHT_JOIN_END,h,L);const r=this.numJoinSubdivisions;for(let e=0;e<r;++e){const t=(e+1)/(r+1);C(o,l,p,t,Z.LEFT_JOIN_END,h,L),C(o,l,p,t,Z.RIGHT_JOIN_END,h,L)}C(o,l,p,1,Z.LEFT_JOIN_START,h,L),C(o,l,p,1,Z.RIGHT_JOIN_START,h,L),c(o,l),c(l,p)}y?(s(p,m.data[3],m.data[4],m.data[5]),e&&f(p,p,e),L=b(o,l,j),C(o,l,p,0,Z.LEFT_JOIN_END,D,L),C(o,l,p,0,Z.RIGHT_JOIN_END,D,L)):(L=b(o,l,j),C(o,l,l,0,Z.LEFT_CAP_END,j,L),C(o,l,l,0,Z.RIGHT_CAP_END,j,L)),Q(I,N+v,I,N,v);P=Q(I,P-v,I,P,v),this._parameters.wireframe&&this._addWireframeVertices(a,N,P,v)}_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=Q(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 Q(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function K(e,t){if(!e.isClosed)return!1;return t.get(M.POSITION).indices.length>2}function $(e){return e.anchor===B.Tip&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}const ee=m(),te=m(),re=m(),ie=m(),se=m(),ae=r(),ne=r(),oe=m(),le=m(),ce=d(),pe=d(),he=m(),fe=m(),me=m(),ue=[r(),r(),r(),r()],Te=[m(),m(),m(),m()],de=R(),_e=R(),Ee=R(),Ae=R();export{q as Parameters,W 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.32/esri/copyright.txt for details.
4
4
  */
5
- import{n as e,i as t,h as r,g as i}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{center as o,scale as n}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as c}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as h}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as l,isColorOrOID as p,isColorOrColorEmission as u}from"../core/shaderLibrary/ShaderOutput.js";import{alphaCutoff as f}from"../core/shaderLibrary/util/AlphaCutoff.js";import{CullFaceOptions as m}from"../lib/basicInterfaces.js";import d from"../lib/GLMaterial.js";import{Material as S,MaterialParameters as b}from"../lib/Material.js";import{intersectTriangleGeometry as g}from"../lib/RayIntersections.js";import{RenderSlot as T}from"../lib/RenderSlot.js";import{assert as E}from"../lib/Util.js";import{VertexAttribute as A}from"../lib/VertexAttribute.js";import{writeDefaultAttributes as j,writePosition as F}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocations as _,ShadedColorMaterialTechnique as v}from"../shaders/ShadedColorMaterialTechnique.js";import{ShadedColorMaterialTechniqueConfiguration as w}from"../shaders/ShadedColorMaterialTechniqueConfiguration.js";class x extends S{constructor(e){super(e,O),this._configuration=new w,this.vertexAttributeLocations=_,this.supportsEdges=!0,this.produces=new Map([[T.OPAQUE_MATERIAL,e=>e===l.Highlight||p(e)&&!this.parameters.transparent],[T.TRANSPARENT_MATERIAL,e=>p(e)&&this.parameters.transparent&&this.parameters.writeDepth],[T.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>p(e)&&this.parameters.transparent&&!this.parameters.writeDepth]])}getConfiguration(e,t){return this._configuration.output=e,this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.screenSizeEnabled=this.parameters.screenSizeEnabled,this._configuration.shadingEnabled=this.parameters.shadingEnabled,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&u(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=f}intersect(e,s,a,c,h,l){if(this.parameters.screenSizeEnabled){const s=e.attributes.get(A.OFFSET),p={applyToVertex:(e,o,n,c)=>{const h=t(P,s.data[3*c],s.data[3*c+1],s.data[3*c+2]),l=t(L,e,o,n);return r(h,h,this.parameters.screenSizeScale*a.camera.computeScreenPixelSizeAt(h)),i(l,l,h),[l[0],l[1],l[2]]},applyToAabb:e=>{const t=o(e,P);return n(e,this.parameters.screenSizeScale*a.camera.computeScreenPixelSizeAt(t))}};g(e,a,c,h,p,l)}else g(e,a,c,h,void 0,l)}createGLMaterial(e){return new z(e)}createBufferWriter(){return new M(this.parameters.screenSizeEnabled)}}class z extends d{beginSlot(e){return this.getTechnique(v,e)}}class O extends b{constructor(){super(...arguments),this.color=a(1,1,1,1),this.shadingTint=a(0,0,0,.25),this.shadingDirection=e(s(),[.5,-.5,-.5]),this.screenSizeScale=14,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.cullFace=m.None,this.screenSizeEnabled=!1,this.shadingEnabled=!0}get transparent(){return this.color[3]<1||this.forceTransparentMode}}class M{constructor(e){this.screenSizeEnabled=e;const t=h().vec3f(A.POSITION).vec3f(A.NORMAL);this.screenSizeEnabled&&t.vec3f(A.OFFSET),this.vertexBufferLayout=t}elementCount(e){return e.get(A.POSITION).indices.length}write(e,t,r,i,s,a){if(j(r,i,this.vertexBufferLayout,e,t,s,a),this.screenSizeEnabled){if(!r.has(A.OFFSET))throw new Error(`${A.OFFSET} vertex attribute required for screenSizeEnabled ShadedColorMaterial`);{const e=r.get(A.OFFSET);E(3===e.size);const i=s.getField(A.OFFSET,c);if(!i)throw new Error("unable to acquire view for "+A.OFFSET);F(e,t,i,a)}}}}const P=s(),L=s();export{O as Parameters,x as ShadedColorMaterial};
5
+ import{n as e,i as t,h as r,g as i}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{center as o,scale as n}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as c}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as h}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as l,isColorOrOID as p,isColorOrColorEmission as u}from"../core/shaderLibrary/ShaderOutput.js";import{CullFaceOptions as f}from"../lib/basicInterfaces.js";import m from"../lib/GLMaterial.js";import{Material as d,MaterialParameters as S}from"../lib/Material.js";import{intersectTriangleGeometry as b}from"../lib/RayIntersections.js";import{RenderSlot as g}from"../lib/RenderSlot.js";import{assert as T}from"../lib/Util.js";import{VertexAttribute as E}from"../lib/VertexAttribute.js";import{writeDefaultAttributes as A,writePosition as j}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocations as F,ShadedColorMaterialTechnique as w}from"../shaders/ShadedColorMaterialTechnique.js";import{ShadedColorMaterialTechniqueConfiguration as _}from"../shaders/ShadedColorMaterialTechniqueConfiguration.js";import{alphaCutoff as v}from"../../../../webscene/support/AlphaCutoff.js";class x extends d{constructor(e){super(e,O),this._configuration=new _,this.vertexAttributeLocations=F,this.supportsEdges=!0,this.produces=new Map([[g.OPAQUE_MATERIAL,e=>e===l.Highlight||p(e)&&!this.parameters.transparent],[g.TRANSPARENT_MATERIAL,e=>p(e)&&this.parameters.transparent&&this.parameters.writeDepth],[g.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>p(e)&&this.parameters.transparent&&!this.parameters.writeDepth]])}getConfiguration(e,t){return this._configuration.output=e,this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.screenSizeEnabled=this.parameters.screenSizeEnabled,this._configuration.shadingEnabled=this.parameters.shadingEnabled,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&u(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=v}intersect(e,s,a,c,h,l){if(this.parameters.screenSizeEnabled){const s=e.attributes.get(E.OFFSET),p={applyToVertex:(e,o,n,c)=>{const h=t(P,s.data[3*c],s.data[3*c+1],s.data[3*c+2]),l=t(I,e,o,n);return r(h,h,this.parameters.screenSizeScale*a.camera.computeScreenPixelSizeAt(h)),i(l,l,h),[l[0],l[1],l[2]]},applyToAabb:e=>{const t=o(e,P);return n(e,this.parameters.screenSizeScale*a.camera.computeScreenPixelSizeAt(t))}};b(e,a,c,h,p,l)}else b(e,a,c,h,void 0,l)}createGLMaterial(e){return new z(e)}createBufferWriter(){return new M(this.parameters.screenSizeEnabled)}}class z extends m{beginSlot(e){return this.getTechnique(w,e)}}class O extends S{constructor(){super(...arguments),this.color=a(1,1,1,1),this.shadingTint=a(0,0,0,.25),this.shadingDirection=e(s(),[.5,-.5,-.5]),this.screenSizeScale=14,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.cullFace=f.None,this.screenSizeEnabled=!1,this.shadingEnabled=!0}get transparent(){return this.color[3]<1||this.forceTransparentMode}}class M{constructor(e){this.screenSizeEnabled=e;const t=h().vec3f(E.POSITION).vec3f(E.NORMAL);this.screenSizeEnabled&&t.vec3f(E.OFFSET),this.vertexBufferLayout=t}elementCount(e){return e.get(E.POSITION).indices.length}write(e,t,r,i,s,a){if(A(r,i,this.vertexBufferLayout,e,t,s,a),this.screenSizeEnabled){if(!r.has(E.OFFSET))throw new Error(`${E.OFFSET} vertex attribute required for screenSizeEnabled ShadedColorMaterial`);{const e=r.get(E.OFFSET);T(3===e.size);const i=s.getField(E.OFFSET,c);if(!i)throw new Error("unable to acquire view for "+E.OFFSET);j(e,t,i,a)}}}}const P=s(),I=s();export{O as Parameters,x 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.32/esri/copyright.txt for details.
4
4
  */
5
- import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/Offset.glsl.js";import"../core/shaderLibrary/ShaderOutput.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/shading/ComputeNormalTexture.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/MainLighting.glsl.js";import"../core/shaderLibrary/shading/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/TerrainDepthTest.glsl.js";import"../core/shaderLibrary/shading/TextureTransformUV.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/AlphaCutoff.js";import"../core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import"../core/shaderLibrary/util/MixExternalColor.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float3PassUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../lib/VertexAttribute.js";import"./OutputColorHighlightOID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/DefaultMaterial.glsl.js";
5
+ import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/Offset.glsl.js";import"../core/shaderLibrary/ShaderOutput.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/shading/ComputeNormalTexture.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/MainLighting.glsl.js";import"../core/shaderLibrary/shading/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/TerrainDepthTest.glsl.js";import"../core/shaderLibrary/shading/TextureTransformUV.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import"../core/shaderLibrary/util/MixExternalColor.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float3PassUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../lib/VertexAttribute.js";import"./OutputColorHighlightOID.glsl.js";import"../../../webgl/ShaderBuilder.js";import"../../../../webscene/support/AlphaCutoff.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.32/esri/copyright.txt for details.
4
4
  */
5
- import{ZEROS as e,freeze as t,create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColorOrColorEmission as r,ShaderOutput as l}from"../core/shaderLibrary/ShaderOutput.js";import{NormalType as o}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{VertexNormalPassParameters as a,VertexNormalDrawParameters as n}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{alphaCutoff as c}from"../core/shaderLibrary/util/AlphaCutoff.js";import{ReloadableShaderModule as h}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as u}from"../core/shaderTechnique/ShaderTechnique.js";import{CullFaceOptions as m,DepthTestFunction as p,AlphaDiscardMode as d}from"../lib/basicInterfaces.js";import{RenderOccludedFlag as f}from"../lib/Material.js";import{OITPass as b}from"../lib/OITPass.js";import{blending as S,oitDepthTest as j,depthWrite as g,getDrawBuffers as y,getOITPolygonOffset as P}from"../lib/OrderIndependentTransparency.js";import{stencilWriteMaskOn as v,stencilToolMaskBaseParams as x,stencilBaseAllZerosParams as O}from"../lib/StencilUtils.js";import{advancedMRRFactors as T}from"../materials/pbrUtils.js";import{D}from"../../../../chunks/DefaultMaterial.glsl.js";import{SpecialDrawBuffers as L,CompareFunction as M}from"../../../webgl/enums.js";import{makePipelineState as A,cullingParams as w,defaultColorWrite as C}from"../../../webgl/renderState.js";class F extends a{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=T,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=m.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=e,this.instancedDoublePrecision=!1,this.normalType=o.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=t(.2,.2,.2),this.diffuse=t(.8,.8,.8),this.externalColor=s(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=i(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=p.Less,this.textureAlphaMode=d.Blend,this.textureAlphaCutoff=c,this.textureAlphaPremultiplied=!1,this.renderOccluded=f.Occlude,this.isDecoration=!1}}class N extends n{constructor(){super(...arguments),this.origin=i(),this.slicePlaneLocalOrigin=this.origin}}class k extends u{constructor(e,t,i=new h(D,(()=>import("./DefaultMaterial.glsl.js")))){super(e,t,i),this.type="DefaultMaterialTechnique"}_makePipeline(e,t){const{oitPass:i,output:s,transparent:o,cullFace:a,customDepthTest:n,hasOccludees:c,enableOffset:h}=e,u=i===b.NONE,m=i===b.FrontFace;return A({blending:r(s)&&o?S(i):null,culling:B(e)?w(a):null,depthTest:{func:j(i,q(n))},depthWrite:g(e),drawBuffers:s===l.Depth?{buffers:[L.NONE]}:y(i,s),colorWrite:C,stencilWrite:c?v:null,stencilTest:c?t?x:O:null,polygonOffset:u||m?null:P(h)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function q(e){return e===p.Lequal?M.LEQUAL:M.LESS}function B(e){return e.cullFace!==m.None||!e.hasSlicePlane&&(!e.transparent&&!e.doubleSidedMode)}export{N as DefaultMaterialDrawParameters,F as DefaultMaterialPassParameters,k as DefaultMaterialTechnique};
5
+ import{ZEROS as e,freeze as t,create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColorOrColorEmission as r,ShaderOutput as l}from"../core/shaderLibrary/ShaderOutput.js";import{NormalType as o}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{VertexNormalPassParameters as a,VertexNormalDrawParameters as n}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShaderModule as c}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as h}from"../core/shaderTechnique/ShaderTechnique.js";import{CullFaceOptions as u,DepthTestFunction as p,AlphaDiscardMode as m}from"../lib/basicInterfaces.js";import{RenderOccludedFlag as d}from"../lib/Material.js";import{OITPass as f}from"../lib/OITPass.js";import{blending as b,oitDepthTest as S,depthWrite as j,getDrawBuffers as g,getOITPolygonOffset as y}from"../lib/OrderIndependentTransparency.js";import{stencilWriteMaskOn as P,stencilToolMaskBaseParams as v,stencilBaseAllZerosParams as x}from"../lib/StencilUtils.js";import{advancedMRRFactors as O}from"../materials/pbrUtils.js";import{D as T}from"../../../../chunks/DefaultMaterial.glsl.js";import{SpecialDrawBuffers as D,CompareFunction as M}from"../../../webgl/enums.js";import{makePipelineState as A,cullingParams as L,defaultColorWrite as w}from"../../../webgl/renderState.js";import{alphaCutoff as C}from"../../../../webscene/support/AlphaCutoff.js";class F extends a{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=O,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=u.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=e,this.instancedDoublePrecision=!1,this.normalType=o.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=t(.2,.2,.2),this.diffuse=t(.8,.8,.8),this.externalColor=s(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=i(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=p.Less,this.textureAlphaMode=m.Blend,this.textureAlphaCutoff=C,this.textureAlphaPremultiplied=!1,this.renderOccluded=d.Occlude,this.isDecoration=!1}}class N extends n{constructor(){super(...arguments),this.origin=i(),this.slicePlaneLocalOrigin=this.origin}}class k extends h{constructor(e,t,i=new c(T,(()=>import("./DefaultMaterial.glsl.js")))){super(e,t,i),this.type="DefaultMaterialTechnique"}_makePipeline(e,t){const{oitPass:i,output:s,transparent:o,cullFace:a,customDepthTest:n,hasOccludees:c,enableOffset:h}=e,u=i===f.NONE,p=i===f.FrontFace;return A({blending:r(s)&&o?b(i):null,culling:B(e)?L(a):null,depthTest:{func:S(i,q(n))},depthWrite:j(e),drawBuffers:s===l.Depth?{buffers:[D.NONE]}:g(i,s),colorWrite:w,stencilWrite:c?P:null,stencilTest:c?t?v:x:null,polygonOffset:u||p?null:y(h)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function q(e){return e===p.Lequal?M.LEQUAL:M.LESS}function B(e){return e.cullFace!==u.None||!e.hasSlicePlane&&(!e.transparent&&!e.doubleSidedMode)}export{N as DefaultMaterialDrawParameters,F as DefaultMaterialPassParameters,k as DefaultMaterialTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../../../../geometry/support/Ellipsoid.js";import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/hud/AlignPixel.glsl.js";import"../core/shaderLibrary/hud/HUD.glsl.js";import"../core/shaderLibrary/hud/HUDOcclusionPass.glsl.js";import"../core/shaderLibrary/hud/HUDVisibility.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/AlphaCutoff.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import"../core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4DrawUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatBindUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DBindUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../lib/OITPass.js";import"../lib/VertexAttribute.js";import"../../../webgl/ShaderBuilder.js";export{b as build,c as calculateAnchorPosition,s as shaderSettings}from"../../../../chunks/HUDMaterial.glsl.js";
5
+ import"../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import"../../../../geometry/support/Ellipsoid.js";import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/hud/AlignPixel.glsl.js";import"../core/shaderLibrary/hud/HUD.glsl.js";import"../core/shaderLibrary/hud/HUDOcclusionPass.glsl.js";import"../core/shaderLibrary/hud/HUDVisibility.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.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/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2PassUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4DrawUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatBindUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DBindUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../lib/OITPass.js";import"../lib/VertexAttribute.js";import"../../../webgl/ShaderBuilder.js";import"../../../../webscene/support/AlphaCutoff.js";export{b as build,c as calculateAnchorPosition}from"../../../../chunks/HUDMaterial.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.32/esri/copyright.txt for details.
4
4
  */
5
- import"../core/shaderLibrary/util/AlphaCutoff.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../lib/VertexAttribute.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/MeasurementArrow.glsl.js";
5
+ import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../lib/VertexAttribute.js";import"../../../webgl/ShaderBuilder.js";import"../../../../webscene/support/AlphaCutoff.js";export{b as build}from"../../../../chunks/MeasurementArrow.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.32/esri/copyright.txt for details.
4
4
  */
5
- import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/VertexColor.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/util/AlphaCutoff.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../lib/VertexAttribute.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/NativeLine.glsl.js";
5
+ import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/VertexColor.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../lib/VertexAttribute.js";import"../../../webgl/ShaderBuilder.js";import"../../../../webscene/support/AlphaCutoff.js";export{b as build}from"../../../../chunks/NativeLine.glsl.js";
@@ -2,18 +2,18 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{ShaderOutput as o,isColorEmission as r,isColorOrColorEmission as l}from"../core/shaderLibrary/ShaderOutput.js";import{Emissions as t}from"../core/shaderLibrary/output/Emissions.glsl.js";import{OutputHighlight as i}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{alphaCutoff as a}from"../core/shaderLibrary/util/AlphaCutoff.js";import{ColorConversion as s}from"../core/shaderLibrary/util/ColorConversion.glsl.js";import{glsl as u,If as e}from"../core/shaderModules/glsl.js";import{OITPass as n}from"../lib/OITPass.js";function d(d,p){d.include(i,p),d.include(t,p),d.fragment.include(s);const f=p.output===o.ObjectAndLayerIdColor,c=r(p.output),m=l(p.output)&&p.oitPass===n.ColorAlpha,g=l(p.output)&&p.oitPass!==n.ColorAlpha,C=p.discardInvisibleFragments;let h=0;(g||c||m)&&d.outputs.add("fragColor","vec4",h++),c&&d.outputs.add("fragEmission","vec4",h++),m&&d.outputs.add("fragAlpha","float",h++),d.fragment.code.add(u`
5
+ import{ShaderOutput as o,isColorEmission as r,isColorOrColorEmission as l}from"../core/shaderLibrary/ShaderOutput.js";import{Emissions as t}from"../core/shaderLibrary/output/Emissions.glsl.js";import{OutputHighlight as i}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{ColorConversion as a}from"../core/shaderLibrary/util/ColorConversion.glsl.js";import{glsl as s,If as u}from"../core/shaderModules/glsl.js";import{OITPass as e}from"../lib/OITPass.js";import{alphaCutoff as n}from"../../../../webscene/support/AlphaCutoff.js";function p(p,d){p.include(i,d),p.include(t,d),p.fragment.include(a);const f=d.output===o.ObjectAndLayerIdColor,c=r(d.output),m=l(d.output)&&d.oitPass===e.ColorAlpha,g=l(d.output)&&d.oitPass!==e.ColorAlpha,C=d.discardInvisibleFragments;let h=0;(g||c||m)&&p.outputs.add("fragColor","vec4",h++),c&&p.outputs.add("fragEmission","vec4",h++),m&&p.outputs.add("fragAlpha","float",h++),p.fragment.code.add(s`
6
6
  void outputColorHighlightOID(vec4 finalColor, const in vec3 vWorldPosition) {
7
- ${e(f,"finalColor.a = 1.0;")}
7
+ ${u(f,"finalColor.a = 1.0;")}
8
8
 
9
- ${e(C,`if (finalColor.a < ${u.float(a)}) { discard; }`)}
9
+ ${u(C,`if (finalColor.a < ${s.float(n)}) { discard; }`)}
10
10
 
11
11
  finalColor = applySlice(finalColor, vWorldPosition);
12
- ${e(m,u`fragColor = premultiplyAlpha(finalColor);
12
+ ${u(m,s`fragColor = premultiplyAlpha(finalColor);
13
13
  fragAlpha = finalColor.a;`)}
14
- ${e(g,"fragColor = finalColor;")}
15
- ${e(c,"fragEmission = finalColor.a * getEmissions();")}
14
+ ${u(g,"fragColor = finalColor;")}
15
+ ${u(c,"fragEmission = finalColor.a * getEmissions();")}
16
16
  calculateOcclusionAndOutputHighlight();
17
- ${e(f,"outputObjectAndLayerIdColor();")}
17
+ ${u(f,"outputObjectAndLayerIdColor();")}
18
18
  }
19
- `)}export{d as outputColorHighlightOID};
19
+ `)}export{p as outputColorHighlightOID};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/Offset.glsl.js";import"../core/shaderLibrary/ShaderOutput.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/VerticalOffset.glsl.js";import"../core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/MainLighting.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/AlphaCutoff.js";import"../core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import"../core/shaderLibrary/util/MixExternalColor.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float3PassUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../lib/VertexAttribute.js";import"./OutputColorHighlightOID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/RealisticTree.glsl.js";
5
+ import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/Offset.glsl.js";import"../core/shaderLibrary/ShaderOutput.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/VerticalOffset.glsl.js";import"../core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/MainLighting.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import"../core/shaderLibrary/shading/VisualVariables.glsl.js";import"../core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import"../core/shaderLibrary/util/MixExternalColor.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float3PassUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../lib/VertexAttribute.js";import"./OutputColorHighlightOID.glsl.js";import"../../../webgl/ShaderBuilder.js";import"../../../../webscene/support/AlphaCutoff.js";export{b as build}from"../../../../chunks/RealisticTree.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.32/esri/copyright.txt for details.
4
4
  */
5
- import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/shading/LineStipple.glsl.js";import"../core/shaderLibrary/shading/MarkerSizing.glsl.js";import"../core/shaderLibrary/shading/PiUtils.glsl.js";import"../core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import"../core/shaderLibrary/util/AlphaCutoff.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatBindUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../lib/VertexAttribute.js";import"./LineMarkerTechniqueConfiguration.js";import"./OutputColorHighlightOID.glsl.js";import"./RibbonLineTechniqueConfiguration.js";import"../../../webgl/ShaderBuilder.js";export{b as build,r as ribbonlineNumRoundJoinSubdivisions}from"../../../../chunks/RibbonLine.glsl.js";
5
+ import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/shading/LineStipple.glsl.js";import"../core/shaderLibrary/shading/MarkerSizing.glsl.js";import"../core/shaderLibrary/shading/PiUtils.glsl.js";import"../core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatBindUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../lib/VertexAttribute.js";import"./LineMarkerTechniqueConfiguration.js";import"./OutputColorHighlightOID.glsl.js";import"./RibbonLineTechniqueConfiguration.js";import"../../../webgl/ShaderBuilder.js";import"../../../../webscene/support/AlphaCutoff.js";export{b as build,r as ribbonlineNumRoundJoinSubdivisions}from"../../../../chunks/RibbonLine.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.32/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../chunks/vec32.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../terrain/OverlayContent.js";import"../../terrain/TransparencyMode.js";import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import"../core/shaderLibrary/attributes/PositionAttribute.glsl.js";import"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../core/shaderLibrary/attributes/VertexTangent.glsl.js";import"../core/shaderLibrary/output/OutputDepth.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/MainLighting.glsl.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/terrain/Overlay.glsl.js";import"../core/shaderLibrary/terrain/TerrainTexture.glsl.js";import"../core/shaderLibrary/util/AlphaCutoff.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float3BindUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4DrawUniform.js";import"../core/shaderModules/Texture2DBindUniform.js";import"../../../webgl/ShaderBuilder.js";export{T as TerrainPassParameters,b as build}from"../../../../chunks/Terrain.glsl.js";
5
+ import"../../../../core/libs/gl-matrix-2/math/mat4.js";import"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import"../../../../chunks/vec32.js";import"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../terrain/OverlayContent.js";import"../../terrain/TransparencyMode.js";import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/ShaderOutput.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import"../core/shaderLibrary/attributes/PositionAttribute.glsl.js";import"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../core/shaderLibrary/attributes/VertexTangent.glsl.js";import"../core/shaderLibrary/output/OutputDepth.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import"../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../core/shaderLibrary/shading/MainLighting.glsl.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/terrain/Overlay.glsl.js";import"../core/shaderLibrary/terrain/TerrainTexture.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float3BindUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4DrawUniform.js";import"../core/shaderModules/Texture2DBindUniform.js";import"../../../webgl/ShaderBuilder.js";import"../../../../webscene/support/AlphaCutoff.js";export{T as TerrainPassParameters,b as build}from"../../../../chunks/Terrain.glsl.js";