@arcgis/core 6.0.0-next.20 → 6.0.0-next.21

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 (120) hide show
  1. package/arcgisGlobal.d.ts +1 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0049b66ccbfb168caa76.js +1 -0
  4. package/assets/esri/core/workers/chunks/17c6d66b47aa690df0d4.js +1 -0
  5. package/assets/esri/core/workers/chunks/{564565246dae080f5e6c.js → 1f6b601147521a42e65c.js} +1 -1
  6. package/assets/esri/core/workers/chunks/25d14874198773d2d836.js +1 -0
  7. package/assets/esri/core/workers/chunks/{00d66e3fba5ab4d2aa3c.js → 461e63a0f436c41a9f4a.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{8a485130781b49dbf608.js → 601e1d020b8115497944.js} +1 -1
  9. package/assets/esri/core/workers/chunks/728837812940d7f2ef43.js +1 -0
  10. package/assets/esri/core/workers/chunks/{9401cc22373566e1171e.js → 8a7b02037151767542f1.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{9fab290090ef2ccae810.js → 9e0559cd0bb01a0ed9d7.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{597db9c90f19092d8d66.js → a0c9e3f8b7d55d6dc1d5.js} +10 -10
  13. package/assets/esri/core/workers/chunks/a6f969851d4278865cc5.js +1 -0
  14. package/assets/esri/core/workers/chunks/{9d61740ef8bdcc162be1.js → a8df3f59728f841b608e.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{28b74bc77f7c13080074.js → be97a629e2ae4d13ceb3.js} +1 -1
  16. package/assets/esri/core/workers/chunks/db9921fbda556f142c4a.js +1 -0
  17. package/assets/esri/core/workers/chunks/{612104dff305ff062dfa.js → dfc81e66196c402f39b4.js} +2 -2
  18. package/assets/esri/core/workers/chunks/{a34b3d2e11a777e1ff3f.js → f28b63c1179366dac8a2.js} +1 -1
  19. package/chunks/DefaultMaterial.glsl.js +1 -1
  20. package/chunks/RealisticTree.glsl.js +1 -1
  21. package/chunks/RibbonLine.glsl.js +113 -121
  22. package/config.d.ts +62 -34
  23. package/config.js +1 -1
  24. package/core/workers/Connection.d.ts +58 -89
  25. package/core/workers.d.ts +45 -54
  26. package/kernel.js +1 -1
  27. package/layers/FeatureLayer.d.ts +7 -5
  28. package/layers/FeatureLayer.js +1 -1
  29. package/layers/GeospatialPDFLayer.js +1 -1
  30. package/layers/MapImageLayer.d.ts +9 -3
  31. package/layers/MapNotesLayer.d.ts +2 -2
  32. package/layers/SubtypeGroupLayer.d.ts +1 -1
  33. package/layers/SubtypeGroupLayer.js +1 -1
  34. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
  35. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  36. package/layers/graphics/sources/support/QueryTask.js +1 -1
  37. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +16 -16
  38. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  39. package/layers/mixins/ArcGISMapService.js +1 -1
  40. package/layers/ogc/ogcFeatureUtils.js +1 -1
  41. package/layers/support/Sublayer.d.ts +29 -15
  42. package/layers/support/Sublayer.js +1 -1
  43. package/layers/support/commonProperties.js +1 -1
  44. package/package.json +3 -3
  45. package/rest/layerSources/DynamicDataLayer.d.ts +4 -2
  46. package/rest/layerSources/DynamicDataLayer.js +1 -1
  47. package/rest/layerSources/DynamicMapLayer.d.ts +1 -1
  48. package/rest/layerSources/DynamicWorkspaceLayer.d.ts +45 -0
  49. package/rest/layerSources/DynamicWorkspaceLayer.js +2 -0
  50. package/rest/layerSources/typeUtils.js +2 -0
  51. package/rest/print.js +1 -1
  52. package/rest/query/operations/queryRelatedRecords.js +1 -1
  53. package/rest/query/operations/queryUtils.js +1 -1
  54. package/rest/support/Query.js +1 -1
  55. package/rest/support/RelationshipQuery.js +1 -1
  56. package/symbols/LineSymbol3D.d.ts +5 -3
  57. package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +6 -0
  58. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  59. package/views/2d/layers/AnnotationFeatureLayerView2D.js +1 -1
  60. package/views/2d/layers/CSVLayerView2D.js +1 -1
  61. package/views/2d/layers/CatalogFootprintLayerView2D.js +1 -1
  62. package/views/2d/layers/DimensionFeatureLayerView2D.js +1 -1
  63. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  64. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  65. package/views/2d/layers/GeoJSONLayerView2D.js +1 -1
  66. package/views/2d/layers/KnowledgeGraphSublayerView2D.js +1 -1
  67. package/views/2d/layers/OGCFeatureLayerView2D.js +1 -1
  68. package/views/2d/layers/OrientedImageryLayerView2D.js +1 -1
  69. package/views/2d/layers/ParquetLayerView2D.js +1 -1
  70. package/views/2d/layers/StreamLayerView2D.js +1 -1
  71. package/views/2d/layers/SubtypeGroupLayerView2D.js +1 -1
  72. package/views/2d/layers/WFSLayerView2D.js +1 -1
  73. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  74. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  75. package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
  76. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  77. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  78. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +6 -0
  79. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  80. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
  81. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  82. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  83. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
  84. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  85. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  86. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  87. package/views/3d/interactive/manipulators/ResizeManipulator.js +1 -1
  88. package/views/3d/interactive/manipulators/RotateManipulator.js +1 -1
  89. package/views/3d/interactive/manipulators/ShiftManipulator.js +1 -1
  90. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  91. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  92. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  93. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  94. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  95. package/views/3d/layers/FlowSubView3D.js +1 -1
  96. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  97. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  98. package/views/3d/support/elevationUpdateUtils.js +1 -1
  99. package/views/3d/terrain/TerrainData.js +1 -1
  100. package/views/3d/terrain/terrainUtils.js +1 -1
  101. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +2 -2
  102. package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +3 -3
  103. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialExternalColor.glsl.js +2 -2
  104. package/views/3d/webgl-engine/core/shaderLibrary/output/getEmissions.glsl.js +2 -2
  105. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  106. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  107. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  108. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  109. package/views/BreakpointsOwner.d.ts +6 -0
  110. package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
  111. package/views/types.d.ts +3 -0
  112. package/views/ui/UI.js +1 -1
  113. package/views/webgl/ShaderBuilder.js +1 -1
  114. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  115. package/assets/esri/core/workers/chunks/1e40a26dcce4d1dadc28.js +0 -1
  116. package/assets/esri/core/workers/chunks/370aad23df597db80d65.js +0 -1
  117. package/assets/esri/core/workers/chunks/510502a4c9a2ba8d3f7b.js +0 -1
  118. package/assets/esri/core/workers/chunks/6ad309154fe84210d23c.js +0 -1
  119. package/assets/esri/core/workers/chunks/a49fe94933b65b4b64f8.js +0 -1
  120. package/assets/esri/core/workers/chunks/e8bf653376a607f00897.js +0 -1
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{sliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{EvaluateAmbientOcclusion as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{mainLightIntensity as ee}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{LineStipple as te,computePixelSize as ne}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{NormalUtils as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PiUtils as o}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{readFragmentShadow as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/readFragmentShadow.glsl.js";import{metersPerRenderUnit as l,screenPixelSizePerDistance as u,inverseProjectionMatrix as d,nearFar as f,viewport as p,pixelRatio as m}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{ColorConversion as h}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{NoPerspectiveWrite as g,NoPerspectiveRead as _}from"../views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js";import{addProjViewLocalOrigin as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as x,If as S}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{alphaCutoff as re}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{animatedAlpha as ie}from"../views/3d/webgl-engine/shaders/animatedAlpha.glsl.js";import{groundMetersToScreenRatio as C,planarDistanceToScreenRatio as w}from"../views/3d/webgl-engine/shaders/lineUniforms.js";import{outputColorHighlightOLID as T}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{getTextureBackedBufferModule as E}from"../views/3d/webgl-engine/shaders/RibbonLineTextureBuffer.glsl.js";import{ShaderBuilder as D}from"../views/webgl/ShaderBuilder.js";const O=1;function k(O){let k=new D,{attributes:A,varyings:j,vertex:M,fragment:N}=k,{applyMarkerOffset:P,draped:F,spherical:I,shadingEnabled:L,output:R,capType:z,stippleEnabled:B,falloffEnabled:V,wireframe:H,innerColorEnabled:U,hasAnimation:W,hasScreenSizePerspective:G,worldSized:K,imagePattern:q}=O,J=z===2,Y=B&&J,X=V||Y,ae=B||J,Z=O.usePerspectiveCorrectStipple,Q=E(O).createBuilder(k,O);M.inputs.add(`position`,()=>Q.getTextureAttribute(`position`)),O.hasVVSize?M.inputs.add(`sizeFeatureAttribute`,()=>Q.getTextureAttribute(`sizeFeatureAttribute`)):M.inputs.add(`size`,()=>Q.getTextureAttribute(`size`)),O.hasVVOpacity&&M.inputs.add(`opacityFeatureAttribute`,()=>Q.getTextureAttribute(`opacityFeatureAttribute`)),O.hasVVColor?M.inputs.add(`colorFeatureAttribute`,()=>Q.getTextureAttribute(`colorFeatureAttribute`)):M.inputs.add(`color`,()=>Q.getTextureAttribute(`color`)),N.include(o),k.include(t,O),k.include(te,O),R===11?(k.varyings.add(`objectAndLayerIdColorVarying`,`vec4`),M.code.add(x`
2
+ import{sliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{EvaluateAmbientOcclusion as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{mainLightIntensity as ee}from"../views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js";import{LineStipple as te,computePixelSize as ne}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{NormalUtils as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PiUtils as o}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{readFragmentShadow as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/readFragmentShadow.glsl.js";import{metersPerRenderUnit as l,screenPixelSizePerDistance as u,inverseProjectionMatrix as d,nearFar as f,viewport as p,pixelRatio as m}from"../views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js";import{ColorConversion as h}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{NoPerspectiveWrite as g,NoPerspectiveRead as _}from"../views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js";import{addProjViewLocalOrigin as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as x,If as S}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{alphaCutoff as re}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{animatedAlpha as ie}from"../views/3d/webgl-engine/shaders/animatedAlpha.glsl.js";import{groundMetersToScreenRatio as ae,planarDistanceToScreenRatio as C}from"../views/3d/webgl-engine/shaders/lineUniforms.js";import{outputColorHighlightOLID as w}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{getTextureBackedBufferModule as T}from"../views/3d/webgl-engine/shaders/RibbonLineTextureBuffer.glsl.js";import{ShaderBuilder as E}from"../views/webgl/ShaderBuilder.js";const D=1;function O(D){let O=new E,{attributes:k,varyings:A,vertex:j,fragment:M}=O,{applyMarkerOffset:N,draped:P,spherical:F,shadingEnabled:I,output:L,capType:R,stippleEnabled:z,falloffEnabled:B,wireframe:V,innerColorEnabled:H,hasAnimation:U,hasScreenSizePerspective:W,worldSized:G,imagePattern:K,useFlatJoinVarying:q}=D,J=R===2,Y=z&&J,X=B||Y,oe=z||J,Z=D.usePerspectiveCorrectStipple,Q=T(D).createBuilder(O,D);j.inputs.add(`position`,()=>Q.getTextureAttribute(`position`)),D.hasVVSize?j.inputs.add(`sizeFeatureAttribute`,()=>Q.getTextureAttribute(`sizeFeatureAttribute`)):j.inputs.add(`size`,()=>Q.getTextureAttribute(`size`)),D.hasVVOpacity&&j.inputs.add(`opacityFeatureAttribute`,()=>Q.getTextureAttribute(`opacityFeatureAttribute`)),D.hasVVColor?j.inputs.add(`colorFeatureAttribute`,()=>Q.getTextureAttribute(`colorFeatureAttribute`)):j.inputs.add(`color`,()=>Q.getTextureAttribute(`color`)),M.include(o),O.include(t,D),O.include(te,D),L===11?(O.varyings.add(`objectAndLayerIdColorVarying`,`vec4`),j.code.add(x`
3
3
  vec4 getOlidColor() {
4
4
  return ${Q.getTextureAttribute(`olidColor`)};
5
5
  }
@@ -7,9 +7,9 @@ import{sliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.gls
7
7
  void forwardObjectAndLayerIdColor() {
8
8
  objectAndLayerIdColorVarying = getOlidColor();
9
9
  }
10
- `),N.code.add(x`void outputObjectAndLayerIdColor() {
10
+ `),M.code.add(x`void outputObjectAndLayerIdColor() {
11
11
  fragColor = objectAndLayerIdColorVarying;
12
- }`)):(M.code.add(x`void forwardObjectAndLayerIdColor() {}`),N.code.add(x`void outputObjectAndLayerIdColor() {}`));let $=P&&!F;return $&&k.include(i,O),v(M,O),F&&(K||B)&&M.uniforms.add(K?C:w),K&&!F&&M.uniforms.add(l,u),M.uniforms.add(d,f,p,new b(`miterLimit`,e=>e.join===`miter`?e.miterLimit:0)),M.constants.add(`LARGE_HALF_FLOAT`,`float`,65500),M.constants.add(`EPS`,`float`,.001),M.constants.add(`NUM_JOIN_SUBDIVISIONS`,`float`,O.numJoinSubdivisions),A.add(`textureElementIndex`,`uint`),A.add(`lineParameters`,`vec2`),j.add(`vColor`,`vec4`),j.add(`vpos`,`vec3`,{invariant:!0}),j.add(`vLineDistance`,`float`),j.add(`vLineWidth`,`float`),B||(j.add(`vIsInsideJoin`,`int`),j.add(`vStretchFactor`,`float`),j.add(`vJoinCenterLineSDFs`,`vec2`),j.add(`vSubdivisionFactor`,`float`)),B&&j.add(`vLineSizeInv`,`float`),X&&j.add(`vLineDistanceNorm`,`float`),J&&(j.add(`vSegmentSDF`,`float`),j.add(`vReverseSegmentSDF`,`float`)),M.code.add(x`vec3 perpendicular(vec3 v) {
12
+ }`)):(j.code.add(x`void forwardObjectAndLayerIdColor() {}`),M.code.add(x`void outputObjectAndLayerIdColor() {}`));let $=N&&!P;return $&&O.include(i,D),v(j,D),P&&(G||z)&&j.uniforms.add(G?ae:C),G&&!P&&j.uniforms.add(l,u),j.uniforms.add(d,f,p,new b(`miterLimit`,e=>e.join===`miter`?e.miterLimit:0)),j.constants.add(`LARGE_HALF_FLOAT`,`float`,65500),j.constants.add(`EPS`,`float`,.001),j.constants.add(`NUM_JOIN_SUBDIVISIONS`,`float`,D.numJoinSubdivisions),k.add(`textureElementIndex`,`uint`),k.add(`lineParameters`,`vec2`),A.add(`vColor`,`vec4`),A.add(`vpos`,`vec3`,{invariant:!0}),A.add(`vLineDistance`,`float`),A.add(`vLineWidth`,`float`),q?A.add(`vIsInsideJoin`,`int`,{flat:!0}):A.add(`vIsInsideJoin`,`float`),A.add(`vStretchFactor`,`float`),A.add(`vJoinCenterLineSDFs`,`vec2`),A.add(`vSubdivisionFactor`,`float`),z&&A.add(`vLineSizeInv`,`float`),X&&A.add(`vLineDistanceNorm`,`float`),J&&(A.add(`vSegmentSDF`,`float`),A.add(`vReverseSegmentSDF`,`float`)),j.code.add(x`vec3 perpendicular(vec3 v) {
13
13
  return vec3(v.y, -v.x, 0.0);
14
14
  }
15
15
  float nearPlaneInterpolationFactor(float nearPlaneDistance, vec4 start, vec4 end) {
@@ -20,12 +20,12 @@ float s = sin(a);
20
20
  float c = cos(a);
21
21
  mat2 m = mat2(c, -s, s, c);
22
22
  return vec3(m * v.xy, v.z);
23
- }`),M.code.add(x`vec4 projectAndScale(vec4 pos) {
23
+ }`),j.code.add(x`vec4 projectAndScale(vec4 pos) {
24
24
  vec4 posNdc = proj * pos;
25
25
  posNdc.xy *= viewport.zw / posNdc.w;
26
26
  posNdc.z /= posNdc.w;
27
27
  return posNdc;
28
- }`),M.code.add(x`
28
+ }`),j.code.add(x`
29
29
  void clip(
30
30
  inout vec4 pos,
31
31
  inout vec4 prev,
@@ -75,13 +75,13 @@ return posNdc;
75
75
  }
76
76
  }
77
77
  }
78
- `),M.uniforms.add(m).constants.add(`aaWidth`,`float`,+!B).main.add(x`
78
+ `),j.uniforms.add(m),j.constants.add(`aaWidth`,`float`,1),M.constants.add(`aaWidth`,`float`,1),j.main.add(x`
79
79
  vec3 position = ${Q.getTextureAttribute(`position`)};
80
80
  float u0 = ${Q.getTextureAttribute(`u0`)};
81
- ${S(K,x`
81
+ ${S(G,x`
82
82
  float prevU0 = ${Q.getTextureAttribute(`u0`,-1)};
83
83
  float nextU0 = ${Q.getTextureAttribute(`u0`,1)};
84
- ${S(!F,x`
84
+ ${S(!P,x`
85
85
  u0 *= metersPerRenderUnit;
86
86
  prevU0 *= metersPerRenderUnit;
87
87
  nextU0 *= metersPerRenderUnit;
@@ -90,13 +90,15 @@ return posNdc;
90
90
 
91
91
  // unpack values from vertex type
92
92
  float vertexType = abs(lineParameters.y);
93
+ ${S(!q,x`
94
+ bool isInsideJoin = vertexType > 8.0;
95
+ vertexType -= isInsideJoin ? 8.0 : 0.0;
96
+ `)}
93
97
  float lineSide = sign(lineParameters.y);
94
98
  bool isStartVertex = vertexType == 2.0 || vertexType == 4.0;
95
99
  vec3 prevPosition = ${Q.getTextureAttribute(`position`,-1)};
96
100
  vec3 nextPosition = ${Q.getTextureAttribute(`position`,1)};
97
101
 
98
- float coverage = 1.0;
99
-
100
102
  // Check for special value of lineParameters.y which is used by the Renderer when graphics are removed before the
101
103
  // VBO is recompacted. If this is the case, then we just project outside of clip space.
102
104
  if (lineParameters.y == 0.0) {
@@ -108,11 +110,11 @@ return posNdc;
108
110
  vec4 next = view * vec4(nextPosition, 1.0);
109
111
 
110
112
  bool isJoin = vertexType < 3.0;
111
- `),$&&M.main.add(x`vec4 other = isStartVertex ? next : prev;
113
+ `),$&&j.main.add(x`vec4 other = isStartVertex ? next : prev;
112
114
  bool markersHidden = areWorldMarkersHidden(pos.xyz, other.xyz);
113
115
  if (!isJoin && !markersHidden) {
114
116
  pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos.xyz) * 0.5;
115
- }`),k.include(g),M.code.add(x`
117
+ }`),O.include(g),j.code.add(x`
116
118
  vec2 computeJoinAndCapDisplacement(
117
119
  bool isJoin,
118
120
  bool isStartVertex,
@@ -157,45 +159,45 @@ pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos.xyz) * 0.5;
157
159
  }
158
160
  }
159
161
 
160
- ${S(!B,x`
161
- // Compute stretch compensation for feathering.
162
- if (subdivisionFactor > 0.0) {
163
- vIsInsideJoin = 1;
164
- }
165
- vSubdivisionFactor = isOutside ? subdivisionFactor : 0.5;
166
-
167
- if (miterDisplacementLen > miterLimit * lineWidth) {
168
- vec2 leftScreenDir = left.xy;
169
- vec2 rightScreenDir = right.xy;
170
- float leftScreenLen = length(leftScreenDir);
171
- float rightScreenLen = length(rightScreenDir);
172
-
173
- if (leftScreenLen > EPS && rightScreenLen > EPS) {
174
- leftScreenDir /= leftScreenLen;
175
- rightScreenDir /= rightScreenLen;
176
-
177
- /**
178
- * Feathering AA needs special considerations on join triangles because these can get stretched a lot at acute angles.
179
- * We use the triangle height to determine by how much they get stretched.
180
- */
181
- float theta = acos(clamp(dot(leftScreenDir, rightScreenDir), -1.0, 1.0));
182
- /**
183
- * The argument of cos here is half the angle of a join triangle.
184
- * We start with one triangle, and every subdivision adds another triangle.
185
- */
186
- float subdividedTriangleHeight = (innerDisplacementLen + lineWidth) * cos(theta / (2.0 + 2.0 * NUM_JOIN_SUBDIVISIONS));
187
- float bevelTriangleHeight = innerDisplacementLen + lineWidth * cos(theta * 0.5);
188
- float triangleHeight = NUM_JOIN_SUBDIVISIONS > 0.0 ? subdividedTriangleHeight : bevelTriangleHeight;
189
- vStretchFactor = noPerspectiveWrite(max(triangleHeight / (2.0 * lineWidth), 1.0), perspectiveDivisor);
190
- }
191
- }
192
- `)}
162
+ // Compute stretch compensation for feathering.
163
+ ${S(q,x`
164
+ if (subdivisionFactor > 0.0) {
165
+ vIsInsideJoin = 1;
166
+ }
167
+ `)}
168
+ vSubdivisionFactor = isOutside ? subdivisionFactor : 0.5;
169
+
170
+ if (miterDisplacementLen > miterLimit * lineWidth) {
171
+ vec2 leftScreenDir = left.xy;
172
+ vec2 rightScreenDir = right.xy;
173
+ float leftScreenLen = length(leftScreenDir);
174
+ float rightScreenLen = length(rightScreenDir);
175
+
176
+ if (leftScreenLen > EPS && rightScreenLen > EPS) {
177
+ leftScreenDir /= leftScreenLen;
178
+ rightScreenDir /= rightScreenLen;
179
+
180
+ /**
181
+ * Feathering AA needs special considerations on join triangles because these can get stretched a lot at acute angles.
182
+ * We use the triangle height to determine by how much they get stretched.
183
+ */
184
+ float theta = acos(clamp(dot(leftScreenDir, rightScreenDir), -1.0, 1.0));
185
+ /**
186
+ * The argument of cos here is half the angle of a join triangle.
187
+ * We start with one triangle, and every subdivision adds another triangle.
188
+ */
189
+ float subdividedTriangleHeight = (innerDisplacementLen + lineWidth) * cos(theta / (2.0 + 2.0 * NUM_JOIN_SUBDIVISIONS));
190
+ float bevelTriangleHeight = innerDisplacementLen + lineWidth * cos(theta * 0.5);
191
+ float triangleHeight = NUM_JOIN_SUBDIVISIONS > 0.0 ? subdividedTriangleHeight : bevelTriangleHeight;
192
+ vStretchFactor = noPerspectiveWrite(max(triangleHeight / (2.0 * lineWidth), 1.0), perspectiveDivisor);
193
+ }
194
+ }
193
195
 
194
196
  if (isOutside && displacementLen > miterLimit * lineWidth) {
195
- ${S(O.roundJoins,x`
197
+ ${S(D.roundJoins,x`
196
198
  vec3 startDir = perpendicular(leftLen < EPS ? right : left);
197
199
  vec3 endDir = perpendicular(rightLen < EPS ? left : right);
198
- float factor = ${B?x`min(1.0, subdivisionFactor * ((NUM_JOIN_SUBDIVISIONS + 1.0) / NUM_JOIN_SUBDIVISIONS))`:x`subdivisionFactor`};
200
+ float factor = ${z?x`min(1.0, subdivisionFactor * ((NUM_JOIN_SUBDIVISIONS + 1.0) / NUM_JOIN_SUBDIVISIONS))`:x`subdivisionFactor`};
199
201
 
200
202
  float rotationAngle = acos(clamp(dot(startDir.xy, endDir.xy), -1.0, 1.0));
201
203
  joinDisplacementDir = rotateZ(startDir, -lineSide * factor * rotationAngle);
@@ -211,18 +213,18 @@ pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos.xyz) * 0.5;
211
213
  vec3 startDir = perpendicular(leftLen < EPS ? right : left);
212
214
  vec3 endDir = perpendicular(rightLen < EPS ? left : right);
213
215
 
214
- ${S(B,x`joinDisplacementDir = (isStartVertex || subdivisionFactor > 0.0) ? endDir : startDir;`,x`joinDisplacementDir = mix(startDir, endDir, subdivisionFactor);`)}
216
+ ${S(z,x`joinDisplacementDir = (isStartVertex || subdivisionFactor > 0.0) ? endDir : startDir;`,x`joinDisplacementDir = mix(startDir, endDir, subdivisionFactor);`)}
215
217
  `)}
216
218
  displacementLen = lineWidth;
217
219
  }
218
220
  } else {
219
221
  joinDisplacementDir = perpendicular(isStartVertex ? right : left);
220
- ${z===0?``:x`capDisplacementDir = vec3((isStartVertex ? -right : left).xy, 0.0);`}
222
+ ${R===0?``:x`capDisplacementDir = vec3((isStartVertex ? -right : left).xy, 0.0);`}
221
223
  }
222
224
 
223
225
  return (joinDisplacementDir.xy * lineSide + capDisplacementDir.xy) * displacementLen;
224
226
  }
225
- `),M.main.add(x`
227
+ `),j.main.add(x`
226
228
  clip(pos, prev, next, ${S(Z,x`u0, prevU0, nextU0,`)} isStartVertex);
227
229
 
228
230
  vec3 clippedPos = pos.xyz;
@@ -235,46 +237,32 @@ pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos.xyz) * 0.5;
235
237
  vec3 left = (pos.xyz - prev.xyz);
236
238
  vec3 right = (next.xyz - pos.xyz);
237
239
 
238
- float lineSize = getSize(${S(G,`clippedPos`)});
239
- ${S(B&&G,`float patternLineSize = getSize(clippedCenter);`)}
240
- ${S(B&&!G,`float patternLineSize = lineSize;`)}
240
+ float lineSize = getSize(${S(W,`clippedPos`)});
241
+ ${S(z&&W,`float patternLineSize = getSize(clippedCenter);`)}
242
+ ${S(z&&!W,`float patternLineSize = lineSize;`)}
241
243
 
242
- ${S(K,x`
243
- ${S(F,x`float lineSizeScreen = lineSize * groundMetersToScreenRatio;`,x`
244
+ ${S(G,x`
245
+ ${S(P,x`float lineSizeScreen = lineSize * groundMetersToScreenRatio;`,x`
244
246
  float metersPerScreenPixel = max(-clippedPos.z, nearFar[0]) * metersPerRenderUnit * screenPixelSizePerDistance;
245
247
  float lineSizeScreen = lineSize / metersPerScreenPixel;
246
248
  `)}
247
- if (lineSizeScreen < 1.0) {
248
- coverage = lineSizeScreen;
249
- lineSizeScreen = 1.0;
250
- }
251
-
252
- lineSizeScreen += aaWidth;
253
- float lineWidth = lineSizeScreen * pixelRatio;
249
+ float lineWidth = lineSizeScreen * pixelRatio + aaWidth;
254
250
  `,x`
255
- if (lineSize < 1.0) {
256
- coverage = lineSize; // convert sub-pixel coverage to alpha
257
- lineSize = 1.0;
258
- }
259
-
260
- lineSize += aaWidth;
261
- float lineWidth = lineSize * pixelRatio;
251
+ float lineWidth = lineSize * pixelRatio + aaWidth;
262
252
  `)}
263
253
 
264
254
  vLineWidth = noPerspectiveWrite(lineWidth, pos.w);
265
- ${B?x`vLineSizeInv = noPerspectiveWrite(1.0 / lineSize, pos.w);`:``}
266
- `),ae&&M.main.add(x`
255
+ ${z?x`vLineSizeInv = noPerspectiveWrite(1.0 / ${G?`lineSize`:`max(lineSize, 1.0)`}, pos.w);`:``}
256
+ `),oe&&j.main.add(x`
267
257
  float isEndVertex = float(!isStartVertex);
268
258
  vec3 segmentOrigin = mix(pos.xyz, prev.xyz, isEndVertex);
269
259
  vec3 segment = mix(right, left, isEndVertex);
270
260
  ${J?x`vec3 segmentEnd = mix(next.xyz, pos.xyz, isEndVertex);`:``}
271
- `),M.main.add(x`
272
- ${S(!B,x`
273
- vIsInsideJoin = 0;
274
- vStretchFactor = 1.0;
275
- vSubdivisionFactor = 0.0;
276
- vJoinCenterLineSDFs = vec2(LARGE_HALF_FLOAT);
277
- `)}
261
+ `),j.main.add(x`
262
+ vIsInsideJoin = ${q?x`0`:x`float(isInsideJoin)`};
263
+ vStretchFactor = 1.0;
264
+ vSubdivisionFactor = 0.0;
265
+ vJoinCenterLineSDFs = vec2(LARGE_HALF_FLOAT);
278
266
 
279
267
  vec2 displacementXY = computeJoinAndCapDisplacement(
280
268
  isJoin,
@@ -303,7 +291,7 @@ pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos.xyz) * 0.5;
303
291
  ${X?x`vLineDistanceNorm = lineDistNorm;`:``}
304
292
 
305
293
  pos.xyz += displacement;
306
- `),B||M.main.add(x`if (isJoin) {
294
+ `),j.main.add(x`if (isJoin) {
307
295
  vec2 joinCenterToVertex = displacementXY;
308
296
  vec2 leftCenterlineDir = left.xy;
309
297
  vec2 rightCenterlineDir = right.xy;
@@ -318,31 +306,31 @@ dot(vec2(leftCenterlineDir.y, -leftCenterlineDir.x), joinCenterToVertex)
318
306
  ),
319
307
  pos.w
320
308
  );
321
- }`),J&&M.main.add(x`vec2 segmentDir = normalize(segment.xy);
309
+ }`),J&&j.main.add(x`vec2 segmentDir = normalize(segment.xy);
322
310
  vSegmentSDF = noPerspectiveWrite((isJoin && isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentOrigin.xy, segmentDir)), pos.w);
323
- vReverseSegmentSDF = noPerspectiveWrite((isJoin && !isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentEnd.xy, -segmentDir)), pos.w);`),B&&(F?M.main.add(`float stippleDistanceToScreenRatio = ${K?`groundMetersToScreenRatio`:`planarDistanceToScreenRatio`};`):M.main.add(x`vec3 segmentCenter = mix((nextPosition + position) * 0.5, (position + prevPosition) * 0.5, isEndVertex);
324
- float stippleDistanceToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),M.main.add(x`
311
+ vReverseSegmentSDF = noPerspectiveWrite((isJoin && !isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentEnd.xy, -segmentDir)), pos.w);`),z&&(P?j.main.add(`float stippleDistanceToScreenRatio = ${G?`groundMetersToScreenRatio`:`planarDistanceToScreenRatio`};`):j.main.add(x`vec3 segmentCenter = mix((nextPosition + position) * 0.5, (position + prevPosition) * 0.5, isEndVertex);
312
+ float stippleDistanceToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),j.main.add(x`
325
313
  float segmentLengthScreenDouble = length(segment.xy);
326
314
  float segmentLengthScreen = segmentLengthScreenDouble * 0.5;
327
315
  float discreteStippleDistanceToScreenRatio = discretizeStippleDistanceToScreenRatio(stippleDistanceToScreenRatio);
328
- float segmentLengthRender = ${S(K,x`abs(mix(nextU0 - u0, u0 - prevU0, isEndVertex))`,x`length(mix(nextPosition - position, position - prevPosition, isEndVertex))`)};
316
+ float segmentLengthRender = ${S(G,x`abs(mix(nextU0 - u0, u0 - prevU0, isEndVertex))`,x`length(mix(nextPosition - position, position - prevPosition, isEndVertex))`)};
329
317
 
330
- ${S(!F||K,x`
331
- float segmentStartRender = ${S(K,x`mix(u0, prevU0, isEndVertex)`,x`mix(u0, u0 - segmentLengthRender, isEndVertex)`)};
318
+ ${S(!P||G,x`
319
+ float segmentStartRender = ${S(G,x`mix(u0, prevU0, isEndVertex)`,x`mix(u0, u0 - segmentLengthRender, isEndVertex)`)};
332
320
  `)}
333
321
 
334
322
  vStipplePatternStretch = stippleDistanceToScreenRatio / discreteStippleDistanceToScreenRatio;
335
- `),F?M.main.add(x`float segmentLengthPseudoScreen = segmentLengthScreen / pixelRatio * discreteStippleDistanceToScreenRatio / stippleDistanceToScreenRatio;
336
- float startPseudoScreen = u0 * discreteStippleDistanceToScreenRatio - mix(0.0, segmentLengthPseudoScreen, isEndVertex);`):M.main.add(x`float startPseudoScreen = segmentStartRender * discreteStippleDistanceToScreenRatio;
337
- float segmentLengthPseudoScreen = segmentLengthRender * discreteStippleDistanceToScreenRatio;`),M.uniforms.add(new b(`stipplePatternPixelSize`,e=>ne(e))),M.main.add(x`
323
+ `),P?j.main.add(x`float segmentLengthPseudoScreen = segmentLengthScreen / pixelRatio * discreteStippleDistanceToScreenRatio / stippleDistanceToScreenRatio;
324
+ float startPseudoScreen = u0 * discreteStippleDistanceToScreenRatio - mix(0.0, segmentLengthPseudoScreen, isEndVertex);`):j.main.add(x`float startPseudoScreen = segmentStartRender * discreteStippleDistanceToScreenRatio;
325
+ float segmentLengthPseudoScreen = segmentLengthRender * discreteStippleDistanceToScreenRatio;`),j.uniforms.add(new b(`stipplePatternPixelSize`,e=>ne(e))),j.main.add(x`
338
326
  float patternLength = patternLineSize * stipplePatternPixelSize;
339
327
  vec2 stippleDistanceLimits;
340
328
 
341
- ${S(K,x`
329
+ ${S(G,x`
342
330
  stippleDistanceLimits = vec2(segmentStartRender, segmentStartRender + segmentLengthRender);
343
331
  vStipplePatternStretch = 1.0;
344
332
 
345
- ${S(q,x`
333
+ ${S(K,x`
346
334
  // The v-coordinate used in case of an image pattern.
347
335
  bool isLeft = lineSide < 0.0;
348
336
  vStippleV = isLeft ? 0.0 : 1.0;
@@ -383,58 +371,62 @@ float segmentLengthPseudoScreen = segmentLengthRender * discreteStippleDistanceT
383
371
  // Disable stipple distance limits on caps
384
372
  vStippleLimitsAndCaps.zw = isJoin ? vec2(0.0) :
385
373
  isStartVertex ? vec2(1.0, 0.0) : vec2(0.0, 1.0);
386
- `)),M.main.add(x`
374
+ `)),j.main.add(x`
387
375
  // Convert back into NDC
388
376
  pos.xy = (pos.xy / viewport.zw) * pos.w;
389
377
  pos.z = pos.z * pos.w;
390
378
 
391
379
  vColor = getColor();
392
- vColor.a = noPerspectiveWrite(vColor.a * coverage, pos.w);
380
+ vColor.a = noPerspectiveWrite(vColor.a, pos.w);
393
381
 
394
- ${H&&!F?`pos.z -= EPS * pos.w;`:``}
382
+ ${V&&!P?`pos.z -= EPS * pos.w;`:``}
395
383
 
396
384
  // transform final position to camera space for slicing
397
385
  vpos = (inverseProjectionMatrix * pos).xyz;
398
386
  gl_Position = pos;
399
387
  forwardObjectAndLayerIdColor();
400
- }`),k.include(T,O),k.include(_),N.include(h),N.include(re),N.include(e,O),N.main.add(`discardBySlice(vpos);`),B||N.code.add(x`float lineFeatheringFactor(float lineWidth, float lineDistance) {
401
- float stretchFactor = vIsInsideJoin == 1 ? noPerspectiveRead(vStretchFactor) : 1.0;
388
+ }`),O.include(w,D),O.include(_),M.include(h),M.include(re),M.include(e,D),M.main.add(`discardBySlice(vpos);`),M.code.add(x`float lineFeatheringFactor(float lineWidth, float lineDistance) {
389
+ float stretchFactor = float(vIsInsideJoin) > 0.5 ? noPerspectiveRead(vStretchFactor) : 1.0;
402
390
  float featherWidth = 2.0;
403
- float featherStartDistance = max(lineWidth - featherWidth / stretchFactor, 0.0);
404
- float straightFeatherStartDistance = max(lineWidth - featherWidth, 0.0);
391
+ float featherStartDistance = lineWidth - featherWidth / stretchFactor;
392
+ float straightFeatherStartDistance = lineWidth - featherWidth;
405
393
  float value = abs(lineDistance);
406
394
  float feather = (value - featherStartDistance) / (lineWidth - featherStartDistance);
407
395
  vec2 joinCenterSDFs = noPerspectiveRead(vJoinCenterLineSDFs);
408
396
  float joinCenterDistance = abs(vSubdivisionFactor > 0.5 ? joinCenterSDFs.x : joinCenterSDFs.y);
409
397
  float straightFeather = (joinCenterDistance - straightFeatherStartDistance) / (lineWidth - straightFeatherStartDistance);
410
- feather = vIsInsideJoin == 1 ? max(feather, straightFeather) : feather;
411
- return 1.0 - clamp(feather, 0.0, 1.0);
412
- }`),N.main.add(x`
398
+ feather = float(vIsInsideJoin) > 0.5 ? max(feather, straightFeather) : feather;
399
+ float coverage = min(lineWidth - aaWidth, 1.0);
400
+ return clamp(1.0 - feather, 0.0, coverage);
401
+ }`),M.main.add(x`
413
402
  float lineWidth = noPerspectiveRead(vLineWidth);
414
403
  float lineDistance = noPerspectiveRead(vLineDistance);
415
404
  ${S(X,x`float lineDistanceNorm = noPerspectiveRead(vLineDistanceNorm);`)}
416
- `),H?N.main.add(x`vec4 albedo = vec4(1.0, 0.0, 1.0, 1.0);
417
- vec4 finalColor = albedo;`):(J&&N.main.add(x`float sdf = noPerspectiveRead(min(vSegmentSDF, vReverseSegmentSDF));
418
- vec2 fragmentPosition = vec2(min(sdf, 0.0), lineDistance);
419
- float fragmentRadius = length(fragmentPosition);
420
- float fragmentCapSDF = (fragmentRadius - lineWidth) * 0.5;
421
- float capCoverage = clamp(0.5 - fragmentCapSDF, 0.0, 1.0);
422
- if (capCoverage < alphaCutoff) {
423
- discard;
424
- }`),Y?N.main.add(x`
425
- vec2 stipplePosition = vec2(
426
- min(getStippleCapDistance(), 0.0),
427
- ${Z?x`lineDistance / lineWidth`:x`lineDistanceNorm`}
428
- );
429
- float stippleRadius = length(stipplePosition * lineWidth);
430
- float stippleCapSDF = (stippleRadius - lineWidth) * 0.5; // Divide by 2 to transform from double pixel scale
431
- float stippleCoverage = clamp(0.5 - stippleCapSDF, 0.0, 1.0);
432
- float stippleAlpha = step(alphaCutoff, stippleCoverage);
433
- `):N.main.add(x`float stippleAlpha = getStippleAlpha(lineWidth);`),R!==11&&N.main.add(x`discardByStippleAlpha(stippleAlpha, alphaCutoff);`),N.uniforms.add(new y(`intrinsicColor`,e=>e.color)).main.add(x`vec4 color = intrinsicColor * vColor;
434
- color.a = noPerspectiveRead(color.a);`),U&&N.uniforms.add(new y(`innerColor`,e=>e.innerColor??e.color),new b(`innerWidth`,(e,t)=>e.innerWidth*t.camera.pixelRatio)).main.add(x`float distToInner = abs(lineDistance) - innerWidth;
405
+ `),Y&&M.main.add(x`float nominalLineWidth = lineWidth - aaWidth;`),V?M.main.add(x`vec4 albedo = vec4(1.0, 0.0, 1.0, 1.0);
406
+ vec4 finalColor = albedo;`):(J&&M.main.add(x`
407
+ float sdf = noPerspectiveRead(min(vSegmentSDF, vReverseSegmentSDF));
408
+ vec2 fragmentPosition = vec2(min(sdf, 0.0), lineDistance);
409
+
410
+ float fragmentRadius = length(fragmentPosition);
411
+ float fragmentCapSDF = (fragmentRadius - ${Y?`nominalLineWidth`:`lineWidth`}) * 0.5; // Divide by 2 to transform from double pixel scale
412
+ float capCoverage = clamp(0.5 - fragmentCapSDF, 0.0, 1.0);
413
+
414
+ if (capCoverage < alphaCutoff) {
415
+ discard;
416
+ }
417
+ `),Y?M.main.add(x`vec2 stipplePosition = vec2(
418
+ min(getStippleCapDistance(), 0.0) * nominalLineWidth,
419
+ lineDistance
420
+ );
421
+ float stippleRadius = length(stipplePosition);
422
+ float stippleCapSDF = (stippleRadius - nominalLineWidth) * 0.5;
423
+ float stippleCoverage = clamp(0.5 - stippleCapSDF, 0.0, 1.0);
424
+ float lineCoverage = min(lineFeatheringFactor(lineWidth, lineDistance), capCoverage);
425
+ float stippleAlpha = lineCoverage > 0.0 ? min(stippleCoverage, lineCoverage) / lineCoverage : 0.0;`):M.main.add(x`float stippleAlpha = getStippleAlpha(lineWidth);`),L!==11&&M.main.add(x`discardByStippleAlpha(stippleAlpha, alphaCutoff);`),M.uniforms.add(new y(`intrinsicColor`,e=>e.color)).main.add(x`vec4 color = intrinsicColor * vColor;
426
+ color.a = noPerspectiveRead(color.a);`),H&&M.uniforms.add(new y(`innerColor`,e=>e.innerColor??e.color),new b(`innerWidth`,(e,t)=>e.innerWidth*t.camera.pixelRatio)).main.add(x`float distToInner = abs(lineDistance) - innerWidth;
435
427
  float innerAA = clamp(0.5 - distToInner, 0.0, 1.0);
436
428
  float innerAlpha = innerColor.a + color.a * (1.0 - innerColor.a);
437
- color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);`),N.main.add(`vec4 albedo = blendStipple(color, stippleAlpha);`),V&&(N.uniforms.add(new b(`falloff`,e=>e.falloff)),N.main.add(x`albedo.a *= pow(max(0.0, 1.0 - abs(lineDistanceNorm)), falloff);`)),B||N.main.add(x`albedo.a *= lineFeatheringFactor(lineWidth, lineDistance);`),W&&(M.main.add(`vec4 animatedAlphaTimeStamps = ${Q.getTextureAttribute(`timeStamps`)};`),k.include(ie,O),N.main.add(`albedo.a *= animatedAlpha();`)),L?(I?(j.add(`vnormal`,`vec3`),M.include(a,O),M.main.add(`vnormal = getLocalUp(position, localOrigin);`)):N.main.add(`vec3 vnormal = vec3(0.0, 0.0, 1.0);`),M.main.add(`forwardLinearDepthToReadShadow();`),k.include(c,O),N.include(r,O),N.include(n,O),N.include(a,O),N.uniforms.add(ee).main.add(x`vec3 normal = normalize(vnormal);
429
+ color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);`),M.main.add(`vec4 albedo = blendStipple(color, stippleAlpha);`),B&&(M.uniforms.add(new b(`falloff`,e=>e.falloff)),M.main.add(x`albedo.a *= pow(max(0.0, 1.0 - abs(lineDistanceNorm)), falloff);`)),M.main.add(x`albedo.a *= ${Y?`lineCoverage`:`lineFeatheringFactor(lineWidth, lineDistance)`};`),U&&(j.main.add(`vec4 animatedAlphaTimeStamps = ${Q.getTextureAttribute(`timeStamps`)};`),O.include(ie,D),M.main.add(`albedo.a *= animatedAlpha();`)),I?(F?(A.add(`vnormal`,`vec3`),j.include(a,D),j.main.add(`vnormal = getLocalUp(position, localOrigin);`)):M.main.add(`vec3 vnormal = vec3(0.0, 0.0, 1.0);`),j.main.add(`forwardLinearDepthToReadShadow();`),O.include(c,D),M.include(r,D),M.include(n,D),M.include(a,D),M.uniforms.add(ee).main.add(x`vec3 normal = normalize(vnormal);
438
430
  float additionalAmbientScale = additionalDirectedAmbientLight(normal);
439
431
  float shadow = readFragmentShadow(additionalAmbientScale);
440
432
  float ssao = evaluateAmbientOcclusionInverse();
@@ -443,4 +435,4 @@ vec3 viewDirection = normalize((inverseViewMatrix * vec4(vpos, 0.0)).xyz);
443
435
  vec4 finalColor = vec4(
444
436
  evaluateSceneLighting(normal, albedo.rgb, shadow, 1.0 - ssao, additionalLight,viewDirection, normal),
445
437
  albedo.a
446
- );`)):N.main.add(`vec4 finalColor = albedo;`)),N.main.add(x`outputColorHighlightOLID(applySlice(finalColor, vpos), albedo.rgb);`),k}const A=Object.freeze(Object.defineProperty({__proto__:null,build:k,numRoundJoinSubdivisions:1},Symbol.toStringTag,{value:`Module`}));export{A as R,k as b,O as n};
438
+ );`)):M.main.add(`vec4 finalColor = albedo;`)),M.main.add(x`outputColorHighlightOLID(applySlice(finalColor, vpos), albedo.rgb);`),O}const k=Object.freeze(Object.defineProperty({__proto__:null,build:O,numRoundJoinSubdivisions:1},Symbol.toStringTag,{value:`Module`}));export{k as R,O as b,D as n};
package/config.d.ts CHANGED
@@ -236,35 +236,26 @@ export interface Config {
236
236
  * An object with properties that control various aspects of [the workers framework](https://developers.arcgis.com/javascript/latest/references/core/core/workers/).
237
237
  *
238
238
  * @example
239
- * // Set the path for the worker's AMD loader configuration
240
- * // to a folder called workersFolder.
241
- * config.workers.loaderConfig = {
242
- * paths: {
243
- * myWorkers: new URL("./workersFolder", document.baseURI).href
244
- * }
245
- * };
246
- *
247
- * // load myWorkers/Calculator.js in the workers framework
248
- * // and invoke its "getMaxNumber" method
249
- * workers.open(this, "myWorkers/Calculator")
250
- * .then((connection) => {
251
- * return connection.invoke("getMaxNumber", [0, 1, 2, 3, 4]);
252
- * })
253
- * .then((result) => {
254
- * console.log(result);
255
- * });
239
+ * // Load an ESM worker module and invoke its "getMaxNumber" function.
240
+ *
241
+ * const connection = await workers.open(new URL("./workersFolder/Calculator.js", import.meta.url).href, {
242
+ * isESM: true
243
+ * });
244
+ *
245
+ * try {
246
+ * // Invoke the worker function and receive its result on the main thread.
247
+ * const result = await connection.invoke("getMaxNumber", [0, 1, 2, 3, 4]);
248
+ * console.log(result);
249
+ * } finally {
250
+ * connection.close();
251
+ * }
256
252
  *
257
253
  * //*********************************************************
258
- * // module: workerFolder/Calculator.js
254
+ * // module: workersFolder/Calculator.js
259
255
  * //*********************************************************
260
- * define([], () => {
261
- * return {
262
- * // this function can be invoked from the main thread
263
- * getMaxNumber: function (number) {
264
- * return Math.max.apply(null, numbers);
265
- * }
266
- * };
267
- * });
256
+ * export function getMaxNumber(numbers) {
257
+ * return Math.max(...numbers);
258
+ * }
268
259
  */
269
260
  workers: WorkersConfig;
270
261
  }
@@ -294,27 +285,64 @@ export interface ApiKeysScopeConfig {
294
285
  }
295
286
 
296
287
  export interface WorkersConfig {
297
- /** The absolute url to the AMD or SystemJS loader used in the worker. The AMD CDN build has a default value for when this property isn't set. This is required when using custom workers. See this [ESM sample](https://github.com/Esri/jsapi-resources/tree/main/templates/geometry-operator-worker). */
288
+ /**
289
+ * The absolute URL to the AMD or SystemJS loader used in the worker. The AMD CDN build has a default value for when this property isn't set. This is required when using custom workers.
290
+ *
291
+ * @deprecated since version 5.2. AMD/SystemJS worker loading is deprecated. Use ESM worker modules with [workers.open()](https://developers.arcgis.com/javascript/latest/references/core/core/workers/#open) instead. See this [ESM sample](https://github.com/Esri/jsapi-resources/tree/main/templates/geometry-operator-worker).
292
+ */
298
293
  loaderUrl?: string;
299
294
  /**
300
295
  * This is used by the `@arcgis/core` npm package to control where to load a custom build of the `RemoteClient` from.
301
- * By default, `RemoteClient` is loaded from the API's [assets](https://developers.arcgis.com/javascript/latest/working-with-assets/). See this [ESM sample](https://github.com/Esri/jsapi-resources/tree/main/templates/geometry-operator-worker).
296
+ * By default, `RemoteClient` is loaded from the API's [assets](https://developers.arcgis.com/javascript/latest/working-with-assets/).
297
+ *
298
+ * `RemoteClient` is the SDK’s internal worker-side runtime. It loads and instantiates the worker module, then manages communication with the main thread through the worker connection.
299
+ *
300
+ * @deprecated since version 5.2. Custom worker runtime paths are deprecated. Use the default worker runtime with ESM worker modules opened via [workers.open()](https://developers.arcgis.com/javascript/latest/references/core/core/workers/#open).
302
301
  */
303
302
  workerPath?: string;
304
- /** The AMD configuration object that is set in each worker. */
303
+ /**
304
+ * The AMD configuration object that is set in each worker.
305
+ *
306
+ * @deprecated since version 5.2. AMD/SystemJS worker loading is deprecated. Use ESM worker modules with [workers.open()](https://developers.arcgis.com/javascript/latest/references/core/core/workers/#open) instead.
307
+ */
305
308
  loaderConfig?: WorkersLoaderConfig;
306
309
  }
307
310
 
311
+ /**
312
+ * Configuration for the legacy AMD worker loader.
313
+ *
314
+ * @deprecated since version 5.2. AMD/SystemJS worker loading is deprecated. Use ESM worker modules with [workers.open()](https://developers.arcgis.com/javascript/latest/references/core/core/workers/#open) instead.
315
+ */
308
316
  export interface WorkersLoaderConfig {
309
- /** The AMD loader loads all code relative to the baseUrl. */
317
+ /**
318
+ * The AMD loader loads all code relative to the baseUrl.
319
+ *
320
+ * @deprecated since version 5.2. AMD/SystemJS worker loading is deprecated. Use ESM worker modules with [workers.open()](https://developers.arcgis.com/javascript/latest/references/core/core/workers/#open) instead.
321
+ */
310
322
  baseUrl?: string;
311
- /** Determines if the specified feature capabilities are supported. */
323
+ /**
324
+ * Determines if the specified feature capabilities are supported.
325
+ *
326
+ * @deprecated since version 5.2. AMD/SystemJS worker loading is deprecated. Use ESM worker modules with [workers.open()](https://developers.arcgis.com/javascript/latest/references/core/core/workers/#open) instead.
327
+ */
312
328
  has?: Record<string, any>;
313
- /** Map paths in module identifiers to different paths. */
329
+ /**
330
+ * Map paths in module identifiers to different paths.
331
+ *
332
+ * @deprecated since version 5.2. AMD/SystemJS worker loading is deprecated. Use ESM worker modules with [workers.open()](https://developers.arcgis.com/javascript/latest/references/core/core/workers/#open) instead.
333
+ */
314
334
  map?: Record<string, Record<string, string>>;
315
- /** An array of objects which provide the package name and its location. */
335
+ /**
336
+ * An array of objects which provide the package name and its location.
337
+ *
338
+ * @deprecated since version 5.2. AMD/SystemJS worker loading is deprecated. Use ESM worker modules with [workers.open()](https://developers.arcgis.com/javascript/latest/references/core/core/workers/#open) instead.
339
+ */
316
340
  packages?: object[];
317
- /** Map of module id fragments to file paths. */
341
+ /**
342
+ * Map of module id fragments to file paths.
343
+ *
344
+ * @deprecated since version 5.2. AMD/SystemJS worker loading is deprecated. Use ESM worker modules with [workers.open()](https://developers.arcgis.com/javascript/latest/references/core/core/workers/#open) instead.
345
+ */
318
346
  paths?: Record<string, string>;
319
347
  }
320
348
 
package/config.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const t={apiKey:void 0,apiKeys:{scopes:[]},applicationName:``,applicationUrl:globalThis.location?.href,assetsPath:``,fontsUrl:`https://static.arcgis.com/fonts`,geometryServiceUrl:`https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer`,geoRSSServiceUrl:`https://utility.arcgis.com/sharing/rss`,kmlServiceUrl:`https://utility.arcgis.com/sharing/kml`,userPrivilegesApplied:!0,portalUrl:`https://www.arcgis.com`,respectPrefersReducedMotion:!0,routeServiceUrl:`https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World`,workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:[`arcgis.com`,`arcgisonline.com`,`esrikr.com`,`premiumservices.blackbridge.com`,`esripremium.accuweather.com`,`gbm.digitalglobe.com`,`firstlook.digitalglobe.com`,`msi.digitalglobe.com`],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:`high`,proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};globalThis.esriConfig&&(e(t,globalThis.esriConfig,!0),delete t.has),!t.assetsPath&&(t.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@6.0.0-next.20/assets`,t.defaultAssetsPath=t.assetsPath);export{t as default};
2
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const t={apiKey:void 0,apiKeys:{scopes:[]},applicationName:``,applicationUrl:globalThis.location?.href,assetsPath:``,fontsUrl:`https://static.arcgis.com/fonts`,geometryServiceUrl:`https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer`,geoRSSServiceUrl:`https://utility.arcgis.com/sharing/rss`,kmlServiceUrl:`https://utility.arcgis.com/sharing/kml`,userPrivilegesApplied:!0,portalUrl:`https://www.arcgis.com`,respectPrefersReducedMotion:!0,routeServiceUrl:`https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World`,workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:[`arcgis.com`,`arcgisonline.com`,`esrikr.com`,`premiumservices.blackbridge.com`,`esripremium.accuweather.com`,`gbm.digitalglobe.com`,`firstlook.digitalglobe.com`,`msi.digitalglobe.com`],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:`high`,proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};globalThis.esriConfig&&(e(t,globalThis.esriConfig,!0),delete t.has),!t.assetsPath&&(t.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@6.0.0-next.21/assets`,t.defaultAssetsPath=t.assetsPath);export{t as default};