@arcgis/core 5.1.0-next.16 → 5.1.0-next.18
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.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{da5deed75e1a170a49b3.js → fd125618f513bc2f5206.js} +13 -13
- package/chunks/HUDMaterial.glsl.js +41 -64
- package/chunks/MeasurementArrow.glsl.js +7 -8
- package/chunks/RealisticTree.glsl.js +3 -3
- package/chunks/RibbonLine.glsl.js +29 -35
- package/chunks/Terrain.glsl.js +24 -24
- package/config.js +1 -1
- package/kernel.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/symbols/Symbol3DLayer.d.ts +12 -18
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/BufferCache.js +2 -0
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerOriginData.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/TextureBufferCache.js +2 -0
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VboCache.js +2 -0
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +7 -7
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/alphaCutoff.glsl.js +2 -0
- package/views/webgl/VertexArrayObject.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{copy as e,set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ZEROS as r}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{RejectBySlice as t}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{AlignPixel as a}from"../views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js";import{HUD as s}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js";import{HUDOcclusionPass as n}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js";import{HUDVisibility as c}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUDVisibility.glsl.js";import{OutputHighlight as d}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{ReadDepth as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{positionOutsideClipSpace as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{VisualVariables as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as
|
|
2
|
+
import{copy as e,set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ZEROS as r}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{RejectBySlice as t}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{AlignPixel as a}from"../views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js";import{HUD as s}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js";import{HUDOcclusionPass as n}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js";import{HUDVisibility as c}from"../views/3d/webgl-engine/core/shaderLibrary/hud/HUDVisibility.glsl.js";import{OutputHighlight as d}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{ReadDepth as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{positionOutsideClipSpace as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{VisualVariables as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as m}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{ScreenSizePerspective as g,addScreenSizePerspective as v,addScreenSizePerspectiveAlignment as x}from"../views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js";import{addPixelRatio as h}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2PassUniform as b}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float4BindUniform as C}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as z}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{If as S,glsl as P}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as j}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{alphaCutoff as A}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{outputColorHighlightOLID as O}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as D}from"../views/webgl/ShaderBuilder.js";function F(e){const i=new D;if(i.include(s,e),i.vertex.include(t,e),e.occlusionPass)return i.include(n,e),i;const{output:F,oitPass:B,hasOcclusionTexture:T,signedDistanceFieldEnabled:M,useVisibilityPixel:_,pixelSnappingEnabled:H,hasEmission:q,hasScreenSizePerspective:R,debugDrawLabelBorder:I,hasVVSize:k,hasVVColor:E,hasRotation:G,occludedFragmentFade:J,sampleSignedDistanceFieldTexelCenter:K,hasVertexColor:N,hasVertexSize:Q,hasVertexRotation:W,hasVertexUVi:X}=e;i.include(g),i.include(p,e),i.include(l,e),i.include(O,e),_&&i.include(c);const{vertex:Y,fragment:Z}=i;Z.include(m),i.varyings.add("vcolor","vec4"),i.varyings.add("vtc","vec2"),i.varyings.add("vsize","vec2");const ee=8===F,oe=ee&&_;oe&&i.varyings.add("voccluded","float"),Y.uniforms.add(new C("viewport",e=>e.camera.fullViewport),new b("screenOffset",(e,i)=>o(L,2*e.screenOffset[0]*i.camera.pixelRatio,2*e.screenOffset[1]*i.camera.pixelRatio)),new b("anchorPosition",e=>V(e)),new w("materialColor",({color:e})=>e),new z("materialRotation",e=>e.rotation),new b("materialSize",e=>e.size),new y("tex",e=>e.texture)),h(Y),M&&(Y.uniforms.add(new w("outlineColor",e=>e.outlineColor)),Z.uniforms.add(new w("outlineColor",e=>$(e)?e.outlineColor:r),new z("outlineSize",e=>$(e)?e.outlineSize:0))),H&&Y.include(a),R&&(v(Y),x(Y)),I&&i.varyings.add("debugBorderCoords","vec4"),i.attributes.add("uv0","vec2"),X&&i.attributes.add("uvi","vec4"),N&&i.attributes.add("color","vec4"),Q&&i.attributes.add("size","vec2"),W&&i.attributes.add("rotation","float"),(k||E)&&i.attributes.add("featureAttribute","vec4"),Y.main.add(P`
|
|
3
3
|
ProjectHUDAux projectAux;
|
|
4
4
|
vec4 posProj = projectPositionHUD(projectAux);
|
|
5
5
|
forwardObjectAndLayerIdColor();
|
|
@@ -9,9 +9,9 @@ import{copy as e,set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{cre
|
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
vec2 vertexSize = materialSize${S(
|
|
12
|
+
vec2 vertexSize = materialSize${S(Q," * size")};
|
|
13
13
|
vec2 inputSize;
|
|
14
|
-
${S(
|
|
14
|
+
${S(R,P`
|
|
15
15
|
inputSize = screenSizePerspectiveScaleVec2(vertexSize, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspective);
|
|
16
16
|
vec2 screenOffsetScaled = screenSizePerspectiveScaleVec2(screenOffset, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);`,P`
|
|
17
17
|
inputSize = vertexSize;
|
|
@@ -21,17 +21,17 @@ import{copy as e,set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{cre
|
|
|
21
21
|
vec2 combinedSize = inputSize * pixelRatio;
|
|
22
22
|
vec4 quadOffset = vec4(0.0);
|
|
23
23
|
|
|
24
|
-
${S(
|
|
24
|
+
${S(_,P`
|
|
25
25
|
bool visible = testHUDVisibility(posProj);
|
|
26
26
|
if (!visible) {
|
|
27
27
|
vtc = vec2(0.0);
|
|
28
|
-
${S(
|
|
28
|
+
${S(I,"debugBorderCoords = vec4(0.5, 0.5, 1.5 / combinedSize);")}
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
`)}
|
|
32
|
-
${S(
|
|
33
|
-
`);const
|
|
34
|
-
${S(
|
|
32
|
+
${S(oe,P`voccluded = visible ? 0.0 : 1.0;`)}
|
|
33
|
+
`);const ie=P`
|
|
34
|
+
${S(X,P`
|
|
35
35
|
vec2 texSize = vec2(textureSize(tex, 0));
|
|
36
36
|
vec2 uv = mix(uvi.xy, uvi.zw, bvec2(uv0)) / texSize;
|
|
37
37
|
`,P`
|
|
@@ -40,8 +40,8 @@ import{copy as e,set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{cre
|
|
|
40
40
|
|
|
41
41
|
quadOffset.xy = (uv0 - anchorPosition) * 2.0 * combinedSize;
|
|
42
42
|
|
|
43
|
-
${S(
|
|
44
|
-
float angle = radians(materialRotation${S(
|
|
43
|
+
${S(G,P`
|
|
44
|
+
float angle = radians(materialRotation${S(W," + rotation")});
|
|
45
45
|
float cosAngle = cos(angle);
|
|
46
46
|
float sinAngle = sin(angle);
|
|
47
47
|
mat2 rotate = mat2(cosAngle, -sinAngle, sinAngle, cosAngle);
|
|
@@ -50,44 +50,34 @@ import{copy as e,set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{cre
|
|
|
50
50
|
`)}
|
|
51
51
|
|
|
52
52
|
quadOffset.xy = (quadOffset.xy + screenOffsetScaled) / viewport.zw * posProj.w;
|
|
53
|
-
`,
|
|
53
|
+
`,re=H?M?P`posProj = alignToPixelOrigin(posProj, viewport.zw) + quadOffset;`:P`posProj += quadOffset;
|
|
54
54
|
if (inputSize.x == vertexSize.x) {
|
|
55
55
|
posProj = alignToPixelOrigin(posProj, viewport.zw);
|
|
56
|
-
}`:P`posProj += quadOffset;`;
|
|
57
|
-
${
|
|
58
|
-
${E?"vcolor = interpolateVVColor(featureAttribute.y) * materialColor;":
|
|
56
|
+
}`:P`posProj += quadOffset;`;switch(Y.include(A),Y.main.add(P`
|
|
57
|
+
${ie}
|
|
58
|
+
${E?"vcolor = interpolateVVColor(featureAttribute.y) * materialColor;":N?"vcolor = color * materialColor;":"vcolor = materialColor;"}
|
|
59
59
|
|
|
60
|
-
${S(9===
|
|
60
|
+
${S(9===F,P`vcolor.a = 1.0;`)}
|
|
61
61
|
|
|
62
|
-
bool alphaDiscard = vcolor.a <
|
|
63
|
-
${S(
|
|
62
|
+
bool alphaDiscard = vcolor.a < alphaCutoff;
|
|
63
|
+
${S(M,"alphaDiscard = alphaDiscard && outlineColor.a < alphaCutoff;")}
|
|
64
64
|
if (alphaDiscard) {
|
|
65
65
|
// "early discard" if both symbol color (= fill) and outline color (if applicable) are transparent
|
|
66
66
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
67
67
|
return;
|
|
68
68
|
} else {
|
|
69
|
-
${
|
|
69
|
+
${re}
|
|
70
70
|
gl_Position = posProj;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
vtc = uv;
|
|
74
74
|
|
|
75
|
-
${S(
|
|
75
|
+
${S(I,P`debugBorderCoords = vec4(uv0, 1.5 / combinedSize);`)}
|
|
76
76
|
vsize = inputSize;
|
|
77
|
-
`),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
${S(J,P`
|
|
83
|
-
float txSize = float(textureSize(tex, 0).x);
|
|
84
|
-
float texelSize = 1.0 / txSize;
|
|
85
|
-
|
|
86
|
-
// Calculate how much we have to add/subtract to/from each texel to reach the size of an onscreen pixel
|
|
87
|
-
vec2 scaleFactor = (vsize - txSize) * texelSize;
|
|
88
|
-
samplePos += (vec2(1.0, -1.0) * texelSize) * scaleFactor;`)}
|
|
89
|
-
|
|
90
|
-
${T?P`
|
|
77
|
+
`),Z.uniforms.add(new y("tex",e=>e.texture)),J&&!ee&&(Z.include(u),Z.uniforms.add(new j("depthMap",e=>e.mainDepth),new z("occludedOpacity",e=>e.occludedFragmentOpacity?.value??1))),T&&Z.uniforms.add(new j("texOcclusion",e=>e.hudOcclusion?.attachment)),I?Z.main.add("\n float isBorder = float(any(lessThan(debugBorderCoords.xy, debugBorderCoords.zw)) || any(greaterThan(debugBorderCoords.xy, 1.0 - debugBorderCoords.zw)));\n // don't discard fragments on debug border\n float textureAlphaCutoff = isBorder > 0.0 ? 0.0 : alphaCutoff;\n "):Z.main.add("float textureAlphaCutoff = alphaCutoff;"),Z.main.add("vec2 samplePos = vtc;"),K&&Z.main.add(P`float txSize = float(textureSize(tex, 0).x);
|
|
78
|
+
float texelSize = 1.0 / txSize;
|
|
79
|
+
vec2 scaleFactor = (vsize - txSize) * texelSize;
|
|
80
|
+
samplePos += (vec2(1.0, -1.0) * texelSize) * scaleFactor;`),M?Z.main.add(P`
|
|
91
81
|
vec4 fillPixelColor = vcolor;
|
|
92
82
|
|
|
93
83
|
// Get distance in output units (i.e. pixels)
|
|
@@ -108,8 +98,8 @@ posProj = alignToPixelOrigin(posProj, viewport.zw);
|
|
|
108
98
|
outlinePixelColor.a *= outlineAlphaFactor;
|
|
109
99
|
|
|
110
100
|
if (
|
|
111
|
-
outlineAlphaFactor + fillAlphaFactor <
|
|
112
|
-
fillPixelColor.a + outlinePixelColor.a <
|
|
101
|
+
outlineAlphaFactor + fillAlphaFactor < textureAlphaCutoff ||
|
|
102
|
+
fillPixelColor.a + outlinePixelColor.a < alphaCutoff
|
|
113
103
|
) {
|
|
114
104
|
discard;
|
|
115
105
|
}
|
|
@@ -119,48 +109,35 @@ posProj = alignToPixelOrigin(posProj, viewport.zw);
|
|
|
119
109
|
vec3 compositeColor = vec3(outlinePixelColor) * outlinePixelColor.a +
|
|
120
110
|
vec3(fillPixelColor) * fillPixelColor.a * (1.0 - outlinePixelColor.a);
|
|
121
111
|
|
|
122
|
-
${S(!
|
|
112
|
+
${S(!ee,P`fragColor = vec4(compositeColor, compositeAlpha);`)}
|
|
123
113
|
} else {
|
|
124
|
-
if (fillAlphaFactor <
|
|
114
|
+
if (fillAlphaFactor < textureAlphaCutoff) {
|
|
125
115
|
discard;
|
|
126
116
|
}
|
|
127
117
|
|
|
128
|
-
${S(!
|
|
118
|
+
${S(!ee,P`fragColor = premultiplyAlpha(fillPixelColor);`)}
|
|
129
119
|
}
|
|
130
120
|
|
|
131
121
|
// visualize SDF:
|
|
132
122
|
// fragColor = vec4(clamp(-pixelDistance/vsize.x*2.0, 0.0, 1.0), clamp(pixelDistance/vsize.x*2.0, 0.0, 1.0), 0.0, 1.0);
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
${S(G&&!Z,P`
|
|
123
|
+
`):Z.main.add(P`
|
|
124
|
+
vec4 texColor = texture(tex, samplePos, -0.5);
|
|
125
|
+
if (texColor.a < textureAlphaCutoff) {
|
|
126
|
+
discard;
|
|
127
|
+
}
|
|
128
|
+
${S(!ee,P`fragColor = texColor * premultiplyAlpha(vcolor);`)}
|
|
129
|
+
`),J&&!ee&&Z.main.add(P`
|
|
142
130
|
float zSample = -linearizeDepth(texelFetch(depthMap, ivec2(gl_FragCoord.xy), 0).x);
|
|
143
131
|
float zFragment = -linearizeDepth(gl_FragCoord.z);
|
|
144
|
-
if (zSample < ${P.float(1-
|
|
132
|
+
if (zSample < ${P.float(1-U)} * zFragment) {
|
|
145
133
|
fragColor *= occludedOpacity;
|
|
146
134
|
}
|
|
147
|
-
`)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
${S(!Z&&R,P`fragColor = mix(fragColor, vec4(1.0, 0.0, 1.0, 1.0), isBorder * 0.5);`)}
|
|
151
|
-
|
|
152
|
-
${S(2===B,P`
|
|
153
|
-
if (fragColor.a < ${P.float(A)}) {
|
|
154
|
-
discard;
|
|
155
|
-
}`)}
|
|
156
|
-
`;switch(O){case 0:i.outputs.add("fragColor","vec4",0),q&&i.outputs.add("fragEmission","vec4",1),1===B&&i.outputs.add("fragAlpha","float",q?2:1),Y.main.add(P`
|
|
157
|
-
${te}
|
|
135
|
+
`),T&&Z.main.add("fragColor *= texelFetch(texOcclusion, ivec2(gl_FragCoord.xy), 0).r;"),!ee&&I&&Z.main.add("fragColor = mix(fragColor, vec4(1.0, 0.0, 1.0, 1.0), isBorder * 0.5);"),2===B&&Z.main.add(P`if (fragColor.a < alphaCutoff) {
|
|
136
|
+
discard;
|
|
137
|
+
}`),F){case 0:Z.main.add(P`
|
|
158
138
|
// Unlike other materials, the fragment shader outputs premultiplied colors.
|
|
159
139
|
// Disable this for front face rendering for correct OIT compositing.
|
|
160
140
|
${S(2===B,P`fragColor.rgb /= fragColor.a;`)}
|
|
161
141
|
${S(q,P`fragEmission = vec4(0.0);`)}
|
|
162
|
-
${S(1===B,P`fragAlpha = fragColor.a;`)}`);break;case 9:
|
|
163
|
-
${
|
|
164
|
-
outputObjectAndLayerIdColor();`);break;case 8:i.include(d,e),Y.main.add(P`
|
|
165
|
-
${te}
|
|
166
|
-
outputHighlight(${S(ee,P`voccluded == 1.0`,P`false`)});`)}return i}function D(e){return e.outlineColor[3]>0&&e.outlineSize>0}function F(o){return o.textureIsSignedDistanceField?B(o.anchorPosition,o.distanceFieldBoundingBox,V):e(V,o.anchorPosition),V}const V=i();function B(e,i,r){o(r,e[0]*(i[2]-i[0])+i[0],e[1]*(i[3]-i[1])+i[1])}const L=.08,U=Object.freeze(Object.defineProperty({__proto__:null,build:O,calculateAnchorPosition:F},Symbol.toStringTag,{value:"Module"}));export{U as H,O as b,F as c};
|
|
142
|
+
${S(1===B,P`fragAlpha = fragColor.a;`)}`);break;case 9:Z.main.add(P`outputObjectAndLayerIdColor();`);break;case 8:i.include(d,e),Z.main.add(P`
|
|
143
|
+
outputHighlight(${S(oe,P`voccluded == 1.0`,P`false`)});`)}return i}function $(e){return e.outlineColor[3]>0&&e.outlineSize>0}function V(o){return o.textureIsSignedDistanceField?B(o.anchorPosition,o.distanceFieldBoundingBox,L):e(L,o.anchorPosition),L}const L=i();function B(e,i,r){o(r,e[0]*(i[2]-i[0])+i[0],e[1]*(i[3]-i[1])+i[1])}const U=.08,T=Object.freeze(Object.defineProperty({__proto__:null,build:F,calculateAnchorPosition:V},Symbol.toStringTag,{value:"Module"}));export{T as H,F as b,V as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{addProjViewLocalOrigin as e}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as o}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{
|
|
2
|
+
import{addProjViewLocalOrigin as e}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as o}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{alphaCutoff as i}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";function a(a){const d=new n,{vertex:s,fragment:l}=d;e(s,a),s.uniforms.add(new o("width",e=>e.width)),d.attributes.add("position","vec3"),d.attributes.add("normal","vec3"),d.attributes.add("uv0","vec2"),d.attributes.add("length","float"),d.varyings.add("vtc","vec2"),d.varyings.add("vlength","float"),d.varyings.add("vradius","float"),s.main.add(r`vec3 bitangent = normal;
|
|
3
3
|
vtc = uv0;
|
|
4
4
|
vlength = length;
|
|
5
5
|
vradius = 0.5 * width;
|
|
@@ -19,10 +19,9 @@ gl_Position = proj * pos;`),l.uniforms.add(new o("outlineSize",e=>e.outlineSize)
|
|
|
19
19
|
return outlineColor;
|
|
20
20
|
}
|
|
21
21
|
return fract(0.5 / stripeLength * tc.x * vradius) >= 0.5 ? stripeOddColor : stripeEvenColor;
|
|
22
|
-
}`),l.main.add(r`
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
fragColor = color;`),a}const a=Object.freeze(Object.defineProperty({__proto__:null,build:s},Symbol.toStringTag,{value:"Module"}));export{a as M,s as b};
|
|
22
|
+
}`),l.include(i),l.main.add(r`vec2 ntc = vec2(vtc.x / vradius, vtc.y);
|
|
23
|
+
vec4 color = arrowColor(ntc, vlength / vradius);
|
|
24
|
+
if (color.a < alphaCutoff) {
|
|
25
|
+
discard;
|
|
26
|
+
}
|
|
27
|
+
fragColor = color;`),d}const d=Object.freeze(Object.defineProperty({__proto__:null,build:a},Symbol.toStringTag,{value:"Module"}));export{d as M,a as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as o}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as r}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstanceColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstanceColor.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{MaskedColorDefinition as t,CreateMaskedFromNaNColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/MaskedColor.glsl.js";import{NormalAttribute as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VerticalOffset as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as v}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{EvaluateAmbientOcclusion as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as
|
|
2
|
+
import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as o}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as r}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstanceColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstanceColor.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{MaskedColorDefinition as t,CreateMaskedFromNaNColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/MaskedColor.glsl.js";import{NormalAttribute as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VerticalOffset as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as v}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{EvaluateAmbientOcclusion as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as w,addAmbientBoostFactor as p,addLightingGlobalFactor as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as f,addMainLightIntensity as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRendering as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as C,ReadShadowMapDraw as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as O}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as N,addCameraPosition as S}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as E}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as D}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as F,If as V}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as T}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{SnowCover as I}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{colorMixModes as $}from"../views/3d/webgl-engine/materials/internal/MaterialUtil.js";import{alphaCutoff as k}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{outputColorHighlightOLID as R}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as B}from"../views/webgl/ShaderBuilder.js";function _(_){const z=new B,{attributes:U,vertex:W,fragment:H,varyings:G}=z,{output:q,offsetBackfaces:J,pbrMode:K,snowCover:Q,spherical:X}=_,Y=1===K||2===K;if(N(W,_),U.add("position","vec3"),G.add("vpos","vec3",{invariant:!0}),z.include(M,_),z.include(l,_),z.include(m,_),z.include(j,_),!o(q))return z.include(v,_),z;S(z.vertex,_),z.include(n,_),z.include(i),J&&z.include(e),G.add("vNormalWorld","vec3"),G.add("localvpos","vec3",{invariant:!0}),z.include(c,_),z.include(d,_),z.include(a,_),z.include(g,_),W.include(t),W.include(s),W.uniforms.add(new E("externalColor",e=>e.externalColor,{supportsNaN:!0})),G.add("vcolorExt","vec4"),z.include(_.instancedDoublePrecision?C:L,_),W.include(k),W.main.add(F`
|
|
3
3
|
forwardVertexColor();
|
|
4
4
|
|
|
5
5
|
MaskedColor maskedColorExt =
|
|
@@ -8,7 +8,7 @@ import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.
|
|
|
8
8
|
vcolorExt = maskedColorExt.color;
|
|
9
9
|
forwardColorMixMode(maskedColorExt.mask);
|
|
10
10
|
|
|
11
|
-
bool alphaCut = opacityMixMode != ${F.int(
|
|
11
|
+
bool alphaCut = opacityMixMode != ${F.int($.ignore)} && vcolorExt.a < alphaCutoff;
|
|
12
12
|
vpos = getVertexInLocalOriginSpace();
|
|
13
13
|
|
|
14
14
|
localvpos = vpos - view[3].xyz;
|
|
@@ -22,7 +22,7 @@ import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.
|
|
|
22
22
|
forwardLinearDepthToReadShadowMap();
|
|
23
23
|
gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
|
|
24
24
|
${V(J,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
|
|
25
|
-
`);const{hasColorTexture:Z,hasColorTextureTransform:ee}=_;return H.include(
|
|
25
|
+
`);const{hasColorTexture:Z,hasColorTextureTransform:ee}=_;return H.include(w,_),H.include(b,_),z.include(O,_),H.include(r,_),z.include(R,_),S(H,_),f(H),p(H),u(H),H.uniforms.add(W.uniforms.get("localOrigin"),W.uniforms.get("view"),new A("ambient",e=>e.ambient),new A("diffuse",e=>e.diffuse),new D("opacity",e=>e.opacity),new D("layerOpacity",e=>e.layerOpacity)),Z&&H.uniforms.add(new T("tex",e=>e.texture)),z.include(x,_),H.include(y,_),H.include(P),H.include(I,_),h(H),H.main.add(F`
|
|
26
26
|
discardBySlice(vpos);
|
|
27
27
|
discardByTerrainDepth();
|
|
28
28
|
vec4 texColor = ${Z?`texture(tex, ${ee?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{LineStipple as n,computePixelSize as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{PiUtils as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{positionOutsideClipSpace as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{NoPerspectiveWrite as d,NoPerspectiveRead as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js";import{addProjViewLocalOrigin as m,addPixelRatio as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as
|
|
2
|
+
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{ObjectAndLayerIdColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{LineStipple as n,computePixelSize as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{PiUtils as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{positionOutsideClipSpace as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{NoPerspectiveWrite as d,NoPerspectiveRead as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js";import{addProjViewLocalOrigin as m,addPixelRatio as v}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as u}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as S}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as D,If as x}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as L}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{alphaCutoff as w}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{AnimatedLine as b}from"../views/3d/webgl-engine/shaders/AnimatedLine.glsl.js";import{outputColorHighlightOLID as y}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as P}from"../views/webgl/ShaderBuilder.js";const j=1;function z(z){const C=new P,{attributes:W,varyings:R,vertex:F,fragment:A}=C,{applyMarkerOffset:V,draped:T,output:E,capType:O,stippleEnabled:N,falloffEnabled:M,roundJoins:$,wireframe:_,innerColorEnabled:k,hasAnimation:I,hasScreenSizePerspective:B,worldSizedImagePattern:H}=z;A.include(a),C.include(t,z),C.include(n,z),C.include(i,z),C.include(l,z),C.include(b,z);const J=V&&!T;J&&(F.uniforms.add(new S("markerScale",e=>e.markerScale)),C.include(o,{space:2,hasScreenSizePerspective:B})),m(F,z),F.uniforms.add(new L("inverseProjectionMatrix",e=>e.camera.inverseProjectionMatrix),new f("nearFar",e=>e.camera.nearFar),new S("miterLimit",e=>"miter"!==e.join?0:e.miterLimit),new g("viewport",e=>e.camera.fullViewport)),F.constants.add("LARGE_HALF_FLOAT","float",65500),W.add("position","vec3"),W.add("previousDelta","vec4"),W.add("nextDelta","vec4"),W.add("lineParameters","vec2"),W.add("u0","float"),R.add("vColor","vec4"),R.add("vpos","vec3",{invariant:!0}),R.add("vLineDistance","float"),R.add("vLineWidth","float");const U=N;U&&R.add("vLineSizeInv","float");const G=2===O,q=N&&G,K=M||q;K&&R.add("vLineDistanceNorm","float"),G&&(R.add("vSegmentSDF","float"),R.add("vReverseSegmentSDF","float")),F.code.add(D`vec2 perpendicular(vec2 v) {
|
|
3
3
|
return vec2(v.y, -v.x);
|
|
4
4
|
}
|
|
5
5
|
float interp(float ncp, vec4 a, vec4 b) {
|
|
@@ -45,7 +45,7 @@ if (next.z > -nearFar[0]) {
|
|
|
45
45
|
next = mix(next, pos, interp(vnp, next, pos));
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
}`),v(F),F.constants.add("aaWidth","float"
|
|
48
|
+
}`),v(F),F.constants.add("aaWidth","float",N?0:1).main.add(D`
|
|
49
49
|
// unpack values from vertex type
|
|
50
50
|
bool isStartVertex = abs(abs(lineParameters.y) - 3.0) == 1.0;
|
|
51
51
|
vec3 prevPosition = position + previousDelta.xyz * previousDelta.w;
|
|
@@ -87,8 +87,8 @@ pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos.xyz) * 0.5;
|
|
|
87
87
|
float rightLen = length(right);
|
|
88
88
|
|
|
89
89
|
float lineSize = getSize(${x(B,"clippedPos")});
|
|
90
|
-
${x(
|
|
91
|
-
${x(
|
|
90
|
+
${x(N&&B,"float patternLineSize = getSize(clippedCenter);")}
|
|
91
|
+
${x(N&&!B,"float patternLineSize = lineSize;")}
|
|
92
92
|
|
|
93
93
|
${x(H,D`
|
|
94
94
|
lineSize += aaWidth;
|
|
@@ -109,7 +109,7 @@ pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos.xyz) * 0.5;
|
|
|
109
109
|
|
|
110
110
|
vLineWidth = noPerspectiveWrite(lineWidth, pos.w);
|
|
111
111
|
${U?D`vLineSizeInv = noPerspectiveWrite(1.0 / lineSize, pos.w);`:""}
|
|
112
|
-
`);(
|
|
112
|
+
`);(N||G)&&F.main.add(D`
|
|
113
113
|
float isEndVertex = float(!isStartVertex);
|
|
114
114
|
vec2 segmentOrigin = mix(pos.xy, prev.xy, isEndVertex);
|
|
115
115
|
vec2 segment = mix(right, left, isEndVertex);
|
|
@@ -131,14 +131,14 @@ displacementLen = min(displacementLen, min(leftLen, rightLen)/abs(nDotSeg));
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
float subdivisionFactor = lineParameters.x;
|
|
134
|
-
if (isOutside && (displacementLen > miterLimit * lineWidth)) {`)
|
|
134
|
+
if (isOutside && (displacementLen > miterLimit * lineWidth)) {`),$?F.main.add(D`
|
|
135
135
|
vec2 startDir = leftLen < 0.001 ? right : left;
|
|
136
136
|
startDir = perpendicular(startDir);
|
|
137
137
|
|
|
138
138
|
vec2 endDir = rightLen < 0.001 ? left : right;
|
|
139
139
|
endDir = perpendicular(endDir);
|
|
140
140
|
|
|
141
|
-
float factor = ${
|
|
141
|
+
float factor = ${N?D`min(1.0, subdivisionFactor * ${D.float((j+2)/(j+1))})`:D`subdivisionFactor`};
|
|
142
142
|
|
|
143
143
|
float rotationAngle = acos(clamp(dot(startDir, endDir), -1.0, 1.0));
|
|
144
144
|
joinDisplacementDir = rotate(startDir, -sign(lineParameters.y) * factor * rotationAngle);
|
|
@@ -172,14 +172,14 @@ joinDisplacementDir = perpendicular(joinDisplacementDir);`);const Q=0!==O;return
|
|
|
172
172
|
pos.xy += dpos;
|
|
173
173
|
`),G&&F.main.add(D`vec2 segmentDir = normalize(segment);
|
|
174
174
|
vSegmentSDF = noPerspectiveWrite((isJoin && isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentOrigin, segmentDir)), pos.w);
|
|
175
|
-
vReverseSegmentSDF = noPerspectiveWrite((isJoin && !isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentEnd, -segmentDir)), pos.w);`)
|
|
175
|
+
vReverseSegmentSDF = noPerspectiveWrite((isJoin && !isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentEnd, -segmentDir)), pos.w);`),N&&(T?F.uniforms.add(new u("worldToScreenRatio",e=>1/e.screenToPCSRatio)):F.main.add(D`vec3 segmentCenter = mix((nextPosition + position) * 0.5, (position + prevPosition) * 0.5, isEndVertex);
|
|
176
176
|
float worldToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),F.main.add(D`float segmentLengthScreenDouble = length(segment);
|
|
177
177
|
float segmentLengthScreen = segmentLengthScreenDouble * 0.5;
|
|
178
178
|
float discreteWorldToScreenRatio = discretizeWorldToScreenRatio(worldToScreenRatio);
|
|
179
179
|
float segmentLengthRender = length(mix(nextPosition - position, position - prevPosition, isEndVertex));
|
|
180
180
|
vStipplePatternStretch = worldToScreenRatio / discreteWorldToScreenRatio;`),T?F.main.add(D`float segmentLengthPseudoScreen = segmentLengthScreen / pixelRatio * discreteWorldToScreenRatio / worldToScreenRatio;
|
|
181
181
|
float startPseudoScreen = u0 * discreteWorldToScreenRatio - mix(0.0, segmentLengthPseudoScreen, isEndVertex);`):F.main.add(D`float startPseudoScreen = mix(u0, u0 - segmentLengthRender, isEndVertex) * discreteWorldToScreenRatio;
|
|
182
|
-
float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRatio;`),F.uniforms.add(new
|
|
182
|
+
float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRatio;`),F.uniforms.add(new S("stipplePatternPixelSize",e=>r(e))),F.main.add(D`
|
|
183
183
|
float patternLength = patternLineSize * stipplePatternPixelSize;
|
|
184
184
|
|
|
185
185
|
${x(H,D`
|
|
@@ -234,43 +234,37 @@ float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRat
|
|
|
234
234
|
vpos = (inverseProjectionMatrix * pos).xyz;
|
|
235
235
|
gl_Position = pos;
|
|
236
236
|
forwardObjectAndLayerIdColor();
|
|
237
|
-
}`),C.fragment.include(e,z),C.include(
|
|
238
|
-
discardByTerrainDepth();`),C.include(c),A.main.add(D`
|
|
237
|
+
}`),C.fragment.include(e,z),C.include(y,z),A.include(p),A.main.add(D`discardBySlice(vpos);
|
|
238
|
+
discardByTerrainDepth();`),C.include(c),A.include(w),A.main.add(D`
|
|
239
239
|
float lineWidth = noPerspectiveRead(vLineWidth);
|
|
240
240
|
float lineDistance = noPerspectiveRead(vLineDistance);
|
|
241
241
|
${x(K,D`float lineDistanceNorm = noPerspectiveRead(vLineDistanceNorm);`)}
|
|
242
|
-
`),_?A.main.add(D`vec4 finalColor = vec4(1.0, 0.0, 1.0, 1.0);`):(G&&A.main.add(D`
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
float stippleRadius = length(stipplePosition * lineWidth);
|
|
259
|
-
float stippleCapSDF = (stippleRadius - lineWidth) * 0.5; // Divide by 2 to transform from double pixel scale
|
|
260
|
-
float stippleCoverage = clamp(0.5 - stippleCapSDF, 0.0, 1.0);
|
|
261
|
-
float stippleAlpha = step(${D.float(P)}, stippleCoverage);
|
|
262
|
-
`):A.main.add(D`float stippleAlpha = getStippleAlpha(lineWidth);`),9!==E&&A.main.add(D`discardByStippleAlpha(stippleAlpha, ${D.float(P)});`),C.include(c),A.uniforms.add(new h("intrinsicColor",e=>e.color)).main.add(D`vec4 color = intrinsicColor * vColor;
|
|
263
|
-
color.a = noPerspectiveRead(color.a);`),k&&A.uniforms.add(new h("innerColor",e=>e.innerColor??e.color),new u("innerWidth",(e,i)=>e.innerWidth*i.camera.pixelRatio)).main.add(D`float distToInner = abs(lineDistance) - innerWidth;
|
|
242
|
+
`),_?A.main.add(D`vec4 finalColor = vec4(1.0, 0.0, 1.0, 1.0);`):(G&&A.main.add(D`float sdf = noPerspectiveRead(min(vSegmentSDF, vReverseSegmentSDF));
|
|
243
|
+
vec2 fragmentPosition = vec2(min(sdf, 0.0), lineDistance);
|
|
244
|
+
float fragmentRadius = length(fragmentPosition);
|
|
245
|
+
float fragmentCapSDF = (fragmentRadius - lineWidth) * 0.5;
|
|
246
|
+
float capCoverage = clamp(0.5 - fragmentCapSDF, 0.0, 1.0);
|
|
247
|
+
if (capCoverage < alphaCutoff) {
|
|
248
|
+
discard;
|
|
249
|
+
}`),q?A.main.add(D`vec2 stipplePosition = vec2(
|
|
250
|
+
min(getStippleSDF() * 2.0 - 1.0, 0.0),
|
|
251
|
+
lineDistanceNorm
|
|
252
|
+
);
|
|
253
|
+
float stippleRadius = length(stipplePosition * lineWidth);
|
|
254
|
+
float stippleCapSDF = (stippleRadius - lineWidth) * 0.5;
|
|
255
|
+
float stippleCoverage = clamp(0.5 - stippleCapSDF, 0.0, 1.0);
|
|
256
|
+
float stippleAlpha = step(alphaCutoff, stippleCoverage);`):A.main.add(D`float stippleAlpha = getStippleAlpha(lineWidth);`),9!==E&&A.main.add(D`discardByStippleAlpha(stippleAlpha, alphaCutoff);`),C.include(c),A.uniforms.add(new h("intrinsicColor",e=>e.color)).main.add(D`vec4 color = intrinsicColor * vColor;
|
|
257
|
+
color.a = noPerspectiveRead(color.a);`),k&&A.uniforms.add(new h("innerColor",e=>e.innerColor??e.color),new S("innerWidth",(e,i)=>e.innerWidth*i.camera.pixelRatio)).main.add(D`float distToInner = abs(lineDistance) - innerWidth;
|
|
264
258
|
float innerAA = clamp(0.5 - distToInner, 0.0, 1.0);
|
|
265
259
|
float innerAlpha = innerColor.a + color.a * (1.0 - innerColor.a);
|
|
266
|
-
color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);`),A.main.add(D`vec4 finalColor = blendStipple(color, stippleAlpha);`),
|
|
260
|
+
color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);`),A.main.add(D`vec4 finalColor = blendStipple(color, stippleAlpha);`),M&&(A.uniforms.add(new S("falloff",e=>e.falloff)),A.main.add(D`finalColor.a *= pow(max(0.0, 1.0 - abs(lineDistanceNorm)), falloff);`)),N||A.main.add(D`float featherStartDistance = max(lineWidth - 2.0, 0.0);
|
|
267
261
|
float value = abs(lineDistance);
|
|
268
262
|
float feather = (value - featherStartDistance) / (lineWidth - featherStartDistance);
|
|
269
263
|
finalColor.a *= 1.0 - clamp(feather, 0.0, 1.0);`),I&&A.main.add(D`
|
|
270
264
|
finalColor = animate(finalColor);
|
|
271
265
|
|
|
272
266
|
${x(9!==E,D`
|
|
273
|
-
if (finalColor.a <=
|
|
267
|
+
if (finalColor.a <= alphaCutoff) {
|
|
274
268
|
discard;
|
|
275
269
|
}`)}
|
|
276
270
|
`)),A.main.add(D`outputColorHighlightOLID(applySlice(finalColor, vpos), finalColor.rgb);`),C}const C=Object.freeze(Object.defineProperty({__proto__:null,build:z,ribbonlineNumRoundJoinSubdivisions:j},Symbol.toStringTag,{value:"Module"}));export{C as R,z as b,j as r};
|
package/chunks/Terrain.glsl.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{normalize as r,set as i}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{addLinearDepth as l}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{addNearFar as t}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{SliceDraw as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as s}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{NormalAttribute as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexTangent as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js";import{OutputDepth as
|
|
2
|
+
import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{normalize as r,set as i}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{addLinearDepth as l}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{addNearFar as t}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{SliceDraw as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as s}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{NormalAttribute as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexTangent as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js";import{OutputDepth as g}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as v}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{EvaluateAmbientOcclusion as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as w,addAmbientBoostFactor as f,addLightingGlobalFactor as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as b,addMainLightIntensity as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{NormalUtils as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{ReadShadowMapDraw as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayTerrain as L}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{OverlayTerrainPassParameters as j,TerrainTexture as x}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js";import{addProjViewLocalOrigin as T,addViewNormal as M,addCameraPosition as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3BindUniform as S}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{glsl as z,If as D}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4DrawUniform as $}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{Texture2DBindUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{alphaCutoff as F}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{outputColorHighlightOLID as _}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as V}from"../views/webgl/ShaderBuilder.js";class N extends j{}function W(o){const a=new V,{attributes:j,vertex:N,fragment:W,varyings:H}=a;j.add("position","vec3"),a.include(d,o),a.include(c,o);const U=()=>{a.include(C,o),N.code.add(z`vec3 getNormal() {
|
|
3
3
|
float z = 1.0 - abs(normalCompressed.x) - abs(normalCompressed.y);
|
|
4
4
|
vec3 n = vec3(normalCompressed + vec2(normalCompressed.x >= 0.0 ? 1.0 : -1.0,
|
|
5
5
|
normalCompressed.y >= 0.0 ? 1.0 : -1.0) * min(z, 0.0), z);
|
|
6
6
|
return normalize(n);
|
|
7
|
-
}`)};T(N,o),a.include(s);const{output:E,overlayMode:I,tileBorders:q,transparencyMode:R,overlayEnabled:G}=o,J=2===R||3===R,K=0!==o.pbrMode,Q=G&&J;switch(E){case 0:{a.include(x,o),W.include(w,o),G&&a.include(L,o);const l=2===I;l&&a.include(m,o),H.add("vnormal","vec3"),H.add("vpos","vec3",{invariant:!0}),H.add("vup","vec3"),U(),N.main.add(
|
|
7
|
+
}`)};T(N,o),a.include(s),W.include(F);const{output:E,overlayMode:I,tileBorders:q,transparencyMode:R,overlayEnabled:G}=o,J=2===R||3===R,K=0!==o.pbrMode,Q=G&&J;switch(E){case 0:{a.include(x,o),W.include(w,o),G&&a.include(L,o);const l=2===I;l&&a.include(m,o),H.add("vnormal","vec3"),H.add("vpos","vec3",{invariant:!0}),H.add("vup","vec3"),U(),N.main.add(z`
|
|
8
8
|
vpos = position;
|
|
9
9
|
vec3 positionWorld = position + localOrigin;
|
|
10
10
|
gl_Position = transformPosition(proj, view, vpos);
|
|
11
11
|
vnormal = getNormal();
|
|
12
12
|
vup = getLocalUp(position, localOrigin);
|
|
13
|
-
${
|
|
13
|
+
${D(l,z`forwardVertexTangent(vnormal);`)}
|
|
14
14
|
|
|
15
15
|
forwardTextureCoordinatesWithTransform(uv0);
|
|
16
|
-
${
|
|
17
|
-
${
|
|
18
|
-
forwardLinearDepthToReadShadowMap();`),a.include(O,o),W.include(n,o),W.include(w,o),W.include(p,o),a.include(
|
|
16
|
+
${D(G,"setOverlayVTC(uv0);")}
|
|
17
|
+
${D(q,"forwardTextureCoordinates();")}
|
|
18
|
+
forwardLinearDepthToReadShadowMap();`),a.include(O,o),W.include(n,o),W.include(w,o),W.include(p,o),a.include(_,o),P(W,o),f(W),h(W),W.uniforms.add(N.uniforms.get("localOrigin"),new S("viewDirection",({camera:e})=>r(B,i(B,e.viewMatrix[12],e.viewMatrix[13],e.viewMatrix[14])))),l&&W.uniforms.add(new A("ovWaterTex",e=>e.overlay?.getTexture(3)),new $("view",({origin:o},{camera:r})=>e(k,r.viewMatrix,o))),b(W),y(W),W.main.add(z`
|
|
19
19
|
vec3 normal = normalize(vnormal);
|
|
20
20
|
float lightAlignment = dot(normal, mainLightDirection);
|
|
21
21
|
|
|
@@ -24,13 +24,13 @@ return normalize(n);
|
|
|
24
24
|
float ssao = evaluateAmbientOcclusionInverse();
|
|
25
25
|
vec4 tileColor = getTileColor();
|
|
26
26
|
|
|
27
|
-
${
|
|
27
|
+
${D(G,z`vec4 overlayColorOpaque = getOverlayColor(ovColorTex, vtcOverlay);
|
|
28
28
|
vec4 overlayColor = overlayOpacity * overlayColorOpaque;
|
|
29
|
-
${
|
|
29
|
+
${D(J,"if (overlayColor.a < alphaCutoff) { discard; }")}
|
|
30
30
|
vec4 groundColor = tileColor;
|
|
31
31
|
tileColor = tileColor * (1.0 - overlayColor.a) + overlayColor;`)}
|
|
32
32
|
|
|
33
|
-
if(tileColor.a <
|
|
33
|
+
if(tileColor.a < alphaCutoff) {
|
|
34
34
|
discard;
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -44,8 +44,8 @@ return normalize(n);
|
|
|
44
44
|
// heuristic shading function used in the old terrain, now used to add ambient lighting
|
|
45
45
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
46
46
|
|
|
47
|
-
${K?
|
|
48
|
-
${
|
|
47
|
+
${K?z`vec4 finalColor = vec4(evaluatePBRSimplifiedLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight, normalize(vpos - cameraPosition), vup), tileColor.a);`:z`vec4 finalColor = vec4(evaluateSceneLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight), tileColor.a);`}
|
|
48
|
+
${D(l,z`vec4 overlayWaterMask = getOverlayColor(ovWaterTex, vtcOverlay);
|
|
49
49
|
float waterNormalLength = length(overlayWaterMask);
|
|
50
50
|
if (waterNormalLength > 0.95) {
|
|
51
51
|
mat3 tbnMatrix = mat3(tbnTangent, tbnBiTangent, vnormal);
|
|
@@ -57,25 +57,25 @@ return normalize(n);
|
|
|
57
57
|
// un-gamma the ground color to mix in linear space
|
|
58
58
|
finalColor = mix(groundColor, waterColorNonLinear, waterColorLinear.w) * opacity;
|
|
59
59
|
}`)}
|
|
60
|
-
${
|
|
60
|
+
${D(q,z`vec2 dVuv = fwidth(vuv0);
|
|
61
61
|
vec2 edgeFactors = smoothstep(vec2(0.0), 1.5 * dVuv, min(vuv0, 1.0 - vuv0));
|
|
62
62
|
float edgeFactor = 1.0 - min(edgeFactors.x, edgeFactors.y);
|
|
63
63
|
finalColor = mix(finalColor, vec4(1.0, 0.0, 0.0, 1.0), edgeFactor);`)}
|
|
64
|
-
outputColorHighlightOLID(applySlice(finalColor, vpos), finalColor.rgb);`)}break;case 1:Q&&a.include(L,o),N.main.add(
|
|
65
|
-
${
|
|
66
|
-
gl_Position = transformPosition(proj, view, position);`),W.main.add(`${
|
|
67
|
-
${
|
|
64
|
+
outputColorHighlightOLID(applySlice(finalColor, vpos), finalColor.rgb);`)}break;case 1:Q&&a.include(L,o),N.main.add(z`
|
|
65
|
+
${D(Q,"setOverlayVTC(uv0);")}
|
|
66
|
+
gl_Position = transformPosition(proj, view, position);`),W.main.add(`${D(Q,"if (getCombinedOverlayColor().a < alphaCutoff) discard;")}`);break;case 3:case 4:case 5:case 6:case 7:a.include(g,o),l(a),t(a),N.main.add(z`gl_Position = transformPositionWithDepth(proj, view, position, nearFar, linearDepth);`),W.main.add(z`outputDepth(linearDepth);`);break;case 2:Q&&a.include(L,o),H.add("vnormal","vec3"),M(N),U(),N.main.add(z`
|
|
67
|
+
${D(Q,"setOverlayVTC(uv0);")}
|
|
68
68
|
gl_Position = transformPosition(proj, view, position);
|
|
69
|
-
vnormal = normalize((viewNormal * vec4(getNormal(), 1.0)).xyz);`),W.main.add(
|
|
70
|
-
${
|
|
69
|
+
vnormal = normalize((viewNormal * vec4(getNormal(), 1.0)).xyz);`),W.main.add(z`
|
|
70
|
+
${D(Q,"if (getCombinedOverlayColor().a < alphaCutoff) discard;")}
|
|
71
71
|
vec3 normal = normalize(vnormal);
|
|
72
72
|
if (gl_FrontFacing == false) {
|
|
73
73
|
normal = -normal;
|
|
74
74
|
}
|
|
75
|
-
fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case 8:G&&(a.include(L,o),a.include(u,o)),N.main.add(
|
|
76
|
-
${
|
|
77
|
-
gl_Position = transformPosition(proj, view, position);`),a.include(
|
|
78
|
-
${
|
|
75
|
+
fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case 8:G&&(a.include(L,o),a.include(u,o)),N.main.add(z`
|
|
76
|
+
${D(G,"setOverlayVTC(uv0);")}
|
|
77
|
+
gl_Position = transformPosition(proj, view, position);`),a.include(v,o),W.main.add(z`
|
|
78
|
+
${D(G,z`
|
|
79
79
|
calculateOcclusionAndOutputHighlight(getAllOverlayHighlightValuesEncoded());`,"calculateOcclusionAndOutputHighlight();")}
|
|
80
|
-
`);break;case 9:if(G)a.include(L,o),N.main.add(
|
|
81
|
-
setOverlayVTC(uv0);`),W.main.add(
|
|
80
|
+
`);break;case 9:if(G)a.include(L,o),N.main.add(z`gl_Position = transformPosition(proj, view, position);
|
|
81
|
+
setOverlayVTC(uv0);`),W.main.add(z`fragColor = getOverlayColorTexel();`);else{const e=0===R;N.main.add(z`${D(e,"gl_Position = transformPosition(proj, view, position);")}`),W.main.add(z`fragColor = vec4(0.0);`)}}return a}const k=o(),B=a(),H=Object.freeze(Object.defineProperty({__proto__:null,TerrainPassParameters:N,build:W},Symbol.toStringTag,{value:"Module"}));export{N as T,H as a,W as b};
|
package/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.1.0-next.
|
|
2
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.1.0-next.18";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.1";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.1.0-next.
|
|
2
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.1";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.1.0-next.18",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
|
package/package.json
CHANGED
package/support/revision.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
const
|
|
2
|
+
const e="20260217",d="282382aee1d91e5e87f038fd81e52dac3d56632c";export{e as buildDate,d as commitHash};
|