@arcgis/core 4.34.0-next.67 → 4.34.0-next.68
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/arcade/Feature.js +1 -1
- package/arcade/functions/measures.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/097a5c333de28ec5e16f.js +1 -0
- package/assets/esri/core/workers/chunks/{997a2a1a51039ce7e4e3.js → 1ac6bbaee76684a07b64.js} +1 -1
- package/assets/esri/core/workers/chunks/28cfe1b270602e0c767b.js +1 -0
- package/assets/esri/core/workers/chunks/2ad1d458e4d18232a667.js +1 -0
- package/assets/esri/core/workers/chunks/{2cd27b06226e30aec5da.js → 3f164e587f8d69c306d5.js} +1 -1
- package/assets/esri/core/workers/chunks/{96102a9296afd1bfe1a9.js → 451dd3bb44664b4ca2ae.js} +1 -1
- package/assets/esri/core/workers/chunks/{cad03967e132a28512c2.js → 4aa98309081e6889ccbb.js} +1 -1
- package/assets/esri/core/workers/chunks/{90491262b6d6a126c32f.js → 52483db12203276e726e.js} +1 -1
- package/assets/esri/core/workers/chunks/5a95688651d7e8b7101d.js +1 -0
- package/assets/esri/core/workers/chunks/{5d8c64693830506c8776.js → 643acb12ec6a1d4b4fbb.js} +1 -1
- package/assets/esri/core/workers/chunks/{de4da985c398c8bcf2e7.js → 7336bfd57f6172ec7186.js} +1 -1
- package/assets/esri/core/workers/chunks/{bafd9b0f6e817252cb31.js → 75dd0acf049c7f3271b8.js} +1 -1
- package/assets/esri/core/workers/chunks/{f4d4c1f13522f20b00d1.js → 900eb2aa5cb1b08e1906.js} +1 -1
- package/assets/esri/core/workers/chunks/a6f66492651646c18f10.js +1 -0
- package/assets/esri/core/workers/chunks/{0f20c0eec850a39620a1.js → ad69cceec8db593fac14.js} +1 -1
- package/assets/esri/core/workers/chunks/{a44f17397d8589433dae.js → b683b0fa7fc430b4d9c5.js} +1 -1
- package/assets/esri/core/workers/chunks/{2f7e192ee2066f863e1d.js → c908184d747d33366881.js} +1 -1
- package/assets/esri/core/workers/chunks/{06ff5f34ad9bdf9705de.js → d3f59fbaa524b53fcbc6.js} +6 -0
- package/assets/esri/core/workers/chunks/{70dc7ec6474f0801bc04.js → de443d29d1a6b5300d00.js} +1 -1
- package/assets/esri/core/workers/chunks/e2486bf5546443408c85.js +1 -0
- package/assets/esri/core/workers/chunks/{d6f5297f7b323c340727.js → f060a52a9b69eb250d63.js} +1 -1
- package/assets/esri/core/workers/chunks/f8adac87e48ea86bec21.js +1 -0
- package/assets/esri/themes/base/widgets/_Expand.scss +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/ComponentShader.glsl.js +42 -36
- package/config.js +1 -1
- package/core/MemCache.js +1 -1
- package/editing/geometry/lineUtils.js +1 -1
- package/geometry/ellipsoidUtils.js +1 -1
- package/geometry/support/curves/bezierCurveUtils.js +1 -1
- package/geometry/support/curves/circleUtils.js +1 -1
- package/geometry/support/curves/curveLength.js +1 -1
- package/geometry/support/curves/ellipticArc7Utils.js +1 -1
- package/kernel.js +1 -1
- package/layers/support/gaussianSplatUtils.js +1 -1
- package/package.json +1 -1
- package/support/elevationInfoUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/isSupportedObjectUtils.js +1 -1
- package/views/3d/interactive/editingTools/move/isSupportedObject.js +1 -1
- package/views/3d/interactive/editingTools/reshape/isSupportedObject.js +1 -1
- package/views/3d/interactive/editingTools/transform/isSupportedGraphic.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/ElevationContext.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPointSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/support/CombinedElevationProvider.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +8 -2
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +17 -0
- package/views/GroundView.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/support/EditorItem.js +1 -1
- package/widgets/Editor/support/splitFeatureUtils.js +1 -1
- package/widgets/Expand.js +1 -1
- package/assets/esri/core/workers/chunks/047d6f7b1677cc7ab271.js +0 -1
- package/assets/esri/core/workers/chunks/3212a476184be25d17f8.js +0 -1
- package/assets/esri/core/workers/chunks/39d69afc9da9db0c75ab.js +0 -1
- package/assets/esri/core/workers/chunks/548818df658b607a364e.js +0 -1
- package/assets/esri/core/workers/chunks/7597ef10d1699e7088e5.js +0 -1
- package/assets/esri/core/workers/chunks/8a104b35708a492bd614.js +0 -1
- package/assets/esri/core/workers/chunks/a634764dec5404f4a1d7.js +0 -1
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{earth as
|
|
5
|
+
import{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as r,mars as o,moon as a}from"../geometry/support/Ellipsoid.js";import{ComponentData as i}from"../views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js";import{ForwardLinearDepthToWriteShadowMap as l}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{isColorOrColorEmission as t}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as c}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{ReadDepth as h}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{computeFragmentNormals as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as f,addLightingGlobalFactor as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as y,addMainLightDirection as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRenderingParameters as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadBaseColorTexture as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{OverlayIM as N}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{DiscardOrAdjustAlphaDraw as O}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{If as T,glsl as D}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as M}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{SnowCover as A}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{outputColorHighlightOID as W}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{sphereDepthInterpolate as P}from"../views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js";import{ShaderBuilder as R}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as z}from"../webscene/support/AlphaCutoff.js";function F(F){const B=new R,{vertex:_,fragment:I}=B;B.include(m,F),B.include(g,F),B.include(s,F),B.include(d,F),B.include(i,F),B.include(O,F),I.include(n,F),B.include(j,F),B.include($,F);const{output:E,pbrMode:H,hasNormalTexture:V,snowCover:G,receiveShadows:k,shadeNormals:U,spherical:q,ellipsoidMode:J,overlayEnabled:K,componentData:Q,vertexDiscardMode:X,hasGlow:Y,renderOccluded:Z}=F,ee=1===H||2===H;ee&&(B.include(L,F),V&&B.include(b,F));const re=4===E||5===E||6===E,oe=re&&1===Q,ae=1===J,ie=1===J?r.radius:ae?o.radius:a.radius;K&&(B.include(f,F),B.include(N,F),_.code.add(`\n ${T(q,`const float invRadius = ${D.float(1/ie)};`)}\n vec2 projectOverlay(vec3 pos) { return pos.xy ${T(q,"/ (1.0 + invRadius * pos.z);")}; }`));const le=K&&t(E)&&4===H;le&&(B.varyings.add("tbnTangent","vec3"),B.varyings.add("tbnBiTangent","vec3"),B.varyings.add("groundNormal","vec3"));const te=0===X,ne=2===X,de=1-1/255;if(B.include(S,F),B.include(l,F),_.main.add(D`
|
|
6
6
|
bool castShadows;
|
|
7
7
|
vec4 externalColor = forwardExternalColor(castShadows);
|
|
8
|
-
${
|
|
8
|
+
${T(oe,"if(!castShadows) { gl_Position = vec4(vec3(1e38), 1.0); return; }")}
|
|
9
9
|
|
|
10
|
-
${
|
|
10
|
+
${T(!te,`{ if (externalColor.a ${ne?">":"<="} ${D.float(de)}) { gl_Position = vec4(vec3(1e38), 1.0); return; } }`)}
|
|
11
11
|
|
|
12
|
-
${
|
|
12
|
+
${T(10===E,"externalColor.a = 1.0;")}
|
|
13
13
|
|
|
14
14
|
forwardPosition(readElevationOffset());
|
|
15
15
|
forwardViewPosDepth(vPosition_view);
|
|
@@ -20,24 +20,24 @@ import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";imp
|
|
|
20
20
|
forwardLinearDepthToWriteShadowMap();
|
|
21
21
|
forwardEmissiveStrength();
|
|
22
22
|
forwardObjectAndLayerIdColor();
|
|
23
|
-
${
|
|
23
|
+
${T(le,q?D`
|
|
24
24
|
groundNormal = normalize(positionWorld());
|
|
25
25
|
tbnTangent = normalize(cross(vec3(0.0, 0.0, 1.0), groundNormal));
|
|
26
|
-
tbnBiTangent = normalize(cross(groundNormal, tbnTangent));`:
|
|
26
|
+
tbnBiTangent = normalize(cross(groundNormal, tbnTangent));`:D`
|
|
27
27
|
groundNormal = vec3(0.0, 0.0, 1.0);
|
|
28
28
|
tbnTangent = vec3(1.0, 0.0, 0.0);
|
|
29
29
|
tbnBiTangent = vec3(0.0, 1.0, 0.0);`)}
|
|
30
|
-
${
|
|
30
|
+
${T(K,"setOverlayVTC(projectOverlay(position));")}
|
|
31
31
|
|
|
32
|
-
if (externalColor.a < ${
|
|
32
|
+
if (externalColor.a < ${D.float(z)}) {
|
|
33
33
|
// Discard this vertex
|
|
34
34
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
`),t(
|
|
37
|
+
`),t(E))return B.include(p,F),B.include(w,F),B.include(f,F),B.include(W,F),I.include(A,F),I.code.add(D`
|
|
38
38
|
float evaluateShadow() {
|
|
39
|
-
return ${
|
|
40
|
-
}`),
|
|
39
|
+
return ${k?"readShadowMap(vPositionWorldCameraRelative, linearDepth)":"0.0"};
|
|
40
|
+
}`),I.main.add(D`
|
|
41
41
|
discardBySlice(vPositionWorldCameraRelative);
|
|
42
42
|
discardByTerrainDepth();
|
|
43
43
|
|
|
@@ -47,60 +47,60 @@ import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";imp
|
|
|
47
47
|
/* When rendering the occluded overlay, we still need to read the base color texture
|
|
48
48
|
* because we need to use the same discard logic. However after that to render only the
|
|
49
49
|
* draped overlay, we simply set the base texture color to zero. */
|
|
50
|
-
${
|
|
50
|
+
${T(Z,D`textureColor = vec4(0);`)}
|
|
51
51
|
|
|
52
|
-
${
|
|
52
|
+
${T(K,D`vec4 overlayColor = getOverlayColor(ovColorTex, vtcOverlay);`)}
|
|
53
53
|
|
|
54
54
|
/* Early discard to only emit when we have overlay */
|
|
55
|
-
${
|
|
55
|
+
${T(K&&Z,D`if (overlayColor.a < ${D.float(z)}) { discard; }`)}
|
|
56
56
|
|
|
57
57
|
vec4 externalColor;
|
|
58
58
|
int externalColorMixMode;
|
|
59
59
|
readExternalColor(externalColor, externalColorMixMode);
|
|
60
60
|
|
|
61
61
|
vec4 materialColor = computeMaterialColor(textureColor, externalColor, externalColorMixMode);
|
|
62
|
-
`),
|
|
62
|
+
`),ee?(y(I),q&&C(I),I.main.add(D`
|
|
63
63
|
applyPBRFactors();
|
|
64
|
-
${
|
|
64
|
+
${T(1===H,D`if (externalColorMixMode == 3) {
|
|
65
65
|
mrr = vec3(0.0, 0.6, 0.2);
|
|
66
66
|
}`)}
|
|
67
67
|
float additionalIrradiance = 0.02 * mainLightIntensity[2];
|
|
68
|
-
${
|
|
69
|
-
vec3 shadingNormal = ${
|
|
70
|
-
vec3 groundNormal = ${
|
|
68
|
+
${T(V,"mat3 tangentSpace = computeTangentSpace(fragmentFaceNormal, vPositionWorldCameraRelative, vuv0);")}
|
|
69
|
+
vec3 shadingNormal = ${V?"computeTextureNormal(tangentSpace, vuv0)":"fragmentShadingNormal"};
|
|
70
|
+
vec3 groundNormal = ${q?D`normalize(positionWorld())`:D`vec3(0.0, 0.0, 1.0)`};
|
|
71
71
|
|
|
72
72
|
vec3 viewDir = normalize(vPositionWorldCameraRelative);
|
|
73
73
|
float ssao = 1.0 - occlusion * evaluateAmbientOcclusionInverse();
|
|
74
|
-
${
|
|
74
|
+
${T(G,D`float snow = getSnow(fragmentFaceNormal, normalize(positionWorld()));
|
|
75
75
|
materialColor.rgb = mix(materialColor.rgb, vec3(1.1), snow);
|
|
76
76
|
ssao = mix(ssao, 0.5 * ssao, snow);
|
|
77
77
|
shadingNormal = mix(shadingNormal, fragmentFaceNormal, snow);`)}
|
|
78
|
-
${
|
|
78
|
+
${T(K,"materialColor = materialColor * (1.0 - overlayColor.a) + overlayColor;")}
|
|
79
79
|
|
|
80
80
|
vec3 additionalLight = evaluateAdditionalLighting(ssao, positionWorld());
|
|
81
|
-
vec4 emission = ${
|
|
82
|
-
${
|
|
83
|
-
${
|
|
81
|
+
vec4 emission = ${Y?"vec4(0.0)":"getEmissions(materialColor.rgb)"};
|
|
82
|
+
${T(q,"float additionalAmbientScale = additionalDirectedAmbientLight(positionWorld());")}
|
|
83
|
+
${q?D`float shadow = max(lightingGlobalFactor * (1.0 - additionalAmbientScale), evaluateShadow());`:"float shadow = evaluateShadow();"}
|
|
84
84
|
vec4 shadedColor = vec4(evaluateSceneLightingPBR(shadingNormal, materialColor.rgb, shadow, ssao, additionalLight, viewDir, groundNormal, mrr, additionalIrradiance), materialColor.a);
|
|
85
|
-
`)):(
|
|
86
|
-
${
|
|
87
|
-
float shadow = ${
|
|
85
|
+
`)):(x(I),q&&C(I),le&&I.uniforms.add(new M("ovNormalTex",e=>e.overlay?.getTexture(3))),I.main.add(D`
|
|
86
|
+
${T(q,"float additionalAmbientScale = additionalDirectedAmbientLight(positionWorld());")}
|
|
87
|
+
float shadow = ${k?q?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), evaluateShadow())":"evaluateShadow()":q?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
|
|
88
88
|
|
|
89
|
-
${
|
|
89
|
+
${T(k&&!U,D`
|
|
90
90
|
float dotFL = dot(fragmentFaceNormal, mainLightDirection);
|
|
91
91
|
if( dotFL <= 0.0) shadow = 1.0;
|
|
92
92
|
`)}
|
|
93
|
-
${
|
|
93
|
+
${T(G,D`float snow = getSnow(fragmentFaceNormal, normalize(positionWorld()));
|
|
94
94
|
materialColor.rgb = mix(materialColor.rgb, vec3(1), snow);`)}
|
|
95
95
|
|
|
96
96
|
// At global scale we create some additional ambient light based on the main light to simulate global illumination
|
|
97
97
|
float ssao = evaluateAmbientOcclusion();
|
|
98
98
|
vec3 additionalLight = evaluateAdditionalLighting(ssao, positionWorld());
|
|
99
99
|
|
|
100
|
-
${
|
|
100
|
+
${T(K,"materialColor = materialColor * (1.0 - overlayColor.a) + overlayColor;")}
|
|
101
101
|
|
|
102
102
|
vec4 shadedColor = vec4(evaluateSceneLighting(fragmentShadingNormal, materialColor.rgb, shadow, ssao, additionalLight), materialColor.a);
|
|
103
|
-
${
|
|
103
|
+
${T(le,D`vec4 overlayWaterMask = getOverlayColor(ovNormalTex, vtcOverlay);
|
|
104
104
|
float waterNormalLength = length(overlayWaterMask);
|
|
105
105
|
if (waterNormalLength > 0.95) {
|
|
106
106
|
mat3 tbnMatrix = mat3(tbnTangent, tbnBiTangent, groundNormal);
|
|
@@ -109,13 +109,19 @@ import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";imp
|
|
|
109
109
|
// un-gamma the ground color to mix in linear space
|
|
110
110
|
shadedColor = mix(shadedColor, waterColorNonLinear, waterColorLinear.w);
|
|
111
111
|
}`)}
|
|
112
|
-
`)),
|
|
112
|
+
`)),I.main.add(`outputColorHighlightOID(shadedColor, vPositionWorldCameraRelative, materialColor.rgb ${T(G,", snow")});`),F.sphereDepthInterpolate&&(B.include(P,{radius:ie*e}),B.fragment.include(h),I.main.add(D`if (sphereFade()>0.0) {
|
|
113
|
+
vec3 worldRay = normalize(vPositionWorldCameraRelative);
|
|
114
|
+
vec3 viewRay = normalize(vPosition_view);
|
|
115
|
+
gl_FragDepth = delinearizeDepth(sphereDepthInterpolate(worldRay, viewRay, linearizeDepth(gl_FragCoord.z)));
|
|
116
|
+
} else {
|
|
117
|
+
gl_FragDepth = gl_FragCoord.z;
|
|
118
|
+
}`)),B;const se=3===E,ge=10===E,me=9===E,ce=re||7===E||8===E;return ce&&B.include(c,F),se&&B.include(w,F),K&&B.include(u,F),B.include(v,F),I.main.add(D`
|
|
113
119
|
discardBySlice(vPositionWorldCameraRelative);
|
|
114
120
|
|
|
115
121
|
vec4 textureColor = readBaseColorTexture();
|
|
116
122
|
discardOrAdjustAlpha(textureColor);
|
|
117
123
|
|
|
118
|
-
${
|
|
119
|
-
${
|
|
120
|
-
${
|
|
121
|
-
${
|
|
124
|
+
${T(ce,"outputDepth(linearDepth);")}
|
|
125
|
+
${T(se,D`fragColor = vec4(vec3(0.5) + 0.5 * fragmentFaceNormalView, 1.0);`)}
|
|
126
|
+
${T(ge,K?"fragColor = getOverlayColorTexel();":"outputObjectAndLayerIdColor();")}
|
|
127
|
+
${T(me,T(K,D`calculateOcclusionAndOutputHighlight(getAllOverlayHighlightValuesEncoded());`,D`calculateOcclusionAndOutputHighlight();`))}`),B}const B=Object.freeze(Object.defineProperty({__proto__:null,build:F},Symbol.toStringTag,{value:"Module"}));export{B as C,F as b};
|
package/config.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
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="4.34.0-next.
|
|
5
|
+
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="4.34.0-next.68";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
package/core/MemCache.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"./has.js";const t=-3,s=t-1,i=!!has("esri-tests-disable-gpu-memory-measurements");class e{constructor(t,s,i,e=0){this.name=t,this._storage=s,this.removeFunc=i,this._defaultPriority=e,this.id=`${
|
|
5
|
+
import has from"./has.js";const t=-3,s=t-1,i=!!has("esri-tests-disable-gpu-memory-measurements");class e{constructor(t,s,i,e=0){this.name=t,this._storage=s,this.removeFunc=i,this._defaultPriority=e,this.id=`${o++}${n}`,this.size=0,this._hit=0,this._miss=0,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage=r}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(t){return this._storage.getSize(this,t)}set maxSize(t){this._storage.setMaxSize(this,t)}resetHitRate(){this._hit=this._miss=0}put(t,s,i=this._defaultPriority){this._storage.put(this,t,s,s.cachedMemory,i)}pop(t){const s=this._storage.pop(this,t);return void 0===s?++this._miss:++this._hit,s}get(t){const s=this._storage.get(this,t);return void 0===s?++this._miss:++this._hit,s}peek(t){return this._storage.peek(this,t)}updateSize(t,s){this._storage.updateSize(this,t,s,s.cachedMemory)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}*[Symbol.iterator](){yield*this._storage.values(this)}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class h{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(t){this._users.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._users.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}getSize(t,s){const i=this._db.get(t.id+s);return i?.size??0}put(e,h,r,o,n){h=e.id+h;const a=this._db.get(h);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(h),a.entry!==r&&this._notifyRemove(h,a.entry,a.size,0)),o>this._maxSize)return void this._notifyRemove(h,r,o,0);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!o||o<0)return i||console.warn(`Refusing to cache entry with size ${o} for key ${h}`),void this._notifyRemove(h,r,0,0);const c=1+Math.max(n,s)-t;this._db.set(h,new _(r,o,c)),this._size+=o,e.size+=o,this._checkSize()}updateSize(t,s,i,e){s=t.id+s;const h=this._db.get(s);if(h&&h.entry===i){for(this._size-=h.size,t.size-=h.size;e>this._maxSize;){const t=this._notifyRemove(s,i,e,1);if(!(null!=t&&t>0))return void this._db.delete(s);e=t}h.size=e,this._size+=e,t.size+=e,this._checkSize()}}pop(t,s){s=t.id+s;const i=this._db.get(s);if(i)return this._size-=i.size,t.size-=i.size,this._db.delete(s),++this._hit,i.entry;++this._miss}get(t,s){s=t.id+s;const i=this._db.get(s);if(void 0!==i)return this._db.delete(s),i.lives=i.lifetime,this._db.set(s,i),++this._hit,i.entry;++this._miss}peek(t,s){const i=this._db.get(t.id+s);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const s={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},i={},e=new Array;this._db.forEach((t,s)=>{const h=t.lifetime;e[h]=(e[h]||0)+t.size,this._users.forEach(e=>{const{id:h,name:r}=e;if(s.startsWith(h)){const s=i[r]||0;i[r]=s+t.size}})});const h={};this._users.forEach(t=>{const s=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const e=i[s]||0;i[s]=e,h[s]=Math.round(100*t.hitRate)+"%"}else h[s]="0%"});const r=Object.keys(i);r.sort((t,s)=>i[s]-i[t]),r.forEach(t=>s[t]=Math.round(i[t]/2**20)+"MB / "+h[t]);for(let o=e.length-1;o>=0;--o){const i=e[o];i&&(s["Priority "+(o+t-1)]=Math.round(i/this._size*100)+"%")}return s}resetStats(){this._hit=this._miss=0,this._users.forEach(t=>t.resetHitRate())}clear(t){const s=t.id;this._db.forEach((t,i)=>{i.startsWith(s)&&(this._size-=t.size,this._db.delete(i),this._notifyRemove(i,t.entry,t.size,0))}),t.size=0}clearAll(){this._db.forEach((t,s)=>this._notifyRemove(s,t.entry,t.size,0)),this._users.forEach(t=>t.size=0),this._size=0,this._db.clear()}*values(t){for(const[s,i]of this._db)s.startsWith(t.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,s,i,e){const h=this._users.get(t.split(n)[0])?.removeFunc,r=h?.(s,e,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((t,s)=>this._checkSizeLimits(t,s)),this._checkSizeLimits(this.maxSize)}setMaxSize(t,s){null==s||s<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,s)}_checkSizeLimits(t,s){const i=s??this;if(i.size<=t)return;const e=s?.id;let h=!0;for(;h;){h=!1;for(const[r,o]of this._db)if(0===o.lifetime&&(!e||r.startsWith(e))){const e=s??this._users.get(r.split(n)[0]);if(this._purgeItem(r,o,e),i.size<=.9*t)return;h||=this._db.has(r)}}for(const[r,o]of this._db)if(!e||r.startsWith(e)){const e=s??this._users.get(r.split(n)[0]);if(this._purgeItem(r,o,e),i.size<=.9*t)return}}_purgeItem(t,s,i){if(this._db.delete(t),s.lives<=1){this._size-=s.size,i&&(i.size-=s.size);const e=this._notifyRemove(t,s.entry,s.size,1);null!=e&&e>0&&(this._size+=e,i&&(i.size+=e),s.lives=s.lifetime,s.size=e,this._db.set(t,s))}else--s.lives,this._db.set(t,s)}}const r=new h(0);let o=0;class _{constructor(t,s,i){this.entry=t,this.size=s,this.lifetime=i,this.lives=i}}const n=":";export{e as MemCache,h as MemCacheStorage,t as MinPriority,s as NoPriority};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import{fromArray as e,fromValues as t,create as r}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{n,b as o}from"../../chunks/vec32.js";import{interpolateM as s}from"./coordUtils.js";import a from"../../geometry/Point.js";import{getLength as i}from"../../geometry/support/coordsUtils.js";import{isCoordinate as f,getEndpoint as c}from"../../geometry/support/curves/curveUtils.js";import{splitCurveAtPoint as l}from"../../geometry/support/curves/splitCurveAtPoint.js";function p(e,t,r){let n=t[0]-e[0],o=t[1]-e[1];const s=Math.hypot(n,o);return n/=s,o/=s,n*=r,o*=r,[e[0]+n,e[1]+o]}function u(e,s,a,i){const f=t(s[0]-e[0],s[1]-e[1],s[2]*i-e[2]*i);return n(f,f),o(r(),e,f,a)}function m(e,t){let r=0,n=null;const o=e.hasM,f=e.hasZ?3:2;for(const c of e.paths){if(0===t){n=new a({x:c[0][0],y:c[0][1],...o?{m:c[0][f]}:{},spatialReference:e.spatialReference,hasM:o});break}for(let l=0;l<c.length-1;l++){const u=i(c[l],c[l+1]),m=r+u;if(m===t){n=new a({x:c[l+1][0],y:c[l+1][1],...o?{m:c[l+1][f]}:{},spatialReference:e.spatialReference,hasM:o});break}if(m>t){const i=p(c[l],c[l+1],t-r);n=new a({x:i[0],y:i[1],...o?{m:s(c[l][f],c[l+1][f],u,t-r)??void 0}:{},spatialReference:e.spatialReference,hasM:o});break}r+=u}if(null!==n)break}return n}function h(t,r,n){let o=0;const i=t.hasM;for(const f of t.paths){if(0===r)return new a({x:f[0][0],y:f[0][1],z:f[0][2],...i?{m:f[0][3]}:{},hasZ:!0,hasM:i,spatialReference:t.spatialReference});for(let c=0;c<f.length-1;c++){const l=y(f[c],f[c+1],n),p=o+l;if(p===r)return new a({x:f[c+1][0],y:f[c+1][1],z:f[c+1][2],...i?{m:f[c+1][3]}:{},hasZ:!0,hasM:i,spatialReference:t.spatialReference});if(p>r){const p=u(e(f[c]),e(f[c+1]),r-o,n);return new a({x:p[0],y:p[1],z:p[2],...i?{m:s(f[c][3],f[c+1][3],l,r-o)??void 0}:{},hasZ:!0,hasM:i,spatialReference:t.spatialReference})}o+=l}}return null}function y(e,t,r){return Math.hypot(e[0]-t[0],e[1]-t[1],void 0!==e[2]&&void 0!==t[2]?e[2]*r-t[2]*r:0)}function R(e,t,r,n=.001){if(f(t)){return[[e,r],[r,t]]}const[o,s]=l(e,t,r,n);return[[e,o],[c(o),s]]}export{p as distanceAlongLineSegment,u as distanceAlongLineSegmentWithZ,m as pointAlongLine,h as pointAlongLineWithZ,y as segmentLength3d,R as splitSegmentAtPoint};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{mars as n,moon as
|
|
5
|
+
import{mars as n,moon as t,earth as e}from"./support/Ellipsoid.js";import{equals as r,isValid as i,isWKIDFromMars as c,isWKIDFromMoon as o}from"./support/spatialReferenceUtils.js";function S(n){return{wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${n.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`}}const T=S(e),G=S(n),I=S(t),p={wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${e.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`},s=G.wkt.toUpperCase(),u=I.wkt.toUpperCase();function E(r){if(null!=r&&i(r)){const e=r.wkid,i=r.wkt2??r.wkt;if(c(e))return n;const S=i?.toUpperCase();if(i&&S===s)return n;if(o(e)||S&&S===u)return t}return e}const R=Math.cos(Math.PI/16/16);function A(r){return c(r)?n:o(r)?t:e}function O(n){return r(n,T)}function U(n){return O(n)||r(n,G)||r(n,I)}export{T as SphericalECEFSpatialReferenceLike,G as SphericalPCPFMarsLike,I as SphericalPCPFMoonLike,p as WGS84ECEFSpatialReferenceLike,E as getReferenceEllipsoid,A as getReferenceEllipsoidFromWKID,O as isSphericalECEF,U as isSphericalPCPF,R as radiusModifier};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{floatEqualRelative as t,floatEqualAbsolute as n}from"../../../core/mathUtils.js";import{expandPointInPlace as o,containsXY as r,expandXInPlace as s,expandYInPlace as c}from"../aaBoundingRect.js";import{
|
|
5
|
+
import{floatEqualRelative as t,floatEqualAbsolute as n}from"../../../core/mathUtils.js";import{expandPointInPlace as o,containsXY as r,expandXInPlace as s,expandYInPlace as c}from"../aaBoundingRect.js";import{distance2 as u,interpolateSegment as e,findClosestAndFurthestCurveParametersToPoint as f}from"./mathUtils.js";const i=[0,0];function a(t){const n=1-t,o=n*n,r=t*t;return[o*n,3*t*o,3*r*n,r*t]}function h(t,n,o,r,s){const[c,u,e,f]=a(s);return[t[0]*c+n[0]*u+o[0]*e+r[0]*f,t[1]*c+n[1]*u+o[1]*e+r[1]*f]}function m(t,n,o,r,s){const[c,u,e,f]=a(s);return t*c+n*u+o*e+r*f}function p(t,n,o){const r=t,[s,c,u]=n.b;return h(r,c,u,s,o)}function M(t,n,o){const r=t,[s,c,u]=n.b,f=e([0,0],r,c,o),a=e(i,c,u,o),h=e([0,0],u,s,o),m=e([0,0],f,a,o),p=e([0,0],a,h,o);return[{b:[e([],m,p,o),f,m]},{b:[[...s],p,h]}]}function b(o,r,s){const c=o,[u,e,i]=r.b,a=f(s,[.1,.5,.9],t=>{const n=1-t,[o,r]=h(c,e,i,u,t);return[o,r,3*n*n*(e[0]-c[0])+6*n*t*(i[0]-e[0])+3*t*t*(u[0]-i[0]),3*n*n*(e[1]-c[1])+6*n*t*(i[1]-e[1])+3*t*t*(u[1]-i[1]),6*n*(i[0]-2*e[0]+c[0])+6*t*(u[0]-2*i[0]+e[0]),6*n*(i[1]-2*e[1]+c[1])+6*t*(u[1]-2*i[1]+e[1])]}).map(t=>Math.min(1,Math.max(0,t)));a.push(0,1);let m=1/0;const p=a.map(t=>{const n=h(c,e,i,u,t),[o,r]=n,f=s[0]-o,a=s[1]-r,p=Math.sqrt(f*f+a*a);return m=Math.min(p,m),{t,curvePoint:n,distance:p}}),M=[];for(const f of p){const{t:o,distance:r}=f;t(r,m)&&!M.some(({t})=>n(t,o))&&M.push(f)}return M}function l(t,n,u){const e=n,[f,i,a]=u.b;if(o(t,e),o(t,f),r(t,i[0],i[1])&&r(t,a[0],a[1]))return t;for(const o of q(e[0],i[0],a[0],f[0]))o>0&&o<1&&s(t,m(e[0],i[0],a[0],f[0],o));for(const o of q(e[1],i[1],a[1],f[1]))o>0&&o<1&&c(t,m(e[1],i[1],a[1],f[1],o));return t}function q(t,n,o,r){const s=3*(3*(n-o)-t+r),c=6*(t-2*n+o),u=3*(n-t);if(0===s)return 0!==c?[-u/c]:[];const e=Math.sqrt(c*c-4*s*u);return[(-c+e)/(2*s),(-c-e)/(2*s)]}function d(t,n,o){const r=16;let s=0,c=[n];for(let e=0;e<r;e++){let n=t;const r=[];for(const t of c)r.push(...M(n,t,.5)),n=t.b[0];c=r,n=t,s=0;let e=0;for(const t of c){const[o,r,c]=t.b,f=Math.sqrt(u(n,o));s+=(f+(Math.sqrt(u(n,r))+Math.sqrt(u(r,c))+Math.sqrt(u(c,o))))/2,e+=f,n=o}if(s-e<o)return s}return s}export{l as bezierCurveExtent,d as bezierCurveLength,b as closestPointsOnBezierCurve,p as interpolateBezierCurve,h as interpolateCubicBezier,m as interpolateCubicBezier1D,M as splitBezierCurve};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{expandPointInPlace as t}from"../aaBoundingRect.js";import{angularRange as n,
|
|
5
|
+
import{expandPointInPlace as t}from"../aaBoundingRect.js";import{angularRange as n,angularRangeClamp as a,distance2 as r,angularRangeWrap as s}from"./mathUtils.js";class c{constructor(t,n,a,r,s,c){this.cx=t,this.cy=n,this.radius=a,this.thetaStart=r,this.thetaEnd=s,this.isInvalid=c}}function i(t,n){const{cx:a,cy:r,radius:s}=t;return[a+s*Math.cos(n),r+s*Math.sin(n)]}function o(t,n){const{thetaStart:a,thetaEnd:r}=t;return i(t,a*(1-n)+r*n)}function h(t,s){const{cx:c,cy:o,thetaStart:h,thetaEnd:e}=t,[u,d]=s,f=a(n(h,e),Math.atan2(d-o,u-c)),m=i(t,f);return{t:(f-h)/(e-h),curvePoint:m,distance:Math.sqrt(r(s,m))}}function e(a,r){const{cx:c,cy:o,radius:h,thetaStart:e,thetaEnd:u}=r;t(a,i(r,e)),t(a,i(r,u));const d=n(e,u),f=Math.PI/2;let m=0;for(const n of[[c+h,o],[c,o+h],[c-h,o],[c,o-h]])m=s(d,m),m>d.min&&m<d.max&&t(a,n),m+=f;return a}function u(t){const{radius:n,thetaStart:a,thetaEnd:r}=t;return n*Math.abs(r-a)}export{c as DerivedCircle,e as circularCurveExtent,u as circularCurveLength,h as closestPointOnCircle,o as interpolateCircle};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{bezierCurveLength as r}from"./bezierCurveUtils.js";import{circularCurveLength as i}from"./circleUtils.js";import{deriveCircleFromCircularArc as t}from"./circularArcUtils.js";import{
|
|
5
|
+
import{bezierCurveLength as r}from"./bezierCurveUtils.js";import{circularCurveLength as i}from"./circleUtils.js";import{deriveCircleFromCircularArc as t}from"./circularArcUtils.js";import{isBezierCurve as s,isCircularArc as o,isEllipticArc4 as l}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as m}from"./ellipticArc4Utils.js";import{ellipticArcLength as c}from"./ellipticArc7Utils.js";import{distance2 as e}from"./mathUtils.js";function f(f,n,p=1){if(s(n))return r(f,n,p);if(o(n)){const r=t(f,n);return r.isInvalid?Math.sqrt(e(f,n.c[0])):i(r)}if(l(n)){const r=m(f,n);return r.isInvalid?Math.sqrt(e(f,n.a[0])):i(r)}return c(f,n,p)}export{f as curveLength};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{set as t,invert as s,transpose as n,multiply as a}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{transformMat3 as o}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{expandPointInPlace as i}from"../aaBoundingRect.js";import{cloneCurve as c}from"./curveUtils.js";import{angularRangeWrap as h,angularRange as u,angularRangeOriented as e,wrapAtan2 as f,distance2 as m,
|
|
5
|
+
import{set as t,invert as s,transpose as n,multiply as a}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{transformMat3 as o}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{expandPointInPlace as i}from"../aaBoundingRect.js";import{cloneCurve as c}from"./curveUtils.js";import{angularRangeWrap as h,angularRange as u,angularRangeOriented as e,wrapAtan2 as f,distance2 as m,intersectLineLine as M,findClosestAndFurthestCurveParametersToPoint as l}from"./mathUtils.js";class b{constructor(t,s,n,a,r,o,i,c,h){this.cx=t,this.cy=s,this.a=n,this.b=a,this.cosR=r,this.sinR=o,this.u1=i,this.u2=c,this.isInvalid=h}}function p(t,s){const[n,a,r,o,i,c,h]=s.a,[u,m]=t,[M,l]=n,[p,R]=a,d=c*h,x=Math.cos(i),q=Math.sin(i),[I,g]=e(f(1/d*(m-R)*x-1/d*(u-p)*q,1/c*(m-R)*q+1/c*(u-p)*x),Math.atan2(1/d*(l-R)*x-1/d*(M-p)*q,1/c*(l-R)*q+1/c*(M-p)*x),r,o);return new b(p,R,c,d,x,q,I,g,0===c||0===d)}function R(t,s){const{a:n,b:a,cosR:r,sinR:o,cx:i,cy:c}=t,h=Math.cos(s),u=Math.sin(s);return[n*h*r-a*u*o+i,n*h*o+a*u*r+c]}function d(t,s){const{u1:n,u2:a}=t;return R(t,n*(1-s)+a*s)}function x(t,s,n){if(n<0||n>1)return[];if(0===n||1===n)return[c(s)];const[a,[r,o],i,h,u,e,f]=s.a,{u1:m,u2:M}=t,l=m*(1-n)+M*n;return[{a:[[...d(t,n)],[r,o],Math.abs(l-m)<Math.PI?1:0,h,u,e,f]},{a:[[...a],[r,o],Math.abs(M-l)<Math.PI?1:0,h,u,e,f]}]}function q(t,s){const{a:n,b:a,cosR:r,sinR:o,u1:i,u2:c}=t,e=Math.PI/6,f=l(s,[1*e,2*e,4*e,5*e,7*e,8*e,10*e,11*e],s=>{const i=Math.cos(s),c=Math.sin(s),[h,u]=R(t,s);return[h,u,-n*r*c-a*o*i,-n*o*c+a*r*i,-n*r*i+a*o*c,-n*o*i-a*r*c]}),m=u(i,c),M=new Set(f.map(t=>h(m,t)).filter(t=>t>m.min&&t<m.max));M.add(i),M.add(c);let b,p,d=1/0;for(const h of M){const n=R(t,h),[a,r]=n,o=s[0]-a,u=s[1]-r,e=o*o+u*u;e<d&&(b=(h-i)/(c-i),p=n,d=e)}return{t:b,curvePoint:p,distance:Math.sqrt(d)}}function I(t,s,n){const a=p(s,n),{a:r,b:o,u1:c,u2:e,cosR:f,sinR:m,isInvalid:M}=a,l=n.a[0];if(i(t,s),i(t,l),M)return t;const b=Math.atan2(-o*m,r*f),d=b+Math.PI,x=Math.atan2(o*f,r*m),q=x+Math.PI,I=u(c,e);for(const u of[b,d,x,q].map(t=>h(I,t)))u>I.min&&u<I.max&&i(t,R(a,u));return t}function g(t,s,n){const[a,r,o,i,c,h,u]=s.a,e=p(t,s),{u1:f,u2:l,isInvalid:b}=e,x=l-f;if(b)return Math.sqrt(m(t,a));const q=14,I=[0,0];let g=0,j=[d(e,0),d(e,.25),d(e,.5),d(e,.75),d(e,1)];for(let p=0;p<q;p++){const t=j.length-1,s=x/(2*t),a=[];for(let n=0;n<t;n++)a.push(j[n]),a.push(R(e,f+(2*n+1)*s));a.push(j[j.length-1]),j=a,g=0;let o=0;for(let n=1;n<j.length;n++){const t=j[n-1],s=j[n];if(g+=Math.sqrt(m(t,s)),n>1){const a=j[n-2],i=M(I,a,t,r,s);o+=i?Math.sqrt(m(t,i)):Math.abs(s[0]-t[0])+Math.abs(s[1]-t[1])}else o+=g}if(o-g<n)return g}return g}const j=r(),v=r(),P=r(),y=r();function w(r,i,c){const[h,u,e,M,l,b,R]=i.a,d=p(r,i),{cosR:x,sinR:q,a:I,b:g,cx:w,cy:U}=d,B=o([0,0],h,c),S=o([0,0],u,c),k=c[0]*c[4]<0?1-M:M;{const s=I*I*q*q+g*g*x*x,n=2*(g*g-I*I)*q*x,a=I*I*x*x+g*g*q*q,r=-2*s*w-n*U,o=-n*w-2*a*U;t(j,s,n/2,r/2,n/2,a,o/2,r/2,o/2,s*w*w+n*w*U+a*U*U-I*I*g*g)}if(s(v,c),null==v){const t=o([0,0],r,c);return{a:[B,S,e,M,f(B[1],B[0]),Math.sqrt(m(B,t))/2,0]}}n(P,v),a(y,a(y,P,j),v);{const t=y[0],s=2*y[1],n=y[4],a=2*y[2],r=2*y[5],o=s*s-4*t*n,i=2*(t*r*r+n*a*a-s*a*r+o*y[8]),c=Math.sqrt((t-n)**2+s*s),h=-Math.sqrt(i*(t+n+c))/o,u=-Math.sqrt(i*(t+n-c))/o;return{a:[B,S,e,k,.5*f(-s,n-t),h,u/h]}}}export{b as DerivedEllipse,q as closestPointOnEllipse,p as deriveEllipse,I as ellipticArcExtent,g as ellipticArcLength,d as interpolateEllipse,x as splitEllipticArc7,w as transformEllipticArc};
|
package/kernel.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
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="4.34";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="4.34.0-next.
|
|
5
|
+
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="4.34";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="4.34.0-next.68",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};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{fromValues as s}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";const
|
|
5
|
+
import{fromValues as s}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import{splatPageSizeInU32 as t}from"./GaussianSplatAtlasPageAllocator.js";const i=4194304;class e{constructor(s,t,i,e){this.handle=s,this.gaussianAtlasIndices=t,this.pageIds=i,this.positions=e,this.isVisible=!1}get usedMemory(){return 4*this.gaussianAtlasIndices.length+8*this.positions.length+this.pageIds.length*t*4}get cachedMemory(){return this.usedMemory}}function a(t){const i=Math.ceil(Math.sqrt(t)),e=Math.ceil(t/i);return s(i,e)}export{e as GaussianTile,a as evalTextureSize,i as maxAllowedVisibleGaussians};
|
package/package.json
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{verticalLengthUnitFromSpatialReference as e,convertUnit as n}from"../core/unitUtils.js";import{getMetersPerUnit as t}from"../symbols/support/unitConversionUtils.js";function o(e){return e?j:z}function r(e,n){return n?.mode?n.mode:o(e).mode}function u(e,n){return null!=n?n:o(e)}function i(e,n){return r(null==e||(e.hasZ??!1),n)}function s(e,n){return u(null==e||(e.hasZ??!1),n)}function l(e){const n=g(e);return i(e.geometry,n)}function a(e){const n=g(e),t=i(e.geometry,n),o=null!=n&&"on-the-ground"!==t?R(n):0,r=n?.featureExpressionInfo;return{mode:t,offset:o,featureExpressionInfo:r}}function f(e){return v(a(e))}function c(e){return v(e)||d(e)}function d(e){return"0"===e?.featureExpressionInfo?.expression}function v(e){if(!e)return!1;if("on-the-ground"===e.mode)return!1;const n=e?.featureExpressionInfo?e.featureExpressionInfo.expression:null;return!(!n||"0"===n)}function g(e){return e.layer&&"elevationInfo"in e.layer?e.layer.elevationInfo:null}function h(t,o){if(!t?.offset)return 0;const{offset:r,unit:u}=t;if("decimal-degrees"===u)return 0;const i="unknown"!==u&&u?u:"meters",s=e(o);return s?n(r,i,s):0}function p(e,n,t){if(!t?.mode)return;const o=e.hasZ?e.z:0,r=h(t,e.spatialReference);switch(t.mode){case"absolute-height":return o-r;case"on-the-ground":return 0;case"relative-to-ground":return o-((n.elevationProvider.getElevation(e.x,e.y,o,e.spatialReference,"ground")??0)+r);case"relative-to-scene":return o-((n.elevationProvider.getElevation(e.x,e.y,o,e.spatialReference,"scene")??0)+r)}}function m(e,n,t,o=null){return E(e,n.x,n.y,n.hasZ?n.z:0,n.spatialReference,t,o)}function x(e,n,t,o,r=null){return E(e,n[0],n[1],n.length>2?n[2]:0,t,o,r)}function E(e,n,t,o,r,u,i=null){if(null==u)return;const s=null!=i?i.mode:"absolute-height";if("on-the-ground"===s)return 0;const{absoluteZ:l}=b(n,t,o,r,e,u);return I(l,n,t,o,r,e,i,s)}function b(e,n,t,o,r,u){const i=h(u,o);switch(u.mode){case"absolute-height":return{absoluteZ:t+i,elevation:0};case"on-the-ground":{const t=r.elevationProvider.getElevation(e,n,0,o,"ground")??0;return{absoluteZ:t,elevation:t}}case"relative-to-ground":{const u=r.elevationProvider.getElevation(e,n,t,o,"ground")??0;return{absoluteZ:t+u+i,elevation:u}}case"relative-to-scene":{const u=r.elevationProvider.getElevation(e,n,t,o,"scene")??0;return{absoluteZ:t+u+i,elevation:u}}}}function I(e,n,t,o,r,u,i,s){const l=h(i,r);switch(s){case"absolute-height":return e-l;case"relative-to-ground":return e-((u.elevationProvider.getElevation(n,t,o,r,"ground")??0)+l);case"relative-to-scene":return e-((u.elevationProvider.getElevation(n,t,o,r,"scene")??0)+l)}}function y(e,n){if(null==n)return!1;const{mode:t}=n;return null!=t&&("scene"===e&&"relative-to-scene"===t||"ground"===e&&"absolute-height"!==t)}function Z(e,n,t){return t&&t.mode!==n?`${e} only support ${n} elevation mode`:null}function P(e,n,t){return t?.mode===n?`${e} do not support ${n} elevation mode`:null}function w(e,n){return null!=n?.featureExpressionInfo&&"0"!==n.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function $(e,n){n&&e.warn(".elevationInfo=",n)}function R(e){return(e?.offset??0)*t(e?.unit)}const j={mode:"absolute-height",offset:0},z={mode:"on-the-ground",offset:null};export{j as absoluteHeightElevationInfo,y as elevationContextAffectsAlignment,Z as elevationModeRequiredMessage,P as elevationModeUnsupportedMessage,d as featureExpressionInfoIsZero,w as featureExpressionUnsupportedMessage,m as getConvertedElevation,x as getConvertedElevationFromVector,E as getConvertedElevationFromXYZ,u as getEffectiveElevationInfo,r as getEffectiveElevationMode,h as getElevationOffset,R as getElevationOffsetInMeters,s as getGeometryEffectiveElevationInfo,i as getGeometryEffectiveElevationMode,a as getGraphicEffectiveElevationInfo,l as getGraphicEffectiveElevationMode,p as getZForElevationMode,
|
|
5
|
+
import{verticalLengthUnitFromSpatialReference as e,convertUnit as n}from"../core/unitUtils.js";import{getMetersPerUnit as t}from"../symbols/support/unitConversionUtils.js";function o(e){return e?j:z}function r(e,n){return n?.mode?n.mode:o(e).mode}function u(e,n){return null!=n?n:o(e)}function i(e,n){return r(null==e||(e.hasZ??!1),n)}function s(e,n){return u(null==e||(e.hasZ??!1),n)}function l(e){const n=g(e);return i(e.geometry,n)}function a(e){const n=g(e),t=i(e.geometry,n),o=null!=n&&"on-the-ground"!==t?R(n):0,r=n?.featureExpressionInfo;return{mode:t,offset:o,featureExpressionInfo:r}}function f(e){return v(a(e))}function c(e){return v(e)||d(e)}function d(e){return"0"===e?.featureExpressionInfo?.expression}function v(e){if(!e)return!1;if("on-the-ground"===e.mode)return!1;const n=e?.featureExpressionInfo?e.featureExpressionInfo.expression:null;return!(!n||"0"===n)}function g(e){return e.layer&&"elevationInfo"in e.layer?e.layer.elevationInfo:null}function h(t,o){if(!t?.offset)return 0;const{offset:r,unit:u}=t;if("decimal-degrees"===u)return 0;const i="unknown"!==u&&u?u:"meters",s=e(o);return s?n(r,i,s):0}function p(e,n,t){if(!t?.mode)return;const o=e.hasZ?e.z:0,r=h(t,e.spatialReference);switch(t.mode){case"absolute-height":return o-r;case"on-the-ground":return 0;case"relative-to-ground":return o-((n.elevationProvider.getElevation(e.x,e.y,o,e.spatialReference,"ground")??0)+r);case"relative-to-scene":return o-((n.elevationProvider.getElevation(e.x,e.y,o,e.spatialReference,"scene")??0)+r)}}function m(e,n,t,o=null){return E(e,n.x,n.y,n.hasZ?n.z:0,n.spatialReference,t,o)}function x(e,n,t,o,r=null){return E(e,n[0],n[1],n.length>2?n[2]:0,t,o,r)}function E(e,n,t,o,r,u,i=null){if(null==u)return;const s=null!=i?i.mode:"absolute-height";if("on-the-ground"===s)return 0;const{absoluteZ:l}=b(n,t,o,r,e,u);return I(l,n,t,o,r,e,i,s)}function b(e,n,t,o,r,u){const i=h(u,o);switch(u.mode){case"absolute-height":return{absoluteZ:t+i,elevation:0};case"on-the-ground":{const t=r.elevationProvider.getElevation(e,n,0,o,"ground")??0;return{absoluteZ:t,elevation:t}}case"relative-to-ground":{const u=r.elevationProvider.getElevation(e,n,t,o,"ground")??0;return{absoluteZ:t+u+i,elevation:u}}case"relative-to-scene":{const u=r.elevationProvider.getElevation(e,n,t,o,"scene")??0;return{absoluteZ:t+u+i,elevation:u}}}}function I(e,n,t,o,r,u,i,s){const l=h(i,r);switch(s){case"absolute-height":return e-l;case"relative-to-ground":return e-((u.elevationProvider.getElevation(n,t,o,r,"ground")??0)+l);case"relative-to-scene":return e-((u.elevationProvider.getElevation(n,t,o,r,"scene")??0)+l)}}function y(e,n){if(null==n)return!1;const{mode:t}=n;return null!=t&&("scene"===e&&"relative-to-scene"===t||"ground"===e&&"absolute-height"!==t)}function Z(e,n,t){return t&&t.mode!==n?`${e} only support ${n} elevation mode`:null}function P(e,n,t){return t?.mode===n?`${e} do not support ${n} elevation mode`:null}function w(e,n){return null!=n?.featureExpressionInfo&&"0"!==n.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function $(e,n){n&&e.warn(".elevationInfo=",n)}function R(e){return(e?.offset??0)*t(e?.unit)}const j={mode:"absolute-height",offset:0},z={mode:"on-the-ground",offset:null};export{j as absoluteHeightElevationInfo,y as elevationContextAffectsAlignment,Z as elevationModeRequiredMessage,P as elevationModeUnsupportedMessage,d as featureExpressionInfoIsZero,w as featureExpressionUnsupportedMessage,m as getConvertedElevation,x as getConvertedElevationFromVector,E as getConvertedElevationFromXYZ,u as getEffectiveElevationInfo,r as getEffectiveElevationMode,h as getElevationOffset,R as getElevationOffsetInMeters,s as getGeometryEffectiveElevationInfo,i as getGeometryEffectiveElevationMode,a as getGraphicEffectiveElevationInfo,l as getGraphicEffectiveElevationMode,p as getZForElevationMode,c as hasFeatureExpressionInfo,f as hasGraphicFeatureExpressionInfo,$ as logInvalidElevationInfoWarning,z as onTheGroundElevationInfo,b as zValueInAbsoluteHeightMode};
|
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const b="20250827",d="d1abbf0198b778c1fefd45d92c8b66639a5eed14";export{b as buildDate,d as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{unitRGBAFromColor as t}from"../../../../../core/colorUtils.js";import{handlesGroup as i,makeHandle as r}from"../../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../../core/maybe.js";import{watch as o,syncAndInitial as n,initial as a,when as l}from"../../../../../core/reactiveUtils.js";import{property as c}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as m}from"../../../../../core/accessorSupport/decorators/subclass.js";import{i as p}from"../../../../../chunks/vec32.js";import{create as h}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEffectiveElevationInfo as u,getEffectiveElevationMode as d}from"../../../../../support/elevationInfoUtils.js";import v from"../../../../../symbols/support/ElevationInfo.js";import{SegmentLabels3D as f}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as g}from"../../SnappingVisualizer3D.js";import{meshTransformFastUpdateHandles as y}from"../meshFastUpdateUtils.js";import{Settings as
|
|
5
|
+
import{__decorate as e}from"tslib";import{unitRGBAFromColor as t}from"../../../../../core/colorUtils.js";import{handlesGroup as i,makeHandle as r}from"../../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../../core/maybe.js";import{watch as o,syncAndInitial as n,initial as a,when as l}from"../../../../../core/reactiveUtils.js";import{property as c}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as m}from"../../../../../core/accessorSupport/decorators/subclass.js";import{i as p}from"../../../../../chunks/vec32.js";import{create as h}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEffectiveElevationInfo as u,getEffectiveElevationMode as d}from"../../../../../support/elevationInfoUtils.js";import v from"../../../../../symbols/support/ElevationInfo.js";import{SegmentLabels3D as f}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as g}from"../../SnappingVisualizer3D.js";import{meshTransformFastUpdateHandles as y}from"../meshFastUpdateUtils.js";import{Settings as E}from"../settings.js";import{ExtendedLineVisualElement as V}from"../../visualElements/ExtendedLineVisualElement.js";import{OutlineVisualElement as w}from"../../visualElements/OutlineVisualElement.js";import{VerticesVisualElement as _}from"../../visualElements/VerticesVisualElement.js";import{evaluateElevationAlignmentAtPoint as j}from"../../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as I}from"../../../layers/graphics/ElevationContext.js";import{GraphicState as L}from"../../../layers/graphics/GraphicState.js";import{DrawGraphicTool as S,geometryTypeToDrawOperationGeometryType as x}from"../../../../draw/DrawGraphicTool.js";import{DrawOperation as D}from"../../../../draw/DrawOperation.js";import{ElevationDrawSurface as G,SceneDrawSurface as C}from"../../../../draw/drawSurfaces.js";import{updateMeshTransformFromTooltipInfo as O}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{autorun as T}from"../../../../../core/accessorSupport/trackingUtils.js";let b=class extends S{constructor(e){super(e),this._activeVertexVisualElement=null,this._createGraphicState=null,this._outlineVisualElement=null,this._verticesVisualElement=null,this._verticalLineVisualElement=null,this._settings=new E({getTheme:()=>this.view.effectiveTheme}),this.geometryType=null,this.type="draw-3d"}initialize(){const{mode:e,offset:t,unit:i,featureExpressionInfo:r}=this.elevationInfo;this.internalGraphicsLayer.elevationInfo=new v({mode:e,offset:t,unit:i,featureExpressionInfo:r})}normalizeCtorArgs(e){if(!e.elevationInfo){const t=e.hasZ??!0;return{...e,elevationInfo:u(t)}}return e}initializeGraphic(e){const{view:t}=this,r=this._createGraphicState=new L({graphic:e});return i([t.maskOccludee(e),t.trackGraphicState(r),o(()=>({element:this._outlineVisualElement,isDraped:r.isDraped}),({element:e,isDraped:t})=>{e&&(e.isDraped=t)},n),T(()=>{O(this.tooltipInfos.mesh,this.geometryToPlace)}),this._setupLoadingIndicator(r),...y(r)])}makeDrawOperation(){const{geometryType:e}=this,t="circle"!==e&&"rectangle"!==e;return new D({view:this.view,manipulators:this.manipulators,geometryType:x(e),drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,drawSurface:new C(this.view,this.elevationInfo,[this.internalGraphicsLayer]),elevationDrawSurface:new G(this.elevationInfo,this.defaultZ,this.view,this.internalGraphicsLayer),hasM:!1,elevationInfo:this.elevationInfo,snappingManager:this.snappingManager,snappingVisualizer:new g,segmentLabels:t?new f:null,labelOptions:this.sketchOptions.labels,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,this.elevationInfo),cursor:this.cursor,constraintsEnabled:!0,automaticLengthMeasurementUtils:this.automaticLengthMeasurementUtils})}onActiveVertexChanged(e){const{view:n}=this;if(this._activeVertexVisualElement)return this._activeVertexVisualElement.vertices=[e],this._activeVertexVisualElement.recreate(),this._updateVerticalLineVisualElement(e),r();const l=this._settings,c=l.manipulators.vertex,m=new _({view:n,spatialReference:n.spatialReference,vertices:[e],elevationInfo:this.internalGraphicsLayer.elevationInfo,size:c.size,outlineSize:c.outlineSize,renderOccluded:c.renderOccluded,attached:!1,isDecoration:!0});this._activeVertexVisualElement=m;const p=l.visualElements.zVerticalLine,h=new V({view:n,extensionType:p.extensionType,innerWidth:1,attached:!1,writeDepthEnabled:!1,renderOccluded:4,isDecoration:!0});this._verticalLineVisualElement=h;const u=i([o(()=>l.visualElements.zVerticalLine,e=>e.apply(h),a),o(()=>({selectedColor:t(l.colors.selected),outlineColor:t(l.manipulators.vertex.outlineColor)}),({selectedColor:e,outlineColor:t})=>{m.color=e,m.outlineColor=t},a),r(()=>{this._activeVertexVisualElement=s(this._activeVertexVisualElement),this._verticalLineVisualElement=s(this._verticalLineVisualElement)})]);return m.attached=!0,this._updateVerticalLineVisualElement(e),u}_updateVerticalLineVisualElement(e){const t=this._verticalLineVisualElement;if(!t)return;const{renderCoordsHelper:i,elevationProvider:r}=this.view;p(U,e[0],e[1],e[2]),z.setFromElevationInfo(this.elevationInfo),U[2]=j(U,r,z,i);i.toRenderCoords(U,this.view.spatialReference,U)?(t.setStartEndFromWorldDownAtLocation(U),t.attached=!0):t.attached=!1}onOutlineChanged(e){if(this._outlineVisualElement)return this._outlineVisualElement.geometry=e,r();const t=this.internalGraphicsLayer.elevationInfo,{view:n}=this,l=this._settings,c=new w({view:n,geometry:e,elevationInfo:t,isDraped:this._createGraphicState?this._createGraphicState.isDraped:"on-the-ground"===d(this.hasZ,t),attached:!1,isDecoration:!0});this._outlineVisualElement=c;const m=i([o(()=>l.visualElements.lineObjects.outline,e=>e.apply(c),a),o(()=>l.visualElements.lineObjects.shadowStyle,e=>e.apply(c),a),r(()=>{this._outlineVisualElement=s(this._outlineVisualElement)})]);return c.attached=!0,c.laserlineEnabled=!0,m}onRegularVerticesChanged(e){if(this._verticesVisualElement)return this._verticesVisualElement.vertices=e,r();const{view:n}=this,l=this._settings,c=l.manipulators.vertex,m=new _({view:n,spatialReference:n.spatialReference,vertices:e,elevationInfo:this.internalGraphicsLayer.elevationInfo,size:c.size,outlineSize:c.outlineSize,renderOccluded:c.renderOccluded,attached:!1,isDecoration:!0}),p=i([o(()=>({color:t(l.manipulators.vertex.color),outlineColor:t(l.manipulators.vertex.outlineColor)}),({color:e,outlineColor:t})=>{m.color=e,m.outlineColor=t},a),r(()=>{this._verticesVisualElement=s(this._verticesVisualElement)})]);return m.attached=!0,this._verticesVisualElement=m,p}updateGraphicGeometry(e){if("mesh"===this.geometryType&&"point"===e?.type){const t=this.geometryToPlace;t?.centerAt(e),O(this.tooltipInfos.mesh,t);const i=this._graphic;return void(t&&i.geometry===t||(i.geometry=t))}super.updateGraphicGeometry(e)}_setupLoadingIndicator(e){const{drawOperation:t}=this;if(!this.geometryToPlace||e.displaying)return t.loading=!1,null;t.loading=!0;const s=r(()=>{t.loading=!1});let o;const a=()=>{o&&cancelAnimationFrame(o)};return i([l(()=>e.displaying,()=>{a(),o=requestAnimationFrame(()=>s.remove())},{...n,once:!0}),r(a),s])}};e([c({constructOnly:!0})],b.prototype,"elevationInfo",void 0),e([c({constructOnly:!0})],b.prototype,"geometryType",void 0),e([c()],b.prototype,"type",void 0),e([c({constructOnly:!0})],b.prototype,"view",void 0),b=e([m("esri.views.3d.interactive.editingTools.draw.DrawGraphicTool3D")],b);const z=new I,U=h();export{b as DrawGraphicTool3D};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../core/has.js";function e(e){switch(e){case 0:break;case 1:return"not owned by a graphics layer";case 2:return"no geometry";case 3:return"the geometry type is not supported";case 4:return"the
|
|
5
|
+
import"../../../../core/has.js";function e(e){switch(e){case 0:break;case 1:return"not owned by a graphics layer";case 2:return"no geometry";case 3:return"the geometry type is not supported";case 4:return"the symbol type is not supported"}return""}export{e as isSupportedObjectResultMessage};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../../core/has.js";
|
|
5
|
+
import"../../../../../core/has.js";function e(e){if(e.graphic&&"graphics"!==e.graphic.layer?.type)return 1;const r=e.operations?.data.type;if(!r)return 3;switch(r){case"polygon":case"point":case"polyline":case"mesh":break;default:return 3}return 0}export{e as isSupportedObject};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
function r(r){return t(r).result}function t(r){if(r.graphic&&"graphics"!==r.graphic.layer?.type)return{result:1};if(!r.operations)return{result:2};const t=r.operations.data.type,e=r.operations.data.geometry;return"point"===t||"mesh"===t||"polyline"===t||"polygon"===t?{result:0,geometry:e}:{result:3}}export{r as isSupportedObject};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../../core/has.js";
|
|
5
|
+
import"../../../../../core/has.js";function e(e){if("graphics"!==e.layer?.type)return 1;if(null==e.geometry)return 2;switch(e.geometry.type){case"point":break;case"polygon":case"polyline":case"multipoint":case"extent":case"mesh":return 0;default:return 3}const t=null!=e.symbol&&"point-3d"===e.symbol.type&&e.symbol.symbolLayers;return t&&t.some(e=>"object"===e.type)?0:4}export{e as isSupportedGraphic};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import s from"../../../core/Logger.js";import{removeMaybe as t,destroyMaybe as
|
|
5
|
+
import{__decorate as e}from"tslib";import s from"../../../core/Logger.js";import{removeMaybe as t,destroyMaybe as i}from"../../../core/maybe.js";import{watch as r,syncAndInitial as a}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{GaussianSplatAtlasPageAllocator as l,splatPageSizeInU32 as d,elementsPerSplatPage as h,packedGaussianSizeInU32 as u,splatPageSizeInU32WithoutHeader as c,gaussiansPerSplatPage as m,splatAtlasTextureSize as p}from"../../../layers/support/GaussianSplatAtlasPageAllocator.js";import{GaussianTile as f}from"../../../layers/support/gaussianSplatUtils.js";import{getElevationOffsetInMeters as y}from"../../../support/elevationInfoUtils.js";import{LayerView3D as _}from"./LayerView3D.js";import{addLayerViewToWasm as w,getLyr3DWasm as g,removeLayerViewFromWasm as b}from"./Lyr3DWasm.js";import{GaussianSplatRenderNode as M}from"../webgl-engine/lib/GaussianSplatRenderNode.js";import v from"../../layers/LayerView.js";import{spatialReferenceIncompatibleError as j}from"../../support/layerViewUtils.js";const A=()=>s.getLogger("esri.views.3d.layers.GaussianSPlatLayerView3D");let H=class extends(_(v)){constructor(e){super(e),this.type="gaussian-splat-3d",this._gaussianTileHandles=new Map,this._pageAllocator=new l,this._pageBuffer=new Uint32Array(d),this._wasmLayerId=-1,this.ignoresMemoryFactor=!1,this._usedMemory=0,this._cacheMemory=0,this._suspendedHandle=null,this._conversionBuffer=new ArrayBuffer(4),this._u32View=new Uint32Array(this._conversionBuffer),this._f32View=new Float32Array(this._conversionBuffer),this._memCache=e.view.resourceController.memoryController.newCache(`GaussianSplat-${this.uid}`,e=>this._deleteTile(e))}initialize(){if(!this._canProjectWithoutEngine())throw j("layer",this.layer.spatialReference.wkid,this.view.renderSpatialReference?.wkid);const e=w(this).then(e=>{this._wasmLayerId=e,this.addHandles([r(()=>this.layer.elevationInfo,e=>this._elevationInfoChanged(e))]),this._suspendedHandle=r(()=>this.suspended,e=>this._wasm?.setEnabled(this,!e),a)});this.addResolvingPromise(e),this._renderNode=new M({view:this.view})}get wasmLayerId(){return this._wasmLayerId}isUpdating(){const e=this._wasm;return!(this._wasmLayerId<0||null==e)&&e.isUpdating(this._wasmLayerId)}updatingFlagChanged(){this.notifyChange("updating")}get _wasm(){return g(this.view)}get usedMemory(){return this._usedMemory}get unloadedMemory(){return 0}get cachedMemory(){return this._cacheMemory}async createRenderable(e){const s=e.meshData;if(null==s.data)throw new Error("meshData.data undefined");if(s.desc=JSON.parse(s.desc),null==s.desc)throw new Error("meshData.desc undefined");const t=s.desc.prims[0],i=t.vertexCount,r=t.atrbs[0].view,a=t.atrbs[0].view.byteCount,n=t.atrbs[0].view.byteOffset;let o=null;if("U32"!==r.type)return A().warnOnce("unexpected meshData.data format"),{memUsageBytes:0};o=new Uint32Array(s.data.buffer,n,a/4);const l=this.extractHeader(o),d=Math.ceil(i/m),y=new Uint32Array(i),_=[];for(let f=0;f<d;f++){const e=this._pageAllocator.findFirstFreePage();if(null!==e){this._pageAllocator.allocate(e),_.push(e);const s=i-f*m,t=Math.min(s,m),r=f*m;for(let i=0;i<t;i++)y[i+r]=i+h*e;const a=f*c;this._pageBuffer.set(o.subarray(a,a+t*u)),this._pageBuffer.set(l.packedHeader,c);const n=e*h,d=n%p,w=Math.floor(n/p);this._renderNode?.updateTextureAtlas(d,w,this._pageBuffer)}}const w=new Float64Array(3*i),g=2.048,b=l.tileOrigin.x*g,M=l.tileOrigin.y*g,v=l.tileOrigin.z*g,j=l.invPosScale;let H=0;for(let h=0;h<i;h++){const e=h*u,{rawX:s,rawY:t,rawZ:i}=this._extractPackedGaussianPosition(o,e);w[H]=s*j+b,w[H+1]=t*j+M,w[H+2]=i*j+v,H+=3}const U=new f(e.handle,y,_,w);return this._memCache.put(`${U.handle}`,U),this._gaussianTileHandles.set(e.handle,U),this._cacheMemory+=U.usedMemory,{memUsageBytes:U.usedMemory}}_extractPackedGaussianPosition(e,s){const t=e[s+1];return{rawX:16383&t,rawY:t>>>14&16383,rawZ:t>>>28&15|(1023&e[s+2])<<4}}freeRenderable(e){const s=this._gaussianTileHandles.get(e);s&&(s.isVisible?this._usedMemory-=s.usedMemory:this._cacheMemory-=s.usedMemory,s.pageIds.forEach(e=>this._pageAllocator.free(e)),this.freeObject(s),this._gaussianTileHandles.delete(e)),this._updateGaussians()}freeObject(e){this._memCache.pop(`${e.handle}`)}setRenderableVisibility(e,s,t){for(let i=0;i<t;i++){if(!s[i])continue;const t=e[i],r=this._gaussianTileHandles.get(t);if(r){if(r.isVisible)continue;r.isVisible=!0,this._usedMemory+=r.usedMemory,this._cacheMemory-=r.usedMemory,this._memCache.pop(`${t}`)}}for(let i=0;i<t;i++){if(s[i])continue;const t=e[i],r=this._gaussianTileHandles.get(t);if(r){if(!r.isVisible)continue;r.isVisible=!1,this._usedMemory-=r.usedMemory,this._cacheMemory+=r.usedMemory,this._memCache.put(`${t}`,r)}}this._updateGaussians()}destroy(){b(this),this._suspendedHandle&&(this._suspendedHandle=t(this._suspendedHandle)),this._renderNode=i(this._renderNode),this._memCache.destroy()}_canProjectWithoutEngine(){return!0}_elevationInfoChanged(e){this._wasm?.setLayerOffset(this,y(e))}_updateGaussians(){const e=[];for(const s of this._gaussianTileHandles.values())s.isVisible&&e.push(s);this._renderNode?.updateGaussianVisibility(e)}extractHeader(e){const s=e.length-4,t=this.reinterpretU32AsFloat(e[s]),i=this.reinterpretU32AsFloat(e[s+1]),r=this.reinterpretU32AsFloat(e[s+2]),a=1/(1<<(255&e[s+3]));return{packedHeader:e.subarray(s,s+4),tileOrigin:{x:t,y:i,z:r},invPosScale:a}}_deleteTile(e){this._wasm?.onRenderableEvicted(this,e.handle,e.usedMemory),this.freeRenderable(e.handle)}reinterpretU32AsFloat(e){return this._u32View[0]=e,this._f32View[0]}};e([n()],H.prototype,"layer",void 0),H=e([o("esri.views.3d.layers.GaussianSplatLayerView3D")],H);const U=H;export{U as default};
|