@arcgis/core 5.2.0-next.86 → 5.2.0-next.87
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/0993e51d3a9701ed2198.js +1 -0
- package/assets/esri/core/workers/chunks/114ba901fd319ce87dc6.js +1 -0
- package/assets/esri/core/workers/chunks/{3aeb934ebdab1d8c4608.js → 12a3b55195ce3244259d.js} +1 -1
- package/assets/esri/core/workers/chunks/{7c3d46201b11a45f79d0.js → 39c0a3eb6a870953d530.js} +74 -107
- package/assets/esri/core/workers/chunks/3b009c05eaec5a7048a8.js +1 -0
- package/assets/esri/core/workers/chunks/3b376318df4ff8519370.js +1 -0
- package/assets/esri/core/workers/chunks/{a0da026a06de379b8f39.js → 3de20165796fa4f76728.js} +1 -1
- package/assets/esri/core/workers/chunks/414093fa4957d17bf551.js +1 -0
- package/assets/esri/core/workers/chunks/{4ec306e5c11808b96e07.js → 48b31b8534e7bfe42976.js} +1 -1
- package/assets/esri/core/workers/chunks/48f6af09436723f2d861.js +1 -0
- package/assets/esri/core/workers/chunks/5536cee0dfc183584a9b.js +1 -0
- package/assets/esri/core/workers/chunks/6561c01c67db1f4c546e.js +1 -0
- package/assets/esri/core/workers/chunks/68705692335d57522030.js +1 -0
- package/assets/esri/core/workers/chunks/{ed5e9718c4dcad1156f7.js → 6f2a9259240769c7cd6e.js} +1 -1
- package/assets/esri/core/workers/chunks/7b2174b19d06c16715f0.js +1 -0
- package/assets/esri/core/workers/chunks/{b015b8c7a073dbc4a3ad.js → 820c530b8765ecb1f36e.js} +1 -1
- package/assets/esri/core/workers/chunks/830daaca32352da6eebe.js +1 -0
- package/assets/esri/core/workers/chunks/8c2921081ca3e7fd0385.js +1 -0
- package/assets/esri/core/workers/chunks/9407db0584c730591161.js +1 -0
- package/assets/esri/core/workers/chunks/9658b46a7111cda53b0d.js +1 -0
- package/assets/esri/core/workers/chunks/974bcaf2a059b8cfb153.js +1 -0
- package/assets/esri/core/workers/chunks/9c7fc1c97125ea2a7b7e.js +1 -0
- package/assets/esri/core/workers/chunks/9ee6e8a6b9bfda758c21.js +1 -0
- package/assets/esri/core/workers/chunks/b3c518ca8679fbe16ece.js +1 -0
- package/assets/esri/core/workers/chunks/b61b7005edd9ced925e9.js +1 -0
- package/assets/esri/core/workers/chunks/c1a7c475ce0c59ffa75a.js +1 -0
- package/assets/esri/core/workers/chunks/{3da39efc5f68f15c105f.js → c2b2942456f1b10d0e96.js} +1 -1
- package/assets/esri/core/workers/chunks/c5dc2743c7116d0bc0d8.js +1 -0
- package/assets/esri/core/workers/chunks/c68cc3b9c170b8de22dc.js +1 -0
- package/assets/esri/core/workers/chunks/d56603e1d0031f3c5f3b.js +1 -0
- package/assets/esri/core/workers/chunks/e474106292834633e7d4.js +1 -0
- package/assets/esri/core/workers/chunks/{d09491b340af3b779505.js → f988d5a6dcc15fe34797.js} +1 -1
- package/assets/esri/core/workers/chunks/fbd02e8277fe2252ecd2.js +1 -0
- package/assets/esri/themes/base/widgets/_BuildingDisciplinesTree.scss +1 -1
- package/assets/esri/themes/base/widgets/_Daylight.scss +2 -2
- package/assets/esri/themes/base/widgets/_Editor.scss +1 -1
- package/assets/esri/themes/base/widgets/_Sketch.scss +1 -1
- package/assets/esri/themes/base/widgets/_SketchTooltipControls.scss +1 -1
- package/assets/esri/themes/base/widgets/_Slider.scss +1 -1
- package/assets/esri/themes/base/widgets/_SnappingControls.scss +1 -1
- package/assets/esri/themes/base/widgets/_TimezonePicker.scss +1 -1
- package/chunks/EmissionComposite.glsl.js +2 -2
- package/chunks/GlobalIllumination.glsl.js +69 -102
- package/chunks/RibbonLine.glsl.js +202 -141
- package/config.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/geometry/operators/projectOperator.d.ts +1 -1
- package/geometry/operators/shapePreservingProjectOperator.d.ts +15 -1
- package/geometry/operators/support/GeographicTransformation.d.ts +4 -3
- package/geometry/operators/support/GeographicTransformationStep.d.ts +2 -1
- package/geometry/operators/support/geographicTransformationUtils.d.ts +22 -15
- package/geometry/operators/types.d.ts +2 -1
- package/geometry/support/convexPolyhedron.js +2 -0
- package/geometry/support/frustum.js +1 -1
- package/kernel.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/support/mediaUtils.js +1 -1
- package/package.json +3 -3
- package/popup/FeatureContentCollection.js +1 -1
- package/support/actions/ActionBase.d.ts +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/state/utils/ropePullUtils.js +2 -0
- package/views/3d/support/ElevationAgnosticVisibility.js +2 -0
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/sphericalTileUtils.js +2 -0
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js +9 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +5 -8
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +39 -51
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/popupAdapter.js +1 -1
- package/assets/esri/core/workers/chunks/05acc17cb66fa6c08845.js +0 -1
- package/assets/esri/core/workers/chunks/11224af8b037ccbf252c.js +0 -1
- package/assets/esri/core/workers/chunks/17a10916114754f1f216.js +0 -1
- package/assets/esri/core/workers/chunks/1b4e050a3884fc6fa6cf.js +0 -1
- package/assets/esri/core/workers/chunks/2f652b330a9978a68e83.js +0 -1
- package/assets/esri/core/workers/chunks/33d6ca59eeb88e739c81.js +0 -1
- package/assets/esri/core/workers/chunks/3cecf627827f5d9213a9.js +0 -1
- package/assets/esri/core/workers/chunks/40ec85b7813a396ee490.js +0 -1
- package/assets/esri/core/workers/chunks/5903dceb172897e5675b.js +0 -1
- package/assets/esri/core/workers/chunks/5e5a05abcb41915802f6.js +0 -1
- package/assets/esri/core/workers/chunks/62f37d1075390a177ae9.js +0 -1
- package/assets/esri/core/workers/chunks/73cb944b87ffce33bb49.js +0 -1
- package/assets/esri/core/workers/chunks/86de2d1f13915ab7a51d.js +0 -1
- package/assets/esri/core/workers/chunks/9b5e890fb0ab29f3a3f1.js +0 -1
- package/assets/esri/core/workers/chunks/ad29b77843a7d93d9f8a.js +0 -1
- package/assets/esri/core/workers/chunks/b812f817c465c64e8c63.js +0 -1
- package/assets/esri/core/workers/chunks/b94b36581842749863f0.js +0 -1
- package/assets/esri/core/workers/chunks/bc6e488f5fbd50f9f3d0.js +0 -1
- package/assets/esri/core/workers/chunks/c229325f41f10fe7f732.js +0 -1
- package/assets/esri/core/workers/chunks/ca6652c6304ad0e37e8f.js +0 -1
- package/assets/esri/core/workers/chunks/d4d2a0d882fef463e7bc.js +0 -1
- package/assets/esri/core/workers/chunks/da45d9576b8d66131623.js +0 -1
- package/assets/esri/core/workers/chunks/e76662562e03eef52ba4.js +0 -1
- package/assets/esri/core/workers/chunks/f1d0208c6b09c1c4b248.js +0 -1
- package/assets/esri/core/workers/chunks/f3680b71d496839de72c.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{LineStipple as i,computePixelSize as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{PiUtils as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{positionOutsideClipSpace as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{ColorConversion as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{NoPerspectiveWrite as l,NoPerspectiveRead as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js";import{addProjViewLocalOrigin as c,addPixelRatio as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as
|
|
2
|
+
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{LineStipple as i,computePixelSize as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js";import{MarkerSizing as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{PiUtils as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{positionOutsideClipSpace as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{ColorConversion as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{NoPerspectiveWrite as l,NoPerspectiveRead as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js";import{addProjViewLocalOrigin as c,addPixelRatio as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as h}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as S,If as u}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{alphaCutoff as D}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{AnimatedLine as L}from"../views/3d/webgl-engine/shaders/AnimatedLine.glsl.js";import{outputColorHighlightOLID as b}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{getTextureBackedBufferModule as w}from"../views/3d/webgl-engine/shaders/RibbonLineTextureBuffer.glsl.js";import{ShaderBuilder as y}from"../views/webgl/ShaderBuilder.js";const C=1;function P(C){const P=new y,{attributes:F,varyings:j,vertex:z,fragment:A}=P,{applyMarkerOffset:W,draped:T,output:I,capType:R,stippleEnabled:V,falloffEnabled:N,wireframe:E,innerColorEnabled:O,hasAnimation:J,hasScreenSizePerspective:_,worldSizedImagePattern:$}=C,M=2===R,H=V&&M,U=N||H,B=V||M,k=w(C).createBuilder(P,C);z.inputs.add("position",()=>k.getTextureAttribute("position")),C.hasVVSize?z.inputs.add("sizeFeatureAttribute",()=>k.getTextureAttribute("sizeFeatureAttribute")):z.inputs.add("size",()=>k.getTextureAttribute("size")),C.hasVVOpacity&&z.inputs.add("opacityFeatureAttribute",()=>k.getTextureAttribute("opacityFeatureAttribute")),C.hasVVColor?z.inputs.add("colorFeatureAttribute",()=>k.getTextureAttribute("colorFeatureAttribute")):z.inputs.add("color",()=>k.getTextureAttribute("color")),A.include(o),P.include(t,C),P.include(i,C);const G={animation:C.animation,hasAnimation:C.hasAnimation,timeStampsExpr:k.getTextureAttribute("timeStamps")};P.include(L,G),11===I?(P.varyings.add("objectAndLayerIdColorVarying","vec4"),z.code.add(S`
|
|
3
3
|
vec4 getOlidColor() {
|
|
4
|
-
return ${
|
|
4
|
+
return ${k.getTextureAttribute("olidColor")};
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
void forwardObjectAndLayerIdColor() {
|
|
@@ -9,40 +9,40 @@ import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.gls
|
|
|
9
9
|
}
|
|
10
10
|
`),A.code.add(S`void outputObjectAndLayerIdColor() {
|
|
11
11
|
fragColor = objectAndLayerIdColorVarying;
|
|
12
|
-
}`)):(
|
|
12
|
+
}`)):(z.code.add(S`void forwardObjectAndLayerIdColor() {}`),A.code.add(S`void outputObjectAndLayerIdColor() {}`));const X=W&&!T;return X&&(z.uniforms.add(new g("markerScale",e=>e.markerScale)),P.include(r,{space:2,hasScreenSizePerspective:_})),c(z,C),z.uniforms.add(new x("inverseProjectionMatrix",e=>e.camera.inverseProjectionMatrix),new m("nearFar",e=>e.camera.nearFar),new g("miterLimit",e=>"miter"!==e.join?0:e.miterLimit),new v("viewport",e=>e.camera.fullViewport)),z.constants.add("LARGE_HALF_FLOAT","float",65500),z.constants.add("EPS","float",.001),z.constants.add("NUM_JOIN_SUBDIVISIONS","float",C.numJoinSubdivisions),F.add("textureElementIndex","uint"),F.add("lineParameters","vec2"),j.add("vColor","vec4"),j.add("vpos","vec3",{invariant:!0}),j.add("vLineDistance","float"),j.add("vLineWidth","float"),V||(j.add("vIsInsideJoin","int"),j.add("vStretchFactor","float"),j.add("vJoinCenterLineSDFs","vec2"),j.add("vSubdivisionFactor","float")),V&&j.add("vLineSizeInv","float"),U&&j.add("vLineDistanceNorm","float"),M&&(j.add("vSegmentSDF","float"),j.add("vReverseSegmentSDF","float")),z.code.add(S`vec3 perpendicular(vec3 v) {
|
|
13
13
|
return vec3(v.y, -v.x, 0.0);
|
|
14
14
|
}
|
|
15
|
-
float
|
|
16
|
-
return (-
|
|
15
|
+
float nearPlaneInterpolationFactor(float nearPlaneDistance, vec4 start, vec4 end) {
|
|
16
|
+
return (-nearPlaneDistance - start.z) / (end.z - start.z);
|
|
17
17
|
}
|
|
18
18
|
vec3 rotateZ(vec3 v, float a) {
|
|
19
19
|
float s = sin(a);
|
|
20
20
|
float c = cos(a);
|
|
21
21
|
mat2 m = mat2(c, -s, s, c);
|
|
22
22
|
return vec3(m * v.xy, v.z);
|
|
23
|
-
}`),
|
|
23
|
+
}`),z.code.add(S`vec4 projectAndScale(vec4 pos) {
|
|
24
24
|
vec4 posNdc = proj * pos;
|
|
25
25
|
posNdc.xy *= viewport.zw / posNdc.w;
|
|
26
26
|
posNdc.z /= posNdc.w;
|
|
27
27
|
return posNdc;
|
|
28
|
-
}`),
|
|
28
|
+
}`),z.code.add(S`void clip(
|
|
29
29
|
inout vec4 pos,
|
|
30
30
|
inout vec4 prev,
|
|
31
31
|
inout vec4 next,
|
|
32
32
|
bool isStartVertex
|
|
33
33
|
) {
|
|
34
|
-
float
|
|
34
|
+
float adjustedNearPlaneDistance = nearFar[0] * 0.99;
|
|
35
35
|
if (pos.z > -nearFar[0]) {
|
|
36
36
|
if (!isStartVertex) {
|
|
37
37
|
if (prev.z < -nearFar[0]) {
|
|
38
|
-
pos = mix(prev, pos,
|
|
38
|
+
pos = mix(prev, pos, nearPlaneInterpolationFactor(adjustedNearPlaneDistance, prev, pos));
|
|
39
39
|
next = pos;
|
|
40
40
|
} else {
|
|
41
41
|
pos = vec4(0.0, 0.0, 0.0, 1.0);
|
|
42
42
|
}
|
|
43
43
|
} else {
|
|
44
44
|
if (next.z < -nearFar[0]) {
|
|
45
|
-
pos = mix(pos, next,
|
|
45
|
+
pos = mix(pos, next, nearPlaneInterpolationFactor(adjustedNearPlaneDistance, pos, next));
|
|
46
46
|
prev = pos;
|
|
47
47
|
} else {
|
|
48
48
|
pos = vec4(0.0, 0.0, 0.0, 1.0);
|
|
@@ -50,20 +50,22 @@ pos = vec4(0.0, 0.0, 0.0, 1.0);
|
|
|
50
50
|
}
|
|
51
51
|
} else {
|
|
52
52
|
if (prev.z > -nearFar[0]) {
|
|
53
|
-
prev = mix(pos, prev,
|
|
53
|
+
prev = mix(pos, prev, nearPlaneInterpolationFactor(adjustedNearPlaneDistance, pos, prev));
|
|
54
54
|
}
|
|
55
55
|
if (next.z > -nearFar[0]) {
|
|
56
|
-
next = mix(next, pos,
|
|
56
|
+
next = mix(next, pos, nearPlaneInterpolationFactor(adjustedNearPlaneDistance, next, pos));
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
}`),p(
|
|
60
|
-
vec3 position = ${
|
|
61
|
-
float u0 = ${
|
|
59
|
+
}`),p(z),z.constants.add("aaWidth","float",V?0:1),z.main.add(S`
|
|
60
|
+
vec3 position = ${k.getTextureAttribute("position")};
|
|
61
|
+
float u0 = ${k.getTextureAttribute("u0")};
|
|
62
62
|
|
|
63
63
|
// unpack values from vertex type
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
float vertexType = abs(lineParameters.y);
|
|
65
|
+
float lineSide = sign(lineParameters.y);
|
|
66
|
+
bool isStartVertex = vertexType == 2.0 || vertexType == 4.0;
|
|
67
|
+
vec3 prevPosition = ${k.getTextureAttribute("position",-1)};
|
|
68
|
+
vec3 nextPosition = ${k.getTextureAttribute("position",1)};
|
|
67
69
|
|
|
68
70
|
float coverage = 1.0;
|
|
69
71
|
|
|
@@ -77,12 +79,122 @@ next = mix(next, pos, interp(vnp, next, pos));
|
|
|
77
79
|
vec4 prev = view * vec4(prevPosition, 1.0);
|
|
78
80
|
vec4 next = view * vec4(nextPosition, 1.0);
|
|
79
81
|
|
|
80
|
-
bool isJoin =
|
|
81
|
-
`),
|
|
82
|
+
bool isJoin = vertexType < 3.0;
|
|
83
|
+
`),X&&z.main.add(S`vec4 other = isStartVertex ? next : prev;
|
|
82
84
|
bool markersHidden = areWorldMarkersHidden(pos.xyz, other.xyz);
|
|
83
85
|
if (!isJoin && !markersHidden) {
|
|
84
86
|
pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos.xyz) * 0.5;
|
|
85
|
-
}`),P.include(l),
|
|
87
|
+
}`),P.include(l),z.code.add(S`
|
|
88
|
+
vec2 computeJoinAndCapDisplacement(
|
|
89
|
+
bool isJoin,
|
|
90
|
+
bool isStartVertex,
|
|
91
|
+
inout vec3 left,
|
|
92
|
+
inout vec3 right,
|
|
93
|
+
float lineSide,
|
|
94
|
+
float lineWidth,
|
|
95
|
+
float subdivisionFactor,
|
|
96
|
+
float perspectiveDivisor
|
|
97
|
+
) {
|
|
98
|
+
float leftLen = length(left);
|
|
99
|
+
float rightLen = length(right);
|
|
100
|
+
left = leftLen > EPS ? left / leftLen : vec3(0.0);
|
|
101
|
+
right = rightLen > EPS ? right / rightLen : vec3(0.0);
|
|
102
|
+
|
|
103
|
+
vec3 capDisplacementDir = vec3(0.0);
|
|
104
|
+
vec3 joinDisplacementDir = vec3(0.0);
|
|
105
|
+
float displacementLen = lineWidth;
|
|
106
|
+
float miterDisplacementLen = lineWidth;
|
|
107
|
+
float innerDisplacementLen = lineWidth;
|
|
108
|
+
bool isOutside = false;
|
|
109
|
+
|
|
110
|
+
if (isJoin) {
|
|
111
|
+
// Determine if the vertex is on the outside or inside of the join.
|
|
112
|
+
isOutside = (left.x * right.y - left.y * right.x) * lineSide > 0.0;
|
|
113
|
+
|
|
114
|
+
// Compute the miter join position first.
|
|
115
|
+
vec3 joinDirection = normalize(left + right);
|
|
116
|
+
joinDisplacementDir = perpendicular(joinDirection);
|
|
117
|
+
|
|
118
|
+
// Compute the miter stretch.
|
|
119
|
+
if (leftLen > EPS && rightLen > EPS) {
|
|
120
|
+
float nDotSeg = dot(joinDisplacementDir, left);
|
|
121
|
+
displacementLen /= length(nDotSeg * left - joinDisplacementDir);
|
|
122
|
+
miterDisplacementLen = displacementLen;
|
|
123
|
+
|
|
124
|
+
innerDisplacementLen = min(displacementLen, min(leftLen, rightLen) / abs(nDotSeg));
|
|
125
|
+
|
|
126
|
+
// Limit displacement of inner vertices.
|
|
127
|
+
if (!isOutside) {
|
|
128
|
+
displacementLen = innerDisplacementLen;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
${u(!V,S`
|
|
133
|
+
// Compute stretch compensation for feathering.
|
|
134
|
+
if (subdivisionFactor > 0.0) {
|
|
135
|
+
vIsInsideJoin = 1;
|
|
136
|
+
}
|
|
137
|
+
vSubdivisionFactor = isOutside ? subdivisionFactor : 0.5;
|
|
138
|
+
|
|
139
|
+
if (miterDisplacementLen > miterLimit * lineWidth) {
|
|
140
|
+
vec2 leftScreenDir = left.xy;
|
|
141
|
+
vec2 rightScreenDir = right.xy;
|
|
142
|
+
float leftScreenLen = length(leftScreenDir);
|
|
143
|
+
float rightScreenLen = length(rightScreenDir);
|
|
144
|
+
|
|
145
|
+
if (leftScreenLen > EPS && rightScreenLen > EPS) {
|
|
146
|
+
leftScreenDir /= leftScreenLen;
|
|
147
|
+
rightScreenDir /= rightScreenLen;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Feathering AA needs special considerations on join triangles because these can get stretched a lot at acute angles.
|
|
151
|
+
* We use the triangle height to determine by how much they get stretched.
|
|
152
|
+
*/
|
|
153
|
+
float theta = acos(clamp(dot(leftScreenDir, rightScreenDir), -1.0, 1.0));
|
|
154
|
+
/**
|
|
155
|
+
* The argument of cos here is half the angle of a join triangle.
|
|
156
|
+
* We start with one triangle, and every subdivision adds another triangle.
|
|
157
|
+
*/
|
|
158
|
+
float subdividedTriangleHeight = (innerDisplacementLen + lineWidth) * cos(theta / (2.0 + 2.0 * NUM_JOIN_SUBDIVISIONS));
|
|
159
|
+
float bevelTriangleHeight = innerDisplacementLen + lineWidth * cos(theta * 0.5);
|
|
160
|
+
float triangleHeight = NUM_JOIN_SUBDIVISIONS > 0.0 ? subdividedTriangleHeight : bevelTriangleHeight;
|
|
161
|
+
vStretchFactor = noPerspectiveWrite(max(triangleHeight / (2.0 * lineWidth), 1.0), perspectiveDivisor);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
`)}
|
|
165
|
+
|
|
166
|
+
if (isOutside && displacementLen > miterLimit * lineWidth) {
|
|
167
|
+
${u(C.roundJoins,S`
|
|
168
|
+
vec3 startDir = perpendicular(leftLen < EPS ? right : left);
|
|
169
|
+
vec3 endDir = perpendicular(rightLen < EPS ? left : right);
|
|
170
|
+
float factor = ${V?S`min(1.0, subdivisionFactor * ((NUM_JOIN_SUBDIVISIONS + 1.0) / NUM_JOIN_SUBDIVISIONS))`:S`subdivisionFactor`};
|
|
171
|
+
|
|
172
|
+
float rotationAngle = acos(clamp(dot(startDir.xy, endDir.xy), -1.0, 1.0));
|
|
173
|
+
joinDisplacementDir = rotateZ(startDir, -lineSide * factor * rotationAngle);
|
|
174
|
+
`,S`
|
|
175
|
+
/**
|
|
176
|
+
* Convert to bevel join if miterLimit is exceeded.
|
|
177
|
+
* Here vertices with a subdivisionFactor > 0 are either START vertices or
|
|
178
|
+
* an additional END vertex to fix line pattern interpolation.
|
|
179
|
+
* The additional vertex is considered to be the END of the previous segment.
|
|
180
|
+
* However, it is pushed to the position of the START of the next segment,
|
|
181
|
+
* so that the entire bevel join will be part of the first segment, pattern-wise.
|
|
182
|
+
*/
|
|
183
|
+
vec3 startDir = perpendicular(leftLen < EPS ? right : left);
|
|
184
|
+
vec3 endDir = perpendicular(rightLen < EPS ? left : right);
|
|
185
|
+
|
|
186
|
+
${u(V,S`joinDisplacementDir = (isStartVertex || subdivisionFactor > 0.0) ? endDir : startDir;`,S`joinDisplacementDir = mix(startDir, endDir, subdivisionFactor);`)}
|
|
187
|
+
`)}
|
|
188
|
+
displacementLen = lineWidth;
|
|
189
|
+
}
|
|
190
|
+
} else {
|
|
191
|
+
joinDisplacementDir = perpendicular(isStartVertex ? right : left);
|
|
192
|
+
${0!==R?S`capDisplacementDir = vec3((isStartVertex ? -right : left).xy, 0.0);`:""}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return (joinDisplacementDir.xy * lineSide + capDisplacementDir.xy) * displacementLen;
|
|
196
|
+
}
|
|
197
|
+
`),z.main.add(S`
|
|
86
198
|
clip(pos, prev, next, isStartVertex);
|
|
87
199
|
|
|
88
200
|
vec3 clippedPos = pos.xyz;
|
|
@@ -95,12 +207,9 @@ pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos.xyz) * 0.5;
|
|
|
95
207
|
vec3 left = (pos.xyz - prev.xyz);
|
|
96
208
|
vec3 right = (next.xyz - pos.xyz);
|
|
97
209
|
|
|
98
|
-
float
|
|
99
|
-
float
|
|
100
|
-
|
|
101
|
-
float lineSize = getSize(${u(M,"clippedPos")});
|
|
102
|
-
${u(T&&M,"float patternLineSize = getSize(clippedCenter);")}
|
|
103
|
-
${u(T&&!M,"float patternLineSize = lineSize;")}
|
|
210
|
+
float lineSize = getSize(${u(_,"clippedPos")});
|
|
211
|
+
${u(V&&_,"float patternLineSize = getSize(clippedCenter);")}
|
|
212
|
+
${u(V&&!_,"float patternLineSize = lineSize;")}
|
|
104
213
|
|
|
105
214
|
${u($,S`
|
|
106
215
|
lineSize += aaWidth;
|
|
@@ -120,84 +229,31 @@ pos.xyz += normalize(other.xyz - pos.xyz) * getWorldMarkerSize(pos.xyz) * 0.5;
|
|
|
120
229
|
`)}
|
|
121
230
|
|
|
122
231
|
vLineWidth = noPerspectiveWrite(lineWidth, pos.w);
|
|
123
|
-
${
|
|
124
|
-
`)
|
|
232
|
+
${V?S`vLineSizeInv = noPerspectiveWrite(1.0 / lineSize, pos.w);`:""}
|
|
233
|
+
`),B&&z.main.add(S`
|
|
125
234
|
float isEndVertex = float(!isStartVertex);
|
|
126
235
|
vec3 segmentOrigin = mix(pos.xyz, prev.xyz, isEndVertex);
|
|
127
236
|
vec3 segment = mix(right, left, isEndVertex);
|
|
128
|
-
${
|
|
129
|
-
`),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
miterDisplacementLen = displacementLen;
|
|
149
|
-
innerDisplacementLen = min(displacementLen, min(leftLen, rightLen)/abs(nDotSeg));
|
|
150
|
-
if (!isOutside) {
|
|
151
|
-
displacementLen = innerDisplacementLen;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
subdivisionFactor = lineParameters.x;`),T||j.main.add(S`if(subdivisionFactor > 0.0) {
|
|
155
|
-
vIsInsideJoin = 1;
|
|
156
|
-
}
|
|
157
|
-
vSubdivisionFactor = isOutside ? subdivisionFactor : 0.5;
|
|
158
|
-
if (miterDisplacementLen > miterLimit * lineWidth) {
|
|
159
|
-
vec2 leftScreenDir = left.xy;
|
|
160
|
-
vec2 rightScreenDir = right.xy;
|
|
161
|
-
float leftScreenLen = length(leftScreenDir);
|
|
162
|
-
float rightScreenLen = length(rightScreenDir);
|
|
163
|
-
if (leftScreenLen > EPS && rightScreenLen > EPS) {
|
|
164
|
-
leftScreenDir /= leftScreenLen;
|
|
165
|
-
rightScreenDir /= rightScreenLen;
|
|
166
|
-
float theta = acos(clamp(dot(leftScreenDir, rightScreenDir), -1.0, 1.0));
|
|
167
|
-
float subdividedTriangleHeight = (innerDisplacementLen + lineWidth) * cos(theta / (2.0 + 2.0 * NUM_JOIN_SUBDIVISIONS));
|
|
168
|
-
float bevelTriangleHeight = innerDisplacementLen + lineWidth * cos(theta * 0.5);
|
|
169
|
-
float triangleHeight = NUM_JOIN_SUBDIVISIONS > 0.0 ? subdividedTriangleHeight : bevelTriangleHeight;
|
|
170
|
-
vStretchFactor = noPerspectiveWrite(max(triangleHeight / (2.0 * lineWidth), 1.0), pos.w);
|
|
171
|
-
}
|
|
172
|
-
}`),j.main.add(S`if (isOutside && (displacementLen > miterLimit * lineWidth)) {`),E?j.main.add(S`
|
|
173
|
-
vec3 startDir = leftLen < EPS ? right : left;
|
|
174
|
-
startDir = perpendicular(startDir);
|
|
175
|
-
|
|
176
|
-
vec3 endDir = rightLen < EPS ? left : right;
|
|
177
|
-
endDir = perpendicular(endDir);
|
|
178
|
-
|
|
179
|
-
float factor = ${T?S`min(1.0, subdivisionFactor * ((NUM_JOIN_SUBDIVISIONS + 1.0) / NUM_JOIN_SUBDIVISIONS))`:S`subdivisionFactor`};
|
|
180
|
-
|
|
181
|
-
float rotationAngle = acos(clamp(dot(startDir.xy, endDir.xy), -1.0, 1.0));
|
|
182
|
-
joinDisplacementDir = rotateZ(startDir, -sign(lineParameters.y) * factor * rotationAngle);
|
|
183
|
-
`):j.main.add(S`
|
|
184
|
-
vec3 startDir = perpendicular(leftLen < EPS ? right : left);
|
|
185
|
-
vec3 endDir = perpendicular(rightLen < EPS ? left : right);
|
|
186
|
-
|
|
187
|
-
${u(T,S`joinDisplacementDir = (isStartVertex || subdivisionFactor > 0.0) ? endDir : startDir;`,S`joinDisplacementDir = mix(startDir, endDir, subdivisionFactor);`)}
|
|
188
|
-
`);const Z=0!==V;return j.main.add(S`
|
|
189
|
-
displacementLen = lineWidth;
|
|
190
|
-
}
|
|
191
|
-
} else {
|
|
192
|
-
// CAP handling ---------------------------------------------------
|
|
193
|
-
joinDisplacementDir = isStartVertex ? right : left;
|
|
194
|
-
joinDisplacementDir = perpendicular(joinDisplacementDir);
|
|
195
|
-
|
|
196
|
-
${Z?S`capDisplacementDir = vec3((isStartVertex ? -right : left).xy, 0.0);`:""}
|
|
197
|
-
}
|
|
198
|
-
`),j.main.add(S`
|
|
199
|
-
// Displacement (in pixels) caused by join/or cap
|
|
200
|
-
vec2 dposXY = (joinDisplacementDir.xy * sign(lineParameters.y) + capDisplacementDir.xy) * displacementLen;
|
|
237
|
+
${M?S`vec3 segmentEnd = mix(next.xyz, pos.xyz, isEndVertex);`:""}
|
|
238
|
+
`),z.main.add(S`
|
|
239
|
+
${u(!V,S`
|
|
240
|
+
vIsInsideJoin = 0;
|
|
241
|
+
vStretchFactor = 1.0;
|
|
242
|
+
vSubdivisionFactor = 0.0;
|
|
243
|
+
vJoinCenterLineSDFs = vec2(LARGE_HALF_FLOAT);
|
|
244
|
+
`)}
|
|
245
|
+
|
|
246
|
+
vec2 displacementXY = computeJoinAndCapDisplacement(
|
|
247
|
+
isJoin,
|
|
248
|
+
isStartVertex,
|
|
249
|
+
left,
|
|
250
|
+
right,
|
|
251
|
+
lineSide,
|
|
252
|
+
lineWidth,
|
|
253
|
+
lineParameters.x,
|
|
254
|
+
pos.w
|
|
255
|
+
);
|
|
256
|
+
vec3 segmentDirection = isStartVertex ? right : left;
|
|
201
257
|
|
|
202
258
|
/**
|
|
203
259
|
* To prevent z-fighting between layers, we also adjust the z value.
|
|
@@ -205,17 +261,17 @@ vStretchFactor = noPerspectiveWrite(max(triangleHeight / (2.0 * lineWidth), 1.0)
|
|
|
205
261
|
* To do so, the below formula projects the xy displacement onto the original segment direction
|
|
206
262
|
* to find the z-offset necessary so the triangle orientation is independent of the width.
|
|
207
263
|
*/
|
|
208
|
-
float
|
|
209
|
-
vec3
|
|
264
|
+
float displacementZ = dot(displacementXY, segmentDirection.xy) / dot(segmentDirection.xy, segmentDirection.xy) * segmentDirection.z;
|
|
265
|
+
vec3 displacement = vec3(displacementXY, displacementZ);
|
|
210
266
|
|
|
211
|
-
float lineDistNorm = noPerspectiveWrite(
|
|
267
|
+
float lineDistNorm = noPerspectiveWrite(lineSide, pos.w);
|
|
212
268
|
|
|
213
269
|
vLineDistance = lineWidth * lineDistNorm;
|
|
214
|
-
${
|
|
270
|
+
${U?S`vLineDistanceNorm = lineDistNorm;`:""}
|
|
215
271
|
|
|
216
|
-
pos.xyz +=
|
|
217
|
-
`),
|
|
218
|
-
vec2 joinCenterToVertex =
|
|
272
|
+
pos.xyz += displacement;
|
|
273
|
+
`),V||z.main.add(S`if (isJoin) {
|
|
274
|
+
vec2 joinCenterToVertex = displacementXY;
|
|
219
275
|
vec2 leftCenterlineDir = left.xy;
|
|
220
276
|
vec2 rightCenterlineDir = right.xy;
|
|
221
277
|
float leftCenterlineLen = length(leftCenterlineDir);
|
|
@@ -229,25 +285,28 @@ dot(vec2(leftCenterlineDir.y, -leftCenterlineDir.x), joinCenterToVertex)
|
|
|
229
285
|
),
|
|
230
286
|
pos.w
|
|
231
287
|
);
|
|
232
|
-
}`),
|
|
288
|
+
}`),M&&z.main.add(S`vec2 segmentDir = normalize(segment.xy);
|
|
233
289
|
vSegmentSDF = noPerspectiveWrite((isJoin && isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentOrigin.xy, segmentDir)), pos.w);
|
|
234
|
-
vReverseSegmentSDF = noPerspectiveWrite((isJoin && !isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentEnd.xy, -segmentDir)), pos.w);`),
|
|
235
|
-
float worldToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),
|
|
236
|
-
float
|
|
237
|
-
float
|
|
238
|
-
float
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
290
|
+
vReverseSegmentSDF = noPerspectiveWrite((isJoin && !isStartVertex) ? LARGE_HALF_FLOAT : (dot(pos.xy - segmentEnd.xy, -segmentDir)), pos.w);`),V&&(T?z.uniforms.add(new h("worldToScreenRatio",e=>1/e.screenToPCSRatio)):z.main.add(S`vec3 segmentCenter = mix((nextPosition + position) * 0.5, (position + prevPosition) * 0.5, isEndVertex);
|
|
291
|
+
float worldToScreenRatio = computeWorldToScreenRatio(segmentCenter);`),z.main.add(S`
|
|
292
|
+
float segmentLengthScreenDouble = length(segment.xy);
|
|
293
|
+
float segmentLengthScreen = segmentLengthScreenDouble * 0.5;
|
|
294
|
+
float discreteWorldToScreenRatio = discretizeWorldToScreenRatio(worldToScreenRatio);
|
|
295
|
+
float segmentLengthRender = length(mix(nextPosition - position, position - prevPosition, isEndVertex));
|
|
296
|
+
${u(!T||$,S`float segmentStartRender = mix(u0, u0 - segmentLengthRender, isEndVertex);`)}
|
|
297
|
+
|
|
298
|
+
vStipplePatternStretch = worldToScreenRatio / discreteWorldToScreenRatio;
|
|
299
|
+
`),T?z.main.add(S`float segmentLengthPseudoScreen = segmentLengthScreen / pixelRatio * discreteWorldToScreenRatio / worldToScreenRatio;
|
|
300
|
+
float startPseudoScreen = u0 * discreteWorldToScreenRatio - mix(0.0, segmentLengthPseudoScreen, isEndVertex);`):z.main.add(S`float startPseudoScreen = segmentStartRender * discreteWorldToScreenRatio;
|
|
301
|
+
float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRatio;`),z.uniforms.add(new g("stipplePatternPixelSize",e=>n(e))),z.main.add(S`
|
|
242
302
|
float patternLength = patternLineSize * stipplePatternPixelSize;
|
|
243
303
|
|
|
244
304
|
${u($,S`
|
|
245
|
-
|
|
246
|
-
vStippleDistanceLimits = vec2(uu, uu + segmentLengthRender);
|
|
305
|
+
vStippleDistanceLimits = vec2(segmentStartRender, segmentStartRender + segmentLengthRender);
|
|
247
306
|
vStipplePatternStretch = 1.0;
|
|
248
307
|
|
|
249
308
|
// The v-coordinate used in case of an image pattern.
|
|
250
|
-
bool isLeft =
|
|
309
|
+
bool isLeft = lineSide < 0.0;
|
|
251
310
|
vStippleV = isLeft ? 0.0 : 1.0;
|
|
252
311
|
`,S`
|
|
253
312
|
// Compute the coordinates at both start and end of the line segment, because we need both to clamp to in the
|
|
@@ -269,7 +328,7 @@ float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRat
|
|
|
269
328
|
vStippleDistance += (stippleDisplacementFactor - isEndVertex) * (vStippleDistanceLimits.y - vStippleDistanceLimits.x);
|
|
270
329
|
}
|
|
271
330
|
|
|
272
|
-
// Cancel out perspective correct interpolation because we want this length
|
|
331
|
+
// Cancel out perspective correct interpolation because we want this length to really represent the screen
|
|
273
332
|
// distance
|
|
274
333
|
vStippleDistanceLimits = noPerspectiveWrite(vStippleDistanceLimits, pos.w);
|
|
275
334
|
vStippleDistance = noPerspectiveWrite(vStippleDistance, pos.w);
|
|
@@ -280,7 +339,7 @@ float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRat
|
|
|
280
339
|
isStartVertex ?
|
|
281
340
|
vec2(-1e34, vStippleDistanceLimits.y) :
|
|
282
341
|
vec2(vStippleDistanceLimits.x, 1e34);
|
|
283
|
-
`)),
|
|
342
|
+
`)),z.main.add(S`
|
|
284
343
|
// Convert back into NDC
|
|
285
344
|
pos.xy = (pos.xy / viewport.zw) * pos.w;
|
|
286
345
|
pos.z = pos.z * pos.w;
|
|
@@ -288,42 +347,44 @@ float segmentLengthPseudoScreen = segmentLengthRender * discreteWorldToScreenRat
|
|
|
288
347
|
vColor = getColor();
|
|
289
348
|
vColor.a = noPerspectiveWrite(vColor.a * coverage, pos.w);
|
|
290
349
|
|
|
291
|
-
${
|
|
350
|
+
${E&&!T?"pos.z -= EPS * pos.w;":""}
|
|
292
351
|
|
|
293
352
|
// transform final position to camera space for slicing
|
|
294
353
|
vpos = (inverseProjectionMatrix * pos).xyz;
|
|
295
354
|
gl_Position = pos;
|
|
296
355
|
forwardObjectAndLayerIdColor();
|
|
297
|
-
}`),P.fragment.include(e,C),P.include(b,C),A.include(s),A.main.add(S`discardBySlice(vpos);`),P.include(d),A.include(
|
|
356
|
+
}`),P.fragment.include(e,C),P.include(b,C),A.include(s),A.main.add(S`discardBySlice(vpos);`),P.include(d),A.include(D),V||A.code.add(S`float lineFeatheringFactor(float lineWidth, float lineDistance) {
|
|
357
|
+
float stretchFactor = vIsInsideJoin == 1 ? noPerspectiveRead(vStretchFactor) : 1.0;
|
|
358
|
+
float featherWidth = 2.0;
|
|
359
|
+
float featherStartDistance = max(lineWidth - featherWidth / stretchFactor, 0.0);
|
|
360
|
+
float straightFeatherStartDistance = max(lineWidth - featherWidth, 0.0);
|
|
361
|
+
float value = abs(lineDistance);
|
|
362
|
+
float feather = (value - featherStartDistance) / (lineWidth - featherStartDistance);
|
|
363
|
+
vec2 joinCenterSDFs = noPerspectiveRead(vJoinCenterLineSDFs);
|
|
364
|
+
float joinCenterDistance = abs(vSubdivisionFactor > 0.5 ? joinCenterSDFs.x : joinCenterSDFs.y);
|
|
365
|
+
float straightFeather = (joinCenterDistance - straightFeatherStartDistance) / (lineWidth - straightFeatherStartDistance);
|
|
366
|
+
feather = vIsInsideJoin == 1 ? max(feather, straightFeather) : feather;
|
|
367
|
+
return 1.0 - clamp(feather, 0.0, 1.0);
|
|
368
|
+
}`),A.main.add(S`
|
|
298
369
|
float lineWidth = noPerspectiveRead(vLineWidth);
|
|
299
370
|
float lineDistance = noPerspectiveRead(vLineDistance);
|
|
300
|
-
${u(
|
|
301
|
-
`),
|
|
371
|
+
${u(U,S`float lineDistanceNorm = noPerspectiveRead(vLineDistanceNorm);`)}
|
|
372
|
+
`),E?A.main.add(S`vec4 finalColor = vec4(1.0, 0.0, 1.0, 1.0);`):(M&&A.main.add(S`float sdf = noPerspectiveRead(min(vSegmentSDF, vReverseSegmentSDF));
|
|
302
373
|
vec2 fragmentPosition = vec2(min(sdf, 0.0), lineDistance);
|
|
303
374
|
float fragmentRadius = length(fragmentPosition);
|
|
304
375
|
float fragmentCapSDF = (fragmentRadius - lineWidth) * 0.5;
|
|
305
376
|
float capCoverage = clamp(0.5 - fragmentCapSDF, 0.0, 1.0);
|
|
306
377
|
if (capCoverage < alphaCutoff) {
|
|
307
378
|
discard;
|
|
308
|
-
}`),
|
|
379
|
+
}`),H?A.main.add(S`vec2 stipplePosition = vec2(
|
|
309
380
|
min(getStippleSDF() * 2.0 - 1.0, 0.0),
|
|
310
381
|
lineDistanceNorm
|
|
311
382
|
);
|
|
312
383
|
float stippleRadius = length(stipplePosition * lineWidth);
|
|
313
384
|
float stippleCapSDF = (stippleRadius - lineWidth) * 0.5;
|
|
314
385
|
float stippleCoverage = clamp(0.5 - stippleCapSDF, 0.0, 1.0);
|
|
315
|
-
float stippleAlpha = step(alphaCutoff, stippleCoverage);`):A.main.add(S`float stippleAlpha = getStippleAlpha(lineWidth);`),11!==
|
|
316
|
-
color.a = noPerspectiveRead(color.a);`),
|
|
386
|
+
float stippleAlpha = step(alphaCutoff, stippleCoverage);`):A.main.add(S`float stippleAlpha = getStippleAlpha(lineWidth);`),11!==I&&A.main.add(S`discardByStippleAlpha(stippleAlpha, alphaCutoff);`),A.uniforms.add(new f("intrinsicColor",e=>e.color)).main.add(S`vec4 color = intrinsicColor * vColor;
|
|
387
|
+
color.a = noPerspectiveRead(color.a);`),O&&A.uniforms.add(new f("innerColor",e=>e.innerColor??e.color),new g("innerWidth",(e,t)=>e.innerWidth*t.camera.pixelRatio)).main.add(S`float distToInner = abs(lineDistance) - innerWidth;
|
|
317
388
|
float innerAA = clamp(0.5 - distToInner, 0.0, 1.0);
|
|
318
389
|
float innerAlpha = innerColor.a + color.a * (1.0 - innerColor.a);
|
|
319
|
-
color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);`),A.main.add(S`vec4 finalColor = blendStipple(color, stippleAlpha);`),
|
|
320
|
-
float featherWidth = 2.0;
|
|
321
|
-
float featherStartDistance = max(lineWidth - featherWidth / stretchFactor, 0.0);
|
|
322
|
-
float straightFeatherStartDistance = max(lineWidth - featherWidth, 0.0);
|
|
323
|
-
float value = abs(lineDistance);
|
|
324
|
-
float feather = (value - featherStartDistance) / (lineWidth - featherStartDistance);
|
|
325
|
-
vec2 joinCenterSDFs = noPerspectiveRead(vJoinCenterLineSDFs);
|
|
326
|
-
float joinCenterDistance = abs(vSubdivisionFactor > 0.5 ? joinCenterSDFs.x : joinCenterSDFs.y);
|
|
327
|
-
float straightFeather = (joinCenterDistance - straightFeatherStartDistance) / (lineWidth - straightFeatherStartDistance);
|
|
328
|
-
feather = vIsInsideJoin == 1 ? max(feather, straightFeather) : feather;
|
|
329
|
-
finalColor.a *= 1.0 - clamp(feather, 0.0, 1.0);`),_&&A.main.add("finalColor = animate(finalColor);")),A.main.add(S`outputColorHighlightOLID(applySlice(finalColor, vpos), finalColor.rgb);`),P}const z=Object.freeze(Object.defineProperty({__proto__:null,build:P,ribbonlineNumRoundJoinSubdivisions:C},Symbol.toStringTag,{value:"Module"}));export{z as R,P as b,C as r};
|
|
390
|
+
color = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);`),A.main.add(S`vec4 finalColor = blendStipple(color, stippleAlpha);`),N&&(A.uniforms.add(new g("falloff",e=>e.falloff)),A.main.add(S`finalColor.a *= pow(max(0.0, 1.0 - abs(lineDistanceNorm)), falloff);`)),V||A.main.add(S`finalColor.a *= lineFeatheringFactor(lineWidth, lineDistance);`),J&&A.main.add("finalColor = animate(finalColor);")),A.main.add(S`outputColorHighlightOLID(applySlice(finalColor, vpos), finalColor.rgb);`),P}const F=Object.freeze(Object.defineProperty({__proto__:null,build:P,numRoundJoinSubdivisions:C},Symbol.toStringTag,{value:"Module"}));export{F as R,P as b,C as n};
|
package/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/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.2.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.2.0-next.87";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{create as t}from"../factories/vec3f64.js";import{getEpsilon as n,RANDOM as r}from"./common.js";function a(t){const n=t[0],r=t[1],a=t[2];return Math.sqrt(n*n+r*r+a*a)}function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function u(t,n,r,a){return t[0]=n,t[1]=r,t[2]=a,t}function e(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t}function c(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}function s(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t}function i(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}function M(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function h(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function m(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function l(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t}function d(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t}function b(t,n=0,r=1){return t[0]=Math.min(Math.max(t[0],n),r),t[1]=Math.min(Math.max(t[1],n),r),t[2]=Math.min(Math.max(t[2],n),r),t}function q(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function x(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}function g(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t}function
|
|
2
|
+
import{create as t}from"../factories/vec3f64.js";import{getEpsilon as n,RANDOM as r}from"./common.js";function a(t){const n=t[0],r=t[1],a=t[2];return Math.sqrt(n*n+r*r+a*a)}function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function u(t,n,r,a){return t[0]=n,t[1]=r,t[2]=a,t}function e(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t}function c(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}function s(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t}function i(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}function M(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function h(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function m(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function l(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t}function d(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t}function b(t,n=0,r=1){return t[0]=Math.min(Math.max(t[0],n),r),t[1]=Math.min(Math.max(t[1],n),r),t[2]=Math.min(Math.max(t[2],n),r),t}function q(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function x(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}function g(t,n){return x(t,t,n/tt(t))}function p(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t}function v(t,n){const r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(r*r+a*a+o*o)}function j(t,n){const r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return r*r+a*a+o*o}function y(t){const n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a}function z(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function _(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function A(t,n){const r=n[0],a=n[1],o=n[2];let u=r*r+a*a+o*o;return u>0&&(u=1/Math.sqrt(u),t[0]=n[0]*u,t[1]=n[1]*u,t[2]=n[2]*u),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function D(t,n,r){const a=n[0],o=n[1],u=n[2],e=r[0],c=r[1],s=r[2];return t[0]=o*s-u*c,t[1]=u*e-a*s,t[2]=a*c-o*e,t}function I(t,n,r){const a=n[0],o=n[1],u=n[2],e=r[0],c=r[1],s=r[2],i=o*s-u*c,M=u*e-a*s,h=a*c-o*e,f=Math.sqrt(i*i+M*M+h*h);return t[0]=i/f,t[1]=M/f,t[2]=h/f,t}function L(t,n,r,a){const o=n[0],u=n[1],e=n[2];return t[0]=o+a*(r[0]-o),t[1]=u+a*(r[1]-u),t[2]=e+a*(r[2]-e),t}function O(t,n,r,a,o,u){const e=u*u,c=e*(2*u-3)+1,s=e*(u-2)+u,i=e*(u-1),M=e*(3-2*u);return t[0]=n[0]*c+r[0]*s+a[0]*i+o[0]*M,t[1]=n[1]*c+r[1]*s+a[1]*i+o[1]*M,t[2]=n[2]*c+r[2]*s+a[2]*i+o[2]*M,t}function Q(t,n,r,a,o,u){const e=1-u,c=e*e,s=u*u,i=c*e,M=3*u*c,h=3*s*e,f=s*u;return t[0]=n[0]*i+r[0]*M+a[0]*h+o[0]*f,t[1]=n[1]*i+r[1]*M+a[1]*h+o[1]*f,t[2]=n[2]*i+r[2]*M+a[2]*h+o[2]*f,t}function S(t,n=1){const a=r,o=2*a()*Math.PI,u=2*a()-1,e=Math.sqrt(1-u*u)*n;return t[0]=Math.cos(o)*e,t[1]=Math.sin(o)*e,t[2]=u*n,t}function T(t,n,r){const a=n[0],o=n[1],u=n[2];return t[0]=r[0]*a+r[4]*o+r[8]*u+r[12],t[1]=r[1]*a+r[5]*o+r[9]*u+r[13],t[2]=r[2]*a+r[6]*o+r[10]*u+r[14],t}function Z(t,n){return n[2]*t[0]+n[6]*t[1]+n[10]*t[2]+n[14]}function E(t,n,r){const a=n[0],o=n[1],u=n[2];return t[0]=a*r[0]+o*r[3]+u*r[6],t[1]=a*r[1]+o*r[4]+u*r[7],t[2]=a*r[2]+o*r[5]+u*r[8],t}function N(t,n,r){return V(t,n,r[0],r[1],r[2],r[3])}function V(t,n,r,a,o,u){const e=n[0],c=n[1],s=n[2],i=a*s-o*c,M=o*e-r*s,h=r*c-a*e,f=a*h-o*M,m=o*i-r*h,l=r*M-a*i,d=2*u;return t[0]=e+i*d+2*f,t[1]=c+M*d+2*m,t[2]=s+h*d+2*l,t}function X(t,n,r,a){const o=[],u=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],u[0]=o[0],u[1]=o[1]*Math.cos(a)-o[2]*Math.sin(a),u[2]=o[1]*Math.sin(a)+o[2]*Math.cos(a),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t}function Y(t,n,r,a){const o=[],u=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],u[0]=o[2]*Math.sin(a)+o[0]*Math.cos(a),u[1]=o[1],u[2]=o[2]*Math.cos(a)-o[0]*Math.sin(a),t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t}function k(t,n,r,a){const o=[],u=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],u[0]=o[0]*Math.cos(a)-o[1]*Math.sin(a),u[1]=o[0]*Math.sin(a)+o[1]*Math.cos(a),u[2]=o[2],t[0]=u[0]+r[0],t[1]=u[1]+r[1],t[2]=u[2]+r[2],t}function w(t,n){A(B,t),A(C,n);const r=P(B,C);return r>1?0:r<-1?Math.PI:Math.acos(r)}const B=t(),C=t();function F(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function G(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function H(t,r){if(t===r)return!0;const a=t[0],o=t[1],u=t[2],e=r[0],c=r[1],s=r[2],i=n();return Math.abs(a-e)<=i*Math.max(1,Math.abs(a),Math.abs(e))&&Math.abs(o-c)<=i*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(u-s)<=i*Math.max(1,Math.abs(u),Math.abs(s))}function J(t,n,r){const a=r[0]-n[0],o=r[1]-n[1],u=r[2]-n[2];let e=a*a+o*o+u*u;return e>0?(e=1/Math.sqrt(e),t[0]=a*e,t[1]=o*e,t[2]=u*e,t):(t[0]=0,t[1]=0,t[2]=0,t)}const K=c,R=s,U=i,W=v,$=j,tt=a,nt=y,rt=Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:e,angle:w,bezier:Q,ceil:M,clamp:b,copy:o,cross:D,crossAndNormalize:I,direction:J,dist:W,distance:v,div:U,divide:i,dot:P,equals:H,exactEquals:G,floor:h,hermite:O,inverse:_,len:tt,length:a,lerp:L,max:d,min:l,mul:R,multiply:s,negate:z,normalize:A,random:S,rotateX:X,rotateY:Y,rotateZ:k,round:q,scale:x,scaleAndAdd:p,scaleTo:g,set:u,sign:m,sqrDist:$,sqrLen:nt,squaredDistance:j,squaredLength:y,str:F,sub:K,subtract:c,transformMat3:E,transformMat4:T,transformMat4Z:Z,transformQuat:N,transformQuatValues:V},Symbol.toStringTag,{value:"Module"}));export{f as abs,e as add,w as angle,Q as bezier,M as ceil,b as clamp,o as copy,D as cross,I as crossAndNormalize,J as direction,W as dist,v as distance,U as div,i as divide,P as dot,H as equals,G as exactEquals,h as floor,O as hermite,_ as inverse,tt as len,a as length,L as lerp,d as max,l as min,R as mul,s as multiply,z as negate,A as normalize,S as random,X as rotateX,Y as rotateY,k as rotateZ,q as round,x as scale,p as scaleAndAdd,g as scaleTo,u as set,m as sign,$ as sqrDist,nt as sqrLen,j as squaredDistance,y as squaredLength,F as str,K as sub,c as subtract,E as transformMat3,T as transformMat4,Z as transformMat4Z,N as transformQuat,V as transformQuatValues,rt as v};
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
* >
|
|
24
24
|
* > * This operator currently only supports [equation-based geographic transformations](https://pro.arcgis.com/en/pro-app/latest/help/mapping/properties/geographic-coordinate-system-transformation.htm).
|
|
25
25
|
* > * Grid-based transformations are not supported.
|
|
26
|
+
* > * Vertical coordinate system projections are not supported.
|
|
26
27
|
* > * The result geometry is not guaranteed to be simple. Apply the [simplifyOperator](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/simplifyOperator/) to ensure the result is topologically simple.
|
|
27
28
|
* > * Projecting an Extent may return an Extent with a larger area than the input.
|
|
28
|
-
* > * Vertical coordinate system projections are not supported.
|
|
29
29
|
*
|
|
30
30
|
* > [!WARNING]
|
|
31
31
|
* >
|
|
@@ -15,6 +15,17 @@
|
|
|
15
15
|
*
|
|
16
16
|
* > [!WARNING]
|
|
17
17
|
* >
|
|
18
|
+
* > **Known Limitations**
|
|
19
|
+
* >
|
|
20
|
+
* > * This operator currently only supports [equation-based geographic transformations](https://developers.arcgis.com/rest/services-reference/enterprise/using-spatial-references/#transformation-pdfs).
|
|
21
|
+
* > * Grid-based transformations are not supported.
|
|
22
|
+
* > * Vertical coordinate system projections are not supported.
|
|
23
|
+
* > * The result geometry is not guaranteed to be simple. Apply the [simplifyOperator](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/simplifyOperator/) to ensure the result is topologically simple.
|
|
24
|
+
* > * Projecting an Extent may return an Extent with a larger area than the input.
|
|
25
|
+
* > * Curves are not supported.
|
|
26
|
+
*
|
|
27
|
+
* > [!WARNING]
|
|
28
|
+
* >
|
|
18
29
|
* > **Notes**
|
|
19
30
|
* >
|
|
20
31
|
* > Verify that `isLoaded()` returns `true` before using this module.
|
|
@@ -38,7 +49,10 @@ export interface Options {
|
|
|
38
49
|
* The extent's spatial reference should be the same as the `geometries` spatial reference.
|
|
39
50
|
*/
|
|
40
51
|
areaOfInterestExtent?: Extent;
|
|
41
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* The equation-based geographic transformation used to transform the geometries.
|
|
54
|
+
* Grid-based transformations are not supported.
|
|
55
|
+
*/
|
|
42
56
|
geographicTransformation?: GeographicTransformation;
|
|
43
57
|
/**
|
|
44
58
|
* Controls how much the result of the projection is allowed to deviate from the true preserved shape.
|
|
@@ -31,7 +31,7 @@ export interface GeographicTransformationProperties {
|
|
|
31
31
|
* > **Known Limitations**
|
|
32
32
|
* >
|
|
33
33
|
* > Currently, the client-side [projectOperator](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/projectOperator/) only supports
|
|
34
|
-
* > [equation-based geographic transformations](https://developers.arcgis.com/rest/services-reference/enterprise/using-spatial-references
|
|
34
|
+
* > [equation-based geographic transformations](https://developers.arcgis.com/rest/services-reference/enterprise/using-spatial-references/#transformation-pdfs).
|
|
35
35
|
*
|
|
36
36
|
* @since 4.32
|
|
37
37
|
* @see [projectOperator](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/projectOperator/)
|
|
@@ -44,9 +44,10 @@ export interface GeographicTransformationProperties {
|
|
|
44
44
|
export default class GeographicTransformation extends GeographicTransformationSuperclass {
|
|
45
45
|
constructor(properties?: GeographicTransformationProperties);
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Returns `true` if all steps are usable and equation-based, `false` if any step is grid-based.
|
|
48
|
+
* Grid-based transformations are not considered usable.
|
|
49
|
+
* For `null` and `undefined` values, the usability of one or more transformation steps cannot be determined directly. Use [isTransformationUsable()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/support/geographicTransformationUtils/#isTransformationUsable) to determine the usability.
|
|
48
50
|
*
|
|
49
|
-
* @returns Returns `true` if all steps are usable.
|
|
50
51
|
* @since 5.2
|
|
51
52
|
*/
|
|
52
53
|
get isUsable(): boolean | null | undefined;
|