@arcgis/core 5.2.0-next.20 → 5.2.0-next.22

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 (271) hide show
  1. package/Graphic.d.ts +1 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0eb0ce43b4813cae968f.js +2 -0
  4. package/assets/esri/core/workers/chunks/{2dbd88566abac030e965.js → 162dada6a199d1efdf86.js} +2 -2
  5. package/assets/esri/core/workers/chunks/1a4bec464daa9662ab2a.js +1 -0
  6. package/assets/esri/core/workers/chunks/{b375abfb2a2d9c63e20a.js → 2255a21c7b959f04d941.js} +1 -1
  7. package/assets/esri/core/workers/chunks/292498a9c7d462d215c6.js +1 -0
  8. package/assets/esri/core/workers/chunks/2ef80e003b4f0393ac2e.js +1 -0
  9. package/assets/esri/core/workers/chunks/{4517630bf869205bab87.js → 38a76bc4ef5c10ab0488.js} +1 -1
  10. package/assets/esri/core/workers/chunks/3b4fc67f6cb7393fbd97.js +1 -0
  11. package/assets/esri/core/workers/chunks/{8ce4fe00328173224ed2.js → 44e32ed3a570593a7245.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{db26cf2c2735183294b8.js → 50345dfc00380b158c96.js} +1 -1
  13. package/assets/esri/core/workers/chunks/5468a65698931603656d.js +1 -0
  14. package/assets/esri/core/workers/chunks/5b42f8aa0247adc2d065.js +1 -0
  15. package/assets/esri/core/workers/chunks/{d7acbc2ddff4cee8a465.js → 5ee887fc6e1e0e70e02f.js} +1 -1
  16. package/assets/esri/core/workers/chunks/66c2cfe11161d5dc989a.js +1 -0
  17. package/assets/esri/core/workers/chunks/6c0c77de1934f35dc45f.js +1 -0
  18. package/assets/esri/core/workers/chunks/{f7f820483e45c05ab9e4.js → 75df436e6e9773bdcfc2.js} +1 -1
  19. package/assets/esri/core/workers/chunks/780519b60aa674a61a74.js +1 -0
  20. package/assets/esri/core/workers/chunks/{a2247f4c3116efb16c4f.js → 7e23de8d9b2d938808f6.js} +1 -1
  21. package/assets/esri/core/workers/chunks/7fc8516111bd869256fc.js +1 -0
  22. package/assets/esri/core/workers/chunks/8579eba21f40630d073d.js +1 -0
  23. package/assets/esri/core/workers/chunks/{72edd08a2ff08970ba38.js → 87011d2fe14c54e296af.js} +1 -1
  24. package/assets/esri/core/workers/chunks/928b18e13e015330d44b.js +1 -0
  25. package/assets/esri/core/workers/chunks/93b40245378ced43ca08.js +1 -0
  26. package/assets/esri/core/workers/chunks/9434c76ad39c936dba90.js +1 -0
  27. package/assets/esri/core/workers/chunks/98dfe31e8ed9b522eaff.js +1 -0
  28. package/assets/esri/core/workers/chunks/{4104a0585969f8cd524c.js → a40ede4d3375184f21fe.js} +1 -1
  29. package/assets/esri/core/workers/chunks/a533d066cac26124c5ce.js +1 -0
  30. package/assets/esri/core/workers/chunks/a536904fe6f3b16fdbdc.js +1 -0
  31. package/assets/esri/core/workers/chunks/a54773c9bbc751619b3f.js +2 -0
  32. package/assets/esri/core/workers/chunks/a8167ab9fd846d699be5.js +1 -0
  33. package/assets/esri/core/workers/chunks/{dd0c1cf921369e2bc48b.js → a90619adff41658f8057.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{ac16016964be3b684e98.js → aded4e704e09a28edc8f.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{eccbddaec4be44c86f79.js → b0b3c67b7d37bd854d95.js} +2 -2
  36. package/assets/esri/core/workers/chunks/b419fd36337e76e2d4a3.js +680 -0
  37. package/assets/esri/core/workers/chunks/{05d597dd117766beadd8.js → b91a15522692781560b4.js} +1 -1
  38. package/assets/esri/core/workers/chunks/be4275a4b8977ec3eb61.js +1 -0
  39. package/assets/esri/core/workers/chunks/{e8d65900eefff1152207.js → c593539c2cce7a2b9d44.js} +1 -1
  40. package/assets/esri/core/workers/chunks/c86d388d216adbb15a05.js +1 -0
  41. package/assets/esri/core/workers/chunks/{0b522e05668bef729b1b.js → ceb5bd9f2afaa2ea0808.js} +1 -1
  42. package/assets/esri/core/workers/chunks/d07068c44d560e4ce02e.js +1 -0
  43. package/assets/esri/core/workers/chunks/{595bc41ff36c77324d01.js → d4e0346209fabc58f929.js} +9 -9
  44. package/assets/esri/core/workers/chunks/{5809e70a8e57e9b05959.js → dd795c95cdc3812b5b49.js} +1 -1
  45. package/assets/esri/core/workers/chunks/e29c8c10331edfa83277.js +1 -0
  46. package/assets/esri/core/workers/chunks/{44b30bce8e9a75b9e1b3.js → ef94d25d1cceb25ea9fe.js} +2 -2
  47. package/assets/esri/core/workers/chunks/f02a9408ba3893484c6c.js +1 -0
  48. package/assets/esri/core/workers/chunks/f7344d855f1092383abe.js +1 -0
  49. package/assets/esri/core/workers/chunks/{5f63077ec5ba3560491b.js → fb9f8b6cc2b4ae5b60df.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{ecbf84a1f42e6188faab.js → fd629872b5c07853f695.js} +1 -1
  51. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  52. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +5 -1
  53. package/assets/esri/themes/dark/main.css +1 -1
  54. package/assets/esri/themes/light/main.css +1 -1
  55. package/assets/esri/themes/light/view.css +1 -1
  56. package/chunks/GaussianSplat.glsl.js +4 -4
  57. package/chunks/GaussianSplatShadow.glsl.js +1 -1
  58. package/chunks/Pattern.glsl.js +17 -17
  59. package/chunks/RibbonLine.glsl.js +45 -43
  60. package/chunks/bundle2.js +1 -1
  61. package/config.js +1 -1
  62. package/core/date.js +1 -1
  63. package/form/FormTemplate.d.ts +15 -20
  64. package/form/elements/AttachmentElement.d.ts +38 -11
  65. package/form/elements/Element.d.ts +9 -6
  66. package/form/elements/FieldElement.d.ts +0 -1
  67. package/form/elements/GroupElement.d.ts +4 -6
  68. package/form/elements/RelationshipElement.d.ts +8 -8
  69. package/form/elements/inputs/attachments/AttachmentInput.d.ts +34 -18
  70. package/form/elements/inputs/attachments/AudioInput.d.ts +4 -3
  71. package/form/elements/inputs/attachments/DocumentInput.d.ts +2 -6
  72. package/form/elements/inputs/attachments/ImageInput.d.ts +4 -3
  73. package/form/elements/inputs/attachments/Input.d.ts +6 -3
  74. package/form/elements/inputs/attachments/SignatureInput.d.ts +3 -3
  75. package/form/elements/inputs/attachments/VideoInput.d.ts +4 -3
  76. package/form/elements.d.ts +6 -12
  77. package/form/types.d.ts +0 -4
  78. package/geometry/support/geometryUtils.js +1 -1
  79. package/geometry/support/intersects.js +1 -1
  80. package/geometry/support/intersectsBase.js +1 -1
  81. package/kernel.js +1 -1
  82. package/layers/AnnotationFeatureLayer.d.ts +44 -0
  83. package/layers/AnnotationFeatureLayer.js +1 -1
  84. package/layers/DimensionFeatureLayer.d.ts +40 -0
  85. package/layers/DimensionFeatureLayer.js +1 -1
  86. package/layers/DimensionLayer.d.ts +1 -0
  87. package/layers/FeatureLayer.js +1 -1
  88. package/layers/IntegratedMesh3DTilesLayer.d.ts +9 -1
  89. package/layers/OrientedImageryLayer.js +1 -1
  90. package/layers/ParquetLayer.d.ts +6 -10
  91. package/layers/ParquetLayer.js +1 -1
  92. package/layers/graphics/data/attributeSupport.js +1 -1
  93. package/layers/graphics/data/queryValidationUtils.js +1 -1
  94. package/layers/graphics/sources/ParquetSource.js +1 -1
  95. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  96. package/layers/graphics/sources/geojson/geojson.js +1 -1
  97. package/layers/graphics/sources/parquet/FileProvider.js +1 -1
  98. package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +1 -1
  99. package/layers/graphics/sources/parquet/fileProviderChangedError.js +2 -0
  100. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  101. package/layers/mixins/ArcGISImageService.js +1 -1
  102. package/layers/mixins/EditBusLayer.js +1 -1
  103. package/layers/orientedImagery/core/utils.js +1 -1
  104. package/layers/raster/datasets/WCSRaster.js +1 -1
  105. package/layers/support/AnnotationFeatureSublayer.d.ts +5 -3
  106. package/layers/support/RasterBandInfo.js +1 -1
  107. package/layers/support/SymbolLayerDrawing.js +1 -1
  108. package/layers/types.d.ts +1 -0
  109. package/package.json +2 -2
  110. package/rest/support/AttachmentQuery.d.ts +13 -1
  111. package/rest/support/AttachmentQuery.js +1 -1
  112. package/rest/support/OutDistance.d.ts +5 -1
  113. package/rest/support/PrintParameters.d.ts +2 -1
  114. package/rest/support/Query.d.ts +2 -0
  115. package/support/basemapUtils.js +1 -1
  116. package/support/revision.js +1 -1
  117. package/symbols/SimpleMarkerSymbol.d.ts +2 -2
  118. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  119. package/views/2d/engine/AFeatureContainer.js +1 -1
  120. package/views/2d/engine/transitions/FadeTransition.js +1 -1
  121. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  122. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  123. package/views/2d/engine/webgl/TileCpuState.js +1 -1
  124. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  125. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  126. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  127. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  128. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  129. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  130. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  131. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  132. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  133. package/views/2d/layers/LayerView2D.js +1 -1
  134. package/views/2d/layers/MediaLayerView2D.js +1 -1
  135. package/views/2d/layers/features/FeatureContainer.js +1 -1
  136. package/views/2d/layers/features/RenderState.js +1 -1
  137. package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
  138. package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
  139. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  140. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  141. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  142. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  143. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  144. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  145. package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
  146. package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
  147. package/views/3d/analysis/LineOfSight/LineOfSightDrawToolRenderer.js +1 -1
  148. package/views/3d/analysis/LineOfSight/LineOfSightInteractionVisuals.js +2 -0
  149. package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
  150. package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
  151. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
  152. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  153. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  154. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  155. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  156. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  157. package/views/3d/layers/GaussianSplatLayerViewPerformanceInfo.js +1 -1
  158. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  159. package/views/3d/layers/graphics/Graphics3DPathSymbolLayerConstants.js +1 -1
  160. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  161. package/views/3d/state/utils/navigationUtils.js +1 -1
  162. package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
  163. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  164. package/views/3d/support/gaussianSplatting/GaussianSplatHeaderTexture.js +2 -0
  165. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  166. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  167. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +11 -11
  168. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +6 -9
  169. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +46 -46
  170. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexInfo.glsl.js +46 -18
  171. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +22 -22
  172. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +4 -4
  173. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +13 -12
  174. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
  175. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  176. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  177. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  178. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  179. package/views/3d/webgl-engine/lib/GaussianSplatShadowRenderNode.js +1 -1
  180. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  181. package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
  182. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  183. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  184. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  185. package/views/3d/webgl-engine/lib/PathVertexInfo.js +1 -1
  186. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  187. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  188. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferUtils.js +1 -1
  189. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  190. package/views/3d/webgl-engine/materials/PathLayouts.js +1 -1
  191. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  192. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  193. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  194. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
  195. package/views/3d/webgl-engine/shaders/PatternTextureBuffer.glsl.js +1 -1
  196. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  197. package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +1 -1
  198. package/views/3d/webgl-engine/shaders/RibbonLineTextureBuffer.glsl.js +2 -0
  199. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +10 -10
  200. package/views/View2D.d.ts +2 -2
  201. package/views/analysis/ElevationProfile/ElevationProfileChart.js +1 -1
  202. package/views/layers/AnnotationFeatureLayerView.d.ts +9 -1
  203. package/views/layers/DimensionFeatureLayerView.d.ts +9 -1
  204. package/views/layers/FeatureLikeLayerView.js +1 -1
  205. package/views/webgl/ShaderBuilder.js +1 -1
  206. package/widgets/BasemapGallery.js +1 -1
  207. package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
  208. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  209. package/widgets/BatchAttributeForm/css.js +1 -1
  210. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  211. package/widgets/BatchAttributeForm.js +1 -1
  212. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  213. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  214. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  215. package/widgets/Editor/UpdateWorkflow.js +1 -1
  216. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  217. package/widgets/Editor/types.d.ts +12 -0
  218. package/widgets/Editor/workflowUtils.js +1 -1
  219. package/widgets/Editor.js +1 -1
  220. package/widgets/FeatureForm/FeatureFormViewModel.d.ts +16 -12
  221. package/widgets/FeatureForm.d.ts +14 -16
  222. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  223. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  224. package/widgets/FeatureTable/Grid/types.d.ts +20 -0
  225. package/widgets/FeatureTable.d.ts +14 -2
  226. package/widgets/FeatureTable.js +1 -1
  227. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  228. package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
  229. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  230. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  231. package/widgets/OrientedImageryViewer/components/VideoEnhancementTools.js +1 -1
  232. package/widgets/OrientedImageryViewer/constants.js +1 -1
  233. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  234. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  235. package/widgets/OrientedImageryViewer/support/panConstraint.js +2 -0
  236. package/widgets/OrientedImageryViewer.js +1 -1
  237. package/widgets/Print/CustomTemplate.d.ts +7 -0
  238. package/widgets/Search/LayerSearchSource.d.ts +3 -0
  239. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  240. package/assets/esri/core/workers/chunks/0a259137932211b80f0e.js +0 -1
  241. package/assets/esri/core/workers/chunks/26aa8190ac439f634c5b.js +0 -1
  242. package/assets/esri/core/workers/chunks/3192586ec7fc73ed1165.js +0 -1
  243. package/assets/esri/core/workers/chunks/35a508a9311689d8df52.js +0 -1
  244. package/assets/esri/core/workers/chunks/3e89f487c5851c954d8b.js +0 -1
  245. package/assets/esri/core/workers/chunks/4fdd38d7362bf09a994b.js +0 -1
  246. package/assets/esri/core/workers/chunks/501fa9b029df2e7b73c3.js +0 -2
  247. package/assets/esri/core/workers/chunks/5216dd0544e901039c84.js +0 -1
  248. package/assets/esri/core/workers/chunks/5f0bc019add4aff3130c.js +0 -1
  249. package/assets/esri/core/workers/chunks/630ad47857de3cf726d1.js +0 -1
  250. package/assets/esri/core/workers/chunks/6ac09f4e85c664a17365.js +0 -1
  251. package/assets/esri/core/workers/chunks/6e8b9c03240ec372b587.js +0 -1
  252. package/assets/esri/core/workers/chunks/74922daaedb479ec6f03.js +0 -1
  253. package/assets/esri/core/workers/chunks/764c8ba14ab74b66b391.js +0 -1
  254. package/assets/esri/core/workers/chunks/7ee76504e7fea389a1c9.js +0 -1
  255. package/assets/esri/core/workers/chunks/912a8743a02f467b63b0.js +0 -2
  256. package/assets/esri/core/workers/chunks/9def4619d102f1d41578.js +0 -1
  257. package/assets/esri/core/workers/chunks/a0876a52a3c2ad849370.js +0 -1
  258. package/assets/esri/core/workers/chunks/a3c5b754a6fa0f4250bf.js +0 -1
  259. package/assets/esri/core/workers/chunks/a98905bf6050ad3b8721.js +0 -633
  260. package/assets/esri/core/workers/chunks/bf67e0f6064fb9d94ac8.js +0 -1
  261. package/assets/esri/core/workers/chunks/c9e5d3f496cefb8e3934.js +0 -1
  262. package/assets/esri/core/workers/chunks/cd892f429d5ffe8de99e.js +0 -1
  263. package/assets/esri/core/workers/chunks/d34d41a350facfa9b7c0.js +0 -1
  264. package/assets/esri/core/workers/chunks/d5a0e3a73df827dc7b06.js +0 -1
  265. package/assets/esri/core/workers/chunks/e5471373f89fd7cb9844.js +0 -1
  266. package/assets/esri/core/workers/chunks/ff00ac01f0baaecaa890.js +0 -1
  267. /package/assets/esri/core/workers/chunks/{912a8743a02f467b63b0.js.LICENSE.txt → 0eb0ce43b4813cae968f.js.LICENSE.txt} +0 -0
  268. /package/assets/esri/core/workers/chunks/{2dbd88566abac030e965.js.LICENSE.txt → 162dada6a199d1efdf86.js.LICENSE.txt} +0 -0
  269. /package/assets/esri/core/workers/chunks/{44b30bce8e9a75b9e1b3.js.LICENSE.txt → a54773c9bbc751619b3f.js.LICENSE.txt} +0 -0
  270. /package/assets/esri/core/workers/chunks/{eccbddaec4be44c86f79.js.LICENSE.txt → b0b3c67b7d37bd854d95.js.LICENSE.txt} +0 -0
  271. /package/assets/esri/core/workers/chunks/{501fa9b029df2e7b73c3.js.LICENSE.txt → ef94d25d1cceb25ea9fe.js.LICENSE.txt} +0 -0
@@ -1,14 +1,14 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{RejectBySlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{EvaluateSceneLighting as t,addAmbientBoostFactor as o,addLightingGlobalFactor as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{NormalUtils as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{positionOutsideClipSpace as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{ReadShadowMapPassFragment as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{GaussianSplatCovariance as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as g}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpackingPassParameters as m,GaussianSplatUnpacking as u}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as f}from"../views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{RgbNormalizedDepthEncoding as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import{Float2BindUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float2PassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as P,If as C}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as S}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as M}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{getGaussianSplatAlphaCutoffValue as R}from"../views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js";import{ShaderBuilder as j}from"../views/webgl/ShaderBuilder.js";class L extends m{constructor(){super(...arguments),this.clipMinCameraRelative=i(),this.clipMaxCameraRelative=i(),this.focalLength=-1,this.minSplatRadius=-1,this.tanFov=a(),this.origin=i()}}function F(a){const{clippingEnabled:i,hasSlicePlane:m,receiveShadows:L,spherical:F}=a,D=new j;D.varyings.add("vColor","vec4"),D.varyings.add("conicOpacity","vec4"),D.varyings.add("gaussianLogAlphaCutoff","float"),D.varyings.add("offsetFromCenter","vec2"),G(a)&&D.varyings.add("fragmentPositionCameraRelative","vec3"),D.vertex.uniforms.add(new M("splatOrderTexture",e=>e.splatOrder),new M("splatFadingTexture",e=>e.splatFading),new M("splatAtlasTexture",e=>e.splatAtlas),new y("focalLength",e=>e.focalLength),new y("minSplatRadius",e=>e.minSplatRadius),new w("tanFov",e=>e.tanFov),new h("inverseScreenSize",({camera:a})=>e(z,1/a.fullWidth,1/a.fullHeight)),new S("proj",e=>e.camera.projectionMatrix),new S("view",e=>e.camera.viewMatrix),new h("nearFar",e=>e.camera.nearFar),new x("cameraPosition",e=>e.camera.eye)),i&&(D.vertex.uniforms.add(new b("clipMin",e=>e.clipMinCameraRelative),new b("clipMax",e=>e.clipMaxCameraRelative)),D.fragment.uniforms.add(new b("clipMin",e=>e.clipMinCameraRelative),new b("clipMax",e=>e.clipMaxCameraRelative))),D.vertex.include(u),D.vertex.include(p),D.vertex.include(f),D.vertex.include(d),D.vertex.include(g),D.vertex.include(n,a),L?(D.fragment.uniforms.add(new x("cameraPosition",e=>e.camera.eye)),D.fragment.include(t,a)):D.vertex.include(t,a),D.include(s,a),o(L?D.fragment:D.vertex),r(L?D.fragment:D.vertex),L&&D.include(c,a),D.outputs.add("fragColor","vec4",0),D.outputs.add("fragDepthColor","vec4",1);const A=R(a.alphaCutoff),B=Math.log(A),T=P`float groundLightAlignment = dot(groundNormal, mainLightDirection);
2
+ import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{RejectBySlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{EvaluateSceneLighting as t,addAmbientBoostFactor as o,addLightingGlobalFactor as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{NormalUtils as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{positionOutsideClipSpace as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{ReadShadowMapPassFragment as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{GaussianSplatCovariance as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as g}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpackingPassParameters as m,GaussianSplatUnpacking as u}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as f}from"../views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{RgbNormalizedDepthEncoding as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import{Float2BindUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float2PassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as P,If as C}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as S}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as M}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{getGaussianSplatAlphaCutoffValue as R}from"../views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js";import{ShaderBuilder as j}from"../views/webgl/ShaderBuilder.js";class L extends m{constructor(){super(...arguments),this.clipMinCameraRelative=i(),this.clipMaxCameraRelative=i(),this.focalLength=-1,this.minSplatRadius=-1,this.tanFov=a(),this.origin=i()}}function F(a){const{clippingEnabled:i,hasSlicePlane:m,receiveShadows:L,spherical:F}=a,D=new j;D.varyings.add("vColor","vec4"),D.varyings.add("conicOpacity","vec4"),D.varyings.add("gaussianLogAlphaCutoff","float"),D.varyings.add("offsetFromCenter","vec2"),G(a)&&D.varyings.add("fragmentPositionCameraRelative","vec3"),D.vertex.uniforms.add(new M("splatOrderTexture",e=>e.splatOrder),new M("splatFadingTexture",e=>e.splatFading),new M("splatAtlasTexture",e=>e.splatAtlas),new M("splatHeaderTexture",e=>e.splatHeader),new y("focalLength",e=>e.focalLength),new y("minSplatRadius",e=>e.minSplatRadius),new w("tanFov",e=>e.tanFov),new h("inverseScreenSize",({camera:a})=>e(z,1/a.fullWidth,1/a.fullHeight)),new S("proj",e=>e.camera.projectionMatrix),new S("view",e=>e.camera.viewMatrix),new h("nearFar",e=>e.camera.nearFar),new x("cameraPosition",e=>e.camera.eye)),i&&(D.vertex.uniforms.add(new b("clipMin",e=>e.clipMinCameraRelative),new b("clipMax",e=>e.clipMaxCameraRelative)),D.fragment.uniforms.add(new b("clipMin",e=>e.clipMinCameraRelative),new b("clipMax",e=>e.clipMaxCameraRelative))),D.vertex.include(u),D.vertex.include(p),D.vertex.include(f),D.vertex.include(d),D.vertex.include(g),D.vertex.include(n,a),L?(D.fragment.uniforms.add(new x("cameraPosition",e=>e.camera.eye)),D.fragment.include(t,a)):D.vertex.include(t,a),D.include(s,a),o(L?D.fragment:D.vertex),r(L?D.fragment:D.vertex),L&&D.include(c,a),D.outputs.add("fragColor","vec4",0),D.outputs.add("fragDepthColor","vec4",1);const A=R(a.alphaCutoff),T=Math.log(A),B=P`float groundLightAlignment = dot(groundNormal, mainLightDirection);
3
3
  float additionalAmbientScale = additionalDirectedAmbientLight(groundLightAlignment);
4
4
  vec3 additionalLight = mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;`,$=P`
5
5
  vec3 groundNormal = ${F?P`normalize(cameraRelativePosition + cameraPosition)`:P`vec3(0.0, 0.0, 1.0)`};
6
- ${T}
6
+ ${B}
7
7
  float shadow = ${F?P`lightingGlobalFactor * (1.0 - additionalAmbientScale)`:P`0.0`};
8
8
  vColor.rgb = evaluateSceneLighting(groundNormal, vColor.rgb, shadow, 0.0, additionalLight);
9
9
  `,E=P`
10
10
  vec3 groundNormal = ${F?P`normalize(fragmentPositionCameraRelative + cameraPosition)`:P`vec3(0.0, 0.0, 1.0)`};
11
- ${T}
11
+ ${B}
12
12
  float shadow = readShadow(additionalAmbientScale, fragmentPositionCameraRelative);
13
13
  shadedColor = evaluateSceneLighting(groundNormal, vColor.rgb, shadow, 0.0, additionalLight);
14
- `;return D.vertex.main.add(`\n uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));\n uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);\n uint pageNum = fetchGaussianPageIndex(gaussianIndex);\n\n // Unpack color first so very transparent splats can discard before fetching the page header.\n vColor = unpackColor(packedGaussian);\n\n // Apply per-page fading before the early alpha rejection.\n ${C(a.fadingEnabled,"\n uint fadingTextureWidth = uint(textureSize(splatFadingTexture, 0).x);\n uint fadeX = pageNum % fadingTextureWidth;\n uint fadeY = pageNum / fadingTextureWidth;\n uint opacityModifierByte = texelFetch(splatFadingTexture, ivec2(fadeX , fadeY), 0).r;\n float opacityModifier = float(opacityModifierByte) / 255.0;\n vColor.a *= opacityModifier;\n ")}\n\n // Set default position outside clip space for early returns.\n gl_Position = ${l};\n\n if (vColor.a < ${A}) {\n return;\n }\n\n // Delay the page header fetch until the splat survives the opacity reject.\n vec3 cameraRelativePosition = fetchGaussianCameraRelativePosition(gaussianIndex, packedGaussian);\n\n ${C(i,"\n if (cameraRelativePosition.x < clipMin.x || cameraRelativePosition.y < clipMin.y || cameraRelativePosition.z < clipMin.z ||\n cameraRelativePosition.x > clipMax.x || cameraRelativePosition.y > clipMax.y || cameraRelativePosition.z > clipMax.z) {\n return;\n }\n ")}\n\n ${C(m,"if (rejectBySlice(cameraRelativePosition)) {\n return;\n }")}\n\n vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1);\n\n if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {\n return;\n }\n\n vec3 covarianceA;\n vec3 covarianceB;\n computePackedGaussianCovariance3D(packedGaussian, covarianceA, covarianceB);\n\n float covariance3D[6] = float[6](covarianceA.x, covarianceA.y, covarianceA.z, covarianceB.x, covarianceB.y, covarianceB.z);\n\n vec3 covariance2D = computeGaussianCovariance2D(viewPos.xyz, focalLength, tanFov, covariance3D, view);\n\n // Reject degenerate covariances before inverting them into conic coefficients.\n float determinant = computeGaussianCovarianceDeterminant(covariance2D);\n if (determinant <= 0.) {\n return;\n }\n\n vec2 eigenvalues = computeGaussianCovarianceEigenvalues(covariance2D);\n\n // Fold the per-splat opacity into the log cutoff so the vertex-side ellipse\n // bound matches the fragment alpha discard after fading.\n gaussianLogAlphaCutoff = ${B} - log(vColor.a);\n float gaussianEllipseThreshold = computeGaussianEllipseThreshold(gaussianLogAlphaCutoff);\n vec2 axisLengths = computeGaussianAxisLengths(eigenvalues, gaussianEllipseThreshold);\n float maxRadius = max(axisLengths.x, axisLengths.y);\n\n // Ignore Gaussians with very small contribution, with tolerance based on the quality profile.\n if (rejectGaussianByMinimumRadius(maxRadius, vColor.a, minSplatRadius)) {\n return;\n }\n\n vec4 projPos = proj * viewPos;\n float invW = 1. / (projPos.w + 1e-7);\n vec3 ndcPos = projPos.xyz * invW;\n vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;\n\n // Cull splats whose screen-space ellipse cannot touch the viewport.\n if (rejectGaussianByScreenBounds(ndcPos.xy, maxRadius, clipSpacePixelScale)) {\n return;\n }\n\n offsetFromCenter = computeGaussianQuadOffset(covariance2D, eigenvalues, axisLengths, gl_VertexID);\n\n ${C(G(a),"float viewSpacePixelScale = -viewPos.z / focalLength;\n vec3 fragmentViewOffset = vec3(offsetFromCenter * viewSpacePixelScale, 0.0);\n fragmentPositionCameraRelative = cameraRelativePosition + transpose(mat3(view)) * fragmentViewOffset;")}\n\n // Store conic coefficients with opacity for fragment-side falloff.\n vec3 conic = computeGaussianConic(covariance2D, determinant);\n conicOpacity = vec4(conic, vColor.a);\n\n // Handle environment lighting per vertex when no shadow map is active.\n // When shadows are received, defer lighting to the fragment shader for crisp shadow borders.\n ${C(L,"forwardLinearDepth(-viewPos.z);",$)}\n\n // Place this quad corner in clip space around the projected splat center.\n vec2 quadClipPosition = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;\n\n gl_Position = vec4(quadClipPosition, ndcPos.z, 1.0);\n\n `),D.fragment.include(v),D.fragment.include(g),D.fragment.include(n,a),D.fragment.main.add(`\n ${C(i,"if (fragmentPositionCameraRelative.x < clipMin.x || fragmentPositionCameraRelative.y < clipMin.y || fragmentPositionCameraRelative.z < clipMin.z ||\n fragmentPositionCameraRelative.x > clipMax.x || fragmentPositionCameraRelative.y > clipMax.y || fragmentPositionCameraRelative.z > clipMax.z) {\n discard;\n }")}\n ${C(m,"if (rejectBySlice(fragmentPositionCameraRelative)) { discard; }")}\n\n float gaussianExponent = evaluateGaussianExponent(conicOpacity.xyz, offsetFromCenter);\n\n // A positive exponent indicates alpha > 1, which should not happen.\n // We also early check the opacity-aware alpha cutoff to avoid unnecessary exp().\n if (gaussianExponent > 0.0 || gaussianExponent < gaussianLogAlphaCutoff) {\n discard;\n }\n\n float gaussianFalloff = exp(gaussianExponent);\n\n // Cap at 0.99 to avoid blending issues, such as seams between overlapping Gaussians.\n float alpha = min(.99f, conicOpacity.w * gaussianFalloff);\n\n vec3 shadedColor = vColor.rgb;\n ${C(L,E)}\n fragColor = vec4(shadedColor * alpha, alpha);\n\n // We simulate first hit based depth using 0.25 as the opacity threshold.\n // This works because we render in front-to-back order,\n // i.e. the first hit that counts completely saturates the alpha channel\n // and further splats do not contribute.\n float depthHit = step(0.25, alpha);\n float normalizedDepth = gl_FragCoord.z;\n fragDepthColor = vec4(encodeNormalizedDepthToRGB(normalizedDepth) * depthHit, depthHit);\n `),D}function G(e){const{clippingEnabled:a,hasSlicePlane:i,receiveShadows:n}=e;return n||i||a}const z=a(),D=Object.freeze(Object.defineProperty({__proto__:null,GaussianSplatPassParameters:L,build:F},Symbol.toStringTag,{value:"Module"}));export{L as G,D as a,F as b};
14
+ `;return D.vertex.main.add(`\n uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));\n uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);\n uint pageNum = fetchGaussianPageIndex(gaussianIndex);\n\n // Unpack color first so very transparent splats can discard before fetching the page header.\n vColor = unpackColor(packedGaussian);\n\n // Apply per-page fading before the early alpha rejection.\n ${C(a.fadingEnabled,"\n uint fadingTextureWidth = uint(textureSize(splatFadingTexture, 0).x);\n uint fadeX = pageNum % fadingTextureWidth;\n uint fadeY = pageNum / fadingTextureWidth;\n uint opacityModifierByte = texelFetch(splatFadingTexture, ivec2(fadeX , fadeY), 0).r;\n float opacityModifier = float(opacityModifierByte) / 255.0;\n vColor.a *= opacityModifier;\n ")}\n\n // Set default position outside clip space for early returns.\n gl_Position = ${l};\n\n if (vColor.a < ${A}) {\n return;\n }\n\n // Delay the page header fetch until the splat survives the opacity reject.\n vec3 cameraRelativePosition = fetchGaussianCameraRelativePosition(gaussianIndex, packedGaussian);\n\n ${C(i,"\n if (cameraRelativePosition.x < clipMin.x || cameraRelativePosition.y < clipMin.y || cameraRelativePosition.z < clipMin.z ||\n cameraRelativePosition.x > clipMax.x || cameraRelativePosition.y > clipMax.y || cameraRelativePosition.z > clipMax.z) {\n return;\n }\n ")}\n\n ${C(m,"if (rejectBySlice(cameraRelativePosition)) {\n return;\n }")}\n\n vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1);\n\n if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {\n return;\n }\n\n vec3 covarianceA;\n vec3 covarianceB;\n computePackedGaussianCovariance3D(packedGaussian, covarianceA, covarianceB);\n\n float covariance3D[6] = float[6](covarianceA.x, covarianceA.y, covarianceA.z, covarianceB.x, covarianceB.y, covarianceB.z);\n\n vec3 covariance2D = computeGaussianCovariance2D(viewPos.xyz, focalLength, tanFov, covariance3D, view);\n\n // Reject degenerate covariances before inverting them into conic coefficients.\n float determinant = computeGaussianCovarianceDeterminant(covariance2D);\n if (determinant <= 0.) {\n return;\n }\n\n vec2 eigenvalues = computeGaussianCovarianceEigenvalues(covariance2D);\n\n // Fold the per-splat opacity into the log cutoff so the vertex-side ellipse\n // bound matches the fragment alpha discard after fading.\n gaussianLogAlphaCutoff = ${T} - log(vColor.a);\n float gaussianEllipseThreshold = computeGaussianEllipseThreshold(gaussianLogAlphaCutoff);\n vec2 axisLengths = computeGaussianAxisLengths(eigenvalues, gaussianEllipseThreshold);\n float maxRadius = max(axisLengths.x, axisLengths.y);\n\n // Ignore Gaussians with very small contribution, with tolerance based on the quality profile.\n if (rejectGaussianByMinimumRadius(maxRadius, vColor.a, minSplatRadius)) {\n return;\n }\n\n vec4 projPos = proj * viewPos;\n float invW = 1. / (projPos.w + 1e-7);\n vec3 ndcPos = projPos.xyz * invW;\n vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;\n\n // Cull splats whose screen-space ellipse cannot touch the viewport.\n if (rejectGaussianByScreenBounds(ndcPos.xy, maxRadius, clipSpacePixelScale)) {\n return;\n }\n\n offsetFromCenter = computeGaussianQuadOffset(covariance2D, eigenvalues, axisLengths, gl_VertexID);\n\n ${C(G(a),"float viewSpacePixelScale = -viewPos.z / focalLength;\n vec3 fragmentViewOffset = vec3(offsetFromCenter * viewSpacePixelScale, 0.0);\n fragmentPositionCameraRelative = cameraRelativePosition + transpose(mat3(view)) * fragmentViewOffset;")}\n\n // Store conic coefficients with opacity for fragment-side falloff.\n vec3 conic = computeGaussianConic(covariance2D, determinant);\n conicOpacity = vec4(conic, vColor.a);\n\n // Handle environment lighting per vertex when no shadow map is active.\n // When shadows are received, defer lighting to the fragment shader for crisp shadow borders.\n ${C(L,"forwardLinearDepth(-viewPos.z);",$)}\n\n // Place this quad corner in clip space around the projected splat center.\n vec2 quadClipPosition = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;\n\n gl_Position = vec4(quadClipPosition, ndcPos.z, 1.0);\n\n `),D.fragment.include(v),D.fragment.include(g),D.fragment.include(n,a),D.fragment.main.add(`\n ${C(i,"if (fragmentPositionCameraRelative.x < clipMin.x || fragmentPositionCameraRelative.y < clipMin.y || fragmentPositionCameraRelative.z < clipMin.z ||\n fragmentPositionCameraRelative.x > clipMax.x || fragmentPositionCameraRelative.y > clipMax.y || fragmentPositionCameraRelative.z > clipMax.z) {\n discard;\n }")}\n ${C(m,"if (rejectBySlice(fragmentPositionCameraRelative)) { discard; }")}\n\n float gaussianExponent = evaluateGaussianExponent(conicOpacity.xyz, offsetFromCenter);\n\n // A positive exponent indicates alpha > 1, which should not happen.\n // We also early check the opacity-aware alpha cutoff to avoid unnecessary exp().\n if (gaussianExponent > 0.0 || gaussianExponent < gaussianLogAlphaCutoff) {\n discard;\n }\n\n float gaussianFalloff = exp(gaussianExponent);\n\n // Cap at 0.99 to avoid blending issues, such as seams between overlapping Gaussians.\n float alpha = min(.99f, conicOpacity.w * gaussianFalloff);\n\n vec3 shadedColor = vColor.rgb;\n ${C(L,E)}\n fragColor = vec4(shadedColor * alpha, alpha);\n\n // We simulate first hit based depth using 0.25 as the opacity threshold.\n // This works because we render in front-to-back order,\n // i.e. the first hit that counts completely saturates the alpha channel\n // and further splats do not contribute.\n float depthHit = step(0.25, alpha);\n float normalizedDepth = gl_FragCoord.z;\n fragDepthColor = vec4(encodeNormalizedDepthToRGB(normalizedDepth) * depthHit, depthHit);\n `),D}function G(e){const{clippingEnabled:a,hasSlicePlane:i,receiveShadows:n}=e;return n||i||a}const z=a(),D=Object.freeze(Object.defineProperty({__proto__:null,GaussianSplatPassParameters:L,build:F},Symbol.toStringTag,{value:"Module"}));export{L as G,D as a,F as b};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{RejectBySlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{positionOutsideClipSpace as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{GaussianSplatCovariance as o}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpackingPassParameters as t,GaussianSplatUnpacking as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{Float2BindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float3PassUniform as p}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as u}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as m,If as f}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{ShaderBuilder as h}from"../views/webgl/ShaderBuilder.js";class w extends t{constructor(){super(...arguments),this.clipMinCameraRelative=i(),this.clipMaxCameraRelative=i(),this.minSplatRadius=-1}}function S(a){const{clippingEnabled:i,hasSlicePlane:t}=a,w=new h,{fragment:S,varyings:j,vertex:y}=w;j.add("conic","vec3"),j.add("gaussianLogAlphaCutoff","float"),j.add("offsetFromCenter","vec2"),y.uniforms.add(new g("splatOrderTexture",e=>e.splatOrder),new g("splatAtlasTexture",e=>e.splatAtlas),new u("minSplatRadius",e=>e.minSplatRadius),new d("inverseScreenSize",({camera:a})=>e(P,1/a.fullWidth,1/a.fullHeight)),new x("proj",e=>e.camera.projectionMatrix),new x("view",e=>e.camera.viewMatrix),new d("nearFar",e=>e.camera.nearFar)),i&&y.uniforms.add(new p("clipMin",e=>e.clipMinCameraRelative),new p("clipMax",e=>e.clipMaxCameraRelative)),y.include(l),y.include(s),y.include(v),y.include(o),y.include(c),y.include(n,a),y.code.add(m`float safeClipW(float clipW) {
2
+ import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{RejectBySlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{positionOutsideClipSpace as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{GaussianSplatCovariance as o}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpackingPassParameters as t,GaussianSplatUnpacking as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{Float2BindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float3PassUniform as p}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as u}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as m,If as f}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{ShaderBuilder as h}from"../views/webgl/ShaderBuilder.js";class w extends t{constructor(){super(...arguments),this.clipMinCameraRelative=i(),this.clipMaxCameraRelative=i(),this.minSplatRadius=-1}}function S(a){const{clippingEnabled:i,hasSlicePlane:t}=a,w=new h,{fragment:S,varyings:j,vertex:y}=w;j.add("conic","vec3"),j.add("gaussianLogAlphaCutoff","float"),j.add("offsetFromCenter","vec2"),y.uniforms.add(new g("splatOrderTexture",e=>e.splatOrder),new g("splatAtlasTexture",e=>e.splatAtlas),new g("splatHeaderTexture",e=>e.splatHeader),new u("minSplatRadius",e=>e.minSplatRadius),new d("inverseScreenSize",({camera:a})=>e(P,1/a.fullWidth,1/a.fullHeight)),new x("proj",e=>e.camera.projectionMatrix),new x("view",e=>e.camera.viewMatrix),new d("nearFar",e=>e.camera.nearFar)),i&&y.uniforms.add(new p("clipMin",e=>e.clipMinCameraRelative),new p("clipMax",e=>e.clipMaxCameraRelative)),y.include(l),y.include(s),y.include(v),y.include(o),y.include(c),y.include(n,a),y.code.add(m`float safeClipW(float clipW) {
3
3
  return abs(clipW) < 1e-7 ? (clipW < 0.0 ? -1e-7 : 1e-7) : clipW;
4
4
  }`),y.code.add(m`vec3 computeProjectivePixelGradient(
5
5
  vec3 clipGradient,
@@ -1,19 +1,19 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as o}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VisualVariables as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as l,addCameraPosition as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as c}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as s,If as v}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{outputColorHighlightOLID as u}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{getTextureBackedBufferModule as p}from"../views/3d/webgl-engine/shaders/PatternTextureBuffer.glsl.js";import{ShaderBuilder as m}from"../views/webgl/ShaderBuilder.js";const f=.70710678118,g=f,w=.08715574274,b=10,h=1;function x(x){const S=p(x),j=null!=S,C=new m;j&&C.include(S.TextureBackedBufferModule,x);const{vertex:V,fragment:T,attributes:P,varyings:$}=C,R=10===x.output;l(V,x),C.include(o);let A="";j?(x.hasVVColor&&(A=S.getTextureAttribute("colorFeatureAttribute")),x.hasVertexColors?(C.varyings.add("vColor","vec4"),C.vertex.code.add(s`void forwardVertexColor() { vColor = ${S.getTextureAttribute("color")}; }`)):C.vertex.code.add(s`void forwardVertexColor() {}`),P.add("textureElementIndex","uint")):(C.include(r,x),x.hasVVColor&&(P.add("colorFeatureAttribute","float"),A="colorFeatureAttribute")),P.add("position","vec3"),V.inputs.add("position",()=>"position"),C.include(a,x),C.include(t,x),T.include(e,x),C.include(u,x),x.draped&&V.uniforms.add(new d("worldToScreenRatio",e=>1/e.screenToPCSRatio)),P.add("uvMapSpace","vec4"),x.hasVertexColors||$.add("vColor","vec4"),$.add("vpos","vec3",{invariant:!0}),$.add("vuv","vec2"),V.uniforms.add(new c("uColor",e=>e.color));const L=3===x.style||4===x.style||5===x.style;return L&&V.code.add(s`
2
+ import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as o}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VisualVariables as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as l,addCameraPosition as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as c}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as s,If as v}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{outputColorHighlightOLID as p}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{getTextureBackedBufferModule as u}from"../views/3d/webgl-engine/shaders/PatternTextureBuffer.glsl.js";import{ShaderBuilder as m}from"../views/webgl/ShaderBuilder.js";const f=.70710678118,g=f,w=.08715574274,b=10,h=1;function x(x){const S=new m,{vertex:j,fragment:C,attributes:V,varyings:T}=S,P=u(x),$=P?.createBuilder(S,x),R=null!=$,A=10===x.output;l(j,x),S.include(o);let L="";R?(x.hasVVColor&&(L=$.getTextureAttribute("colorFeatureAttribute")),x.hasVertexColors?(S.varyings.add("vColor","vec4"),S.vertex.code.add(s`void forwardVertexColor() { vColor = ${$.getTextureAttribute("color")}; }`)):S.vertex.code.add(s`void forwardVertexColor() {}`),V.add("textureElementIndex","uint")):(S.include(r,x),x.hasVVColor&&(V.add("colorFeatureAttribute","float"),L="colorFeatureAttribute")),V.add("position","vec3"),j.inputs.add("position",()=>"position"),S.include(a,x),S.include(t,x),C.include(e,x),S.include(p,x),x.draped&&j.uniforms.add(new d("worldToScreenRatio",e=>1/e.screenToPCSRatio)),V.add("uvMapSpace","vec4"),x.hasVertexColors||T.add("vColor","vec4"),T.add("vpos","vec3",{invariant:!0}),T.add("vuv","vec2"),j.uniforms.add(new c("uColor",e=>e.color));const D=3===x.style||4===x.style||5===x.style;return D&&j.code.add(s`
3
3
  const mat2 rotate45 = mat2(${s.float(f)}, ${s.float(-g)},
4
4
  ${s.float(g)}, ${s.float(f)});
5
- `),!x.draped&&j&&(n(V,x),V.uniforms.add(new d("worldToScreenPerDistanceRatio",e=>1/e.camera.perScreenPixelRatio)),V.code.add(s`vec3 projectPointToLineSegment(vec3 center, vec3 halfVector, vec3 point) {
5
+ `),!x.draped&&R&&(n(j,x),j.uniforms.add(new d("worldToScreenPerDistanceRatio",e=>1/e.camera.perScreenPixelRatio)),j.code.add(s`vec3 projectPointToLineSegment(vec3 center, vec3 halfVector, vec3 point) {
6
6
  float projectedLength = dot(halfVector, point - center) / dot(halfVector, halfVector);
7
7
  return center + halfVector * clamp(projectedLength, -1.0, 1.0);
8
- }`),V.code.add(s`vec3 intersectRayPlane(vec3 rayDir, vec3 rayOrigin, vec3 planeNormal, vec3 planePoint) {
8
+ }`),j.code.add(s`vec3 intersectRayPlane(vec3 rayDir, vec3 rayOrigin, vec3 planeNormal, vec3 planePoint) {
9
9
  float d = dot(planeNormal, planePoint);
10
10
  float t = (d - dot(planeNormal, rayOrigin)) / dot(planeNormal, rayDir);
11
11
  return rayOrigin + t * rayDir;
12
- }`),V.code.add(s`
12
+ }`),j.code.add(s`
13
13
  float boundingRectDistanceToCamera() {
14
- vec3 center = ${S.getTextureAttribute("boundingRect")}[0];
15
- vec3 halfU = ${S.getTextureAttribute("boundingRect")}[1];
16
- vec3 halfV = ${S.getTextureAttribute("boundingRect")}[2];
14
+ vec3 center = ${$.getTextureAttribute("boundingRect")}[0];
15
+ vec3 halfU = ${$.getTextureAttribute("boundingRect")}[1];
16
+ vec3 halfV = ${$.getTextureAttribute("boundingRect")}[2];
17
17
  vec3 n = normalize(cross(halfU, halfV));
18
18
 
19
19
  vec3 viewDir = - vec3(view[0][2], view[1][2], view[2][2]);
@@ -39,10 +39,10 @@ return rayOrigin + t * rayDir;
39
39
 
40
40
  return length(closestPoint - cameraPosition);
41
41
  }
42
- `)),V.code.add(s`
42
+ `)),j.code.add(s`
43
43
  vec2 scaledUV() {
44
- vec2 uv = uvMapSpace.xy ${v(L," * rotate45")};
45
- vec2 uvCellOrigin = uvMapSpace.zw ${v(L," * rotate45")};
44
+ vec2 uv = uvMapSpace.xy ${v(D," * rotate45")};
45
+ vec2 uvCellOrigin = uvMapSpace.zw ${v(D," * rotate45")};
46
46
 
47
47
  ${v(!x.draped,s`float distanceToCamera = boundingRectDistanceToCamera();
48
48
  float worldToScreenRatio = worldToScreenPerDistanceRatio / distanceToCamera;`)}
@@ -56,14 +56,14 @@ return rayOrigin + t * rayDir;
56
56
  vec2 uvOffset = mod(uvCellOrigin * discreteWorldToScreenRatio, ${s.float(b)});
57
57
  return uvOffset + (uv * discreteWorldToScreenRatio);
58
58
  }
59
- `),V.main.add(s`
59
+ `),j.main.add(s`
60
60
  vuv = scaledUV();
61
61
  vpos = position;
62
62
  forwardVertexColor();
63
63
  forwardObjectAndLayerIdColor();
64
- ${x.hasVertexColors?"vColor *= uColor;":x.hasVVColor?s`vColor = uColor * interpolateVVColor(${A});`:"vColor = uColor;"}
64
+ ${x.hasVertexColors?"vColor *= uColor;":x.hasVVColor?s`vColor = uColor * interpolateVVColor(${L});`:"vColor = uColor;"}
65
65
  gl_Position = transformPosition(proj, view, vpos);
66
- `),T.include(i),x.draped&&T.uniforms.add(new d("texelSize",e=>1/e.camera.pixelRatio)),R||(T.code.add(s`
66
+ `),C.include(i),x.draped&&C.uniforms.add(new d("texelSize",e=>1/e.camera.pixelRatio)),A||(C.code.add(s`
67
67
  const float lineWidth = ${s.float(h)};
68
68
  const float spacing = ${s.float(b)};
69
69
  const float spacingINV = ${s.float(1/b)};
@@ -82,7 +82,7 @@ return rayOrigin + t * rayDir;
82
82
 
83
83
  return coverage / txlSize;
84
84
  }
85
- `),x.draped||T.code.add(s`const int maxSamples = 5;
85
+ `),x.draped||C.code.add(s`const int maxSamples = 5;
86
86
  float sampleAA(float p) {
87
87
  vec2 dxdy = abs(vec2(dFdx(p), dFdy(p)));
88
88
  float fwidth = dxdy.x + dxdy.y;
@@ -103,9 +103,9 @@ accumulator += coverage(p + step.x * dxdy.x + step.y * dxdy.y, fwidth);
103
103
  }
104
104
  accumulator /= float(samples.x * samples.y);
105
105
  return accumulator;
106
- }`)),T.main.add(s`
106
+ }`)),C.main.add(s`
107
107
  discardBySlice(vpos);
108
108
  vec4 color = vColor;
109
- ${v(!R,s`color.a *= ${y(x)};`)}
109
+ ${v(!A,s`color.a *= ${y(x)};`)}
110
110
  outputColorHighlightOLID(applySlice(color, vpos), color.rgb);
111
- `),C}function y(e){function o(o){return e.draped?s`coverage(vuv.${o}, texelSize)`:s`sampleAA(vuv.${o})`}switch(e.style){case 3:case 0:return o("y");case 4:case 1:return o("x");case 5:case 2:return s`1.0 - (1.0 - ${o("x")}) * (1.0 - ${o("y")})`;default:return"0.0"}}const S=Object.freeze(Object.defineProperty({__proto__:null,build:x},Symbol.toStringTag,{value:"Module"}));export{S as P,x as b};
111
+ `),S}function y(e){function o(o){return e.draped?s`coverage(vuv.${o}, texelSize)`:s`sampleAA(vuv.${o})`}switch(e.style){case 3:case 0:return o("y");case 4:case 1:return o("x");case 5:case 2:return s`1.0 - (1.0 - ${o("x")}) * (1.0 - ${o("y")})`;default:return"0.0"}}const S=Object.freeze(Object.defineProperty({__proto__:null,build:x},Symbol.toStringTag,{value:"Module"}));export{S as P,x as b};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{LineStipple as n,computePixelSize as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{PiUtils as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{positionOutsideClipSpace as s}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 d,NoPerspectiveRead as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js";import{addProjViewLocalOrigin as p,addPixelRatio as m}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as h}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as S}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as D,If as u}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{alphaCutoff as L}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{AnimatedLine as w}from"../views/3d/webgl-engine/shaders/AnimatedLine.glsl.js";import{outputColorHighlightOLID as b}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as y}from"../views/webgl/ShaderBuilder.js";const P=1;function C(P){const C=new y,{attributes:z,varyings:F,vertex:j,fragment:W}=C,{applyMarkerOffset:R,draped:I,output:V,capType:A,stippleEnabled:E,falloffEnabled:N,roundJoins:T,wireframe:O,innerColorEnabled:J,hasAnimation:_,hasScreenSizePerspective:M,worldSizedImagePattern:U}=P;j.inputs.add("position",()=>"position"),W.include(a),C.include(t,P),C.include(n,P),C.include(i,P),C.include(w,P);const H=R&&!I;H&&(j.uniforms.add(new S("markerScale",e=>e.markerScale)),C.include(o,{space:2,hasScreenSizePerspective:M})),p(j,P),j.uniforms.add(new x("inverseProjectionMatrix",e=>e.camera.inverseProjectionMatrix),new v("nearFar",e=>e.camera.nearFar),new S("miterLimit",e=>"miter"!==e.join?0:e.miterLimit),new f("viewport",e=>e.camera.fullViewport)),j.constants.add("LARGE_HALF_FLOAT","float",65500),j.constants.add("EPS","float",.001),j.constants.add("NUM_JOIN_SUBDIVISIONS","float",P.numJoinSubdivisions),z.add("position","vec3"),z.add("previousDelta","vec4"),z.add("nextDelta","vec4"),z.add("lineParameters","vec2"),z.add("u0","float"),F.add("vColor","vec4"),F.add("vpos","vec3",{invariant:!0}),F.add("vLineDistance","float"),F.add("vLineWidth","float"),E||(F.add("vIsInsideJoin","int"),F.add("vStretchFactor","float"),F.add("vJoinCenterLineSDFs","vec2"),F.add("vSubdivisionFactor","float"));const $=E;$&&F.add("vLineSizeInv","float");const B=2===A,k=E&&B,G=N||k;G&&F.add("vLineDistanceNorm","float"),B&&(F.add("vSegmentSDF","float"),F.add("vReverseSegmentSDF","float")),j.code.add(D`vec3 perpendicular(vec3 v) {
2
+ import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{LineStipple as n,computePixelSize as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{PiUtils as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{positionOutsideClipSpace as s}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 d,NoPerspectiveRead as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js";import{addProjViewLocalOrigin as p,addPixelRatio as m}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as h}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as S}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as D,If as u}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{alphaCutoff as L}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{AnimatedLine as b}from"../views/3d/webgl-engine/shaders/AnimatedLine.glsl.js";import{outputColorHighlightOLID as w}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{getTextureBackedBufferModule as y}from"../views/3d/webgl-engine/shaders/RibbonLineTextureBuffer.glsl.js";import{ShaderBuilder as P}from"../views/webgl/ShaderBuilder.js";const C=1;function z(C){const z=new P,{attributes:j,varyings:F,vertex:W,fragment:R}=z,{applyMarkerOffset:I,draped:A,output:V,capType:E,stippleEnabled:T,falloffEnabled:N,roundJoins:O,wireframe:J,innerColorEnabled:_,hasAnimation:M,hasScreenSizePerspective:U,worldSizedImagePattern:B}=C,H=y().createBuilder(z,C);W.inputs.add("position",()=>H.getTextureAttribute("position")),R.include(a),z.include(t,C),z.include(n,C),z.include(i,C),z.include(b,C);const $=I&&!A;$&&(W.uniforms.add(new S("markerScale",e=>e.markerScale)),z.include(o,{space:2,hasScreenSizePerspective:U})),p(W,C),W.uniforms.add(new x("inverseProjectionMatrix",e=>e.camera.inverseProjectionMatrix),new v("nearFar",e=>e.camera.nearFar),new S("miterLimit",e=>"miter"!==e.join?0:e.miterLimit),new f("viewport",e=>e.camera.fullViewport)),W.constants.add("LARGE_HALF_FLOAT","float",65500),W.constants.add("EPS","float",.001),W.constants.add("NUM_JOIN_SUBDIVISIONS","float",C.numJoinSubdivisions),j.add("textureElementIndex","uint"),j.add("previousDelta","vec4"),j.add("nextDelta","vec4"),j.add("lineParameters","vec2"),j.add("u0","float"),F.add("vColor","vec4"),F.add("vpos","vec3",{invariant:!0}),F.add("vLineDistance","float"),F.add("vLineWidth","float"),T||(F.add("vIsInsideJoin","int"),F.add("vStretchFactor","float"),F.add("vJoinCenterLineSDFs","vec2"),F.add("vSubdivisionFactor","float"));const k=T;k&&F.add("vLineSizeInv","float");const G=2===E,X=T&&G,Y=N||X;Y&&F.add("vLineDistanceNorm","float"),G&&(F.add("vSegmentSDF","float"),F.add("vReverseSegmentSDF","float")),W.code.add(D`vec3 perpendicular(vec3 v) {
3
3
  return vec3(v.y, -v.x, 0.0);
4
4
  }
5
5
  float interp(float ncp, vec4 a, vec4 b) {
@@ -10,12 +10,12 @@ float s = sin(a);
10
10
  float c = cos(a);
11
11
  mat2 m = mat2(c, -s, s, c);
12
12
  return vec3(m * v.xy, v.z);
13
- }`),j.code.add(D`vec4 projectAndScale(vec4 pos) {
13
+ }`),W.code.add(D`vec4 projectAndScale(vec4 pos) {
14
14
  vec4 posNdc = proj * pos;
15
15
  posNdc.xy *= viewport.zw / posNdc.w;
16
16
  posNdc.z /= posNdc.w;
17
17
  return posNdc;
18
- }`),j.code.add(D`void clip(
18
+ }`),W.code.add(D`void clip(
19
19
  inout vec4 pos,
20
20
  inout vec4 prev,
21
21
  inout vec4 next,
@@ -46,7 +46,9 @@ if (next.z > -nearFar[0]) {
46
46
  next = mix(next, pos, interp(vnp, next, pos));
47
47
  }
48
48
  }
49
- }`),m(j),j.constants.add("aaWidth","float",E?0:1).main.add(D`
49
+ }`),m(W),W.constants.add("aaWidth","float",T?0:1).main.add(D`
50
+ vec3 position = ${H.getTextureAttribute("position")};
51
+
50
52
  // unpack values from vertex type
51
53
  bool isStartVertex = abs(abs(lineParameters.y) - 3.0) == 1.0;
52
54
  vec3 prevPosition = position + previousDelta.xyz * previousDelta.w;
@@ -65,11 +67,11 @@ next = mix(next, pos, interp(vnp, next, pos));
65
67
  vec4 next = view * vec4(nextPosition, 1.0);
66
68
 
67
69
  bool isJoin = abs(lineParameters.y) < 3.0;
68
- `),H&&j.main.add(D`vec4 other = isStartVertex ? next : prev;
70
+ `),$&&W.main.add(D`vec4 other = isStartVertex ? next : prev;
69
71
  bool markersHidden = areWorldMarkersHidden(pos.xyz, other.xyz);
70
72
  if (!isJoin && !markersHidden) {
71
73
  pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos.xyz) * 0.5;
72
- }`),C.include(d),j.main.add(D`
74
+ }`),z.include(d),W.main.add(D`
73
75
  clip(pos, prev, next, isStartVertex);
74
76
 
75
77
  vec3 clippedPos = pos.xyz;
@@ -85,11 +87,11 @@ pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos.xyz) * 0.5;
85
87
  float leftLen = length(left);
