@arcgis/core 5.2.0-next.41 → 5.2.0-next.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/20fefb9278501781de14.js +1 -0
- package/assets/esri/core/workers/chunks/399e23d777a043efa9f1.js +1 -0
- package/assets/esri/core/workers/chunks/{2b8909a488cf3b231eec.js → 4063ea53cba3dd897e53.js} +6 -12
- package/assets/esri/core/workers/chunks/5133083222588799493f.js +1 -0
- package/assets/esri/core/workers/chunks/{7ea65aa6d3e684e12082.js → 57a1e2b716b74f0124f7.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e79fb1b8445b2091cdb.js → 60e8524d324fd14444d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{b45a013039bbd2614525.js → 7684f0c771d312e05bb4.js} +7 -7
- package/assets/esri/core/workers/chunks/{90ace5f9b4af1beea6bf.js → 7b6b8d0673976c6c26de.js} +1 -1
- package/assets/esri/core/workers/chunks/81d55594cee124040565.js +1 -0
- package/assets/esri/core/workers/chunks/{82f4aa0533db009b11d8.js → 89682d9d4f606f82056b.js} +2 -2
- package/assets/esri/core/workers/chunks/9114a575b78a7ea18d0f.js +1 -0
- package/assets/esri/core/workers/chunks/{4056659d5c7698265129.js → 9de18cea5780319302cb.js} +1 -1
- package/assets/esri/core/workers/chunks/{f1d3cf674b6bea89e122.js → c0637d1c9337a6ba46b0.js} +1 -1
- package/assets/esri/core/workers/chunks/c1845682cc9a5aac8703.js +261 -0
- package/assets/esri/core/workers/chunks/ce2320e7b9c4ca96ff27.js +1 -0
- package/assets/esri/core/workers/chunks/{dd65c32ae55fcf1282fe.js → d45e30f15142b5861111.js} +1 -1
- package/assets/esri/core/workers/chunks/{c50e4e8c6188e64e7d45.js → d7775ed1402946e414ef.js} +1 -1
- package/assets/esri/core/workers/chunks/e2f45990d8459d14cb90.js +1 -0
- package/assets/esri/core/workers/chunks/{aa0fb77c62a2d4eb20a5.js → e6b5c015205d38abe037.js} +1 -1
- package/assets/esri/core/workers/chunks/f4eda59ec1e816ecc827.js +1 -0
- package/assets/esri/core/workers/chunks/f8f0de841be17cd05c8f.js +1 -0
- package/assets/esri/themes/base/_core.scss +0 -6
- 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/Component.glsl.js +2 -2
- package/chunks/CutFillMinMaxDepth.glsl.js +2 -0
- package/chunks/CutFillTargetDepth.glsl.js +1 -2
- package/chunks/CutFillTotalDepth.glsl.js +2 -0
- package/chunks/EdgeShader.glsl.js +9 -9
- package/chunks/GaussianSplat.glsl.js +1 -1
- package/chunks/Path.glsl.js +4 -4
- package/chunks/Terrain.glsl.js +2 -2
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/config.js +1 -1
- package/editing/geometry/coordUtils.js +1 -1
- package/geohash/geohashUtils.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/quantizationUtils.js +1 -1
- package/intl/date.js +1 -1
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/graphics/sources/support/sourceUtils.js +1 -1
- package/layers/raster/formats/Lerc.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/package.json +2 -2
- package/support/revision.js +1 -1
- package/third-party-notices.txt +156 -0
- package/views/2d/engine/vectorTiles/GeometryUtils.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/RenderingDevice.js +1 -1
- package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
- package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimationUniformInfo.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BaseRasterProcessorTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitBlitShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DebugOverlayShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HighlightShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/WorldExtentStencilShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/utility/BitBlitTechnique.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/utility/DebugOverlayTechnique.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/utility/HighlightTechnique.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/utility/WorldExtentClipTechnique.js +2 -0
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/FeatureHybridTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/FeaturePagedTileLoadStrategy.js +1 -1
- package/views/2d/layers/support/DebugOverlay.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightDrawToolRenderer.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/layers/i3s/SphereCone.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/cameraUtilsSpherical.js +1 -1
- package/views/3d/terrain/GeometryState.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileAgent.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +4 -10
- package/views/3d/webgl-engine/core/shaderLibrary/util/emissionFilter.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputation.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
- package/views/3d/webgl-engine/lib/IntersectorInterfaces.js +1 -1
- package/views/3d/webgl-engine/lib/PolygonIntersections2D.js +2 -0
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/{shaders/sources/edgeRenderer → lib/edgeRendering}/AdjustProjectedPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/{shaders/sources/edgeRenderer → lib/edgeRendering}/DiscardNonSilhouetteEdges.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
- package/views/3d/webgl-engine/{shaders/sources/edgeRenderer → lib/edgeRendering}/EdgeUtil.glsl.js +1 -1
- package/views/3d/webgl-engine/{shaders/sources/edgeRenderer → lib/edgeRendering}/LineAmplitude.glsl.js +1 -1
- package/views/3d/webgl-engine/{shaders/sources/edgeRenderer → lib/edgeRendering}/LineOffset.glsl.js +1 -1
- package/views/3d/webgl-engine/{shaders/sources/edgeRenderer → lib/edgeRendering}/UnpackAttributes.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillMinMaxDepth.glsl.js +2 -0
- package/views/3d/webgl-engine/shaders/CutFillMinMaxDepthTechnique.js +2 -0
- package/views/3d/webgl-engine/shaders/CutFillTargetDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/{CutFillDepth.glsl.js → CutFillTotalDepth.glsl.js} +1 -1
- package/views/3d/webgl-engine/shaders/CutFillTotalDepthTechnique.js +2 -0
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/input/BrowserEventSource.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/interactive/snapping/snappingUtils.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/webgl/VertexAttributeLayouts.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/multipleChoiceInputUtils.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/Legend/support/relationshipRampUtils.js +1 -1
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/002356e675769d20e5c0.js +0 -1
- package/assets/esri/core/workers/chunks/06e71d52773eb656a4bf.js +0 -261
- package/assets/esri/core/workers/chunks/18d874739ee9ffad7480.js +0 -1
- package/assets/esri/core/workers/chunks/352d144d7651da8a29c9.js +0 -1
- package/assets/esri/core/workers/chunks/4f2a61dfae6ca8ed1ec8.js +0 -1
- package/assets/esri/core/workers/chunks/551d0c5432f7a08dea77.js +0 -1
- package/assets/esri/core/workers/chunks/5923ebadd4f75be2c9cc.js +0 -1
- package/assets/esri/core/workers/chunks/c3fae4f4522604a9c17e.js +0 -1
- package/assets/esri/core/workers/chunks/ea8f224da4c5c95a3547.js +0 -1
- package/assets/esri/core/workers/chunks/f30578843f4faefd53b4.js +0 -1
- package/assets/esri/themes/base/_colorVariables.scss +0 -1
- package/assets/esri/themes/base/widgets/_DatePicker.scss +0 -170
- package/assets/esri/themes/base/widgets/_FeatureUtilityNetworkAssociationList.scss +0 -13
- package/assets/esri/themes/base/widgets/_TimePicker.scss +0 -15
- package/chunks/CutFillDepth.glsl.js +0 -2
- package/core/PLRUCache.js +0 -2
- package/views/2d/engine/webgl/BitBlitRenderer.js +0 -2
- package/views/2d/engine/webgl/WorldExtentClipRenderer.js +0 -2
- package/views/2d/engine/webgl/effects/highlight/HighlightRenderer.js +0 -2
- package/views/2d/engine/webgl/shaders/BitBlitPrograms.js +0 -2
- package/views/2d/engine/webgl/shaders/HighlightPrograms.js +0 -2
- package/views/2d/engine/webgl/shaders/StencilPrograms.js +0 -2
- package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/CutFillDepthTechniqueConfiguration.js +0 -2
- package/views/support/euclideanAreaMeasurementUtils.js +0 -2
- package/widgets/ShadowCast/ShadowVisualizationType.js +0 -2
- /package/assets/esri/core/workers/chunks/{82f4aa0533db009b11d8.js.LICENSE.txt → 89682d9d4f606f82056b.js.LICENSE.txt} +0 -0
package/chunks/Component.glsl.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{ComponentData as e}from"../views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js";import{ForwardLinearDepthToWriteShadowMap as o}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{isColor as a,isShadow as r}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 i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{
|
|
2
|
+
import{ComponentData as e}from"../views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js";import{ForwardLinearDepthToWriteShadowMap as o}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{isColor as a,isShadow as r}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 i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{outputDepth as d}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as g}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as c}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{ReadDepth as m}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{computeFragmentNormals as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTextureDraw as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as w,addLightingGlobalFactor as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as b,addMainLightDirection as f}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{PiUtils as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{ReadBaseColorTexture as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPassFragment as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayIM as S}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{DiscardOrAdjustAlphaDraw as O}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{BooleanDrawUniform as j}from"../views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js";import{If as N,glsl as $}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as R}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{SnowCover as T}from"../views/3d/webgl-engine/effects/snowcover/SnowCover.glsl.js";import{alphaCutoff as M}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{outputColorHighlightOLID as D}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{getPlanetRadius as W,sphereDepthInterpolate as P}from"../views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js";import{ShaderBuilder as A}from"../views/webgl/ShaderBuilder.js";function U(U){const F=new A,{vertex:V,fragment:z}=F;F.include(s,U),F.include(n,U),F.include(t,U),F.include(i,U),F.include(e,U),F.include(O,U),z.include(l,U),F.include(x,U);const{output:B,pbrMode:E,hasNormalTexture:I,snowCover:G,receiveShadows:_,shadeNormals:H,spherical:k,sphericalSR:q,overlayEnabled:J,componentDataType:K,vertexDiscardMode:Q,renderOccluded:X,isGroundSlice:Y}=U,Z=1===E||2===E;Z&&(F.include(y,U),I&&F.include(h,U));const ee=r(B),oe=11===B,ae=ee&&1===K,re=W(U);J&&(z.include(w,U),F.include(S,U),V.include(C),V.uniforms.add(new j("useENUForGlobalOverlayUV",e=>e.useENUForGlobalOverlayUV)),z.uniforms.add(new j("useENUForGlobalOverlayUV",e=>e.useENUForGlobalOverlayUV)),V.constants.add("invRadius","float",1/re).code.add(`vec2 projectOverlay(vec3 pos) { return pos.xy ${N(k,"/ (1.0 + invRadius * pos.z)")}; }`));const le=J&&a(B)&&4===E;le&&(F.varyings.add("tbnTangent","vec3"),F.varyings.add("tbnBiTangent","vec3"),F.varyings.add("groundNormal","vec3"));const ie=0===Q,te=2===Q;if(F.include(L,U),F.include(o,U),V.include(M),V.main.add($`
|
|
3
3
|
bool castShadows;
|
|
4
4
|
vec4 externalColor = forwardExternalColor(castShadows);
|
|
5
5
|
${N(ae,"if(!castShadows) { gl_Position = vec4(vec3(1e38), 1.0); return; }")}
|
|
@@ -136,7 +136,7 @@ import{ComponentData as e}from"../views/3d/webgl-engine/collections/Component/Ma
|
|
|
136
136
|
}`)}
|
|
137
137
|
`)),z.main.add(`\n ${N(Y,"if(rejectBySlice(vPositionWorldCameraRelative)) shadedColor.a *= groundSliceOpacity;")}\n\n outputColorHighlightOLID(applySlice(shadedColor, vPositionWorldCameraRelative), materialColor.rgb ${N(G,", snow")});\n `),U.sphereDepthInterpolate&&(F.include(P,U),F.fragment.include(m),z.main.add($`vec3 worldRay = normalize(vPositionWorldCameraRelative);
|
|
138
138
|
vec3 viewRay = normalize(vPosition_view);
|
|
139
|
-
gl_FragDepth = delinearizeDepth(sphereDepthInterpolate(worldRay, viewRay, linearizeDepth(gl_FragCoord.z)));`)),F;const ne=4===B,se=10===B,de=ee||8===B
|
|
139
|
+
gl_FragDepth = delinearizeDepth(sphereDepthInterpolate(worldRay, viewRay, linearizeDepth(gl_FragCoord.z)));`)),F;const ne=4===B,se=10===B,de=ee||8===B;return de&&F.include(d,U),ne&&F.include(v,U),J&&F.include(c,U),F.include(g,U),z.main.add($`
|
|
140
140
|
${N(!Y,"discardBySlice(vPositionWorldCameraRelative);")}
|
|
141
141
|
|
|
142
142
|
vec4 textureColor = readBaseColorTexture();
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Texture2DPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as o}from"../views/webgl/ShaderBuilder.js";function n(){const n=new o;return n.include(e),n.fragment.include(r),n.fragment.code.add("\n bool outsideFar(float depth) {\n return depth >= 1.0;\n }\n "),n.fragment.uniforms.add(new t("referenceDepth",e=>e.referenceDepth),new t("targetDepth",e=>e.targetDepth)).main.add("\n float targetDepth = depthFromTexture(targetDepth, uv);\n if (outsideFar(targetDepth)) {\n discard;\n }\n\n ivec2 texSize = textureSize(referenceDepth, 0);\n ivec2 coords = ivec2(gl_FragCoord.xy);\n float packedCoords = float(coords.x) + float(coords.y) * float(texSize.x);\n float referenceDepth = depthFromTexture(referenceDepth, uv);\n\n fragColor = vec4(referenceDepth, packedCoords, 0.0, 0.0);\n "),n}const a=Object.freeze(Object.defineProperty({__proto__:null,build:n},Symbol.toStringTag,{value:"Module"}));export{a as C,n as b};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{translate as
|
|
3
|
-
outputDepth(depth);`),i}const f=r(),g=Object.freeze(Object.defineProperty({__proto__:null,CutFillTargetDepthParameters:c,build:p},Symbol.toStringTag,{value:"Module"}));export{c as C,g as a,p as b};
|
|
2
|
+
import{translate as r}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as e}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ZEROS as a}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{Transform as t}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{Float2PassUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Matrix4PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{NoParameters as n}from"../views/webgl/NoParameters.js";import{ShaderBuilder as l}from"../views/webgl/ShaderBuilder.js";class m extends n{constructor(){super(...arguments),this.origin=a,this.cutFillCamera={projectionMatrix:e(),viewMatrix:e(),nearFar:i()}}}function c(){const e=new l,{vertex:i,fragment:a,varyings:n,attributes:m}=e;return e.include(t),m.add("position","vec3"),n.add("depth","float",{invariant:!0}),i.uniforms.add(new s("proj",r=>r.cutFillCamera.projectionMatrix),new s("view",e=>r(d,e.cutFillCamera.viewMatrix,e.origin)),new o("nearFar",r=>r.cutFillCamera.nearFar)).main.add("gl_Position = transformPositionWithDepth(proj, view, position, nearFar, depth);"),a.main.add("fragColor = vec4(1.0);"),e}const d=e(),f=Object.freeze(Object.defineProperty({__proto__:null,CutFillTargetDepthParameters:m,build:c},Symbol.toStringTag,{value:"Module"}));export{m as C,f as a,c as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as r}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Texture2DPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as n}from"../views/webgl/NoParameters.js";import{ShaderBuilder as a}from"../views/webgl/ShaderBuilder.js";class o extends n{}function d(){const n=new a;return n.include(e),n.fragment.include(r),n.fragment.uniforms.add(new t("referenceDepth",e=>e.referenceDepth),new t("targetDepth",e=>e.targetDepth)),n.fragment.code.add("\n bool outsideFar(float depth) {\n return depth >= 1.0;\n }\n "),n.fragment.main.add("\n float targetDepth = depthFromTexture(targetDepth, uv);\n if (outsideFar(targetDepth)) {\n discard;\n }\n\n float referenceDepth = depthFromTexture(referenceDepth, uv);\n float depth = referenceDepth - targetDepth;\n fragColor = vec4(min(0.0, depth), max(0.0, depth), 0.0, 0.0);\n "),n}const s=Object.freeze(Object.defineProperty({__proto__:null,CutFillDepthParameters:o,build:d},Symbol.toStringTag,{value:"Module"}));export{o as C,s as a,d as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Float2BindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{FloatBindUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as
|
|
2
|
+
import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Float2BindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{FloatBindUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as d,If as a}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{AdjustProjectedPosition as r}from"../views/3d/webgl-engine/lib/edgeRendering/AdjustProjectedPosition.glsl.js";import{DiscardNonSilhouetteEdges as c}from"../views/3d/webgl-engine/lib/edgeRendering/DiscardNonSilhouetteEdges.glsl.js";import{EdgeUtil as p}from"../views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js";import{LineAmplitude as P}from"../views/3d/webgl-engine/lib/edgeRendering/LineAmplitude.glsl.js";import{LineOffset as f}from"../views/3d/webgl-engine/lib/edgeRendering/LineOffset.glsl.js";import{UnpackAttributes as u}from"../views/3d/webgl-engine/lib/edgeRendering/UnpackAttributes.glsl.js";import{ShaderBuilder as g}from"../views/webgl/ShaderBuilder.js";import{Uniform as m}from"../views/webgl/Uniform.js";function v(i){const m=new g,{vertex:v,fragment:h,varyings:L,attributes:A}=m;i.legacy&&v.uniforms.add(new w("model"),new w("localView")),m.include(r,i),m.include(p,i),m.include(P,i),m.include(u,i),m.include(f,i),h.include(o,i),m.include(c,i),L.add("vColor","vec4"),L.add("vRadius","float"),L.add("vPosition","vec3",{invariant:!0}),L.add("vWorldPosition","vec3",{invariant:!0}),L.add("vLineLengthPixels","float"),L.add("vSizeFalloffFactor","float"),v.uniforms.add(new n("pixelToNDC",({camera:i})=>e(x,2/i.fullViewport[2],2/i.fullViewport[3])),new t("viewport",e=>e.camera.fullViewport),new s("pixelRatio",e=>e.camera.pixelRatio)),A.add("position0","vec3"),A.add("position1","vec3"),A.add("variantOffset","float"),A.add("variantStroke","float"),A.add("variantExtension","float");const b=1===i.type,j=2===i.type,V=1/255,C=1;return v.uniforms.add(new l("distanceFalloffFactor",e=>e.distanceFalloffFactor)).code.add(d`
|
|
3
3
|
float distanceBasedPerspectiveFactor(float distance) {
|
|
4
4
|
return clamp(sqrt(distanceFalloffFactor / distance), 0.0, 1.0);
|
|
5
5
|
}
|
|
@@ -37,8 +37,8 @@ import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}f
|
|
|
37
37
|
float extendedLineLengthPixels = lineLengthPixels + extensionLengthPixels + extensionLengthPixels;
|
|
38
38
|
|
|
39
39
|
// Line size with padding
|
|
40
|
-
float halfAAPaddedLineWidthAndAmplitudePixels = lineWidthAndAmplitudePixels * 0.5 + ${
|
|
41
|
-
float aaPaddedRoundedCapSizePixels = lineWidthPixels * 0.5 + ${
|
|
40
|
+
float halfAAPaddedLineWidthAndAmplitudePixels = lineWidthAndAmplitudePixels * 0.5 + ${d.float(C)};
|
|
41
|
+
float aaPaddedRoundedCapSizePixels = lineWidthPixels * 0.5 + ${d.float(C)};
|
|
42
42
|
|
|
43
43
|
// Half line width in NDC including padding for anti aliasing
|
|
44
44
|
vec2 halfAAPaddedLineWidthAndAmplitudeNDC = halfAAPaddedLineWidthAndAmplitudePixels * pixelToNDC;
|
|
@@ -73,12 +73,12 @@ import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}f
|
|
|
73
73
|
vLineLengthPixels = extendedLineLengthPixels;
|
|
74
74
|
|
|
75
75
|
// discard short edges below a certain length threshold
|
|
76
|
-
${a(b||j,
|
|
76
|
+
${a(b||j,d`if (lineLengthPixels <= 3.0 ${a(j," && unpackedAttributes.type <= 0.0")}) {
|
|
77
77
|
gl_Position = vec4(10.0, 10.0, 10.0, 1.0);
|
|
78
78
|
return;
|
|
79
79
|
}`)}
|
|
80
80
|
gl_Position = projPos;
|
|
81
|
-
}`),v.main.add(
|
|
81
|
+
}`),v.main.add(d`
|
|
82
82
|
ComponentData component = readComponentData();
|
|
83
83
|
UnpackedAttributes unpackedAttributes = unpackAttributes(component);
|
|
84
84
|
|
|
@@ -90,7 +90,7 @@ import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}f
|
|
|
90
90
|
vColor = component.color;
|
|
91
91
|
|
|
92
92
|
// Discard fully transparent edges
|
|
93
|
-
if (vColor.a < ${
|
|
93
|
+
if (vColor.a < ${d.float(V)}) {
|
|
94
94
|
gl_Position = vec4(10.0, 10.0, 10.0, 1.0);
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
@@ -103,7 +103,7 @@ import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as i}f
|
|
|
103
103
|
calculateGeometricOutputs(viewPosV0, viewPosV1, worldPosV0, worldPosV1, worldNormal(component), unpackedAttributes);
|
|
104
104
|
|
|
105
105
|
// Specific computation for different edge styles
|
|
106
|
-
calculateStyleOutputs(unpackedAttributes);`),h.code.add(
|
|
106
|
+
calculateStyleOutputs(unpackedAttributes);`),h.code.add(d`float lineWithCapsDistance(float radius, vec2 position, float lineLength) {
|
|
107
107
|
float positionX = position.x - calculateLineOffset();
|
|
108
108
|
if (radius < 1.0) {
|
|
109
109
|
float coverageX = clamp(min(radius, positionX + 0.5) - max(-radius, positionX - 0.5), 0.0, 1.0);
|
|
@@ -114,8 +114,8 @@ else {
|
|
|
114
114
|
float positionOnCap = position.y - clamp(position.y, 0.0, lineLength);
|
|
115
115
|
return length(vec2(positionX, positionOnCap)) - radius;
|
|
116
116
|
}
|
|
117
|
-
}`),h.main.add(
|
|
117
|
+
}`),h.main.add(d`float radius = vRadius * calculateLinePressure();
|
|
118
118
|
float distance = lineWithCapsDistance(radius, vPosition.xy, vLineLengthPixels);
|
|
119
119
|
float coverage = clamp(0.5 - distance, 0.0, 1.0);
|
|
120
120
|
discardBySlice(vWorldPosition);
|
|
121
|
-
fragColor = vec4(vColor.rgb, vColor.a * coverage);`),
|
|
121
|
+
fragColor = vec4(vColor.rgb, vColor.a * coverage);`),m}const x=i();class w extends m{constructor(e){super(e,"mat4")}}const h=Object.freeze(Object.defineProperty({__proto__:null,build:v},Symbol.toStringTag,{value:"Module"}));export{h as E,v as b};
|
|
@@ -11,4 +11,4 @@ vec3 additionalLight = mainLightIntensity * additionalAmbientScale * ambientBoos
|
|
|
11
11
|
${B}
|
|
12
12
|
float shadow = readShadow(additionalAmbientScale, fragmentPositionCameraRelative);
|
|
13
13
|
shadedColor = evaluateSceneLighting(groundNormal, vColor.rgb, shadow, 0.0, additionalLight);
|
|
14
|
-
`;return D.vertex.main.add(`\n uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));\n uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);\n uint pageNum = fetchGaussianPageIndex(gaussianIndex);\n\n // Unpack color first so very transparent splats can discard before fetching the page header.\n vColor = unpackColor(packedGaussian);\n\n // Apply per-page fading before the early alpha rejection.\n ${C(a.fadingEnabled,"\n uint fadingTextureWidth = uint(textureSize(splatFadingTexture, 0).x);\n uint fadeX = pageNum % fadingTextureWidth;\n uint fadeY = pageNum / fadingTextureWidth;\n uint opacityModifierByte = texelFetch(splatFadingTexture, ivec2(fadeX , fadeY), 0).r;\n float opacityModifier = float(opacityModifierByte) / 255.0;\n vColor.a *= opacityModifier;\n ")}\n\n // Set default position outside clip space for early returns.\n gl_Position = ${l};\n\n if (vColor.a < ${A}) {\n return;\n }\n\n // Delay the page header fetch until the splat survives the opacity reject.\n vec3 cameraRelativePosition = fetchGaussianCameraRelativePosition(gaussianIndex, packedGaussian);\n\n ${C(i,"\n if (cameraRelativePosition.x < clipMin.x || cameraRelativePosition.y < clipMin.y || cameraRelativePosition.z < clipMin.z ||\n cameraRelativePosition.x > clipMax.x || cameraRelativePosition.y > clipMax.y || cameraRelativePosition.z > clipMax.z) {\n return;\n }\n ")}\n\n ${C(m,"if (rejectBySlice(cameraRelativePosition)) {\n return;\n }")}\n\n vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1);\n\n if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {\n return;\n }\n\n vec3 covarianceA;\n vec3 covarianceB;\n computePackedGaussianCovariance3D(packedGaussian, covarianceA, covarianceB);\n\n float covariance3D[6] = float[6](covarianceA.x, covarianceA.y, covarianceA.z, covarianceB.x, covarianceB.y, covarianceB.z);\n\n vec3 covariance2D = computeGaussianCovariance2D(viewPos.xyz, focalLength, tanFov, covariance3D, view);\n\n // Reject degenerate covariances before inverting them into conic coefficients.\n float determinant = computeGaussianCovarianceDeterminant(covariance2D);\n if (determinant <= 0.) {\n return;\n }\n\n vec2 eigenvalues = computeGaussianCovarianceEigenvalues(covariance2D);\n\n // Fold the per-splat opacity into the log cutoff so the vertex-side ellipse\n // bound matches the fragment alpha discard after fading.\n gaussianLogAlphaCutoff = ${T} - log(vColor.a);\n float gaussianEllipseThreshold = computeGaussianEllipseThreshold(gaussianLogAlphaCutoff);\n vec2 axisLengths = computeGaussianAxisLengths(eigenvalues, gaussianEllipseThreshold);\n float maxRadius = max(axisLengths.x, axisLengths.y);\n\n // Ignore Gaussians with very small contribution, with tolerance based on the quality profile.\n if (rejectGaussianByMinimumRadius(maxRadius, vColor.a, minSplatRadius)) {\n return;\n }\n\n vec4 projPos = proj * viewPos;\n float invW = 1. / (projPos.w + 1e-7);\n vec3 ndcPos = projPos.xyz * invW;\n vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;\n\n // Cull splats whose screen-space ellipse cannot touch the viewport.\n if (rejectGaussianByScreenBounds(ndcPos.xy, maxRadius, clipSpacePixelScale)) {\n return;\n }\n\n offsetFromCenter = computeGaussianQuadOffset(covariance2D, eigenvalues, axisLengths, gl_VertexID);\n\n ${C(G(a),"float viewSpacePixelScale = -viewPos.z / focalLength;\n vec3 fragmentViewOffset = vec3(offsetFromCenter * viewSpacePixelScale, 0.0);\n fragmentPositionCameraRelative = cameraRelativePosition + transpose(mat3(view)) * fragmentViewOffset;")}\n\n // Store conic coefficients with opacity for fragment-side falloff.\n vec3 conic = computeGaussianConic(covariance2D, determinant);\n conicOpacity = vec4(conic, vColor.a);\n\n // Handle environment lighting per vertex when no shadow map is active.\n // When shadows are received, defer lighting to the fragment shader for crisp shadow borders.\n ${C(L,"forwardLinearDepth(-viewPos.z);",$)}\n\n // Place this quad corner in clip space around the projected splat center.\n vec2 quadClipPosition = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;\n\n gl_Position = vec4(quadClipPosition, ndcPos.z, 1.0);\n\n `),D.fragment.include(v),D.fragment.include(g),D.fragment.include(n,a),D.fragment.main.add(`\n ${C(i,"if (fragmentPositionCameraRelative.x < clipMin.x || fragmentPositionCameraRelative.y < clipMin.y || fragmentPositionCameraRelative.z < clipMin.z ||\n fragmentPositionCameraRelative.x > clipMax.x || fragmentPositionCameraRelative.y > clipMax.y || fragmentPositionCameraRelative.z > clipMax.z) {\n discard;\n }")}\n ${C(m,"if (rejectBySlice(fragmentPositionCameraRelative)) { discard; }")}\n\n float gaussianExponent = evaluateGaussianExponent(conicOpacity.xyz, offsetFromCenter);\n\n // A positive exponent indicates alpha > 1, which should not happen.\n // We also early check the opacity-aware alpha cutoff to avoid unnecessary exp().\n if (gaussianExponent > 0.0 || gaussianExponent < gaussianLogAlphaCutoff) {\n discard;\n }\n\n float gaussianFalloff = exp(gaussianExponent);\n\n // Cap at 0.99 to avoid blending issues, such as seams between overlapping Gaussians.\n float alpha = min(.99f, conicOpacity.w * gaussianFalloff);\n\n vec3 shadedColor = vColor.rgb;\n ${C(L,E)}\n fragColor = vec4(shadedColor * alpha, alpha);\n\n // We simulate first hit based depth using 0.25 as the opacity threshold.\n // This works because we render in front-to-back order,\n // i.e. the first hit that counts completely saturates the alpha channel\n // and further splats do not contribute.\n float depthHit = step(0.25, alpha);\n float normalizedDepth = gl_FragCoord.z;\n fragDepthColor = vec4(encodeNormalizedDepthToRGB(normalizedDepth) * depthHit, depthHit);\n `),D}function G(
|
|
14
|
+
`;return D.vertex.main.add(`\n uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));\n uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);\n uint pageNum = fetchGaussianPageIndex(gaussianIndex);\n\n // Unpack color first so very transparent splats can discard before fetching the page header.\n vColor = unpackColor(packedGaussian);\n\n // Apply per-page fading before the early alpha rejection.\n ${C(a.fadingEnabled,"\n uint fadingTextureWidth = uint(textureSize(splatFadingTexture, 0).x);\n uint fadeX = pageNum % fadingTextureWidth;\n uint fadeY = pageNum / fadingTextureWidth;\n uint opacityModifierByte = texelFetch(splatFadingTexture, ivec2(fadeX , fadeY), 0).r;\n float opacityModifier = float(opacityModifierByte) / 255.0;\n vColor.a *= opacityModifier;\n ")}\n\n // Set default position outside clip space for early returns.\n gl_Position = ${l};\n\n if (vColor.a < ${A}) {\n return;\n }\n\n // Delay the page header fetch until the splat survives the opacity reject.\n vec3 cameraRelativePosition = fetchGaussianCameraRelativePosition(gaussianIndex, packedGaussian);\n\n ${C(i,"\n if (cameraRelativePosition.x < clipMin.x || cameraRelativePosition.y < clipMin.y || cameraRelativePosition.z < clipMin.z ||\n cameraRelativePosition.x > clipMax.x || cameraRelativePosition.y > clipMax.y || cameraRelativePosition.z > clipMax.z) {\n return;\n }\n ")}\n\n ${C(m,"if (rejectBySlice(cameraRelativePosition)) {\n return;\n }")}\n\n vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1);\n\n if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {\n return;\n }\n\n vec3 covarianceA;\n vec3 covarianceB;\n computePackedGaussianCovariance3D(packedGaussian, covarianceA, covarianceB);\n\n float covariance3D[6] = float[6](covarianceA.x, covarianceA.y, covarianceA.z, covarianceB.x, covarianceB.y, covarianceB.z);\n\n vec3 covariance2D = computeGaussianCovariance2D(viewPos.xyz, focalLength, tanFov, covariance3D, view);\n\n // Reject degenerate covariances before inverting them into conic coefficients.\n float determinant = computeGaussianCovarianceDeterminant(covariance2D);\n if (determinant <= 0.) {\n return;\n }\n\n vec2 eigenvalues = computeGaussianCovarianceEigenvalues(covariance2D);\n\n // Fold the per-splat opacity into the log cutoff so the vertex-side ellipse\n // bound matches the fragment alpha discard after fading.\n gaussianLogAlphaCutoff = ${T} - log(vColor.a);\n float gaussianEllipseThreshold = computeGaussianEllipseThreshold(gaussianLogAlphaCutoff);\n vec2 axisLengths = computeGaussianAxisLengths(eigenvalues, gaussianEllipseThreshold);\n float maxRadius = max(axisLengths.x, axisLengths.y);\n\n // Ignore Gaussians with very small contribution, with tolerance based on the quality profile.\n if (rejectGaussianByMinimumRadius(maxRadius, vColor.a, minSplatRadius)) {\n return;\n }\n\n vec4 projPos = proj * viewPos;\n float invW = 1. / (projPos.w + 1e-7);\n vec3 ndcPos = projPos.xyz * invW;\n vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;\n\n // Cull splats whose screen-space ellipse cannot touch the viewport.\n if (rejectGaussianByScreenBounds(ndcPos.xy, maxRadius, clipSpacePixelScale)) {\n return;\n }\n\n offsetFromCenter = computeGaussianQuadOffset(covariance2D, eigenvalues, axisLengths, gl_VertexID);\n\n ${C(G(a),"float viewSpacePixelScale = -viewPos.z / focalLength;\n vec3 fragmentViewOffset = vec3(offsetFromCenter * viewSpacePixelScale, 0.0);\n fragmentPositionCameraRelative = cameraRelativePosition + transpose(mat3(view)) * fragmentViewOffset;")}\n\n // Store conic coefficients with opacity for fragment-side falloff.\n vec3 conic = computeGaussianConic(covariance2D, determinant);\n conicOpacity = vec4(conic, vColor.a);\n\n // Handle environment lighting per vertex when no shadow map is active.\n // When shadows are received, defer lighting to the fragment shader for crisp shadow borders.\n ${C(L,"forwardLinearDepth(-viewPos.z);",$)}\n\n // Place this quad corner in clip space around the projected splat center.\n vec2 quadClipPosition = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;\n\n gl_Position = vec4(quadClipPosition, ndcPos.z, 1.0);\n\n `),D.fragment.include(v),D.fragment.include(g),D.fragment.include(n,a),D.fragment.main.add(`\n ${C(i,"if (fragmentPositionCameraRelative.x < clipMin.x || fragmentPositionCameraRelative.y < clipMin.y || fragmentPositionCameraRelative.z < clipMin.z ||\n fragmentPositionCameraRelative.x > clipMax.x || fragmentPositionCameraRelative.y > clipMax.y || fragmentPositionCameraRelative.z > clipMax.z) {\n discard;\n }")}\n ${C(m,"if (rejectBySlice(fragmentPositionCameraRelative)) { discard; }")}\n\n float gaussianExponent = evaluateGaussianExponent(conicOpacity.xyz, offsetFromCenter);\n\n // A positive exponent indicates alpha > 1, which should not happen.\n // We also early check the opacity-aware alpha cutoff to avoid unnecessary exp().\n if (gaussianExponent > 0.0 || gaussianExponent < gaussianLogAlphaCutoff) {\n discard;\n }\n\n float gaussianFalloff = exp(gaussianExponent);\n\n // Cap at 0.99 to avoid blending issues, such as seams between overlapping Gaussians.\n float alpha = min(.99f, conicOpacity.w * gaussianFalloff);\n\n vec3 shadedColor = vColor.rgb;\n ${C(L,E)}\n fragColor = vec4(shadedColor * alpha, alpha);\n\n // We simulate first hit based depth using 0.25 as the opacity threshold.\n // This works because we render in front-to-back order,\n // i.e. the first hit that counts completely saturates the alpha channel\n // and further splats do not contribute.\n float depthHit = step(0.25, alpha);\n float normalizedDepth = gl_FragCoord.z;\n fragDepthColor = vec4(encodeNormalizedDepthToRGB(normalizedDepth) * depthHit, depthHit);\n `),D}function G({clippingEnabled:e,hasSlicePlane:a,receiveShadows:i}){return i||a||e}const z=a(),D=Object.freeze(Object.defineProperty({__proto__:null,GaussianSplatPassParameters:L,build:F},Symbol.toStringTag,{value:"Module"}));export{L as G,D as a,F as b};
|
package/chunks/Path.glsl.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{addNearFar as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{Offset as
|
|
2
|
+
import{addNearFar as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{Offset as o}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as a}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{PathVertexPosition as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{outputDepth as n}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 t}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as s,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 u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRenderingParameters as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDrawFragment as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{ColorConversion as w}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as h,addCameraPosition as f,addViewNormal as y}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as L}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as j,If as P}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{SnowCover as V}from"../views/3d/webgl-engine/effects/snowcover/SnowCover.glsl.js";import{outputColorHighlightOLID as S}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as C}from"../views/webgl/ShaderBuilder.js";function O(O){const A=new C,{vertex:I,fragment:B,varyings:_}=A;h(I,O),_.add("vpos","vec3",{invariant:!0}),A.include(d,O);const{output:D,spherical:M,pbrMode:F,snowCover:k,offsetBackfaces:z}=O,E=11===D;switch((r(D)||E)&&(E?(A.varyings.add("objectAndLayerIdColorVarying","vec4"),A.vertex.code.add(j`void forwardObjectAndLayerIdColor() {
|
|
3
3
|
objectAndLayerIdColorVarying = getOlidColor();
|
|
4
4
|
}`),A.fragment.code.add(j`void outputObjectAndLayerIdColor() {
|
|
5
5
|
fragColor = objectAndLayerIdColorVarying;
|
|
6
|
-
}`)):(A.vertex.code.add(j`void forwardObjectAndLayerIdColor() {}`),A.fragment.code.add(j`void outputObjectAndLayerIdColor() {}`)),A.include(i),A.include(b,O),z&&(
|
|
6
|
+
}`)):(A.vertex.code.add(j`void forwardObjectAndLayerIdColor() {}`),A.fragment.code.add(j`void outputObjectAndLayerIdColor() {}`)),A.include(i),A.include(b,O),z&&(f(I,O),A.include(o)),_.add("vnormal","vec3"),_.add("vcolor","vec4"),I.main.add(j`
|
|
7
7
|
ExtrudedVertex extrudedVertex = evaluateVertex();
|
|
8
8
|
vpos = calculateVPos(extrudedVertex);
|
|
9
9
|
vnormal = normalize(localNormal(extrudedVertex));
|
|
@@ -12,7 +12,7 @@ fragColor = objectAndLayerIdColorVarying;
|
|
|
12
12
|
|
|
13
13
|
forwardObjectAndLayerIdColor();
|
|
14
14
|
vcolor = getColor();
|
|
15
|
-
forwardLinearDepthToReadShadowMap();`)),D){case 0:case 1:case 2:A.include(p,O),B.include(s,O),B.include(t,O),A.include(v,O),B.include(a,O),A.include(S,O),
|
|
15
|
+
forwardLinearDepthToReadShadowMap();`)),D){case 0:case 1:case 2:A.include(p,O),B.include(s,O),B.include(t,O),A.include(v,O),B.include(a,O),A.include(S,O),f(B,O),c(B),m(B),B.uniforms.add(I.uniforms.get("localOrigin"),new x("ambient",e=>e.ambient),new x("diffuse",e=>e.diffuse),new L("opacity",e=>e.opacity)),B.include(w),B.include(V,O),g(B),B.main.add(j`
|
|
16
16
|
discardBySlice(vpos);
|
|
17
17
|
|
|
18
18
|
shadingParams.viewDirection = normalize(vpos - cameraPosition);
|
|
@@ -42,7 +42,7 @@ fragColor = objectAndLayerIdColorVarying;
|
|
|
42
42
|
vpos = calculateVPos(extrudedVertex);
|
|
43
43
|
gl_Position = transformPosition(proj, view, vpos);`),A.fragment.include(a,O),B.main.add(j`discardBySlice(vpos);`);break;case 5:case 6:case 7:case 8:A.include(i),e(A),_.add("depth","float"),I.main.add(j`ExtrudedVertex extrudedVertex = evaluateVertex();
|
|
44
44
|
vpos = calculateVPos(extrudedVertex);
|
|
45
|
-
gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);`),
|
|
45
|
+
gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);`),B.include(a,O),A.include(n,O),B.main.add(j`discardBySlice(vpos);
|
|
46
46
|
outputDepth(depth);`);break;case 11:A.fragment.include(a,O),B.main.add(j`discardBySlice(vpos);
|
|
47
47
|
outputObjectAndLayerIdColor();`);break;case 4:A.include(i),A.include(u,O),y(I),_.add("vnormal","vec3"),I.main.add(j`ExtrudedVertex extrudedVertex = evaluateVertex();
|
|
48
48
|
vpos = calculateVPos(extrudedVertex);
|
package/chunks/Terrain.glsl.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{normalize as r,set as i}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{addLinearDepth as l}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{addNearFar as t}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{SliceDraw as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as s}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{NormalAttribute as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexTangent as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js";import{
|
|
2
|
+
import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{normalize as r,set as i}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{addLinearDepth as l}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{addNearFar as t}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{SliceDraw as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as s}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{NormalAttribute as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexTangent as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js";import{outputDepth as g}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as v}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{EvaluateAmbientOcclusion as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as w,addAmbientBoostFactor as f,addLightingGlobalFactor as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as b,addMainLightIntensity as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{NormalUtils as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{ReadShadowMapDrawFragment as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayTerrain as L}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{OverlayTerrainPassParameters as j,TerrainTexture as x}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js";import{addProjViewLocalOrigin as T,addViewNormal as M,addCameraPosition as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3BindUniform as S}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{glsl as $,If as z}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4DrawUniform as D}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{Texture2DBindUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{alphaCutoff as F}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{outputColorHighlightOLID as _}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as V}from"../views/webgl/ShaderBuilder.js";class N extends j{constructor(){super(...arguments),this.useStencil=!1}}function W(o){const a=new V,{attributes:j,vertex:N,fragment:W,varyings:H}=a;j.add("position","vec3"),a.include(d,o),a.include(c,o);const U=()=>{a.include(C,o),N.code.add($`vec3 getNormal() {
|
|
3
3
|
float z = 1.0 - abs(normalCompressed.x) - abs(normalCompressed.y);
|
|
4
4
|
vec3 n = vec3(normalCompressed + vec2(normalCompressed.x >= 0.0 ? 1.0 : -1.0,
|
|
5
5
|
normalCompressed.y >= 0.0 ? 1.0 : -1.0) * min(z, 0.0), z);
|
|
@@ -61,7 +61,7 @@ return normalize(n);
|
|
|
61
61
|
finalColor = mix(finalColor, vec4(1.0, 0.0, 0.0, 1.0), edgeFactor);`)}
|
|
62
62
|
outputColorHighlightOLID(applySlice(finalColor, vpos), finalColor.rgb);`)}break;case 3:X&&a.include(L,o),N.main.add($`
|
|
63
63
|
${z(X,"setOverlayVTC(uv0);")}
|
|
64
|
-
gl_Position = transformPosition(proj, view, position);`),W.main.add(`${z(X,"if (getCombinedOverlayColor().a < alphaCutoff) discard;")}`);break;case 5:case 6:case 7:case 8:
|
|
64
|
+
gl_Position = transformPosition(proj, view, position);`),W.main.add(`${z(X,"if (getCombinedOverlayColor().a < alphaCutoff) discard;")}`);break;case 5:case 6:case 7:case 8:a.include(g,o),W.main.add("outputDepth(linearDepth);");case 9:l(a),t(a),N.main.add("gl_Position = transformPositionWithDepth(proj, view, position, nearFar, linearDepth);"),W.main.add("");break;case 4:X&&a.include(L,o),H.add("vnormal","vec3"),M(N),U(),N.main.add($`
|
|
65
65
|
${z(X,"setOverlayVTC(uv0);")}
|
|
66
66
|
gl_Position = transformPosition(proj, view, position);
|
|
67
67
|
vnormal = normalize((viewNormal * vec4(getNormal(), 1.0)).xyz);`),W.main.add($`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{cyclical2PI as e}from"../core/Cyclical.js";import{
|
|
2
|
+
import{cyclical2PI as e}from"../core/Cyclical.js";import{lerp as t,deg2rad as r,rad2deg as o,asinClamped as s,clamp as n}from"../core/mathUtils.js";import{fromRotation as i,rotate as a}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{normalize as l,cross as m,dot as u,length as p,scale as f,distance as h,transformMat4 as g,negate as d,lerp as y,sqrDist as M,scaleAndAdd as j}from"../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as b,clone as v,create as x,fromValues as T}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{set as C,squaredLength as w}from"../core/libs/gl-matrix-2/math/vec4.js";import{create as R}from"../core/libs/gl-matrix-2/factories/vec4f64.js";import{getEpsilon as S}from"../core/libs/gl-matrix-2/math/common.js";import{getReferenceEllipsoid as U}from"../geometry/ellipsoidUtils.js";import H from"../geometry/Extent.js";import P from"../geometry/Polygon.js";import A from"../geometry/SpatialReference.js";import{isClockwise as I}from"../geometry/support/coordsUtils.js";import{fromPoints as q,create as E}from"../geometry/support/lineSegment.js";import{gcsCyclical as k}from"../geometry/support/normalizeUtils.js";import{fromPositionAndNormal as F,create as _,isPointInside as z,intersectLineOrRay as G,getNormal as W}from"../geometry/support/plane.js";import{wrap as O}from"../geometry/support/ray.js";import{Sphere as D}from"../geometry/support/sphere.js";import{geographicToWebMercator as L}from"../geometry/support/webMercatorUtils.js";import{Frustum as N}from"../views/3d/state/Frustum.js";import{minNearDistanceInMeters as B}from"../views/3d/state/NearFarHeuristic.js";import{directionToHeadingTilt as J,createDirectionUp as K,clampLineSegmentToPlane as Q}from"../views/3d/support/cameraUtilsInternal.js";import{getLonDeltaForDistance as V}from"../views/3d/support/earthUtils.js";import{slerp as X}from"../views/3d/support/mathUtils.js";const Y=T(0,0,1),Z=l(x(),T(1,1,1)),$=c(),ee=x(),te=x();function re(e,t,o,s=K()){m(ee,e,Y),0===u(ee,ee)&&m(ee,e,Z),i($,-r(t),e),a($,$,-r(o),ee);const{up:n,direction:c}=s;return m(n,ee,e),l(n,n),g(n,n,$),l(c,e),d(c,c),g(c,c,$),s}function oe(e,t,r,o){const s=ee,n=te;return l(s,e),m(te,s,Y),0===u(te,te)&&m(te,s,Z),m(n,te,s),J(t,r,o,s,n)}function se(e,t,o,n){const i={eye:x(),up:null,tilt:n,heading:o},a=ee;a[0]=e[0],a[1]=e[2],a[2]=-e[1];const c=t,l=r(o),m=r(n),u=Math.sin(l),h=Math.cos(l),g=Math.sin(m),d=Math.cos(m),y=p(a);let M;if(Math.abs(m)<1e-8)M=c+y;else{const e=y/g,t=s(c/e),r=Math.PI-m-t;M=e*Math.sin(r)}const j=d*c,b=c*c*(g*g),v=h*h*b,T=M-j,C=T*T,w=v*(v+C-a[1]*a[1]);if(w<0)return f(i.eye,a,M/y),i.tilt=0,ie(i,e);const R=Math.sqrt(w),S=a[1]*T,U=v+C;let H;if(H=h>0?-R+S:R+S,Math.abs(U)<1e-8)return y<1e-8?(i.eye[0]=0,i.eye[1]=0,i.eye[2]=c):f(i.eye,a,M/y),i.tilt=0,ne(i.eye),ie(i,e);i.eye[1]=H/U;const P=u*u*b,A=g*c,I=h*A*i.eye[1],q=i.eye[1]*i.eye[1],E=1-q,k=Math.sqrt(E),F=v*q+P-2*I*k*T+E*C;return Math.abs(F)<1e-8?(f(i.eye,a,M/y),i.tilt=0,ne(i.eye),ie(i,e)):(i.eye[0]=(E*(M*a[0]-j*a[0])-A*k*(a[0]*i.eye[1]*h+a[2]*u))/F,i.eye[2]=(E*(M*a[2]-j*a[2])-A*k*(a[2]*i.eye[1]*h-a[0]*u))/F,f(i.eye,i.eye,M),ne(i.eye),ie(i,e))}function ne(e){const t=e[1];e[1]=-e[2],e[2]=t}function ie(e,t){const r=re(t,e.heading,e.tilt);return e.up=r.up,e}function ae(e,t,r){const n=p(t),i=Math.sqrt(r*r+n*n-2*r*n*Math.cos(Math.PI-e)),a=s(r/(i/Math.sin(e)));return o(e-a)}function ce(e,t,o){const n=r(e),i=p(t);return s(o/(i/Math.sin(n)))+n}function le(t,s,n,i,a){let c,l,m,u;const p=s.latitude,f=U(t.spatialReference).radius,h=s.longitude,g=V(p,n,f)/2;c=h-g,l=h+g;const d=r(p),y=(1+Math.sin(d))/(1-Math.sin(d)),M=(y+1)*Math.tan(i/f/2),j=M*M;function b(t){const r=Math.PI/2;return(t=e.normalize(t,-r))>r&&(t=Math.PI-t),t}if(m=1.5*Math.PI-2*Math.atan(.5*(M+Math.sqrt(4*y+j))),u=m+i/f,m=b(m),u=b(u),u<m){const e=u;u=m,m=e}if(m=Math.max(o(m),-90),u=Math.min(o(u),90),l=k.monotonic(c,l),l-c>180){const e=(l-c-180)/2;c+=e,l-=e}const v=t.spatialReference&&t.spatialReference.isGeographic?t.spatialReference:A.WGS84;return a?(a.xmin=c,a.ymin=m,a.xmax=l,a.ymax=u,a.spatialReference=v):a=new H(c,m,l,u,v),t.spatialReference&&t.spatialReference.isWebMercator&&L(a,!1,a),a}function me(e,r){const{renderCoordsHelper:o}=e,s=e.state.camera.clone(),n=new N(o);s.near=B,n.update(s);const i=o.getAltitude(r),a=e.spatialReference,c=s.eye,l=ge(e),m=ue(e,r),u=s.aboveGround,p=n.planes[5],f=[],h=F(b,ye,_()),g=F(b,Me,_());C(Ce,0,0,0,0);const d=e=>{};for(let b=0;b<4;b++){const e=1===b&&!u||3===b&&u?1-l:0,r=1===b&&u||3===b&&!u?l:1,s=n.lines[b],a=n.lines[3===b?0:b+1];for(let n=0;n<m;n++){const l=n/m,u=0===n?0:t(e,r,1===b?1-(1-l)**2:3===b?l**2:l),j=y(be,s.origin,a.origin,u),x=X(s.direction,a.direction,u,je);o.intersectManifoldClosestSilhouette(O(j,x),i,ve),Q(ve,c,ve,p),f.push(v(ve)),0!==f.length&&d(M(f.at(-1),ve));const T=(z(h,ve)?1:0)|(z(g,ve)?2:0);Ce[T]=1}}f.length>2&&d(M(f[0],f.at(-1)));const j=pe(w(Ce)>1?fe(he(f,h),g):[f],o,a);return new P({rings:j,spatialReference:a})}function ue(e,r){const{renderCoordsHelper:o,state:s}=e;if(1!==s.viewingMode)return 1;const i=o.getAltitude(r),a=o.referenceEllipsoid.radius,c=1+h(s.camera.eye,r)/(a+i),l=Math.sqrt(c*c-1),{minCurvature:m,maxCurvature:u,minSamples:p,maxSamples:f}=de,g=n((l-m)/(u-m),0,1);return Math.round(t(p,f,g))}function pe(e,t,r){const o=2*S();return e.map(e=>{const s=[];let n=!1;for(const i of e)t.fromRenderCoords(i,ve,r),Math.abs(i[0])<o&&Math.abs(i[1])<o?(s.push([null,ve[1]]),s.push([null,ve[1]]),n=!0):s.push([ve[0],ve[1]]);if(n)for(let t=0;t<s.length;t++){const e=s[t];if(null!=e[0])continue;const r=s[t+1],o=s.at(0===t?-1:t-1);e[0]=o[0],t++;const n=s.at(t===s.length-1?0:t+1);r[0]=n[0]}return s.push(s[0]),I(s)||s.reverse(),s})}function fe(e,t){const r=[];for(const o of e)r.push(...he(o,t));return r}function he(e,t){const r=[],o=[],s=S();for(let i=0;i<e.length;i++){const n=e[i],a=i===e.length-1?e[0]:e[i+1],c=q(n,a,Te),l=G(t,c.origin,c.vector,0,ve);switch(l){case 2:r.push(n);break;case 3:o.push(n);break;case 0:case 1:{const[e,i,a]=0===l?[1,r,o]:[-1,o,r],c=W(t),m=j(x(),ve,c,e*s),u=j(x(),ve,c,e*-s);i.push(n),i.push(m),a.push(u)}}}const n=[];return r.length&&n.push(r),o.length&&n.push(o),n}function ge(e){const{renderCoordsHelper:t,state:r}=e,o=Math.abs(t.getAltitude(r.camera.center));return xe.radius=t.referenceEllipsoid.radius+o,r.camera.sphereFrustumCoverage(xe,t)}const de={minCurvature:r(5),maxCurvature:r(50),minSamples:1,maxSamples:6},ye=T(1,0,0),Me=T(0,1,0),je=x(),be=x(),ve=x(),xe=new D,Te=E(),Ce=R(),we=Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:oe,eyeForCenterWithHeadingTilt:se,eyeTiltToLookAtTilt:ce,getCurvatureSamples:ue,headingTiltToDirectionUp:re,lookAtTiltToEyeTilt:ae,toArea:me,toExtent:le},Symbol.toStringTag,{value:"Module"}));export{ce as a,le as b,we as c,oe as d,se as e,ue as g,re as h,ae as l,me as t};
|
package/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.
|
|
2
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.43";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{getMetersPerVerticalUnitForSR as
|
|
2
|
+
import{getMetersPerVerticalUnitForSR as n,getMetersPerUnitForSR as r}from"../../core/units.js";function t(t){if(t.vcsWkid||t.latestVcsWkid){return n(t)/r(t)}return 1}function u(n,r,t,u){if(null==n||null==r)return null;return n+(r-n)/t*u}export{t as getHeightUnitCorrectionFactor,u as interpolateM};
|
package/geohash/geohashUtils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../core/has.js";import{rad2deg as t}from"../core/mathUtils.js";import{set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import n from"../geometry/Polygon.js";import e from"../geometry/SpatialReference.js";import{toExtent as s}from"../geometry/support/aaBoundingRect.js";import{earth as
|
|
2
|
+
import"../core/has.js";import{rad2deg as t}from"../core/mathUtils.js";import{set as o}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import n from"../geometry/Polygon.js";import e from"../geometry/SpatialReference.js";import{toExtent as s}from"../geometry/support/aaBoundingRect.js";import{earth as i}from"../geometry/support/Ellipsoid.js";import{convertFromPolygon as c}from"../layers/graphics/featureConversionUtils.js";import{project as f}from"../layers/graphics/data/projectionSupport.js";const a=16,l=8,u=4,h=2,m=1,p=r(),g=r(),x="0123456789bcdefghjkmnpqrstuvwxyz",d=64;function y(t,o,r,i){const a=[t.xmin,t.ymin,t.xmax,t.ymax],l=n.fromExtent(s(a,i)),u=f(l,i,e.WGS84,{extendedParams:{densificationStep:o*d}});if(!u)return null;const h=c(u,!1,!1),m=h.coords.filter((t,o)=>!(o%2)),p=h.coords.filter((t,o)=>o%2),g=Math.min(...m),x=Math.min(...p),y=Math.max(...m),j=Math.max(...p),S=M(g,x,r,e.WGS84),b=M(y,j,r,e.WGS84);return S&&b?{bounds:a,geohashBounds:{xLL:S[0],yLL:S[1],xTR:b[0],yTR:b[1]},level:r}:null}function M(o,r,n,s){if(s.isWebMercator){const e=t(o/i.radius),s=e-360*Math.floor((e+180)/360),c=[0,0];return C(c,0,t(Math.PI/2-2*Math.atan(Math.exp(-r/i.radius))),s,n),c}const c=f({x:o,y:r},s,e.WGS84);if(!c)return null;const a=[0,0];return C(a,0,c.y,c.x,n),a}function j(t){return t<=57?t-48:t<=104?t-88:t<=107?t-89:t<=110?t-90:t-91}function S(t){return x[t]}function b(t){return(t[0]+t[1])/2}function v(t,o){const r=b(t),n=o,e=!o;t[0]=e*t[0]+n*r,t[1]=e*r+n*t[1]}function W(t,o){const r=o>b(t);return v(t,r),r}function G(t,o){let r=0,n=0,e=30,s=30;for(let i=0;i<o.length;i++){const t=j(o.charCodeAt(i)),c=i%2==0;e-=c?3:2,s-=c?2:3,r|=Y(t,c)<<e,n|=A(t,c)<<s}return{geohashX:r,geohashY:n}}function L(t,o){let r=-90,n=90,e=-180,s=180;for(let i=0;i<o;i++){const o=Math.ceil((i+1)/2),c=Math.floor((i+1)/2),f=1-i%2,a=30-(3*o+2*c),l=30-(2*o+3*c),u=3*f+2*(1-f),h=2*f+3*(1-f),m=3*f+7*(1-f)<<l,p=(7*f+3*(1-f)<<a&t.geohashX)>>a,g=(m&t.geohashY)>>l;for(let t=u-1;t>=0;t--){const o=(e+s)/2,r=p&1<<t?1:0;e=(1-r)*e+r*o,s=(1-r)*o+r*s}for(let t=h-1;t>=0;t--){const o=(r+n)/2,e=g&1<<t?1:0;r=(1-e)*r+e*o,n=(1-e)*o+e*n}}return[e,r,s,n]}function R(t,o,r,n){n%2&&(n+=1);let e=0,s=0,i=-90,c=90,f=-180,a=180;for(let l=0;l<n/2;l++){for(let t=0;t<5;t++){const o=(f+a)/2,n=r>o?1:0;e|=n<<29-(t+5*l),f=(1-n)*f+n*o,a=(1-n)*o+n*a}for(let t=0;t<5;t++){const r=(i+c)/2,n=o>r?1:0;s|=n<<29-(t+5*l),i=(1-n)*i+n*r,c=(1-n)*r+n*c}}t.geohashX=e,t.geohashY=s}function C(t,o,r,n,e){e%2&&(e+=1);let s=0,i=0,c=-90,f=90,a=-180,l=180;for(let u=0;u<e/2;u++){for(let t=0;t<5;t++){const o=(a+l)/2,r=n>o?1:0;s|=r<<29-(t+5*u),a=(1-r)*a+r*o,l=(1-r)*o+r*l}for(let t=0;t<5;t++){const o=(c+f)/2,n=r>o?1:0;i|=n<<29-(t+5*u),c=(1-n)*c+n*o,f=(1-n)*o+n*f}}t[2*o]=s,t[2*o+1]=i}function P(t,r,n){let e="";const s=o(p,-90,90),i=o(g,-180,180);for(let o=0;o<n;o++){let n=0;!(o%2)?(n|=W(i,r)<<4,n|=W(s,t)<<3,n|=W(i,r)<<2,n|=W(s,t)<<1,n|=W(i,r)|0):(n|=W(s,t)<<4,n|=W(i,r)<<3,n|=W(s,t)<<2,n|=W(i,r)<<1,n|=W(s,t)|0),e+=S(n)}return e}function X(t,o,r){return r?t&m|(o&m)<<1|(t&h)<<1|(o&h)<<2|(t&u)<<2:o&m|(t&m)<<1|(o&h)<<1|(t&h)<<2|(o&u)<<2}function Y(t,o){return o?m&t|(u&t)>>1|(a&t)>>2:(h&t)>>1|(l&t)>>2}function A(t,o){return o?(h&t)>>1|(l&t)>>2:m&t|(u&t)>>1|(a&t)>>2}function B(t,o,r){const n=!((t.length-1)%2),e=t.slice(0,-1),s=j(t.charCodeAt(t.length-1));let i=0,c=0,f=0,p=0;n?(i=8,c=4,f=m&s|(u&s)>>1|(a&s)>>2,p=(h&s)>>1|(l&s)>>2):(i=4,c=8,p=m&s|(u&s)>>1|(a&s)>>2,f=(h&s)>>1|(l&s)>>2);const g=f+o,x=p+r,d=Math.floor(g/i),y=Math.floor(x/c),M=S(X(g-d*i,x-y*c,n));return t.length>1&&(d||y)?B(e,d,y)+M:e+M}export{G as convertGeohash32ToXY,j as decodeBase32Char,L as decodeGeohashXY,S as encodeBase32Char,P as encodeGeohash,M as getGeohash,y as getGeohashBounds,B as getRelativeGeohash,C as setGeohashBuf,R as setGeohashXY,Y as unpackXBits,A as unpackYBits};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{clamp as n,floatEqualUlp as t}from"../../core/mathUtils.js";import r from"../Extent.js";function i(n){return n}function u(n
|
|
2
|
+
import{clamp as n,floatEqualUlp as t}from"../../core/mathUtils.js";import r from"../Extent.js";function i(n){return n}function u(n=$){return i([n[0],n[1],n[2],n[3]])}function a(n){return i([n[0],n[1],n[2],n[3]])}function e(n,t){return n!==t&&(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3]),n}function o(n,t,r,i,a=u()){return a[0]=n,a[1]=t,a[2]=r,a[3]=i,a}function c(n,t=u()){return t[0]=n.xmin,t[1]=n.ymin,t[2]=n.xmax,t[3]=n.ymax,t}function f(n,t,i=new r){return i.xmin=n[0],i.ymin=n[1],i.xmax=n[2],i.ymax=n[3],i.spatialReference=t,i}function m(n,t){t[0]<n[0]&&(n[0]=t[0]),t[0]>n[2]&&(n[2]=t[0]),t[1]<n[1]&&(n[1]=t[1]),t[1]>n[3]&&(n[3]=t[1])}function h(n,t){t<n[0]&&(n[0]=t),t>n[2]&&(n[2]=t)}function M(n,t){t<n[1]&&(n[1]=t),t>n[3]&&(n[3]=t)}function x(n,{xmin:t,ymin:r,xmax:i,ymax:u}){n[0]=Math.min(n[0],t),n[1]=Math.min(n[1],r),n[2]=Math.max(n[2],i),n[3]=Math.max(n[3],u)}function l(n,t,r){if(null!=t)if("length"in t)P(t)?(r[0]=Math.min(n[0],t[0]),r[1]=Math.min(n[1],t[1]),r[2]=Math.max(n[2],t[2]),r[3]=Math.max(n[3],t[3])):2!==t.length&&3!==t.length||(r[0]=Math.min(n[0],t[0]),r[1]=Math.min(n[1],t[1]),r[2]=Math.max(n[2],t[0]),r[3]=Math.max(n[3],t[1]));else switch(t.type){case"extent":r[0]=Math.min(n[0],t.xmin),r[1]=Math.min(n[1],t.ymin),r[2]=Math.max(n[2],t.xmax),r[3]=Math.max(n[3],t.ymax);break;case"point":r[0]=Math.min(n[0],t.x),r[1]=Math.min(n[1],t.y),r[2]=Math.max(n[2],t.x),r[3]=Math.max(n[3],t.y)}else e(r,n)}function s(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.max(n[2],t[2]),n[3]=Math.max(n[3],t[3])}function y(n,t,r=n){const i=t.length;let u=n[0],a=n[1],e=n[2],o=n[3];for(let c=0;c<i;c++){const n=t[c];u=Math.min(u,n[0]),a=Math.min(a,n[1]),e=Math.max(e,n[0]),o=Math.max(o,n[1])}return r[0]=u,r[1]=a,r[2]=e,r[3]=o,r}function g(n){for(let t=0;t<4;t++)if(!isFinite(n[t]))return!1;return!0}function p(n){return null==n||n[0]>=n[2]?0:n[2]-n[0]}function b(n){return null==n||n[1]>=n[3]?0:n[3]-n[1]}function F(n){return p(n)*b(n)}function j(n){return p(n)>0&&b(n)>0}function q(n,t=[0,0]){return t[0]=(n[0]+n[2])/2,t[1]=(n[1]+n[3])/2,t}function w(n){const t=p(n),r=b(n);return Math.sqrt(t*t+r*r)}function d(n,t){return R(n,t[0],t[1])}function k(n,t){const r=t.radius,i=.5*(n[0]+n[2]),u=Math.abs(t.center[0]-i),a=.5*(n[2]-n[0]);if(u>r+a)return!1;const e=.5*(n[1]+n[3]),o=.5*(n[3]-n[1]),c=Math.abs(t.center[1]-e);if(c>r+o)return!1;if(u<a||c<o)return!0;const f=u-a,m=c-o;return f*f+m*m<=r*r}function v(n,t,r){const i=n[0],u=n[1],a=n[2],e=n[3],{x:o,y:c}=t,{x:f,y:m}=r,h=(n,t)=>(m-c)*n+(o-f)*t+(f*c-o*m)<0,M=h(i,e),x=h(a,e),l=h(a,u),s=h(i,u);return!(M===x&&x===l&&l===s&&s===M||o<i&&f<i||o>a&&f>a||c>e&&m>e||c<u&&m<u)}function E(n,t){return!!n&&R(n,t.x,t.y)}function R(n,t,r){return t>=n[0]&&r>=n[1]&&t<=n[2]&&r<=n[3]}function U(n,t,r,i){return t>=n[0]-i&&r>=n[1]-i&&t<=n[2]+i&&r<=n[3]+i}function z(n,t,r){return t[0]>=n[0]-r&&t[1]>=n[1]-r&&t[0]<=n[2]+r&&t[1]<=n[3]+r}function A(n,t){return Math.max(t[0],n[0])<=Math.min(t[2],n[2])&&Math.max(t[1],n[1])<=Math.min(t[3],n[3])}function B(n,t,r){return Math.max(t[0],n[0])-r<=Math.min(t[2],n[2])&&Math.max(t[1],n[1])-r<=Math.min(t[3],n[3])}function C(n,t){return t[0]>=n[0]&&t[2]<=n[2]&&t[1]>=n[1]&&t[3]<=n[3]}function D(n,t,r){return null==t?e(r,n):(r[0]=Math.min(n[0],t[0]),r[1]=Math.min(n[1],t[1]),r[2]=Math.max(n[2],t[2]),r[3]=Math.max(n[3],t[3]),r)}function G(t,r,i){if(null==r)return e(i,t);const u=r[0],a=r[1],o=r[2],c=r[3];return i[0]=n(t[0],u,o),i[1]=n(t[1],a,c),i[2]=n(t[2],u,o),i[3]=n(t[3],a,c),i}function H(n,t){const r=(n[0]+n[2])/2,i=(n[1]+n[3])/2,u=Math.max(Math.abs(t[0]-r)-p(n)/2,0),a=Math.max(Math.abs(t[1]-i)-b(n)/2,0);return Math.sqrt(u*u+a*a)}function I(n,t){t[0]=n[2]-n[0],t[1]=n[3]-n[1]}function J(n,t,r,i){return i??=n,i[0]=n[0]+t,i[1]=n[1]+r,i[2]=n[2]+t,i[3]=n[3]+r,i}function K(n,t,r=n){return r[0]=n[0]-t,r[1]=n[1]-t,r[2]=n[2]+t,r[3]=n[3]+t,r}function L(n,t,r=n){return r[0]=t[0],r[1]=t[1],r!==n&&(r[2]=n[2],r[3]=n[3]),r}function N(n,t,r=n){return r[2]=t[0],r[3]=t[1],r!==n&&(r[0]=n[0],r[1]=n[1]),n}function O(n){return n?e(n,Z):u(Z)}function P(n){return null!=n&&4===n.length}function Q(n){return!(0!==p(n)&&isFinite(n[0])||0!==b(n)&&isFinite(n[1]))}function S(n,t){return P(n)&&P(t)?n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]&&n[3]===t[3]:n===t}function T(n,r,i){return null!=n&&null!=r&&n.every((n,u)=>t(n,r[u],i))}function V(n,t,r){return null!=t&&(r?r.contains(n[0],n[2],t[0])&&r.contains(n[0],n[2],t[2])&&t[1]>n[1]&&t[3]<n[3]:C(n,t))}function W(n,t,r){return null!=n&&(r?(r.contains(t[0],t[2],n[0])||r.contains(t[0],t[2],n[2])||r.contains(n[0],n[2],t[0]))&&!(n[1]>t[3]||n[3]<t[1]):A(n,t))}function X(n,t){if(4!==t.length||n[0]===n[2]||n[1]===n[3])return!1;for(let r=0;r<t.length;r++){const i=t[r],u=t[(r+1)%t.length];if(!!(i[0]!==n[0]&&i[0]!==n[2]||i[1]!==n[1]&&i[1]!==n[3]))return!1;const a=i[1]===u[1]&&i[0]!==u[0],e=i[0]===u[0]&&i[1]!==u[1];if(!a&&!e)return!1}return!0}const Y=i([-1/0,-1/0,1/0,1/0]),Z=i([1/0,1/0,-1/0,-1/0]),$=i([0,0,0,0]),_=i([0,0,1,1]);export{g as allFinite,T as almostEquals,F as area,q as center,a as clone,C as contains,d as containsPoint,E as containsPointObject,z as containsPointWithMargin,R as containsXY,U as containsXYWithMargin,e as copy,u as create,w as diagonal,H as distance,O as empty,S as equals,X as equalsPoints,l as expand,x as expandExtentInPlace,m as expandPointInPlace,y as expandWithNestedArray,s as expandWithRect,h as expandXInPlace,M as expandYInPlace,c as fromExtent,o as fromValues,j as hasArea,b as height,G as intersection,A as intersects,v as intersectsSegment,k as intersectsSphere,B as intersectsWithMargin,P as is,Q as isPoint,Z as negativeInfinity,J as offset,K as pad,Y as positiveInfinity,V as rectangleContainsRectangleCyclicalAware,W as rectanglesIntersectCyclicalAware,N as setMax,L as setMin,I as size,f as toExtent,D as union,_ as unit,p as width,$ as zero};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{isPoint as n,isPolyline as t,isPolygon as e,isMultipoint as r,isExtent as
|
|
2
|
+
import{isPoint as n,isPolyline as t,isPolygon as e,isMultipoint as r,isExtent as s}from"./jsonTypeUtils.js";function o(n){if(!n)return null;return{originPosition:"upper-left"===n.originPosition?"upperLeft":"lower-left"===n.originPosition?"lowerLeft":n.originPosition,scale:n.tolerance?[n.tolerance,n.tolerance,1,1]:[1,1,1,1],translate:null!=n.extent?[n.extent.xmin,n.extent.ymax,n.extent.zmin??0,n.extent.mmin??0]:[0,0,0,0]}}function l(n){return"lowerLeft"===n.originPosition&&4===n.scale.length&&4===n.translate.length}function u(n){if(l(n))return n;const{originPosition:t,scale:e,translate:r}=n,s=e[0]??1,o=e[1]??1;return{originPosition:"lowerLeft",scale:[s,"lowerLeft"===t?o:-o,e[2]??1,e[3]??1],translate:[r[0]??0,r[1]??0,r[2]??0,r[3]??0]}}function i({scale:n,translate:t},e){return Math.round((e-t[0])/n[0])}function a({scale:n,translate:t},e){return Math.round((e-t[1])/n[1])}function c({scale:n,translate:t},e){return Math.round(((e??0)-t[2])/n[2])}function h({scale:n,translate:t},e){return e?Math.round((e-t[3])/n[3]):0}function f(n,t){return n&&t?x:n&&!t?m:!n&&t?p:g}const g=(n,t)=>{const e=[];if(!t.length)return null;const r=t[0];let s=i(n,r[0]),o=a(n,r[1]);e.push([s,o]);for(let l=1;l<t.length;l++){const[r,u]=t[l],c=i(n,r),h=a(n,u);c===s&&h===o||e.push([c-s,h-o]),s=c,o=h}return e},m=(n,t)=>{const e=[];if(!t.length)return null;const r=t[0];let s=i(n,r[0]),o=a(n,r[1]),l=c(n,r[2]);e.push([s,o,l]);for(let u=1;u<t.length;u++){const[r,h,f]=t[u],g=i(n,r),m=a(n,h),p=c(n,f);g===s&&m===o&&p===l||e.push([g-s,m-o,p]),s=g,o=m,l=p}return e},p=(n,t)=>{const e=[];if(!t.length)return null;const r=t[0];let s=i(n,r[0]),o=a(n,r[1]),l=h(n,r[2]);e.push([s,o,l]);for(let u=1;u<t.length;u++){const[r,c,f]=t[u],g=i(n,r),m=a(n,c),p=h(n,f);g===s&&m===o&&p===l||e.push([g-s,m-o,p]),s=g,o=m,l=p}return e},x=(n,t)=>{const e=[];if(!t.length)return null;const r=t[0];let s=i(n,r[0]),o=a(n,r[1]),l=c(n,r[2]),u=h(n,r[3]);e.push([s,o,l,u]);for(let f=1;f<t.length;f++){const[r,g,m,p]=t[f],x=i(n,r),M=a(n,g),Z=c(n,m),y=h(n,p);x===s&&M===o&&Z===l&&y===u||e.push([x-s,M-o,Z,y]),s=x,o=M,l=Z,u=y}return e};function M(n,t,e,r){const s=[],o=f(e,r);for(let l=0;l<t.length;l++){const e=o(n,t[l]);e&&e.length>=3&&s.push(e)}return s.length?s:null}function Z(n,t,e,r){const s=[],o=f(e,r);for(let l=0;l<t.length;l++){const e=o(n,t[l]);e&&e.length>=2&&s.push(e)}return s.length?s:null}function y({scale:n,translate:t},e){return e*n[0]+t[0]}function w({scale:n,translate:t},e){return e*n[1]+t[1]}function z({scale:n,translate:t},e){return(e??0)*n[2]+t[2]}function P({scale:n,translate:t},e){return e?e*n[3]+t[3]:0}function L(n,t){return n&&t?T:n&&!t?d:!n&&t?j:A}const A=(n,t)=>{const e=new Array(t.length);if(!t.length)return e;const r=t[0];let s=y(n,r[0]),o=w(n,r[1]);e[0]=[s,o];const{scale:l,originPosition:u}=n,i=l[0],a="lowerLeft"===u?l[1]:-l[1];for(let c=1;c<t.length;c++){const[n,r]=t[c];s+=i*n,o+=a*r,e[c]=[s,o]}return e},d=(n,t)=>{const e=new Array(t.length);if(!t.length)return e;const r=t[0];let s=y(n,r[0]),o=w(n,r[1]);e[0]=[s,o,z(n,r[2])];const{scale:l,originPosition:u}=n,i=l[0],a="lowerLeft"===u?l[1]:-l[1];for(let c=1;c<t.length;c++){const[r,l,u]=t[c];s+=i*r,o+=a*l,e[c]=[s,o,z(n,u)]}return e},j=(n,t)=>{const e=new Array(t.length);if(!t.length)return e;const r=t[0];let s=y(n,r[0]),o=w(n,r[1]);e[0]=[s,o,P(n,r[2])];const{scale:l,originPosition:u}=n,i=l[0],a="lowerLeft"===u?l[1]:-l[1];for(let c=1;c<t.length;c++){const[r,l,u]=t[c];s+=i*r,o+=a*l,e[c]=[s,o,P(n,u)]}return e},T=(n,t)=>{const e=new Array(t.length);if(!t.length)return e;const r=t[0];let s=y(n,r[0]),o=w(n,r[1]);e[0]=[s,o,z(n,r[2]),P(n,r[3])];const{scale:l,originPosition:u}=n,i=l[0],a="lowerLeft"===u?l[1]:-l[1];for(let c=1;c<t.length;c++){const[r,l,u,h]=t[c];s+=i*r,o+=a*l,e[c]=[s,o,z(n,u),P(n,h)]}return e};function U(n,t,e){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=t(n,e[s]);return r}function b(n,t,e){const r=u(n);return t.xmin=i(r,e.xmin),t.ymin=a(r,e.ymin),t.xmax=i(r,e.xmax),t.ymax=a(r,e.ymax),e.hasZ&&(t.zmin=c(r,e.zmin),t.zmax=c(r,e.zmax)),e.hasM&&(t.mmin=h(r,e.mmin),t.mmax=h(r,e.mmax)),t.hasZ=e.hasZ??!1,t.hasM=e.hasM??!1,t}function k(n,t,e){const r=u(n);return t.points=f(e.hasZ,e.hasM)(r,e.points)??[],t.hasZ=e.hasZ??!1,t.hasM=e.hasM??!1,t}function q(n,t,e){const r=u(n);return t.x=i(r,e.x),t.y=a(r,e.y),null!=e.z&&(t.z=c(r,e.z)),null!=e.m&&(t.m=h(r,e.m)),t}function v(n,t,e){const r=M(u(n),e.rings,e.hasZ,e.hasM);return r?(t.rings=r,t.hasZ=e.hasZ??!1,t.hasM=e.hasM??!1,t):null}function B(n,t,e){const r=Z(u(n),e.paths,e.hasZ,e.hasM);return r?(t.paths=r,t.hasZ=e.hasZ??!1,t.hasM=e.hasM??!1,t):null}function C(o,l){return o&&l?n(l)?q(o,{},l):t(l)?B(o,{},l):e(l)?v(o,{},l):r(l)?k(o,{},l):s(l)?b(o,{},l):null:null}function D(n,t,e,r=e?.hasZ??!1,s=e?.hasM??!1){if(null!=e){const o=u(n);t.points=L(r,s)(o,e.points),t.hasZ=r,t.hasM=s}return t}function E(n,t,e,r=null!=e?.z,s=null!=e?.m){if(null==e)return t;const o=u(n);return t.x=y(o,e.x),t.y=w(o,e.y),r&&(t.z=z(o,e.z)),s&&(t.m=P(o,e.m)),t}function F(n,t,e,r=e?.hasZ??!1,s=e?.hasM??!1){if(null!=e){const o=u(n);t.rings=U(o,L(r,s),e.rings),t.hasZ=r,t.hasM=s}return t}function G(n,t,e,r=e?.hasZ??!1,s=e?.hasM??!1){if(null!=e){const o=u(n);t.paths=U(o,L(r,s),e.paths),t.hasZ=r,t.hasM=s}return t}export{u as normalizeTransform,g as quantizeCoordsArrayXY,p as quantizeCoordsArrayXYM,m as quantizeCoordsArrayXYZ,x as quantizeCoordsArrayXYZM,b as quantizeExtent,C as quantizeGeometry,h as quantizeM,k as quantizeMultipoint,q as quantizePoint,v as quantizePolygon,B as quantizePolyline,i as quantizeX,a as quantizeY,c as quantizeZ,o as toQuantizationTransform,U as unquantizeCoordsArrayArray,A as unquantizeCoordsArrayXY,j as unquantizeCoordsArrayXYM,d as unquantizeCoordsArrayXYZ,T as unquantizeCoordsArrayXYZM,P as unquantizeM,D as unquantizeMultipoint,E as unquantizePoint,F as unquantizePolygon,G as unquantizePolyline,y as unquantizeX,w as unquantizeY,z as unquantizeZ};
|
package/intl/date.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{strict as t}from"../core/jsonMap.js";import{beforeLocaleChange as
|
|
2
|
+
import{strict as t}from"../core/jsonMap.js";import{beforeLocaleChange as o,getLocaleLanguage as e,normalizeLocale as r}from"./locale.js";import{unknown as n,utc as a,system as m,systemTimeZone as h}from"../time/constants.js";import{DateTime as i}from"luxon";const s={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},y={timeZone:a},d={year:"numeric",month:"numeric",day:"numeric"},g={year:"numeric",month:"long",day:"numeric"},u={year:"numeric",month:"short",day:"numeric"},c={year:"numeric",month:"long",weekday:"long",day:"numeric"},D={hour:"numeric",minute:"numeric"},S={...D,second:"numeric"},T={hourCycle:"h23"},f={...D,...T},L={...S,...T},M={"short-date":d,"short-date-short-time":{...d,...D},"short-date-short-time-24":{...d,...f},"short-date-long-time":{...d,...S},"short-date-long-time-24":{...d,...L},"short-date-le":d,"short-date-le-short-time":{...d,...D},"short-date-le-short-time-24":{...d,...f},"short-date-le-long-time":{...d,...S},"short-date-le-long-time-24":{...d,...L},"long-month-day-year":g,"long-month-day-year-short-time":{...g,...D},"long-month-day-year-short-time-24":{...g,...f},"long-month-day-year-long-time":{...g,...S},"long-month-day-year-long-time-24":{...g,...L},"day-short-month-year":u,"day-short-month-year-short-time":{...u,...D},"day-short-month-year-short-time-24":{...u,...f},"day-short-month-year-long-time":{...u,...S},"day-short-month-year-long-time-24":{...u,...L},"long-date":c,"long-date-short-time":{...c,...D},"long-date-short-time-24":{...c,...f},"long-date-long-time":{...c,...S},"long-date-long-time-24":{...c,...L},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":D,"long-time":S},v=t()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),w={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"},Y=new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)),p=Y.find(({type:t})=>"month"===t)?.value.toLowerCase();function Z(){const t=e();return(t&&w[t])??r()}"mart"!==p&&(w.bs="sr-Latn-CS");let E=new WeakMap;const j=M["short-date-short-time"],k=M["short-date"];function C(t){let o=E.get(t);if(!o){const e=Z(),r=J(t.timeZone??m),n={...t,timeZone:r};o=new Intl.DateTimeFormat(e,n),E.set(t,o)}return o}function I(t){return M[t]}function b(t){const{dateStyle:o,timeStyle:e,hour12:r,year:n,month:a}=t,m={};return o?m.dateStyle=o:n&&(m.year=n,m.month=a||void 0),e&&!m.year&&(m.timeStyle=e,m.hour12="auto"===r?void 0:"always"===r),m}function x(t,o=j){return C(o).format(t)}function F(t,o=j){return x(new Date(t),{...o,...y,...l})}function N(t,o=j){return x(new Date(`1970-01-01T${t}Z`),{...o,...y,...s})}function W(t,o=j){const e=i.fromISO(t,{setZone:!0});if(!e.isValid)return t;if(o.timeZone)return x(e.toJSDate(),o);const r=0===e.offset?a:o.timeZone,n={...o,timeZone:r};return e.toLocaleString(n,{locale:Z()})}function J(t){switch(t){case m:return h;case n:return a;default:return t}}o(()=>{E=new WeakMap});export{I as convertDateFormatToIntlOptions,b as convertDateTimeFieldFormatToIntlOptions,v as dateFormatJSONMap,j as defaultFormatterOptions,k as defaultFormatterOptionsNoTime,x as formatDate,F as formatDateOnly,N as formatTimeOnly,W as formatTimestamp,C as getDateTimeFormatter,J as resolveTimeZone};
|
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.
|
|
2
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.43",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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../request.js";import{ClonableMixin as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import{ClonableMixin as i}from"../core/Clonable.js";import r from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a}from"../core/promiseUtils.js";import{on as n,sync as l}from"../core/reactiveUtils.js";import{property as p,subclass as m}from"../core/accessorSupport/decorators.js";import{persistable as c}from"../core/accessorSupport/decorators/persistable.js";import u from"../geometry/Extent.js";import d from"../geometry/SpatialReference.js";import h from"./Layer.js";import{APIKeyMixin as f}from"./mixins/APIKeyMixin.js";import{ArcGISService as y}from"./mixins/ArcGISService.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as S}from"./mixins/OperationalLayer.js";import{PortalLayer as _}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as v}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as j,url as T}from"./support/commonProperties.js";import x from"./support/SceneModifications.js";import{default3DTilesSpatialReference as w,default3DTilesFullExtent as b,initFullExtent as R,hasEsriCrs as L}from"./support/tiles3DUtils.js";import E from"../portal/Portal.js";import{logInvalidElevationInfoWarning as P,elevationModeRequiredMessage as k,featureExpressionUnsupportedMessage as I}from"../support/elevationInfoUtils.js";import{f as U}from"../chunks/persistableUrlUtils.js";import{isBasemap as O}from"../support/userTypeGuards/isBasemap.js";import{initialize as G,switchMeshModificationPolygonVCSSync as D}from"../views/3d/layers/Lyr3DWorker.js";import{toWasmModification as M,fromWasmModification as C}from"../views/3d/layers/SceneLayerWorkerHandle.js";import{reader as N}from"../core/accessorSupport/decorators/reader.js";let q=class extends(y(S(_(v(s(g(f(i(h))))))))){readModifications(e,t,i){this._modificationsSource={url:U(e,i),context:i}}initialize(){this.addHandles(n(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,l))}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=w,this.fullExtent=b,this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null,this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null,this.queryElevationCallback=null,this._simulateGoogleUrl=!1}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[w,this.esriCrsSpatialReference]:[w]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[b,this.esriCrsFullExtent]:[b]}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(e){const t=[e];for(;t?.length>0;){const e=t.pop();if(!e)return;for(const[r,o]of Object.entries(e)){if("uri"===r)try{const e=new URL("https://tmp"+o).searchParams.get("session");if(e)return e}catch(i){}"object"==typeof o&&null!==o&&t.push(o)}}return null}async requestRootAndSession(e){const i=(e,t)=>new r("3dtiles-init:"+e,t);return this._rootRequestPromise||(this._rootRequestPromise=new Promise((r,s)=>{this.url||s(i("url-missing","Layer url missing")),this._key=this.customParameters?this.customParameters.key:null;new Promise((e,r)=>{if(this.replacesTerrain&&!this._key){const o=this.portalItem?.portal||this.parent?.portalItem?.portal||E.getDefault();o.signIn().then(()=>{o.g3dTilesEnabled?t(o.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(t=>{this._key=t.data.keyString,e()},()=>r(i("g3dtiles-key-error","Error fetching Google 3D Tiles key from portal"))):r(i("g3dTilesEnabled-false","Google 3D Tiles are not enabled on Portal "+o.url))},()=>r(i("sign-in-failed","Error signing in to Portal")))}else e()}).then(()=>{t(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",signal:e}).then(e=>{try{this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(e.data))}catch(t){return void s(i("root-parse-failed","Error parsing root tile, details: "+t))}if(!this._rootTilesetJSON)return void s(i("root-is-null","Root tile is null."));this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=e.data,this.fullExtent=R(this._rootTilesetJSON);L(this._rootTilesetJSON)&&(this.esriCrsFullExtent=R(this._rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference,this.spatialReference=this.esriCrsSpatialReference),r(),this._rootRequestPromise=null},e=>{a(e),s(i("root-load-failed","Error loading root tile")),this._rootRequestPromise=null,o.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})},e=>s(e))})),this._rootRequestPromise}_haveWGS84ZModifications(e){for(const t of e){if(!t.geometry?.spatialReference)return!0;if(115700===t.geometry?.spatialReference.vcsWkid&&4326===t.geometry?.spatialReference.wkid)return!0}return!1}async _doLoad(e){const t=null!=e?e.signal:null;if(this.isUsedAsGroundLayer&&!has("enable-feature:basemap-groundlayers"))throw new r("3dtiles-init:not-supported-in-groundlayers","Layer is not supported in basemap.");try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new r("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(i){a(i)}if(null!=this._modificationsSource){const t=await x.fromUrl(this._modificationsSource.url,this.spatialReference,e,!0);if(this._haveWGS84ZModifications(t)){await G();try{const e=M(null,t.toArray(),d.WGS84),i=D({modifications:e,inVCS:115700});i.success&&i.modifications&&C(i.modifications,t)}catch(s){o.getLogger(this).error("convert-mesh-modification-z-error","Error when converting:",s)}}this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(t)}async beforeSave(){if(null==this._modificationsSource){const{modifications:e}=this;return void(e&&e.length>0&&await G())}await this.load().then(()=>{},()=>{})}get hasAttributionData(){return!1}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";P(o.getLogger(this),k(t,"absolute-height",e)),P(o.getLogger(this),I(t,e))}get replacesTerrain(){return!!has("enable-feature:basemap-groundlayers")&&this.hasGoogleUrl&&this.isUsedAsGroundLayer}get isUsedAsGroundLayer(){return O(this.parent)}get hasGoogleUrl(){return this._simulateGoogleUrl||!!this.url?.match(/.+\.googleapis.com/)}get test(){}};e([p({type:["IntegratedMesh3DTilesLayer"]})],q.prototype,"operationalLayerType",void 0),e([p({type:x,clonable:e=>e?.clone()??null}),c({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],q.prototype,"modifications",void 0),e([p({clonable:e=>e?{...e}:null})],q.prototype,"_modificationsSource",void 0),e([N(["web-scene","portal-item"],"modifications")],q.prototype,"readModifications",null),e([p({type:d})],q.prototype,"spatialReference",void 0),e([p({type:u})],q.prototype,"fullExtent",void 0),e([p({readOnly:!0})],q.prototype,"supportedSpatialReferences",null),e([p({type:[u]})],q.prototype,"fullExtents",null),e([p(j)],q.prototype,"elevationInfo",null),e([p({type:["show","hide"]})],q.prototype,"listMode",void 0),e([p(T)],q.prototype,"url",void 0),e([p({readOnly:!0})],q.prototype,"type",void 0),e([p({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],q.prototype,"path",void 0),e([p({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],q.prototype,"minScale",void 0),e([p({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],q.prototype,"maxScale",void 0),e([p({readOnly:!0})],q.prototype,"hasAttributionData",null),e([p()],q.prototype,"replacesTerrain",null),e([p()],q.prototype,"isUsedAsGroundLayer",null),e([p()],q.prototype,"hasGoogleUrl",null),e([p()],q.prototype,"_simulateGoogleUrl",void 0),q=e([m("esri.layers.IntegratedMesh3DTilesLayer")],q);const A=q;export{A as default};
|