@arcgis/core 5.2.0-next.20 → 5.2.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 (149) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/057d288d795b853295f1.js +2 -0
  3. package/assets/esri/core/workers/chunks/{595bc41ff36c77324d01.js → 19493c9c7e1d2ac0f80f.js} +8 -8
  4. package/assets/esri/core/workers/chunks/2ef80e003b4f0393ac2e.js +1 -0
  5. package/assets/esri/core/workers/chunks/{4fdd38d7362bf09a994b.js → 33866e6e6de1bab64599.js} +1 -1
  6. package/assets/esri/core/workers/chunks/360fd810d70d21c092d9.js +1 -0
  7. package/assets/esri/core/workers/chunks/{4517630bf869205bab87.js → 38a76bc4ef5c10ab0488.js} +1 -1
  8. package/assets/esri/core/workers/chunks/5468a65698931603656d.js +1 -0
  9. package/assets/esri/core/workers/chunks/{c9e5d3f496cefb8e3934.js → 5aa375b0c6a205134703.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{db26cf2c2735183294b8.js → 6649acaceab00ad30e7f.js} +1 -1
  11. package/assets/esri/core/workers/chunks/7175f0c6a6e56b685d20.js +680 -0
  12. package/assets/esri/core/workers/chunks/{501fa9b029df2e7b73c3.js → 754f7ed62afc4e0a1972.js} +2 -2
  13. package/assets/esri/core/workers/chunks/{6ac09f4e85c664a17365.js → 8331e04ebe0a54b04ab6.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{72edd08a2ff08970ba38.js → 87011d2fe14c54e296af.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{5216dd0544e901039c84.js → 8c64c6b8d7376a9d1c91.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{8ce4fe00328173224ed2.js → 909e67dee8c30e391d69.js} +1 -1
  17. package/assets/esri/core/workers/chunks/93b40245378ced43ca08.js +1 -0
  18. package/assets/esri/core/workers/chunks/98dfe31e8ed9b522eaff.js +1 -0
  19. package/assets/esri/core/workers/chunks/{4104a0585969f8cd524c.js → a40ede4d3375184f21fe.js} +1 -1
  20. package/assets/esri/core/workers/chunks/a533d066cac26124c5ce.js +1 -0
  21. package/assets/esri/core/workers/chunks/a536904fe6f3b16fdbdc.js +1 -0
  22. package/assets/esri/core/workers/chunks/a8167ab9fd846d699be5.js +1 -0
  23. package/assets/esri/core/workers/chunks/{dd0c1cf921369e2bc48b.js → a90619adff41658f8057.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{6e8b9c03240ec372b587.js → c30ca771dd3f7198142b.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{e8d65900eefff1152207.js → c593539c2cce7a2b9d44.js} +1 -1
  26. package/assets/esri/core/workers/chunks/da47fdffb5969694a2ae.js +1 -0
  27. package/assets/esri/core/workers/chunks/{764c8ba14ab74b66b391.js → e5fcd8e7a4a660ef6ad6.js} +1 -1
  28. package/assets/esri/core/workers/chunks/f0519b06987471456b69.js +1 -0
  29. package/assets/esri/core/workers/chunks/{5f63077ec5ba3560491b.js → f1ff33584680d8718400.js} +1 -1
  30. package/assets/esri/core/workers/chunks/f47319d36f1527277923.js +1 -0
  31. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  32. package/assets/esri/themes/dark/main.css +1 -1
  33. package/assets/esri/themes/light/main.css +1 -1
  34. package/assets/esri/themes/light/view.css +1 -1
  35. package/chunks/Pattern.glsl.js +17 -17
  36. package/chunks/RibbonLine.glsl.js +45 -43
  37. package/chunks/bundle2.js +1 -1
  38. package/config.js +1 -1
  39. package/geometry/support/geometryUtils.js +1 -1
  40. package/geometry/support/intersects.js +1 -1
  41. package/geometry/support/intersectsBase.js +1 -1
  42. package/kernel.js +1 -1
  43. package/layers/AnnotationFeatureLayer.d.ts +43 -0
  44. package/layers/AnnotationFeatureLayer.js +1 -1
  45. package/layers/DimensionFeatureLayer.d.ts +39 -0
  46. package/layers/DimensionFeatureLayer.js +1 -1
  47. package/layers/DimensionLayer.d.ts +1 -0
  48. package/layers/FeatureLayer.js +1 -1
  49. package/layers/IntegratedMesh3DTilesLayer.d.ts +9 -1
  50. package/layers/ParquetLayer.d.ts +6 -10
  51. package/layers/graphics/data/attributeSupport.js +1 -1
  52. package/layers/graphics/data/queryValidationUtils.js +1 -1
  53. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  54. package/layers/mixins/ArcGISImageService.js +1 -1
  55. package/layers/raster/datasets/WCSRaster.js +1 -1
  56. package/layers/support/AnnotationFeatureSublayer.d.ts +5 -3
  57. package/layers/support/SymbolLayerDrawing.js +1 -1
  58. package/package.json +2 -2
  59. package/support/revision.js +1 -1
  60. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  61. package/views/2d/engine/transitions/FadeTransition.js +1 -1
  62. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  63. package/views/2d/engine/webgl/TileCpuState.js +1 -1
  64. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  65. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  66. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  67. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  68. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  69. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  70. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  71. package/views/2d/layers/LayerView2D.js +1 -1
  72. package/views/2d/layers/MediaLayerView2D.js +1 -1
  73. package/views/2d/layers/features/FeatureContainer.js +1 -1
  74. package/views/2d/layers/features/RenderState.js +1 -1
  75. package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
  76. package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
  77. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  78. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  79. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  80. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  81. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  82. package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
  83. package/views/3d/analysis/LineOfSight/LineOfSightDrawToolRenderer.js +1 -1
  84. package/views/3d/analysis/LineOfSight/LineOfSightInteractionVisuals.js +2 -0
  85. package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
  86. package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
  87. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
  88. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  89. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  90. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  91. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  92. package/views/3d/layers/graphics/Graphics3DPathSymbolLayerConstants.js +1 -1
  93. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  94. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  95. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +11 -11
  96. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +6 -9
  97. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +46 -46
  98. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexInfo.glsl.js +46 -18
  99. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +22 -22
  100. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
  101. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  102. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  103. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  104. package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
  105. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  106. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  107. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  108. package/views/3d/webgl-engine/lib/PathVertexInfo.js +1 -1
  109. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  110. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferUtils.js +1 -1
  111. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  112. package/views/3d/webgl-engine/materials/PathLayouts.js +1 -1
  113. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  114. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  115. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  116. package/views/3d/webgl-engine/shaders/PatternTextureBuffer.glsl.js +1 -1
  117. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  118. package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +1 -1
  119. package/views/3d/webgl-engine/shaders/RibbonLineTextureBuffer.glsl.js +2 -0
  120. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +10 -10
  121. package/views/analysis/ElevationProfile/ElevationProfileChart.js +1 -1
  122. package/views/webgl/ShaderBuilder.js +1 -1
  123. package/widgets/BatchAttributeForm.js +1 -1
  124. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  125. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  126. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  127. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  128. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  129. package/widgets/OrientedImageryViewer/components/VideoEnhancementTools.js +1 -1
  130. package/widgets/OrientedImageryViewer/constants.js +1 -1
  131. package/widgets/OrientedImageryViewer/support/panConstraint.js +2 -0
  132. package/widgets/OrientedImageryViewer.js +1 -1
  133. package/widgets/Print/CustomTemplate.d.ts +7 -0
  134. package/widgets/Search/LayerSearchSource.d.ts +3 -0
  135. package/assets/esri/core/workers/chunks/0a259137932211b80f0e.js +0 -1
  136. package/assets/esri/core/workers/chunks/35a508a9311689d8df52.js +0 -1
  137. package/assets/esri/core/workers/chunks/74922daaedb479ec6f03.js +0 -1
  138. package/assets/esri/core/workers/chunks/912a8743a02f467b63b0.js +0 -2
  139. package/assets/esri/core/workers/chunks/9def4619d102f1d41578.js +0 -1
  140. package/assets/esri/core/workers/chunks/a0876a52a3c2ad849370.js +0 -1
  141. package/assets/esri/core/workers/chunks/a3c5b754a6fa0f4250bf.js +0 -1
  142. package/assets/esri/core/workers/chunks/a98905bf6050ad3b8721.js +0 -633
  143. package/assets/esri/core/workers/chunks/bf67e0f6064fb9d94ac8.js +0 -1
  144. package/assets/esri/core/workers/chunks/cd892f429d5ffe8de99e.js +0 -1
  145. package/assets/esri/core/workers/chunks/d34d41a350facfa9b7c0.js +0 -1
  146. package/assets/esri/core/workers/chunks/d5a0e3a73df827dc7b06.js +0 -1
  147. package/assets/esri/core/workers/chunks/e5471373f89fd7cb9844.js +0 -1
  148. /package/assets/esri/core/workers/chunks/{912a8743a02f467b63b0.js.LICENSE.txt → 057d288d795b853295f1.js.LICENSE.txt} +0 -0
  149. /package/assets/esri/core/workers/chunks/{501fa9b029df2e7b73c3.js.LICENSE.txt → 754f7ed62afc4e0a1972.js.LICENSE.txt} +0 -0
@@ -1,8 +1,8 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{freeze as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{pathNumRoundCapExtrusionSubdivisions as t}from"../../../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{PathVertexInfo as o}from"./PathVertexInfo.glsl.js";import{PiUtils as r}from"../shading/PiUtils.glsl.js";import{Float2sPassUniform as a}from"../../shaderModules/Float2sPassUniform.js";import{Float4sPassUniform as n}from"../../shaderModules/Float4sPassUniform.js";import{FloatPassUniform as i}from"../../shaderModules/FloatPassUniform.js";import{glsl as l,If as f}from"../../shaderModules/glsl.js";import{IntegerPassUniform as s}from"../../shaderModules/IntegerPassUniform.js";import{IntegersPassUniform as p}from"../../shaderModules/IntegersPassUniform.js";import{pathProfileUniformLayout as d}from"../../../lib/PathProfile.js";function x(e,x){const{vertex:m}=e;e.include(o);const u=1===x.upVectorAlignment;m.uniforms.add(new i("angleCutoff",e=>e.cutoffAngle)),m.code.add(l`float reciprocalClamped(float value) {
2
+ import{freeze as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{pathNumRoundCapExtrusionSubdivisions as t}from"../../../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{PathVertexInfo as r}from"./PathVertexInfo.glsl.js";import{PiUtils as o}from"../shading/PiUtils.glsl.js";import{Float2sPassUniform as a}from"../../shaderModules/Float2sPassUniform.js";import{Float4sPassUniform as i}from"../../shaderModules/Float4sPassUniform.js";import{FloatPassUniform as l}from"../../shaderModules/FloatPassUniform.js";import{glsl as n,If as s}from"../../shaderModules/glsl.js";import{IntegerPassUniform as f}from"../../shaderModules/IntegerPassUniform.js";import{IntegersPassUniform as p}from"../../shaderModules/IntegersPassUniform.js";import{pathProfileUniformLayout as c}from"../../../lib/PathProfile.js";function d(e,d){const{vertex:m}=e;e.include(r,d);const u=1===d.upVectorAlignment;m.uniforms.add(new l("angleCutoff",e=>e.cutoffAngle)),m.code.add(n`float reciprocalClamped(float value) {
3
3
  float signValue = value < 0.0 ? -1.0 : 1.0;
4
4
  return signValue / max(abs(value), 1e-6);
5
- }`),u?m.code.add(l`vec2 applyMiterStretch(vec2 vertex, float rotationAngle, vec2 rotationRight) {
5
+ }`),u?m.code.add(n`vec2 applyMiterStretch(vec2 vertex, float rotationAngle, vec2 rotationRight) {
6
6
  if (rotationAngle == 0.0) {
7
7
  return vertex;
8
8
  }
@@ -14,13 +14,13 @@ mat2 miterStretch = mat2(
14
14
  1. + (k - 1.) * rotationRight.y * rotationRight.y
15
15
  );
16
16
  return miterStretch * vertex;
17
- }`):m.code.add(l`vec2 applyMiterStretch(vec2 vertex, float rotationAngle) {
17
+ }`):m.code.add(n`vec2 applyMiterStretch(vec2 vertex, float rotationAngle) {
18
18
  if (rotationAngle == 0.0) {
19
19
  return vertex;
20
20
  }
21
21
  float k = reciprocalClamped(cos(0.5 * rotationAngle));
22
22
  return vec2(k, 1.) * vertex;
23
- }`);const{vertexCount:v,indexCount:h,poleCount:g}=d[x.pathProfileType];switch(m.uniforms.add(new a("pathProfileVertices",v,e=>e.profile.vertices.flat()),new a("pathProfileNormals",v,e=>e.profile.normals.flat())),m.code.add(l`mat3 mat3FromRotation(float angle, vec3 axis) {
23
+ }`);const{vertexCount:v,indexCount:h,poleCount:g}=c[d.pathProfileType];switch(m.uniforms.add(new a("pathProfileVertices",v,e=>e.profile.vertices.flat()),new a("pathProfileNormals",v,e=>e.profile.normals.flat())),m.code.add(n`mat3 mat3FromRotation(float angle, vec3 axis) {
24
24
  float x = axis.x;
25
25
  float y = axis.y;
26
26
  float z = axis.z;
@@ -32,7 +32,7 @@ x * x * t + c, y * x * t + z * s, z * x * t - y * s,
32
32
  x * y * t - z * s, y * y * t + c, z * y * t + x * s,
33
33
  x * z * t + y * s, y * z * t - x * s, z * z * t + c
34
34
  );
35
- }`),m.code.add(l`struct ExtrusionFrame {
35
+ }`),m.code.add(n`struct ExtrusionFrame {
36
36
  vec3 up;
37
37
  vec3 right;
38
38
  };
@@ -45,20 +45,20 @@ float maxDistance;
45
45
  float capPositionOffset;
46
46
  float capNormalOffset;
47
47
  bool isCap;
48
- };`),u?m.code.add(l`vec2 getPathRotationRight(ExtrusionFrame frame) {
48
+ };`),u?m.code.add(n`vec2 getPathRotationRight(ExtrusionFrame frame) {
49
49
  vec3 rotationUp = getFrameRotationUp();
50
50
  float a = dot(rotationUp, frame.up);
51
51
  float b = dot(rotationUp, frame.right);
52
52
  vec3 vertex = normalize(frame.up * -b + frame.right * a);
53
53
  return vec2(dot(vertex, frame.right), dot(vertex, frame.up));
54
- }`):m.code.add(l`vec2 getPathRotationRight() {
54
+ }`):m.code.add(n`vec2 getPathRotationRight() {
55
55
  return vec2(1., 0.);
56
- }`),m.constants.add("pathVertexTypeJoin","uint",0),m.uniforms.add(new s("numJoinSubdivisions",e=>e.numJoinSubdivisions)),m.code.add(l`
57
- ExtrudedVertex evaluateJoinVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
58
- vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
59
- vec2 profileNormal = pathProfileNormals[vertexInfo.sourceIndex];
56
+ }`),m.uniforms.add(new f("numJoinSubdivisions",e=>e.numJoinSubdivisions)),m.code.add(n`
57
+ ExtrudedVertex evaluateJoinVertex(PathVertexDescriptor vertexDescriptor, ExtrusionFrame frame) {
58
+ vec2 profileVertex = pathProfileVertices[vertexDescriptor.sourceIndex];
59
+ vec2 profileNormal = pathProfileNormals[vertexDescriptor.sourceIndex];
60
60
  float profileRotation = getProfileRotation();
61
- vec2 rotationRight = getPathRotationRight(${f(u,l`frame`)});
61
+ vec2 rotationRight = getPathRotationRight(${s(u,n`frame`)});
62
62
  bool isBevel = abs(profileRotation) >= angleCutoff;
63
63
 
64
64
  // determine if the current profile vertex is on the inside or outside of the rotationAxis
@@ -69,20 +69,20 @@ return vec2(1., 0.);
69
69
  bool isBevelBend = isBevel && isBend;
70
70
 
71
71
  if (isBevelBend) {
72
- float k = vertexInfo.subdivision;
72
+ float k = vertexDescriptor.subdivision;
73
73
  // rotate half rotation angle backwards to where the rotation starts
74
74
  // and then rotate a couple of times depending on the current subdivision segment
75
75
  float bendRotation = -profileRotation * 0.5 + (k * profileRotation) / float(numJoinSubdivisions);
76
76
  if (bendRotation != 0.) {
77
77
  vec3 rotationUp = getFrameRotationUp();
78
78
  mat3 transform = mat3FromRotation(bendRotation, rotationUp);
79
- ${f(u,l`frame.up = normalize(transform * frame.up);`)}
79
+ ${s(u,n`frame.up = normalize(transform * frame.up);`)}
80
80
  frame.right = normalize(transform * frame.right);
81
81
  }
82
82
  } else {
83
83
  profileVertex = applyMiterStretch(
84
84
  profileVertex,
85
- profileRotation${f(u,l`,
85
+ profileRotation${s(u,n`,
86
86
  rotationRight`)}
87
87
  );
88
88
  }
@@ -103,12 +103,12 @@ return vec2(1., 0.);
103
103
  false
104
104
  );
105
105
  }
106
- `),m.constants.add("pathVertexTypeCapConnectingProfile","uint",1),m.code.add(l`
107
- ExtrudedVertex evaluateConnectingVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
108
- vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
109
- vec2 profileNormal = pathProfileNormals[vertexInfo.sourceIndex];
106
+ `),m.code.add(n`
107
+ ExtrudedVertex evaluateConnectingVertex(PathVertexDescriptor vertexDescriptor, ExtrusionFrame frame) {
108
+ vec2 profileVertex = pathProfileVertices[vertexDescriptor.sourceIndex];
109
+ vec2 profileNormal = pathProfileNormals[vertexDescriptor.sourceIndex];
110
110
 
111
- float profilePlaneVertexOffset = ${f(2===x.pathCapType,l`vertexInfo.isEnd ? 0.5 : -0.5`,l`0.`)};
111
+ float profilePlaneVertexOffset = ${s(2===d.pathCapType,n`vertexDescriptor.isEnd ? 0.5 : -0.5`,n`0.`)};
112
112
 
113
113
  return ExtrudedVertex(
114
114
  frame,
@@ -121,12 +121,12 @@ return vec2(1., 0.);
121
121
  true
122
122
  );
123
123
  }
124
- `),x.pathCapType){case 1:case 2:m.constants.add("pathVertexTypeFlatCapProfile","uint",2),m.code.add(l`
125
- ExtrudedVertex evaluateFlatCapVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
126
- vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
127
- bool isEnd = vertexInfo.isEnd;
124
+ `),d.pathCapType){case 1:case 2:m.code.add(n`
125
+ ExtrudedVertex evaluateFlatCapVertex(PathVertexDescriptor vertexDescriptor, ExtrusionFrame frame) {
126
+ vec2 profileVertex = pathProfileVertices[vertexDescriptor.sourceIndex];
127
+ bool isEnd = vertexDescriptor.isEnd;
128
128
  float normalOffset = isEnd ? 1. : -1.;
129
- float profilePlaneOffset = ${f(2===x.pathCapType,l`isEnd ? 0.5 : -0.5`,l`0.0`)};
129
+ float profilePlaneOffset = ${s(2===d.pathCapType,n`isEnd ? 0.5 : -0.5`,n`0.0`)};
130
130
  vec2 normal = vec2(0.);
131
131
 
132
132
  return ExtrudedVertex(
@@ -140,11 +140,11 @@ return vec2(1., 0.);
140
140
  true
141
141
  );
142
142
  }
143
- `);break;case 3:m.uniforms.add(new n("pathProfilePoles",g,e=>e.profile.poles.flatMap(({position:e,normal:t})=>[...e,...t??c]),{supportsNaN:!0}),new p("pathProfilePoleIndices",h,e=>e.profile.poleIndices)),m.include(r),m.constants.add("pathVertexTypeRoundCapPole","uint",3),m.constants.add("pathVertexTypeRoundCapInnerProfile","uint",4),m.constants.add("pathNumRoundCapExtrusionSubdivisions","float",t),m.code.add(l`ExtrudedVertex evaluateRoundCapPoleVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
144
- bool isEnd = vertexInfo.isEnd;
143
+ `);break;case 3:m.uniforms.add(new i("pathProfilePoles",g,e=>e.profile.poles.flatMap(({position:e,normal:t})=>[...e,...t??x]),{supportsNaN:!0}),new p("pathProfilePoleIndices",h,e=>e.profile.poleIndices)),m.include(o),m.constants.add("pathNumRoundCapExtrusionSubdivisions","float",t),m.code.add(n`ExtrudedVertex evaluateRoundCapPoleVertex(PathVertexDescriptor vertexDescriptor, ExtrusionFrame frame) {
144
+ bool isEnd = vertexDescriptor.isEnd;
145
145
  float capSign = isEnd ? 1. : -1.;
146
146
  float offsetScale = capSign * 0.5;
147
- vec4 pole = pathProfilePoles[vertexInfo.sourceIndex];
147
+ vec4 pole = pathProfilePoles[vertexDescriptor.sourceIndex];
148
148
  vec2 polePosition = pole.xy;
149
149
  bool hasPoleNormal = !isnan(pole.z);
150
150
  vec2 poleNormal = hasPoleNormal ? pole.zw : vec2(0.);
@@ -160,20 +160,20 @@ normalOffset,
160
160
  true
161
161
  );
162
162
  }
163
- ExtrudedVertex evaluateRoundCapInnerVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
164
- bool isEnd = vertexInfo.isEnd;
163
+ ExtrudedVertex evaluateRoundCapInnerVertex(PathVertexDescriptor vertexDescriptor, ExtrusionFrame frame) {
164
+ bool isEnd = vertexDescriptor.isEnd;
165
165
  float capSign = isEnd ? 1. : -1.;
166
166
  float offsetScale = capSign * 0.5;
167
- float subdivision = vertexInfo.subdivision;
167
+ float subdivision = vertexDescriptor.subdivision;
168
168
  float t = 1. - (subdivision + 1.) / pathNumRoundCapExtrusionSubdivisions;
169
169
  float theta = t * HALF_PI;
170
170
  float t1 = sin(theta);
171
171
  float t2 = cos(theta);
172
- int poleIndex = pathProfilePoleIndices[vertexInfo.sourceIndex];
172
+ int poleIndex = pathProfilePoleIndices[vertexDescriptor.sourceIndex];
173
173
  vec4 pole = pathProfilePoles[poleIndex];
174
174
  vec2 polePosition = pole.xy;
175
175
  bool hasPoleNormal = !isnan(pole.z);
176
- vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
176
+ vec2 profileVertex = pathProfileVertices[vertexDescriptor.sourceIndex];
177
177
  vec2 poleOffsetScaled = (profileVertex - polePosition) * t1;
178
178
  vec2 poleVertex = poleOffsetScaled + polePosition;
179
179
  vec2 profileNormal = hasPoleNormal
@@ -190,31 +190,31 @@ offsetScale * t2,
190
190
  normalOffset,
191
191
  true
192
192
  );
193
- }`)}m.code.add(l`
193
+ }`)}m.code.add(n`
194
194
  ExtrudedVertex evaluateVertex() {
195
- PathVertexInfo vertexInfo = decodePathVertexInfo();
195
+ PathVertexDescriptor vertexDescriptor = getDescriptor();
196
196
  ExtrusionFrame frame = ExtrusionFrame(
197
197
  getFrameUp(),
198
198
  getFrameRight()
199
199
  );
200
200
 
201
- switch (vertexInfo.type) {
201
+ switch (vertexDescriptor.type) {
202
202
  case pathVertexTypeJoin:
203
- return evaluateJoinVertex(vertexInfo, frame);
203
+ return evaluateJoinVertex(vertexDescriptor, frame);
204
204
 
205
205
  case pathVertexTypeCapConnectingProfile:
206
- return evaluateConnectingVertex(vertexInfo, frame);
206
+ return evaluateConnectingVertex(vertexDescriptor, frame);
207
207
 
208
- ${f(1===x.pathCapType||2===x.pathCapType,l`
209
- case pathVertexTypeFlatCapProfile:
210
- return evaluateFlatCapVertex(vertexInfo, frame);
208
+ ${s(1===d.pathCapType||2===d.pathCapType,n`
209
+ case pathVertexTypeCapProfile:
210
+ return evaluateFlatCapVertex(vertexDescriptor, frame);
211
211
  `)}
212
212
 
213
- ${f(3===x.pathCapType,l`
214
- case pathVertexTypeRoundCapPole:
215
- return evaluateRoundCapPoleVertex(vertexInfo, frame);
213
+ ${s(3===d.pathCapType,n`
214
+ case pathVertexTypeCapProfile:
215
+ return evaluateRoundCapPoleVertex(vertexDescriptor, frame);
216
216
  case pathVertexTypeRoundCapInnerProfile:
217
- return evaluateRoundCapInnerVertex(vertexInfo, frame);
217
+ return evaluateRoundCapInnerVertex(vertexDescriptor, frame);
218
218
  `)}
219
219
 
220
220
  default:
@@ -230,4 +230,4 @@ true
230
230
  );
231
231
  }
232
232
  }
233
- `)}const c=e(NaN,NaN);export{x as PathEvaluate};
233
+ `)}const x=e(NaN,NaN);export{d as PathEvaluate};
@@ -1,19 +1,47 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{glsl as t}from"../../shaderModules/glsl.js";import{pathVertexInfoSourceIndexShift as e,pathVertexInfoSourceIndexMask as n,pathVertexInfoSubdivisionShift as a,pathVertexInfoSubdivisionMask as o,pathVertexInfoTypeShift as i,pathVertexInfoTypeMask as d,pathVertexInfoCapSideShift as s,pathVertexInfoCapSideMask as r}from"../../../lib/PathVertexInfo.js";function p(p){const{attributes:f,vertex:h}=p;f.add("pathVertexInfo","uint"),h.constants.add("pathVertexInfoSourceIndexShift","uint",e),h.constants.add("pathVertexInfoSourceIndexMask","uint",n),h.constants.add("pathVertexInfoSubdivisionShift","uint",a),h.constants.add("pathVertexInfoSubdivisionMask","uint",o),h.constants.add("pathVertexInfoTypeShift","uint",i),h.constants.add("pathVertexInfoTypeMask","uint",d),h.constants.add("pathVertexInfoCapSideShift","uint",s),h.constants.add("pathVertexInfoCapSideMask","uint",r),h.constants.add("pathVertexCapSideEnd","uint",1),h.code.add(t`struct PathVertexInfo {
3
- uint sourceIndex;
4
- float subdivision;
5
- uint type;
6
- bool isEnd;
7
- };
8
- PathVertexInfo decodePathVertexInfo() {
9
- uint sourceIndex = (pathVertexInfo >> pathVertexInfoSourceIndexShift) & pathVertexInfoSourceIndexMask;
10
- uint subdivision = (pathVertexInfo >> pathVertexInfoSubdivisionShift) & pathVertexInfoSubdivisionMask;
11
- uint type = (pathVertexInfo >> pathVertexInfoTypeShift) & pathVertexInfoTypeMask;
12
- uint capSide = (pathVertexInfo >> pathVertexInfoCapSideShift) & pathVertexInfoCapSideMask;
13
- return PathVertexInfo(
14
- sourceIndex,
15
- float(subdivision),
16
- type,
17
- capSide == pathVertexCapSideEnd
18
- );
19
- }`)}export{p as PathVertexInfo};
2
+ import{If as t,glsl as e}from"../../shaderModules/glsl.js";import{sourceIndexMask as a,descriptorDataShift as r,descriptorDataMask as i,descriptorTypeShift as n,descriptorCapSideShift as p,descriptorCapSubdivisionMask as s,descriptorShift as o,frameIndexMask as d}from"../../../lib/PathVertexInfo.js";function c(c,h){const{attributes:x,vertex:u}=c;x.add("pathVertexInfo","uint"),u.constants.add("pathVertexDescriptorSourceIndexMask","uint",a),u.constants.add("pathVertexDescriptorDataShift","uint",r),u.constants.add("pathVertexDescriptorDataMask","uint",i),u.constants.add("pathVertexDescriptorTypeShift","uint",n),u.constants.add("pathVertexDescriptorCapSideShift","uint",p),u.constants.add("pathVertexDescriptorCapSubdivisionMask","uint",s),u.constants.add("pathVertexInfoDescriptorShift","uint",o),u.constants.add("pathVertexInfoFrameIndexMask","uint",d),u.constants.add("pathVertexCapSideEnd","uint",1),u.constants.add("pathVertexTypeJoin","uint",0),u.constants.add("pathVertexTypeCapConnectingProfile","uint",1),u.constants.add("pathVertexTypeCapProfile","uint",2),3===h.pathCapType&&u.constants.add("pathVertexTypeRoundCapInnerProfile","uint",3),u.code.add(e`
3
+ struct PathVertexDescriptor {
4
+ uint sourceIndex;
5
+ float subdivision;
6
+ uint type;
7
+ bool isEnd;
8
+ };
9
+
10
+ uint getFrameIndex() {
11
+ return pathVertexInfo & pathVertexInfoFrameIndexMask;
12
+ }
13
+
14
+ PathVertexDescriptor getDescriptor() {
15
+ uint descriptor = pathVertexInfo >> pathVertexInfoDescriptorShift;
16
+ uint sourceIndex = descriptor & pathVertexDescriptorSourceIndexMask;
17
+ uint descriptorData = (descriptor >> pathVertexDescriptorDataShift) & pathVertexDescriptorDataMask;
18
+ uint type = descriptor >> pathVertexDescriptorTypeShift;
19
+ float subdivision = 0.;
20
+ bool isEnd = false;
21
+
22
+ switch (type) {
23
+ case pathVertexTypeJoin:
24
+ subdivision = float(descriptorData);
25
+ break;
26
+
27
+ ${t(3===h.pathCapType,e`
28
+ case pathVertexTypeRoundCapInnerProfile:
29
+ subdivision = float(descriptorData & pathVertexDescriptorCapSubdivisionMask);
30
+ `)}
31
+ case pathVertexTypeCapConnectingProfile:
32
+ ${t(0!==h.pathCapType,e`
33
+ case pathVertexTypeCapProfile:
34
+ `)}
35
+ isEnd = (descriptorData >> pathVertexDescriptorCapSideShift) == pathVertexCapSideEnd;
36
+ break;
37
+
38
+ }
39
+
40
+ return PathVertexDescriptor(
41
+ sourceIndex,
42
+ subdivision,
43
+ type,
44
+ isEnd
45
+ );
46
+ }
47
+ `)}export{c as PathVertexInfo};
@@ -1,15 +1,15 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{fromValues as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{TextureBackedBufferModule as t}from"../TextureBackedBuffer.glsl.js";import{PathEvaluate as r}from"./PathEvaluate.glsl.js";import{PiUtils as o}from"../shading/PiUtils.glsl.js";import{Float2PassUniform as i}from"../../shaderModules/Float2PassUniform.js";import{Float3PassUniform as a}from"../../shaderModules/Float3PassUniform.js";import{Float4PassUniform as l}from"../../shaderModules/Float4PassUniform.js";import{Float4sPassUniform as s}from"../../shaderModules/Float4sPassUniform.js";import{FloatPassUniform as v}from"../../shaderModules/FloatPassUniform.js";import{FloatsPassUniform as c}from"../../shaderModules/FloatsPassUniform.js";import{glsl as u,If as n}from"../../shaderModules/glsl.js";import{Texture2DUintDrawUniform as f}from"../../shaderModules/Texture2DUintDrawUniform.js";import{circleProfiles as d}from"../../../lib/PathProfile.js";import{getTextureLayout as p}from"../../../materials/PathLayouts.js";import{VisualVariablePassParameters as m,vvColorNumber as x}from"../../../materials/VisualVariablePassParameters.js";const g=8;function h(e,d){const{attributes:m,vertex:h}=e,y=new f("componentTextureBuffer",e=>e.textureBuffer),V=new t({layout:p(d),itemIndexAttribute:"textureElementIndex",bufferUniform:y});e.include(V.TextureBackedBufferModule,d),m.add("textureElementIndex","uint"),h.uniforms.add(new i("size",e=>e.size));const{hasVVSize:b,hasVVColor:z,hasVVOpacity:O}=d;b?(h.uniforms.add(new a("vvSizeMinSize",e=>e.vvSize.minSize),new a("vvSizeMaxSize",e=>e.vvSize.maxSize),new a("vvSizeOffset",e=>e.vvSize.offset),new a("vvSizeFactor",e=>e.vvSize.factor),new a("vvSizeFallback",e=>e.vvSize.fallback)),h.code.add(u`
2
+ import{fromValues as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{TextureBackedBufferModule as t}from"../TextureBackedBuffer.glsl.js";import{PathEvaluate as r}from"./PathEvaluate.glsl.js";import{PiUtils as o}from"../shading/PiUtils.glsl.js";import{Float2PassUniform as i}from"../../shaderModules/Float2PassUniform.js";import{Float3PassUniform as a}from"../../shaderModules/Float3PassUniform.js";import{Float4PassUniform as l}from"../../shaderModules/Float4PassUniform.js";import{Float4sPassUniform as s}from"../../shaderModules/Float4sPassUniform.js";import{FloatPassUniform as v}from"../../shaderModules/FloatPassUniform.js";import{FloatsPassUniform as c}from"../../shaderModules/FloatsPassUniform.js";import{glsl as n,If as u}from"../../shaderModules/glsl.js";import{Texture2DUintDrawUniform as f}from"../../shaderModules/Texture2DUintDrawUniform.js";import{circleProfiles as d}from"../../../lib/PathProfile.js";import{getTextureLayout as p}from"../../../materials/PathLayouts.js";import{VisualVariablePassParameters as m,vvColorNumber as x}from"../../../materials/VisualVariablePassParameters.js";const g=8;function h(e,d){const{vertex:m}=e,h=new f("componentTextureBuffer",e=>e.textureBuffer),y=new t({layout:p(d),itemIndexExpression:"getFrameIndex()",bufferUniform:h}).createBuilder(e,d);m.uniforms.add(new i("size",e=>e.size));const{hasVVSize:V,hasVVColor:b,hasVVOpacity:z}=d;V?(m.uniforms.add(new a("vvSizeMinSize",e=>e.vvSize.minSize),new a("vvSizeMaxSize",e=>e.vvSize.maxSize),new a("vvSizeOffset",e=>e.vvSize.offset),new a("vvSizeFactor",e=>e.vvSize.factor),new a("vvSizeFallback",e=>e.vvSize.fallback)),m.code.add(n`
3
3
  vec2 getSize() {
4
- float value = ${V.getTextureAttribute("sizeFeatureAttribute")};
4
+ float value = ${y.getTextureAttribute("sizeFeatureAttribute")};
5
5
  if (isnan(value)) {
6
6
  return vvSizeFallback.xz;
7
7
  }
8
8
  return size * clamp(vvSizeOffset + value * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize).xz;
9
9
  }
10
- `)):h.code.add(u`vec2 getSize(){
10
+ `)):m.code.add(n`vec2 getSize(){
11
11
  return size;
12
- }`),O?(h.constants.add("vvOpacityNumber","int",g),h.uniforms.add(new c("vvOpacityValues",g,e=>e.vvOpacity.values),new c("vvOpacityOpacities",g,e=>e.vvOpacity.opacityValues),new v("vvOpacityFallback",e=>e.vvOpacity.fallback,{supportsNaN:!0})),h.code.add(u`
12
+ }`),z?(m.constants.add("vvOpacityNumber","int",g),m.uniforms.add(new c("vvOpacityValues",g,e=>e.vvOpacity.values),new c("vvOpacityOpacities",g,e=>e.vvOpacity.opacityValues),new v("vvOpacityFallback",e=>e.vvOpacity.fallback,{supportsNaN:!0})),m.code.add(n`
13
13
  vec4 applyOpacity(vec4 color) {
14
14
  // if we encounter NaN in the color it means the color is in the fallback case where the symbol color
15
15
  // is not defined and there is no valid color visual variable override. In this case just return a fully
@@ -18,11 +18,11 @@ return size;
18
18
  return vec4(0);
19
19
  }
20
20
 
21
- float value = ${V.getTextureAttribute("opacityFeatureAttribute")};
21
+ float value = ${y.getTextureAttribute("opacityFeatureAttribute")};
22
22
 
23
23
  if (isnan(value)) {
24
24
  // If there is a color vv then it will already have taken care of applying the fallback
25
- return ${n(z,"color","vec4(color.rgb, vvOpacityFallback)")};
25
+ return ${u(b,"color","vec4(color.rgb, vvOpacityFallback)")};
26
26
  }
27
27
 
28
28
  if (value <= vvOpacityValues[0]) {
@@ -38,11 +38,11 @@ return size;
38
38
 
39
39
  return vec4( color.rgb, vvOpacityOpacities[vvOpacityNumber - 1]);
40
40
  }
41
- `)):h.code.add(u`vec4 applyOpacity(vec4 color){
41
+ `)):m.code.add(n`vec4 applyOpacity(vec4 color){
42
42
  return color;
43
- }`),z?(h.constants.add("vvColorNumber","int",x),h.uniforms.add(new c("vvColorValues",x,e=>e.vvColor.values),new s("vvColorColors",x,e=>e.vvColor.colors),new l("vvColorFallback",e=>e.vvColor.fallback)),h.code.add(u`
43
+ }`),b?(m.constants.add("vvColorNumber","int",x),m.uniforms.add(new c("vvColorValues",x,e=>e.vvColor.values),new s("vvColorColors",x,e=>e.vvColor.colors),new l("vvColorFallback",e=>e.vvColor.fallback)),m.code.add(n`
44
44
  vec4 getColor() {
45
- float value = ${V.getTextureAttribute("colorFeatureAttribute")};
45
+ float value = ${y.getTextureAttribute("colorFeatureAttribute")};
46
46
  if (isnan(value)) {
47
47
  return applyOpacity(vvColorFallback);
48
48
  }
@@ -60,48 +60,48 @@ return color;
60
60
 
61
61
  return applyOpacity(vvColorColors[vvColorNumber - 1]);
62
62
  }
63
- `)):h.code.add(u`vec4 getColor(){
63
+ `)):m.code.add(n`vec4 getColor(){
64
64
  return applyOpacity(vec4(1, 1, 1, 1));
65
- }`),h.include(o),h.code.add(u`
65
+ }`),m.include(o),m.code.add(n`
66
66
  vec3 decompressAxis(vec2 axis) {
67
67
  float z = 1.0 - abs(axis.x) - abs(axis.y);
68
68
  return normalize(vec3(axis + sign(axis) * min(z, 0.0), z));
69
69
  }
70
70
 
71
71
  float getProfileRotation() {
72
- return PI * ${V.getTextureAttribute("profileRotation")};
72
+ return PI * ${y.getTextureAttribute("profileRotation")};
73
73
  }
74
74
 
75
75
  float getMaxStretchDistance() {
76
- return ${V.getTextureAttribute("pathMaxStretchDistance")};
76
+ return ${y.getTextureAttribute("pathMaxStretchDistance")};
77
77
  }
78
78
 
79
79
  vec3 getFrameUp() {
80
- return decompressAxis(${V.getTextureAttribute("profileUp")});
80
+ return decompressAxis(${y.getTextureAttribute("profileUp")});
81
81
  }
82
82
 
83
83
  vec3 getFrameRight() {
84
- return decompressAxis(${V.getTextureAttribute("profileRight")});
84
+ return decompressAxis(${y.getTextureAttribute("profileRight")});
85
85
  }
86
- `),h.code.add(u`
86
+ `),m.code.add(n`
87
87
  vec3 getFrameRotationUp() {
88
- return ${1===d.upVectorAlignment?u`decompressAxis(${V.getTextureAttribute("pathRotationUp")})`:u`getFrameUp()`};
88
+ return ${1===d.upVectorAlignment?n`decompressAxis(${y.getTextureAttribute("pathRotationUp")})`:n`getFrameUp()`};
89
89
  }
90
- `),e.include(r,d),h.code.add(u`
90
+ `),e.include(r,d),m.code.add(n`
91
91
  vec3 calculateVPos(ExtrudedVertex extrudedVertex) {
92
92
  vec2 size = getSize();
93
- vec3 origin = ${V.getTextureAttribute("position")};
93
+ vec3 origin = ${y.getTextureAttribute("position")};
94
94
  vec3 right = extrudedVertex.frame.right;
95
95
  vec3 up = extrudedVertex.frame.up;
96
96
  vec2 profileVertex = extrudedVertex.profileVertex * size;
97
- `),h.code.add(u`if(extrudedVertex.isCap) {
97
+ `),m.code.add(n`if(extrudedVertex.isCap) {
98
98
  float positionOffsetAlongProfilePlaneNormal = extrudedVertex.capPositionOffset * size[0];
99
99
  vec3 forward = cross(up, right);
100
100
  vec3 offset = right * profileVertex.x + up * profileVertex.y + forward * positionOffsetAlongProfilePlaneNormal;
101
101
  return origin + offset;
102
102
  }
103
103
  vec2 rotationRight = extrudedVertex.rotationRight;
104
- float maxDistance = extrudedVertex.maxDistance;`),h.code.add(u`rotationRight *= size;
104
+ float maxDistance = extrudedVertex.maxDistance;`),m.code.add(n`rotationRight *= size;
105
105
  rotationRight = length(rotationRight) > 0.0 ? normalize(rotationRight) : vec2(0, 0);
106
106
  float rx = dot(profileVertex, rotationRight);
107
107
  if (abs(rx) > maxDistance) {
@@ -111,7 +111,7 @@ profileVertex = rotationRight * maxDistance * sign(rx) + rotationUp * ry;
111
111
  }
112
112
  vec3 offset = right * profileVertex.x + up * profileVertex.y;
113
113
  return origin + offset;
114
- }`),h.code.add(u`vec3 localNormal(ExtrudedVertex extrudedVertex) {
114
+ }`),m.code.add(n`vec3 localNormal(ExtrudedVertex extrudedVertex) {
115
115
  vec3 right = extrudedVertex.frame.right;
116
116
  vec3 up = extrudedVertex.frame.up;
117
117
  vec2 profileNormal = extrudedVertex.profileNormal;
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../../core/Logger.js";import{destroyMaybe as i}from"../../../../../core/maybe.js";import{watch as r,initial as s}from"../../../../../core/reactiveUtils.js";import{property as o,cast as l,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{ZEROS as d}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{RenderNodeVisualizerNode as h,getAttachmentName as a}from"./RenderNodeVisualizerNode.js";import c from"../../../../../widgets/Widget.js";import{tsx as p}from"../../../../../widgets/support/widget.js";let u=class extends c{constructor(){super(...arguments),this.clearColor=d,this.previewSize=v,this.filter=["color"],this.node=null,this.active=!0,this._previews=new Map,this._allPreviews=new Set,this._dirty=!0}castPreviewSize(e){return Math.max(e,v)}get _namedFilters(){const e=this.filter?.filter(e=>"color"!==e&&"depth"!==e);return e&&e.length>0?e:null}initialize(){this.node||(this.node=new h({view:this.view,destroyedCB:()=>{this.node=null,this.destroy()},clearColor:this.clearColor}));const e=this.node;this._updateInterval=setInterval(()=>this._updatePreviews()),this.addHandles([r(()=>this.active,i=>{this.view.stage.renderer.fboCache.debugCallback=i?(i,r)=>{if(null==i||null==r||!this.view.stage.renderView.renderingContext)return this._previews.forEach(([e])=>e.release()),void this._previews.clear();if("fbo visualizer"===i||!this._matchesFilter(i)||r&&0===r.colorAttachments.length&&null==r.depthStencilTexture)return;const{width:s,height:o}=r,l=o>this.previewSize?Math.round(s*this.previewSize/o):s,n=o>this.previewSize?this.previewSize:o;if(l/n>4)return void t.getLogger(this).warnOnce(`Skipping preview of wide ${i} FBO (${l}x${n}px)`);r.level&&(i+=` ${r.level}`);const d=e.getDownscaledFBO(r,i,this._focusedAttachment,l,n),h=null!=r.depthStencilTexture,c=this.filter?.includes("color")||!this.filter?.includes("depth"),p=this.filter?.includes("depth")||!this.filter?.includes("color");d.fbo?.colorAttachments.forEach((e,t)=>{const l=d.getAttachment(e);if(l){const n=h&&t===r.colorAttachments.length;if(n&&!p||!n&&!c)return;l.retain();const d=a(i,r,e,n),u=this._previews.get(d);u?.[0]?.release(),this._previews.set(d,[l,s,o]),this._allPreviews.add(d)}}),d.detachAllColors(),d.release(),this._dirty=!0}:null},s)])}destroy(){this.removeHandles(),this.view.stage?.renderer&&(this.view.stage.renderer.fboCache.debugCallback=null),this._removeUpdate(),this.node&&(this.node.destroyedCB=()=>{},this.node=i(this.node)),this._previews.forEach(([e])=>e.release()),this._previews.clear()}_matchesFilter(e){return this._namedFilters?.some(t=>e.includes(t))??!0}_updatePreviews(){if(!this._dirty)return;this._dirty=!1,this.renderNow();const e=this._focusedAttachment&&Array.from(this._previews.keys()).includes(this._focusedAttachment);this._focusedAttachment&&!e&&this._deselectFocusFBO(),this._allPreviews.forEach((e,t)=>{const i=this._getElement(t);if(!i)return;i.getContext("2d").clearRect(0,0,i.width,i.height)}),this._previews.forEach(([e,t,i],r)=>{const s=this._getElement(r);if(!s)return;const o=i>this.previewSize?Math.round(t*this.previewSize/i):t,l=i>this.previewSize?this.previewSize:i;s.style.width=`${o}px`,s.style.height=`${l}px`;const n=s.width,d=s.height,h=this._getElement(`label-${r}`);h&&(h.innerText=`${r} (${t}x${i})`);const a=this.node?.getPreviewContent(n,d,e,r),c=s.getContext("2d");c.clearRect(0,0,n,d),a&&c.putImageData(a,0,0)})}_getElement(e){return document.querySelector("arcgis-scene")?.shadowRoot?.getElementById(e)??document.getElementById(e)}_fboPreviewStyle(e){return{width:"1px",height:"1px",background:e?"rgba(0, 0, 0, 0.5)":"rgba(0, 0, 0, 0)",transform:"rotateX(180deg)"}}_removeUpdate(){null!=this._updateInterval&&(clearInterval(this._updateInterval),this._updateInterval=null)}_selectFocusFBO(e){this._focusedAttachment=e,this.view.stage.renderView.requestRender()}_deselectFocusFBO(){this._focusedAttachment=null,this.node?.clearFocusedFBO(),this.view.stage.renderView.requestRender()}_renderFBOPreviews(){const e=this._allPreviews.size>0?Array.from(this._allPreviews.keys()).sort().map(e=>this._renderFBOPreview(e)):p("div",null);return p("div",{styles:{display:"flex",flexFlow:"row wrap",justifyContent:"flex-end",gap:"2px"}},e)}_renderFBOPreview(e){const t=this._previews.has(e);return p("div",{key:e,styles:{display:"flex",flexFlow:"column nowrap",alignItems:"center"},onclick:()=>this._selectFocusFBO(e)},p("canvas",{id:e,styles:this._fboPreviewStyle(t)}),p("div",{id:e,styles:{display:"flex",justifyContent:"center"}},p("p",{id:`label-${e}`,styles:{fontSize:"12px",color:"white",margin:"1px",textShadow:"-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000"}})))}render(){return p("div",{class:"esri-widget debug-widget",styles:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-end",background:"rgba(255, 255, 255, 0)"}},this._renderFBOPreviews(),p("button",{type:"button",onclick:()=>this._deselectFocusFBO()},"Reset focus"))}};e([o({constructOnly:!0})],u.prototype,"view",void 0),e([o({constructOnly:!0})],u.prototype,"clearColor",void 0),e([o()],u.prototype,"previewSize",void 0),e([l("previewSize")],u.prototype,"castPreviewSize",null),e([o()],u.prototype,"filter",void 0),e([o()],u.prototype,"_namedFilters",null),e([o()],u.prototype,"node",void 0),e([o()],u.prototype,"active",void 0),u=e([n("esri.views.3d.webgl-engine.effects.debug.RenderNodeVisualizer")],u);const v=140;export{u as RenderNodeVisualizer,v as minimumPreviewSize};
2
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Logger.js";import{destroyMaybe as i}from"../../../../../core/maybe.js";import{watch as r,initial as s}from"../../../../../core/reactiveUtils.js";import{property as o,cast as l,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{ZEROS as d}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{RenderNodeVisualizerNode as h,getAttachmentName as a}from"./RenderNodeVisualizerNode.js";import c from"../../../../../widgets/Widget.js";import{tsx as p}from"../../../../../widgets/support/widget.js";let u=class extends c{constructor(){super(...arguments),this.clearColor=d,this.previewSize=w,this.filter=["color"],this.node=null,this.active=!0,this._previews=new Map,this._allPreviews=new Set,this._dirty=!0}castPreviewSize(e){return Math.max(e,w)}get _namedFilters(){const e=this.filter?.filter(e=>"color"!==e&&"depth"!==e);return e&&e.length>0?e:null}initialize(){this.node||(this.node=new h({view:this.view,destroyedCB:()=>{this.node=null,this.destroy()},clearColor:this.clearColor}));const e=this.node;this._updateInterval=setInterval(()=>this._updatePreviews()),this.addHandles([r(()=>this.active,i=>{this.view.stage.renderer.fboCache.debugCallback=i?(i,r)=>{if(null==i||null==r||!this.view.stage.renderView.renderingContext)return this._previews.forEach(([e])=>e.release()),void this._previews.clear();if("fbo visualizer"===i||!this._matchesFilter(i)||r&&0===r.colorAttachments.length&&null==r.depthStencilTexture)return;const{width:s,height:o}=r,l=o>this.previewSize?Math.round(s*this.previewSize/o):s,n=o>this.previewSize?this.previewSize:o;if(l/n>4)return void t.getLogger(this).warnOnce(`Skipping preview of wide ${i} FBO (${l}x${n}px)`);r.level&&(i+=` ${r.level}`);const d=e.getDownscaledFBO(r,i,l,n,this._focusedAttachment,this._focusedAttachmentType),h=null!=r.depthStencilTexture,c=this.filter?.includes("color")||!this.filter?.includes("depth"),p=this.filter?.includes("depth")||!this.filter?.includes("color");d.fbo?.colorAttachments.forEach((e,t)=>{const l=d.getAttachment(e);if(l){const n=h&&t===r.colorAttachments.length;if(n&&!p||!n&&!c)return;l.retain();const d=a(i,r,e,n),u=this._previews.get(d);u?.[0]?.release(),this._previews.set(d,[l,s,o]),this._allPreviews.add(d)}}),d.detachAllColors(),d.release(),this._dirty=!0}:null},s)])}destroy(){this.removeHandles(),this.view.stage?.renderer&&(this.view.stage.renderer.fboCache.debugCallback=null),this._removeUpdate(),this.node&&(this.node.destroyedCB=()=>{},this.node=i(this.node)),this._previews.forEach(([e])=>e.release()),this._previews.clear()}_matchesFilter(e){return this._namedFilters?.some(t=>e.includes(t))??!0}_updatePreviews(){if(!this._dirty)return;this._dirty=!1,this.renderNow();const e=this._focusedAttachment&&Array.from(this._previews.keys()).includes(this._focusedAttachment);this._focusedAttachment&&!e&&this._deselectFocusFBO(),this._allPreviews.forEach((e,t)=>{const i=this._getElement(t);if(!i)return;i.getContext("2d").clearRect(0,0,i.width,i.height)}),this._previews.forEach(([e,t,i],r)=>{const s=this._getElement(r);if(!s)return;const o=i>this.previewSize?Math.round(t*this.previewSize/i):t,l=i>this.previewSize?this.previewSize:i;s.style.width=`${o}px`,s.style.height=`${l}px`;const n=s.width,d=s.height,h=this._getElement(`label-${r}`);h&&(h.innerText=`${r} (${t}x${i})`);const a=this.node?.getPreviewContent(n,d,e,r),c=s.getContext("2d");c.clearRect(0,0,n,d),a&&c.putImageData(a,0,0)})}_getElement(e){return document.querySelector("arcgis-scene")?.shadowRoot?.getElementById(e)??document.getElementById(e)}_fboPreviewStyle(e){return{width:"1px",height:"1px",background:e?"rgba(0, 0, 0, 0.5)":"rgba(0, 0, 0, 0)",transform:"rotateX(180deg)"}}_removeUpdate(){null!=this._updateInterval&&(clearInterval(this._updateInterval),this._updateInterval=null)}_selectFocusFBO(e,t){this._focusedAttachment=e,this._focusedAttachmentType=0===t?null:9,this.view.stage.renderView.requestRender()}_deselectFocusFBO(){this._focusedAttachment=null,this.node?.clearFocusedFBO(),this.view.stage.renderView.requestRender()}_renderFBOPreviews(){const e=this._allPreviews.size>0?Array.from(this._allPreviews.keys()).sort().map(e=>this._renderFBOPreview(e)):p("div",null);return p("div",{styles:{display:"flex",flexFlow:"row wrap",justifyContent:"flex-end",gap:"2px"}},e)}_renderFBOPreview(e){const t=this._previews.has(e);return p("div",{key:e,styles:{display:"flex",flexFlow:"column nowrap",alignItems:"center"},onmousedown:t=>this._selectFocusFBO(e,t.button)},p("canvas",{id:e,styles:this._fboPreviewStyle(t)}),p("div",{id:e,styles:{display:"flex",justifyContent:"center"}},p("p",{id:`label-${e}`,styles:{fontSize:"12px",color:"white",margin:"1px",textShadow:"-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000"}})))}render(){return p("div",{class:"esri-widget debug-widget",styles:{display:"flex",flexFlow:"column nowrap",alignItems:"flex-end",background:"rgba(255, 255, 255, 0)"}},this._renderFBOPreviews(),p("button",{type:"button",onclick:()=>this._deselectFocusFBO()},"Reset focus"))}};e([o({constructOnly:!0})],u.prototype,"view",void 0),e([o({constructOnly:!0})],u.prototype,"clearColor",void 0),e([o()],u.prototype,"previewSize",void 0),e([l("previewSize")],u.prototype,"castPreviewSize",null),e([o()],u.prototype,"filter",void 0),e([o()],u.prototype,"_namedFilters",null),e([o()],u.prototype,"node",void 0),e([o()],u.prototype,"active",void 0),u=e([n("esri.views.3d.webgl-engine.effects.debug.RenderNodeVisualizer")],u);const w=140;export{u as RenderNodeVisualizer,w as minimumPreviewSize};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{releaseMaybe as r}from"../../../../../core/maybe.js";import{property as t,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{ZEROS as n}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{RenderNodeOutput as i}from"../../../webgl.js";import s from"../../../webgl/RenderNode.js";import{If as a,glsl as c}from"../../core/shaderModules/glsl.js";import{Pos2Locations as u}from"../../lib/DefaultVertexBufferLayouts.js";import{floatBlendReductionFactor as l}from"../../shaders/oitResolution.glsl.js";import{checkWebGLError as h}from"../../../../webgl/checkWebGLError.js";import{ColorAttachment0 as p,SizedPixelFormat as f,DataType as d}from"../../../../webgl/enums.js";let m=class extends s{constructor(e){super(e),this.destroyedCB=null,this.produces=i.FINAL,this.consumes={required:[i.FINAL]},this.clearColor=n,this._focusedFBOType=7,this._programs=new Map}destroy(){this._programs.clear(),this.destroyedCB()}render(e){const r=e.find(({name:e})=>e===i.FINAL);if(!this._focusedTexture)return r;const t=this.renderingContext,o=t.boundFramebuffer;t.bindFramebuffer(r.fbo),t.setClearColor(0,0,0,0),t.clear(16384);const n=this._focusedTexture.attachment,s=[v(n)],a=this._ensureProgram(t,!1,s);return t.useProgram(a),t.bindTexture(n,0),a.setUniform1i("colorTex0",0),a.setUniform1i("inputType",this._focusedFBOType),3===this._focusedFBOType&&a.setUniform2fv("nearFar",this.camera.nearFar),t.setDrawBuffers([p]),t.screen.draw(),t.bindFramebuffer(o),r}getDownscaledFBO(e,r,t,o,n){if(t?.startsWith(`${r}\n`)??!1){const r=1/2**e.level;o=e.width*r,n=e.height*r}const i="linear depth"===r||r.includes("shadow"),s="overlay highlight"===r||"highlights"===r||"highlight mix"===r,a="highlight coverage"===r,c=e.colorTexture?.descriptor,u=c?.internalFormat,l=[],d=new Array,m=new Array;e.colorAttachments.forEach((r,t)=>{const o=e.getColorTexture(r);if(o){const e=v(o);l.push(e);const{descriptor:r}=o;"float"!==e||r.hasMipmap||r.isImmutable||(o.generateMipmap(),d[t]=!0)}if(t>0){const e=o?.descriptor.internalFormat;return void(e===f.RGBA8&&(o?.debugName?.indexOf("emissive")??-1)>=0?m.push(8):m.push(F(e)))}m.push(i?0:s?1:a?2:F(u))});const g=this.renderingContext,{depthStencilTexture:x}=e,b=this._ensureProgram(g,null!=x,l,e.level),$=this.fboCache.acquire(o,n,"fbo visualizer");g.useProgram(b);const C=g.boundFramebuffer;g.bindFramebuffer($.fbo);const R=[];e.colorAttachments.forEach((r,t)=>{const o=`colorTex${t.toFixed()}`;g.bindTexture(e.getColorTexture(r),t),b.setUniform1i(o,t),t>0&&$.acquireColor(p+t,5,"fbo visualizer"),R.push(r)});const y=x?.descriptor.linearFilterDepth??!1;if(x){const r=e.colorAttachments.length;x.setShadowFiltering(!1),g.bindTexture(x,r),b.setUniform1i("depthTex",r);const t=p+r;t>p&&$.acquireColor(t,5,"fbo visualizer"),R.push(t)}g.gl.drawBuffers(R),h(g.gl);const w=g.getViewport();return g.setViewport(0,0,o,n),g.setClearColor(0,0,0,0),g.clear(16384),g.setBlendingEnabled(!0),g.setBlendFunction(1,771),b.setUniform1iv("inputTypes",m.length>0?m:[7]),b.setUniform2fv("nearFar",this.camera.nearFar),g.screen.draw(),h(g.gl),g.bindFramebuffer(C),g.setViewport(w.x,w.y,w.width,w.height),e.colorAttachments.forEach((o,n)=>{const i=e.getColorTexture(o);d[n]&&i?.clearMipmap(),t===T(r,e,o,!1)&&(this._focusedTexture?.release(),this._focusedTexture=$.getAttachment(o),this._focusedTexture?.retain(),this._focusedFBOType=m[n])}),x&&x.setShadowFiltering(y),$}clearFocusedFBO(){this._focusedTexture=r(this._focusedTexture)}getPreviewContent(e,r,t,o){const n=this.renderingContext,i=o.includes("\ndepth"),s=this.fboCache.acquire(e,r,"fbo visualizer"),a=n.boundFramebuffer;n.bindFramebuffer(s?.fbo);const c=n.getViewport();n.setViewport(0,0,e,r),n.setClearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),n.clear(16384),n.setBlendingEnabled(!0),n.setBlendFunction(1,771);const u=t.attachment,l=this._ensureProgram(n,!1,[v(u)]);n.useProgram(l),n.bindTexture(u,0),l.setUniform1i("colorTex0",0),l.setUniform1iv("inputTypes",[i||u.descriptor.internalFormat!==f.RGBA16F?7:5]),n.screen.draw();const p=new ImageData(new Uint8ClampedArray(e*r*4),e,r);return n.gl.readPixels(0,0,e,r,6408,d.UNSIGNED_BYTE,new Uint8Array(p.data.buffer)),h(n.gl),n.bindFramebuffer(a),n.setViewport(c.x,c.y,c.width,c.height),s?.release(),p}_ensureProgram(e,r,t,o=0){const n=x({hasDepthAttachment:r,colorSamplerTypes:t}),i=this._programs.get(n);if(i)return i;const s="#version 300 es\n in vec2 position;\n out vec2 uv;\n\n void main() {\n gl_Position = vec4(position, 0.0, 1.0);\n uv = position * 0.5 + vec2(0.5);\n }",h=e=>{let r="";for(let t=0;t<e.length;++t){const o=e[t];r+=`layout(location = ${c.int(t)}) out vec4 fragColor${c.int(t)};\n uniform ${g(o)} colorTex${c.int(t)};`}return r},p=e=>e.reduce((e,r,t)=>e+`{\n int inputType = inputTypes[${t}];\n if (inputType == ${3..toFixed()}) {\n fragColor${t} = vec4(vec3(texture(colorTex${t}, uv, ${o}.0).r), 1.0);\n } else if (inputType == ${4..toFixed()}) {\n fragColor${t} = vec4(texture(colorTex${t}, uv, ${o}.0).rg, 0.0, 1.0);\n } else if (inputType == ${(0).toFixed()}) {\n float depth = 1.0 - ((-linearDepthFromTexture(colorTex${t}, uv) - nearFar[0]) / (nearFar[1] - nearFar[0]));\n fragColor${t} = vec4(vec3(depth), depth >= 0.999 ? 0.0 : 1.0);\n } else if (inputType == ${5..toFixed()}) {\n fragColor${t} = vec4(texture(colorTex${t}, uv, ${o}.0).rgb, 1.0);\n } else if (inputType == ${1..toFixed()}) {\n fragColor${t} = vec4(texture(colorTex${t}, uv, ${o}.0)) * 255.0;\n fragColor${t} = vec4(fragColor${t}.rgb / fragColor${t}.a, fragColor${t}.a);\n } else if(inputType == ${2..toFixed()}) {\n vec2 texDim = vec2(textureSize(colorTex${t}, 0));\n ivec2 iuv = ivec2(uv * texDim);\n uvec2 hh = uvec2(texelFetch(colorTex${t}, iuv, 0).rg);\n fragColor${t} = vec4(\n ((hh & uvec2(0x55u)) != uvec2(0u)) ? 1.0 : 0.0,\n ((hh & uvec2(0xaau)) != uvec2(0u)) ? 1.0 : 0.0,\n 0.0,\n 1.0);\n } else if(inputType == ${8..toFixed()}) {\n fragColor${t} = vec4(texture(colorTex${t}, uv, ${o}.0));\n fragColor${t}.rgb *= ${l.toFixed(1)};\n } else {\n fragColor${t} = vec4(texture(colorTex${t}, uv, ${o}.0));\n }\n }`,""),f=t.length,d=`#version 300 es\n precision highp float;\n precision highp usampler2D;\n\n in vec2 uv;\n ${h(t)}\n ${a(r,`layout(location = ${c.int(f)}) out vec4 fragDepth;\n uniform sampler2D depthTex;`)}\n\n uniform int inputTypes[${t.length||1}];\n uniform vec2 nearFar;\n\n // Factors to convert rgba back to float\n const vec4 RGBA_2_FLOAT_FACTORS = vec4(\n 255.0 / (256.0),\n 255.0 / (256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n );\n\n\n float rgbaToFloat(vec4 rgba) {\n // Convert components from 0->1 back to 0->255 and then add the components together with their corresponding\n // fixed point factors, i.e. (256^1, 256^2, 256^3, 256^4)\n return dot(rgba, RGBA_2_FLOAT_FACTORS);\n }\n\n float linearDepthFromFloat(float depth) {\n depth = pow(depth, 0.2);\n return -(depth * (nearFar[1] - nearFar[0]) + nearFar[0]);\n }\n\n float linearDepthFromRGBA(vec4 depth) {\n return linearDepthFromFloat(rgbaToFloat(depth));\n }\n\n ${"float"===t[0]?"float linearDepthFromTexture(sampler2D depthTex, vec2 uv) {\n ivec2 iuv = ivec2(uv * vec2(textureSize(depthTex, 0)));\n return linearDepthFromRGBA(texelFetch(depthTex, iuv, 0));\n }":"float linearDepthFromTexture(usampler2D depthTex, vec2 uv) {\n ivec2 iuv = ivec2(uv * vec2(textureSize(depthTex, 0)));\n return linearDepthFromRGBA(vec4(texelFetch(depthTex, iuv, 0)) * 255.0);\n }"}\n\n void main() {\n ${p(t)}\n ${a(r,"float depth = 1.0 - pow(texture(depthTex, uv).r, 10.0);\n fragDepth = vec4(vec3(depth), depth < 0.000001 ? 0.0 : 1.0);")}\n }`,m=e.programCache.get(s,d,u);return this._programs.set(n,m),m}};function g(e){switch(e){case"float":return"sampler2D";case"uint":return"usampler2D";case"int":return"isampler2D"}}function v(e){if(!e)return"float";const{internalFormat:r}=e.descriptor;switch(r){case f.R8I:case f.R16I:case f.R32I:case f.RG8I:case f.RG16I:case f.RG32I:case f.RGB8I:case f.RGB16I:case f.RGB32I:case f.RGBA8I:case f.RGBA16I:case f.RGBA32I:return"int";case f.R8UI:case f.R16UI:case f.R32UI:case f.RG8UI:case f.RG16UI:case f.RG32UI:case f.RGB8UI:case f.RGB16UI:case f.RGB32UI:case f.RGBA8UI:case f.RGBA16UI:case f.RGBA32UI:return"uint";default:return"float"}}function x(e){const{hasDepthAttachment:r,colorSamplerTypes:t}=e;return`${r?"Depth":""}${t.reduceRight((e,r)=>e+`|C${r}`,"")}`}function F(e){switch(e){case f.R16F:case f.R32F:case f.R8:return 3;case f.RG8:return 4;case f.RGBA16F:return 5;case f.RG8UI:return 6;default:return 7}}function T(e,r,t,o){return o?`${e}\ndepth`:`${e}\n${b(r,t)}`}function b(e,r){return`${e.getColorTexture(r)?.debugName??"color"+(r-p)}`}e([t()],m.prototype,"destroyedCB",void 0),e([t()],m.prototype,"produces",void 0),e([t()],m.prototype,"consumes",void 0),e([t()],m.prototype,"clearColor",void 0),m=e([o("esri.views.3d.webgl-engine.effects.debug.RenderNodeVisualizerNode")],m);export{m as RenderNodeVisualizerNode,T as getAttachmentName};
2
+ import{__decorate as e}from"tslib";import{releaseMaybe as r}from"../../../../../core/maybe.js";import{property as t,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{ZEROS as n}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{RenderNodeOutput as i}from"../../../webgl.js";import s from"../../../webgl/RenderNode.js";import{If as a,glsl as c}from"../../core/shaderModules/glsl.js";import{Pos2Locations as u}from"../../lib/DefaultVertexBufferLayouts.js";import{floatBlendReductionFactor as l}from"../../shaders/oitResolution.glsl.js";import{checkWebGLError as h}from"../../../../webgl/checkWebGLError.js";import{ColorAttachment0 as p,SizedPixelFormat as f,DataType as d}from"../../../../webgl/enums.js";let m=class extends s{constructor(e){super(e),this.destroyedCB=null,this.produces=i.FINAL,this.consumes={required:[i.FINAL]},this.clearColor=n,this._focusedFBOType=7,this._programs=new Map}destroy(){this._programs.clear(),this.destroyedCB()}render(e){const r=e.find(({name:e})=>e===i.FINAL);if(!this._focusedTexture)return r;const t=this.renderingContext,o=t.boundFramebuffer;t.bindFramebuffer(r.fbo),t.setClearColor(0,0,0,0),t.clear(16384);const n=this._focusedTexture.attachment,s=[v(n)],a=this._ensureProgram(t,!1,s);return t.useProgram(a),t.bindTexture(n,0),a.setUniform1i("colorTex0",0),a.setUniform1i("inputType",this._focusedFBOType),3===this._focusedFBOType&&a.setUniform2fv("nearFar",this.camera.nearFar),t.setDrawBuffers([p]),t.screen.draw(),t.bindFramebuffer(o),r}getDownscaledFBO(e,r,t,o,n,i){if(n?.startsWith(`${r}\n`)??!1){const r=1/2**e.level;t=e.width*r,o=e.height*r}else i=null;const s="linear depth"===r||r.includes("shadow"),a="overlay highlight"===r||"highlights"===r||"highlight mix"===r,c="highlight coverage"===r,u=e.colorTexture?.descriptor,l=u?.internalFormat,d=[],m=new Array,g=new Array;e.colorAttachments.forEach((r,t)=>{const o=e.getColorTexture(r);if(o){const e=v(o);d.push(e);const{descriptor:r}=o;"float"!==e||r.hasMipmap||r.isImmutable||(o.generateMipmap(),m[t]=!0)}if(t>0){const e=o?.descriptor.internalFormat;return void(e===f.RGBA8&&(o?.debugName?.indexOf("emissive")??-1)>=0?g.push(8):g.push(F(e)))}g.push(s?0:a?1:c?2:i??F(l))});const x=this.renderingContext,{depthStencilTexture:$}=e,b=this._ensureProgram(x,null!=$,d,e.level),C=this.fboCache.acquire(t,o,"fbo visualizer");x.useProgram(b);const R=x.boundFramebuffer;x.bindFramebuffer(C.fbo);const y=new Array;e.colorAttachments.forEach((r,t)=>{const o=`colorTex${t.toFixed()}`;x.bindTexture(e.getColorTexture(r),t),b.setUniform1i(o,t),t>0&&C.acquireColor(p+t,5,"fbo visualizer"),y.push(r)});const w=$?.descriptor.linearFilterDepth??!1;if($){const r=e.colorAttachments.length;$.setShadowFiltering(!1),x.bindTexture($,r),b.setUniform1i("depthTex",r);const t=p+r;t>p&&C.acquireColor(t,5,"fbo visualizer"),y.push(t)}x.gl.drawBuffers(y),h(x.gl);const B=x.getViewport();return x.setViewport(0,0,t,o),x.setClearColor(0,0,0,0),x.clear(16384),x.setBlendingEnabled(!0),x.setBlendFunction(1,771),b.setUniform1iv("inputTypes",g.length>0?g:[7]),b.setUniform2fv("nearFar",this.camera.nearFar),x.screen.draw(),h(x.gl),x.bindFramebuffer(R),x.setViewport(B.x,B.y,B.width,B.height),e.colorAttachments.forEach((t,o)=>{const i=e.getColorTexture(t);m[o]&&i?.clearMipmap(),n===T(r,e,t,!1)&&(this._focusedTexture?.release(),this._focusedTexture=C.getAttachment(t),this._focusedTexture?.retain(),this._focusedFBOType=9===g[o]?F(i?.descriptor.internalFormat):g[o])}),$&&$.setShadowFiltering(w),C}clearFocusedFBO(){this._focusedTexture=r(this._focusedTexture)}getPreviewContent(e,r,t,o){const n=this.renderingContext,i=o.includes("\ndepth"),s=this.fboCache.acquire(e,r,"fbo visualizer"),a=n.boundFramebuffer;n.bindFramebuffer(s?.fbo);const c=n.getViewport();n.setViewport(0,0,e,r),n.setClearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),n.clear(16384),n.setBlendingEnabled(!0),n.setBlendFunction(1,771);const u=t.attachment,l=this._ensureProgram(n,!1,[v(u)]);n.useProgram(l),n.bindTexture(u,0),l.setUniform1i("colorTex0",0),l.setUniform1iv("inputTypes",[i||u.descriptor.internalFormat!==f.RGBA16F?7:5]),n.screen.draw();const p=new ImageData(new Uint8ClampedArray(e*r*4),e,r);return n.gl.readPixels(0,0,e,r,6408,d.UNSIGNED_BYTE,new Uint8Array(p.data.buffer)),h(n.gl),n.bindFramebuffer(a),n.setViewport(c.x,c.y,c.width,c.height),s?.release(),p}_ensureProgram(e,r,t,o=0){const n=x({hasDepthAttachment:r,colorSamplerTypes:t}),i=this._programs.get(n);if(i)return i;const s="#version 300 es\n in vec2 position;\n out vec2 uv;\n\n void main() {\n gl_Position = vec4(position, 0.0, 1.0);\n uv = position * 0.5 + vec2(0.5);\n }",h=e=>{let r="";for(let t=0;t<e.length;++t){const o=e[t];r+=`layout(location = ${c.int(t)}) out vec4 fragColor${c.int(t)};\n uniform ${g(o)} colorTex${c.int(t)};`}return r},p=e=>e.reduce((e,r,t)=>e+`{\n int inputType = inputTypes[${t}];\n if (inputType == ${3..toFixed()}) {\n fragColor${t} = vec4(vec3(texture(colorTex${t}, uv, ${o}.0).r), 1.0);\n } else if (inputType == ${4..toFixed()}) {\n fragColor${t} = vec4(texture(colorTex${t}, uv, ${o}.0).rg, 0.0, 1.0);\n } else if (inputType == ${(0).toFixed()}) {\n float depth = 1.0 - ((-linearDepthFromTexture(colorTex${t}, uv) - nearFar[0]) / (nearFar[1] - nearFar[0]));\n fragColor${t} = vec4(vec3(depth), depth >= 0.999 ? 0.0 : 1.0);\n } else if (inputType == ${5..toFixed()}) {\n fragColor${t} = vec4(texture(colorTex${t}, uv, ${o}.0).rgb, 1.0);\n } else if (inputType == ${1..toFixed()}) {\n fragColor${t} = vec4(texture(colorTex${t}, uv, ${o}.0)) * 255.0;\n fragColor${t} = vec4(fragColor${t}.rgb / fragColor${t}.a, fragColor${t}.a);\n } else if(inputType == ${2..toFixed()}) {\n vec2 texDim = vec2(textureSize(colorTex${t}, 0));\n ivec2 iuv = ivec2(uv * texDim);\n uvec2 hh = uvec2(texelFetch(colorTex${t}, iuv, 0).rg);\n fragColor${t} = vec4(\n ((hh & uvec2(0x55u)) != uvec2(0u)) ? 1.0 : 0.0,\n ((hh & uvec2(0xaau)) != uvec2(0u)) ? 1.0 : 0.0,\n 0.0,\n 1.0);\n } else if(inputType == ${8..toFixed()}) {\n fragColor${t} = vec4(texture(colorTex${t}, uv, ${o}.0));\n fragColor${t}.rgb *= ${l.toFixed(1)};\n } else if (inputType == ${9..toFixed()}) {\n fragColor${t} = vec4(vec3(texture(colorTex${t}, uv, ${o}.0).a), 1.0);\n } else {\n fragColor${t} = vec4(texture(colorTex${t}, uv, ${o}.0));\n }\n }`,""),f=t.length,d=`#version 300 es\n precision highp float;\n precision highp usampler2D;\n\n in vec2 uv;\n ${h(t)}\n ${a(r,`layout(location = ${c.int(f)}) out vec4 fragDepth;\n uniform sampler2D depthTex;`)}\n\n uniform int inputTypes[${t.length||1}];\n uniform vec2 nearFar;\n\n // Factors to convert rgba back to float\n const vec4 RGBA_2_FLOAT_FACTORS = vec4(\n 255.0 / (256.0),\n 255.0 / (256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0),\n 255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n );\n\n\n float rgbaToFloat(vec4 rgba) {\n // Convert components from 0->1 back to 0->255 and then add the components together with their corresponding\n // fixed point factors, i.e. (256^1, 256^2, 256^3, 256^4)\n return dot(rgba, RGBA_2_FLOAT_FACTORS);\n }\n\n float linearDepthFromFloat(float depth) {\n depth = pow(depth, 0.2);\n return -(depth * (nearFar[1] - nearFar[0]) + nearFar[0]);\n }\n\n float linearDepthFromRGBA(vec4 depth) {\n return linearDepthFromFloat(rgbaToFloat(depth));\n }\n\n ${"float"===t[0]?"float linearDepthFromTexture(sampler2D depthTex, vec2 uv) {\n ivec2 iuv = ivec2(uv * vec2(textureSize(depthTex, 0)));\n return linearDepthFromRGBA(texelFetch(depthTex, iuv, 0));\n }":"float linearDepthFromTexture(usampler2D depthTex, vec2 uv) {\n ivec2 iuv = ivec2(uv * vec2(textureSize(depthTex, 0)));\n return linearDepthFromRGBA(vec4(texelFetch(depthTex, iuv, 0)) * 255.0);\n }"}\n\n void main() {\n ${p(t)}\n ${a(r,"float depth = 1.0 - pow(texture(depthTex, uv).r, 10.0);\n fragDepth = vec4(vec3(depth), depth < 0.000001 ? 0.0 : 1.0);")}\n }`,m=e.programCache.get(s,d,u);return this._programs.set(n,m),m}};function g(e){switch(e){case"float":return"sampler2D";case"uint":return"usampler2D";case"int":return"isampler2D"}}function v(e){if(!e)return"float";const{internalFormat:r}=e.descriptor;switch(r){case f.R8I:case f.R16I:case f.R32I:case f.RG8I:case f.RG16I:case f.RG32I:case f.RGB8I:case f.RGB16I:case f.RGB32I:case f.RGBA8I:case f.RGBA16I:case f.RGBA32I:return"int";case f.R8UI:case f.R16UI:case f.R32UI:case f.RG8UI:case f.RG16UI:case f.RG32UI:case f.RGB8UI:case f.RGB16UI:case f.RGB32UI:case f.RGBA8UI:case f.RGBA16UI:case f.RGBA32UI:return"uint";default:return"float"}}function x(e){const{hasDepthAttachment:r,colorSamplerTypes:t}=e;return`${r?"Depth":""}${t.reduceRight((e,r)=>e+`|C${r}`,"")}`}function F(e){switch(e){case f.R16F:case f.R32F:case f.R8:return 3;case f.RG8:return 4;case f.RGBA16F:return 5;case f.RG8UI:return 6;default:return 7}}function T(e,r,t,o){return o?`${e}\ndepth`:`${e}\n${$(r,t)}`}function $(e,r){return`${e.getColorTexture(r)?.debugName??"color"+(r-p)}`}e([t()],m.prototype,"destroyedCB",void 0),e([t()],m.prototype,"produces",void 0),e([t()],m.prototype,"consumes",void 0),e([t()],m.prototype,"clearColor",void 0),m=e([o("esri.views.3d.webgl-engine.effects.debug.RenderNodeVisualizerNode")],m);export{m as RenderNodeVisualizerNode,T as getAttachmentName};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{O as e}from"../../../../../chunks/OITBlendEmission.glsl.js";import{OITBlendEmissionTechnique as i}from"./OITBlendEmissionTechnique.js";import{OITBlendFragmentTechniqueConfiguration as s}from"./OITBlendFragmentTechniqueConfiguration.js";import{OITBlendTechnique as t}from"./OITBlendTechnique.js";import{OITBlendTechniqueConfiguration as n}from"./OITBlendTechniqueConfiguration.js";import{OITDimOpaqueTechnique as r}from"./OITDimOpaqueTechnique.js";import{OITResolutionConfiguration as o}from"../../shaders/oitResolution.glsl.js";import{ColorAttachment1 as a,ColorAttachment2 as u,DrawBufferNone as h}from"../../../../webgl/enums.js";class m{constructor(i){this._techniques=i,this._parameters=new e,this._blendConfiguration=new n,this._dimOpaqueConfiguration=new s,this._blendEmissionConfiguration=new o}precompile(e,s,n){this._updateConfigurations(e,s,n);const{hasTransparentEmission:o,hasOpaqueEmission:a}=e;a&&1!==n&&this._techniques.precompile(r,this._dimOpaqueConfiguration),this._techniques.precompile(t,this._blendConfiguration),o&&0===n&&this._techniques.precompile(i,this._blendEmissionConfiguration)}blend(e,s,n,o,m,f){this._updateConfigurations(o,m,f),this._parameters.colorTexture=s.getTexture(),this._parameters.alphaTexture=s.getTexture(a),this._parameters.emissionTexture=s.getTexture(u),this._parameters.frontFaceTexture=n.getTexture(),this._parameters.frontFaceEmissionTexture=n.getTexture(a);const l=e.drawBuffers,{hasOpaqueEmission:p,hasTransparentEmission:c}=o;if(p&&1!==f){const i=this._techniques.get(r,this._dimOpaqueConfiguration);e.bindTechnique(i,o,this._parameters),e.setDrawBuffers([h,a]),e.screen.draw()}const d=this._techniques.get(t,this._blendConfiguration);if(e.bindTechnique(d,o,this._parameters),c){const i=l.slice();i[1]=h,e.setDrawBuffers(i),e.screen.draw()}else e.setDrawBuffers(l),e.screen.draw();if(c&&0===f){const s=this._techniques.get(i,this._blendEmissionConfiguration);e.bindTechnique(s,o,this._parameters),e.setDrawBuffers([h,a]),e.screen.draw()}e.setDrawBuffers(l)}_updateConfigurations(e,i,s){this._blendConfiguration.useFloatBlend=this._dimOpaqueConfiguration.useFloatBlend=this._blendEmissionConfiguration.useFloatBlend=e.useFloatBlend.value,this._blendConfiguration.computeHudOcclusion=i,this._blendConfiguration.hasOpaqueEmission=0===s&&e.hasOpaqueEmission,this._blendConfiguration.frontFaceMask=1===s}}export{m as OITBlend};
2
+ import{O as e}from"../../../../../chunks/OITBlendEmission.glsl.js";import{OITBlendEmissionTechnique as i}from"./OITBlendEmissionTechnique.js";import{OITBlendFragmentTechniqueConfiguration as s}from"./OITBlendFragmentTechniqueConfiguration.js";import{OITBlendTechnique as t}from"./OITBlendTechnique.js";import{OITBlendTechniqueConfiguration as n}from"./OITBlendTechniqueConfiguration.js";import{OITDimOpaqueTechnique as o}from"./OITDimOpaqueTechnique.js";import{OITResolutionConfiguration as r}from"../../shaders/oitResolution.glsl.js";import{ColorAttachment1 as a,ColorAttachment2 as u,DrawBufferNone as h}from"../../../../webgl/enums.js";class m{constructor(i){this._techniques=i,this._parameters=new e,this._blendConfiguration=new n,this._dimOpaqueConfiguration=new s,this._blendEmissionConfiguration=new r}precompile(e,s,n){this._updateConfigurations(e,s,n);const{hasTransparentEmission:r,hasOpaqueEmission:a}=e;a&&1!==n&&this._techniques.precompile(o,this._dimOpaqueConfiguration),this._techniques.precompile(t,this._blendConfiguration),r&&0===n&&this._techniques.precompile(i,this._blendEmissionConfiguration)}blend(e,s,n,r,m,f,p){this._updateConfigurations(r,m,f),this._parameters.colorTexture=s.getTexture(),this._parameters.alphaTexture=s.getTexture(a),this._parameters.emissionTexture=s.getTexture(u),this._parameters.frontFaceTexture=n.getTexture(),this._parameters.frontFaceEmissionTexture=n.getTexture(a);const c=e.drawBuffers,{hasOpaqueEmission:l,hasTransparentEmission:d}=r;if(l&&1!==f){const i=this._techniques.get(o,this._dimOpaqueConfiguration);e.bindTechnique(i,r,this._parameters),e.setDrawBuffers([h,a]),e.screen.draw(),p?.("oit opaque emission color",e.boundFramebuffer)}const _=this._techniques.get(t,this._blendConfiguration);if(e.bindTechnique(_,r,this._parameters),!l&&d){const i=c.slice();i[1]=h,e.setDrawBuffers(i),e.screen.draw()}else e.setDrawBuffers(c),e.screen.draw();if(p?.("oit composited",e.boundFramebuffer),d&&0===f){const s=this._techniques.get(i,this._blendEmissionConfiguration);e.bindTechnique(s,r,this._parameters),e.setDrawBuffers([h,a]),e.screen.draw(),p?.("oit transparent emission",e.boundFramebuffer)}e.setDrawBuffers(c)}_updateConfigurations(e,i,s){this._blendConfiguration.useFloatBlend=this._dimOpaqueConfiguration.useFloatBlend=this._blendEmissionConfiguration.useFloatBlend=e.useFloatBlend.value,this._blendConfiguration.computeHudOcclusion=i,this._blendConfiguration.hasOpaqueEmission=0===s&&e.hasOpaqueEmission,this._blendConfiguration.frontFaceMask=1===s}}export{m as OITBlend};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{floatSubArray as t}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as e}from"../../../../geometry/support/HalfFloatArray.js";import{newIndexArray as i,compactIndices as s}from"../../../../geometry/support/Indices.js";import{newShortArray as r}from"../../../../geometry/support/ShortArray.js";import{compressNormal as o,encodeInt16 as n}from"./Normals.js";import{PathEvaluator as h}from"./PathEvaluator.js";import{encodePathVertexInfo as u}from"./PathVertexInfo.js";class a{constructor(s,o,n,u,a){this.path=s,this.profile=o,this.extruder=n,this.cap=u,this._extrusionVertexCount=0,this._extrusionFrameCount=0;const p=this.path.vertices.length-2;this.numExtrusionProfiles=n.numProfilesPerJoin()*p+2,this.numVerticesTotal=o.vertices.length*this.numExtrusionProfiles,this.numExtrusionFrames=this.path.vertices.length;const m=this.cap.numVertices;this.startCapVertexBufferStart=this.numVerticesTotal,this.numVerticesTotal+=m,this.endCapVertexBufferStart=this.numVerticesTotal,this.numVerticesTotal+=m,this.profileRightAxes=r(2*this.numExtrusionFrames),this.profileUpAxes=r(2*this.numExtrusionFrames);const l=1===a;this.profileRotationFrameUpAxes=l?r(2*this.numExtrusionFrames):null,this.pathMaxStretchDistances=e(this.numExtrusionFrames),this.profileRotations=r(this.numExtrusionFrames),this.framePositionIndices=i(this.numExtrusionFrames),this.pathVertexInfos=new Uint32Array(this.numVerticesTotal),this.vertexFrameIndices=i(this.numVerticesTotal),this.positions=t(s.positions,s.offset,3*s.vertices.length),this._rebuildGeometry(),this._buildTopology(),this.evaluator=new h(this,o,this.extruder.numBendSubdivisions,u.type,n.cutoffAngle,a)}emitVertexDescriptor(t,e){const i=this._extrusionVertexCount;this.pathVertexInfos[i]=u(t),this.vertexFrameIndices[i]=e,++this._extrusionVertexCount}emitExtrusionFrame(t,e){const{frame:i,rotationFrameUp:s,rotationAngle:r,maxStretchDistance:h}=t,u=this._extrusionFrameCount;return o(this.profileRightAxes,u,i.right[0],i.right[1],i.right[2]),o(this.profileUpAxes,u,i.up[0],i.up[1],i.up[2]),this.profileRotations[u]=n(r/Math.PI),this.profileRotationFrameUpAxes&&o(this.profileRotationFrameUpAxes,u,s[0],s[1],s[2]),this.pathMaxStretchDistances[u]=h,this.framePositionIndices[u]=e,this._extrusionFrameCount++}_rebuildGeometry(){this._extrusionVertexCount=0,this._extrusionFrameCount=0;const{positions:e,offset:i,vertices:s}=this.path,{profile:r}=this;this.positions=t(e,i,3*s.length);for(let t=0;t<s.length;++t)this.emitExtrusionFrame(s[t],t);for(let t=0;t<r.vertices.length;++t)this.emitVertexDescriptor({sourceIndex:t,subdivision:0,type:1,capSide:0},0);const o=(t,e,i)=>{this.emitVertexDescriptor({sourceIndex:e,subdivision:i,type:0,capSide:0},t)};for(let t=1;t<s.length-1;++t)this.extruder.extrude(t,this.profile,o);const n=s.length-1;for(let t=0;t<r.vertices.length;++t)this.emitVertexDescriptor({sourceIndex:t,subdivision:0,type:1,capSide:1},n);this.cap.rebuildCapGeometry((t,e,i)=>this.emitVertexDescriptor({sourceIndex:t,subdivision:e,type:i,capSide:0},0)),this.cap.rebuildCapGeometry((t,e,i)=>this.emitVertexDescriptor({sourceIndex:t,subdivision:e,type:i,capSide:1},n))}_buildTopology(){const t=this.profile.vertices.length,e=this.profile.numSegments,i=this.numExtrusionProfiles-1,r=0,o=t*(this.numExtrusionProfiles-1),n=new Array,h=(t,e,i)=>{n.push(t),n.push(e),n.push(i)};for(let s=0;s<e;++s){const e=this.profile.indices[2*s],r=this.profile.indices[2*s+1];for(let s=0;s<i;++s){const i=s*t+e,o=(s+1)*t+r,n=s*t+r;h(i,(s+1)*t+e,o),h(i,o,n)}}this.cap.buildTopology(h,0,this.startCapVertexBufferStart,r),this.cap.buildTopology(h,1,this.endCapVertexBufferStart,o),this.vertexIndices=s(n)}onPathChanged(){this._rebuildGeometry()}}export{a as PathBuilder};
2
+ import{floatSubArray as t}from"../../../../geometry/support/FloatArray.js";import{newHalfFloatArray as e}from"../../../../geometry/support/HalfFloatArray.js";import{newIndexArray as i,compactIndices as s}from"../../../../geometry/support/Indices.js";import{newShortArray as r}from"../../../../geometry/support/ShortArray.js";import{compressNormal as o,encodeInt16 as n}from"./Normals.js";import{PathEvaluator as h}from"./PathEvaluator.js";import{encodePathVertexInfo as a}from"./PathVertexInfo.js";class u{constructor(s,o,n,a,u){this.path=s,this.profile=o,this.extruder=n,this.cap=a,this._extrusionVertexCount=0,this._extrusionFrameCount=0;const p=this.path.vertices.length-2;this.numExtrusionProfiles=n.numProfilesPerJoin()*p+2,this.numVerticesTotal=o.vertices.length*this.numExtrusionProfiles,this.numExtrusionFrames=this.path.vertices.length;const m=this.cap.numVertices;this.startCapVertexBufferStart=this.numVerticesTotal,this.numVerticesTotal+=m,this.endCapVertexBufferStart=this.numVerticesTotal,this.numVerticesTotal+=m,this.profileRightAxes=r(2*this.numExtrusionFrames),this.profileUpAxes=r(2*this.numExtrusionFrames);const l=1===u;this.profileRotationFrameUpAxes=l?r(2*this.numExtrusionFrames):null,this.pathMaxStretchDistances=e(this.numExtrusionFrames),this.profileRotations=r(this.numExtrusionFrames),this.framePositionIndices=i(this.numExtrusionFrames),this.pathVertexInfos=new Uint32Array(this.numVerticesTotal),this.positions=t(s.positions,s.offset,3*s.vertices.length),this._rebuildGeometry(),this._buildTopology(),this.evaluator=new h(this,o,this.extruder.numBendSubdivisions,a.type,n.cutoffAngle,u)}emitVertexDescriptor(t){const e=this._extrusionVertexCount;this.pathVertexInfos[e]=a(t),++this._extrusionVertexCount}emitExtrusionFrame(t,e){const{frame:i,rotationFrameUp:s,rotationAngle:r,maxStretchDistance:h}=t,a=this._extrusionFrameCount;return o(this.profileRightAxes,a,i.right[0],i.right[1],i.right[2]),o(this.profileUpAxes,a,i.up[0],i.up[1],i.up[2]),this.profileRotations[a]=n(r/Math.PI),this.profileRotationFrameUpAxes&&o(this.profileRotationFrameUpAxes,a,s[0],s[1],s[2]),this.pathMaxStretchDistances[a]=h,this.framePositionIndices[a]=e,this._extrusionFrameCount++}_rebuildGeometry(){this._extrusionVertexCount=0,this._extrusionFrameCount=0;const{positions:e,offset:i,vertices:s}=this.path,{profile:r}=this;this.positions=t(e,i,3*s.length);for(let t=0;t<s.length;++t)this.emitExtrusionFrame(s[t],t);for(let t=0;t<r.vertices.length;++t)this.emitVertexDescriptor({frameIndex:0,sourceIndex:t,subdivision:0,type:1,capSide:0});const o=(t,e,i)=>{this.emitVertexDescriptor({frameIndex:t,sourceIndex:e,subdivision:i,type:0,capSide:0})};for(let t=1;t<s.length-1;++t)this.extruder.extrude(t,this.profile,o);const n=s.length-1;for(let t=0;t<r.vertices.length;++t)this.emitVertexDescriptor({frameIndex:n,sourceIndex:t,subdivision:0,type:1,capSide:1});this.cap.rebuildCapGeometry((t,e,i)=>this.emitVertexDescriptor({frameIndex:0,sourceIndex:t,subdivision:e,type:i,capSide:0})),this.cap.rebuildCapGeometry((t,e,i)=>this.emitVertexDescriptor({frameIndex:n,sourceIndex:t,subdivision:e,type:i,capSide:1}))}_buildTopology(){const t=this.profile.vertices.length,e=this.profile.numSegments,i=this.numExtrusionProfiles-1,r=0,o=t*(this.numExtrusionProfiles-1),n=new Array,h=(t,e,i)=>{n.push(t),n.push(e),n.push(i)};for(let s=0;s<e;++s){const e=this.profile.indices[2*s],r=this.profile.indices[2*s+1];for(let s=0;s<i;++s){const i=s*t+e,o=(s+1)*t+r,n=s*t+r;h(i,(s+1)*t+e,o),h(i,o,n)}}this.cap.buildTopology(h,0,this.startCapVertexBufferStart,r),this.cap.buildTopology(h,1,this.endCapVertexBufferStart,o),this.vertexIndices=s(n)}onPathChanged(){this._rebuildGeometry()}}export{u as PathBuilder};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{pathNumRoundCapExtrusionSubdivisions as e}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";class t{constructor(){this.numVertices=0,this.numIndices=0,this.type=0}rebuildCapGeometry(){}buildTopology(){}}class s{constructor(e,t){this._profile=e,this.type=t}get numVertices(){return this._profile.vertices.length}get numIndices(){return 3*this._profile.numSegments}rebuildCapGeometry(e){const t=this._profile;for(let s=0;s<t.vertices.length;++s)e(s,0,2)}buildTopology(e,t,s){const i=this._profile,r=s+i.indices[0],o=1===t;for(let l=1;l<i.numSegments;++l){const t=s+i.indices[2*l],n=s+i.indices[2*l+1];o?e(n,t,r):e(r,t,n)}}}class i{constructor(e,t){this._profile=e,this._breakNormals=t,this.type=3}get numVertices(){let t=this._profile.vertices.length*(e-1)+this._profile.poles.length;return this._breakNormals&&(t+=this._profile.vertices.length),t}get numIndices(){let t=0;const s=this._profile;t+=2*s.numSegments*(e-1);for(let e=0;e<s.numSegments;++e){const i=s.indices[2*e],r=s.indices[2*e+1];s.poleIndices[i]===s.poleIndices[r]?t+=1:t+=2}return 3*t}rebuildCapGeometry(t){const s=this._profile;for(let e=0;e<s.poles.length;++e)t(e,0,3);if(this._breakNormals)for(let e=0;e<s.vertices.length;++e)t(e,0,1);for(let i=0;i<e-1;++i)for(let e=0;e<s.vertices.length;++e)t(e,i,4)}buildTopology(t,s,i,r){const o=this._profile,l=this._breakNormals?i+o.poles.length:r,n=this._breakNormals?i+o.poles.length+o.vertices.length:i+o.poles.length,c=1===s;for(let h=0;h<o.numSegments;++h){const s=o.indices[2*h],r=o.indices[2*h+1],p=i+o.poleIndices[s],g=i+o.poleIndices[r];let m=l+s,u=l+r;for(let i=0;i<e-1;++i){const e=n+i*o.vertices.length+s,l=n+i*o.vertices.length+r;c?(t(e,u,m),t(u,e,l)):(t(m,u,e),t(l,e,u)),m=e,u=l}c?(t(p,u,m),p!==g&&t(p,g,u)):(t(m,u,p),p!==g&&t(u,g,p))}}}export{t as NoCapBuilder,i as RoundCapBuilder,s as TriangulationCapBuilder};
2
+ import{pathNumRoundCapExtrusionSubdivisions as e}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";class t{constructor(){this.numVertices=0,this.numIndices=0,this.type=0}rebuildCapGeometry(){}buildTopology(){}}class s{constructor(e,t){this._profile=e,this.type=t}get numVertices(){return this._profile.vertices.length}get numIndices(){return 3*this._profile.numSegments}rebuildCapGeometry(e){const t=this._profile;for(let s=0;s<t.vertices.length;++s)e(s,0,2)}buildTopology(e,t,s){const i=this._profile,r=s+i.indices[0],o=1===t;for(let l=1;l<i.numSegments;++l){const t=s+i.indices[2*l],n=s+i.indices[2*l+1];o?e(n,t,r):e(r,t,n)}}}class i{constructor(e,t){this._profile=e,this._breakNormals=t,this.type=3}get numVertices(){let t=this._profile.vertices.length*(e-1)+this._profile.poles.length;return this._breakNormals&&(t+=this._profile.vertices.length),t}get numIndices(){let t=0;const s=this._profile;t+=2*s.numSegments*(e-1);for(let e=0;e<s.numSegments;++e){const i=s.indices[2*e],r=s.indices[2*e+1];s.poleIndices[i]===s.poleIndices[r]?t+=1:t+=2}return 3*t}rebuildCapGeometry(t){const s=this._profile;for(let e=0;e<s.poles.length;++e)t(e,0,2);if(this._breakNormals)for(let e=0;e<s.vertices.length;++e)t(e,0,1);for(let i=0;i<e-1;++i)for(let e=0;e<s.vertices.length;++e)t(e,i,3)}buildTopology(t,s,i,r){const o=this._profile,l=this._breakNormals?i+o.poles.length:r,n=this._breakNormals?i+o.poles.length+o.vertices.length:i+o.poles.length,c=1===s;for(let h=0;h<o.numSegments;++h){const s=o.indices[2*h],r=o.indices[2*h+1],p=i+o.poleIndices[s],g=i+o.poleIndices[r];let m=l+s,u=l+r;for(let i=0;i<e-1;++i){const e=n+i*o.vertices.length+s,l=n+i*o.vertices.length+r;c?(t(e,u,m),t(u,e,l)):(t(m,u,e),t(l,e,u)),m=e,u=l}c?(t(p,u,m),p!==g&&t(p,g,u)):(t(m,u,p),p!==g&&t(u,g,p))}}}export{t as NoCapBuilder,i as RoundCapBuilder,s as TriangulationCapBuilder};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{reciprocalClamped as e}from"../../../../core/mathUtils.js";import{set as t}from"../../../../core/libs/gl-matrix-2/math/mat2.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/mat2f64.js";import{setAxisAngle as o}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{multiply as i,copy as a,length as c,scale as f,set as n,dot as p,add as m,subtract as l,normalize as h,transformMat2 as u}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{ZEROS as x,UNIT_X as d,create as b}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{cross as g,set as N,transformQuat as V,dot as O,scale as v,add as I,normalize as P}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as j}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{pathNumRoundCapExtrusionSubdivisions as M}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{compressNormal as C,decodeInt16 as y,decompressNormal as A}from"./Normals.js";import{PathFrame2D as k}from"./PathFrame2D.js";import{decodePathVertexInfo as D}from"./PathVertexInfo.js";class R{constructor(e,t,r,o,s,i){this.builder=e,this.profile=t,this.numJoinSubdivisions=r,this.capType=o,this.miterCutoffAngle=s,this.upVectorAlignment=i}evaluateBakedVertices(e,t,r){const{numVerticesTotal:o,framePositionIndices:s,vertexFrameIndices:l,positions:h}=this.builder;for(let u=0;u<o;++u){const o=W;this._evaluateExtrudedVertex(o,u);const x=B;let d=0,b=0;const V=l[u],O=o.frame.right,v=o.frame.up,I=3*s[V],P=i(G,o.profileVertex,r);if(o.isCap)g(x,v,O),d=o.capPositionOffset*r[0],b=o.capNormalOffset;else{const e=L,t=H;a(e,o.rotationRight);const s=o.maxDistance;i(e,e,r);const l=c(e);l>0?f(e,e,1/l):n(e,0,0);const h=p(P,e);if(Math.abs(h)>s){n(t,-e[1],e[0]);const r=p(P,t);f(e,e,s*Math.sign(h)),f(t,t,r),m(P,e,t)}N(x,0,0,0)}const j=O[0]*P[0]+v[0]*P[1],M=O[1]*P[0]+v[1]*P[1],y=O[2]*P[0]+v[2]*P[1],A=3*u;e[A]=h[I]+j+x[0]*d,e[A+1]=h[I+1]+M+x[1]*d,e[A+2]=h[I+2]+y+x[2]*d;const k=o.profileNormal[0],D=o.profileNormal[1];C(t,u,O[0]*k+v[0]*D+x[0]*b,O[1]*k+v[1]*D+x[1]*b,O[2]*k+v[2]*D+x[2]*b)}}_evaluateExtrudedVertex(e,t){const{profileRotations:r,profileUpAxes:s,profileRightAxes:i,profileRotationFrameUpAxes:c,pathMaxStretchDistances:n,pathVertexInfos:u,vertexFrameIndices:b}=this.builder,{miterCutoffAngle:g,profile:N,upVectorAlignment:O}=this,v=S[O],I=1===this.upVectorAlignment,P=D(u[t]),j=b[t],C=y(r[j])*Math.PI,k=n[j];switch(A(e.frame.right,i,j),A(e.frame.up,s,j),e.maxDistance=0,P.type){case 0:{e.isCap=!1;const t=N.vertices[P.sourceIndex],r=N.normals[P.sourceIndex],s=Math.abs(C)>=g,i=I?A(K,c,j):e.frame.up,f=null!=c?T(J,e.frame,i):d,n=p(t,f)*C>=0;if(s&&n){a(e.profileVertex,t);const r=.5*-C+P.subdivision*C/this.numJoinSubdivisions;0!==r&&(o(Q,i,r),I&&V(e.frame.up,e.frame.up,Q),V(e.frame.right,e.frame.right,Q))}else{const r=v(q,t,C,f);a(e.profileVertex,r)}a(e.profileNormal,r),a(e.rotationRight,n?x:f),e.maxDistance=n?0:k;break}case 1:{e.isCap=!0;const t=N.vertices[P.sourceIndex],r=N.normals[P.sourceIndex];switch(a(e.profileVertex,t),a(e.profileNormal,r),this.capType){case 0:case 1:case 3:e.capPositionOffset=0,e.capNormalOffset=0;break;case 2:e.capPositionOffset=F(P)?.5:-.5,e.capNormalOffset=0}break}case 2:{e.isCap=!0;const t=N.vertices[P.sourceIndex],r=F(P),o=r?1:-1,s=2===this.capType?r?.5:-.5:0,i=x;a(e.profileVertex,t),a(e.profileNormal,i),e.capPositionOffset=s,e.capNormalOffset=o;break}case 3:{e.isCap=!0;const t=F(P)?1:-1,r=.5*t,o=N.poles[P.sourceIndex],s=o.position,i=o.normal;i?(a(e.profileVertex,s),a(e.profileNormal,i),e.capPositionOffset=r,e.capNormalOffset=0):(a(e.profileVertex,s),a(e.profileNormal,x),e.capPositionOffset=r,e.capNormalOffset=t);break}case 4:{e.isCap=!0;const t=F(P)?1:-1,r=.5*t,o=(1-(P.subdivision+1)/M)*Math.PI*.5,s=Math.sin(o),i=Math.cos(o),c=N.poleIndices[P.sourceIndex],n=N.poles[c],p=n.position,u=n.normal,x=N.vertices[P.sourceIndex];l(q,x,p),f(q,q,s),u?(m(q,q,p),a(e.profileVertex,q),a(e.profileNormal,u),e.capPositionOffset=r*i,e.capNormalOffset=0):(h(U,q),f(U,U,s),m(q,q,p),a(e.profileVertex,q),a(e.profileNormal,U),e.capPositionOffset=r*i,e.capNormalOffset=t*i);break}default:P.type}}}const S={0:(t,r,o)=>{if(Math.abs(o)<=0)return r;const s=e(Math.cos(.5*o));return n(t,(s-1+1)*r[0],r[1])},1:(r,o,s,i)=>{if(0===Math.abs(s))return o;const a=e(Math.cos(.5*s)),c=t(E,1+(a-1)*i[0]*i[0],(a-1)*i[0]*i[1],(a-1)*i[0]*i[1],1+(a-1)*i[1]*i[1]);return u(r,o,c)}};function F(e){return 1===e.capSide}function T(e,t,r){const o=O(r,t.up),s=O(r,t.right);return v(_,t.up,-s),v(z,t.right,o),I(_,_,z),P(_,_),w(e,t,_),e}function w(e,t,r){n(e,O(r,t.right),O(r,t.up))}const U=b(),q=b(),E=r(),J=b(),_=j(),z=j(),B=j(),G=b(),L=b(),H=b(),K=j(),Q=s(),W={profileVertex:b(),profileNormal:b(),rotationRight:b(),maxDistance:0,capPositionOffset:0,capNormalOffset:0,isCap:!1,frame:new k};export{R as PathEvaluator};
2
+ import{reciprocalClamped as e}from"../../../../core/mathUtils.js";import{set as t}from"../../../../core/libs/gl-matrix-2/math/mat2.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/mat2f64.js";import{setAxisAngle as o}from"../../../../core/libs/gl-matrix-2/math/quat.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{multiply as a,copy as i,length as c,scale as f,set as n,dot as p,add as m,subtract as l,normalize as h,transformMat2 as u}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{ZEROS as x,UNIT_X as d,create as b}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{cross as g,set as N,transformQuat as V,dot as I,scale as O,add as v,normalize as P}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as j}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{pathNumRoundCapExtrusionSubdivisions as M}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{compressNormal as y,decodeInt16 as C,decompressNormal as k}from"./Normals.js";import{PathFrame2D as A}from"./PathFrame2D.js";import{decodePathVertexInfo as D}from"./PathVertexInfo.js";class R{constructor(e,t,r,o,s,a){this.builder=e,this.profile=t,this.numJoinSubdivisions=r,this.capType=o,this.miterCutoffAngle=s,this.upVectorAlignment=a}evaluateBakedVertices(e,t,r){const{numVerticesTotal:o,framePositionIndices:s,positions:l}=this.builder;for(let h=0;h<o;++h){const o=W;this._evaluateExtrudedVertex(o,h);const u=B;let x=0,d=0;const b=o.frameIndex,V=o.frame.right,I=o.frame.up,O=3*s[b],v=a(G,o.profileVertex,r);if(o.isCap)g(u,I,V),x=o.capPositionOffset*r[0],d=o.capNormalOffset;else{const e=L,t=H;i(e,o.rotationRight);const s=o.maxDistance;a(e,e,r);const l=c(e);l>0?f(e,e,1/l):n(e,0,0);const h=p(v,e);if(Math.abs(h)>s){n(t,-e[1],e[0]);const r=p(v,t);f(e,e,s*Math.sign(h)),f(t,t,r),m(v,e,t)}N(u,0,0,0)}const P=V[0]*v[0]+I[0]*v[1],j=V[1]*v[0]+I[1]*v[1],M=V[2]*v[0]+I[2]*v[1],C=3*h;e[C]=l[O]+P+u[0]*x,e[C+1]=l[O+1]+j+u[1]*x,e[C+2]=l[O+2]+M+u[2]*x;const k=o.profileNormal[0],A=o.profileNormal[1];y(t,h,V[0]*k+I[0]*A+u[0]*d,V[1]*k+I[1]*A+u[1]*d,V[2]*k+I[2]*A+u[2]*d)}}_evaluateExtrudedVertex(e,t){const{profileRotations:r,profileUpAxes:s,profileRightAxes:a,profileRotationFrameUpAxes:c,pathMaxStretchDistances:n,pathVertexInfos:u}=this.builder,{miterCutoffAngle:b,profile:g,upVectorAlignment:N}=this,I=S[N],O=1===this.upVectorAlignment,v=D(u[t]),P=v.frameIndex;e.frameIndex=P;const j=C(r[P])*Math.PI,y=n[P];switch(k(e.frame.right,a,P),k(e.frame.up,s,P),e.maxDistance=0,v.type){case 0:{e.isCap=!1;const t=g.vertices[v.sourceIndex],r=g.normals[v.sourceIndex],s=Math.abs(j)>=b,a=O?k(K,c,P):e.frame.up,f=null!=c?w(J,e.frame,a):d,n=p(t,f)*j>=0;if(s&&n){i(e.profileVertex,t);const r=.5*-j+v.subdivision*j/this.numJoinSubdivisions;0!==r&&(o(Q,a,r),O&&V(e.frame.up,e.frame.up,Q),V(e.frame.right,e.frame.right,Q))}else{const r=I(E,t,j,f);i(e.profileVertex,r)}i(e.profileNormal,r),i(e.rotationRight,n?x:f),e.maxDistance=n?0:y;break}case 1:{e.isCap=!0;const t=g.vertices[v.sourceIndex],r=g.normals[v.sourceIndex];switch(i(e.profileVertex,t),i(e.profileNormal,r),this.capType){case 0:case 1:case 3:e.capPositionOffset=0,e.capNormalOffset=0;break;case 2:e.capPositionOffset=T(v)?.5:-.5,e.capNormalOffset=0}break}case 2:{e.isCap=!0;const t=T(v)?1:-1;switch(this.capType){case 1:case 2:{const r=g.vertices[v.sourceIndex],o=2===this.capType?.5*t:0,s=x;i(e.profileVertex,r),i(e.profileNormal,s),e.capPositionOffset=o,e.capNormalOffset=t;break}case 3:{const r=.5*t,o=g.poles[v.sourceIndex],s=o.position,a=o.normal;a?(i(e.profileVertex,s),i(e.profileNormal,a),e.capPositionOffset=r,e.capNormalOffset=0):(i(e.profileVertex,s),i(e.profileNormal,x),e.capPositionOffset=r,e.capNormalOffset=t);break}}break}case 3:{e.isCap=!0;const t=T(v)?1:-1,r=.5*t,o=(1-(v.subdivision+1)/M)*Math.PI*.5,s=Math.sin(o),a=Math.cos(o),c=g.poleIndices[v.sourceIndex],n=g.poles[c],p=n.position,u=n.normal,x=g.vertices[v.sourceIndex];l(E,x,p),f(E,E,s),u?(m(E,E,p),i(e.profileVertex,E),i(e.profileNormal,u),e.capPositionOffset=r*a,e.capNormalOffset=0):(h(q,E),f(q,q,s),m(E,E,p),i(e.profileVertex,E),i(e.profileNormal,q),e.capPositionOffset=r*a,e.capNormalOffset=t*a);break}default:v.type}}}const S={0:(t,r,o)=>{if(Math.abs(o)<=0)return r;const s=e(Math.cos(.5*o));return n(t,(s-1+1)*r[0],r[1])},1:(r,o,s,a)=>{if(0===Math.abs(s))return o;const i=e(Math.cos(.5*s)),c=t(F,1+(i-1)*a[0]*a[0],(i-1)*a[0]*a[1],(i-1)*a[0]*a[1],1+(i-1)*a[1]*a[1]);return u(r,o,c)}};function T(e){return 1===e.capSide}function w(e,t,r){const o=I(r,t.up),s=I(r,t.right);return O(_,t.up,-s),O(z,t.right,o),v(_,_,z),P(_,_),U(e,t,_),e}function U(e,t,r){n(e,I(r,t.right),I(r,t.up))}const q=b(),E=b(),F=r(),J=b(),_=j(),z=j(),B=j(),G=b(),L=b(),H=b(),K=j(),Q=s(),W={profileVertex:b(),profileNormal:b(),rotationRight:b(),maxDistance:0,capPositionOffset:0,capNormalOffset:0,isCap:!1,frame:new A,frameIndex:0};export{R as PathEvaluator};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{Geometry as t}from"./Geometry.js";class e extends t{constructor(t,e,i,s,n,r){super(t,e,null,0,r),this.path=i,this.geometrySR=s,this.stencilWidth=n}_computePrimitivePositionIndices(){const t=this.attributes.get("textureElementIndex"),e=this.attributes.get("position");if(t&&e){const i=e.indices,s=t.indices,n=t.data;return s.map(t=>i[n[t]])}return e?.indices??null}}function i(t){return"path"in t}export{e as PathGeometry,i as isPathGeometry};
2
+ import{Geometry as t}from"./Geometry.js";import{getPathVertexFrameIndex as i}from"./PathVertexInfo.js";class e extends t{constructor(t,i,e,s,r,n){super(t,i,null,0,n),this.path=e,this.geometrySR=s,this.stencilWidth=r}_computePrimitivePositionIndices(){const t=this.attributes.get("pathVertexInfo"),e=this.attributes.get("position");if(t&&e){const s=e.indices,r=t.indices,n=t.data;return r.map(e=>s[i(n[t.stride*e])])}return e?.indices??null}}function s(t){return"path"in t}export{e as PathGeometry,s as isPathGeometry};