86
88
  float rightLen = length(right);
87
89
 
88
- float lineSize = getSize(${u(M,"clippedPos")});
89
- ${u(E&&M,"float patternLineSize = getSize(clippedCenter);")}
90
- ${u(E&&!M,"float patternLineSize = lineSize;")}
90
+ float lineSize = getSize(${u(U,"clippedPos")});
91
+ ${u(T&&U,"float patternLineSize = getSize(clippedCenter);")}
92
+ ${u(T&&!U,"float patternLineSize = lineSize;")}
91
93
 
92
- ${u(U,D`
94
+ ${u(B,D`
93
95
  lineSize += aaWidth;
94
96
  float lineWidth = lineSize * pixelRatio * worldToScreenRatio;
95
97
  if (lineWidth < 1.0) {
@@ -107,23 +109,23 @@ pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos.xyz) * 0.5;
107
109
  `)}
108
110
 
109
111
  vLineWidth = noPerspectiveWrite(lineWidth, pos.w);
110
- ${$?D`vLineSizeInv = noPerspectiveWrite(1.0 / lineSize, pos.w);`:""}
111
- `);(E||B)&&j.main.add(D`
112
+ ${k?D`vLineSizeInv = noPerspectiveWrite(1.0 / lineSize, pos.w);`:""}
113
+ `);(T||G)&&W.main.add(D`
112
114
  float isEndVertex = float(!isStartVertex);
113
115
  vec3 segmentOrigin = mix(pos.xyz, prev.xyz, isEndVertex);
114
116
  vec3 segment = mix(right, left, isEndVertex);
115
- ${B?D`vec3 segmentEnd = mix(next.xyz, pos.xyz, isEndVertex);`:""}
116
- `),j.main.add(D`left = (leftLen > EPS) ? left/leftLen : vec3(0.0, 0.0, 0.0);
117
+ ${G?D`vec3 segmentEnd = mix(next.xyz, pos.xyz, isEndVertex);`:""}
118
+ `),W.main.add(D`left = (leftLen > EPS) ? left/leftLen : vec3(0.0, 0.0, 0.0);
117
119
  right = (rightLen > EPS) ? right/rightLen : vec3(0.0, 0.0, 0.0);
118
120
  vec3 segmentDirection = isStartVertex ? right : left;
119
121
  vec3 capDisplacementDir = vec3(0.0, 0.0, 0.0);
120
122
  vec3 joinDisplacementDir = vec3(0.0, 0.0, 0.0);
121
123
  float displacementLen = lineWidth;
122
124
  float miterDisplacementLen = lineWidth;
123
- float innerDisplacementLen = lineWidth;`),E||j.main.add(D`vIsInsideJoin = 0;
125
+ float innerDisplacementLen = lineWidth;`),T||W.main.add(D`vIsInsideJoin = 0;
124
126
  vStretchFactor = 1.0;
125
127
  vSubdivisionFactor = 0.0;
126
- vJoinCenterLineSDFs = vec2(LARGE_HALF_FLOAT);`),j.main.add(D`float subdivisionFactor = 0.0;
128
+ vJoinCenterLineSDFs = vec2(LARGE_HALF_FLOAT);`),W.main.add(D`float subdivisionFactor = 0.0;
127
129
  bool isOutside = false;
128
130
  if (isJoin) {
129
131
  isOutside = (left.x * right.y - left.y * right.x) * lineParameters.y > 0.0;
@@ -138,7 +140,7 @@ if (!isOutside) {
138
140
  displacementLen = innerDisplacementLen;
139
141
  }
140
142
  }
141
- subdivisionFactor = lineParameters.x;`),E||j.main.add(D`if(subdivisionFactor > 0.0) {
143
+ subdivisionFactor = lineParameters.x;`),T||W.main.add(D`if(subdivisionFactor > 0.0) {
142
144
  vIsInsideJoin = 1;
143
145
  }
144
146
  vSubdivisionFactor = isOutside ? subdivisionFactor : 0.5;
@@ -156,23 +158,23 @@ float bevelTriangleHeight = innerDisplacementLen + lineWidth * cos(theta * 0.5);
156
158
  float triangleHeight = NUM_JOIN_SUBDIVISIONS > 0.0 ? subdividedTriangleHeight : bevelTriangleHeight;
157
159
  vStretchFactor = noPerspectiveWrite(max(triangleHeight / (2.0 * lineWidth), 1.0), pos.w);
158
160
  }
159
- }`),j.main.add(D`if (isOutside && (displacementLen > miterLimit * lineWidth)) {`),T?j.main.add(D`
161
+ }`),W.main.add(D`if (isOutside && (displacementLen > miterLimit * lineWidth)) {`),O?W.main.add(D`
160
162
  vec3 startDir = leftLen < EPS ? right : left;
161
163
  startDir = perpendicular(startDir);
162
164
 
163
165
  vec3 endDir = rightLen < EPS ? left : right;
164
166
  endDir = perpendicular(endDir);
165
167
 
166
- float factor = ${E?D`min(1.0, subdivisionFactor * ((NUM_JOIN_SUBDIVISIONS + 1.0) / NUM_JOIN_SUBDIVISIONS))`:D`subdivisionFactor`};
168
+ float factor = ${T?D`min(1.0, subdivisionFactor * ((NUM_JOIN_SUBDIVISIONS + 1.0) / NUM_JOIN_SUBDIVISIONS))`:D`subdivisionFactor`};
167
169
 
168
170
  float rotationAngle = acos(clamp(dot(startDir.xy, endDir.xy), -1.0, 1.0));
169
171
  joinDisplacementDir = rotateZ(startDir, -sign(lineParameters.y) * factor * rotationAngle);
170
- `):j.main.add(D`
172
+ `):W.main.add(D`
171
173
  vec3 startDir = perpendicular(leftLen < EPS ? right : left);
172
174
  vec3 endDir = perpendicular(rightLen < EPS ? left : right);
173
175
 
174
- ${u(E,D`joinDisplacementDir = (isStartVertex || subdivisionFactor > 0.0) ? endDir : startDir;`,D`joinDisplacementDir = mix(startDir, endDir, subdivisionFactor);`)}
175
- `);const X=0!==A;return j.main.add(D`
176
+ ${u(T,D`joinDisplacementDir = (isStartVertex || subdivisionFactor > 0.0) ? endDir : startDir;`,D`joinDisplacementDir = mix(startDir, endDir, subdivisionFactor);`)}
177
+ `);const Z=0!==E;return W.main.add(D`
176
178
  displacementLen = lineWidth;
177
179
  }
178
180
  } else {
@@ -180,9 +182,9 @@ vStretchFactor = noPerspectiveWrite(max(triangleHeight / (2.0 * lineWidth), 1.0)
180
182
  joinDisplacementDir = isStartVertex ? right : left;
181
183
  joinDisplacementDir = perpendicular(joinDisplacementDir);
182
184
 
183
- ${X?D`capDisplacementDir = vec3((isStartVertex ? -right : left).xy, 0.0);`:""}
185
+ ${Z?D`capDisplacementDir = vec3((isStartVertex ? -right : left).xy, 0.0);`:""}
184
186
  }
185
- `),j.main.add(D`
187
+ `),W.main.add(D`
186
188
  // Displacement (in pixels) caused by join/or cap
187
189
  vec2 dposXY = (joinDisplacementDir.xy * sign(lineParameters.y) + capDisplacementDir.xy) * displacementLen;
188
190
 
@@ -198,10 +200,10 @@ vStretchFactor = noPerspectiveWrite(max(triangleHeight / (2.0 * lineWidth), 1.0)
198
200
  float lineDistNorm = noPerspectiveWrite(sign(lineParameters.y), pos.w);
199
201
 
200
202
  vLineDistance = lineWidth * lineDistNorm;
201
- ${G?D`vLineDistanceNorm = lineDistNorm;`:""}
203
+ ${Y?D`vLineDistanceNorm = lineDistNorm;`:""}
202
204
 
203
205
  pos.xyz += dpos;
204
- `),E||j.main.add(D`if (isJoin) {
206
+ `),T||W.main.add(D`if (isJoin) {
205
207
  vec2 joinCenterToVertex = dposXY;
206
208
  vec2 leftCenterlineDir = left.xy;
207
209
  vec2 rightCenterlineDir = right.xy;
@@ -216,19 +218,19 @@ dot(vec2(leftCenterlineDir.y, -leftCenterlineDir.x), joinCenterToVertex)
216
218
  ),
217
219
  pos.w
218
220
  );
219
- }`),B&&j.main.add(D`vec2 segmentDir = normalize(segment.xy);
221
+ }`),G&&W.main.add(D`vec2 segmentDir = normalize(segment.xy);
220
222
  vSegmentSDF = noPerspectiveWrite((isJoin && isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentOrigin.xy, segmentDir)), pos.w);
221
- vReverseSegmentSDF = noPerspectiveWrite((isJoin && !isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentEnd.xy, -segmentDir)), pos.w);`),E&&(I?j.uniforms.add(new h("worldToScreenRatio",e=>1/e.screenToPCSRatio)):j.main.add(D`vec3 segmentCenter = mix((nextPosition + position) * 0.5, (position + prevPosition) * 0.5, isEndVertex);
222
- float worldToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),j.main.add(D`float segmentLengthScreenDouble = length(segment.xy);
223
+ vReverseSegmentSDF = noPerspectiveWrite((isJoin && !isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentEnd.xy, -segmentDir)), pos.w);`),T&&(A?W.uniforms.add(new h("worldToScreenRatio",e=>1/e.screenToPCSRatio)):W.main.add(D`vec3 segmentCenter = mix((nextPosition + position) * 0.5, (position + prevPosition) * 0.5, isEndVertex);
224
+ float worldToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),W.main.add(D`float segmentLengthScreenDouble = length(segment.xy);
223
225
  float segmentLengthScreen = segmentLengthScreenDouble * 0.5;
224
226
  float discreteWorldToScreenRatio = discretizeWorldToScreenRatio(worldToScreenRatio);
225
227
  float segmentLengthRender = length(mix(nextPosition - position, position - prevPosition, isEndVertex));
226
- vStipplePatternStretch = worldToScreenRatio / discreteWorldToScreenRatio;`),I?j.main.add(D`float segmentLengthPseudoScreen = segmentLengthScreen / pixelRatio * discreteWorldToScreenRatio / worldToScreenRatio;
227
- float startPseudoScreen = u0 * discreteWorldToScreenRatio - mix(0.0, segmentLengthPseudoScreen, isEndVertex);`):j.main.add(D`float startPseudoScreen = mix(u0, u0 - segmentLengthRender, isEndVertex) * discreteWorldToScreenRatio;
228
- float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRatio;`),j.uniforms.add(new S("stipplePatternPixelSize",e=>r(e))),j.main.add(D`
228
+ vStipplePatternStretch = worldToScreenRatio / discreteWorldToScreenRatio;`),A?W.main.add(D`float segmentLengthPseudoScreen = segmentLengthScreen / pixelRatio * discreteWorldToScreenRatio / worldToScreenRatio;
229
+ float startPseudoScreen = u0 * discreteWorldToScreenRatio - mix(0.0, segmentLengthPseudoScreen, isEndVertex);`):W.main.add(D`float startPseudoScreen = mix(u0, u0 - segmentLengthRender, isEndVertex) * discreteWorldToScreenRatio;
230
+ float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRatio;`),W.uniforms.add(new S("stipplePatternPixelSize",e=>r(e))),W.main.add(D`
229
231
  float patternLength = patternLineSize * stipplePatternPixelSize;
230
232
 
231
- ${u(U,D`
233
+ ${u(B,D`
232
234
  float uu = mix(u0, u0 - segmentLengthRender, isEndVertex);
233
235
  vStippleDistanceLimits = vec2(uu, uu + segmentLengthRender);
234
236
  vStipplePatternStretch = 1.0;
@@ -267,7 +269,7 @@ float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRat
267
269
  isStartVertex ?
268
270
  vec2(-1e34, vStippleDistanceLimits.y) :
269
271
  vec2(vStippleDistanceLimits.x, 1e34);
270
- `)),j.main.add(D`
272
+ `)),W.main.add(D`
271
273
  // Convert back into NDC
272
274
  pos.xy = (pos.xy / viewport.zw) * pos.w;
273
275
  pos.z = pos.z * pos.w;
@@ -275,35 +277,35 @@ float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRat
275
277
  vColor = getColor();
276
278
  vColor.a = noPerspectiveWrite(vColor.a * coverage, pos.w);
277
279
 
278
- ${O&&!I?"pos.z -= EPS * pos.w;":""}
280
+ ${J&&!A?"pos.z -= EPS * pos.w;":""}
279
281
 
280
282
  // transform final position to camera space for slicing
281
283
  vpos = (inverseProjectionMatrix * pos).xyz;
282
284
  gl_Position = pos;
283
285
  forwardObjectAndLayerIdColor();
284
- }`),C.fragment.include(e,P),C.include(b,P),W.include(l),W.main.add(D`discardBySlice(vpos);`),C.include(c),W.include(L),W.main.add(D`
286
+ }`),z.fragment.include(e,C),z.include(w,C),R.include(l),R.main.add(D`discardBySlice(vpos);`),z.include(c),R.include(L),R.main.add(D`
285
287
  float lineWidth = noPerspectiveRead(vLineWidth);
286
288
  float lineDistance = noPerspectiveRead(vLineDistance);
287
- ${u(G,D`float lineDistanceNorm = noPerspectiveRead(vLineDistanceNorm);`)}
288
- `),O?W.main.add(D`vec4 finalColor = vec4(1.0, 0.0, 1.0, 1.0);`):(B&&W.main.add(D`float sdf = noPerspectiveRead(min(vSegmentSDF, vReverseSegmentSDF));
289
+ ${u(Y,D`float lineDistanceNorm = noPerspectiveRead(vLineDistanceNorm);`)}
290
+ `),J?R.main.add(D`vec4 finalColor = vec4(1.0, 0.0, 1.0, 1.0);`):(G&&R.main.add(D`float sdf = noPerspectiveRead(min(vSegmentSDF, vReverseSegmentSDF));
289
291
  vec2 fragmentPosition = vec2(min(sdf, 0.0), lineDistance);
290
292
  float fragmentRadius = length(fragmentPosition);
291
293
  float fragmentCapSDF = (fragmentRadius - lineWidth) * 0.5;
292
294
  float capCoverage = clamp(0.5 - fragmentCapSDF, 0.0, 1.0);
293
295
  if (capCoverage < alphaCutoff) {
294
296
  discard;
295
- }`),k?W.main.add(D`vec2 stipplePosition = vec2(
297
+ }`),X?R.main.add(D`vec2 stipplePosition = vec2(
296
298
  min(getStippleSDF() * 2.0 - 1.0, 0.0),
297
299
  lineDistanceNorm
298
300
  );
299
301
  float stippleRadius = length(stipplePosition * lineWidth);
300
302
  float stippleCapSDF = (stippleRadius - lineWidth) * 0.5;
301
303
  float stippleCoverage = clamp(0.5 - stippleCapSDF, 0.0, 1.0);
302
- float stippleAlpha = step(alphaCutoff, stippleCoverage);`):W.main.add(D`float stippleAlpha = getStippleAlpha(lineWidth);`),11!==V&&W.main.add(D`discardByStippleAlpha(stippleAlpha, alphaCutoff);`),C.include(c),W.uniforms.add(new g("intrinsicColor",e=>e.color)).main.add(D`vec4 color = intrinsicColor * vColor;
303
- color.a = noPerspectiveRead(color.a);`),J&&W.uniforms.add(new g("innerColor",e=>e.innerColor??e.color),new S("innerWidth",(e,i)=>e.innerWidth*i.camera.pixelRatio)).main.add(D`float distToInner = abs(lineDistance) - innerWidth;
304
+ float stippleAlpha = step(alphaCutoff, stippleCoverage);`):R.main.add(D`float stippleAlpha = getStippleAlpha(lineWidth);`),11!==V&&R.main.add(D`discardByStippleAlpha(stippleAlpha, alphaCutoff);`),z.include(c),R.uniforms.add(new g("intrinsicColor",e=>e.color)).main.add(D`vec4 color = intrinsicColor * vColor;
305
+ color.a = noPerspectiveRead(color.a);`),_&&R.uniforms.add(new g("innerColor",e=>e.innerColor??e.color),new S("innerWidth",(e,i)=>e.innerWidth*i.camera.pixelRatio)).main.add(D`float distToInner = abs(lineDistance) - innerWidth;
304
306
  float innerAA = clamp(0.5 - distToInner, 0.0, 1.0);
305
307
  float innerAlpha = innerColor.a + color.a * (1.0 - innerColor.a);
306
- color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);`),W.main.add(D`vec4 finalColor = blendStipple(color, stippleAlpha);`),N&&(W.uniforms.add(new S("falloff",e=>e.falloff)),W.main.add(D`finalColor.a *= pow(max(0.0, 1.0 - abs(lineDistanceNorm)), falloff);`)),E||W.main.add(D`float stretchFactor = vIsInsideJoin == 1 ? noPerspectiveRead(vStretchFactor) : 1.0;
308
+ color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);`),R.main.add(D`vec4 finalColor = blendStipple(color, stippleAlpha);`),N&&(R.uniforms.add(new S("falloff",e=>e.falloff)),R.main.add(D`finalColor.a *= pow(max(0.0, 1.0 - abs(lineDistanceNorm)), falloff);`)),T||R.main.add(D`float stretchFactor = vIsInsideJoin == 1 ? noPerspectiveRead(vStretchFactor) : 1.0;
307
309
  float featherWidth = 2.0;
308
310
  float featherStartDistance = max(lineWidth - featherWidth / stretchFactor, 0.0);
309
311
  float straightFeatherStartDistance = max(lineWidth - featherWidth, 0.0);
@@ -313,4 +315,4 @@ vec2 joinCenterSDFs = noPerspectiveRead(vJoinCenterLineSDFs);
313
315
  float joinCenterDistance = abs(vSubdivisionFactor > 0.5 ? joinCenterSDFs.x : joinCenterSDFs.y);
314
316
  float straightFeather = (joinCenterDistance - straightFeatherStartDistance) / (lineWidth - straightFeatherStartDistance);
315
317
  feather = vIsInsideJoin == 1 ? max(feather, straightFeather) : feather;
316
- finalColor.a *= 1.0 - clamp(feather, 0.0, 1.0);`),_&&W.main.add("finalColor = animate(finalColor);")),W.main.add(D`outputColorHighlightOLID(applySlice(finalColor, vpos), finalColor.rgb);`),C}const z=Object.freeze(Object.defineProperty({__proto__:null,build:C,ribbonlineNumRoundJoinSubdivisions:P},Symbol.toStringTag,{value:"Module"}));export{z as R,C as b,P as r};
318
+ finalColor.a *= 1.0 - clamp(feather, 0.0, 1.0);`),M&&R.main.add("finalColor = animate(finalColor);")),R.main.add(D`outputColorHighlightOLID(applySlice(finalColor, vpos), finalColor.rgb);`),z}const j=Object.freeze(Object.defineProperty({__proto__:null,build:z,ribbonlineNumRoundJoinSubdivisions:C},Symbol.toStringTag,{value:"Module"}));export{j as R,z as b,C as r};