@arcgis/core 5.2.0-next.117 → 5.2.0-next.119

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 (218) hide show
  1. package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -1
  2. package/analysis/featureReferenceUtils.js +1 -1
  3. package/arcade.d.ts +1 -1
  4. package/arcade.js +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/03918a862455191a8910.js +1 -0
  7. package/assets/esri/core/workers/chunks/{9b9a60f1e0c48aa701f0.js → 066b7f6866d602f963e0.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{564fdf0d663b773806cc.js → 114bc14c49176f64a2c5.js} +1 -1
  9. package/assets/esri/core/workers/chunks/1630913399384030d0b9.js +1 -0
  10. package/assets/esri/core/workers/chunks/{db141122060d8d9b38da.js → 1742dbc6a827cfda471b.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{045ff98313b06a2188b7.js → 1a39335aa2dce6d564d9.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{caf38cf4d8542fb11c46.js → 20e4277a4a6c57957202.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{f42243c62dd0b6993816.js → 24014f3701c31ee74bc2.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{62b1f94f4fa978d4da48.js → 354912041363502c6a89.js} +1 -1
  15. package/assets/esri/core/workers/chunks/37cf4ca2083cd3b6002e.js +1 -0
  16. package/assets/esri/core/workers/chunks/{3b499cfc89c8f87cdb20.js → 3c3e5e952fd6740bb234.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{44d3fe10cb35d16f0b33.js → 4396ef5ab3eb9e9a7df2.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{56989b48c0a5d7fe85e6.js → 4c4ba466e23159991322.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{b9023cc3298ee4fddea7.js → 54f3bc940cea15fce2c7.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{7e42be27ead91a4cc0f1.js → 581285e4d7bbe1b7c27a.js} +1 -1
  21. package/assets/esri/core/workers/chunks/5938d5f6e37f49867d5a.js +1 -0
  22. package/assets/esri/core/workers/chunks/{05584d8828ae7bca0fc5.js → 64ee22134fda2f09c094.js} +1 -1
  23. package/assets/esri/core/workers/chunks/6efc5873747b9cd44fb9.js +1 -0
  24. package/assets/esri/core/workers/chunks/{0463c807b37f01bbc35c.js → 70347d25968975126fa7.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{4bfd63f3cf9208eb839b.js → 723478607badcde5706b.js} +43 -43
  26. package/assets/esri/core/workers/chunks/{42c4d0c1c08bf111e5a4.js → 731ec5de16753e10b963.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{5965a947f68b707eaa6b.js → 82ce034b5ba54de9b970.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{1eafb214519d8fc63ccb.js → 8465e2c7221125fd3cc4.js} +1 -1
  29. package/assets/esri/core/workers/chunks/862e1acd80c4e43831dc.js +1 -0
  30. package/assets/esri/core/workers/chunks/{fd808d38ae2d475ac442.js → 8675ab3c4dec2f13b9c6.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{925a0b29d3ed7165b8dd.js → 8984d02c0ce828fd223a.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{57328c206f1e699ac06f.js → 89edaa1ffa566908ebca.js} +1 -1
  33. package/assets/esri/core/workers/chunks/97fea852f8e93e1286e4.js +1 -0
  34. package/assets/esri/core/workers/chunks/{bb4cbf6b7c35e8c78cc7.js → a917a1df8270860dc514.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{996438b3afec92c5c68e.js → b0058619e0363002ad86.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{9fb46ccd4be4c3b61c31.js → b5a102cf9f4377fb9842.js} +1 -1
  37. package/assets/esri/core/workers/chunks/b6409d89914030d5854a.js +1 -0
  38. package/assets/esri/core/workers/chunks/{fa869977ac2abb063925.js → b9c834e3c0701e9b14a2.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{32dd990a3bd93cbad309.js → c0ec87800faf99cbd8bd.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{20de0ea9fa08a6545978.js → cf1106eda10f3cccb1bd.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{ed988360264574cd8f6b.js → cf7c06702babd6fa88b4.js} +1 -1
  42. package/assets/esri/core/workers/chunks/cfd8317ecd2e63af7c40.js +1 -0
  43. package/assets/esri/core/workers/chunks/d090baaa974e1e83fa44.js +1 -0
  44. package/assets/esri/core/workers/chunks/{c5ceceb0683671f92efa.js → da6583e8d88441a1c02a.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{e1f2b07be33e33117313.js → dd02cc18ebebb90778c6.js} +1 -1
  46. package/assets/esri/core/workers/chunks/de8a3a0796bd115426c0.js +1 -0
  47. package/assets/esri/core/workers/chunks/{05b373a663cb5d4d722f.js → deb5b1d772ca407654d4.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{10fa8fbade8ae084c307.js → e22a013ec38989caf9de.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{c7e6b5594fed5bb16691.js → e4016ae9cb8f16e3efc3.js} +1 -1
  50. package/assets/esri/core/workers/chunks/e5f0c47957a4e9663720.js +1 -0
  51. package/assets/esri/core/workers/chunks/{a3f4818f4190fa92331d.js → edd36e98355f1655e5c8.js} +1 -1
  52. package/assets/esri/core/workers/chunks/ef6e52f9b656751eebaf.js +1 -0
  53. package/assets/esri/core/workers/chunks/f0709c48daca93e759c8.js +1 -0
  54. package/assets/esri/core/workers/chunks/f5423006fb07db7dd6ee.js +1 -0
  55. package/assets/esri/core/workers/chunks/{d926bffc3ff9f87e9081.js → f890359d972cce54459e.js} +1 -1
  56. package/assets/esri/core/workers/chunks/fb11ff3f2eae5f072560.js +1 -0
  57. package/assets/esri/core/workers/chunks/fdad31bbe8aee68a6eaf.js +1 -0
  58. package/assets/esri/core/workers/chunks/fe1787a8d499832996b3.js +1 -0
  59. package/chunks/CloudsComposition.glsl.js +2 -2
  60. package/chunks/ColorMaterial.glsl.js +3 -3
  61. package/chunks/Compositing.glsl.js +4 -4
  62. package/chunks/DeepSky.glsl.js +3 -3
  63. package/chunks/EdgeShader.glsl.js +6 -6
  64. package/chunks/FocusArea.glsl.js +1 -1
  65. package/chunks/GlobalIllumination.glsl.js +7 -7
  66. package/chunks/HUDMaterial.glsl.js +5 -5
  67. package/chunks/LaserlinePath.glsl.js +5 -5
  68. package/chunks/LineCallout.glsl.js +2 -2
  69. package/chunks/LineMarker.glsl.js +30 -30
  70. package/chunks/NavigationDepth.glsl.js +1 -1
  71. package/chunks/OccludedGeometryDepth.glsl.js +2 -2
  72. package/chunks/Path.glsl.js +12 -12
  73. package/chunks/PointRenderer.glsl.js +5 -5
  74. package/chunks/Precipitation.glsl.js +7 -7
  75. package/chunks/RibbonLine.glsl.js +50 -50
  76. package/chunks/SimpleAtmosphere.glsl.js +9 -9
  77. package/chunks/Stars.glsl.js +5 -5
  78. package/chunks/Terrain.glsl.js +18 -16
  79. package/chunks/Viewshed.glsl.js +3 -3
  80. package/chunks/VolumeMask.glsl.js +2 -2
  81. package/chunks/Water.glsl.js +38 -48
  82. package/config.js +1 -1
  83. package/core/NestedMap.js +1 -1
  84. package/kernel.js +1 -1
  85. package/layers/AnnotationFeatureLayer.d.ts +2 -1
  86. package/layers/AnnotationFeatureLayer.js +1 -1
  87. package/layers/CatalogLayer.d.ts +2 -1
  88. package/layers/CatalogLayer.js +1 -1
  89. package/layers/DimensionFeatureLayer.d.ts +2 -1
  90. package/layers/DimensionFeatureLayer.js +1 -1
  91. package/layers/FeatureLayer.d.ts +2 -30
  92. package/layers/FeatureLayer.js +1 -1
  93. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  94. package/layers/SubtypeGroupLayer.d.ts +2 -1
  95. package/layers/SubtypeGroupLayer.js +1 -1
  96. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  97. package/layers/mixins/FeatureLayerBase.js +1 -1
  98. package/layers/mixins/FeatureLayerReload.d.ts +26 -0
  99. package/layers/mixins/FeatureLayerReload.js +2 -0
  100. package/layers/mixins/PortalLayer.js +1 -1
  101. package/layers/support/TimeInfo.d.ts +2 -2
  102. package/layers/support/TimeInfo.js +1 -1
  103. package/layers/support/fieldUtils.js +1 -1
  104. package/layers/video/VideoController.js +1 -1
  105. package/package.json +3 -3
  106. package/support/revision.js +1 -1
  107. package/symbols/cim/animationUtils.js +1 -1
  108. package/time/timeZoneUtils.js +1 -1
  109. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  110. package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
  111. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  112. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  113. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  114. package/views/3d/camera/constraintUtils.js +1 -1
  115. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  116. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  117. package/views/3d/state/controllers/GroundNavigationController.js +1 -1
  118. package/views/3d/state/controllers/InteractiveController.js +1 -1
  119. package/views/3d/state/controllers/momentum/GroundNavigationMomentumController.js +1 -1
  120. package/views/3d/state/controllers/momentum/MomentumController.js +1 -1
  121. package/views/3d/state/utils/OffsetCorrectionController.js +2 -0
  122. package/views/3d/support/engineContent/line.js +1 -1
  123. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +2 -2
  124. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js +4 -4
  125. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  126. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +9 -9
  127. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +15 -15
  128. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +3 -3
  129. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +23 -23
  130. package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +3 -3
  131. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +8 -8
  132. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +7 -7
  133. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +7 -7
  134. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  135. package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +2 -0
  136. package/views/3d/webgl-engine/effects/AmbientIllumination.js +1 -1
  137. package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +1 -1
  138. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.glsl.js +1 -1
  139. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  140. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  141. package/views/3d/webgl-engine/effects/laserlines/LaserlinePath.glsl.js +1 -1
  142. package/views/3d/webgl-engine/effects/precipitation/Precipitation.glsl.js +1 -1
  143. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  144. package/views/3d/webgl-engine/effects/stars/DeepSky.glsl.js +1 -1
  145. package/views/3d/webgl-engine/effects/stars/Stars.glsl.js +1 -1
  146. package/views/3d/webgl-engine/lib/LineMaterial.js +1 -1
  147. package/views/3d/webgl-engine/lib/Program.js +1 -1
  148. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  149. package/views/3d/webgl-engine/lib/edgeRendering/AdjustProjectedPosition.glsl.js +4 -4
  150. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
  151. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  152. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  153. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  154. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  155. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  156. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  157. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  158. package/views/3d/webgl-engine/materials/ViewingModeConfiguration.js +1 -1
  159. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  160. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  161. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  162. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  163. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  164. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  165. package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
  166. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +26 -26
  167. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  168. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  169. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  170. package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
  171. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  172. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  173. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  174. package/views/3d/webgl-engine/shaders/LineTechniqueConfiguration.js +2 -0
  175. package/views/3d/webgl-engine/shaders/MeasurementArrowTechniqueConfiguration.js +1 -1
  176. package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +1 -1
  177. package/views/3d/webgl-engine/shaders/NavigationDepth.glsl.js +1 -1
  178. package/views/3d/webgl-engine/shaders/OccludedGeometryDepth.glsl.js +1 -1
  179. package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
  180. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  181. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  182. package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -1
  183. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  184. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  185. package/views/3d/webgl-engine/shaders/VolumeMask.glsl.js +1 -1
  186. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -1
  187. package/widgets/Measurement.d.ts +1 -2
  188. package/widgets/Measurement.js +1 -1
  189. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  190. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  191. package/widgets/Sketch/SketchViewModel.d.ts +13 -0
  192. package/widgets/Sketch/SketchViewModel.js +1 -1
  193. package/widgets/Sketch/VisibleElements.d.ts +8 -1
  194. package/widgets/Sketch/VisibleElements.js +1 -1
  195. package/widgets/Sketch/support/PluginManager.d.ts +11 -1
  196. package/widgets/ValuePicker.d.ts +1 -1
  197. package/widgets/ValuePicker.js +1 -1
  198. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +4 -2
  199. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  200. package/widgets/VideoPlayer.js +1 -1
  201. package/assets/esri/core/workers/chunks/0630e650abdfea1792e4.js +0 -1
  202. package/assets/esri/core/workers/chunks/0edebc6c516f0b9dac7b.js +0 -1
  203. package/assets/esri/core/workers/chunks/25c5e1b14b184b1228a3.js +0 -1
  204. package/assets/esri/core/workers/chunks/2e0fd0536408053ac6f5.js +0 -1
  205. package/assets/esri/core/workers/chunks/573e8fa0af8711ffec45.js +0 -1
  206. package/assets/esri/core/workers/chunks/5b9925f23d4b10a7087e.js +0 -1
  207. package/assets/esri/core/workers/chunks/66c46c5a7147550ea3ed.js +0 -1
  208. package/assets/esri/core/workers/chunks/6c7cb7974969e3167f2b.js +0 -1
  209. package/assets/esri/core/workers/chunks/729d458e9e28641227cd.js +0 -1
  210. package/assets/esri/core/workers/chunks/7bbc3d22383388d11345.js +0 -1
  211. package/assets/esri/core/workers/chunks/7edf57e31ff07af9032b.js +0 -1
  212. package/assets/esri/core/workers/chunks/8bd187b48a4e4296e3d8.js +0 -1
  213. package/assets/esri/core/workers/chunks/9acaabe950319d031f2e.js +0 -1
  214. package/assets/esri/core/workers/chunks/ac02df176f9ea94278bb.js +0 -1
  215. package/assets/esri/core/workers/chunks/b4222152efaf73b37b53.js +0 -1
  216. package/assets/esri/core/workers/chunks/c0855be20ffcd52c7026.js +0 -1
  217. package/assets/esri/core/workers/chunks/e606be4ece4eac1e9bbe.js +0 -1
  218. package/assets/esri/core/workers/chunks/f05622413cadfd14553e.js +0 -1
@@ -1,50 +1,50 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{markerTextureSize as e,markerSymbolSize as r,markerTipThicknessFactor as i}from"../views/3d/support/engineContent/marker.js";import{SliceDraw as t}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{RibbonVertexPosition as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{OutputHighlight as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{MarkerSizing as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{positionOutsideClipSpace as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{ColorConversion as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{NoPerspectiveWrite as c,NoPerspectiveRead as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js";import{addProjViewLocalOrigin as d,addViewNormal as v,addPixelRatio as m}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as g}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as w,If as y}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as b}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DPassUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{alphaCutoff as S}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{outputColorHighlightOLID as z}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as P}from"../views/webgl/ShaderBuilder.js";function j(j){const L=new P,{space:C,anchor:V,hasTip:k,hasScreenSizePerspective:D}=j,M=2===C,$=1===C;L.attributes.add("position","vec3"),L.attributes.add(j.hasVVSize?"sizeFeatureAttribute":"size","float"),j.hasVVOpacity&&L.attributes.add("opacityFeatureAttribute","float"),L.attributes.add(j.hasVVColor?"colorFeatureAttribute":"color",j.hasVVColor?"float":"vec4"),L.vertex.inputs.add("position",()=>"position"),j.hasVVSize?L.vertex.inputs.add("sizeFeatureAttribute",()=>"sizeFeatureAttribute"):L.vertex.inputs.add("size",()=>"size"),j.hasVVOpacity&&L.vertex.inputs.add("opacityFeatureAttribute",()=>"opacityFeatureAttribute"),j.hasVVColor?L.vertex.inputs.add("colorFeatureAttribute",()=>"colorFeatureAttribute"):L.vertex.inputs.add("color",()=>"color"),L.include(o,j),L.include(s,j);const{vertex:F,fragment:W,varyings:A}=L;d(F,j),L.attributes.add("previousDelta","vec4"),L.attributes.add("uv0","vec2"),A.add("vColor","vec4"),A.add("vpos","vec3",{invariant:!0}),A.add("vUV","vec2"),A.add("vSize","float"),k&&A.add("vLineWidth","float"),F.uniforms.add(new h("nearFar",({camera:e})=>e.nearFar),new u("viewport",({camera:e})=>e.fullViewport)).code.add(w`vec4 projectAndScale(vec4 pos) {
2
+ import{markerTextureSize as e,markerSymbolSize as r,markerTipThicknessFactor as i}from"../views/3d/support/engineContent/marker.js";import{SliceDraw as t}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{RibbonVertexPosition as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{OutputHighlight as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{MarkerSizing as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{positionOutsideClipSpace as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{nearFar as l,viewport as c,viewNormal as p,inverseProjMatrix as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{ColorConversion as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{NoPerspectiveWrite as m,NoPerspectiveRead as h}from"../views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js";import{addProjViewLocalOrigin as u,addPixelRatio as f}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as w}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as y,If as S}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{alphaCutoff as x}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{outputColorHighlightOLID as z}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as P}from"../views/webgl/ShaderBuilder.js";function j(j){const L=new P,{draped:C,worldSpace:k,anchor:D,hasTip:V,hasScreenSizePerspective:$}=j,W=!C&&!k;L.attributes.add("position","vec3"),L.attributes.add(j.hasVVSize?"sizeFeatureAttribute":"size","float"),j.hasVVOpacity&&L.attributes.add("opacityFeatureAttribute","float"),L.attributes.add(j.hasVVColor?"colorFeatureAttribute":"color",j.hasVVColor?"float":"vec4"),L.vertex.inputs.add("position",()=>"position"),j.hasVVSize?L.vertex.inputs.add("sizeFeatureAttribute",()=>"sizeFeatureAttribute"):L.vertex.inputs.add("size",()=>"size"),j.hasVVOpacity&&L.vertex.inputs.add("opacityFeatureAttribute",()=>"opacityFeatureAttribute"),j.hasVVColor?L.vertex.inputs.add("colorFeatureAttribute",()=>"colorFeatureAttribute"):L.vertex.inputs.add("color",()=>"color"),L.include(o,j),L.include(s,j);const{vertex:A,fragment:M,varyings:O}=L;u(A,j),L.attributes.add("previousDelta","vec4"),L.attributes.add("uv0","vec2"),O.add("vColor","vec4"),O.add("vpos","vec3",{invariant:!0}),O.add("vUV","vec2"),O.add("vSize","float"),V&&O.add("vLineWidth","float"),A.uniforms.add(l,c).code.add(y`vec4 projectAndScale(vec4 pos) {
3
3
  vec4 posNdc = proj * pos;
4
4
  posNdc.xy *= viewport.zw / posNdc.w;
5
5
  return posNdc;
6
- }`),F.code.add(w`void clip(vec4 pos, inout vec4 prev) {
6
+ }`),A.code.add(y`void clip(vec4 pos, inout vec4 prev) {
7
7
  float vnp = nearFar[0] * 0.99;
8
8
  if (prev.z > -nearFar[0]) {
9
9
  float interpolation = (-vnp - pos.z) / (prev.z - pos.z);
10
10
  prev = mix(pos, prev, interpolation);
11
11
  }
12
- }`),M?(L.attributes.add("normal","vec3"),v(F),F.constants.add("tiltThreshold","float",.7),F.code.add(w`vec3 perpendicular(vec3 v) {
12
+ }`),k?(L.attributes.add("normal","vec3"),A.constants.add("tiltThreshold","float",.7).uniforms.add(p).code.add(y`vec3 perpendicular(vec3 v) {
13
13
  vec3 n = (viewNormal * vec4(normal.xyz, 1.0)).xyz;
14
14
  vec3 n2 = cross(v, n);
15
15
  vec3 forward = vec3(0.0, 0.0, 1.0);
16
16
  float tiltDot = dot(forward, n);
17
17
  return abs(tiltDot) < tiltThreshold ? n : n2;
18
- }`)):F.code.add(w`vec2 perpendicular(vec2 v) {
18
+ }`)):A.code.add(y`vec2 perpendicular(vec2 v) {
19
19
  return vec2(v.y, -v.x);
20
- }`);const O=M?"vec3":"vec2";return F.code.add(w`
21
- ${O} normalizedSegment(${O} pos, ${O} prev) {
22
- ${O} segment = pos - prev;
20
+ }`);const F=k?"vec3":"vec2";return A.code.add(y`
21
+ ${F} normalizedSegment(${F} pos, ${F} prev) {
22
+ ${F} segment = pos - prev;
23
23
  float segmentLen = length(segment);
24
24
 
25
25
  // normalize or zero if too short
26
- return (segmentLen > 0.001) ? segment / segmentLen : ${M?"vec3(0.0, 0.0, 0.0)":"vec2(0.0, 0.0)"};
26
+ return (segmentLen > 0.001) ? segment / segmentLen : ${k?"vec3(0.0, 0.0, 0.0)":"vec2(0.0, 0.0)"};
27
27
  }
28
28
 
29
- ${O} displace(${O} pos, ${O} prev, float displacementLen) {
30
- ${O} segment = normalizedSegment(pos, prev);
29
+ ${F} displace(${F} pos, ${F} prev, float displacementLen) {
30
+ ${F} segment = normalizedSegment(pos, prev);
31
31
 
32
- ${O} displacementDirU = perpendicular(segment);
33
- ${O} displacementDirV = segment;
32
+ ${F} displacementDirU = perpendicular(segment);
33
+ ${F} displacementDirV = segment;
34
34
 
35
- ${1===V?"pos -= 0.5 * displacementLen * displacementDirV;":""}
35
+ ${1===D?"pos -= 0.5 * displacementLen * displacementDirV;":""}
36
36
 
37
37
  return pos + displacementLen * (uv0.x * displacementDirU + uv0.y * displacementDirV);
38
38
  }
39
- `),$&&(F.uniforms.add(new b("inverseProjectionMatrix",({camera:e})=>e.inverseProjectionMatrix)),F.code.add(w`vec3 inverseProject(vec4 posScreen) {
39
+ `),W&&(A.uniforms.add(d),A.code.add(y`vec3 inverseProject(vec4 posScreen) {
40
40
  posScreen.xy = (posScreen.xy / viewport.zw) * posScreen.w;
41
41
  return (inverseProjectionMatrix * posScreen).xyz;
42
- }`),F.code.add(w`bool rayIntersectPlane(vec3 rayDir, vec3 planeOrigin, vec3 planeNormal, out vec3 intersection) {
42
+ }`),A.code.add(y`bool rayIntersectPlane(vec3 rayDir, vec3 planeOrigin, vec3 planeNormal, out vec3 intersection) {
43
43
  float cos = dot(rayDir, planeNormal);
44
44
  float t = dot(planeOrigin, planeNormal) / cos;
45
45
  intersection = t * rayDir;
46
46
  return abs(cos) > 0.001 && t > 0.0;
47
- }`),F.uniforms.add(new g("perScreenPixelRatio",({camera:e})=>e.perScreenPixelRatio)),F.code.add(w`
47
+ }`),A.uniforms.add(new w("perScreenPixelRatio",({camera:e})=>e.perScreenPixelRatio)),A.code.add(y`
48
48
  vec4 toFront(vec4 displacedPosScreen, vec3 posLeft, vec3 posRight, vec3 prev, float lineWidth) {
49
49
  // Project displaced position back to camera space
50
50
  vec3 displacedPos = inverseProject(displacedPosScreen);
@@ -54,7 +54,7 @@ return abs(cos) > 0.001 && t > 0.0;
54
54
  vec3 planeNormal = normalize(cross(posLeft - posRight, posLeft - prev));
55
55
  vec3 planeOrigin = posLeft;
56
56
 
57
- ${y(j.hasCap,"if(prev.z > posLeft.z) {\n vec2 diff = posLeft.xy - posRight.xy;\n planeOrigin.xy += perpendicular(diff) / 2.0;\n }")};
57
+ ${S(j.hasCap,"if(prev.z > posLeft.z) {\n vec2 diff = posLeft.xy - posRight.xy;\n planeOrigin.xy += perpendicular(diff) / 2.0;\n }")};
58
58
 
59
59
  // Move the plane towards the camera by a margin dependent on the line width (approximated in world space). This tolerance corrects for the
60
60
  // non-planarity in most cases, but sharp joins can place the prev vertices at arbitrary positions so markers can still clip.
@@ -73,7 +73,7 @@ return abs(cos) > 0.001 && t > 0.0;
73
73
  displacedPos *= minDepth / length(displacedPos);
74
74
  return vec4(displacedPos.xyz, 1.0);
75
75
  }
76
- `)),m(F),L.include(c),F.main.add(w`
76
+ `)),f(A),L.include(m),A.main.add(y`
77
77
  // Check for special value of uv0.y which is used by the Renderer when graphics
78
78
  // are removed before the VBO is recompacted. If this is the case, then we just
79
79
  // project outside of clip space.
@@ -85,24 +85,24 @@ return abs(cos) > 0.001 && t > 0.0;
85
85
  vec4 pos = view * vec4(position, 1.0);
86
86
  vec4 prev = view * vec4(position + previousDelta.xyz * previousDelta.w, 1.0);
87
87
 
88
- float lineWidth = getLineWidth(${y(D,"pos.xyz")});
88
+ float lineWidth = getLineWidth(${S($,"pos.xyz")});
89
89
  float screenMarkerSize = getScreenMarkerSize(lineWidth);
90
90
 
91
91
  clip(pos, prev);
92
92
 
93
- ${M?w`${y(j.hideOnShortSegments,w`
93
+ ${k?y`${S(j.hideOnShortSegments,y`
94
94
  if (areWorldMarkersHidden(pos.xyz, prev.xyz)) {
95
95
  gl_Position = ${n};
96
96
  return;
97
97
  }`)}
98
98
  pos.xyz = displace(pos.xyz, prev.xyz, getWorldMarkerSize(pos.xyz));
99
- vec4 displacedPosScreen = projectAndScale(pos);`:w`
99
+ vec4 displacedPosScreen = projectAndScale(pos);`:y`
100
100
  vec4 posScreen = projectAndScale(pos);
101
101
  vec4 prevScreen = projectAndScale(prev);
102
102
  vec4 displacedPosScreen = posScreen;
103
103
 
104
104
  displacedPosScreen.xy = displace(posScreen.xy, prevScreen.xy, screenMarkerSize);
105
- ${y($,w`
105
+ ${S(W,y`
106
106
  vec2 displacementDirU = perpendicular(normalizedSegment(posScreen.xy, prevScreen.xy));
107
107
 
108
108
  // We need three points of the ribbon line in camera space to calculate the plane it lies in
@@ -117,8 +117,8 @@ return abs(cos) > 0.001 && t > 0.0;
117
117
 
118
118
  // Convert texture coordinate into [0,1]
119
119
  vUV = (uv0 + 1.0) / 2.0;
120
- ${y(!M,"vUV = noPerspectiveWrite(vUV, displacedPosScreen.w);")}
121
- ${y(k,"vLineWidth = noPerspectiveWrite(lineWidth, displacedPosScreen.w);")}
120
+ ${S(!k,"vUV = noPerspectiveWrite(vUV, displacedPosScreen.w);")}
121
+ ${S(V,"vLineWidth = noPerspectiveWrite(lineWidth, displacedPosScreen.w);")}
122
122
 
123
123
  vSize = screenMarkerSize;
124
124
  vColor = getColor();
@@ -127,13 +127,13 @@ return abs(cos) > 0.001 && t > 0.0;
127
127
  vpos = pos.xyz;
128
128
 
129
129
  gl_Position = displacedPosScreen;
130
- }`),W.include(t,j),L.include(z,j),W.include(l),W.include(S),W.uniforms.add(new f("intrinsicColor",({color:e})=>e),new x("tex",({markerTexture:e})=>e)).constants.add("texelSize","float",1/e).code.add(w`float markerAlpha(vec2 samplePos) {
130
+ }`),M.include(t,j),L.include(z,j),M.include(v),M.include(x),M.uniforms.add(new g("intrinsicColor",({color:e})=>e),new b("tex",({markerTexture:e})=>e)).constants.add("texelSize","float",1/e).code.add(y`float markerAlpha(vec2 samplePos) {
131
131
  samplePos += vec2(0.5, -0.5) * texelSize;
132
132
  float sdf = texture(tex, samplePos).r;
133
133
  float pixelDistance = sdf * vSize;
134
134
  pixelDistance -= 0.5;
135
135
  return clamp(0.5 - pixelDistance, 0.0, 1.0);
136
- }`),k&&(L.include(p),W.constants.add("relativeMarkerSize","float",r/e).constants.add("relativeTipLineWidth","float",i).code.add(w`
136
+ }`),V&&(L.include(h),M.constants.add("relativeMarkerSize","float",r/e).constants.add("relativeTipLineWidth","float",i).code.add(y`
137
137
  float tipAlpha(vec2 samplePos) {
138
138
  // Convert coordinates s.t. they are in pixels and relative to the tip of an arrow marker
139
139
  samplePos -= vec2(0.5, 0.5 + 0.5 * relativeMarkerSize);
@@ -142,18 +142,18 @@ return clamp(0.5 - pixelDistance, 0.0, 1.0);
142
142
  float halfMarkerSize = 0.5 * relativeMarkerSize * vSize;
143
143
  float halfTipLineWidth = 0.5 * max(1.0, relativeTipLineWidth * noPerspectiveRead(vLineWidth));
144
144
 
145
- ${y(M,"halfTipLineWidth *= fwidth(samplePos.y);")}
145
+ ${S(k,"halfTipLineWidth *= fwidth(samplePos.y);")}
146
146
 
147
147
  float distance = max(abs(samplePos.x) - halfMarkerSize, abs(samplePos.y) - halfTipLineWidth);
148
148
  return clamp(0.5 - distance, 0.0, 1.0);
149
149
  }
150
- `)),L.include(a,j),L.include(p),W.main.add(w`
150
+ `)),L.include(a,j),L.include(h),M.main.add(y`
151
151
  discardBySlice(vpos);
152
152
 
153
153
  vec4 finalColor = intrinsicColor * vColor;
154
154
 
155
155
  // Cancel out perspective correct interpolation if in screen space or draped
156
- vec2 samplePos = ${y(!M,"noPerspectiveRead(vUV)","vUV")};
157
- finalColor.a *= ${k?"max(markerAlpha(samplePos), tipAlpha(samplePos))":"markerAlpha(samplePos)"};
156
+ vec2 samplePos = ${S(!k,"noPerspectiveRead(vUV)","vUV")};
157
+ finalColor.a *= ${V?"max(markerAlpha(samplePos), tipAlpha(samplePos))":"markerAlpha(samplePos)"};
158
158
  if(finalColor.a < alphaCutoff) discard; // We also want to discard in the opaque color pass
159
159
  outputColorHighlightOLID(applySlice(finalColor, vpos), finalColor.rgb);`),L}const L=Object.freeze(Object.defineProperty({__proto__:null,build:j},Symbol.toStringTag,{value:"Module"}));export{L,j as b};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{BooleanPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/BooleanPassUniform.js";import{Float2BindUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float2PassUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{glsl as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as d}from"../views/webgl/NoParameters.js";import{ShaderBuilder as l}from"../views/webgl/ShaderBuilder.js";class c extends d{constructor(){super(...arguments),this.depthTextureSize=[0,0],this.cellSize=1,this.reduced=!1}}function m(){const d=new l;return d.include(e),d.fragment.include(r),d.fragment.uniforms.add(new s("mainDepthTexture",e=>e.depthTexture),new o("screenSize",e=>e.depthTextureSize),new a("fullWidth",e=>e.cellSize),new t("reduced",e=>e.reduced),new i("nearFar",e=>e.camera.nearFar)),d.fragment.code.add(n`float normalizedDepthFromTexture(sampler2D depthTexture, ivec2 coords) {
2
+ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{nearFar as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{BooleanPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/BooleanPassUniform.js";import{Float2PassUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{glsl as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as d}from"../views/webgl/NoParameters.js";import{ShaderBuilder as l}from"../views/webgl/ShaderBuilder.js";class c extends d{constructor(){super(...arguments),this.depthTextureSize=[0,0],this.cellSize=1,this.reduced=!1}}function m(){const d=new l;return d.include(e),d.fragment.include(r),d.fragment.uniforms.add(new a("mainDepthTexture",e=>e.depthTexture),new o("screenSize",e=>e.depthTextureSize),new s("fullWidth",e=>e.cellSize),new i("reduced",e=>e.reduced),t),d.fragment.code.add(n`float normalizedDepthFromTexture(sampler2D depthTexture, ivec2 coords) {
3
3
  if (reduced) {
4
4
  return texelFetch(depthTexture, coords, 0).r;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{Transform as o}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{glsl as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Matrix4DrawUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{Texture2DPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as d}from"../views/webgl/NoParameters.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";class m extends d{constructor(){super(...arguments),this.cullFace=0}}function l(){const r=new n,{attributes:d,vertex:m,fragment:l}=r;return r.include(o),d.add("position","vec3"),m.uniforms.add(new t("proj",e=>e.camera.projectionMatrix),new s("view",(r,o)=>e(c,o.camera.viewMatrix,r.origin))).main.add(i`gl_Position = transformPosition(proj, view, position);`),l.uniforms.add(new a("depthTexture",e=>e.depthTexture)).main.add(i`float depth = texelFetch(depthTexture, ivec2(gl_FragCoord.xy), 0).r;
2
+ import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{Transform as o}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{projMatrix as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4DrawUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{Texture2DPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as d}from"../views/webgl/NoParameters.js";import{ShaderBuilder as m}from"../views/webgl/ShaderBuilder.js";class n extends d{constructor(){super(...arguments),this.cullFace=0}}function l(){const r=new m,{attributes:d,vertex:n,fragment:l}=r;return r.include(o),d.add("position","vec3"),n.uniforms.add(i,new s("view",(r,o)=>e(c,o.camera.viewMatrix,r.origin))).main.add(t`gl_Position = transformPosition(proj, view, position);`),l.uniforms.add(new a("depthTexture",e=>e.depthTexture)).main.add(t`float depth = texelFetch(depthTexture, ivec2(gl_FragCoord.xy), 0).r;
3
3
  if (gl_FragCoord.z <= depth) {
4
4
  discard;
5
- }`),r}const c=r(),g=Object.freeze(Object.defineProperty({__proto__:null,OccludedGeometryDepthPassParameters:m,build:l},Symbol.toStringTag,{value:"Module"}));export{m as O,g as a,l as b};
5
+ }`),r}const c=r(),g=Object.freeze(Object.defineProperty({__proto__:null,OccludedGeometryDepthPassParameters:n,build:l},Symbol.toStringTag,{value:"Module"}));export{n as O,g as a,l as b};
@@ -1,18 +1,18 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{addNearFar as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{Offset as o}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{PathVertexPosition as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{outputDepth as l}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as t}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as s,addAmbientBoostFactor as c,addLightingGlobalFactor as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{mainLightIntensity as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{NormalUtils as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRenderingParameters as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDrawFragment as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{ColorConversion as b}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as f,addCameraPosition as h,addViewNormal as y}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as j}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as L,If as V}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{SnowCover as P}from"../views/3d/webgl-engine/effects/snowcover/SnowCover.glsl.js";import{outputColorHighlightOLID as C}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as O}from"../views/webgl/ShaderBuilder.js";function S(S){const A=new O,{vertex:I,fragment:_,varyings:B}=A;f(I,S),B.add("vpos","vec3",{invariant:!0}),A.include(d,S);const{output:D,pbrMode:M,snowCover:N,offsetBackfaces:F}=S,k=11===D;switch((r(D)||k)&&(k?(A.varyings.add("objectAndLayerIdColorVarying","vec4"),A.vertex.code.add(L`void forwardObjectAndLayerIdColor() {
2
+ import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as o}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as r}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{PathVertexPosition as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{outputDepth as d}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as l}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as n,addAmbientBoostFactor as s,addLightingGlobalFactor as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{mainLightIntensity as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{NormalUtils as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRenderingParameters as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDrawFragment as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{viewNormal as b,nearFar as w}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{ColorConversion as f}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as h,addCameraPosition as y}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as j}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as L,If as V}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{SnowCover as P}from"../views/3d/webgl-engine/effects/snowcover/SnowCover.glsl.js";import{outputColorHighlightOLID as C}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as O}from"../views/webgl/ShaderBuilder.js";function S(S){const A=new O,{vertex:I,fragment:_,varyings:B}=A;h(I,S),B.add("vpos","vec3",{invariant:!0}),A.include(a,S);const{output:D,pbrMode:M,snowCover:N,offsetBackfaces:k}=S,E=11===D;switch((o(D)||E)&&(E?(A.varyings.add("objectAndLayerIdColorVarying","vec4"),A.vertex.code.add(L`void forwardObjectAndLayerIdColor() {
3
3
  objectAndLayerIdColorVarying = getOlidColor();
4
4
  }`),A.fragment.code.add(L`void outputObjectAndLayerIdColor() {
5
5
  fragColor = objectAndLayerIdColorVarying;
6
- }`)):(A.vertex.code.add(L`void forwardObjectAndLayerIdColor() {}`),A.fragment.code.add(L`void outputObjectAndLayerIdColor() {}`)),A.include(a),A.include(w,S),F&&(h(I,S),A.include(o)),B.add("vnormal","vec3"),B.add("vcolor","vec4"),I.main.add(L`
6
+ }`)):(A.vertex.code.add(L`void forwardObjectAndLayerIdColor() {}`),A.fragment.code.add(L`void outputObjectAndLayerIdColor() {}`)),A.include(i),A.include(p,S),k&&(y(I,S),A.include(e)),B.add("vnormal","vec3"),B.add("vcolor","vec4"),I.main.add(L`
7
7
  ExtrudedVertex extrudedVertex = evaluateVertex();
8
8
  vpos = calculateVPos(extrudedVertex);
9
9
  vnormal = normalize(localNormal(extrudedVertex));
10
10
  gl_Position = transformPosition(proj, view, vpos);
11
- ${V(F,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vnormal, cameraPosition);")}
11
+ ${V(k,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vnormal, cameraPosition);")}
12
12
 
13
13
  forwardObjectAndLayerIdColor();
14
14
  vcolor = getColor();
15
- forwardLinearDepthToReadShadowMap();`)),D){case 0:case 1:case 2:A.include(p,S),_.include(s,S),_.include(n,S),A.include(v,S),_.include(u,S),_.include(i,S),A.include(C,S),h(_,S),c(_),g(_),_.uniforms.add(I.uniforms.get("localOrigin"),new x("ambient",e=>e.ambient),new x("diffuse",e=>e.diffuse),new j("opacity",e=>e.opacity)),_.include(b),_.include(P,S),_.uniforms.add(m).main.add(L`
15
+ forwardLinearDepthToReadShadowMap();`)),D){case 0:case 1:case 2:A.include(u,S),_.include(n,S),_.include(t,S),A.include(g,S),_.include(v,S),_.include(r,S),A.include(C,S),y(_,S),s(_),c(_),_.uniforms.add(I.uniforms.get("localOrigin"),new x("ambient",e=>e.ambient),new x("diffuse",e=>e.diffuse),new j("opacity",e=>e.opacity)),_.include(f),_.include(P,S),_.uniforms.add(m).main.add(L`
16
16
  discardBySlice(vpos);
17
17
 
18
18
  vec3 viewDirection = normalize(vpos - cameraPosition);
@@ -35,20 +35,20 @@ fragColor = objectAndLayerIdColorVarying;
35
35
  ${V(2===M&&N,"applySnowToMRR(snow);")}
36
36
  vec3 shadedColor = evaluateSceneLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, upNormal);
37
37
  vec4 finalColor = vec4(shadedColor, combinedOpacity);
38
- outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${V(N,", snow")});`);break;case 3:A.include(a),I.main.add(L`ExtrudedVertex extrudedVertex = evaluateVertex();
38
+ outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${V(N,", snow")});`);break;case 3:A.include(i),I.main.add(L`ExtrudedVertex extrudedVertex = evaluateVertex();
39
39
  vpos = calculateVPos(extrudedVertex);
40
- gl_Position = transformPosition(proj, view, vpos);`),A.fragment.include(i,S),_.main.add(L`discardBySlice(vpos);`);break;case 5:case 6:case 7:case 8:A.include(a),e(A),B.add("depth","float"),I.main.add(L`ExtrudedVertex extrudedVertex = evaluateVertex();
40
+ gl_Position = transformPosition(proj, view, vpos);`),A.fragment.include(r,S),_.main.add(L`discardBySlice(vpos);`);break;case 5:case 6:case 7:case 8:A.include(i),B.add("depth","float"),I.uniforms.add(w).main.add(L`ExtrudedVertex extrudedVertex = evaluateVertex();
41
41
  vpos = calculateVPos(extrudedVertex);
42
- gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);`),_.include(i,S),A.include(l,S),_.main.add(L`discardBySlice(vpos);
43
- outputDepth(depth);`);break;case 11:A.fragment.include(i,S),_.main.add(L`discardBySlice(vpos);
44
- outputObjectAndLayerIdColor();`);break;case 4:A.include(a),I.include(u,S),y(I),B.add("vnormal","vec3"),B.add("vcolor","vec4"),I.main.add(L`ExtrudedVertex extrudedVertex = evaluateVertex();
42
+ gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);`),_.include(r,S),A.include(d,S),_.main.add(L`discardBySlice(vpos);
43
+ outputDepth(depth);`);break;case 11:A.fragment.include(r,S),_.main.add(L`discardBySlice(vpos);
44
+ outputObjectAndLayerIdColor();`);break;case 4:A.include(i),I.include(v,S),B.add("vnormal","vec3"),B.add("vcolor","vec4"),I.uniforms.add(b).main.add(L`ExtrudedVertex extrudedVertex = evaluateVertex();
45
45
  vpos = calculateVPos(extrudedVertex);
46
46
  vnormal = normalize((viewNormal * vec4(localNormal(extrudedVertex), 1.0)).xyz);
47
47
  vcolor = getColor();
48
- gl_Position = transformPosition(proj, view, vpos);`),A.fragment.include(i,S),_.uniforms.add(new j("opacity",e=>e.opacity)),_.main.add(L`discardBySlice(vpos);
48
+ gl_Position = transformPosition(proj, view, vpos);`),A.fragment.include(r,S),_.uniforms.add(new j("opacity",e=>e.opacity)),_.main.add(L`discardBySlice(vpos);
49
49
  vec3 normal = normalize(vnormal);
50
50
  if (gl_FrontFacing == false) normal = -normal;
51
- fragColor = vec4(vec3(0.5) + 0.5 * normal, vcolor.a * opacity);`);break;case 10:A.include(a),I.include(u,S),B.add("vnormal","vec3"),I.main.add(L`ExtrudedVertex extrudedVertex = evaluateVertex();
51
+ fragColor = vec4(vec3(0.5) + 0.5 * normal, vcolor.a * opacity);`);break;case 10:A.include(i),I.include(v,S),B.add("vnormal","vec3"),I.main.add(L`ExtrudedVertex extrudedVertex = evaluateVertex();
52
52
  vpos = calculateVPos(extrudedVertex);
53
- gl_Position = transformPosition(proj, view, vpos);`),A.fragment.include(i,S),A.include(t,S),_.main.add(L`discardBySlice(vpos);
53
+ gl_Position = transformPosition(proj, view, vpos);`),A.fragment.include(r,S),A.include(l,S),_.main.add(L`discardBySlice(vpos);
54
54
  calculateOcclusionAndOutputHighlight();`)}return A}const A=Object.freeze(Object.defineProperty({__proto__:null,build:S},Symbol.toStringTag,{value:"Module"}));export{A as P,S as b};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{numberMaxFloat32 as e}from"../core/mathUtils.js";import{multiply as i,fromTranslation as o}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as t}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as s}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as a}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as c,positiveInfinity as l}from"../geometry/support/aaBoundingBox.js";import{isColor as p}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePlaneParameters as m,RejectBySliceDraw as d}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{OutputHighlight as f}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{positionOutsideClipSpace as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{Float2DrawUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{Float2PassUniform as S}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3DrawUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float3DrawUniform.js";import{glsl as h,If as v}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Matrix4DrawUniform as z}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{NoParameters as b}from"../views/webgl/NoParameters.js";import{ShaderBuilder as M}from"../views/webgl/ShaderBuilder.js";class j extends b{constructor(){super(...arguments),this.clipBox=c(l),this.useFixedSizes=!1,this.useRealWorldSymbolSizes=!1,this.scaleFactor=1,this.minSizePx=0,this.size=0,this.sizePx=0}get fixedSize(){return this.drawScreenSpace?this.sizePx:this.size}get screenMinSize(){return this.useFixedSizes?0:this.minSizePx}get drawScreenSpace(){return this.useFixedSizes&&!this.useRealWorldSymbolSizes}}class P extends m{constructor(e,i,o){super(e),this.origin=e,this.isLeaf=i,this.splatSize=o}}function y(r){const s=new M,n=p(r.output),{attributes:c,vertex:l,fragment:m}=s;return c.add("position","vec3"),c.add("color","vec3"),l.include(d,r),l.uniforms.add(new z("modelView",(e,r)=>i(B,r.camera.viewMatrix,o(B,e.origin))),new w("proj",e=>e.camera.projectionMatrix),new u("screenMinMaxSize",(e,i,o)=>t(_,o.useFixedSizes?0:o.minSizePx*i.camera.pixelRatio,O(e.isLeaf)*i.camera.pixelRatio)),r.useFixedSizes?new S("pointScale",(e,i)=>t(_,e.fixedSize*i.camera.pixelRatio,i.camera.fullHeight)):new u("pointScale",(e,i,o)=>t(_,e.splatSize*o.scaleFactor*i.camera.pixelRatio,i.camera.fullHeight/i.camera.pixelRatio))),r.clippingEnabled?l.uniforms.add(new x("clipMin",(e,i,o)=>a(R,o.clipBox[0]-e.origin[0],o.clipBox[1]-e.origin[1],o.clipBox[2]-e.origin[2])),new x("clipMax",(e,i,o)=>a(R,o.clipBox[3]-e.origin[0],o.clipBox[4]-e.origin[1],o.clipBox[5]-e.origin[2]))):(l.constants.add("clipMin","vec3",[-e,-e,-e]),l.constants.add("clipMax","vec3",[e,e,e])),n&&s.varyings.add("vColor","vec3"),l.main.add(h`
2
+ import{numberMaxFloat32 as e}from"../core/mathUtils.js";import{multiply as i,fromTranslation as o}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as t}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as s}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as a}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as c,positiveInfinity as l}from"../geometry/support/aaBoundingBox.js";import{isColor as p}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePlaneParameters as m,RejectBySliceDraw as d}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{OutputHighlight as f}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{positionOutsideClipSpace as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{projMatrix as u}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{Float2DrawUniform as S}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{Float2PassUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3DrawUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float3DrawUniform.js";import{glsl as v,If as w}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4DrawUniform as z}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{NoParameters as b}from"../views/webgl/NoParameters.js";import{ShaderBuilder as M}from"../views/webgl/ShaderBuilder.js";class P extends b{constructor(){super(...arguments),this.clipBox=c(l),this.useFixedSizes=!1,this.useRealWorldSymbolSizes=!1,this.scaleFactor=1,this.minSizePx=0,this.size=0,this.sizePx=0}get fixedSize(){return this.drawScreenSpace?this.sizePx:this.size}get screenMinSize(){return this.useFixedSizes?0:this.minSizePx}get drawScreenSpace(){return this.useFixedSizes&&!this.useRealWorldSymbolSizes}}class j extends m{constructor(e,i,o){super(e),this.origin=e,this.isLeaf=i,this.splatSize=o}}function y(r){const s=new M,n=p(r.output),{attributes:c,vertex:l,fragment:m}=s;return c.add("position","vec3"),c.add("color","vec3"),l.include(d,r),l.uniforms.add(new z("modelView",(e,r)=>i(R,r.camera.viewMatrix,o(R,e.origin))),u,new S("screenMinMaxSize",(e,i,o)=>t(_,o.useFixedSizes?0:o.minSizePx*i.camera.pixelRatio,O(e.isLeaf)*i.camera.pixelRatio)),r.useFixedSizes?new x("pointScale",(e,i)=>t(_,e.fixedSize*i.camera.pixelRatio,i.camera.fullHeight)):new S("pointScale",(e,i,o)=>t(_,e.splatSize*o.scaleFactor*i.camera.pixelRatio,i.camera.fullHeight/i.camera.pixelRatio))),r.clippingEnabled?l.uniforms.add(new h("clipMin",(e,i,o)=>a(B,o.clipBox[0]-e.origin[0],o.clipBox[1]-e.origin[1],o.clipBox[2]-e.origin[2])),new h("clipMax",(e,i,o)=>a(B,o.clipBox[3]-e.origin[0],o.clipBox[4]-e.origin[1],o.clipBox[5]-e.origin[2]))):(l.constants.add("clipMin","vec3",[-e,-e,-e]),l.constants.add("clipMax","vec3",[e,e,e])),n&&s.varyings.add("vColor","vec3"),l.main.add(v`
3
3
  // Move clipped points outside of clipspace
4
4
  if (position.x < clipMin.x || position.y < clipMin.y || position.z < clipMin.z ||
5
5
  position.x > clipMax.x || position.y > clipMax.y || position.z > clipMax.z) {
@@ -19,7 +19,7 @@ import{numberMaxFloat32 as e}from"../core/mathUtils.js";import{multiply as i,fro
19
19
 
20
20
  float pointSize = pointScale.x;
21
21
  vec4 position = proj * camera;
22
- ${r.drawScreenSize?h`float clampedScreenSize = pointSize;`:h`float pointRadius = 0.5 * pointSize;
22
+ ${r.drawScreenSize?v`float clampedScreenSize = pointSize;`:v`float pointRadius = 0.5 * pointSize;
23
23
  vec4 cameraOffset = camera + vec4(0.0, pointRadius, 0.0, 0.0);
24
24
  vec4 positionOffset = proj * cameraOffset;
25
25
  float radius = abs(positionOffset.y - position.y);
@@ -35,7 +35,7 @@ import{numberMaxFloat32 as e}from"../core/mathUtils.js";import{multiply as i,fro
35
35
 
36
36
  gl_PointSize = clampedScreenSize;
37
37
  gl_Position = position;
38
- ${n?h`vColor = color;`:""}`),s.include(f,r),n&&(s.outputs.add("fragColor","vec4",0),r.hasEmission&&s.outputs.add("fragEmission","vec4",1)),m.main.add(h`
38
+ ${n?v`vColor = color;`:""}`),s.include(f,r),n&&(s.outputs.add("fragColor","vec4",0),r.hasEmission&&s.outputs.add("fragEmission","vec4",1)),m.main.add(v`
39
39
  vec2 vOffset = gl_PointCoord - vec2(0.5, 0.5);
40
40
  float r2 = dot(vOffset, vOffset);
41
41
 
@@ -43,5 +43,5 @@ import{numberMaxFloat32 as e}from"../core/mathUtils.js";import{multiply as i,fro
43
43
  discard;
44
44
  }
45
45
  calculateOcclusionAndOutputHighlight();
46
- ${v(n,`fragColor = vec4(vColor, 1.0);\n ${v(r.hasEmission,"fragEmission = vec4(vec3(0.0), 1.0);")}`)}
47
- `),s}function O(e){return e?256:64}const B=r(),R=n(),_=s(),F=Object.freeze(Object.defineProperty({__proto__:null,PointRendererDrawParameters:P,PointRendererPassParameters:j,build:y,getMaxPointSizeScreenspace:O},Symbol.toStringTag,{value:"Module"}));export{j as P,P as a,F as b,y as c,O as g};
46
+ ${w(n,`fragColor = vec4(vColor, 1.0);\n ${w(r.hasEmission,"fragEmission = vec4(vec3(0.0), 1.0);")}`)}
47
+ `),s}function O(e){return e?256:64}const R=r(),B=n(),_=s(),F=Object.freeze(Object.defineProperty({__proto__:null,PointRendererDrawParameters:j,PointRendererPassParameters:P,build:y,getMaxPointSizeScreenspace:O},Symbol.toStringTag,{value:"Module"}));export{P,j as a,F as b,y as c,O as g};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{floor as e,set as t,sub as o,scale as a,normalize as i,dot as r,lerp as n}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as s,fromValues as d}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{Float3BindUniform as c}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as p,If as v}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{ShaderBuilder as u}from"../views/webgl/ShaderBuilder.js";function h(e){const t=new u,{attributes:o,outputs:a,vertex:i,varyings:r,fragment:n}=t;o.add("position","vec3"),o.add("instanceFeatureAttribute","float"),a.add("fragColor","vec4",0),i.uniforms.add(new c("cameraPosition",e=>e.camera.eye),new m("offset",(e,t)=>g(e,t)),new l("width",e=>e.width),new l("time",e=>e.time),new f("proj",e=>e.camera.projectionMatrix),new f("view",e=>e.camera.viewMatrix)),r.add("vUv","vec2"),i.code.add(p`vec3 hash31(float p){
2
+ import{floor as e,set as t,sub as o,scale as a,normalize as i,dot as r,lerp as n}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as s,fromValues as d}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{projMatrix as c,viewMatrix as m}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{Float3BindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as p}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as v}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as f,If as u}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{ShaderBuilder as h}from"../views/webgl/ShaderBuilder.js";function g(e){const t=new h,{attributes:o,outputs:a,vertex:i,varyings:r,fragment:n}=t;o.add("position","vec3"),o.add("instanceFeatureAttribute","float"),a.add("fragColor","vec4",0),i.uniforms.add(new l("cameraPosition",e=>e.camera.eye),new p("offset",(e,t)=>w(e,t)),new v("width",e=>e.width),new v("time",e=>e.time),c,m),r.add("vUv","vec2"),i.code.add(f`vec3 hash31(float p){
3
3
  vec3 p3 = fract(vec3(p) * vec3(0.1031, 0.1030, 0.0973));
4
4
  p3 += dot(p3, p3.yzx + 33.33);
5
5
  return fract((p3.xxy + p3.yzz) * p3.zyx);
@@ -12,7 +12,7 @@ return fract(p);
12
12
  }
13
13
  vec3 rotateVectorByQuaternion(vec3 v, vec4 q){
14
14
  return 2.0 * cross(q.xyz, v * q.w + cross(q.xyz, v)) + v;
15
- }`);const s=0===e.type;return i.main.add(p`
15
+ }`);const s=0===e.type;return i.main.add(f`
16
16
  vUv = position.xz;
17
17
  vec3 rand = hash31(instanceFeatureAttribute);
18
18
 
@@ -37,7 +37,7 @@ return 2.0 * cross(q.xyz, v * q.w + cross(q.xyz, v)) + v;
37
37
 
38
38
  // Rain particles fall straight down and are randomly oriented
39
39
  // Snow particles have random sinusoid trajectories and are rotated to face the camera
40
- ${s?p`
40
+ ${s?f`
41
41
  // Random rotation for particle
42
42
  vec3 rotationAxis = up;
43
43
  vec4 quat = vec4(rotationAxis * sin(angle), cos(angle));
@@ -51,7 +51,7 @@ return 2.0 * cross(q.xyz, v * q.w + cross(q.xyz, v)) + v;
51
51
 
52
52
  vec4 pos = mat4(mat3(view)) * vec4(transformedPos + (mod(width * animatedPos - offset, width) - 0.5 * width), 1.0);
53
53
  gl_Position = proj * pos;
54
- `:p`
54
+ `:f`
55
55
  vec3 rotationAxis = direction;
56
56
  vec4 quat = vec4(rotationAxis * sin(angle), cos(angle));
57
57
 
@@ -61,9 +61,9 @@ return 2.0 * cross(q.xyz, v * q.w + cross(q.xyz, v)) + v;
61
61
  vec4 pos = mat4(mat3(view)) * vec4((mod(width * animatedPos - offset, width) - 0.5 * width), 1.0);
62
62
  gl_Position = proj * (0.5 * vec4(position.xzy, 0.0) + pos);
63
63
  `}
64
- `),n.uniforms.add(new l("opacity",e=>e.opacity),new c("particleColor",t=>w(t,e))),n.main.add(p`
64
+ `),n.uniforms.add(new v("opacity",e=>e.opacity),new l("particleColor",t=>y(t,e))),n.main.add(f`
65
65
  float d = length(vUv - vec2(0.5));
66
66
 
67
- ${v(s,"d = 0.35 * smoothstep(0.5, 0.0, d);","d = smoothstep(0.5, 0.1, d);")}
67
+ ${u(s,"d = 0.35 * smoothstep(0.5, 0.0, d);","d = smoothstep(0.5, 0.1, d);")}
68
68
  fragColor = opacity * vec4(particleColor * d, d);
69
- `),e.hasEmissive&&(t.outputs.add("fragEmission","vec4",1),t.fragment.main.add("fragEmission = vec4(vec3(0.0), fragColor.a * 0.75);")),t}function g(i,r){const n=r.camera.eye,s=.5*i.width,d=1/i.width,c=e(y,t(y,(n[0]+s)*d,(n[1]+s)*d,(n[2]+s)*d));return o(c,n,a(c,c,i.width))}function w(e,{type:t}){const o=0===t?P:b,s=a(y,o,j),d=e.camera.eye;i(x,d);const c=Math.max(0,r(x,e.lighting.mainLight.direction));return n(s,s,o,c)}const y=s(),x=s(),b=d(1,1,1),P=d(.85,.85,.85),j=.7,z=Object.freeze(Object.defineProperty({__proto__:null,build:h},Symbol.toStringTag,{value:"Module"}));export{z as P,h as b};
69
+ `),e.hasEmissive&&(t.outputs.add("fragEmission","vec4",1),t.fragment.main.add("fragEmission = vec4(vec3(0.0), fragColor.a * 0.75);")),t}function w(i,r){const n=r.camera.eye,s=.5*i.width,d=1/i.width,c=e(b,t(b,(n[0]+s)*d,(n[1]+s)*d,(n[2]+s)*d));return o(c,n,a(c,c,i.width))}function y(e,{type:t}){const o=0===t?j:P,s=a(b,o,z),d=e.camera.eye;i(x,d);const c=Math.max(0,r(x,e.lighting.mainLight.direction));return n(s,s,o,c)}const b=s(),x=s(),P=d(1,1,1),j=d(.85,.85,.85),z=.7,q=Object.freeze(Object.defineProperty({__proto__:null,build:g},Symbol.toStringTag,{value:"Module"}));export{q as P,g as b};