@arcgis/core 4.34.0-next.64 → 4.34.0-next.65
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/{861a6d6fe7958df36aa1.js → 06ff5f34ad9bdf9705de.js} +49 -40
- package/assets/esri/core/workers/chunks/0d82cc6905b105b3568a.js +1 -0
- package/assets/esri/core/workers/chunks/4fda6e90822bc0198b28.js +2 -0
- package/assets/esri/core/workers/chunks/88b8f33ce1cbf8a0f855.js +33 -0
- package/assets/esri/themes/base/widgets/_Attribution.scss +0 -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 +1 -1
- package/chunks/DefaultMaterial.glsl.js +2 -2
- package/chunks/Fog.glsl.js +2 -2
- package/chunks/{BloomBlur.glsl.js → GlowBlur.glsl.js} +5 -5
- package/chunks/GlowComposition.glsl.js +41 -0
- package/chunks/Path.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +18 -15
- package/config.js +1 -1
- package/interfaces.d.ts +26 -0
- package/kernel.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/support/visualVariableSimpleUtils.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/FogTechniqueConfiguration.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentBVH.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/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +5 -5
- package/views/3d/webgl-engine/effects/{bloom/BloomBlur.glsl.js → glow/GlowBlur.glsl.js} +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +5 -0
- package/views/3d/webgl-engine/effects/{bloom/BloomBlurTechniqueConfiguration.js → glow/GlowBlurTechniqueConfiguration.js} +1 -1
- package/views/3d/webgl-engine/effects/{bloom/BloomComposition.glsl.js → glow/GlowComposition.glsl.js} +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +5 -0
- package/views/3d/webgl-engine/effects/{bloom/BloomCompositionTechniqueConfiguration.js → glow/GlowCompositionTechniqueConfiguration.js} +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +5 -0
- package/views/3d/webgl-engine/effects/weather/SnowCover.glsl.js +8 -2
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
- package/assets/esri/core/workers/chunks/5de07f7a09eb9f3ab666.js +0 -1
- package/assets/esri/core/workers/chunks/659f7e99b2d524ef53fb.js +0 -2
- package/assets/esri/core/workers/chunks/eacc7fccdc3fb670ac8f.js +0 -33
- package/chunks/BloomComposition.glsl.js +0 -41
- package/views/3d/webgl-engine/effects/bloom/BloomBlurTechnique.js +0 -5
- package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechnique.js +0 -5
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +0 -5
- /package/assets/esri/core/workers/chunks/{659f7e99b2d524ef53fb.js.LICENSE.txt → 4fda6e90822bc0198b28.js.LICENSE.txt} +0 -0
- /package/views/3d/webgl-engine/effects/{bloom/BloomPresets.glsl.js → glow/GlowPresets.glsl.js} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
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 e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";import{ComponentData as a}from"../views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js";import{ForwardLinearDepthToWriteShadowMap as i}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 l}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as g}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 m}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as v}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{computeFragmentNormals as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as p,addLightingGlobalFactor as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as f,addMainLightDirection as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRenderingParameters as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadBaseColorTexture as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{OverlayIM as S}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{DiscardOrAdjustAlphaDraw as $}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{If as N,glsl as O}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as T}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{SnowCover as M}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{outputColorHighlightOID as A}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as D}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as W}from"../webscene/support/AlphaCutoff.js";function P(P){const B=new D,{vertex:R,fragment:F}=B;B.include(g,P),B.include(s,P),B.include(d,P),B.include(n,P),B.include(a,P),B.include($,P),F.include(l,P),B.include(x,P),B.include(j,P);const{output:z,pbrMode:E,hasNormalTexture:_,snowCover:H,receiveShadows:I,shadeNormals:V,spherical:G,ellipsoidMode:k,overlayEnabled:U,componentData:q,vertexDiscardMode:J,
|
|
5
|
+
import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";import{ComponentData as a}from"../views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js";import{ForwardLinearDepthToWriteShadowMap as i}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 l}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as g}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 m}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as v}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{computeFragmentNormals as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as p,addLightingGlobalFactor as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as f,addMainLightDirection as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRenderingParameters as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadBaseColorTexture as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{OverlayIM as S}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{DiscardOrAdjustAlphaDraw as $}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{If as N,glsl as O}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as T}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{SnowCover as M}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{outputColorHighlightOID as A}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as D}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as W}from"../webscene/support/AlphaCutoff.js";function P(P){const B=new D,{vertex:R,fragment:F}=B;B.include(g,P),B.include(s,P),B.include(d,P),B.include(n,P),B.include(a,P),B.include($,P),F.include(l,P),B.include(x,P),B.include(j,P);const{output:z,pbrMode:E,hasNormalTexture:_,snowCover:H,receiveShadows:I,shadeNormals:V,spherical:G,ellipsoidMode:k,overlayEnabled:U,componentData:q,vertexDiscardMode:J,hasGlow:K,renderOccluded:Q}=P,X=1===E||2===E;X&&(B.include(y,P),_&&B.include(w,P));const Y=4===z||5===z||6===z,Z=Y&&1===q;if(U){B.include(p,P),B.include(S,P);const a=1===k,i=1===k?e.radius:a?o.radius:r.radius;R.code.add(`\n ${N(G,`const float invRadius = ${O.float(1/i)};`)}\n vec2 projectOverlay(vec3 pos) { return pos.xy ${N(G,"/ (1.0 + invRadius * pos.z);")}; }`)}const ee=U&&t(z)&&4===E;ee&&(B.varyings.add("tbnTangent","vec3"),B.varyings.add("tbnBiTangent","vec3"),B.varyings.add("groundNormal","vec3"));const oe=0===J,re=2===J,ae=1-1/255;if(B.include(L,P),B.include(i,P),R.main.add(O`
|
|
6
6
|
bool castShadows;
|
|
7
7
|
vec4 externalColor = forwardExternalColor(castShadows);
|
|
8
8
|
${N(Z,"if(!castShadows) { gl_Position = vec4(vec3(1e38), 1.0); return; }")}
|
|
@@ -2,7 +2,7 @@
|
|
|
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{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as r}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstanceColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstanceColor.glsl.js";import{InstancedDoublePrecision as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{MaskedColorDefinition as l,CreateMaskedFromNaNColor as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/MaskedColor.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as c}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{VerticalOffset as v}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as u}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{ComputeNormalTexture as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateAmbientOcclusion as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as p,addAmbientBoostFactor as h,addLightingGlobalFactor as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{PhysicallyBasedRendering as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as j,ReadShadowMapDraw as P}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{colorTextureUV as N,normalTextureUV as T,emissiveTextureUV as O,occlusionTextureUV as S,metallicRoughnessTextureUV as V}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as A}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as E,addCameraPosition as U}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as
|
|
5
|
+
import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as r}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstanceColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstanceColor.glsl.js";import{InstancedDoublePrecision as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{MaskedColorDefinition as l,CreateMaskedFromNaNColor as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/MaskedColor.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as c}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{VerticalOffset as v}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as u}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{ComputeNormalTexture as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateAmbientOcclusion as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as p,addAmbientBoostFactor as h,addLightingGlobalFactor as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{PhysicallyBasedRendering as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as j,ReadShadowMapDraw as P}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{colorTextureUV as N,normalTextureUV as T,emissiveTextureUV as O,occlusionTextureUV as S,metallicRoughnessTextureUV as V}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as A}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as E,addCameraPosition as U}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as I}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as B}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as k}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{If as _,glsl as F}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as R}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{SnowCover as z}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{colorMixModes as W}from"../views/3d/webgl-engine/materials/internal/MaterialUtil.js";import{outputColorHighlightOID as G}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as H}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as q}from"../webscene/support/AlphaCutoff.js";function J(J){const K=new H,{attributes:Q,vertex:X,fragment:Y,varyings:Z}=K,{output:ee,normalType:re,offsetBackfaces:oe,spherical:ie,snowCover:ae,pbrMode:se,textureAlphaPremultiplied:le,instancedDoublePrecision:ne,hasVertexColors:te,hasVertexTangents:de,hasColorTexture:me,hasNormalTexture:ce,hasNormalTextureTransform:ge,hasColorTextureTransform:ve,hasGlow:ue}=J;if(E(X,J),Q.add("position","vec3"),Z.add("vpos","vec3",{invariant:!0}),K.include($,J),K.include(s,J),K.include(v,J),K.include(N,J),!r(ee))return K.include(u,J),K;K.include(T,J),K.include(O,J),K.include(S,J),K.include(V,J),U(X,J),K.include(t,J),K.include(i);const we=0===re||1===re;return we&&oe&&K.include(e),K.include(w,J),K.include(g,J),K.include(a,J),Z.add("vPositionLocal","vec3"),K.include(m,J),K.include(d,J),K.include(c,J),X.uniforms.add(new B("externalColor",e=>e.externalColor,{supportsNaN:!0})),Z.add("vcolorExt","vec4"),K.include(M,J),X.include(l),X.include(n),K.include(ne?j:P,J),X.main.add(F`
|
|
6
6
|
forwardNormalizedVertexColor();
|
|
7
7
|
|
|
8
8
|
MaskedColor maskedColor =
|
|
@@ -32,7 +32,7 @@ import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.
|
|
|
32
32
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
33
33
|
}
|
|
34
34
|
forwardLinearDepthToReadShadowMap();
|
|
35
|
-
`),K.include(p,J),Y.include(b,J),K.include(A,J),Y.include(o,J),K.include(G,J),U(Y,J),Y.uniforms.add(X.uniforms.get("localOrigin"),new
|
|
35
|
+
`),K.include(p,J),Y.include(b,J),K.include(A,J),Y.include(o,J),K.include(G,J),U(Y,J),Y.uniforms.add(X.uniforms.get("localOrigin"),new I("ambient",e=>e.ambient),new I("diffuse",e=>e.diffuse),new k("opacity",e=>e.opacity),new k("layerOpacity",e=>e.layerOpacity)),me&&Y.uniforms.add(new R("tex",e=>e.texture)),K.include(L,J),Y.include(C,J),Y.include(D),K.include(x,J),Y.include(z,J),h(Y),f(Y),y(Y),Y.main.add(F`
|
|
36
36
|
discardBySlice(vpos);
|
|
37
37
|
discardByTerrainDepth();
|
|
38
38
|
${me?F`
|
package/chunks/Fog.glsl.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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{create as e}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{ReadDepth as o}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{Float3BindUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as a,If as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as
|
|
5
|
+
import{create as e}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{ReadDepth as o}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{Float3BindUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as a,If as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ScreenSpacePassAtmosphere as d}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{SphereIntersect as g}from"../views/3d/webgl-engine/shaders/SphereIntersect.glsl.js";import{ToneMapping as c}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{NoParameters as p}from"../views/webgl/NoParameters.js";import{ShaderBuilder as f}from"../views/webgl/ShaderBuilder.js";class u extends p{constructor(){super(...arguments),this.color=e(),this.strength=4e-6,this.atmosphereC=1,this.amount=0}}function h(e){const p=new f;p.include(d,{needUVs:!0,needEyeDirection:!0});const u=p.fragment,{hasEmissive:h}=e;return u.uniforms.add(new t("atmosphereC",e=>e.atmosphereC),new i("cameraPosition",e=>e.camera.eye),new m("depthTexture",e=>e.mainDepth),new t("fogStrength",e=>e.strength),new t("fogAmount",e=>e.amount),new s("fogColor",e=>e.color)),h&&u.uniforms.add(new l("emissionTexture",e=>e.emission)),u.include(r),u.include(g),u.include(c),u.include(o),u.code.add(a`float getFogAmount(float dist, vec3 rayDir) {
|
|
6
6
|
if(dist == -1.0){
|
|
7
7
|
dist = 0.055 * sphereIntersect(cameraPosition, rayDir, atmosphereC).y;
|
|
8
8
|
}
|
|
@@ -25,4 +25,4 @@ return fogAmount * (1.0 - exp(-dist * fogStrength));
|
|
|
25
25
|
vec3 emissionContribution = emission.a > 0.0 ? mix(vec3(0.0), emission.rgb * emission.a, 1.0 - fogAmount): vec3(0.0);
|
|
26
26
|
vec3 modifiedFogColor = fogColor + emissionContribution;
|
|
27
27
|
vec4 fog = vec4(modifiedFogColor, 1.0) * fogAmount;`,a`vec4 fog = vec4(fogColor, 1.0) * fogAmount;`)}
|
|
28
|
-
fragColor = delinearizeGamma(vec4(tonemapACES(fog.rgb), fog.a));`),
|
|
28
|
+
fragColor = delinearizeGamma(vec4(tonemapACES(fog.rgb), fog.a));`),p}const w=Object.freeze(Object.defineProperty({__proto__:null,FogPassParameters:u,build:h},Symbol.toStringTag,{value:"Module"}));export{u as F,w as a,h as b};
|
|
@@ -2,9 +2,9 @@
|
|
|
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{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as
|
|
6
|
-
float locations1D[${t.int(
|
|
7
|
-
float locations1DWeights[${t.int(
|
|
5
|
+
import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as r}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as t}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{blurRadiusPresets as l}from"../views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js";import{NoParameters as a}from"../views/webgl/NoParameters.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";class c extends a{constructor(){super(...arguments),this.blurRadius=l.sunny}}function u(l){const a=new n,c=a.fragment;a.include(r),c.include(o),c.uniforms.add(new i("colorTexture",e=>e.color),new s("blurRadius",e=>e.blurRadius));let u="";const d=15;for(let e=0;e<d;e++){u+=`locations1D[${e}] = ${(e/(d-1)*2-1).toFixed(3).toString()};`}const m=2;let f="";for(let r=0;r<d;r++){f+=`locations1DWeights[${r}] = ${e(r-Math.floor(d/2),m).toFixed(7).toString()};`}const v=0===l.glowStage;return c.code.add(t`
|
|
6
|
+
float locations1D[${t.int(d)}];
|
|
7
|
+
float locations1DWeights[${t.int(d)}];
|
|
8
8
|
|
|
9
9
|
vec4 blurUniformSamples(sampler2D toBlur) {
|
|
10
10
|
vec4 res = vec4(0.0);
|
|
@@ -16,7 +16,7 @@ import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as o}from"..
|
|
|
16
16
|
${f}
|
|
17
17
|
vec2 pixelCenterShift = 0.5 / size;
|
|
18
18
|
|
|
19
|
-
for(int i=0;i < ${t.int(
|
|
19
|
+
for(int i=0;i < ${t.int(d)}; i++) {
|
|
20
20
|
float uv1D = locations1D[i] + ${v?"pixelCenterShift.x":"pixelCenterShift.y"};
|
|
21
21
|
vec2 uvOffset = ${v?"vec2(uv1D, 0.0)":"vec2(0.0, uv1D)"};
|
|
22
22
|
|
|
@@ -27,4 +27,4 @@ import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as o}from"..
|
|
|
27
27
|
res.a = clamp(res.a, 0.0, 1.0);
|
|
28
28
|
return res;
|
|
29
29
|
}
|
|
30
|
-
`).main.add(t`fragColor = blurUniformSamples(colorTexture);`),a}const
|
|
30
|
+
`).main.add(t`fragColor = blurUniformSamples(colorTexture);`),a}const d=Object.freeze(Object.defineProperty({__proto__:null,GlowBlurPassParameters:c,build:u},Symbol.toStringTag,{value:"Module"}));export{c as G,d as a,u as b};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatsPassUniform as r}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{If as s,glsl as l}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{lodFactorsPresets as n}from"../views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js";import{ToneMapping as d}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{NoParameters as a}from"../views/webgl/NoParameters.js";import{ShaderBuilder as c}from"../views/webgl/ShaderBuilder.js";class m extends a{constructor(e=n.sunny.far,o=n.sunny.near){super(),this.lodFactors=e,this.lodFactorsFront=o}}const u=new m;class g extends m{constructor(){super(...arguments),this.glowLod=-1}}function w(n){const a=new c,m=a.fragment;return a.include(e),m.include(o),a.outputs.add("fragColor","vec4",0),a.outputs.add("fragEmission","vec4",1),m.include(d),m.uniforms.add(new t("colorTexture",e=>e.color),new t("emissionTexture",e=>e.emission)),n.blurEnabled?(m.uniforms.add(new t("lodTexture0",e=>e.lodTexture0),new t("lodTexture1",e=>e.lodTexture1),new t("lodTexture2",e=>e.lodTexture2),new t("lodTexture3",e=>e.lodTexture3),new t("lodTexture4",e=>e.lodTexture4),new i("glowLod",e=>e.glowLod),new r("lodFactors",e=>e.lodFactors,6),new r("lodFactorsFront",e=>e.lodFactorsFront,6)).main.add(l`
|
|
6
|
+
vec4 color = texture(colorTexture, uv);
|
|
7
|
+
color = vec4(linearizeGamma(color.rgb), color.a);
|
|
8
|
+
|
|
9
|
+
vec4 lod0 = texture(emissionTexture, uv);
|
|
10
|
+
vec4 lod1 = texture(lodTexture0, uv);
|
|
11
|
+
vec4 lod2 = texture(lodTexture1, uv);
|
|
12
|
+
vec4 lod3 = texture(lodTexture2, uv);
|
|
13
|
+
vec4 lod4 = texture(lodTexture3, uv);
|
|
14
|
+
vec4 lod5 = texture(lodTexture4, uv);
|
|
15
|
+
|
|
16
|
+
vec4 emission = lodFactors[0] * lod0;
|
|
17
|
+
emission += lodFactors[1] * lod1;
|
|
18
|
+
emission += lodFactors[2] * lod2;
|
|
19
|
+
emission += lodFactors[3] * lod3;
|
|
20
|
+
emission += lodFactors[4] * lod4;
|
|
21
|
+
emission += lodFactors[5] * lod5;
|
|
22
|
+
|
|
23
|
+
// only for glow editor lod debugging
|
|
24
|
+
emission = glowLod == 0 ? lodFactors[0] * lod0 : glowLod == 1 ? lodFactors[1] * lod1 : glowLod == 2 ? lodFactors[2] * lod2 : glowLod == 3 ? lodFactors[3] * lod3 : glowLod == 4 ? lodFactors[4] * lod4 : glowLod == 5 ? lodFactors[5] * lod5 : emission;
|
|
25
|
+
|
|
26
|
+
fragEmission = emission;
|
|
27
|
+
// tonemapping is only applied to the emissive part since main color values are not in HDR.
|
|
28
|
+
${s(n.tonemappingEnabled,"emission = vec4(tonemapACES(emission.rgb), emission.a);")}
|
|
29
|
+
|
|
30
|
+
fragColor = emission + color;
|
|
31
|
+
fragColor = delinearizeGamma(fragColor);
|
|
32
|
+
`),a):(m.main.add(l`
|
|
33
|
+
vec4 color = texture(colorTexture, uv);
|
|
34
|
+
color = vec4(linearizeGamma(color.rgb), color.a);
|
|
35
|
+
|
|
36
|
+
// emission is already in linear color space here.
|
|
37
|
+
vec4 emission = texture(emissionTexture, uv);
|
|
38
|
+
|
|
39
|
+
${s(n.tonemappingEnabled,"emission = vec4(tonemapACES(emission.rgb), emission.a);")}
|
|
40
|
+
fragColor = delinearizeGamma(emission + color);
|
|
41
|
+
`),a)}const v=Object.freeze(Object.defineProperty({__proto__:null,GlowCompositionPassParameters:g,build:w,defaultCompositionParameters:u},Symbol.toStringTag,{value:"Module"}));export{g as G,v as a,w as b,u as d};
|
package/chunks/Path.glsl.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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{addNearFar as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{isColorOrColorEmission as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{PathVertexPosition as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{OutputDepth as s}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as l}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as t,addAmbientBoostFactor as c,addLightingGlobalFactor as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{NormalUtils as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRenderingParameters as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as b}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as f,addViewNormal as y,addCameraPosition as j}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as L}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as P}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as S,If as O}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{SnowCover as C}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{outputColorHighlightOID as A}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as D}from"../views/webgl/ShaderBuilder.js";function B(B){const I=new D,{vertex:F,fragment:M,varyings:_}=I;f(F,B),_.add("vpos","vec3",{invariant:!0}),I.include(n,B);const{output:V,spherical:x,pbrMode:z,
|
|
5
|
+
import{addNearFar as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{isColorOrColorEmission as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{PathVertexPosition as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{OutputDepth as s}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as l}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as t,addAmbientBoostFactor as c,addLightingGlobalFactor as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{NormalUtils as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRenderingParameters as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as b}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as f,addViewNormal as y,addCameraPosition as j}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as L}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as P}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as S,If as O}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{SnowCover as C}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{outputColorHighlightOID as A}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as D}from"../views/webgl/ShaderBuilder.js";function B(B){const I=new D,{vertex:F,fragment:M,varyings:_}=I;f(F,B),_.add("vpos","vec3",{invariant:!0}),I.include(n,B);const{output:V,spherical:x,pbrMode:z,hasGlow:T,snowCover:$}=B;switch((i(V)||10===V)&&(I.include(a),I.include(h,B),I.include(r,B),I.include(u,B),_.add("vnormal","vec3"),_.add("vcolor","vec4"),F.main.add(S`vpos = calculateVPos();
|
|
6
6
|
vnormal = normalize(localNormal());
|
|
7
7
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
8
8
|
gl_Position = transformPosition(proj, view, vpos);
|
|
@@ -2,7 +2,7 @@
|
|
|
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{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as o}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as r}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstanceColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstanceColor.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{MaskedColorDefinition as t,CreateMaskedFromNaNColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/MaskedColor.glsl.js";import{NormalAttribute as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VerticalOffset as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as v}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{EvaluateAmbientOcclusion as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as
|
|
5
|
+
import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as o}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as r}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstanceColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstanceColor.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{MaskedColorDefinition as t,CreateMaskedFromNaNColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/MaskedColor.glsl.js";import{NormalAttribute as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VerticalOffset as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as v}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{EvaluateAmbientOcclusion as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as w,addAmbientBoostFactor as p,addLightingGlobalFactor as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as f,addMainLightIntensity as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRendering as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as C,ReadShadowMapDraw as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as O}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as N}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as P,addCameraPosition as S}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as E}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as D}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as F,If as V}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as $}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{SnowCover as T}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{colorMixModes as I}from"../views/3d/webgl-engine/materials/internal/MaterialUtil.js";import{outputColorHighlightOID as k}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as R}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as B}from"../webscene/support/AlphaCutoff.js";function _(_){const z=new R,{attributes:U,vertex:W,fragment:G,varyings:H}=z,{output:q,offsetBackfaces:J,pbrMode:K,snowCover:Q,spherical:X,hasGlow:Y}=_,Z=1===K||2===K;if(P(W,_),U.add("position","vec3"),H.add("vpos","vec3",{invariant:!0}),z.include(M,_),z.include(l,_),z.include(m,_),z.include(j,_),!o(q))return z.include(v,_),z;S(z.vertex,_),z.include(n,_),z.include(i),J&&z.include(e),H.add("vNormalWorld","vec3"),H.add("localvpos","vec3",{invariant:!0}),z.include(c,_),z.include(d,_),z.include(a,_),z.include(g,_),W.include(t),W.include(s),W.uniforms.add(new E("externalColor",e=>e.externalColor,{supportsNaN:!0})),H.add("vcolorExt","vec4"),z.include(_.instancedDoublePrecision?C:L,_),W.main.add(F`
|
|
6
6
|
forwardNormalizedVertexColor();
|
|
7
7
|
|
|
8
8
|
MaskedColor maskedColorExt =
|
|
@@ -11,8 +11,9 @@ import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.
|
|
|
11
11
|
vcolorExt = maskedColorExt.color;
|
|
12
12
|
forwardColorMixMode(maskedColorExt.mask);
|
|
13
13
|
|
|
14
|
-
bool alphaCut = opacityMixMode != ${
|
|
14
|
+
bool alphaCut = opacityMixMode != ${F.int(I.ignore)} && vcolorExt.a < ${F.float(B)};
|
|
15
15
|
vpos = getVertexInLocalOriginSpace();
|
|
16
|
+
|
|
16
17
|
localvpos = vpos - view[3].xyz;
|
|
17
18
|
vpos = subtractOrigin(vpos);
|
|
18
19
|
vNormalWorld = dpNormal(vvLocalNormal(normalModel()));
|
|
@@ -23,12 +24,12 @@ import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.
|
|
|
23
24
|
forwardTextureCoordinates();
|
|
24
25
|
forwardLinearDepthToReadShadowMap();
|
|
25
26
|
gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
|
|
26
|
-
${
|
|
27
|
-
`);const{hasColorTexture:ee,hasColorTextureTransform:oe}=_;return z.include(
|
|
27
|
+
${V(J,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
|
|
28
|
+
`);const{hasColorTexture:ee,hasColorTextureTransform:oe}=_;return z.include(w,_),G.include(b,_),z.include(O,_),G.include(r,_),z.include(k,_),S(G,_),f(G),p(G),u(G),G.uniforms.add(W.uniforms.get("localOrigin"),W.uniforms.get("view"),new A("ambient",e=>e.ambient),new A("diffuse",e=>e.diffuse),new D("opacity",e=>e.opacity),new D("layerOpacity",e=>e.layerOpacity)),ee&&G.uniforms.add(new $("tex",e=>e.texture)),z.include(x,_),G.include(y,_),G.include(N),G.include(T,_),h(G),G.main.add(F`
|
|
28
29
|
discardBySlice(vpos);
|
|
29
30
|
discardByTerrainDepth();
|
|
30
31
|
vec4 texColor = ${ee?`texture(tex, ${oe?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
|
31
|
-
${
|
|
32
|
+
${V(ee,`${V(_.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
|
|
32
33
|
vec3 viewDirection = normalize(vpos - cameraPosition);
|
|
33
34
|
applyPBRFactors();
|
|
34
35
|
float ssao = evaluateAmbientOcclusionInverse();
|
|
@@ -38,24 +39,26 @@ import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.
|
|
|
38
39
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
39
40
|
float shadow = readShadow(additionalAmbientScale, vpos);
|
|
40
41
|
vec3 matColor = max(ambient, diffuse);
|
|
41
|
-
${_.hasVertexColors?
|
|
42
|
-
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, opacityMixMode);`:
|
|
42
|
+
${_.hasVertexColors?F`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
43
|
+
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, opacityMixMode);`:F`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
43
44
|
float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, opacityMixMode);`}
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
vec3 shadingNormal = normalize(vNormalWorld);
|
|
47
|
+
vec3 groundNormal = ${X?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};
|
|
48
|
+
|
|
49
|
+
${V(Q,"vec3 faceNormal = screenDerivativeNormal(vpos);\n float snow = getRealisticTreeSnow(faceNormal, shadingNormal, groundNormal);\n albedo = mix(albedo, vec3(1), snow);")}
|
|
50
|
+
|
|
51
|
+
${F`albedo *= 1.2;
|
|
48
52
|
vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
|
|
49
53
|
float alignmentLightView = clamp(dot(viewForward, -mainLightDirection), 0.0, 1.0);
|
|
50
54
|
float transmittance = 1.0 - clamp(dot(viewForward, shadingNormal), 0.0, 1.0);
|
|
51
55
|
float treeRadialFalloff = vColor.r;
|
|
52
56
|
float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
|
|
53
57
|
additionalLight += backLightFactor * mainLightIntensity;`}
|
|
54
|
-
${F(Z,`vec3 normalGround = ${X?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};`)}
|
|
55
58
|
|
|
56
|
-
${Z?
|
|
57
|
-
${
|
|
59
|
+
${Z?F`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
60
|
+
${V(Q,"mrr = applySnowToMRR(mrr, snow);")}
|
|
58
61
|
vec4 emission = ${Q||Y?"vec4(0.0)":"getEmissions(albedo)"};
|
|
59
|
-
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection,
|
|
62
|
+
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, groundNormal, mrr, additionalAmbientIrradiance);`:F`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
60
63
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
61
|
-
outputColorHighlightOID(finalColor, vpos, albedo ${
|
|
64
|
+
outputColorHighlightOID(finalColor, vpos, albedo ${V(Q,", 1.0")});`),z}const z=Object.freeze(Object.defineProperty({__proto__:null,build:_},Symbol.toStringTag,{value:"Module"}));export{z as R,_ 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.65";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
package/interfaces.d.ts
CHANGED
|
@@ -96386,12 +96386,38 @@ declare namespace __esri {
|
|
|
96386
96386
|
}
|
|
96387
96387
|
|
|
96388
96388
|
export class VolumeMeasurementAnalysisView3D {
|
|
96389
|
+
/**
|
|
96390
|
+
* The volume measurement analysis object associated with the analysis view.
|
|
96391
|
+
*
|
|
96392
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-VolumeMeasurementAnalysisView3D.html#analysis Read more...}
|
|
96393
|
+
*/
|
|
96394
|
+
readonly analysis: VolumeMeasurementAnalysis;
|
|
96395
|
+
/**
|
|
96396
|
+
* Enables interactivity for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-VolumeMeasurementAnalysisView3D.html#analysis analysis}.
|
|
96397
|
+
*
|
|
96398
|
+
* @default false
|
|
96399
|
+
*
|
|
96400
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-VolumeMeasurementAnalysisView3D.html#interactive Read more...}
|
|
96401
|
+
*/
|
|
96402
|
+
interactive: boolean;
|
|
96389
96403
|
/**
|
|
96390
96404
|
* Result of the volume measurement.
|
|
96391
96405
|
*
|
|
96392
96406
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-VolumeMeasurementAnalysisView3D.html#result Read more...}
|
|
96393
96407
|
*/
|
|
96394
96408
|
readonly result: VolumeMeasurementResult | nullish;
|
|
96409
|
+
/**
|
|
96410
|
+
* The analysis view type.
|
|
96411
|
+
*
|
|
96412
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-VolumeMeasurementAnalysisView3D.html#type Read more...}
|
|
96413
|
+
*/
|
|
96414
|
+
readonly type: "volume-measurement-view-3d";
|
|
96415
|
+
/**
|
|
96416
|
+
* When `true`, the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-VolumeMeasurementAnalysisView3D.html#analysis analysis} is visualized in the view.
|
|
96417
|
+
*
|
|
96418
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-VolumeMeasurementAnalysisView3D.html#visible Read more...}
|
|
96419
|
+
*/
|
|
96420
|
+
visible: boolean;
|
|
96395
96421
|
constructor(properties?: any);
|
|
96396
96422
|
}
|
|
96397
96423
|
|
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.65",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{__decorate as e}from"tslib";import t from"../../PopupTemplate.js";import{clone as r}from"../../core/lang.js";import i from"../../core/Logger.js";import{MultiOriginJSONMixin as o}from"../../core/MultiOriginJSONSupport.js";import"../../core/workers/workers.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../../core/accessorSupport/decorators/writer.js";import p from"../../geometry/Extent.js";import l from"../../geometry/Point.js";import y from"../../geometry/Polygon.js";import u from"../../geometry/Polyline.js";import{initializeProjection as m,project as h}from"../../geometry/projectionUtils.js";import d from"../../geometry/SpatialReference.js";import{wgs84 as c}from"../../geometry/support/spatialReferenceUtils.js";import{featureGeometryTypeKebabDictionary as g}from"../../geometry/support/typeUtils.js";import f from"../../graphic/KnowledgeGraphGraphicOrigin.js";import j from"../../graphic/LinkChartGraphicOrigin.js";import b from"../Layer.js";import w from"../graphics/data/FeatureStore.js";import{QueryEngine as T}from"../graphics/data/QueryEngine.js";import{createCapabilities as I,createDrawingInfo as O}from"../graphics/sources/support/clientSideDefaults.js";import{systemOidFieldName as v,systemAggregationCountFieldName as S,systemIsSpatialFieldName as E,systemLayoutGeometryFieldName as x,systemOriginIdFieldName as N,systemDestinationIdFieldName as L}from"./constants.js";import{KnowledgeGraphSublayerBase as F}from"./KnowledgeGraphSublayerBase.js";import{getDisplayLabelProperty as _,getLinkChartDefaultLabelingInfo as R,getMapDefaultLabelingInfo as Q,getKGSublayerSymbolColor as C,getDefaultLCRelationshipSublayerSymbol as k}from"./layerUtils.js";import{BlendLayer as M,blendModeProperty as J,effectProperty as P}from"../mixins/BlendLayer.js";import{DisplayFilteredLayer as G,displayFilterEnabledProperty as D,displayFilterInfoProperty as q}from"../mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as U,featureEffectProperty as Z}from"../mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as A}from"../mixins/FeatureReductionLayer.js";import{OrderedLayer as B,orderByProperty as V}from"../mixins/OrderedLayer.js";import{RefreshableLayer as K}from"../mixins/RefreshableLayer.js";import{ScaleRangeLayer as H}from"../mixins/ScaleRangeLayer.js";import{TemporalLayer as W,useViewTimeProperty as Y}from"../mixins/TemporalLayer.js";import{legendEnabled as z,maxScale as X,minScale as $,opacity as ee,popupEnabled as te}from"../support/commonProperties.js";import{featureReductionProperty as re}from"../support/featureReductionUtils.js";import ie from"../support/Field.js";import{fixRendererFields as oe,fixTimeInfoFields as ne}from"../support/fieldUtils.js";import se from"../support/LabelClass.js";import{reader as ae}from"../support/labelingInfo.js";import pe from"../support/TimeInfo.js";import le from"../../renderers/SimpleRenderer.js";import{fromJSON as ye}from"../../renderers/support/jsonUtils.js";import{rendererTypes as ue}from"../../renderers/support/typeUtils.js";import me from"../../rest/support/FeatureSet.js";import he from"../../rest/support/Query.js";import{createPopupTemplate as de}from"../../support/popupUtils.js";import{applyColorToSymbol as ce}from"../../symbols/support/utils.js";import ge from"../../core/workers/RemoteClient.js";function fe(e){if(!e.json)return e;e.json.write=je(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=je(e.write))}return e}function je(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=be(e)),e):!0===e?we():e}function be(e){const{target:t,writer:r,overridePolicy:i,...o}=e;return function(e,t){const r=Te.call(this,e,t);return r.enabled?{...o,...r}:r}}function we(){return{overridePolicy:Te}}function Te(e,t){const r=!!this.geometryType;let i={enabled:r};return r&&(i={...i,...Ie.call(this,e,t)}),i}function Ie(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let Oe=class extends(F(G(A(U(M(B(W(H(K(o(b))))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=I(!1,!0),this.charts=null,this.definitionExpression=null,this.displayField="",this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=v,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{const e=new MessageChannel;return new ge(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=he.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach(t=>{const r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(ie.fromJSON({name:t.name,type:r,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))}),e.push(ie.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),ie.fromJSON({name:S,type:"esriFieldTypeInteger",alias:S,editable:!1}),ie.fromJSON({name:E,type:"esriFieldTypeInteger",alias:E,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return x;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new f(this.parent,this);case"link-chart":return new j(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?_(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?R(this.graphType,this.graphTypeName,e):Q(this.graphTypeName,this.geometryType,e)}set renderer(e){oe(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),r=C(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new le({type:"simple",symbol:k(r)});const e=ye(O(g.toJSON("point")).renderer);return ce(e.symbol,r),e}const i=ye(O(g.toJSON(this.geometryType)).renderer);return ce(i.symbol,r),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??d.WGS84}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return de(this,e)}createQuery(){return new he({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return null}async queryFeatures(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e),o=this.graphicOrigin,n=me.fromJSON(await i.executeQuery(r.toJSON(),t?.signal));return n.features.forEach(e=>{e.sourceLayer=this,e.origin=o}),n}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const r={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:o}=await this._setupQueryObjects(r),n=await o.executeQueryForExtent(i.toJSON(),t?.signal);let s;return s=null!=n.extent?.xmin&&null!=n.extent?.xmax&&null!=n.extent?.ymin&&null!=n.extent?.ymax?new p(n.extent):new p,{count:n.count,extent:s}}async queryObjectIds(e,t){await this.load();const r=he.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);i=this.loadQueryEngine(e)}return await i.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new w({geometryType:g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new T({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new he({where:"1=1",outFields:[v]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>ne(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const r=he.from(e),i=r.geometry;if(i&&!i.spatialReference?.isWGS84&&(await m(i.spatialReference,c),r.geometry=h(i instanceof y||i instanceof u||i instanceof l?i:i.extent,c)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:r,queryEngine:this._cachedQueryEngine};const o=await this.parentCompositeLayer.dataManager.getData(r,this,t);return{resolvedQuery:r,queryEngine:this.loadQueryEngine(o)}}};function ve(e,t,r){const o=[["ESRI__AGGREGATION_COUNT",S],["ESRI__ORIGIN_ID",N],["ESRI__DESTINATION_ID",L],["ESRI__LAYOUT_GEOMETRY",x]];try{for(const t of e)for(const[e,r]of o)t.labelExpression=t.labelExpression?.replaceAll(e,r),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,r))}catch(n){i.getLogger(this).warn("Error updating labelingInfo",n)}return ae(e,t,r)}e([n(fe(r(J)))],Oe.prototype,"blendMode",void 0),e([n()],Oe.prototype,"capabilities",void 0),e([n({readOnly:!0})],Oe.prototype,"userHasUpdateItemPrivileges",null),e([n({json:{origins:{"web-scene":{write:!1}},write:we()}})],Oe.prototype,"charts",void 0),e([n({readOnly:!0})],Oe.prototype,"defaultPopupTemplate",null),e([n({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],Oe.prototype,"definitionExpression",void 0),e([n()],Oe.prototype,"displayField",void 0),e([n(fe(r(D)))],Oe.prototype,"displayFilterEnabled",void 0),e([n(fe(r(q)))],Oe.prototype,"displayFilterInfo",void 0),e([n(fe(r(P)))],Oe.prototype,"effect",void 0),e([n()],Oe.prototype,"elevationInfo",void 0),e([n(fe(r(Z)))],Oe.prototype,"featureEffect",void 0),e([n(fe(r(re)))],Oe.prototype,"featureReduction",null),e([n()],Oe.prototype,"fields",null),e([n()],Oe.prototype,"geometryType",null),e([n()],Oe.prototype,"geometryFieldName",null),e([n({readOnly:!0})],Oe.prototype,"graphicOrigin",null),e([n({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],Oe.prototype,"graphType",void 0),e([n({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],Oe.prototype,"graphTypeName",null),e([n()],Oe.prototype,"hasM",null),e([n()],Oe.prototype,"hasZ",null),e([n({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],Oe.prototype,"id",void 0),e([n({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],Oe.prototype,"labelsVisible",void 0),e([n({type:[se],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:ve,write:we()}})],Oe.prototype,"labelingInfo",null),e([n({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer?.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],Oe.prototype,"layerType",void 0),e([n(fe(r(z)))],Oe.prototype,"legendEnabled",void 0),e([n(fe(r(X)))],Oe.prototype,"maxScale",void 0),e([n(fe(r($)))],Oe.prototype,"minScale",void 0),e([n()],Oe.prototype,"objectIdField",void 0),e([n()],Oe.prototype,"objectType",void 0),e([n(fe(r(ee)))],Oe.prototype,"opacity",void 0),e([n(fe(r(V)))],Oe.prototype,"orderBy",void 0),e([n({clonable:!1})],Oe.prototype,"parent",void 0),e([n()],Oe.prototype,"parentCompositeLayer",void 0),e([n(fe(r(te)))],Oe.prototype,"popupEnabled",void 0),e([n({type:t,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],Oe.prototype,"popupTemplate",void 0),e([n({type:Number,json:{write:{overridePolicy:Ie}}})],Oe.prototype,"refreshInterval",void 0),e([n({types:ue,json:{name:"layerDefinition.drawingInfo.renderer",write:we()}})],Oe.prototype,"renderer",null),e([n()],Oe.prototype,"source",void 0),e([n()],Oe.prototype,"spatialReference",null),e([n({type:pe,json:{name:"layerDefinition.timeInfo",write:!0,origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:!0},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:!0}}}})],Oe.prototype,"timeInfo",null),e([n({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],Oe.prototype,"title",null),e([a("title")],Oe.prototype,"writeTitle",null),e([n({json:{read:!1}})],Oe.prototype,"type",void 0),e([n(fe(r(Y)))],Oe.prototype,"useViewTime",void 0),e([n({type:Boolean,json:{name:"visibility",write:we()}})],Oe.prototype,"visible",void 0),Oe=e([s("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],Oe);export{Oe as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../PopupTemplate.js";import{clone as r}from"../../core/lang.js";import i from"../../core/Logger.js";import{MultiOriginJSONMixin as o}from"../../core/MultiOriginJSONSupport.js";import"../../core/workers/workers.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../../core/accessorSupport/decorators/writer.js";import p from"../../geometry/Extent.js";import l from"../../geometry/Point.js";import y from"../../geometry/Polygon.js";import u from"../../geometry/Polyline.js";import{initializeProjection as m,project as d}from"../../geometry/projectionUtils.js";import h from"../../geometry/SpatialReference.js";import{wgs84 as c}from"../../geometry/support/spatialReferenceUtils.js";import{featureGeometryTypeKebabDictionary as g}from"../../geometry/support/typeUtils.js";import f from"../../graphic/KnowledgeGraphGraphicOrigin.js";import j from"../../graphic/LinkChartGraphicOrigin.js";import b from"../Layer.js";import w from"../graphics/data/FeatureStore.js";import{QueryEngine as T}from"../graphics/data/QueryEngine.js";import{createCapabilities as I,createDrawingInfo as v}from"../graphics/sources/support/clientSideDefaults.js";import{systemOidFieldName as O,systemAggregationCountFieldName as S,systemIsSpatialFieldName as E,systemLayoutGeometryFieldName as x,systemOriginIdFieldName as N,systemDestinationIdFieldName as L}from"./constants.js";import{KnowledgeGraphSublayerBase as F}from"./KnowledgeGraphSublayerBase.js";import{getDisplayLabelProperty as _,getLinkChartDefaultLabelingInfo as R,getMapDefaultLabelingInfo as Q,getKGSublayerSymbolColor as C,getDefaultLCRelationshipSublayerSymbol as k}from"./layerUtils.js";import{BlendLayer as M,blendModeProperty as P,effectProperty as J}from"../mixins/BlendLayer.js";import{DisplayFilteredLayer as G,displayFilterEnabledProperty as D,displayFilterInfoProperty as q}from"../mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as U,featureEffectProperty as Z}from"../mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as A}from"../mixins/FeatureReductionLayer.js";import{OrderedLayer as B,orderByProperty as V}from"../mixins/OrderedLayer.js";import{RefreshableLayer as K}from"../mixins/RefreshableLayer.js";import{ScaleRangeLayer as H}from"../mixins/ScaleRangeLayer.js";import{TemporalLayer as W,useViewTimeProperty as Y}from"../mixins/TemporalLayer.js";import{legendEnabled as z,maxScale as X,minScale as $,opacity as ee,popupEnabled as te}from"../support/commonProperties.js";import{featureReductionProperty as re}from"../support/featureReductionUtils.js";import ie from"../support/Field.js";import{fixRendererFields as oe,fixTimeInfoFields as ne}from"../support/fieldUtils.js";import se from"../support/LabelClass.js";import{reader as ae}from"../support/labelingInfo.js";import pe from"../support/TimeInfo.js";import le from"../../renderers/SimpleRenderer.js";import{fromJSON as ye}from"../../renderers/support/jsonUtils.js";import{rendererTypes as ue}from"../../renderers/support/typeUtils.js";import me from"../../rest/support/FeatureSet.js";import de from"../../rest/support/Query.js";import{createPopupTemplate as he}from"../../support/popupUtils.js";import{applyColorToSymbol as ce}from"../../symbols/support/utils.js";import ge from"../../core/workers/RemoteClient.js";function fe(e){if(!e.json)return e;e.json.write=je(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=je(e.write))}return e}function je(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=be(e)),e):!0===e?we():e}function be(e){const{target:t,writer:r,overridePolicy:i,...o}=e;return function(e,t){const r=Te.call(this,e,t);return r.enabled?{...o,...r}:r}}function we(){return{overridePolicy:Te}}function Te(e,t){const r=!!this.geometryType;let i={enabled:r};return r&&(i={...i,...Ie.call(this,e,t)}),i}function Ie(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let ve=class extends(F(G(A(U(M(B(W(H(K(o(b))))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=I(!1,!0),this.charts=null,this.definitionExpression=null,this.displayField="",this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=O,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{const e=new MessageChannel;return new ge(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=de.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach(t=>{const r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(ie.fromJSON({name:t.name,type:r,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))}),e.push(ie.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),ie.fromJSON({name:S,type:"esriFieldTypeInteger",alias:S,editable:!1}),ie.fromJSON({name:E,type:"esriFieldTypeInteger",alias:E,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return x;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new f(this.parent,this);case"link-chart":return new j(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?_(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?R(this.graphType,this.graphTypeName,e):Q(this.graphTypeName,this.geometryType,e)}set renderer(e){oe(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),r=C(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new le({type:"simple",symbol:k(r)});const e=ye(v(g.toJSON("point")).renderer);return ce(e.symbol,r),e}const i=ye(v(g.toJSON(this.geometryType)).renderer);return ce(i.symbol,r),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??h.WGS84}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return he(this,e)}createQuery(){return new de({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return null}async queryFeatures(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e),o=this.graphicOrigin,n=me.fromJSON(await i.executeQuery(r.toJSON(),t?.signal));return n.features.forEach(e=>{e.sourceLayer=this,e.origin=o}),n}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const r={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:o}=await this._setupQueryObjects(r),n=await o.executeQueryForExtent(i.toJSON(),t?.signal);let s;return s=null!=n.extent?.xmin&&null!=n.extent?.xmax&&null!=n.extent?.ymin&&null!=n.extent?.ymax?new p(n.extent):new p,{count:n.count,extent:s}}async queryObjectIds(e,t){await this.load();const r=de.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);i=this.loadQueryEngine(e)}return await i.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new w({geometryType:g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new T({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new de({where:"1=1",outFields:[O]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>ne(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const r=de.from(e),i=r.geometry;if(i&&!i.spatialReference?.isWGS84&&(await m(i.spatialReference,c),r.geometry=d(i instanceof y||i instanceof u||i instanceof l?i:i.extent,c)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:r,queryEngine:this._cachedQueryEngine};const o=await this.parentCompositeLayer.dataManager.getData(r,this,t);return{resolvedQuery:r,queryEngine:this.loadQueryEngine(o)}}};function Oe(e,t,r){const o=[["ESRI__AGGREGATION_COUNT",S],["ESRI__ORIGIN_ID",N],["ESRI__DESTINATION_ID",L],["ESRI__LAYOUT_GEOMETRY",x]];try{for(const t of e)for(const[e,r]of o)t.labelExpression=t.labelExpression?.replaceAll(e,r),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,r))}catch(n){i.getLogger(this).warn("Error updating labelingInfo",n)}return ae(e,t,r)}e([n(fe(r(P)))],ve.prototype,"blendMode",void 0),e([n()],ve.prototype,"capabilities",void 0),e([n({readOnly:!0})],ve.prototype,"userHasUpdateItemPrivileges",null),e([n({json:{origins:{"web-scene":{write:!1}},write:we()}})],ve.prototype,"charts",void 0),e([n({readOnly:!0})],ve.prototype,"defaultPopupTemplate",null),e([n({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],ve.prototype,"definitionExpression",void 0),e([n()],ve.prototype,"displayField",void 0),e([n(fe(r(D)))],ve.prototype,"displayFilterEnabled",void 0),e([n(fe(r(q)))],ve.prototype,"displayFilterInfo",void 0),e([n(fe(r(J)))],ve.prototype,"effect",void 0),e([n()],ve.prototype,"elevationInfo",void 0),e([n(fe(r(Z)))],ve.prototype,"featureEffect",void 0),e([n(fe(r(re)))],ve.prototype,"featureReduction",null),e([n()],ve.prototype,"fields",null),e([n()],ve.prototype,"geometryType",null),e([n()],ve.prototype,"geometryFieldName",null),e([n({readOnly:!0})],ve.prototype,"graphicOrigin",null),e([n({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],ve.prototype,"graphType",void 0),e([n({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],ve.prototype,"graphTypeName",null),e([n()],ve.prototype,"hasM",null),e([n()],ve.prototype,"hasZ",null),e([n({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],ve.prototype,"id",void 0),e([n({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],ve.prototype,"labelsVisible",void 0),e([n({type:[se],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:Oe,write:we()}})],ve.prototype,"labelingInfo",null),e([n({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer?.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],ve.prototype,"layerType",void 0),e([n(fe(r(z)))],ve.prototype,"legendEnabled",void 0),e([n(fe(r(X)))],ve.prototype,"maxScale",void 0),e([n(fe(r($)))],ve.prototype,"minScale",void 0),e([n()],ve.prototype,"objectIdField",void 0),e([n()],ve.prototype,"objectType",void 0),e([n(fe(r(ee)))],ve.prototype,"opacity",void 0),e([n(fe(r(V)))],ve.prototype,"orderBy",void 0),e([n({clonable:!1})],ve.prototype,"parent",void 0),e([n()],ve.prototype,"parentCompositeLayer",void 0),e([n(fe(r(te)))],ve.prototype,"popupEnabled",void 0),e([n({type:t,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],ve.prototype,"popupTemplate",void 0),e([n({type:Number,json:{write:{overridePolicy:Ie}}})],ve.prototype,"refreshInterval",void 0),e([n({types:ue,json:{name:"layerDefinition.drawingInfo.renderer",write:we()}})],ve.prototype,"renderer",null),e([n()],ve.prototype,"source",void 0),e([n()],ve.prototype,"spatialReference",null),e([n({type:pe,json:{name:"layerDefinition.timeInfo",write:{overridePolicy:Ie},origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:Ie}},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:Ie}}}}})],ve.prototype,"timeInfo",null),e([n({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],ve.prototype,"title",null),e([a("title")],ve.prototype,"writeTitle",null),e([n({json:{read:!1}})],ve.prototype,"type",void 0),e([n(fe(r(Y)))],ve.prototype,"useViewTime",void 0),e([n({type:Boolean,json:{name:"visibility",write:we()}})],ve.prototype,"visible",void 0),ve=e([s("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],ve);export{ve as default};
|
package/package.json
CHANGED
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 c="
|
|
5
|
+
const c="20250822",d="97138d43e361cffd3debdc555ab7a61c45fe8485";export{c 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{clamp as t}from"../../../../core/mathUtils.js";import{meterIn as n}from"../../../../renderers/support/lengthUtils.js";const e=Math.PI;function r(t,n){switch(n.transformationType){case"additive":return a(t,n);case"constant":return s(n,t);case"clamped-linear":return u(t,n);case"proportional":return o(t,n);case"stops":return c(t,n);case"real-world-size":return l(t,n);case"identity":return t;case"unknown":return null}}function i(t,n){return"number"==typeof t?t:r(n,t)}function a(t,n){return t+(i(n.minSize,t)||n.minDataValue)}function s(t,n){const e=t.stops;let r=e?.length&&e[0].size;return null==r&&(r=t.minSize),i(r,n)}function u(t,n){const e=n.minDataValue,r=n.maxDataValue,a=(t-e)/(r-e),s=i(n.minSize,t),u=i(n.maxSize,t);return t<=e?s:t>=r?u:s+a*(u-s)}function o(n,e){const r=n/e.minDataValue,a=i(e.minSize,n),s=i(e.maxSize,n);let u=null;return u=r*a,t(u,a,s)}function c(t,n){const[e,r,a]=m(t,n.cache.ipData);if(e===r)return i(n.stops[e].size,t);{const s=i(n.stops[e].size,t);return s+(i(n.stops[r].size,t)-s)*a}}function l(r
|
|
5
|
+
import{clamp as t}from"../../../../core/mathUtils.js";import{meterIn as n}from"../../../../renderers/support/lengthUtils.js";const e=Math.PI;function r(t,n){switch(n.transformationType){case"additive":return a(t,n);case"constant":return s(n,t);case"clamped-linear":return u(t,n);case"proportional":return o(t,n);case"stops":return c(t,n);case"real-world-size":return l(t,n);case"identity":return t;case"unknown":return null}}function i(t,n){return"number"==typeof t?t:r(n,t)}function a(t,n){return t+(i(n.minSize,t)||n.minDataValue)}function s(t,n){const e=t.stops;let r=e?.length&&e[0].size;return null==r&&(r=t.minSize),i(r,n)}function u(t,n){const e=n.minDataValue,r=n.maxDataValue,a=(t-e)/(r-e),s=i(n.minSize,t),u=i(n.maxSize,t);return t<=e?s:t>=r?u:s+a*(u-s)}function o(n,e){const r=n/e.minDataValue,a=i(e.minSize,n),s=i(e.maxSize,n);let u=null;return u=r*a,t(u,a,s)}function c(t,n){const[e,r,a]=m(t,n.cache.ipData);if(e===r)return i(n.stops[e].size,t);{const s=i(n.stops[e].size,t);return s+(i(n.stops[r].size,t)-s)*a}}function l(t,r){const i=n[r.valueUnit],{valueRepresentation:a}=r;let s=null;return s="area"===a?2*Math.sqrt(t/e)/i:"radius"===a||"distance"===a?2*t/i:t/i,s}function m(t,n){if(!n)return;let e=0,r=n.length-1;return n.some((n,i)=>t<n?(r=i,!0):(e=i,!1)),[e,r,(t-n[e])/(n[r]-n[e])]}export{r as getSizeForValueSimple};
|
|
@@ -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 t}from"tslib";import{destroyMaybe as e}from"../../../core/maybe.js";import{property as
|
|
5
|
+
import{__decorate as t}from"tslib";import{destroyMaybe as e}from"../../../core/maybe.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as r}from"../../../support/getDefaultUnitForView.js";import{AnalysisView3D as o}from"./AnalysisView3D.js";import{VolumeMeasurementCutFillController as l}from"./VolumeMeasurement/VolumeMeasurementCutFillController.js";import{VolumeMeasurementCutFillVisualization as n}from"./VolumeMeasurement/VolumeMeasurementCutFillVisualization.js";let a=class extends o{constructor(t){super(t),this.type="volume-measurement-view-3d",this.analysis=null,this.elevationAlignedGeometry=null,this.targetGeometry=null,this.tool=null}initialize(){const{analysis:t,view:e}=this;this._analysisController=new l({view:e,analysis:t,analysisViewData:this}),this._analysisVisualization=new n({view:e,analysisViewData:this})}destroy(){this._analysisController=e(this._analysisController),this._analysisVisualization=e(this._analysisVisualization)}get result(){return this._analysisController.result}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get visible(){return super.visible}set visible(t){super.visible=t}get effectiveTargetElevation(){const{targetElevation:t}=this.analysis.cutFillOptions;if(null!=t)return t;const e=this.elevationAlignedGeometry?.extent;return e&&e.zmin&&e.zmax?(e.zmax+e.zmin)/2:null}get unit(){return this.analysis.unit??r(this.view)}get updating(){return null!=this._analysisController&&this._analysisController.updating}};t([i({readOnly:!0})],a.prototype,"type",void 0),t([i({constructOnly:!0,nonNullable:!0})],a.prototype,"analysis",void 0),t([i({readOnly:!0})],a.prototype,"result",null),t([i()],a.prototype,"elevationAlignedGeometry",void 0),t([i({type:Number})],a.prototype,"effectiveTargetElevation",null),t([i()],a.prototype,"targetGeometry",void 0),t([i()],a.prototype,"unit",null),t([i()],a.prototype,"updating",null),a=t([s("esri.views.3d.analysis.VolumeMeasurementAnalysisView3D")],a);const u=a;export{u as default};
|
|
@@ -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{lerp as t,smoothstep as s}from"../../../core/mathUtils.js";import{watch as r,syncAndInitial as i}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{c as n,n as
|
|
5
|
+
import{__decorate as e}from"tslib";import{lerp as t,smoothstep as s}from"../../../core/mathUtils.js";import{watch as r,syncAndInitial as i}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{c as n,n as h,e as m,g as c,m as p,l}from"../../../chunks/vec32.js";import{fromValues as u,create as d}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as g}from"../../../geometry/ellipsoidUtils.js";import{InternalRenderCategory as _}from"../webgl.js";import{F as f}from"../../../chunks/Fog.glsl.js";import{FogTechnique as w}from"./FogTechnique.js";import{FogTechniqueConfiguration as P}from"./FogTechniqueConfiguration.js";import{heightLimit as b}from"./weather.js";import{TransparentEnvironment as y}from"../webgl-engine/effects/TransparentEnvironment.js";import{Blit as v}from"../webgl-engine/effects/blit/Blit.js";import{ColorAttachment1 as j,DepthStencilAttachment as F}from"../../webgl/enums.js";const E=.95,R=1;let T=class extends y{constructor(e){super(e),this.consumes={required:[_.TRANSPARENT_ENVIRONMENT]},this._configuration=new P,this.requireGeometryDepth=!0,this._newParameters=new q,this._oldParameters=new q,this._fadedParameters=new q,this._parameters=this._newParameters,this._passParameters=new f,this._blit=null;const t=g(e.view.spatialReference);this._planetRadius=t.radius,this._atmosphereRadius=t.radius+t.atmosphereHeight;const s=e.view.stage.renderView.techniques;s.precompile(w,this._configuration),this._configuration.hasEmissive=!this._configuration.hasEmissive,s.precompile(w,this._configuration),this._configuration.hasEmissive=!this._configuration.hasEmissive}toogle(){this.view.environment.atmosphereEnabled&&this.view.environment.weather?this._enable():this._disable()}initialize(){this.addHandles([r(()=>this.view.environment.atmosphereEnabled,()=>this.toogle(),i),r(()=>this.view.environment.weather,()=>this.toogle(),i),r(()=>this._updateFogParameters(),()=>{},i)]),this.addHandles(r(()=>this._fadeFactor,e=>this._fade(e),i))}get _fadeFactor(){return this.view.stage?.renderer.renderContext.bind.clouds.fadeFactor??1}_fade(e){const{_newParameters:t,_oldParameters:s}=this;e>=1?(this._parameters=t,this._oldParameters.copyFrom(this._newParameters)):e<=0?this._parameters=s:(this._fadedParameters.lerp(s,t,e),this._parameters=this._fadedParameters)}_updateFogParameters(){const e=this.view.environment.weather,s="foggy"===e.type||"snowy"===e.type||"rainy"===e.type;this._newParameters.strength="foggy"===e.type?t(3e-5,.005,e.fogStrength**3):"snowy"===e.type||"rainy"===e.type?t(4e-6,2e-4,(e.precipitation??0)**3):0,this._newParameters.amount=s?1:0,"foggy"!==e.type&&"snowy"!==e.type||n(this._newParameters.color,C),"rainy"===e.type&&n(this._newParameters.color,A),this._fadeFactor>=1&&this._oldParameters.copyFrom(this._newParameters),this.requestRender(1)}render(e){const t=e.find(({name:e})=>e===_.TRANSPARENT_ENVIRONMENT);if(0===this._parameters.amount)return t;if(this._update(),this._passParameters.amount<=0)return t;const s=t.getAttachment(j);this._configuration.hasEmissive=null!=s;const r=this.techniques.get(w,this._configuration);if(!r.compiled)return this.requestRender(1),t;const i=t.getAttachment(F),a=this.renderingContext,{fullWidth:o,fullHeight:n}=this.bindParameters.camera,h=o,m=n;let c=null;return s&&(c=this.fboCache.acquire(h,m,"glowHorizontal",8),this._blit??=new v(this.techniques),this._blit.blitTexture(a,s?.attachment,c,this.bindParameters)),t.attachDepth(null),a.bindFramebuffer(t.fbo),s&&(this._passParameters.emission=c?.getTexture()),a.bindTechnique(r,this.bindParameters,this._passParameters),a.screen.draw(),t.attachDepth(i),c?.release(),t}_update(){const e=this.bindParameters.camera;h(N,e.eye);const t=Math.max(0,m(N,this.bindParameters.lighting.mainLight.direction)),r=this._parameters.color;c(x,r,.1),p(this._passParameters.color,x,r,t);const i=l(e.eye);this._passParameters.atmosphereC=i**2-this._atmosphereRadius**2,this._passParameters.amount=(1-s(E*b,R*b,Math.abs(i-this._planetRadius)))*this._parameters.amount,this._passParameters.strength=this._parameters.strength}};e([a()],T.prototype,"consumes",void 0),T=e([o("esri.views.3d.environment.Fog")],T);class q{constructor(){this.color=d(),this.strength=0,this.amount=0}copyFrom(e){this.amount=e.amount,this.strength=e.strength,n(this.color,e.color)}lerp(e,s,r){this.amount=t(e.amount,s.amount,r),this.strength=t(e.strength,s.strength,r),p(this.color,e.color,s.color,r)}}const N=d(),x=d(),A=u(.5,.5,.5),C=u(1.5,1.5,1.5);export{T as Fog,q as FogParameters};
|
|
@@ -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{parameter as
|
|
5
|
+
import{__decorate as e}from"tslib";import{parameter as s,ShaderTechniqueConfiguration as i}from"../webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js";class o extends i{constructor(){super(...arguments),this.hasEmissive=!1}}e([s()],o.prototype,"hasEmissive",void 0);export{o as FogTechniqueConfiguration};
|