@arcgis/core 5.0.0-next.16 → 5.0.0-next.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analysis/ElevationProfile/ElevationProfileLineInput.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{adf7ccf4ef629211c7ee.js → 08aacbfb651cc2e1c054.js} +1 -1
- package/assets/esri/core/workers/chunks/234b52b2a391631ceff6.js +1 -0
- package/assets/esri/core/workers/chunks/{658cd45b5fb304fd840a.js → 3aa77696c5ea54a238da.js} +1 -1
- package/assets/esri/core/workers/chunks/{8f3503b2fb6cd38757b9.js → 458e87902abc24b375da.js} +1 -1
- package/assets/esri/core/workers/chunks/{57b410198d83bf0ab708.js → 4a89e120be142ab58a27.js} +1 -1
- package/assets/esri/core/workers/chunks/{49571d6875de1f2e7e25.js → 4b9dfdc23ba3d6ebcc1b.js} +2 -2
- package/assets/esri/core/workers/chunks/{a410dcf80d17a2383337.js → 65a4099bdbe31834d0cc.js} +1 -1
- package/assets/esri/core/workers/chunks/722da7a39a0ad9300752.js +1 -0
- package/assets/esri/core/workers/chunks/{cdb4664fd59860ddeb5a.js → 72f1c3d97e7b9546c113.js} +1 -1
- package/assets/esri/core/workers/chunks/{bc318b6fef192cee2a72.js → 76e945da8f30d8641c3d.js} +20 -20
- package/assets/esri/core/workers/chunks/{319c3f46f2afb8f3e5a9.js → 89c9cf7f799858d14c76.js} +1 -1
- package/assets/esri/core/workers/chunks/{e19cd07df8ce87e18832.js → 8b33732e3c2924c1f60d.js} +1 -1
- package/assets/esri/core/workers/chunks/98739414c107ad78e4d8.js +1 -0
- package/assets/esri/core/workers/chunks/{8b73db0f4d6714396eb0.js → a6fa90eab77ac0e1cdfc.js} +1 -1
- package/assets/esri/core/workers/chunks/ac366221e8636b60aee5.js +1 -0
- package/assets/esri/core/workers/chunks/{23e17b745adf71a5efc7.js → aca72ca7f43f70eb8077.js} +1 -1
- package/assets/esri/core/workers/chunks/ad0c7225941437d18408.js +1 -0
- package/assets/esri/core/workers/chunks/b30897952494a3e5b9fe.js +1 -0
- package/assets/esri/core/workers/chunks/bfd3d81e8e148be99686.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Editor.scss +2 -1
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/chunks/ImageMaterial.glsl.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/config.js +1 -1
- package/graphic/graphicOriginUtils.js +1 -1
- package/interfaces.d.ts +113 -54
- package/intl/locale.js +1 -1
- package/kernel.js +1 -1
- package/layers/BingMapsLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/support/attributionUtils.js +5 -0
- package/layers/support/fieldConfigUtils.js +1 -1
- package/layers/support/fieldFormatUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/libs/parquet/parquet.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/SDFHelper.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/LabelManager.js +1 -1
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
- package/views/2d/engine/webgl/animations/store/AnimationStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/textureUtils.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileGeometryVisualization3D.js +1 -1
- package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/analysis/images/Factory.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
- package/views/3d/environment/CloudsCompositionTechnique.js +1 -1
- package/views/3d/environment/CloudsTechnique.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/environment/FogTechnique.js +1 -1
- package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/environment/PrecipitationTechnique.js +1 -1
- package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/TiledLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/support/QualityProfile.js +5 -0
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/StreamTextureCollection.js +1 -1
- package/views/3d/support/TextureCollection.js +1 -1
- package/views/3d/support/engineContent/marker.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/flow/FlowWorker.js +1 -1
- package/views/3d/support/flow/FlowWorkerHandle.js +1 -1
- package/views/3d/support/flow/StreamlineResources3D.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
- package/views/3d/support/flow/constants.js +1 -1
- package/views/3d/support/flow/loadUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/support/popupHitTest.js +1 -1
- package/views/3d/terrain/BlendLayersTechnique.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileAgent.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/material/MaterialBase.js +1 -1
- package/views/3d/webgl-engine/core/material/RenderTexture.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/{ReloadableShaderModule.js → ReloadableShader.js} +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlineTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAABlendWeightsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAABlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAAEdgeDetectTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAOBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAOTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/AnimationTimeStep.js +1 -1
- package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
- package/views/3d/webgl-engine/lib/DDSUtil.js +1 -1
- package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +5 -0
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/Program.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureFactory.js +1 -1
- package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
- package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
- package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillReductionTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/types.d.ts +5 -0
- package/views/analysis/ElevationProfile/types.js +5 -0
- package/views/support/layerViewUtils.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/VertexAttributeLocations.js +1 -1
- package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Workflow.js +1 -1
- package/widgets/Editor/components/CreateFeaturesPanelContent.js +1 -1
- package/widgets/Editor/components/PendingFeatureList.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/38ee69125da60464d5a1.js +0 -1
- package/assets/esri/core/workers/chunks/4f0016111fd84c612f41.js +0 -1
- package/assets/esri/core/workers/chunks/8208dfa8f7fae7e616b9.js +0 -1
- package/assets/esri/core/workers/chunks/847f4fc39100fac1df01.js +0 -1
- package/assets/esri/core/workers/chunks/ab005fe84952f0676020.js +0 -1
- package/assets/esri/core/workers/chunks/bc19a232076d98825eef.js +0 -1
- package/assets/esri/core/workers/chunks/c3dcfe26c2c3c829762d.js +0 -1
- package/views/3d/support/DisplayQualityProfile.js +0 -5
- package/views/3d/webgl-engine/lib/Texture.js +0 -5
- /package/views/3d/webgl-engine/lib/{ITexture.js → IManagedTexture.js} +0 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t,__param as
|
|
5
|
+
import{__decorate as t,__param as i}from"tslib";import{location as e,uniform as s,input as l}from"../../GraphShaderModule.js";import{dot as o,Vec2 as a,Float as n,max as r,Vec4 as d,mix as m,length as p,clamp as u,Vec3 as y,step as c,min as h}from"../../graph/glsl.js";import{AAnimatedPolyShader as x,PolyHittestVertexInput as v,PolyVertexInput as f,PolyFragmentInput as w}from"./AAnimatedPolyShader.js";import{getValue as b}from"./AAnimatedShader.js";import{distPointSegment as g}from"../shaders/hittestUtils.js";import{getLineAntialiasing as S,getLineThinFactor as P,AntialiasingControls as z}from"../shaders/LineShader.js";class A extends f{}t([e(10,n)],A.prototype,"accumulatedDistance",void 0),t([e(11,a)],A.prototype,"normal",void 0),t([e(12,a)],A.prototype,"segmentDirection",void 0);class D extends w{}class j extends x{constructor(){super(...arguments),this.type="AnimatedLineShader"}vertex(t,i){const{animationPointerAndBaseSizeAndReferenceSize:e}=t,s=e.xy,{distanceToPx:l,ndc:p,z:u,color:y,isOutline:c,strokeWidth:h,isSDF:x,baseSize:v,scale:f,scaleSymbolsProportionally:w,evalParams:g}=this._vertexPoly(t),S=t.sizing.xy,P=S.x.multiply(v).divide(S.y),z=b(s,6,g).a,A=t.accumulatedDistance.subtract(z),{normal:D}=t,j=t.normal.y,C=A.divide(this.view.displayZoomFactor).add(o(t.segmentDirection,t.offset)).divide(P),F=j.add(1).divide(2),R=new a(C,F),W=t.tlbr.divide(this.mosaicInfo.size.xyxy),M=v.divide(2),O=new n(.5).multiply(this.antialiasingControls.antialiasing),T=r(M.add(O),new n(.45)).add(new n(.1).multiply(O));return{glPosition:new d(p,u,1),tlbr:W,uv:R,color:y.multiply(new n(1).subtract(c)),outlineColor:y.multiply(c),distanceToPx:l,strokeWidth:h.multiply(m(new n(1),f,w)),isOutline:c,isSDF:x,halfWidth:T,normal:D,...this.maybeRunHittest(t,i,T)}}fragment(t){const i=this._fragmentPoly(t),e=S(t,this.antialiasingControls.blur),{halfWidth:s,normal:l}=t,o=P(s),a=p(l).multiply(s),r=u(o.multiply(s.subtract(a)).divide(o.subtract(new n(1))),new n(0),new n(1));return this.getFragmentOutput(i.multiply(r).multiply(e),t)}hittest(t,i,e){const{viewMat3:s,tileMat3:l}=this.view,o=s.multiply(l),a=o.multiply(new y(t.pos,1)),n=o.multiply(new y(i.nextPos1,1)),r=o.multiply(new y(i.nextPos2,1)),{distance:d,smallSymbolDistance:m,smallSymbolSizeThreshold:p}=this.hittestRequest,u=c(e,p.multiply(.5)).multiply(d.subtract(m)),x=this.hittestRequest.position;return h(g(x,a.xy,n.xy),g(x,a.xy,r.xy)).subtract(e).add(u)}}t([s(z)],j.prototype,"antialiasingControls",void 0),t([i(0,l(A)),i(1,l(v))],j.prototype,"vertex",null),t([i(0,l(D))],j.prototype,"fragment",null);export{j as AnimatedLineShader};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{LineTessellation as i}from"../../../TurboLine.js";import{clipLinesMarshall as
|
|
5
|
+
import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{triangulate as s}from"../../../../../../../geometry/libtess.js";import{LineTessellation as i}from"../../../TurboLine.js";import{clipLinesMarshall as r,triangulate as n,clipMarshall as o}from"../../../mesh/templates/templateUtils.js";import{AAnimatedMeshWriter as a}from"./AnimatedMeshWriter.js";import{lineLength as h,noTiming as l,zoomRange as m,segmentDirection as u,normal as c,accumulatedDistance as d,sizing as f,animationPointerAndBaseSizeAndReferenceSize as p,tlbr as x,offset as _,pos as g,bitset as P,id as b,noLineLength as v}from"./attributes.js";import{createComputedAnimatedMeshParams as L}from"./ComputedAnimatedParams.js";import{processLineCapInput as y,processLineJoinInput as W}from"../fill/meshWriterUtils.js";import{LineTessellationParams as w}from"../line/LineMeshWriter.js";class C extends a{_write(t,s,i){const r=i??e.fromFeatureSetReaderCIM(s);if(!r)return;const n=this.evaluatedMeshParams.sprite,{textureBinding:o}=n;t.recordStart(this.instanceId,this.attributeLayout,o);const a=s.getDisplayId();this._writePoly(t,a,r.asOptimized()),t.recordEnd()}}class z extends C{constructor(){super(...arguments),this.vertexSpec={createComputedParams:L,attributes:{id:b,bitset:P,pos:g,offset:_.fill,tlbr:x,animationPointerAndBaseSizeAndReferenceSize:p,sizing:f},optionalAttributes:{zoomRange:m,value1Position2Value2:l,lineLength:v}}}_writePoly(t,e,i){const r=this._clip(i);if(!r)return;i=r;const o=[],a=t.vertexCount();let h;if(n(o,i)){if(0===o.length)return;h=0;for(const s of o){const r=i.coords[2*s],n=i.coords[2*s+1];this._writeVertex(t,e,r,n),h++}}else{const{coords:r,lengths:n}=i,o=s(r,n);h=o.vertexCount;for(let s=0;s<o.buffer.length/2;s++){const i=o.buffer[2*s],r=o.buffer[2*s+1];this._writeVertex(t,e,i,r)}}if(h>0){t.indexEnsureSize(h);for(let e=0;e<h;e++)t.indexWrite(e+a)}}_clip(t){const e=this.hasEffects;return o(t,e?256:8)}}class j{constructor(){this.id=0,this.bitset=0,this.indexCount=0,this.vertexCount=0,this.vertexFrom=0,this.vertexBounds=0,this.pathLength=0}}const S=65535;class T extends C{constructor(){super(...arguments),this.vertexSpec={createComputedParams:L,attributes:{id:b,bitset:P,pos:g,offset:_.line,tlbr:x,animationPointerAndBaseSizeAndReferenceSize:p,sizing:f,accumulatedDistance:d,normal:c,segmentDirection:u},optionalAttributes:{zoomRange:m,value1Position2Value2:l,lineLength:h}},this._tessParams=new w,this._currentWrite=new j,this._tessellationOptions={halfWidth:0,pixelCoordRatio:1,offset:0,wrapDistance:S,textured:!1},this._lineLength=0,this._lineTessellator=new i((t,e,s,i,r,n,o,a,h,l,m)=>this._writeTesselatedVertex(t,e,s,i,r,n,o,a,h,l,m,this._lineLength),this._writeTriangle.bind(this),!1)}_writePoly(s,i,n){const o=64,a=!1,h=r(e.fromOptimized(n,"esriGeometryPolyline"),o);if(null==h)return;const{_currentWrite:l,_tessellationOptions:m}=this,{baseSize:u,capType:c,joinType:d,miterLimit:f}=this.evaluatedMeshParams,p=t(.5*u);m.halfWidth=p,m.capType=y(c||"Round"),m.joinType=W(d||"Round"),m.miterLimit=f||2,l.out=s,l.id=i,l.vertexCount=0,l.indexCount=0,l.vertexFrom=s.vertexCount(),l.vertexBounds=1;for(const{line:t,start:e,pathLength:r}of h){m.initialDistance=e%S,l.pathLength=r,this._lineLength=0;for(let e=1;e<t.length;e++){const s=t[e].x-t[e-1].x,i=t[e].y-t[e-1].y;this._lineLength+=Math.sqrt(s*s+i*i)}this._lineTessellator.tessellate(t,m,a)}}_writeTesselatedVertex(t,e,s,i,r,n,o,a,h,l,m,u){const{out:c,id:d,vertexBounds:f,pathLength:p}=this._currentWrite;return this.hasEffects&&c.recordBounds(t,e,f,f),this._tessParams.extrusionOffsetX=o,this._tessParams.extrusionOffsetY=a,this._tessParams.normalX=h,this._tessParams.normalY=l,this._tessParams.directionX=r,this._tessParams.directionY=n,this._tessParams.distance=m,this._tessParams.pathLength=p,this._tessParams.lineLength=u,this._writeVertex(c,d,t,e,this._tessParams),this._currentWrite.vertexFrom+this._currentWrite.vertexCount++}_writeTriangle(t,e,s){const{out:i}=this._currentWrite;i.indexEnsureSize(3),i.indexWrite(t),i.indexWrite(e),i.indexWrite(s),this._currentWrite.indexCount+=3}}export{C as AAnimatedPolyMeshWriter,z as AnimatedFillMeshWriter,T as AnimatedLineMeshWriter};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{invert as e,multiply as t}from"../../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as
|
|
5
|
+
import{invert as e,multiply as t}from"../../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{animationDebugFlags as a}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{FeatureTechnique as o}from"../FeatureTechnique.js";import{isHittest as r,getSelectionDefines as n,getLocalTileOffset as s,getFeatureUniforms as m,resolveDynamicUniforms as l,getFeaturePipelineState as u}from"../featureTechniqueUtils.js";import{getAntialiasingControls as c}from"../line/utils.js";class f extends o{render(o,f){const{context:g,painter:p,pixelRatio:d}=o,{target:x}=f,{freezeGlobalTime:b}=a,h=0,D=p.textureManager.animationStore.getTexture(g,h),T=[2/o.state.size[0],0,0,0,-2/o.state.size[1],0,-1,1,1],R=Array.from(e(i(),T)),j=Array.from(t(i(),R,x.transforms.displayViewScreenMat3)),y=f.instance.getInput(),z=p.textureManager.getMosaicInfo(o,f.textureKey,!1),{optionalAttributes:S}=y,A=S.zoomRange,I=S.value1Position2Value2,M="accumulatedDistance"in S&&S.accumulatedDistance,q="segmentDirection"in S&&S.segmentDirection,w="normal"in S&&S.normal;p.setShader({shader:this.shaders.geometry,uniforms:{...l(o,f.target,y.uniforms),...m(o,f.target),antialiasingControls:c(d),mosaicInfo:z,animationInfo:{globalTime:o.animationsEnabled?!1===b?o.time/1e3:b:0,animationTextureSize:[D.descriptor.width,D.descriptor.height],animationTexture:{unit:6,texture:D},toScreen:j,toNdc:T,mapRotation:o.state.rotation,pixelRatio:o.state.pixelRatio},localTileOffset:s(f.target)},defines:{...n(o)},optionalAttributes:{zoomRange:A,value1Position2Value2:I,accumulatedDistance:M,segmentDirection:q,normal:w},useComputeBuffer:r(o)}),p.setPipelineState({...u(o)}),p.submitDraw(o,f),!1===b&&o.animationsEnabled&&x.requestRender()}}export{f as AnimatedTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{simplePipelineState as t}from"../../utils.js";import{Technique as r}from"../Technique.js";import{FilterEffectShader as s}from"../shaders/ColorizeShader.js";import{Texture as i}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as o}from"../../../../../../webgl/TextureDescriptor.js";class l extends r{constructor(){super(...arguments),this.type=8,this._layerFBOTexture=null,this._size=[0,0],this.shaders={filterEffect:new s}}shutdown(){super.shutdown(),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,r){const{width:s,height:i}=r.layerFBO;this._createOrResizeResources(e,s,i);const{context:o,painter:l}=e,
|
|
5
|
+
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{simplePipelineState as t}from"../../utils.js";import{Technique as r}from"../Technique.js";import{FilterEffectShader as s}from"../shaders/ColorizeShader.js";import{Texture as i}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as o}from"../../../../../../webgl/TextureDescriptor.js";class l extends r{constructor(){super(...arguments),this.type=8,this._layerFBOTexture=null,this._size=[0,0],this.shaders={filterEffect:new s}}shutdown(){super.shutdown(),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,r){const{width:s,height:i}=r.layerFBO;this._createOrResizeResources(e,s,i);const{context:o,painter:l}=e,n=r.effect.colorMatrix,a=this._layerFBOTexture;o.bindFramebuffer(r.layerFBO),r.layerFBO.copyToTexture(0,0,s,i,0,0,a);const u={color:{write:[!0,!0,!0,!0],blendMode:"none"},depth:!1,stencil:!1};l.setPipelineState(u);const c={colorTexture:{texture:a,unit:2},coefficients:n};l.submitDrawMesh(o,{shader:this.shaders.filterEffect,uniforms:{filterEffectConfig:c},defines:null,optionalAttributes:null,useComputeBuffer:!1},l.quadMesh),l.setPipelineState({...t,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1}})}_createOrResizeResources(e,t,r){const{context:s}=e;if(!this._layerFBOTexture||this._size[0]!==t||this._size[1]!==r)if(this._size[0]=t,this._size[1]=r,this._layerFBOTexture)this._layerFBOTexture.resize(t,r);else{const e=new o(t,r);e.internalFormat=6408,e.wrapMode=33071,this._layerFBOTexture=new i(s,e)}}}export{l as ColorizeTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../../../../../core/RandomLCG.js";import{tileSize as e}from"../../../definitions.js";import{SimpleMesh as s}from"../../../meshing/SimpleMesh.js";import{SizedDepthStencilFormat as o,DataType as r,PrimitiveType as i,PixelType as n}from"../../../../../../webgl/enums.js";import{FramebufferObject as d}from"../../../../../../webgl/FramebufferObject.js";import{Renderbuffer as h}from"../../../../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as u}from"../../../../../../webgl/RenderbufferDescriptor.js";import{Texture as l}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as _}from"../../../../../../webgl/TextureDescriptor.js";const
|
|
5
|
+
import t from"../../../../../../../core/RandomLCG.js";import{tileSize as e}from"../../../definitions.js";import{SimpleMesh as s}from"../../../meshing/SimpleMesh.js";import{SizedDepthStencilFormat as o,DataType as r,PrimitiveType as i,PixelType as n}from"../../../../../../webgl/enums.js";import{FramebufferObject as d}from"../../../../../../webgl/FramebufferObject.js";import{Renderbuffer as h}from"../../../../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as u}from"../../../../../../webgl/RenderbufferDescriptor.js";import{Texture as l}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as _}from"../../../../../../webgl/TextureDescriptor.js";const m={pos:{count:2,type:r.UNSIGNED_SHORT}};class T{constructor(){this._dotTextureSize=0,this._dotTextures=null,this._dotMesh=null}destroy(){this._disposeTextures(),this._dotFBO&&this._dotFBO.dispose(),this._dotMesh&&this._dotMesh.destroy()}getFBO(t){if(null==this._dotFBO){const s=e,r=e,i=new _(s,r);i.samplingMode=9728,i.wrapMode=33071;const n=new h(t,new u(o.DEPTH24_STENCIL8,s,r));this._dotFBO=new d(t,i,n)}return this._dotFBO}getDotDensityMesh(t){if(null==this._dotMesh){const o=e,r=o*o,n=2,d=new Int16Array(r*n);for(let t=0;t<o;t++)for(let e=0;e<o;e++)d[n*(e+t*o)]=e,d[n*(e+t*o)+1]=t;this._dotMesh=s.create(t,{primitive:i.POINTS,vertex:d,count:r,layout:m})}return this._dotMesh}getDotDensityTextures(e,s,o){if(this._dotTextureSize===s&&this._seed===o||(this._disposeTextures(),this._dotTextureSize=s,this._seed=o),null===this._dotTextures){const r=new t(o);this._dotTextures=[this._allocDotDensityTexture(e,s,r),this._allocDotDensityTexture(e,s,r)]}return this._dotTextures}_disposeTextures(){if(this._dotTextures){for(let t=0;t<this._dotTextures.length;t++)this._dotTextures[t].dispose();this._dotTextures=null}}_allocDotDensityTexture(t,e,s){const o=new Float32Array(e*e*4);for(let i=0;i<o.length;i++)o[i]=s.getFloat();const r=new _(e);return r.dataType=n.FLOAT,r.samplingMode=9728,new l(t,r,o)}}export{T as DotDensityResources};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{simplePipelineState as r}from"../../utils.js";import{Technique as s}from"../Technique.js";import{BlitShader as i}from"../shaders/BlitShader.js";import{GaussianBlurShader as o}from"../shaders/BlurShader.js";import{DropShadowCompositeShader as a}from"../shaders/DropShadowShader.js";import{FramebufferObject as u}from"../../../../../../webgl/FramebufferObject.js";import{Texture as l}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as n}from"../../../../../../webgl/TextureDescriptor.js";const h=[1,0],B=[0,1];class c extends s{constructor(){super(...arguments),this.type=12,this._layerFBOTexture=null,this._horizontalBlurFBO=null,this._verticalBlurFBO=null,this._size=[0,0],this.shaders={gaussianBlur:new o,composite:new a,blit:new i}}shutdown(){super.shutdown(),this._horizontalBlurFBO=e(this._horizontalBlurFBO),this._verticalBlurFBO=e(this._verticalBlurFBO),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,s){const{context:i,state:o,painter:a}=e,{layerFBO:u}=s,l=u.width,n=u.height,c=[Math.round(l),Math.round(n)],{blurRadius:f,offsetX:d,offsetY:m,color:p}=s.effect,F=[t(d),t(m)];this._createOrResizeResources(e,l,n,c);const w=this._horizontalBlurFBO,_=this._verticalBlurFBO,
|
|
5
|
+
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{simplePipelineState as r}from"../../utils.js";import{Technique as s}from"../Technique.js";import{BlitShader as i}from"../shaders/BlitShader.js";import{GaussianBlurShader as o}from"../shaders/BlurShader.js";import{DropShadowCompositeShader as a}from"../shaders/DropShadowShader.js";import{FramebufferObject as u}from"../../../../../../webgl/FramebufferObject.js";import{Texture as l}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as n}from"../../../../../../webgl/TextureDescriptor.js";const h=[1,0],B=[0,1];class c extends s{constructor(){super(...arguments),this.type=12,this._layerFBOTexture=null,this._horizontalBlurFBO=null,this._verticalBlurFBO=null,this._size=[0,0],this.shaders={gaussianBlur:new o,composite:new a,blit:new i}}shutdown(){super.shutdown(),this._horizontalBlurFBO=e(this._horizontalBlurFBO),this._verticalBlurFBO=e(this._verticalBlurFBO),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,s){const{context:i,state:o,painter:a}=e,{layerFBO:u}=s,l=u.width,n=u.height,c=[Math.round(l),Math.round(n)],{blurRadius:f,offsetX:d,offsetY:m,color:p}=s.effect,F=[t(d),t(m)];this._createOrResizeResources(e,l,n,c);const w=this._horizontalBlurFBO,_=this._verticalBlurFBO,O={color:{write:[!0,!0,!0,!0],blendMode:"none"},depth:{write:!1,test:!1},stencil:{write:{mask:0},test:!1}};a.setPipelineState(O);const x=this._layerFBOTexture;u.copyToTexture(0,0,l,n,0,0,x),i.setViewport(0,0,c[0],c[1]),i.bindFramebuffer(w),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:u.colorTexture,unit:4},texSize:c,direction:h,sigma:f}},defines:{kernelRadius:Math.ceil(f)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),i.bindFramebuffer(_),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texture:{texture:w?.colorTexture,unit:5},texSize:c,direction:B,sigma:f}},defines:{kernelRadius:Math.ceil(f)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),i.bindFramebuffer(u),i.setViewport(0,0,l,n),a.submitDrawMesh(i,{shader:this.shaders.composite,uniforms:{compositeConfig:{blurTexture:{texture:_?.colorTexture,unit:2},layerFBOTexture:{texture:x,unit:3},shadowColor:[p[3]*(p[0]/255),p[3]*(p[1]/255),p[3]*(p[2]/255),p[3]],displayViewMat3:o.displayMat3,shadowOffset:F}},defines:null,optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),a.setPipelineState({...r,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1}})}_createOrResizeResources(e,t,r,s){const{context:i}=e;if(!this._horizontalBlurFBO||this._size[0]!==t||this._size[1]!==r){if(this._size[0]=t,this._size[1]=r,this._horizontalBlurFBO)this._horizontalBlurFBO.resize(s[0],s[1]);else{const e=new n(s[0],s[1]);e.internalFormat=6408,e.wrapMode=33071,this._horizontalBlurFBO=new u(i,e)}if(this._verticalBlurFBO)this._verticalBlurFBO.resize(s[0],s[1]);else{const e=new n(s[0],s[1]);e.internalFormat=6408,e.wrapMode=33071,this._verticalBlurFBO=new u(i,e)}if(this._layerFBOTexture)this._layerFBOTexture.resize(t,r);else{const e=new n(t,r);e.internalFormat=6408,e.wrapMode=33071,this._layerFBOTexture=new l(i,e)}}}}export{c as DropShadowTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{OpacityShader as r}from"../shaders/OpacityShader.js";import{Texture as s}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../../../../webgl/TextureDescriptor.js";class o extends t{constructor(){super(...arguments),this.type=23,this._layerFBOTexture=null,this._size=[0,0],this.shaders={opacity:new r}}shutdown(){super.shutdown(),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,t){const{layerFBO:r}=t,{width:s,height:i}=r;this._createOrResizeResources(e,s,i);const{context:o,painter:a}=e,{amount:
|
|
5
|
+
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{OpacityShader as r}from"../shaders/OpacityShader.js";import{Texture as s}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../../../../webgl/TextureDescriptor.js";class o extends t{constructor(){super(...arguments),this.type=23,this._layerFBOTexture=null,this._size=[0,0],this.shaders={opacity:new r}}shutdown(){super.shutdown(),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,t){const{layerFBO:r}=t,{width:s,height:i}=r;this._createOrResizeResources(e,s,i);const{context:o,painter:a}=e,{amount:l}=t.effect,n=this._layerFBOTexture;o.bindFramebuffer(r),t.layerFBO.copyToTexture(0,0,s,i,0,0,n);const u={color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:771,srcAlpha:1,dstAlpha:771}},depth:!1,stencil:!1},h={layerTexture:{texture:n,unit:0},opacity:l};n.setSamplingMode(9728),o.setClearColor(0,0,0,0),o.clear(16384),a.setPipelineState(u),a.submitDrawMesh(o,{shader:this.shaders.opacity,uniforms:{config:h},defines:null,optionalAttributes:null,useComputeBuffer:!1},a.quadMesh)}_createOrResizeResources(e,t,r){const{context:o}=e;if(!this._layerFBOTexture||this._size[0]!==t||this._size[1]!==r)if(this._size[0]=t,this._size[1]=r,this._layerFBOTexture)this._layerFBOTexture.resize(t,r);else{const e=new i(t,r);e.internalFormat=6408,e.wrapMode=33071,e.samplingMode=9728,this._layerFBOTexture=new s(o,e)}}}export{o as OpacityTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{TextureStatisticsTechnique as i}from"../TextureStatisticsTechnique.js";import{getInterpolationDefines as
|
|
5
|
+
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{TextureStatisticsTechnique as i}from"../TextureStatisticsTechnique.js";import{getInterpolationDefines as o}from"./processor/textureUtils.js";import{RasterColorizerLUTShader as s}from"../shaders/raster/RasterColorizerLUTShader.js";import{RasterColorizerShadedReliefShader as r}from"../shaders/raster/RasterColorizerShadedReliefShader.js";import{RasterColorizerStretchShader as n}from"../shaders/raster/RasterColorizerStretchShader.js";import{SizedPixelFormat as a,PixelType as u}from"../../../../../../webgl/enums.js";import{FramebufferObject as c}from"../../../../../../webgl/FramebufferObject.js";import{Texture as m}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as l}from"../../../../../../webgl/TextureDescriptor.js";class p extends t{constructor(){super(...arguments),this.name="BrushRasterColorizer",this.type=0,this.shaders={lut:new s,stretch:new n,shadedRelief:new r},this._mosaicFbo=null,this._statisticsTechnique=null}shutdown(t){super.shutdown(t),this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique)}render(t,i){const o=i.bitmaps.some(f);o||(this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique));const s=o?this._computeStatisticsTextures(t,i):void 0;for(const e of i.bitmaps){if(!e.source||e.suspended)continue;t.timeline.begin(this.name);const{painter:i}=t;i.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}}),e.updateTexture(t),e.updateProcessedTexture();const{type:o}=e.symbolizerParameters,r="stretch"===o?this._getStretchOptions(e,s):"lut"===o?this._getLutOptions(e):this._getShadedReliefOptions(e);"bilinear"!==e.interpolation||t.context.capabilities.textureFloatLinear||(r.defines.bilinear=!0),i.submitDrawMesh(t.context,r,i.quadMesh,e),t.timeline.end(this.name)}}_computeStatisticsTextures(e,t){this._statisticsTechnique??=new i;const o=this._statisticsTechnique;return this._mosaic(e,t),o.render(e,{fbo:this._mosaicFbo}),{minTexture:o.minValuesTexture,maxTexture:o.maxValuesTexture,meanTexture:o.meanValuesTexture,stddevTexture:o.stdDevValuesTexture}}_mosaic(e,t){const{context:i,painter:o}=e,s=i.getBoundFramebufferObject();if(this._mosaicFbo)this._mosaicFbo.resize(s.width,s.height);else{const e=h(i,s.width,s.height);this._mosaicFbo=new c(i,e)}i.bindFramebuffer(this._mosaicFbo);const r="RasterColorizerMosaic";for(const n of t.bitmaps){if(!f(n))continue;e.timeline.begin(r),o.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}});const t=n.interpolation;n.interpolation="nearest",n.updateTexture(e),n.updateProcessedTexture();const i=this._getStretchOptions(n);i.defines.noOp=!0,o.submitDrawMesh(e.context,i,o.quadMesh,n),n.interpolation=t,e.timeline.end(r)}i.bindFramebuffer(s)}_getLutOptions(e){const{config:t,projectionConfig:i,colormapConfig:s,pixelMaskConfig:r,highlightConfig:n,projectionDefines:a}=this._getCommonConfig(e),u=o(e);return{shader:this.shaders.lut,uniforms:{projectionConfig:i,config:t,colormapConfig:s,pixelMaskConfig:r,highlightConfig:n},defines:{...a,...u,applyPixelMask:!!r,applyPixelHighlights:!!n},optionalAttributes:null,useComputeBuffer:!1}}_getStretchOptions(e,t){const i=e.symbolizerParameters,{config:s,projectionConfig:r,colormapConfig:n,pixelMaskConfig:a,highlightConfig:u,projectionDefines:c,textureUnit:m}=this._getCommonConfig(e),l=o(e),p=t?{minTexture:{texture:t.minTexture,unit:m},maxTexture:{texture:t.maxTexture,unit:m+1},meanTexture:{texture:t.meanTexture,unit:m+2},stddevTexture:{texture:t.stddevTexture,unit:m+3},numberOfStandardDeviations:i.numberOfStandardDeviations||2}:void 0,h=t?"standardDeviation"===i.stretchType?2:1:0;return{shader:this.shaders.stretch,uniforms:{projectionConfig:r,config:s,stretchConfig:i,colormapConfig:n,pixelMaskConfig:a,highlightConfig:u,statisticsConfig:p},defines:{...c,...l,isMultiband:i.bandCount>1,applyColormap:!!n,useGamma:i.useGamma,noOp:e.isRendereredSource&&!e.processed,applyPixelMask:!!a,applyPixelHighlights:!!u,draStretchType:h},optionalAttributes:null,useComputeBuffer:!1}}_getShadedReliefOptions(e){const t=e.symbolizerParameters,{config:i,projectionConfig:s,colormapConfig:r,pixelMaskConfig:n,highlightConfig:a,projectionDefines:u}=this._getCommonConfig(e),c=o(e);return{shader:this.shaders.shadedRelief,uniforms:{projectionConfig:s,config:i,hillshadeConfig:t,colormapConfig:r,pixelMaskConfig:n,highlightConfig:a},defines:{...u,...c,isMultidirectional:t.hillshadeType>0,applyColormap:!!r,applyPixelMask:!!n,applyPixelHighlights:!!a},optionalAttributes:null,useComputeBuffer:!1}}_getCommonConfig(e){const{coordScale:t,computedOpacity:i,transforms:o}=e,{names:s,textures:r}=e.getTextures({useProcessedTexture:e.processed}),n=r[s.indexOf("u_image")],a=e.getRasterTextureSize();let u=0;const c={texture:{texture:n,unit:u++},dvsMat3:o.displayViewScreenMat3,coordScale:t,srcImageSize:a,opacity:i},m=r[s.indexOf("u_transformGrid")],{transformGrid:l}=e,p=!(!m||!l),h=p?{transformTexture:{texture:m,unit:u++},targetImageSize:[e.width,e.height],transformSpacing:l.spacing,transformGridSize:l.size}:void 0,f=r[s.indexOf("u_colormap")],{colormap:d,colormapOffset:g}=e.symbolizerParameters,x=f&&d?{colormapTexture:{texture:f,unit:u++},colormapOffset:g??0,colormapMaxIndex:d.length/4-1}:void 0,C=r[s.indexOf("u_mask")],b=C?{maskTexture:{texture:C,unit:u++}}:void 0,{highlightTexture:T}=e;return{config:c,projectionConfig:h,colormapConfig:x,pixelMaskConfig:b,highlightConfig:T?{highlightTexture:{texture:T,unit:u++}}:void 0,projectionDefines:{applyProjection:p,lookupProjection:p&&1===l.spacing[0]},textureUnit:u}}}function h(e,t,i){const o=new l(t,i);return o.internalFormat=a.RGBA32F,o.samplingMode=9728,o.dataType=u.FLOAT,o.wrapMode=33071,new m(e,o)}function f(e){return!e.suspended&&null!=e.source&&!e.isRendereredSource&&"stretch"===e.symbolizerParameters.type&&!!e.symbolizerParameters.dynamicRangeAdjustment}export{p as RasterColorizerTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{tileSize as e}from"../../../definitions.js";import{Technique as t}from"../Technique.js";import{getInterpolationDefines as i}from"./processor/textureUtils.js";import{RasterRangeHighlightShader as r}from"../shaders/raster/RasterRangeHighlightShader.js";import{SizedPixelFormat as o,PixelType as
|
|
5
|
+
import{tileSize as e}from"../../../definitions.js";import{Technique as t}from"../Technique.js";import{getInterpolationDefines as i}from"./processor/textureUtils.js";import{RasterRangeHighlightShader as r}from"../shaders/raster/RasterRangeHighlightShader.js";import{SizedPixelFormat as o,PixelType as n}from"../../../../../../webgl/enums.js";import{FramebufferObject as s}from"../../../../../../webgl/FramebufferObject.js";import{Texture as a}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as h}from"../../../../../../webgl/TextureDescriptor.js";class g extends t{constructor(){super(...arguments),this.name="BrushRasterHighlight",this.type=2,this.shaders={range:new r}}shutdown(e){super.shutdown(e),this._fbo?.dispose(),this._fbo=void 0}render(t,r){const{context:o}=t;if(!this._fbo){const i=u(t.context,e,e);this._fbo=new s(o,i)}const n=o.getBoundFramebufferObject(),a=o.getViewport(),{pixelHighlightOptions:h}=t;for(const s of r.bitmaps){if(!h||!s.source||s.highlighted||s.suspended||s.isRendereredSource)continue;const r=s.bandIds?.length?s.bandIds.indexOf(h.bandId):0;if(r<0||r>2)continue;t.timeline.begin(this.name);const{painter:n}=t;n.setPipelineState({depth:!1,stencil:{test:!1,write:!1},color:{write:[!0,!0,!0,!0],blendMode:"custom",blendParameters:{srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0}}}),s.updateTexture(t),s.updateProcessedTexture(!1);const{config:a,projectionConfig:g,highlightConfig:c,projectionDefines:d}=this._getCommonConfig(s),f=i(s);"bilinear"!==s.interpolation||t.context.capabilities.textureFloatLinear||(f.bilinear=!0);const p=new Float32Array(9);p[3*r]=1;const l={...h,bandSwap:p},m={shader:this.shaders.range,uniforms:{projectionConfig:g,config:a,rangeHighlightConfig:l,highlightConfig:c},defines:{...d,...f,applyPixelMask:!1,applyPixelHighlights:!1,hasExistingHighlights:!!c},optionalAttributes:null,useComputeBuffer:!1};o.bindFramebuffer(this._fbo),o.setViewport(0,0,e,e),n.submitDrawMesh(t.context,m,n.quadMesh);const x=u(t.context,e,e);this._fbo.copyToTexture(0,0,e,e,0,0,x),s.highlightTexture=x,t.timeline.end(this.name)}o.bindFramebuffer(n),o.setViewport(a.x,a.y,a.width,a.height)}_getCommonConfig(e){const{names:t,textures:i}=e.getTextures({forProcessing:!0,useProcessedTexture:e.processed}),r=i[t.indexOf("u_image")],o=e.getRasterTextureSize(),n={texture:{texture:r,unit:0},dvsMat3:new Float32Array([2,0,0,0,2,0,-1,-1,0]),coordScale:[1,1],srcImageSize:o,opacity:1},s=i[t.indexOf("u_transformGrid")],{transformGrid:a}=e,h=!(!s||!a),g=h?{transformTexture:{texture:s,unit:1},targetImageSize:[e.width,e.height],transformSpacing:a.spacing,transformGridSize:a.size}:void 0,{highlightTexture:u}=e;return{config:n,projectionConfig:g,highlightConfig:u?{highlightTexture:{texture:u,unit:2}}:void 0,projectionDefines:{applyProjection:h,lookupProjection:h&&1===a.spacing[0]}}}}function u(e,t,i){const r=new h(t,i);return r.internalFormat=o.RGBA8,r.samplingMode=9728,r.dataType=n.UNSIGNED_BYTE,r.isImmutable=!0,r.wrapMode=33071,new a(e,r)}export{g as RasterHighlightTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t,__param as i}from"tslib";import{location as e,uniform as o,option as l,input as a,UniformGroup as r}from"../../GraphShaderModule.js";import{Vec3 as s,step as n,min as p,
|
|
5
|
+
import{__decorate as t,__param as i}from"tslib";import{location as e,uniform as o,option as l,input as a,UniformGroup as r}from"../../GraphShaderModule.js";import{Vec3 as s,step as n,min as p,length as u,clamp as m,Float as d,max as y,Vec4 as c,Vec2 as f}from"../../graph/glsl.js";import{AFeatureShader as h,BaseHittestVertexInput as v,FeatureVertexInput as w,FeatureFragmentInput as V}from"./AFeatureShader.js";import{thinLineWidthFactor as b,thinLineHalfWidth as S,epsilon as x}from"./constants.js";import{distPointSegment as g}from"./hittestUtils.js";import{VisualVariableColor as j}from"./VisualVariableColor.js";import{VisualVariableOpacity as z}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as M}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as W}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as C}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as P}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableColor as R,getVisualVariableOpacity as H,hasVisualVariableSize as O,getVisualVariableSize as U}from"./vvUtils.js";class q extends w{}t([e(3,c)],q.prototype,"color",void 0),t([e(4,f)],q.prototype,"offset",void 0),t([e(5,f)],q.prototype,"normal",void 0),t([e(6,d)],q.prototype,"halfWidth",void 0),t([e(7,d)],q.prototype,"referenceHalfWidth",void 0),t([e(8,f)],q.prototype,"zoomRange",void 0);class A extends V{}class F extends r{}function D(t){return y(new d(b).multiply(n(t,new d(S))),new d(1))}function G(t,i){const{halfWidth:e,normal:o}=t,l=D(e),a=u(o).multiply(e);return m(l.multiply(e.subtract(a)).divide(i.add(l).subtract(new d(1))),new d(0),new d(1))}function L(t,i){const{id:e,halfWidth:o,referenceHalfWidth:l}=i;if(O(t)){const i=new d(2).multiply(l),a=U(t,e,i);return new d(.5).multiply(o.divide(y(l,new d(x)))).multiply(a)}return o}function T(t,i){const{id:e,offset:o,pos:l,normal:a,zoomRange:r}=i,{displayViewScreenMat3:p,displayViewMat3:u}=t.view,m=R(t,e,i.color),f=H(t,e),h=L(t,i),v=new d(.5).multiply(t.antialiasingControls.antialiasing),w=y(h.add(v),new d(.45)).add(new d(.1).multiply(v)),V=D(w).multiply(w).multiply(o),b=u.multiply(new s(V,new d(0))),S=p.multiply(new s(l,new d(1))).add(b),x=new d(2).multiply(n(h,new d(0))).add(t.clip(e,r)),g=new c(S.xy,x,1);return{color:m,opacity:f,halfWidth:w,normal:a,scaledOffset:V,scaledHalfWidth:h,glPosition:new c(g.xy,x,1)}}function k(t,i){const{opacity:e,color:o}=t,l=G(t,i);return e.multiply(o).multiply(l)}t([o(d)],F.prototype,"antialiasing",void 0),t([o(d)],F.prototype,"blur",void 0);class B extends h{constructor(){super(...arguments),this.type="LineShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,i){const e=T(this,t);return{...e,...this.maybeRunHittest(t,i,e.halfWidth)}}fragment(t){const i=k(t,this.antialiasingControls.blur);return this.getFragmentOutput(i,t)}hittest(t,i,e){const{viewMat3:o,tileMat3:l}=this.view,a=o.multiply(l),r=a.multiply(new s(t.pos,1)),u=a.multiply(new s(i.nextPos1,1)),m=a.multiply(new s(i.nextPos2,1)),{distance:d,smallSymbolDistance:y,smallSymbolSizeThreshold:c}=this.hittestRequest,f=n(e,c.multiply(.5)).multiply(d.subtract(y)),h=this.hittestRequest.position;return p(g(h,r.xy,u.xy),g(h,r.xy,m.xy)).subtract(e).add(f)}}t([o(F)],B.prototype,"antialiasingControls",void 0),t([l(j)],B.prototype,"visualVariableColor",void 0),t([l(z)],B.prototype,"visualVariableOpacity",void 0),t([l(M)],B.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(W)],B.prototype,"visualVariableSizeScaleStops",void 0),t([l(C)],B.prototype,"visualVariableSizeStops",void 0),t([l(P)],B.prototype,"visualVariableSizeUnitValue",void 0),t([i(0,a(q)),i(1,a(v))],B.prototype,"vertex",null),t([i(0,a(A))],B.prototype,"fragment",null);export{F as AntialiasingControls,A as LineFragmentInput,B as LineShader,q as LineVertexInput,G as getLineAntialiasing,k as getLineFragmentColor,D as getLineThinFactor,T as getLineVertexData};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import"../../../webgl/Program.js";import"../../../../core/has.js";import"../../../webgl/Renderbuffer.js";import{Texture as e}from"../../../webgl/Texture.js";import"../../../../core/Logger.js";import"../../../webgl/enums.js";import"../../../webgl/checkWebGLError.js";import{TextureDescriptor as p}from"../../../webgl/TextureDescriptor.js";function r(r,t,
|
|
5
|
+
import"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import"../../../webgl/Program.js";import"../../../../core/has.js";import"../../../webgl/Renderbuffer.js";import{Texture as e}from"../../../webgl/Texture.js";import"../../../../core/Logger.js";import"../../../webgl/enums.js";import"../../../webgl/checkWebGLError.js";import{TextureDescriptor as p}from"../../../webgl/TextureDescriptor.js";function r(r,t,i){const a=new p(t.width,t.height);return a.dataType=t.dataType,t.depth&&(a.depth=t.depth),t.flipped&&(a.flipped=t.flipped),t.hasMipmap&&(a.hasMipmap=t.hasMipmap),a.internalFormat=t.internalFormat,t.isImmutable&&(a.isImmutable=t.isImmutable),t.isOpaque&&(a.isOpaque=t.isOpaque),t.maxAnisotropy&&(a.maxAnisotropy=t.maxAnisotropy),a.pixelFormat=t.pixelFormat,t.preMultiplyAlpha&&(a.preMultiplyAlpha=t.preMultiplyAlpha),t.samplingMode&&(a.samplingMode=t.samplingMode),t.target&&(a.target=t.target),a.uniform=t.uniform,t.unpackAlignment&&(a.unpackAlignment=t.unpackAlignment),t.wrapMode&&(a.wrapMode=t.wrapMode),new e(r,a,i)}export{r as createTexture};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"../../../../core/has.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{throwIfAborted as t,createResolver as s}from"../../../../core/promiseUtils.js";import{UpdatingHandles as r}from"../../../../core/support/UpdatingHandles.js";import{AFeatureContainer as i}from"../../engine/AFeatureContainer.js";import n from"../../engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js";import{Techniques as a}from"../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{RenderState as o}from"./RenderState.js";import{renderHighlight as h}from"../support/util.js";class d{constructor(e,t){this.id=e,this.version=t,this._resolver=s(),this._done=!1}get done(){return this._done}get promise(){return this._resolver.promise}end(){this._resolver.resolve(),this._done=!0}destroy(){this._resolver.reject()}}class l extends i{constructor(e){super(e.view.featuresTilingScheme),this.updatingHandles=new r,this._hitTestsRequests=[],this._store=new n,this._visibleTiles=new Set,this._subscriptions=new Map,this._updateStatisticsRequests=[],this._lockStatisticUpdates=!1,this._shouldUnlockAttributeView=!1,this._layerView=e,this.addTransitionable(this._layerView.featureEffectView)}destroy(){this.updatingHandles.destroy(),super.destroy(),this._renderState=e(this._renderState),this._renderStateNext=e(this._renderStateNext)}renderChildren(e){if(this._updateAttributeView(),this._renderState?.update(this.attributeView.currentEpoch),this._layerView.requestUpdate(),this._renderState){const e=Array.from(this._renderState.tiles()).filter(e=>e.needsUpload);if(e.length){e[Math.floor(Math.random()*e.length)].upload(),e.length>=2&&this.requestRender()}for(const t of this._renderState.tiles())t.tryReady(this.attributeView.currentEpoch)&&(this._subscriptions.get(t.key.id)?.end(),this._layerView.requestUpdate(),this.hasLabels&&this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter(),this.requestRender())}const t=this._layerView.subscriptionManager.updateVisibility();this.setVisibleTiles(t);for(const s of this.children)s.setTransform(e.state);switch(super.renderChildren(e),e.drawPhase){case 1:return this._renderMapPhase(e);case 16:return this._renderHighlightPhase(e);case 2:return this._renderLabelPhase(e)}}subscriptions(){return this._subscriptions.values()}get hasLabels(){return this._layerView.labelingCollisionInfos.length>0}get hasHighlight(){return this._layerView.hasHighlight}get children(){return this._renderState?Array.from(this._renderState.tiles()).filter(e=>this._visibleTiles.has(e.key.id)):[]}get usedMemory(){let e=0;return this._renderState&&(e+=this._renderState.usedMemory),this._renderStateNext&&(e+=this._renderStateNext.usedMemory),e+=this.attributeView.usedMemory,e}get instanceStore(){return this._store}get layerView(){return this._layerView}get tiles(){return this._renderState?.tiles()}get _instanceStore(){return this._store}get _layer(){return this._layerView.layer}_getHeatmapInstance(e){if(null==this._instanceStore||!(e.drawPhase&a.heatmap.drawPhase))return null;for(const t of this._instanceStore.values())if(u(t))return t;return null}updateAttributeView(e){this.requestRender(),this.attributeView.requestUpdate(e),this.hasLabels&&(this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter())}updateSubscriptions(e){for(const{tileId:t,version:s}of e.subscribe){if(!this._subscriptions.has(t)){const e=new d(t,s);this._subscriptions.set(t,e),this.updatingHandles.addPromise(e.promise);continue}this._subscriptions.get(t).version=s}for(const t of e.unsubscribe){const e=this._subscriptions.get(t);e?.destroy(),this._subscriptions.delete(t),this.removeTile(t)}}isDone(e){return!!this._renderState&&this._renderState.isTileDone(e)}async updateRenderState(e){has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureContainer.updateRenderState`),this._renderStateNext=new o(()=>this._stage,e=>this._subscriptions.get(e)?.version,e,this.layerView.view.labelManager.symbolFader,this,this.tileInfoView)}getDisplayStatistics(e,t){const s=this._statisticsByLevel.get(e);return s?s.get(t):null}updateStatistics(e,t){if(this._lockStatisticUpdates)return void this._updateStatisticsRequests.push({level:e,statistics:t});let s=this._statisticsByLevel.get(e);s||(s=new Map,this._statisticsByLevel.set(e,s));for(const r of t)s.set(r.fieldName,{minValue:r.minValue,maxValue:r.maxValue})}lockForOverrides(){this._renderState?.lockUploads(),this._lockStatisticUpdates=!0,this.attributeView.locked||(this.attributeView.lockTextureUploads(),this._shouldUnlockAttributeView=!0)}unlockForOverrides(){this._renderState?.unlockUploads(),this._shouldUnlockAttributeView&&(this.attributeView.unlockTextureUploads(),this._shouldUnlockAttributeView=!1),this._lockStatisticUpdates=!1;for(const e of this._updateStatisticsRequests)this.updateStatistics(e.level,e.statistics);this._updateStatisticsRequests=[],this._renderState?.flush(),this.requestRender()}trySwapRenderState(){if(this._renderStateNext){has("esri-2d-update-debug")&&console.debug(`Version[${this._renderStateNext.version}] FeatureContainer.update.swapRenderState`);const e=new Map;for(const t of this._renderState?.tiles()||[])e.set(t.id,t.metricsVisibility);this._renderState?.destroy(),this._renderState=this._renderStateNext,this._renderState.flush();for(const t of this._renderState.tiles())t.copyMetricsVisibility(e.get(t.id)||new Set);this._renderStateNext=null}this.requestRender()}setVisibleTiles(e){this._visibleTiles=e;for(const t of this.tiles??[])t.rendering=e.has(t.key.id)}async onMessage(e,s){t(s);const r=e.inner;if(!this._subscriptions.has(r.id))return;const i=this._subscriptions.get(r.id);if(i.version!==r.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${r.subscriptionVesrion} != ${i.version}`;console.debug(`Version[${e}] Tile[${r.id}] FeatureContainer - Dropping message, outdated version]`,r)}return}const n=this._renderStateNext??this._renderState;if(!n)throw new Error("InternalError: No renderState defined");n.version!==r.version&&console.error(`InternalError: Version mismatch. [renderState: ${n.version}, message: ${r.version}]`),n.enqueueUpdate(e),this.requestRender(),this._layerView.view.labelManager.requestUpdate(),this._layerView.requestUpdate()}removeTile(e){(this._renderState||this._renderStateNext)&&(this._renderState&&this._renderState.removeTile(e),this._renderStateNext&&this._renderStateNext.removeTile(e))}hitTest(e){let t=this._hitTestsRequests.find(({x:t,y:s})=>t===e.x&&s===e.y);const r=s();return t?t.resolvers.push(r):(t={x:e.x,y:e.y,resolvers:[r]},this._hitTestsRequests.push(t)),this.requestRender(),r.promise}getSortKeys(e){const t=new Set(e),s=new Map;for(const r of this.children)if(r.getSortKeys(t).forEach((e,t)=>s.set(t,e)),s.size===t.size)break;return s}get hasAnimation(){return this.hasLabels}doRender(e){const{minScale:t,maxScale:s}=this._layer.effectiveScaleRange,r=e.state.scale;r<=(t||1/0)&&r>=s&&super.doRender(e)}afterRender(e){super.afterRender(e),this._hitTestsRequests.length&&this.requestRender()}setStencilReference(e){if(null==this._getHeatmapInstance(e))super.setStencilReference(e);else for(const t of this.children)t.stencilRef=a.heatmap.getStencilReference(t)}_renderMapPhase(e){this._layerView.featureEffectView.hasEffects?(this._renderOutsideEffect(e),this._renderInsideEffect(e)):this._renderFeatures(e,0),this._hitTestsRequests.length>0&&this._renderHittest(e)}_renderHighlightPhase(e){this.hasHighlight&&h(e,!1,e=>{this._renderFeatures(e,1)})}_renderLabelPhase(e){this._renderFeatures(e,0)}_renderInsideEffect(e){const t=e.painter.effects.insideEffect;t.bind(e),this._renderFeatures(e,2),t.draw(e,this._layerView.featureEffectView.includedEffects),t.unbind()}_renderOutsideEffect(e){const t=e.painter.effects.outsideEffect;t.bind(e),this._renderFeatures(e,3),t.draw(e,this._layerView.featureEffectView.excludedEffects),t.unbind()}_renderHittest(e){const{context:t}=e,s=e.painter.effects.hittest,r=t.getBoundFramebufferObject(),i=t.getViewport(),n=e.passOptions,a=e.drawPhase;s.bind(e),e.passOptions=s.createOptions(e,this._hitTestsRequests),e.drawPhase=8;const{distance:o,smallSymbolDistance:h}=e.passOptions,d=Math.max(o,h);for(const l of this.children)l.visible&&l.containsScreenPoint(e.state,e.passOptions.position,2*d)&&this._renderTile(l,e,0);s.draw(e),s.unbind(),t.bindFramebuffer(r),t.restoreViewport(i),e.passOptions=n,e.drawPhase=a}_renderFeatures(e,t){const s=this._getHeatmapInstance(e);null!=s?this._renderHeatmapFeatures(e,t,s):this._renderGeometryFeatures(e,t)}_renderGeometryFeatures(e,t){for(const s of this.children)s.visible&&this._renderTile(s,e,t)}_renderHeatmapFeatures(e,t,s){for(const r of this.children)r.visible&&this._renderTile(r,e,t,17);s.techniqueRef.renderResolvePass(e,s)}_renderTile(e,t,s,r){const i=has("featurelayer-strict-draw-order")?1:has("featurelayer-force-marker-text-draw-order")?2:0,n=e.getDisplayList(this._instanceStore,i);t.selection=s,n?.render(t,r)}}function u(e){return 17===e.techniqueRef.type}export{l as FeatureContainer};
|
|
5
|
+
import has from"../../../../core/has.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{throwIfAborted as t,createResolver as s}from"../../../../core/promiseUtils.js";import{UpdatingHandles as r}from"../../../../core/support/UpdatingHandles.js";import{AFeatureContainer as i}from"../../engine/AFeatureContainer.js";import n from"../../engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js";import{Techniques as a}from"../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{RenderState as o}from"./RenderState.js";import{renderHighlight as h}from"../support/util.js";class d{constructor(e,t){this.id=e,this.version=t,this._resolver=s(),this._done=!1}get done(){return this._done}get promise(){return this._resolver.promise}end(){this._resolver.resolve(),this._done=!0}destroy(){this._resolver.reject()}}class l extends i{constructor(e){super(e.view.featuresTilingScheme),this.updatingHandles=new r,this._hitTestsRequests=[],this._store=new n,this._visibleTiles=new Set,this._subscriptions=new Map,this._updateStatisticsRequests=[],this._lockStatisticUpdates=!1,this._shouldUnlockAttributeView=!1,this._layerView=e,this.addTransitionable(this._layerView.featureEffectView)}destroy(){this.updatingHandles.destroy(),super.destroy(),this._renderState=e(this._renderState),this._renderStateNext=e(this._renderStateNext)}renderChildren(e){if(this._updateAttributeView(),this._renderState?.update(this.attributeView.currentEpoch),this._layerView.requestUpdate(),this._renderState){const e=Array.from(this._renderState.tiles()).filter(e=>e.needsUpload);if(e.length){e[Math.floor(Math.random()*e.length)].upload(),e.length>=2&&this.requestRender();for(const t of e.filter(e=>e.hasMetrics))t.upload()}for(const t of this._renderState.tiles())t.tryReady(this.attributeView.currentEpoch)&&(this._subscriptions.get(t.key.id)?.end(),this._layerView.requestUpdate(),this.hasLabels&&this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter(),this.requestRender())}const t=this._layerView.subscriptionManager.updateVisibility();this.setVisibleTiles(t);for(const s of this.children)s.setTransform(e.state);switch(super.renderChildren(e),e.drawPhase){case 1:return this._renderMapPhase(e);case 16:return this._renderHighlightPhase(e);case 2:return this._renderLabelPhase(e)}}subscriptions(){return this._subscriptions.values()}get hasLabels(){return this._layerView.labelingCollisionInfos.length>0}get hasHighlight(){return this._layerView.hasHighlight}get children(){return this._renderState?Array.from(this._renderState.tiles()).filter(e=>this._visibleTiles.has(e.key.id)):[]}get usedMemory(){let e=0;return this._renderState&&(e+=this._renderState.usedMemory),this._renderStateNext&&(e+=this._renderStateNext.usedMemory),e+=this.attributeView.usedMemory,e}get instanceStore(){return this._store}get layerView(){return this._layerView}get tiles(){return this._renderState?.tiles()}get _instanceStore(){return this._store}get _layer(){return this._layerView.layer}_getHeatmapInstance(e){if(null==this._instanceStore||!(e.drawPhase&a.heatmap.drawPhase))return null;for(const t of this._instanceStore.values())if(u(t))return t;return null}updateAttributeView(e){this.requestRender(),this.attributeView.requestUpdate(e),this.hasLabels&&(this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter())}updateSubscriptions(e){for(const{tileId:t,version:s}of e.subscribe){if(!this._subscriptions.has(t)){const e=new d(t,s);this._subscriptions.set(t,e),this.updatingHandles.addPromise(e.promise);continue}this._subscriptions.get(t).version=s}for(const t of e.unsubscribe){const e=this._subscriptions.get(t);e?.destroy(),this._subscriptions.delete(t),this.removeTile(t)}}isDone(e){return!!this._renderState&&this._renderState.isTileDone(e)}async updateRenderState(e){has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureContainer.updateRenderState`),this._renderStateNext=new o(()=>this._stage,e=>this._subscriptions.get(e)?.version,e,this.layerView.view.labelManager.symbolFader,this,this.tileInfoView)}getDisplayStatistics(e,t){const s=this._statisticsByLevel.get(e);return s?s.get(t):null}updateStatistics(e,t){if(this._lockStatisticUpdates)return void this._updateStatisticsRequests.push({level:e,statistics:t});let s=this._statisticsByLevel.get(e);s||(s=new Map,this._statisticsByLevel.set(e,s));for(const r of t)s.set(r.fieldName,{minValue:r.minValue,maxValue:r.maxValue})}lockForOverrides(){this._renderState?.lockUploads(),this._lockStatisticUpdates=!0,this.attributeView.locked||(this.attributeView.lockTextureUploads(),this._shouldUnlockAttributeView=!0)}unlockForOverrides(){this._renderState?.unlockUploads(),this._shouldUnlockAttributeView&&(this.attributeView.unlockTextureUploads(),this._shouldUnlockAttributeView=!1),this._lockStatisticUpdates=!1;for(const e of this._updateStatisticsRequests)this.updateStatistics(e.level,e.statistics);this._updateStatisticsRequests=[],this._renderState?.flush(),this.requestRender()}trySwapRenderState(){if(this._renderStateNext){has("esri-2d-update-debug")&&console.debug(`Version[${this._renderStateNext.version}] FeatureContainer.update.swapRenderState`);const e=new Map;for(const t of this._renderState?.tiles()||[])e.set(t.id,t.metricsVisibility);this._renderState?.destroy(),this._renderState=this._renderStateNext,this._renderState.flush();for(const t of this._renderState.tiles())t.copyMetricsVisibility(e.get(t.id)||new Set);this._renderStateNext=null}this.requestRender()}setVisibleTiles(e){this._visibleTiles=e;for(const t of this.tiles??[])t.rendering=e.has(t.key.id)}async onMessage(e,s){t(s);const r=e.inner;if(!this._subscriptions.has(r.id))return;const i=this._subscriptions.get(r.id);if(i.version!==r.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${r.subscriptionVesrion} != ${i.version}`;console.debug(`Version[${e}] Tile[${r.id}] FeatureContainer - Dropping message, outdated version]`,r)}return}const n=this._renderStateNext??this._renderState;if(!n)throw new Error("InternalError: No renderState defined");n.version!==r.version&&console.error(`InternalError: Version mismatch. [renderState: ${n.version}, message: ${r.version}]`),n.enqueueUpdate(e),this.requestRender(),this._layerView.view.labelManager.requestUpdate(),this._layerView.requestUpdate()}removeTile(e){(this._renderState||this._renderStateNext)&&(this._renderState&&this._renderState.removeTile(e),this._renderStateNext&&this._renderStateNext.removeTile(e))}hitTest(e){let t=this._hitTestsRequests.find(({x:t,y:s})=>t===e.x&&s===e.y);const r=s();return t?t.resolvers.push(r):(t={x:e.x,y:e.y,resolvers:[r]},this._hitTestsRequests.push(t)),this.requestRender(),r.promise}getSortKeys(e){const t=new Set(e),s=new Map;for(const r of this.children)if(r.getSortKeys(t).forEach((e,t)=>s.set(t,e)),s.size===t.size)break;return s}get hasAnimation(){return this.hasLabels}doRender(e){const{minScale:t,maxScale:s}=this._layer.effectiveScaleRange,r=e.state.scale;r<=(t||1/0)&&r>=s&&super.doRender(e)}afterRender(e){super.afterRender(e),this._hitTestsRequests.length&&this.requestRender()}setStencilReference(e){if(null==this._getHeatmapInstance(e))super.setStencilReference(e);else for(const t of this.children)t.stencilRef=a.heatmap.getStencilReference(t)}_renderMapPhase(e){this._layerView.featureEffectView.hasEffects?(this._renderOutsideEffect(e),this._renderInsideEffect(e)):this._renderFeatures(e,0),this._hitTestsRequests.length>0&&this._renderHittest(e)}_renderHighlightPhase(e){this.hasHighlight&&h(e,!1,e=>{this._renderFeatures(e,1)})}_renderLabelPhase(e){this._renderFeatures(e,0)}_renderInsideEffect(e){const t=e.painter.effects.insideEffect;t.bind(e),this._renderFeatures(e,2),t.draw(e,this._layerView.featureEffectView.includedEffects),t.unbind()}_renderOutsideEffect(e){const t=e.painter.effects.outsideEffect;t.bind(e),this._renderFeatures(e,3),t.draw(e,this._layerView.featureEffectView.excludedEffects),t.unbind()}_renderHittest(e){const{context:t}=e,s=e.painter.effects.hittest,r=t.getBoundFramebufferObject(),i=t.getViewport(),n=e.passOptions,a=e.drawPhase;s.bind(e),e.passOptions=s.createOptions(e,this._hitTestsRequests),e.drawPhase=8;const{distance:o,smallSymbolDistance:h}=e.passOptions,d=Math.max(o,h);for(const l of this.children)l.visible&&l.containsScreenPoint(e.state,e.passOptions.position,2*d)&&this._renderTile(l,e,0);s.draw(e),s.unbind(),t.bindFramebuffer(r),t.restoreViewport(i),e.passOptions=n,e.drawPhase=a}_renderFeatures(e,t){const s=this._getHeatmapInstance(e);null!=s?this._renderHeatmapFeatures(e,t,s):this._renderGeometryFeatures(e,t)}_renderGeometryFeatures(e,t){for(const s of this.children)s.visible&&this._renderTile(s,e,t)}_renderHeatmapFeatures(e,t,s){for(const r of this.children)r.visible&&this._renderTile(r,e,t,17);s.techniqueRef.renderResolvePass(e,s)}_renderTile(e,t,s,r){const i=has("featurelayer-strict-draw-order")?1:has("featurelayer-force-marker-text-draw-order")?2:0,n=e.getDisplayList(this._instanceStore,i);t.selection=s,n?.render(t,r)}}function u(e){return 17===e.techniqueRef.type}export{l as FeatureContainer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"../../../../core/has.js";import{destroyMaybe as
|
|
5
|
+
import has from"../../../../core/has.js";import{destroyMaybe as t}from"../../../../core/maybe.js";import{notDeepEqual as e}from"../../../../core/object.js";import{throwIfNotAbortError as s,throwIfAborted as r,after as i}from"../../../../core/promiseUtils.js";import{diff as a}from"../../../../core/accessorSupport/diffUtils.js";import{ignoreConnectionErrors as o}from"../../../../core/workers/utils.js";import{MultiTileMeshData as n}from"../../engine/webgl/mesh/MultiTileMeshData.js";import{FeatureMeshFactory as c}from"../../engine/webgl/mesh/factories/FeatureMeshFactory.js";import{ResourceProxy as h}from"../../engine/webgl/mesh/factories/ResourceProxy.js";import{MeshWriterRegistry as u}from"../../engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{MatcherContext as g}from"../../engine/webgl/util/MatcherContext.js";import{ProcessorTileMessageQueue as p}from"./ProcessorTileMessageQueue.js";import{BinningStrategy as y}from"./processor/BinningStrategy.js";import{ClusterStrategy as d}from"./processor/ClusterStrategy.js";import{FeatureUpdateStrategy as _}from"./processor/FeatureUpdateStrategy.js";import{TrackStrategy as l}from"./processor/TrackStrategy.js";import{AttributeStore as m}from"./support/AttributeStore.js";import{ComputedAttributeStorage as f}from"./support/ComputedAttributeStorage.js";class b{constructor(t,e){this._connection=t,this._source=e,this._version=1,this._registry=new u,this._proxy=new h({fetch:(t,e)=>this._connection.layerView.fetch(t,e),fetchDictionary:(t,e)=>this._connection.layerView.fetchDictionary(t,e)}),this._attributeStore=new m({isLocal:!1,update:t=>o(this._connection.container.updateAttributeView(t))})}destroy(){this._proxy.destroy(),this._strategy?.destroy(),this._attributeStore.destroy()}get aggregateQueryEngine(){return this._strategy?.aggregateQueryEngine}get usedMemory(){let t=0;return t+=this._attributeStore.usedMemory,this._strategy&&(t+=this._strategy.usedMemory),t}get version(){return this._version}getDisplayFeatures(t){return this._strategy?this._strategy.getDisplayFeatures(t):{features:[],aggregates:[],tracks:[]}}getDisplayIds(t){const e={};return this._strategy?(this._strategy.displayMap(t,t=>t,(t,s,r)=>{e[r]=t}),e):e}getFeatureObjectIdsForAggregate(t){return this._strategy?this._strategy.getFeatureObjectIdsForAggregate(t):[]}onSubscribe(t){this._strategy?.onSubscribe(t)}onUnsubscribe(t){this._strategy?.onUnsubscribe(t)}requiresInvalidation(){return this._strategy?.requiresInvalidation()??!1}async update(t,s,r,i,o){const n=t.processor,h=e(this._schema?.storage,n.storage),u=e(this._schema?.mesh.properties,n.mesh.properties),p=e(this._schema?.mesh.factory,n.mesh.factory),y=e(this._schema?.mesh.strategy,n.mesh.strategy),d=w(this._schema?.expressionProperties,n.expressionProperties),_=d.some(t=>this._attributeStore.hasArcadeDependency(t)),l=d.some(t=>this._factory?.hasArcadeDependency(t)??!1),m=d.some(t=>this._strategy?.hasArcadeDependency(t))||this._strategy?.isAggregate&&_,b=l||m,I=u||p||y;if(!(h||I||(l||_||m))&&!i)return!1;has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] SymbolProcessor.update`,{changes:a(this._schema,n),schema:n}),this._schema=n;const j=new f({fields:this._source.metadata.fieldsIndex,spatialReference:this._source.metadata.outSpatialReference}),x={currentUser:n.mesh.properties.currentUser};if((h||I||_)&&(await this._attributeStore.update(n.storage,j,this._source.metadata,s),this._strategy?.invalidateAttributeData(S(n))),!i&&!I&&!b)return!1;(y||u||b)&&await this._updateStrategy(n.mesh.strategy,o,S(n),x),this._updateSortKey(j,"sortKey"in n.mesh.properties?n.mesh.properties.sortKey:null);const v="dictionary"===n.mesh.factory.symbology.type?n.mesh.factory.symbology.fieldMap:null,M=new g(j,this._proxy,r,this._registry,v);return(p||"dictionary"===n.mesh.factory.symbology.type)&&(this._factory=await c.create(M,n.mesh.factory)),this._version=s,!0}async applyOverrideUpdate(t){if(!this._strategy)return;const e=this._strategy.applyOverrideUpdate(t);for await(const r of e)try{await this._process(r)}catch(s){}}async updateChunks(){await this._doUpdateChunks(),this._strategy?.afterUpdateChunks()}async removeChunks(t){this._strategy?.removeChunks(t),this._attributeStore.incrementDisplayIdGeneration()}updateHighlight({highlights:t}){if(!this._strategy||!this._strategy.hasSubscribers)return void this._attributeStore.setHighlight(t.map(({objectId:t,highlightFlags:e})=>({objectId:t,highlightFlags:e,displayId:-1})),t);const e=this._strategy.displayMap(t,({objectId:t})=>t,(t,{highlightFlags:e},s)=>({objectId:s,displayId:t,highlightFlags:e}));this._attributeStore.setHighlight(e,t)}invalidate(){this._strategy&&this._strategy.invalidate()}async _doUpdateChunks(){if(!this._strategy)return;const t=this._strategy.updateChunks(),e=[],r=new Map;for await(const a of t){let t=r.get(a.id);null==t&&(t=new p({concurrency:16,process:t=>this._process(t)}),r.set(a.id,t));const i=t.push(a).catch(t=>s(t));e.push(i)}try{await Promise.all(e)}catch(i){}has("esri-2d-update-debug")&&console.log("SendUpdates"),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")&&console.log("SendUpdates.await")}async _updateStrategy(t,e,s,r){switch(this._strategy?.destroy(),t.type){case"feature":this._strategy=new _(this._source,this._attributeStore,s,r);break;case"binning":this._strategy=await y.create(t,this._source,this._attributeStore,s,r);break;case"cluster":this._strategy=await d.create(this._connection,t,this._source,this._attributeStore,s,r);break;case"track":this._strategy=await l.create(t,this._source,this._attributeStore,s,r)}for(const i of e)this._strategy.onSubscribe(i)}async _updateSortKey(e,s){if(this._sortInfo=t(this._sortInfo?.computed),null!=s){const t=s.byRenderer?null:await e.createComputedField(s);this._sortInfo={...s,computed:t}}}async _process(t){const e=t.subscription;if(has("esri-2d-update-debug")){const s=e.tile;console.debug(`Version[${this._version}] Tile[${s.key.id}, end=${t.end}] Processor._process`)}const s={currentUser:this._schema?.mesh.properties.currentUser};await this._fetchResources(t,s),r(e.signal);const i=await this._write(t,e.tile.createArcadeEvaluationOptions(S(this._schema)),s),a=e.tile.tileInfoView.getLODInfoAt(e.tile.key);r(e.signal);const{message:o,transferList:n}=i.serialize(a),c={objectIdMap:null,inner:t.createMessage(o,this._version,this._attributeStore.epoch)};if(this._schema?.mesh.properties.returnMeshObjectId){c.objectIdMap={};const e=t.reader?.getCursor();if(e)for(;e.next();)c.objectIdMap[e.getDisplayId()]=e.getObjectId()}if(r(e.signal),await this._connection.container.onMessage(c,{signal:e.signal,transferList:n}),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")){const s=e.tile;console.debug(`Version[${this._version}] Tile[${s.key.id}, end=${t.end}] Processor._process.await`)}}async _fetchResources(t,e){await this._fetchMatcherResources(t),await this._fetchWriterResources(t,e)}async _fetchMatcherResources(t){if(t.reader)return this._factory.enqueueMatcherRequests(this._proxy,t.reader)}async _fetchWriterResources(t,e){if(!t.reader)return;const s=t.reader.getCursor(),r=t.subscription.tile.createArcadeEvaluationOptions(S(this._schema));for(;s.next();)this._factory.enqueueWriterRequests(this._proxy,s,r,e);await this._proxy.fetchEnqueuedResources()}async _write(t,e,s){const a=t.subscription.tile,o=t.reader?.getCursor(),c=o?.getSize()??0,h=a.tileInfoView.tileInfo.isWrappable,u=a.tileInfoView.tileInfo.spatialReference.isWGS84,g=new n(a.key,this._strategy.enablePixelBuffering,h,u,c);if(!o)return g;const p=a.createArcadeEvaluationOptions(S(this._schema));let y=0;for(;o.next();){++y%1e3||(await i(0),r(t.subscription));const n=this._getSortKeyValue(o,e);g.entityStart(o.getDisplayId(),n),this._factory.write(g,this._proxy,o,p,s,a.level),g.entityEnd()}return g}_getSortKeyValue(t,e){if(!this._sortInfo)return 0;const{computed:s,order:r,byRenderer:i}=this._sortInfo,a=i?this._factory.getSortKey(t,e):s?.read(t,e);return null==a||isNaN(a)?0:a*("asc"===r?-1:1)}}function w(t,e){const s=[];return t?.timeExtent?.start===e.timeExtent?.start&&t?.timeExtent?.end===e.timeExtent?.end||s.push("timeProperties"),s}function S(t){const{timeZone:e}=t?.mesh.properties??{},{timeExtent:s}=t?.expressionProperties??{};return{timeZone:e,timeExtent:s}}export{b as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../../geometry/SpatialReference.js";import{convertToFeature as t,unquantizeOptimizedGeometryInPlace as s}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as a}from"../../../../../layers/graphics/OptimizedFeature.js";import{checkProjectionSupport as r}from"../../../../../layers/graphics/data/projectionSupport.js";import i from"../../../../../layers/support/FieldsIndex.js";import{ComputedAggregateField as o}from"../aggregation/ComputedAggregateField.js";import{AAggregateStrategy as n}from"./AAggregateStrategy.js";import{ASendState as l}from"./AProcessorStrategy.js";import{FeatureTileAppendMessage as d,FeatureTileUpdateMessage as c}from"../sources/FeatureSourceMessage.js";import{ComputedAttributeStorage as u}from"../support/ComputedAttributeStorage.js";import f from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as p}from"../support/FeatureMetadata.js";import{FeatureSetReaderJSON as h}from"../support/FeatureSetReaderJSON.js";import m from"../../../tiling/TileKey.js";class g extends l{constructor(e,t){super(e),this.bins=new Map,this.featureCache=new Map,this.done=!1,this._store=t}reset(){this.destroy(),this.done=!1}destroy(){const e=this.subscription.tile.key.level;for(const t of this.featureCache.keys())this._store.releaseDisplayIdForObjectId(`${t}.${e}`);this.bins.clear(),this.featureCache.clear(),this.handledChunks.clear()}get tile(){return this.subscription.tile}*featuresWorldSpace(){for(const e of this.featureCache.values()){const t=e.clone();t.geometry&&s(t.geometry,this.subscription.tile.transform),yield t}}}class y extends n{static async create(t,s,a,i,n
|
|
5
|
+
import e from"../../../../../geometry/SpatialReference.js";import{convertToFeature as t,unquantizeOptimizedGeometryInPlace as s}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as a}from"../../../../../layers/graphics/OptimizedFeature.js";import{checkProjectionSupport as r}from"../../../../../layers/graphics/data/projectionSupport.js";import i from"../../../../../layers/support/FieldsIndex.js";import{ComputedAggregateField as o}from"../aggregation/ComputedAggregateField.js";import{AAggregateStrategy as n}from"./AAggregateStrategy.js";import{ASendState as l}from"./AProcessorStrategy.js";import{FeatureTileAppendMessage as d,FeatureTileUpdateMessage as c}from"../sources/FeatureSourceMessage.js";import{ComputedAttributeStorage as u}from"../support/ComputedAttributeStorage.js";import f from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as p}from"../support/FeatureMetadata.js";import{FeatureSetReaderJSON as h}from"../support/FeatureSetReaderJSON.js";import m from"../../../tiling/TileKey.js";class g extends l{constructor(e,t){super(e),this.bins=new Map,this.featureCache=new Map,this.done=!1,this._store=t}reset(){this.destroy(),this.done=!1}destroy(){const e=this.subscription.tile.key.level;for(const t of this.featureCache.keys())this._store.releaseDisplayIdForObjectId(`${t}.${e}`);this.bins.clear(),this.featureCache.clear(),this.handledChunks.clear()}get tile(){return this.subscription.tile}*featuresWorldSpace(){for(const e of this.featureCache.values()){const t=e.clone();t.geometry&&s(t.geometry,this.subscription.tile.transform),yield t}}}class y extends n{static async create(t,s,a,i,n){const l=s.metadata.outSpatialReference,d=new u({spatialReference:l}),c=await Promise.all(t.fields.map(async e=>o.create(d,e))),p=t.featureFilter?await f.create({geometryType:s.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:s.metadata.timeInfo,fieldsIndex:s.metadata.fieldsIndex,spatialReference:l,filterJSON:t.featureFilter}):null;return"geohash"===t.index.type&&await r(l,e.WGS84),new y(t,p,i,c,l,s,a,n)}constructor(e,t,s,a,r,o,n,l){super(o,n,r,a,l),this._schema=e,this._featureFilter=t,this._arcadeContextInfo=s,this._metadata=p.createFeature({geometryType:"esriGeometryPolygon",featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:new i(e.fields).toJSON(),globalIdField:null,spatialReference:o.metadata.spatialReference,outSpatialReference:o.metadata.outSpatialReference,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null})}createState(e){return new g(e,this._attributeStore)}async*applyOverrideUpdate(e){for(const t of this._sendStates.values()){t.reset();const e=new d(t.subscription,h.empty(this._source.metadata),!0,!1,{});yield e}}displayMap(e,t,s){const a=new Map(e.map(e=>[t(e),e])),r=[];for(const i of this._sendStates.values())for(const e of i.featuresWorldSpace()){const{objectId:t,displayId:i}=e,o=a.get(t);if(null!=o){const e=s(i,o,t);r.push(e),a.delete(t)}}return r}getDisplayFeatures(e){const s=new Set(e),a=new Set,r=[];for(const i of this._sendStates.values())for(const e of i.featuresWorldSpace())s.has(e.displayId)&&!a.has(e.objectId)&&(e.geometry&&r.push({...t(e,this._metadata.geometryType,!1,!1),displayId:e.displayId}),a.add(e.objectId));return{features:[],aggregates:r,tracks:[]}}getFeatureObjectIdsForAggregate(e){for(const t of this._sendStates.values())for(const s of t.bins.values())if(s.id===e)return Array.from(s.containedObjectIds);return[]}async*updateChunks(){for(const e of this._sendStates.values())yield*this._update(e,this._source)}forEachAggregateWorldSpace(e){const t=new Set;for(const s of this._sendStates.values())for(const a of s.featuresWorldSpace())t.has(a.objectId)||(e(a),t.add(a.objectId))}_createIndexOptions(e){switch(this._schema.index.type){case"geohash":return{type:"geohash",fields:this.aggregateFields,featureFilter:this._featureFilter,geohashLevel:this._schema.index.fixBinLevel,spatialReference:this.spatialReference,arcadeContextInfo:this._arcadeContextInfo,scale:e.scale,sqlOptions:this._sqlOptions};case"grid":{const t=this._schema.index.fixedBinLevel,s=null!=t?e.tileInfoView.getLODInfoAt(t).scale:e.scale;return{type:"grid",fields:this.aggregateFields,cellSize:this._schema.index.size,featureFilter:this._featureFilter,spatialReference:this.spatialReference,arcadeContextInfo:this._arcadeContextInfo,scale:s,sqlOptions:this._sqlOptions}}}}async*_update(e,t){const{handledChunks:s,subscription:r,bins:i,featureCache:o}=e,n=r.tile;if(e.done)return;for(const a of t.chunks()){if(s.has(a.chunkId))continue;s.add(a.chunkId);const t=a.queryInfo;if("tileId"in t){const e=new m(t.tileId);if(e.level!==n.level||e.world!==n.key.world)continue}a.getAggregateIndex(this._createIndexOptions(e.tile)).putBounded(i,e.tile.extent,e.tile.resolution)}const l=[],d=r.tile.transform,u=r.tile.key.level;for(const c of i.values()){let e=o.get(c.id);if(e)e.attributes=c.getAttributes();else{const t=c.getGeometry(this.spatialReference,d);e=new a(t,c.getAttributes(),null,c.id),t||(e.centroid=c.getGeometricCentroid(this.spatialReference,d)),e.displayId=this._attributeStore.createDisplayIdForObjectId(`${e.objectId}.${u}`),o.set(c.id,e)}l.push(e)}this.events.emit("changed"),e.done=!t.updateTracking.updating;const f=h.fromOptimizedFeatures(l,this._metadata,d),p=f.getCursor(),g=e.subscription.tile.createArcadeEvaluationOptions(this._arcadeContextInfo);for(;p.next();)this._attributeStore.setAttributeData(p.getDisplayId(),p,g,this._sqlOptions);const y=new c(e.subscription,f,[],e.done,{});yield y}}export{g as BinningState,y as BinningStrategy};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{convertToFeature as e}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as t}from"../../../../../layers/graphics/OptimizedFeature.js";import s from"../../../../../layers/graphics/OptimizedGeometry.js";import i from"../../../../../layers/support/FieldsIndex.js";import{tileSize as r}from"../../../engine/webgl/definitions.js";import{ComputedAggregateField as n}from"../aggregation/ComputedAggregateField.js";import{GridCell as a}from"../aggregation/GridCell.js";import{pixelsPerMapUnit as l}from"../aggregation/GridSpatialIndex.js";import{AAggregateStrategy as o}from"./AAggregateStrategy.js";import{ASendState as d}from"./AProcessorStrategy.js";import{WithDisplayId as u}from"./support/WithDisplayId.js";import{FeatureTileAppendMessage as c}from"../sources/FeatureSourceMessage.js";import{ComputedAttributeStorage as h}from"../support/ComputedAttributeStorage.js";import p from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as f}from"../support/FeatureMetadata.js";import{FeatureSetReaderJSON as g}from"../support/FeatureSetReaderJSON.js";import _ from"../../../tiling/TileKey.js";const m=128;class y extends d{constructor(e){super(e),this.didSend=!1,this.done=!1}}class S{constructor(e,t,s,i,r){this._level=e,this._scale=t,this._indexOptions=s,this._clusterRadius=i,this._store=r,this._cells=new Map,this._handledChunks=new Set,this._statistics=new Map,this._clusters=new Map}destroy(){this._clearClusters()}_clearClusters(){for(const e of this._clusters.values())this._store.releaseDisplayIdForObjectId(e.inner.id);this._clusters.clear()}*aggregatesWorldSpace(){for(const e of this._clusters.values()){const s=e.inner.getCentroid(null),i=new t(s,e.inner.getAttributes(),null,e.inner.id,e.displayId);yield i}}clusters(){return this._clusters.values()}updateChunks(e,t){let s=!1;for(const a of e){const e=a.queryInfo;if("tileId"in e){if(new _(e.tileId).level!==this._level)continue}if(!this._handledChunks.has(a.normalizedChunkId)){this._handledChunks.add(a.normalizedChunkId),s=!0;a.getAggregateIndex({...this._indexOptions,scale:this._scale}).put(this._cells)}}const i={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0},r=l(this._indexOptions.spatialReference,this._scale),n=this._indexOptions.cellSize;for(const{subscription:a}of t){const e=a.tile.bounds,t=Math.floor(e[0]*r/n),s=Math.floor(e[1]*r/n),l=Math.ceil(e[2]*r/n),o=Math.ceil(e[3]*r/n);i.xMin=Math.min(i.xMin,t),i.yMin=Math.min(i.yMin,s),i.xMax=Math.max(i.xMax,l),i.yMax=Math.max(i.yMax,o)}return null!=this._lastCellBounds&&i.xMin===this._lastCellBounds.xMin&&i.yMin===this._lastCellBounds.yMin&&i.yMin===this._lastCellBounds.yMin&&i.yMax===this._lastCellBounds.yMax||(s=!0,this._lastCellBounds=i),s&&this._clusterCells(i),s}async updateStatistics(e){let t=!1;for(const s of this._clusters.values())s.inner.count>1&&(t=this._updateAggregateStatistics(this._statistics,s.inner)||t);if(t){const t=Array.from(this._statistics.entries()).map(([e,t])=>({fieldName:e,minValue:t.minValue,maxValue:t.maxValue}));await e.container.updateStatistics(this._level,t)}}createAggregateFeatures(e,i){const n=e.subscription,a=[],l=n.tile.transform;for(const o of this._clusters.values()){let e=o.inner.getCentroidX(l);const i=o.inner.getCentroidY(l),d=n.tile.lod,u=d.wrap?d.worldSize[0]:null,c=1===o.inner.count?o.inner.firstObjectId:o.inner.id,h=o.displayId;if(null!=u)if(1===u){const n=new s([],[e,i]),l=new t(n,o.inner.getAttributes(),null,c,h);l.geometry.coords[0]-=r,a.push(l);const d=new s([],[e,i]),u=new t(d,o.inner.getAttributes(),null,c,h);u.geometry.coords[0]+=r,a.push(u)}else e>r+r/2?e-=u*r:e<-256&&(e+=u*r);if(e<r+m&&e>=-m&&i<r+m&&i>=-m){const r=new s([],[e,i]),n=new t(r,o.inner.getAttributes(),null,c,h);a.push(n)}}return g.fromOptimizedFeatures(a,i,n.tile.transform)}_clusterCells(e){let t=Array.from(this._cells.values());t=t.sort((e,t)=>t.count-e.count);const s=[];for(const a of this._clusters.values())s.push(a.inner.id);this._clusters.clear();const i=this._clusterRadius*(1/l(this._indexOptions.spatialReference,this._scale)),r=1+this._clusterRadius/this._indexOptions.cellSize,n=new Set;for(const l of t){if(n.has(l.id))continue;if(l.gridX<e.xMin||l.gridX>e.xMax||l.gridY<e.yMin||l.gridY>e.yMax)continue;const t=this._store.createDisplayIdForObjectId(l.id),s=new u(l.clone(),t);n.add(l.id),this._clusters.set(l.id,s);const o=l.centroidXWorld,d=l.centroidYWorld;for(let e=l.gridY-r;e<=l.gridY+r;e++)for(let t=l.gridX-r;t<=l.gridX+r;t++){if(e===l.gridY&&t===l.gridX)continue;const r=this._cells.get(a.createId(t,e));if(!r||n.has(r.id))continue;const u=Math.abs(r.centroidXWorld-o),c=Math.abs(r.centroidYWorld-d);u<i&&c<i&&(s.inner.merge(r),n.add(r.id))}}for(const a of s)this._store.releaseDisplayIdForObjectId(a)}_updateAggregateStatistics(e,t){let s=!1;for(const i of t.statistics.values()){if("esriFieldTypeString"===i.field.type)continue;const t=i.value,r=i.field,n=e.get(r.name);if(n){const{minValue:e,maxValue:i}=n,r=Math.min(n.minValue,t),a=Math.max(n.maxValue,t);e===r&&i===a||(n.minValue=r,n.maxValue=a,s=!0);continue}e.set(r.name,{minValue:t,maxValue:t}),s=!0}return s}}class x extends o{static async create(e,t,s,i,r,a
|
|
5
|
+
import{convertToFeature as e}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as t}from"../../../../../layers/graphics/OptimizedFeature.js";import s from"../../../../../layers/graphics/OptimizedGeometry.js";import i from"../../../../../layers/support/FieldsIndex.js";import{tileSize as r}from"../../../engine/webgl/definitions.js";import{ComputedAggregateField as n}from"../aggregation/ComputedAggregateField.js";import{GridCell as a}from"../aggregation/GridCell.js";import{pixelsPerMapUnit as l}from"../aggregation/GridSpatialIndex.js";import{AAggregateStrategy as o}from"./AAggregateStrategy.js";import{ASendState as d}from"./AProcessorStrategy.js";import{WithDisplayId as u}from"./support/WithDisplayId.js";import{FeatureTileAppendMessage as c}from"../sources/FeatureSourceMessage.js";import{ComputedAttributeStorage as h}from"../support/ComputedAttributeStorage.js";import p from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as f}from"../support/FeatureMetadata.js";import{FeatureSetReaderJSON as g}from"../support/FeatureSetReaderJSON.js";import _ from"../../../tiling/TileKey.js";const m=128;class y extends d{constructor(e){super(e),this.didSend=!1,this.done=!1}}class S{constructor(e,t,s,i,r){this._level=e,this._scale=t,this._indexOptions=s,this._clusterRadius=i,this._store=r,this._cells=new Map,this._handledChunks=new Set,this._statistics=new Map,this._clusters=new Map}destroy(){this._clearClusters()}_clearClusters(){for(const e of this._clusters.values())this._store.releaseDisplayIdForObjectId(e.inner.id);this._clusters.clear()}*aggregatesWorldSpace(){for(const e of this._clusters.values()){const s=e.inner.getCentroid(null),i=new t(s,e.inner.getAttributes(),null,e.inner.id,e.displayId);yield i}}clusters(){return this._clusters.values()}updateChunks(e,t){let s=!1;for(const a of e){const e=a.queryInfo;if("tileId"in e){if(new _(e.tileId).level!==this._level)continue}if(!this._handledChunks.has(a.normalizedChunkId)){this._handledChunks.add(a.normalizedChunkId),s=!0;a.getAggregateIndex({...this._indexOptions,scale:this._scale}).put(this._cells)}}const i={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0},r=l(this._indexOptions.spatialReference,this._scale),n=this._indexOptions.cellSize;for(const{subscription:a}of t){const e=a.tile.bounds,t=Math.floor(e[0]*r/n),s=Math.floor(e[1]*r/n),l=Math.ceil(e[2]*r/n),o=Math.ceil(e[3]*r/n);i.xMin=Math.min(i.xMin,t),i.yMin=Math.min(i.yMin,s),i.xMax=Math.max(i.xMax,l),i.yMax=Math.max(i.yMax,o)}return null!=this._lastCellBounds&&i.xMin===this._lastCellBounds.xMin&&i.yMin===this._lastCellBounds.yMin&&i.yMin===this._lastCellBounds.yMin&&i.yMax===this._lastCellBounds.yMax||(s=!0,this._lastCellBounds=i),s&&this._clusterCells(i),s}async updateStatistics(e){let t=!1;for(const s of this._clusters.values())s.inner.count>1&&(t=this._updateAggregateStatistics(this._statistics,s.inner)||t);if(t){const t=Array.from(this._statistics.entries()).map(([e,t])=>({fieldName:e,minValue:t.minValue,maxValue:t.maxValue}));await e.container.updateStatistics(this._level,t)}}createAggregateFeatures(e,i){const n=e.subscription,a=[],l=n.tile.transform;for(const o of this._clusters.values()){let e=o.inner.getCentroidX(l);const i=o.inner.getCentroidY(l),d=n.tile.lod,u=d.wrap?d.worldSize[0]:null,c=1===o.inner.count?o.inner.firstObjectId:o.inner.id,h=o.displayId;if(null!=u)if(1===u){const n=new s([],[e,i]),l=new t(n,o.inner.getAttributes(),null,c,h);l.geometry.coords[0]-=r,a.push(l);const d=new s([],[e,i]),u=new t(d,o.inner.getAttributes(),null,c,h);u.geometry.coords[0]+=r,a.push(u)}else e>r+r/2?e-=u*r:e<-256&&(e+=u*r);if(e<r+m&&e>=-m&&i<r+m&&i>=-m){const r=new s([],[e,i]),n=new t(r,o.inner.getAttributes(),null,c,h);a.push(n)}}return g.fromOptimizedFeatures(a,i,n.tile.transform)}_clusterCells(e){let t=Array.from(this._cells.values());t=t.sort((e,t)=>t.count-e.count);const s=[];for(const a of this._clusters.values())s.push(a.inner.id);this._clusters.clear();const i=this._clusterRadius*(1/l(this._indexOptions.spatialReference,this._scale)),r=1+this._clusterRadius/this._indexOptions.cellSize,n=new Set;for(const l of t){if(n.has(l.id))continue;if(l.gridX<e.xMin||l.gridX>e.xMax||l.gridY<e.yMin||l.gridY>e.yMax)continue;const t=this._store.createDisplayIdForObjectId(l.id),s=new u(l.clone(),t);n.add(l.id),this._clusters.set(l.id,s);const o=l.centroidXWorld,d=l.centroidYWorld;for(let e=l.gridY-r;e<=l.gridY+r;e++)for(let t=l.gridX-r;t<=l.gridX+r;t++){if(e===l.gridY&&t===l.gridX)continue;const r=this._cells.get(a.createId(t,e));if(!r||n.has(r.id))continue;const u=Math.abs(r.centroidXWorld-o),c=Math.abs(r.centroidYWorld-d);u<i&&c<i&&(s.inner.merge(r),n.add(r.id))}}for(const a of s)this._store.releaseDisplayIdForObjectId(a)}_updateAggregateStatistics(e,t){let s=!1;for(const i of t.statistics.values()){if("esriFieldTypeString"===i.field.type)continue;const t=i.value,r=i.field,n=e.get(r.name);if(n){const{minValue:e,maxValue:i}=n,r=Math.min(n.minValue,t),a=Math.max(n.maxValue,t);e===r&&i===a||(n.minValue=r,n.maxValue=a,s=!0);continue}e.set(r.name,{minValue:t,maxValue:t}),s=!0}return s}}class x extends o{static async create(e,t,s,i,r,a){const l=s.metadata.outSpatialReference,o=new h({spatialReference:l}),d={type:"grid",fields:await Promise.all(t.fields.map(async e=>n.create(o,e))),spatialReference:l,featureFilter:t.featureFilter?await p.create({geometryType:s.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:s.metadata.timeInfo,fieldsIndex:s.metadata.fieldsIndex,spatialReference:l,filterJSON:t.featureFilter}):null,cellSize:t.clusterRadius/4,arcadeContextInfo:r,sqlOptions:a};return new x(e,t.clusterRadius,d,t.fields,s,i,a)}constructor(e,t,s,r,n,a,l){super(n,a,s.spatialReference,s.fields,l),this._connection=e,this._clusterRadius=t,this._indexOptions=s,this._cellsPerScale=new Map,this._metadata=f.createFeature({geometryType:"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:new i([...r,...this._source.metadata.fieldsIndex.fields,{name:"aggregateId",alias:"aggregateId",type:"esriFieldTypeOID"}]).toJSON(),globalIdField:null,spatialReference:n.metadata.spatialReference,outSpatialReference:n.metadata.outSpatialReference,subtypeField:null,subtypes:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null})}get enablePixelBuffering(){return!1}invalidate(){super.invalidate();for(const e of this._cellsPerScale.values())e.destroy();this._cellsPerScale.clear()}onSubscribe(e){super.onSubscribe(e),this._requiredLevel=e.tile.level,this._requiredScale=e.tile.scale}createState(e){return new y(e)}async*applyOverrideUpdate(e){for(const t of this._cellsPerScale.values())t.destroy();this._cellsPerScale.clear();for(const t of this._sendStates.values())t.done=!1}displayMap(e,t,s){const i=new Map(e.map(e=>[t(e),e])),r=[],n=this._getClusterState(this._requiredLevel,this._requiredScale);for(const a of n.clusters()){const e=i.get(a.inner.id);if(null!=e){const t=s(a.displayId,e,a.inner.id);r.push(t),i.delete(a.inner.id);continue}if(1===a.inner.count){const{firstObjectId:e}=a.inner,t=e?i.get(e):null;if(null!=t){const n=s(a.displayId,t,e);r.push(n),i.delete(e)}}}return r}getDisplayFeatures(t){const s=new Set(t),i=new Set,r=[],n=[],a=this._getClusterState(this._requiredLevel,this._requiredScale);for(const l of a.aggregatesWorldSpace())if(s.has(l.displayId)&&!i.has(l.displayId)){const t=e(l,this._metadata.geometryType,!1,!1);if(i.add(l.displayId),1===t.attributes.cluster_count){r.push({...t,displayId:l.displayId});continue}n.push({...t,displayId:l.displayId})}return{features:r,aggregates:n,tracks:[]}}getFeatureObjectIdsForAggregate(e){const t=this._getClusterState(this._requiredLevel,this._requiredScale);for(const s of t.clusters())if(s.inner.id===e)return Array.from(s.inner.containedObjectIds);return[]}async*updateChunks(){const e=this._source.chunks();if(!e.length)return;const t=this._getClusterState(this._requiredLevel,this._requiredScale),s=Array.from(this._sendStates.values()).filter(e=>e.subscription.tile.level===this._requiredLevel);if(t.updateChunks(e,s)||!this._source.updateTracking.updating)for(const n of s)n.subscription.tile.level===this._requiredLevel&&(n.didSend=!1,n.done=!1);const i=Array.from(this._sendStates.values()).filter(e=>e.done).map(e=>e.subscription.tile.key),r=new Set(i);for(const n of this._sendStates.values()){if(this._source.updateTracking.updating){if(i.some(e=>e.containsChild(n.subscription.tile.key)))continue;if(n.subscription.tile.key.getChildKeys().every(e=>r.has(e)))continue}n.didSend||n.subscription.tile.level!==this._requiredLevel||(n.didSend=!0,yield*this._update(n,t,this._source))}await t.updateStatistics(this._connection)}forEachAggregateWorldSpace(e){if(null==this._requiredLevel||null==this._requiredScale)return;const t=this._getClusterState(this._requiredLevel,this._requiredScale);for(const s of t.aggregatesWorldSpace())e(s)}_getClusterState(e,t){if(null==e||null==t)throw new Error("InternalError: Level and scale must be defined");let s=this._cellsPerScale.get(t);return s||(s=new S(e,t,this._indexOptions,this._clusterRadius,this._attributeStore),this._cellsPerScale.set(t,s)),s}async*_update(e,t,s){if(e.done)return;const i=t.createAggregateFeatures(e,this._metadata);this.events.emit("changed"),e.done=!s.updateTracking.updating;const r=i.getCursor(),n=e.subscription.tile.createArcadeEvaluationOptions(this._indexOptions.arcadeContextInfo);for(;r.next();)this._attributeStore.setAttributeData(r.getDisplayId(),r,n,this._sqlOptions);const a=new c(e.subscription,i,!0,e.done,{});yield a}}export{y as ClusterState,x as ClusterStrategy};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as t}from"../../../../../core/arrayUtils.js";import e from"../../../../../core/Logger.js";import{assertIsSome as s}from"../../../../../core/maybe.js";import{isLoaded as r,load as i,execute as a}from"../../../../../geometry/operators/gx/operatorGeodeticDensify.js";import{geodeticCurveType as o}from"../../../../../geometry/operators/support/geodeticCurveType.js";import{intersectsWithMargin as n,fromValues as l,intersects as c,empty as d,expandPointInPlace as u}from"../../../../../geometry/support/aaBoundingRect.js";import{getClosestDenormalizedXToReference as h}from"../../../../../geometry/support/normalizeUtils.js";import{normalizeCentralMeridianForDisplay as p}from"../../../../../geometry/support/normalizeUtilsSync.js";import{quantizeOptimizedGeometry as m,convertToGeometry as f,convertFromPolyline as b}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as g}from"../../../../../layers/graphics/OptimizedFeature.js";import _ from"../../../../../layers/graphics/OptimizedGeometry.js";import{internalTrackPartField as y,externalTrackLineOidPrefix as I,internalTimeReceivedField as v}from"../../../../../layers/support/streamLayerUtils.js";import{tileSize as k}from"../../../engine/webgl/definitions.js";import{AccumulatedStatistics as F}from"../aggregation/AccumulatedStatistics.js";import{ComputedAggregateField as O}from"../aggregation/ComputedAggregateField.js";import{AAggregateStrategy as j}from"./AAggregateStrategy.js";import{ASendState as x}from"./AProcessorStrategy.js";import{FeatureTileAppendMessage as T}from"../sources/FeatureSourceMessage.js";import{createArcadeEvaluationOptions as S}from"../support/arcadeUtils.js";import{ComputedAttributeStorage as R}from"../support/ComputedAttributeStorage.js";import D from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as w}from"../support/FeatureMetadata.js";import{FeatureSetReaderIndirect as L}from"../support/FeatureSetReaderIndirect.js";import{FeatureSetReaderJSON as A}from"../support/FeatureSetReaderJSON.js";let G;const C=()=>e.getLogger("esri.views.2d.layers.features.processor.TrackStrategy"),P=32;class W{constructor(t,e,s,r,i){this.chunkIndex=t,this.featureIndex=e,this.objectId=s,this.displayId=r,this.time=i}}class z{static getOid(t){return I+t}constructor(t,e,s,r,i,a,o,n){this._schema=t,this.trackId=e,this.objectId=s,this.displayId=r,this._fields=i,this._spatialReference=a,this._metadata=o,this._isStream=n,this._maxDisplayDuration=this._schema.maxDisplayDuration>0?this._schema.maxDisplayDuration:1/0,this._maxDisplayObservationsPerTrack=this._schema.maxDisplayObservationsPerTrack>=1?this._schema.maxDisplayObservationsPerTrack:1/0,this._observationRecords=[],this._nextObservationRecords=[],this._trackLinePath=[],this._bounds=[],this._trackLineGeometry=new _}get _trackLineAttributes(){const t={...this._latestObservationFeature?.attributes,aggregateId:this.objectId,[y]:0};if(null!=this._statistics)for(const e of this._statistics.values())t[e.field.name]=e.value;return t}get _startTimeField(){return this._metadata.timeInfo?.startTimeField}get length(){return this._observationRecords.length}*observations(){yield*this._observationRecords}*previousObservations(){for(let t=0;t<this._observationRecords.length-1;t++)yield this._observationRecords[t]}get latestObservationFeature(){return this._latestObservationFeature}get latestObservationRecord(){return this._latestObservationRecord}stageObservation(t,e){this._nextObservationRecords.push(new W(t,e.getIndex(),e.getObjectId(),e.getDisplayId(),null!=this._startTimeField?e.readAttributeAsTimestamp(this._startTimeField):null))}commitObservations(t,e,r){const i=new Set(this._nextObservationRecords.map(t=>t.objectId)),a=this._observationRecords.filter(t=>!i.has(t.objectId)).map(t=>t.objectId);let o,n;switch(this._observationRecords=[],this._trackLinePath=[],this._isStream||null==this._startTimeField||this._nextObservationRecords.sort((t,e)=>{const s=t.time,r=e.time;return null!=s&&null!=r?s-r:0}),this._schema.timeField){case"startTimeField":o=this._metadata.timeInfo?.startTimeField;break;case"endTimeField":o=this._metadata.timeInfo?.endTimeField;break;case"timeReceived":o=this._isStream?v:null}n=this._isStream?r?.end??Date.now():r?.end??-1/0;const l=e.map(t=>t.reader.getCursor());let c;for(let d=this._nextObservationRecords.length-1;d>=0&&!(this._observationRecords.length>=this._maxDisplayObservationsPerTrack);d--){const t=this._nextObservationRecords[d],e=l[t.chunkIndex];s(e),e.setIndex(t.featureIndex);const r=null!=o?e.readAttributeAsTimestamp(o):null;(null!=r?n-r:0)>=this._maxDisplayDuration||(this._commitObservation(t,e),c??=t)}if(null!=c){const{chunkIndex:e,featureIndex:r}=c,i=`${c.objectId}.latest`,o=t.createDisplayIdForObjectId(i),n=l[e];s(n),n.setIndex(r);const d=new g(n.readGeometryWorldSpace(),{...n.readAttributes(),[y]:1},null,i,o);this._latestObservationFeature&&a.push(this._latestObservationFeature.objectId),this._latestObservationFeature=d,this._latestObservationRecord=c}else this._latestObservationFeature=null;return this._trackLineGeometry=q(this._trackLinePath,this._spatialReference),this._bounds=N(this._trackLineGeometry),this._nextObservationRecords=[],a}updateStatistics(t,e){this._statistics=F.create(this._fields);const r=t.map(t=>t.reader.getCursor());for(const{chunkIndex:i,featureIndex:a}of this._observationRecords){const t=r[i];s(t),t.setIndex(a),this._statistics.insert(t,e)}}overlapsTile(t){for(const e of this._bounds)if(n(e,t.bounds,P))return!0;return!1}getLatestObservationFeatureForTile(t){if(null==this._latestObservationFeature)return null;const{objectId:e,displayId:s,geometry:r,attributes:i}=this._latestObservationFeature,a=m(r,this._metadata.geometryType,t.subscription.tile.transform)??new _,o=l(1/0,1/0,-1/0,-1/0);E(a,(t,e)=>u(o,[t,e]));if(!c(o,l(0,0,k,k)))return null;return new g(a,i,null,e,s)}getTrackLineFeatureForTile(t){const e=m(this._trackLineGeometry,"esriGeometryPolyline",t.subscription.tile.transform)??new _;return new g(e,this._trackLineAttributes,null,this.objectId,this.displayId)}getTrackLineOptimizedFeature(){return new g(this._trackLineGeometry,this._trackLineAttributes,null,this.objectId,this.displayId)}getTrackLineDisplayFeature(){const{_trackLineGeometry:t,_trackLineAttributes:e,displayId:s}=this;return{geometry:f(t,"esriGeometryPolyline",!1,!1),attributes:e,displayId:s}}_commitObservation(t,e){const s=e.readCentroidWorldSpace();let r=s?.coords[0],i=s?.coords[1];null==s&&(r=e.readXWorldSpace(),i=e.readYWorldSpace()),null!=r&&null!=i&&(this._observationRecords.unshift(t),this._trackLinePath.unshift([r,i]))}}class M extends x{constructor(t){super(t),this.done=!1}}class U extends j{static async create(t,e,s,a,o,n){const l=new R({spatialReference:e}),c=await Promise.all(t.fields.map(async t=>O.create(l,t))),d=t.featureFilter?await D.create({geometryType:s.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:s.metadata.timeInfo,fieldsIndex:s.metadata.fieldsIndex,spatialReference:e,filterJSON:t.featureFilter}):null;return e.isWrappable||r()||await Promise.all([import("../../../../../geometry/operators/support/apiConverter.js"),import("../../../../../geometry/operators/support/jsonConverter.js"),i()]).then(([t,e,s])=>{G={fromGeometryToGXGeometry:e.fromGeometryToGXGeometry,toGeometry:e.toGeometry,fromSpatialReference:t.fromSpatialReference}}),new U(t,s,a,e,c,d,o,n)}constructor(t,e,s,r,i,a,o,n){super(e,s,r,i,n),this._schema=t,this._featureFilter=a,this._arcadeContextInfo=o,this._tracks=new Map,this._handledChunks=new Set,this._metadata=e.metadata.weakCloneWithAdditionalFields([{name:y,alias:"trackPart",type:"esriFieldTypeSmallInteger"}]),this._trackLineMetadata=w.createFeature({geometryType:"esriGeometryPolyline",featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:{fields:[...this._source.metadata.fieldsIndex.fields,...this.aggregateFields,{name:y,alias:"trackPart",type:"esriFieldTypeSmallInteger"},{name:"aggregateId",alias:"aggregateId",type:"esriFieldTypeOID"}],timeZoneByFieldName:null},globalIdField:null,spatialReference:e.metadata.spatialReference,outSpatialReference:e.metadata.outSpatialReference,subtypeField:null,subtypes:null,timeInfo:e.metadata.timeInfo,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null})}destroy(){super.destroy();for(const t of this._tracks.values())this._removeTrack(t);this._tracks.clear()}get _isStream(){return this._source.isStream}get enablePixelBuffering(){return!0}get isAggregate(){return!1}requiresInvalidation(){return!0}invalidate(){this._handledChunks.clear(),super.invalidate()}createState(t){return new M(t)}async*applyOverrideUpdate(t){C().error("Applying override to tracks is not supported")}displayMap(t,e,s){const r=new Map(t.map(t=>[e(t),t])),i=[];for(const a of this._tracks.values()){const t=r.get(a.objectId);if(null!=t){const e=s(a.displayId,t,a.objectId);i.push(e),r.delete(a.objectId);continue}const e=a.latestObservationFeature;if(e?.objectId){const t=r.get(e.objectId);if(null!=t){const a=s(e.displayId,t,e.objectId);i.push(a),r.delete(e.objectId);continue}}for(const o of a.observations()){const t=r.get(o.objectId);if(null!=t){const e=s(o.displayId,t,o.objectId);i.push(e),r.delete(o.objectId)}}}return i}getDisplayFeatures(t){const e=new Set(t),s=[],r=[],i=this._source.chunks().map(t=>t.reader.getCursor());for(const a of this._tracks.values()){if(e.has(a.displayId)&&r.push(a.getTrackLineDisplayFeature()),null!=a.latestObservationFeature&&e.has(a.latestObservationFeature.displayId)){const{displayId:t,chunkIndex:e,featureIndex:r}=a.latestObservationRecord,o=i[e];o.setIndex(r),s.push({displayId:t,...o.readLegacyFeatureWorldSpace()})}for(const{displayId:t,chunkIndex:r,featureIndex:o}of a.observations())if(e.has(t)){const e=i[r];e.setIndex(o),s.push({displayId:t,...e.readLegacyFeatureWorldSpace()})}}return{features:s,aggregates:[],tracks:r}}getFeatureObjectIdsForAggregate(t){for(const e of this._tracks.values())if(e.objectId===t)return Array.from(e.observations(),t=>t.objectId);return[]}async*updateChunks(){0===this._handledChunks.size&&this._rebuildTracks();for(const t of this._sendStates.values())yield*this._update(t)}forEachAggregateWorldSpace(t){for(const e of this._tracks.values())t(e.getTrackLineOptimizedFeature())}_rebuildTracks(){const t=this._source.chunks();if(!t.length)return;const e=this._metadata.timeInfo?.trackIdField;if(null==e)return;const s=new Set;for(let r=0;r<t.length;r++){const i=t[r];this._handledChunks.add(i.chunkId);const a=i.reader.getCursor();for(;a.next();){const t=a.readAttribute(e),i=a.getObjectId();if(null!=t&&null!=i&&(null===this._featureFilter||this._featureFilter.check(a,this._sqlOptions))){if(a.getDisplayId()||a.setDisplayId(this._attributeStore.createDisplayIdForObjectId(i)),!this._tracks.has(t)){const e=z.getOid(t),s=this._attributeStore.createDisplayIdForObjectId(e),r=new z(this._schema,t,e,s,this.aggregateFields,this.spatialReference,this._source.metadata,this._isStream);this._tracks.set(t,r)}this._tracks.get(t).stageObservation(r,a),s.add(t)}}}for(const r of this._tracks.values())if(s.has(r.trackId)){const e=r.commitObservations(this._attributeStore,t,this._featureFilter?.timeExtent);for(const t of e)this._attributeStore.releaseDisplayIdForObjectId(t);r.updateStatistics(t,S(1,this._arcadeContextInfo))}else this._removeTrack(r)}_removeTrack(t){this._tracks.delete(t.trackId),this._attributeStore.releaseDisplayIdForObjectId(t.objectId);for(const{objectId:e}of t.observations())this._attributeStore.releaseDisplayIdForObjectId(e);null!=t.latestObservationFeature&&this._attributeStore.releaseDisplayIdForObjectId(t.latestObservationFeature.objectId)}*_update(e){if(e.done)return;e.done=!this._source.updateTracking.updating;const s=[],r=[];for(const t of this._tracks.values())if(t.length>0){if(this._schema.showLatestObservation){const r=t.getLatestObservationFeatureForTile(e);null!=r&&s.push(r)}this._schema.showTrackLine&&t.overlapsTile(e.subscription.tile)&&r.push(t.getTrackLineFeatureForTile(e))}const i=A.fromOptimizedFeatures(s,this._metadata,e.subscription.tile.transform),a=A.fromOptimizedFeatures(r,this._trackLineMetadata,e.subscription.tile.transform);let o=[];if(this._schema.showPreviousObservations){const s=this._source.chunks().map(()=>[]);for(const t of this._tracks.values())for(const{chunkIndex:e,featureIndex:r}of t.previousObservations())s[e].push(r);o=this._source.chunks().map((t,r)=>{const i=t.getTileReader(e.subscription.tile);if(null==i)return null;const a=L.from(i,s[r]);return a.setProcessorAttributes({[y]:2}),"esriGeometryPoint"!==a.geometryType&&null!=a.getInTransform()||a.setTransformForDisplay(e.subscription.tile.transform),a}).filter(t)}this.events.emit("changed");const n=e.subscription.tile.createArcadeEvaluationOptions(this._arcadeContextInfo),l=a.getCursor();for(;l.next();)this._attributeStore.setAttributeData(l.getDisplayId(),l,n,this._sqlOptions);for(const t of o){const e=t.getCursor();for(;e.next();)this._attributeStore.setAttributeData(e.getDisplayId(),e,n,this._sqlOptions)}const c=i.getCursor();for(;c.next();)this._attributeStore.setAttributeData(c.getDisplayId(),c,n,this._sqlOptions);yield new T(e.subscription,a,!1,!1,{});for(const t of o)yield new T(e.subscription,t,!1,!1,{});yield new T(e.subscription,i,!1,e.done,{})}}function q(t,e){if(t.length<2)return b({paths:[t]},!1,!1);if(e.isWrappable){let s=!1;for(let r=1;r<t.length;r++){const i=t[r][0],a=h(i,t[r-1][0],e);i!==a&&(t[r][0]=a,s=!0)}if(s){const s=p({paths:[t],spatialReference:e});if(null!=s)return b({paths:s.paths},!1,!1)}return b({paths:[t]},!1,!1)}const s=G.fromGeometryToGXGeometry({hasM:!1,hasZ:!1,paths:[t]}),r=G.fromSpatialReference(e);if(null!=r){const t=a(s,1e6,r,o.geodesic);if(null!=t){const e=G.toGeometry(t,r);if(null!=e&&"paths"in e)return b({paths:e.paths},!1,!1)}}return b({paths:[t]},!1,!1)}function E(t,e){const s=2,{coords:r,lengths:i}=t;if(!i.length)return void e(r[0],r[1]);let a=0;for(let o=0;o<i.length;o++){const t=i[o];let n=0,l=0;for(let i=0;i<t;i++)n+=r[s*(i+a)],l+=r[s*(i+a)+1],e(n,l);a+=t}}function N(t){const{lengths:e,coords:s}=t,r=2;if(!e.length)return[d()];const i=[];let a=0;for(let o=0;o<e.length;o++){const t=e[o],n=d();i.push(n);for(let e=0;e<t;e++){const t=s[r*(e+a)],i=s[r*(e+a)+1];u(n,[t,i])}a+=t}return i}export{U as TrackStrategy};
|
|
5
|
+
import{isSome as t}from"../../../../../core/arrayUtils.js";import e from"../../../../../core/Logger.js";import{assertIsSome as s}from"../../../../../core/maybe.js";import{isLoaded as r,load as i,execute as a}from"../../../../../geometry/operators/gx/operatorGeodeticDensify.js";import{geodeticCurveType as o}from"../../../../../geometry/operators/support/geodeticCurveType.js";import{intersectsWithMargin as n,fromValues as l,intersects as c,empty as d,expandPointInPlace as u}from"../../../../../geometry/support/aaBoundingRect.js";import{getClosestDenormalizedXToReference as h}from"../../../../../geometry/support/normalizeUtils.js";import{normalizeCentralMeridianForDisplay as p}from"../../../../../geometry/support/normalizeUtilsSync.js";import{quantizeOptimizedGeometry as m,convertToGeometry as f,convertFromPolyline as b}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as g}from"../../../../../layers/graphics/OptimizedFeature.js";import _ from"../../../../../layers/graphics/OptimizedGeometry.js";import{internalTrackPartField as y,externalTrackLineOidPrefix as I,internalTimeReceivedField as v}from"../../../../../layers/support/streamLayerUtils.js";import{tileSize as k}from"../../../engine/webgl/definitions.js";import{AccumulatedStatistics as F}from"../aggregation/AccumulatedStatistics.js";import{ComputedAggregateField as O}from"../aggregation/ComputedAggregateField.js";import{AAggregateStrategy as j}from"./AAggregateStrategy.js";import{ASendState as x}from"./AProcessorStrategy.js";import{FeatureTileAppendMessage as S}from"../sources/FeatureSourceMessage.js";import{createArcadeEvaluationOptions as T}from"../support/arcadeUtils.js";import{ComputedAttributeStorage as R}from"../support/ComputedAttributeStorage.js";import D from"../support/FeatureFilterEvaluator.js";import{FeatureMetadata as w}from"../support/FeatureMetadata.js";import{FeatureSetReaderIndirect as L}from"../support/FeatureSetReaderIndirect.js";import{FeatureSetReaderJSON as A}from"../support/FeatureSetReaderJSON.js";let G;const C=()=>e.getLogger("esri.views.2d.layers.features.processor.TrackStrategy"),P=32;class W{constructor(t,e,s,r,i){this.chunkIndex=t,this.featureIndex=e,this.objectId=s,this.displayId=r,this.time=i}}class z{static getOid(t){return I+t}constructor(t,e,s,r,i,a,o,n){this._schema=t,this.trackId=e,this.objectId=s,this.displayId=r,this._fields=i,this._spatialReference=a,this._metadata=o,this._isStream=n,this._maxDisplayDuration=this._schema.maxDisplayDuration>0?this._schema.maxDisplayDuration:1/0,this._maxDisplayObservationsPerTrack=this._schema.maxDisplayObservationsPerTrack>=1?this._schema.maxDisplayObservationsPerTrack:1/0,this._observationRecords=[],this._nextObservationRecords=[],this._trackLinePath=[],this._bounds=[],this._trackLineGeometry=new _}get _trackLineAttributes(){const t={...this._latestObservationFeature?.attributes,aggregateId:this.objectId,[y]:0};if(null!=this._statistics)for(const e of this._statistics.values())t[e.field.name]=e.value;return t}get _startTimeField(){return this._metadata.timeInfo?.startTimeField}get length(){return this._observationRecords.length}*observations(){yield*this._observationRecords}*previousObservations(){for(let t=0;t<this._observationRecords.length-1;t++)yield this._observationRecords[t]}get latestObservationFeature(){return this._latestObservationFeature}get latestObservationRecord(){return this._latestObservationRecord}stageObservation(t,e){this._nextObservationRecords.push(new W(t,e.getIndex(),e.getObjectId(),e.getDisplayId(),null!=this._startTimeField?e.readAttributeAsTimestamp(this._startTimeField):null))}commitObservations(t,e,r){const i=new Set(this._nextObservationRecords.map(t=>t.objectId)),a=this._observationRecords.filter(t=>!i.has(t.objectId)).map(t=>t.objectId);let o,n;switch(this._observationRecords=[],this._trackLinePath=[],this._isStream||null==this._startTimeField||this._nextObservationRecords.sort((t,e)=>{const s=t.time,r=e.time;return null!=s&&null!=r?s-r:0}),this._schema.timeField){case"startTimeField":o=this._metadata.timeInfo?.startTimeField;break;case"endTimeField":o=this._metadata.timeInfo?.endTimeField;break;case"timeReceived":o=this._isStream?v:null}n=this._isStream?r?.end??Date.now():r?.end??-1/0;const l=e.map(t=>t.reader.getCursor());let c;for(let d=this._nextObservationRecords.length-1;d>=0&&!(this._observationRecords.length>=this._maxDisplayObservationsPerTrack);d--){const t=this._nextObservationRecords[d],e=l[t.chunkIndex];s(e),e.setIndex(t.featureIndex);const r=null!=o?e.readAttributeAsTimestamp(o):null;(null!=r?n-r:0)>=this._maxDisplayDuration||(this._commitObservation(t,e),c??=t)}if(null!=c){const{chunkIndex:e,featureIndex:r}=c,i=`${c.objectId}.latest`,o=t.createDisplayIdForObjectId(i),n=l[e];s(n),n.setIndex(r);const d=new g(n.readGeometryWorldSpace(),{...n.readAttributes(),[y]:1},null,i,o);this._latestObservationFeature&&a.push(this._latestObservationFeature.objectId),this._latestObservationFeature=d,this._latestObservationRecord=c}else this._latestObservationFeature=null;return this._trackLineGeometry=q(this._trackLinePath,this._spatialReference),this._bounds=N(this._trackLineGeometry),this._nextObservationRecords=[],a}updateStatistics(t,e){this._statistics=F.create(this._fields);const r=t.map(t=>t.reader.getCursor());for(const{chunkIndex:i,featureIndex:a}of this._observationRecords){const t=r[i];s(t),t.setIndex(a),this._statistics.insert(t,e)}}overlapsTile(t){for(const e of this._bounds)if(n(e,t.bounds,P))return!0;return!1}getLatestObservationFeatureForTile(t){if(null==this._latestObservationFeature)return null;const{objectId:e,displayId:s,geometry:r,attributes:i}=this._latestObservationFeature,a=m(r,this._metadata.geometryType,t.subscription.tile.transform)??new _,o=l(1/0,1/0,-1/0,-1/0);E(a,(t,e)=>u(o,[t,e]));if(!c(o,l(0,0,k,k)))return null;return new g(a,i,null,e,s)}getTrackLineFeatureForTile(t){const e=m(this._trackLineGeometry,"esriGeometryPolyline",t.subscription.tile.transform)??new _;return new g(e,this._trackLineAttributes,null,this.objectId,this.displayId)}getTrackLineOptimizedFeature(){return new g(this._trackLineGeometry,this._trackLineAttributes,null,this.objectId,this.displayId)}getTrackLineDisplayFeature(){const{_trackLineGeometry:t,_trackLineAttributes:e,displayId:s}=this;return{geometry:f(t,"esriGeometryPolyline",!1,!1),attributes:e,displayId:s}}_commitObservation(t,e){const s=e.readCentroidWorldSpace();let r=s?.coords[0],i=s?.coords[1];null==s&&(r=e.readXWorldSpace(),i=e.readYWorldSpace()),null!=r&&null!=i&&(this._observationRecords.unshift(t),this._trackLinePath.unshift([r,i]))}}class M extends x{constructor(t){super(t),this.done=!1}}class U extends j{static async create(t,e,s,a,o){const n=e.metadata.outSpatialReference,l=new R({spatialReference:n}),c=await Promise.all(t.fields.map(async t=>O.create(l,t))),d=t.featureFilter?await D.create({geometryType:e.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:e.metadata.timeInfo,fieldsIndex:e.metadata.fieldsIndex,spatialReference:n,filterJSON:t.featureFilter}):null;return n.isWrappable||r()||await Promise.all([import("../../../../../geometry/operators/support/apiConverter.js"),import("../../../../../geometry/operators/support/jsonConverter.js"),i()]).then(([t,e,s])=>{G={fromGeometryToGXGeometry:e.fromGeometryToGXGeometry,toGeometry:e.toGeometry,fromSpatialReference:t.fromSpatialReference}}),new U(t,e,s,n,c,d,a,o)}constructor(t,e,s,r,i,a,o,n){super(e,s,r,i,n),this._schema=t,this._featureFilter=a,this._arcadeContextInfo=o,this._tracks=new Map,this._handledChunks=new Set,this._metadata=e.metadata.weakCloneWithAdditionalFields([{name:y,alias:"trackPart",type:"esriFieldTypeSmallInteger"}]),this._trackLineMetadata=w.createFeature({geometryType:"esriGeometryPolyline",featureIdInfo:{type:"object-id",fieldName:"aggregateId"},fieldsIndex:{fields:[...this._source.metadata.fieldsIndex.fields,...this.aggregateFields,{name:y,alias:"trackPart",type:"esriFieldTypeSmallInteger"},{name:"aggregateId",alias:"aggregateId",type:"esriFieldTypeOID"}],timeZoneByFieldName:null},globalIdField:null,spatialReference:e.metadata.spatialReference,outSpatialReference:e.metadata.outSpatialReference,subtypeField:null,subtypes:null,timeInfo:e.metadata.timeInfo,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null,types:null})}destroy(){super.destroy();for(const t of this._tracks.values())this._removeTrack(t);this._tracks.clear()}get _isStream(){return this._source.isStream}get enablePixelBuffering(){return!0}get isAggregate(){return!1}requiresInvalidation(){return!0}invalidate(){this._handledChunks.clear(),super.invalidate()}createState(t){return new M(t)}async*applyOverrideUpdate(t){C().error("Applying override to tracks is not supported")}displayMap(t,e,s){const r=new Map(t.map(t=>[e(t),t])),i=[];for(const a of this._tracks.values()){const t=r.get(a.objectId);if(null!=t){const e=s(a.displayId,t,a.objectId);i.push(e),r.delete(a.objectId);continue}const e=a.latestObservationFeature;if(e?.objectId){const t=r.get(e.objectId);if(null!=t){const a=s(e.displayId,t,e.objectId);i.push(a),r.delete(e.objectId);continue}}for(const o of a.observations()){const t=r.get(o.objectId);if(null!=t){const e=s(o.displayId,t,o.objectId);i.push(e),r.delete(o.objectId)}}}return i}getDisplayFeatures(t){const e=new Set(t),s=[],r=[],i=this._source.chunks().map(t=>t.reader.getCursor());for(const a of this._tracks.values()){if(e.has(a.displayId)&&r.push(a.getTrackLineDisplayFeature()),null!=a.latestObservationFeature&&e.has(a.latestObservationFeature.displayId)){const{displayId:t,chunkIndex:e,featureIndex:r}=a.latestObservationRecord,o=i[e];o.setIndex(r),s.push({displayId:t,...o.readLegacyFeatureWorldSpace()})}for(const{displayId:t,chunkIndex:r,featureIndex:o}of a.observations())if(e.has(t)){const e=i[r];e.setIndex(o),s.push({displayId:t,...e.readLegacyFeatureWorldSpace()})}}return{features:s,aggregates:[],tracks:r}}getFeatureObjectIdsForAggregate(t){for(const e of this._tracks.values())if(e.objectId===t)return Array.from(e.observations(),t=>t.objectId);return[]}async*updateChunks(){0===this._handledChunks.size&&this._rebuildTracks();for(const t of this._sendStates.values())yield*this._update(t)}forEachAggregateWorldSpace(t){for(const e of this._tracks.values())t(e.getTrackLineOptimizedFeature())}_rebuildTracks(){const t=this._source.chunks();if(!t.length)return;const e=this._metadata.timeInfo?.trackIdField;if(null==e)return;const s=new Set;for(let r=0;r<t.length;r++){const i=t[r];this._handledChunks.add(i.chunkId);const a=i.reader.getCursor();for(;a.next();){const t=a.readAttribute(e),i=a.getObjectId();if(null!=t&&null!=i&&(null===this._featureFilter||this._featureFilter.check(a,this._sqlOptions))){if(a.getDisplayId()||a.setDisplayId(this._attributeStore.createDisplayIdForObjectId(i)),!this._tracks.has(t)){const e=z.getOid(t),s=this._attributeStore.createDisplayIdForObjectId(e),r=new z(this._schema,t,e,s,this.aggregateFields,this.spatialReference,this._source.metadata,this._isStream);this._tracks.set(t,r)}this._tracks.get(t).stageObservation(r,a),s.add(t)}}}for(const r of this._tracks.values())if(s.has(r.trackId)){const e=r.commitObservations(this._attributeStore,t,this._featureFilter?.timeExtent);for(const t of e)this._attributeStore.releaseDisplayIdForObjectId(t);r.updateStatistics(t,T(1,this._arcadeContextInfo))}else this._removeTrack(r)}_removeTrack(t){this._tracks.delete(t.trackId),this._attributeStore.releaseDisplayIdForObjectId(t.objectId);for(const{objectId:e}of t.observations())this._attributeStore.releaseDisplayIdForObjectId(e);null!=t.latestObservationFeature&&this._attributeStore.releaseDisplayIdForObjectId(t.latestObservationFeature.objectId)}*_update(e){if(e.done)return;e.done=!this._source.updateTracking.updating;const s=[],r=[];for(const t of this._tracks.values())if(t.length>0){if(this._schema.showLatestObservation){const r=t.getLatestObservationFeatureForTile(e);null!=r&&s.push(r)}this._schema.showTrackLine&&t.overlapsTile(e.subscription.tile)&&r.push(t.getTrackLineFeatureForTile(e))}const i=A.fromOptimizedFeatures(s,this._metadata,e.subscription.tile.transform),a=A.fromOptimizedFeatures(r,this._trackLineMetadata,e.subscription.tile.transform);let o=[];if(this._schema.showPreviousObservations){const s=this._source.chunks().map(()=>[]);for(const t of this._tracks.values())for(const{chunkIndex:e,featureIndex:r}of t.previousObservations())s[e].push(r);o=this._source.chunks().map((t,r)=>{const i=t.getTileReader(e.subscription.tile);if(null==i)return null;const a=L.from(i,s[r]);return a.setProcessorAttributes({[y]:2}),"esriGeometryPoint"!==a.geometryType&&null!=a.getInTransform()||a.setTransformForDisplay(e.subscription.tile.transform),a}).filter(t)}this.events.emit("changed");const n=e.subscription.tile.createArcadeEvaluationOptions(this._arcadeContextInfo),l=a.getCursor();for(;l.next();)this._attributeStore.setAttributeData(l.getDisplayId(),l,n,this._sqlOptions);for(const t of o){const e=t.getCursor();for(;e.next();)this._attributeStore.setAttributeData(e.getDisplayId(),e,n,this._sqlOptions)}const c=i.getCursor();for(;c.next();)this._attributeStore.setAttributeData(c.getDisplayId(),c,n,this._sqlOptions);yield new S(e.subscription,a,!1,!1,{});for(const t of o)yield new S(e.subscription,t,!1,!1,{});yield new S(e.subscription,i,!1,e.done,{})}}function q(t,e){if(t.length<2)return b({paths:[t]},!1,!1);if(e.isWrappable){let s=!1;for(let r=1;r<t.length;r++){const i=t[r][0],a=h(i,t[r-1][0],e);i!==a&&(t[r][0]=a,s=!0)}if(s){const s=p({paths:[t],spatialReference:e});if(null!=s)return b({paths:s.paths},!1,!1)}return b({paths:[t]},!1,!1)}const s=G.fromGeometryToGXGeometry({hasM:!1,hasZ:!1,paths:[t]}),r=G.fromSpatialReference(e);if(null!=r){const t=a(s,1e6,r,o.geodesic);if(null!=t){const e=G.toGeometry(t,r);if(null!=e&&"paths"in e)return b({paths:e.paths},!1,!1)}}return b({paths:[t]},!1,!1)}function E(t,e){const s=2,{coords:r,lengths:i}=t;if(!i.length)return void e(r[0],r[1]);let a=0;for(let o=0;o<i.length;o++){const t=i[o];let n=0,l=0;for(let i=0;i<t;i++)n+=r[s*(i+a)],l+=r[s*(i+a)+1],e(n,l);a+=t}}function N(t){const{lengths:e,coords:s}=t,r=2;if(!e.length)return[d()];const i=[];let a=0;for(let o=0;o<e.length;o++){const t=e[o],n=d();i.push(n);for(let e=0;e<t;e++){const t=s[r*(e+a)],i=s[r*(e+a)+1];u(n,[t,i])}a+=t}return i}export{U as TrackStrategy};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../../geometry/SpatialReference.js";import t from"../../../../../layers/support/FieldsIndex.js";class i{static minimal(e,n,l=[]){return new i({geometryType:e,fieldsIndex:new t(l).toJSON(),featureIdInfo:{type:"object-id",fieldName:n},subtypes:null,subtypeField:null,types:null,globalIdField:null,spatialReference:null,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null})}static createFeature(e){return new i(e)}constructor(i){let n;this._options=i,this._fieldsIndex=t.fromJSON(i.fieldsIndex),i.spatialReference&&(this._spatialReference=e.fromJSON(i.spatialReference)),i.outSpatialReference&&(this._outSpatialReference=e.fromJSON(i.outSpatialReference)),"object-id"===i.featureIdInfo.type&&(n=i.featureIdInfo.fieldName),this._arcadeSchema={fields:this.fieldsIndex.fields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,objectIdField:n,globalIdField:this._options.globalIdField,spatialReference:this._spatialReference,timeInfo:this._options.timeInfo,typeIdField:this._options.typeIdField??void 0,types:this._options.types??void 0,subtypeField:this._options.subtypeField,subtypes:this._options.subtypes??void 0,datesInUnknownTimezone:this._options.timeReferenceUnknownClient??void 0,dateFieldsTimeZone:this._options.dateFieldsTimeZone??void 0}}get fieldsIndex(){return this._fieldsIndex}get geometryType(){return"esriGeometryMultiPatch"===this._options.geometryType?"esriGeometryPolygon":this._options.geometryType}get serviceGeometryType(){return this._options.geometryType}get subtypeField(){return this._options.subtypeField}get timeInfo(){return this._options.timeInfo}get featureIdInfo(){return this._options.featureIdInfo}get globalIdField(){return this._options.globalIdField}get arcadeSchema(){return this._arcadeSchema}get spatialReference(){return this._spatialReference}get outSpatialReference(){return this._outSpatialReference}get timeReferenceUnknownClient(){return this._options.timeReferenceUnknownClient}weakCloneWithAdditionalFields(e){return new i({fieldsIndex:{fields:[...this._fieldsIndex.fields,...e],timeZoneByFieldName:null},geometryType:this.geometryType,globalIdField:this.globalIdField,featureIdInfo:this.featureIdInfo,spatialReference:this.spatialReference,outSpatialReference:this.outSpatialReference,subtypeField:this.subtypeField,subtypes:this._options.subtypes,timeInfo:this.timeInfo,timeReferenceUnknownClient:this.timeReferenceUnknownClient,dateFieldsTimeZone:this._options.dateFieldsTimeZone,typeIdField:this._options.typeIdField,types:this._options.types})}}class n extends i{static createGraphics(e){return new n({fieldsIndex:(new t).toJSON(),featureIdInfo:{type:"object-id",fieldName:"uid"},geometryType:null,spatialReference:e,outSpatialReference:e,globalIdField:null,subtypeField:null,subtypes:null,timeInfo:null,typeIdField:null,types:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null})}}export{i as FeatureMetadata,n as GraphicsMetadata};
|
|
5
|
+
import e from"../../../../../geometry/SpatialReference.js";import t from"../../../../../layers/support/FieldsIndex.js";class i{static minimal(e,n,l=[]){return new i({geometryType:e,fieldsIndex:new t(l).toJSON(),featureIdInfo:{type:"object-id",fieldName:n},subtypes:null,subtypeField:null,types:null,globalIdField:null,spatialReference:null,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null})}static createFeature(e){return new i(e)}constructor(i){let n;this._options=i,this._fieldsIndex=t.fromJSON(i.fieldsIndex),i.spatialReference&&(i.spatialReference instanceof e?this._spatialReference=i.spatialReference:this._spatialReference=e.fromJSON(i.spatialReference)),i.outSpatialReference&&(i.outSpatialReference instanceof e?this._outSpatialReference=i.outSpatialReference:this._outSpatialReference=e.fromJSON(i.outSpatialReference)),"object-id"===i.featureIdInfo.type&&(n=i.featureIdInfo.fieldName),this._arcadeSchema={fields:this.fieldsIndex.fields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,objectIdField:n,globalIdField:this._options.globalIdField,spatialReference:this._spatialReference,timeInfo:this._options.timeInfo,typeIdField:this._options.typeIdField??void 0,types:this._options.types??void 0,subtypeField:this._options.subtypeField,subtypes:this._options.subtypes??void 0,datesInUnknownTimezone:this._options.timeReferenceUnknownClient??void 0,dateFieldsTimeZone:this._options.dateFieldsTimeZone??void 0}}get fieldsIndex(){return this._fieldsIndex}get geometryType(){return"esriGeometryMultiPatch"===this._options.geometryType?"esriGeometryPolygon":this._options.geometryType}get serviceGeometryType(){return this._options.geometryType}get subtypeField(){return this._options.subtypeField}get timeInfo(){return this._options.timeInfo}get featureIdInfo(){return this._options.featureIdInfo}get globalIdField(){return this._options.globalIdField}get arcadeSchema(){return this._arcadeSchema}get spatialReference(){return this._spatialReference}get outSpatialReference(){return this._outSpatialReference}get timeReferenceUnknownClient(){return this._options.timeReferenceUnknownClient}weakCloneWithAdditionalFields(e){return new i({fieldsIndex:{fields:[...this._fieldsIndex.fields,...e],timeZoneByFieldName:null},geometryType:this.geometryType,globalIdField:this.globalIdField,featureIdInfo:this.featureIdInfo,spatialReference:this.spatialReference,outSpatialReference:this.outSpatialReference,subtypeField:this.subtypeField,subtypes:this._options.subtypes,timeInfo:this.timeInfo,timeReferenceUnknownClient:this.timeReferenceUnknownClient,dateFieldsTimeZone:this._options.dateFieldsTimeZone,typeIdField:this._options.typeIdField,types:this._options.types})}}class n extends i{static createGraphics(e){return new n({fieldsIndex:(new t).toJSON(),featureIdInfo:{type:"object-id",fieldName:"uid"},geometryType:null,spatialReference:e,outSpatialReference:e,globalIdField:null,subtypeField:null,subtypes:null,timeInfo:null,typeIdField:null,types:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null})}}export{i as FeatureMetadata,n as GraphicsMetadata};
|
package/views/3d/GroundView3D.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../core/Evented.js";import{when as r}from"../../core/reactiveUtils.js";import{property as
|
|
5
|
+
import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../core/Evented.js";import{when as r}from"../../core/reactiveUtils.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import i from"../GroundView.js";import{isIntegratedMeshLayerView as s}from"../support/layerViewUtils.js";let o=class extends(t(i)){constructor(){super(...arguments),this._integratedMeshElevationUpdateHandles=new Map}initialize(){super.initialize(),this.addHandles(r(()=>this._terrainSurface,e=>e.on("elevation-change",e=>this._elevationChange(e))));const e=this._integratedMeshElevationUpdateHandles;this.addHandles(this.view.allLayerViews.on("change",t=>{t.added.forEach(t=>{s(t)&&e.set(t,t.elevationProvider.on("elevation-change",e=>this._elevationChange(e)))}),t.removed.forEach(t=>{s(t)&&(e.get(t)?.remove(),e.delete(t))})}))}destroy(){this._integratedMeshElevationUpdateHandles.forEach(e=>e.remove()),this._integratedMeshElevationUpdateHandles.clear()}_elevationChange(e){this.emit("elevation-change",e)}get _integratedMeshGroundLayerView(){const e=this.ground?.integratedMeshGround;if(e)return this.view.basemapView?.groundLayerViews.find(t=>t.layer===e)}get _terrainSurface(){return this.view.basemapTerrain}get _usingTerrain(){return this._terrainSurface?.enabled??!1}get _usingIntegratedMesh(){return this._integratedMeshGroundLayerView?.visible??!1}get spatialReference(){return this._terrainSurface?.spatialReference}intersect(e,t,r,n){this._usingTerrain&&this._terrainSurface?.intersect(e,t,r,n);for(const a of this._integratedMeshElevationUpdateHandles.keys())a.intersect(e,t,r,n)}get updating(){return!this.suspended&&((this._source?.updating??!1)||this.layerViews.some(({updating:e})=>e))}get elevationQueryCache(){return this._usingTerrain?this._terrainSurface?.elevationQueryCache:null}get extentAABR(){return this._terrainSurface?.extent}get suspended(){return this._source?.suspended??!1}get ready(){return this._source?.ready??!0}updateOverlayParameters(){this._terrainSurface?.updateOverlayParameters()}get _source(){return this._usingTerrain?this._terrainSurface:this._usingIntegratedMesh?this._integratedMeshGroundLayerView:null}requestRender(e){this.view.stage.renderView?.requestRender(e)}};e([n({readOnly:!0})],o.prototype,"_integratedMeshGroundLayerView",null),e([n({readOnly:!0})],o.prototype,"_terrainSurface",null),e([n({readOnly:!0})],o.prototype,"_usingTerrain",null),e([n({readOnly:!0})],o.prototype,"_usingIntegratedMesh",null),e([n({readOnly:!0})],o.prototype,"spatialReference",null),e([n({type:Boolean,readOnly:!0})],o.prototype,"updating",null),e([n({readOnly:!0})],o.prototype,"elevationQueryCache",null),e([n({readOnly:!0})],o.prototype,"extentAABR",null),e([n({readOnly:!0})],o.prototype,"suspended",null),e([n({readOnly:!0})],o.prototype,"ready",null),o=e([a("esri.views.3d.GroundView3D")],o);export{o as GroundView3D};
|