@arcgis/core 6.0.0-next.36 → 6.0.0-next.38
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/DimensionAnalysis.js +1 -1
- package/analysis/DimensionSimpleStyle.js +1 -1
- package/analysis/LengthDimension.js +1 -1
- package/analysis/LineOfSightAnalysis.js +1 -1
- package/analysis/LineOfSightAnalysisTarget.js +1 -1
- package/analysis/Viewshed.js +1 -1
- package/analysis/ViewshedAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{0202eb8c2b2865f99981.js → 00311d1b18d5952a014b.js} +1 -1
- package/assets/esri/core/workers/chunks/{9503eedfdda55fc5adab.js → 091ec4fe83038f3558f4.js} +1 -1
- package/assets/esri/core/workers/chunks/0b21d0e2e5a91c34a108.js +1 -0
- package/assets/esri/core/workers/chunks/{322b22a5d54e404bebd5.js → 0c893837f67829757df7.js} +1 -1
- package/assets/esri/core/workers/chunks/123541f79be7adff0818.js +1 -0
- package/assets/esri/core/workers/chunks/{155861fbd0e5fc2db80c.js → 1a91443970d64a59521d.js} +1 -1
- package/assets/esri/core/workers/chunks/1e37337f47f45d6d8005.js +1 -0
- package/assets/esri/core/workers/chunks/{4e5405134d079bdf9b7a.js → 1f76f6dcdae9f55389cb.js} +1 -1
- package/assets/esri/core/workers/chunks/{f717005e14a7e9141df7.js → 2050c844b5a29b1df28a.js} +1 -1
- package/assets/esri/core/workers/chunks/2c3612379111457c3221.js +1 -0
- package/assets/esri/core/workers/chunks/2d16b5a44f840147e882.js +1 -0
- package/assets/esri/core/workers/chunks/{d9a240a3c6bf85124474.js → 342a97974a78007b25e0.js} +1 -1
- package/assets/esri/core/workers/chunks/34467f7d84baffd772a3.js +1 -0
- package/assets/esri/core/workers/chunks/396299c22994c502e41c.js +1 -0
- package/assets/esri/core/workers/chunks/{03daf6f235c6edef6268.js → 398ec098fffe6abceedd.js} +1 -1
- package/assets/esri/core/workers/chunks/3b32a24488b3068f0cb7.js +1 -0
- package/assets/esri/core/workers/chunks/3b5e9e0b180dc10491ec.js +1 -0
- package/assets/esri/core/workers/chunks/{4d18b48d4a282a0f341c.js → 427d929dc7f89b0a1ea9.js} +1 -1
- package/assets/esri/core/workers/chunks/432728c557be5dfa26b5.js +1 -0
- package/assets/esri/core/workers/chunks/46969f379623810b2eca.js +1 -0
- package/assets/esri/core/workers/chunks/46edd6c9ed6701e6b975.js +1 -0
- package/assets/esri/core/workers/chunks/{8b0d5551978ab0aac0d1.js → 520f499d79fa71f262c7.js} +1 -1
- package/assets/esri/core/workers/chunks/5473409fee59db80f87d.js +1 -0
- package/assets/esri/core/workers/chunks/553a8bf5bc5c56d1bcaf.js +1 -0
- package/assets/esri/core/workers/chunks/{2211ff0a1f1ae8100231.js → 585ae43c7bcb86a26762.js} +1 -1
- package/assets/esri/core/workers/chunks/58716a3a6106a1b0fb9d.js +1 -0
- package/assets/esri/core/workers/chunks/{aa6ee2aa4ff6e6d41efb.js → 5882f349f3771868e67f.js} +1 -1
- package/assets/esri/core/workers/chunks/592b5db1459c02cf6a0c.js +1 -0
- package/assets/esri/core/workers/chunks/{1b17f5f720f6cf3f6d73.js → 5be386b3af867b19ff39.js} +1 -1
- package/assets/esri/core/workers/chunks/{ea81f9d71b0842a4be26.js → 5e48898cebb6dbaf09b5.js} +1 -1
- package/assets/esri/core/workers/chunks/6a21dc13a465757ba007.js +1 -0
- package/assets/esri/core/workers/chunks/{139e753d95cfc9470e74.js → 6a65fc1a2931230fe994.js} +1 -1
- package/assets/esri/core/workers/chunks/{3e406043a374ee17475b.js → 6f2e7e663229b223b4df.js} +1 -1
- package/assets/esri/core/workers/chunks/{379db67f78161ebd5468.js → 7023651ed6398dcf8efb.js} +1 -1
- package/assets/esri/core/workers/chunks/{90360c0bd053d3e3fd77.js → 7027a0e7bfabb3bb7fc2.js} +1 -1
- package/assets/esri/core/workers/chunks/76e80381fa6d1e084796.js +1 -0
- package/assets/esri/core/workers/chunks/78818c2a898444f7e890.js +1 -0
- package/assets/esri/core/workers/chunks/{40c2674dae73f0942751.js → 7d497df6e13162156342.js} +1 -1
- package/assets/esri/core/workers/chunks/{3b380e64566a6cce59e2.js → 7e0ed6e8f7b77e43f628.js} +1 -1
- package/assets/esri/core/workers/chunks/8c3779de09291170497f.js +1 -0
- package/assets/esri/core/workers/chunks/8e391b5b82429f39791e.js +1 -0
- package/assets/esri/core/workers/chunks/947f3a1cad976bba9738.js +1 -0
- package/assets/esri/core/workers/chunks/{59a1b637d2c107504a04.js → 966204d6dedc8149c3e9.js} +1 -1
- package/assets/esri/core/workers/chunks/9826baa3c15ea2062669.js +1 -0
- package/assets/esri/core/workers/chunks/{d3369ffed19f4c264dcd.js → 9ab0735e86cf8932bf9d.js} +1 -1
- package/assets/esri/core/workers/chunks/ab0ea4042f4e13874aed.js +1 -0
- package/assets/esri/core/workers/chunks/ab98ade3257360015d6c.js +1 -0
- package/assets/esri/core/workers/chunks/ac107079342251a984dd.js +1 -0
- package/assets/esri/core/workers/chunks/{572aec57593a08b8045b.js → b15a8d4322f3b7819d2f.js} +1 -1
- package/assets/esri/core/workers/chunks/{552c36b40e5a5ec117fb.js → b472c0a21ae29e653f7d.js} +1 -1
- package/assets/esri/core/workers/chunks/b90271ce38522bcf813b.js +1 -0
- package/assets/esri/core/workers/chunks/ba91df9835cdea7698a9.js +1 -0
- package/assets/esri/core/workers/chunks/bdd76a0b6c14e7fb6984.js +1 -0
- package/assets/esri/core/workers/chunks/bfe13ac9fa1aafb190a1.js +1 -0
- package/assets/esri/core/workers/chunks/{f372f4eb5527238c46f5.js → c31830ee897d5a7f2582.js} +1 -1
- package/assets/esri/core/workers/chunks/c48d97c38e821be17dc5.js +1 -0
- package/assets/esri/core/workers/chunks/{0a508e25ec05363e1f04.js → c7ad62f54d2abe1d17a0.js} +1 -1
- package/assets/esri/core/workers/chunks/cb1642ea8b66231cbfb5.js +1 -0
- package/assets/esri/core/workers/chunks/ce0274847ccce6a1ac53.js +1 -0
- package/assets/esri/core/workers/chunks/cf21b217b13770757cb8.js +1 -0
- package/assets/esri/core/workers/chunks/cf2e5f827cea7d7319ce.js +1 -0
- package/assets/esri/core/workers/chunks/d42a4f47843e075c56a8.js +1 -0
- package/assets/esri/core/workers/chunks/dae2036faa28dade2119.js +1 -0
- package/assets/esri/core/workers/chunks/e2430bc3a1edeb5c3266.js +1 -0
- package/assets/esri/core/workers/chunks/e9457a67befc61e11095.js +1 -0
- package/assets/esri/core/workers/chunks/f06ef153e106b26a6748.js +1 -0
- package/assets/esri/core/workers/chunks/faae3c43048b42341536.js +1 -0
- package/assets/esri/core/workers/chunks/fc77eb7683e708774168.js +1 -0
- package/assets/esri/core/workers/chunks/fd967a9f3cf0e2890dbb.js +1 -0
- package/chunks/Clouds.glsl.js +7 -11
- package/chunks/h.js +2 -0
- package/chunks/projector.js +2 -0
- package/config.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/sanitizerUtils.js +1 -1
- package/form/FormTemplate.js +1 -1
- package/form/elements/Element.js +1 -1
- package/form/elements/FieldElement.js +1 -1
- package/geometry/ellipsoidUtils.js +4 -4
- package/geometry/support/frustumPlanes.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/geometry/support/triangle.js +1 -1
- package/kernel.js +1 -1
- package/layers/BaseElevationLayer.js +1 -1
- package/layers/ElevationLayer.js +1 -1
- package/layers/GraphicsLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.d.ts +2 -0
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/geospatialPDF/geospatialPDFParserUtils.js +1 -1
- package/layers/geospatialPDF/support/datumUtils.js +2 -0
- package/layers/geospatialPDF/support/ellipsoidUtils.js +2 -0
- package/layers/geospatialPDF/support/geographicProjectionUtils.js +2 -0
- package/layers/geospatialPDF/support/parameterUtils.js +2 -0
- package/layers/geospatialPDF/support/projectedProjectionUtils.js +3 -0
- package/layers/geospatialPDF/support/projectionToSpatialReference.js +2 -0
- package/layers/geospatialPDF/support/statePlaneUtils.js +2 -0
- package/layers/geospatialPDF/support/unitUtils.js +2 -0
- package/layers/geospatialPDF/support/validateProjectionUtils.js +2 -0
- package/layers/graphics/sources/support/clientSideDefaults.js +2 -2
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/ogc/ogcFeatureUtils.js +1 -1
- package/layers/save/imageryUtils.js +1 -1
- package/layers/save/mediaLayerUtils.js +1 -1
- package/layers/save/streamLayerUtils.js +1 -1
- package/layers/support/ControlPoint.js +1 -1
- package/layers/support/ControlPointsGeoreference.js +1 -1
- package/layers/support/DimensionalDefinition.js +1 -1
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/LabelClass.js +1 -1
- package/layers/support/LabelExpressionInfo.js +1 -1
- package/layers/support/MediaElementBase.js +1 -1
- package/layers/support/MosaicRule.js +1 -1
- package/layers/support/MultidimensionalSubset.js +1 -1
- package/layers/support/RasterBandInfo.js +1 -1
- package/layers/support/RasterFunction.js +1 -1
- package/layers/support/RasterFunctionTemplate.js +1 -1
- package/layers/support/RasterInfo.js +1 -1
- package/layers/support/RasterSensorInfo.js +1 -1
- package/layers/support/RasterStorageInfo.js +1 -1
- package/layers/support/VideoElement.js +1 -1
- package/layers/support/layersLoader.js +1 -1
- package/layers/video/VideoController.js +3 -3
- package/layers/video/types.d.ts +12 -0
- package/legend/ActiveLayerInfo.d.ts +5 -1
- package/legend/ActiveLayerInfo.js +1 -1
- package/libs/maquette-advanced-projector/projector.js +1 -1
- package/linkChart/LayoutSettings.js +1 -1
- package/linkChart/RootedLayoutSettings.js +1 -1
- package/package.json +3 -3
- package/renderers/FlowRenderer.js +1 -1
- package/renderers/RasterColormapRenderer.js +1 -1
- package/renderers/RasterShadedReliefRenderer.js +1 -1
- package/renderers/RasterStretchRenderer.js +1 -1
- package/renderers/VectorFieldRenderer.js +1 -1
- package/renderers/support/ColormapInfo.js +1 -1
- package/renderers/support/RasterPresetRenderer.js +1 -1
- package/renderers/support/rasterRendererHelper.js +1 -1
- package/rest/knowledgeGraph/GraphApplyEdits.js +1 -1
- package/rest/support/BaseImageMeasureParameters.js +1 -1
- package/rest/support/BaseImageMeasureResult.js +1 -1
- package/rest/support/FindImagesParameters.js +1 -1
- package/rest/support/FindImagesResult.js +1 -1
- package/rest/support/ImageAngleParameters.js +1 -1
- package/rest/support/ImageAngleResult.js +1 -1
- package/rest/support/ImageAreaParameters.js +1 -1
- package/rest/support/ImageAreaResult.js +1 -1
- package/rest/support/ImageBoundaryParameters.js +1 -1
- package/rest/support/ImageBoundaryResult.js +1 -1
- package/rest/support/ImageDistanceParameters.js +1 -1
- package/rest/support/ImageDistanceResult.js +1 -1
- package/rest/support/ImageGPSInfoParameters.js +1 -1
- package/rest/support/ImageGPSInfoResult.js +1 -1
- package/rest/support/ImageHeightParameters.js +1 -1
- package/rest/support/ImageHeightResult.js +1 -1
- package/rest/support/ImageHistogramParameters.js +1 -1
- package/rest/support/ImageIdentifyParameters.js +1 -1
- package/rest/support/ImageIdentifyResult.js +1 -1
- package/rest/support/ImagePixelLocationParameters.js +1 -1
- package/rest/support/ImagePixelLocationResult.js +1 -1
- package/rest/support/ImagePointParameters.js +1 -1
- package/rest/support/ImagePointResult.js +1 -1
- package/rest/support/ImageSample.js +1 -1
- package/rest/support/ImageSampleParameters.js +1 -1
- package/rest/support/ImageSampleResult.js +1 -1
- package/rest/support/ImageToMapMultirayParameters.js +1 -1
- package/rest/support/ImageToMapParameters.js +1 -1
- package/rest/support/ImageUrlParameters.js +1 -1
- package/rest/support/ImageUrlResult.js +1 -1
- package/rest/support/ImageVolumeParameters.js +1 -1
- package/rest/support/ImageVolumeResult.js +1 -1
- package/rest/support/MapToImageParameters.js +1 -1
- package/rest/support/MeasureAreaFromImageResult.js +1 -1
- package/rest/support/MeasureFromImageParameters.js +1 -1
- package/rest/support/MeasureLengthFromImageResult.js +1 -1
- package/symbols/support/cimSymbolUtils.js +1 -1
- package/symbols/support/renderUtils.js +1 -1
- package/views/2d/ViewState.d.ts +3 -3
- package/views/2d/ViewState.js +1 -1
- package/views/2d/ViewStateManager.js +1 -1
- package/views/2d/engine/Bitmap.js +1 -1
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/CollisionJob.js +1 -1
- package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/engine/webgl/SpriteMosaic.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/collisions/LabelMetric.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelStore.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.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/heatmap/HeatmapResources.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.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/raster/processor/textureUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTexture.js +1 -1
- package/views/2d/engine/webgl/textureUtils.js +1 -1
- package/views/2d/engine/webgl/util/IntervalMatcher.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/webglDeps.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/engineContent/marker.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/geometryUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianTileBuilder.js +2 -0
- package/views/3d/support/gaussianSplatting/GaussianTileLifecycle.js +2 -0
- package/views/3d/support/gaussianSplatting/formatConstants.js +2 -0
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/terrain/tileUtils.js +1 -1
- package/views/3d/webgl/RenderNode.d.ts +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +15 -11
- package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +19 -9
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/3d/webgl-engine/lib/AttributeView.js +1 -1
- package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/DDSUtil.js +1 -1
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderUtils.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBufferView.js +1 -1
- package/views/3d/webgl-engine/lib/VerticesView.js +2 -0
- package/views/3d/webgl-engine/lib/attributeViewUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterialBaseInstance.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/materials/internal/lineMarkerBufferUtils.js +2 -0
- package/views/3d/webgl-engine/materials/internal/ribbonLineBufferUtils.js +2 -0
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/hudMaterialLayouts.js +2 -0
- package/views/3d/webgl-engine/shaders/lineMarkerLayouts.js +2 -0
- package/views/draw/support/ManagedTooltipField.js +1 -1
- package/views/overlay/LineOverlayItem.js +1 -1
- package/views/overlay/TextOverlayItem.js +1 -1
- package/views/overlay/ViewOverlay.js +1 -1
- package/views/support/GroundElevationSampler.js +1 -1
- package/views/support/HighlightOptions.d.ts +2 -2
- package/views/support/HighlightOptions.js +1 -1
- package/views/support/TextureCompressionHelper.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/Util.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/Legend/styles/support/univariateUtils.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/ScaleRangeSlider/types.d.ts +3 -3
- package/assets/esri/core/workers/chunks/01f55004d64309f8538b.js +0 -1
- package/assets/esri/core/workers/chunks/039d9bc5b5015012f811.js +0 -1
- package/assets/esri/core/workers/chunks/08140725277de5d2e41a.js +0 -1
- package/assets/esri/core/workers/chunks/0d99bfb75dcb9fa29080.js +0 -1
- package/assets/esri/core/workers/chunks/144bad0c2415c345736a.js +0 -1
- package/assets/esri/core/workers/chunks/165ca7a97b611c8f26c4.js +0 -1
- package/assets/esri/core/workers/chunks/16cda273927ab0a39544.js +0 -1
- package/assets/esri/core/workers/chunks/1989410a618865f02dec.js +0 -1
- package/assets/esri/core/workers/chunks/29c610ce1c81ebb84a6b.js +0 -1
- package/assets/esri/core/workers/chunks/3223f9fbc76ba9ef8d13.js +0 -1
- package/assets/esri/core/workers/chunks/338d800d4efcc91cead1.js +0 -1
- package/assets/esri/core/workers/chunks/3415531224f8494d79ca.js +0 -1
- package/assets/esri/core/workers/chunks/3fdcc383bbd9cf0d274c.js +0 -1
- package/assets/esri/core/workers/chunks/46c290108a90518ef695.js +0 -1
- package/assets/esri/core/workers/chunks/48b8b57f559a53c6c513.js +0 -1
- package/assets/esri/core/workers/chunks/4a979fce1c971b614a18.js +0 -1
- package/assets/esri/core/workers/chunks/59a88dd53f8806bbec06.js +0 -1
- package/assets/esri/core/workers/chunks/5aeb5e18514644fe2cf9.js +0 -1
- package/assets/esri/core/workers/chunks/5bd1414220e42cb8ebcf.js +0 -1
- package/assets/esri/core/workers/chunks/5d781c2c6204cffffd0d.js +0 -1
- package/assets/esri/core/workers/chunks/6edc13a426e00bb93a9b.js +0 -1
- package/assets/esri/core/workers/chunks/723df53cfa0189837d01.js +0 -1
- package/assets/esri/core/workers/chunks/7400b8c454b47ee4fb3c.js +0 -1
- package/assets/esri/core/workers/chunks/7862abd24fb5c3b12e6b.js +0 -1
- package/assets/esri/core/workers/chunks/796c6195b6bf59dcc9bd.js +0 -1
- package/assets/esri/core/workers/chunks/7af4edc6e87d27b9d467.js +0 -1
- package/assets/esri/core/workers/chunks/81bcc495e6eaf2cf7474.js +0 -1
- package/assets/esri/core/workers/chunks/934e1f2153e6fad6ed23.js +0 -1
- package/assets/esri/core/workers/chunks/990e96139b5a1dccb061.js +0 -1
- package/assets/esri/core/workers/chunks/a607541959169741a943.js +0 -1
- package/assets/esri/core/workers/chunks/aa779896fd9e5c341349.js +0 -1
- package/assets/esri/core/workers/chunks/c131e0dd180a4c10e12e.js +0 -1
- package/assets/esri/core/workers/chunks/c7adb7b77721c75891f4.js +0 -1
- package/assets/esri/core/workers/chunks/cd55cad81accf51d2989.js +0 -1
- package/assets/esri/core/workers/chunks/ce324dde6d7daea33638.js +0 -1
- package/assets/esri/core/workers/chunks/d3412518a7b518860fbb.js +0 -1
- package/assets/esri/core/workers/chunks/dac69c0047488fdf986d.js +0 -1
- package/assets/esri/core/workers/chunks/dba5f44c4e4a3f075df2.js +0 -1
- package/assets/esri/core/workers/chunks/e67ea2f1714e5abeae44.js +0 -1
- package/assets/esri/core/workers/chunks/e8fb2ba7b7a4f0916325.js +0 -1
- package/assets/esri/core/workers/chunks/f10c883eb26330e3421c.js +0 -1
- package/assets/esri/core/workers/chunks/f3b4159c0722df8ffe13.js +0 -1
- package/assets/esri/core/workers/chunks/f75eec2cbc541eec9712.js +0 -1
- package/layers/geospatialPDF/projectionToWKTUtils.js +0 -3
- package/libs/maquette/cache.js +0 -2
- package/libs/maquette/dom.js +0 -2
- package/libs/maquette/h.js +0 -2
- package/libs/maquette/index.js +0 -2
- package/libs/maquette/mapping.js +0 -2
- package/libs/maquette/projection.js +0 -2
- package/libs/maquette/projector.js +0 -2
- package/libs/maquette/utilities/window-performance-projector-logger.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{simplePipelineState as t}from"../../utils.js";import{Technique as n}from"../Technique.js";import{FilterEffectShader as r}from"../shaders/ColorizeShader.js";import i
|
|
2
|
+
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{simplePipelineState as t}from"../../utils.js";import{Technique as n}from"../Technique.js";import{FilterEffectShader as r}from"../shaders/ColorizeShader.js";import{Texture as i}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as a}from"../../../../../../webgl/TextureDescriptor.js";class o extends n{constructor(){super(...arguments),this.type=9,this._layerFBOTexture=null,this._size=[0,0],this.shaders={filterEffect:new r}}shutdown(){super.shutdown(),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,n){let{width:r,height:i}=n.layerFBO;this._createOrResizeResources(e,r,i);let{context:a,painter:o}=e,s=n.effect.colorMatrix,c=this._layerFBOTexture;a.bindFramebuffer(n.layerFBO),n.layerFBO.copyToTexture(0,0,r,i,0,0,c),o.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:`none`},depth:!1,stencil:!1});let l={coefficients:s};o.submitDrawMesh(a,{shader:this.shaders.filterEffect,uniforms:{filterEffectConfig:l},textures:{colorTexture:{texture:c,unit:2}},defines:null,optionalAttributes:null,useComputeBuffer:!1},o.quadMesh),o.setPipelineState({...t,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1}})}_createOrResizeResources(e,t,n){let{context:r}=e;if(!(this._layerFBOTexture&&this._size[0]===t&&this._size[1]===n)){if(this._size[0]=t,this._size[1]=n,this._layerFBOTexture)this._layerFBOTexture.resize(t,n);else{let e=new a(t,n);e.internalFormat=6408,e.wrapMode=33071,this._layerFBOTexture=new i(r,e)}}}}export{o as ColorizeTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../../../../../../../core/RandomLCG.js";import{tileSize as t}from"../../../definitions.js";import{SimpleMesh as n}from"../../../meshing/SimpleMesh.js";import{SizedDepthStencilFormat as r,DataType as i,PrimitiveType as a,PixelType as o}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as s}from"../../../../../../webgl/FramebufferObject.js";import{Renderbuffer as c}from"../../../../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as l}from"../../../../../../webgl/RenderbufferDescriptor.js";import u
|
|
2
|
+
import e from"../../../../../../../core/RandomLCG.js";import{tileSize as t}from"../../../definitions.js";import{SimpleMesh as n}from"../../../meshing/SimpleMesh.js";import{SizedDepthStencilFormat as r,DataType as i,PrimitiveType as a,PixelType as o}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as s}from"../../../../../../webgl/FramebufferObject.js";import{Renderbuffer as c}from"../../../../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as l}from"../../../../../../webgl/RenderbufferDescriptor.js";import{Texture as u}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as d}from"../../../../../../webgl/TextureDescriptor.js";const f={pos:{count:2,type:i.UNSIGNED_SHORT}};class p{constructor(){this._dotTextureSize=0,this._dotTextures=null,this._dotMesh=null}destroy(){this._disposeTextures(),this._dotFBO?.dispose(),this._dotMesh?.destroy()}getFBO(e){if(this._dotFBO==null){let n=t,i=t,a=new d(n,i);a.samplingMode=9728,a.wrapMode=33071;let o=new c(e,new l(r.DEPTH24_STENCIL8,n,i));this._dotFBO=new s(e,a,o)}return this._dotFBO}getDotDensityMesh(e){if(this._dotMesh==null){let r=t,i=r*r,o=new Int16Array(i*2);for(let e=0;e<r;e++)for(let t=0;t<r;t++)o[2*(t+e*r)]=t,o[2*(t+e*r)+1]=e;this._dotMesh=n.create(e,{primitive:a.POINTS,vertex:o,count:i,layout:f})}return this._dotMesh}getDotDensityTextures(t,n,r){if((this._dotTextureSize!==n||this._seed!==r)&&(this._disposeTextures(),this._dotTextureSize=n,this._seed=r),this._dotTextures===null){let i=new e(r);this._dotTextures=[this._allocDotDensityTexture(t,n,i),this._allocDotDensityTexture(t,n,i)]}return this._dotTextures}_disposeTextures(){if(this._dotTextures){for(let e=0;e<this._dotTextures.length;e++)this._dotTextures[e].dispose();this._dotTextures=null}}_allocDotDensityTexture(e,t,n){let r=new Float32Array(t*t*4);for(let e=0;e<r.length;e++)r[e]=n.getFloat();let i=new d(t);return i.dataType=o.FLOAT,i.samplingMode=9728,new u(e,i,r)}}export{p as DotDensityResources};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{simplePipelineState as n}from"../../utils.js";import{Technique as r}from"../Technique.js";import{GaussianBlurShader as i}from"../shaders/BlurShader.js";import{DropShadowCompositeShader as a}from"../shaders/DropShadowShader.js";import{DisposableFramebufferObject as o}from"../../../../../../webgl/FramebufferObject.js";import s
|
|
2
|
+
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{simplePipelineState as n}from"../../utils.js";import{Technique as r}from"../Technique.js";import{GaussianBlurShader as i}from"../shaders/BlurShader.js";import{DropShadowCompositeShader as a}from"../shaders/DropShadowShader.js";import{DisposableFramebufferObject as o}from"../../../../../../webgl/FramebufferObject.js";import{Texture as s}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as c}from"../../../../../../webgl/TextureDescriptor.js";const l=[1,0],u=[0,1];class d extends r{constructor(){super(...arguments),this.type=13,this._layerFBOTexture=null,this._horizontalBlurFBO=null,this._verticalBlurFBO=null,this._size=[0,0],this.shaders={gaussianBlur:new i,composite:new a}}shutdown(){super.shutdown(),this._horizontalBlurFBO=e(this._horizontalBlurFBO),this._verticalBlurFBO=e(this._verticalBlurFBO),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,r){let{context:i,painter:a}=e,{layerFBO:o}=r,s=o.width,c=o.height,d=[Math.round(s),Math.round(c)],{blurRadius:f,offsetX:p,offsetY:m,color:h}=r.effect,g=[t(p),t(m)];this._createOrResizeResources(e,s,c,d);let _=this._horizontalBlurFBO,v=this._verticalBlurFBO;a.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:`none`},depth:{write:!1,test:!1},stencil:{write:{mask:0},test:!1}});let y=this._layerFBOTexture;o.copyToTexture(0,0,s,c,0,0,y),i.setViewport(0,0,d[0],d[1]),i.bindFramebuffer(_),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texSize:d,direction:l,sigma:f}},textures:{texture:{texture:o.colorTexture,unit:4}},defines:{kernelRadius:Math.ceil(f)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),i.bindFramebuffer(v),a.submitDrawMesh(i,{shader:this.shaders.gaussianBlur,uniforms:{gaussianBlurConfig:{texSize:d,direction:u,sigma:f}},textures:{texture:{texture:_?.colorTexture,unit:5}},defines:{kernelRadius:Math.ceil(f)},optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),i.bindFramebuffer(o),i.setViewport(0,0,s,c),a.submitDrawMesh(i,{shader:this.shaders.composite,uniforms:{compositeConfig:{shadowColor:[h[3]*(h[0]/255),h[3]*(h[1]/255),h[3]*(h[2]/255),h[3]],shadowOffset:g}},textures:{blurTexture:{texture:v?.colorTexture,unit:2},layerFBOTexture:{texture:y,unit:3}},defines:null,optionalAttributes:null,useComputeBuffer:!1},a.quadMesh),a.setPipelineState({...n,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1}})}_createOrResizeResources(e,t,n,r){let{context:i}=e;if(!(this._horizontalBlurFBO&&this._size[0]===t&&this._size[1]===n)){if(this._size[0]=t,this._size[1]=n,this._horizontalBlurFBO)this._horizontalBlurFBO.resize(r[0],r[1]);else{let e=new c(r[0],r[1]);e.internalFormat=6408,e.wrapMode=33071,this._horizontalBlurFBO=new o(i,e)}if(this._verticalBlurFBO)this._verticalBlurFBO.resize(r[0],r[1]);else{let e=new c(r[0],r[1]);e.internalFormat=6408,e.wrapMode=33071,this._verticalBlurFBO=new o(i,e)}if(this._layerFBOTexture)this._layerFBOTexture.resize(t,n);else{let e=new c(t,n);e.internalFormat=6408,e.wrapMode=33071,this._layerFBOTexture=new s(i,e)}}}}export{d as DropShadowTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../../../../../../../core/Logger.js";import{disposeMaybe as t}from"../../../../../../../core/maybe.js";import{PixelType as n,SizedDepthStencilFormat as r}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as i}from"../../../../../../webgl/FramebufferObject.js";import{loadHeatmapTextureConfiguration as a}from"../../../../../../webgl/heatmapTextureUtils.js";import{RenderbufferDescriptor as o}from"../../../../../../webgl/RenderbufferDescriptor.js";import s
|
|
2
|
+
import e from"../../../../../../../core/Logger.js";import{disposeMaybe as t}from"../../../../../../../core/maybe.js";import{PixelType as n,SizedDepthStencilFormat as r}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as i}from"../../../../../../webgl/FramebufferObject.js";import{loadHeatmapTextureConfiguration as a}from"../../../../../../webgl/heatmapTextureUtils.js";import{RenderbufferDescriptor as o}from"../../../../../../webgl/RenderbufferDescriptor.js";import{Texture as s}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as c}from"../../../../../../webgl/TextureDescriptor.js";const l=()=>e.getLogger(`esri.views.2d.engine.webgl.shaderGraph.techniques.heatmap.HeatmapResources`);class u{destroy(){this._accumulateFramebuffer=t(this._accumulateFramebuffer),this._resolveGradientTexture=t(this._resolveGradientTexture),this._prevGradientHash=null,this._qualityProfile=null}get initialized(){return this._accumulateFramebuffer!=null&&this._resolveGradientTexture!=null}get accumulateFramebuffer(){return this._accumulateFramebuffer}get resolveGradientTexture(){return this._resolveGradientTexture}loadQualityProfile(e){if(this._qualityProfile==null){let t=a(e,l());this._qualityProfile={...t,defines:{usesHalfFloatPrecision:t.dataType!==n.FLOAT}}}return this._qualityProfile}ensureAccumulateFBO(e,t,n){if(this._accumulateFramebuffer==null){let{dataType:a,samplingMode:s,pixelFormat:l,internalFormat:u}=this.loadQualityProfile(e),d=new c(t,n);d.pixelFormat=l,d.internalFormat=u,d.dataType=a,d.samplingMode=s,d.wrapMode=33071;let f=new o(r.DEPTH24_STENCIL8,t,n);this._accumulateFramebuffer=new i(e,d,f)}else{let{width:e,height:r}=this._accumulateFramebuffer;(e!==t||r!==n)&&this._accumulateFramebuffer.resize(t,n)}return this._accumulateFramebuffer}ensureResolveGradientTexture(e,t,n){if(this._resolveGradientTexture==null){let t=new c;t.wrapMode=33071,this._resolveGradientTexture=new s(e,t),this._prevGradientHash=null}return this._prevGradientHash!==t&&(this._resolveGradientTexture.resize(n.length/4,1),this._resolveGradientTexture.setData(n),this._prevGradientHash=t),this._resolveGradientTexture}}export{u as HeatmapResources};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{importLazily as e}from"../../../../../../../core/importUtils.js";import{memoize as t}from"../../../../../../../core/MapUtils.js";import{pt2px as n}from"../../../../../../../core/screenUtils.js";import{numericHash as r}from"../../../../../../../core/string.js";import{fromRotation as i,translate as a}from"../../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as o}from"../../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as s,set as c,sub as l,normalize as u,add as d,scale as f}from"../../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as p}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{create as m}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{convertGeometryToFlat as h,convertOptimizedGeometryToFlat as g,convertFlatToOptimizedGeometry as _,FlatGeometry as v}from"../../../../../../../geometry/FlatGeometry.js";import{GeometryCursor as y}from"../../../../../../../geometry/GeometryCursor.js";import{getLabelPoint as b}from"../../../../../../../geometry/support/labelPoint.js";import{generalizeOptimizedGeometry as x,convertToGeometry as S}from"../../../../../../../layers/graphics/featureConversionUtils.js";import C from"../../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as w}from"../../../definitions.js";import T from"../../../collisions/BoundingBox.js";import{LabelMetric as E}from"../../../collisions/LabelMetric.js";import{smoothPaths as D,pathDivide as O,closestPointOnPaths as k}from"../../../mesh/templates/segmentUtils.js";import{getMinMaxZoom as A,processColorInput as j}from"../fill/meshWriterUtils.js";import{TextMeshWriter as M,maxLabelZoom as N}from"../text/TextMeshWriter.js";const P=w*w/16;function F(e,t,n,r){if(n===0&&r===0)return null;let i=Math.max(e.xmax-e.xmin,e.ymax-e.ymin)+1;return{x:t.x-n*i,y:t.y+r*i}}const I=e(()=>import(`../../../../../../../geometry/operators/gx/operatorIntersection.js`)),L=e(()=>import(`../../../../../../../chunks/FlatGeometry.js`));function R(e,t,n){return r(`${e}${t}${n}`)}function z(e,t,n,i,a){let o=i*2**(N-a);return r(`${e}${t}${n}${o}`)}function B(e,t,n){return r(`${e}${t}${n}`)}function V(e,t,n,i,a){let o=n*2**(N-i);return r(`${e}${a}${t}${o}`)}const H=t(e=>{let t=0;if(e===0)return 1/0;for(;!(e%2);)t++,e/=2;return t});class U extends M{constructor(){super(...arguments),this.calloutRecordsUseLabelPhase=!0,this._zoomLevel=0,this._calloutVisuals=[],this._calloutVisualIndex=0}async loadDependencies(){await Promise.all([super.loadDependencies(),I.getImportPromise(),L.getImportPromise()])}getCalloutEffectGeometry(e){let t=this._calloutVisuals[this._calloutVisualIndex]?.metric;return t?y.fromJSON({x:t.anchorX,y:t.anchorY}):null}getLocalCalloutReferenceInfo(){let e=this._calloutVisuals[this._calloutVisualIndex],t=e?.referenceInfo;if(!t||!e)return t;let{metric:n,featureAnchor:r}=e,i=t.anchor??{x:0,y:0},a={x:r[0]-n.anchorX,y:n.anchorY-r[1]},o={x:a.x+i.x,y:a.y+i.y},s=F(t.bodyBounds,o,n.directionX,n.directionY);return{...t,anchor:o,...s?{layoutAnchor:s}:null}}getCalloutVisualCount(){return this._calloutVisuals.length}setCalloutVisualIndex(e){if(e<0||e>=this._calloutVisuals.length)throw Error(`InternalError: callout visual index is out of bounds`);this._calloutVisualIndex=e}includeCalloutRecordRange(e,t){this._calloutVisuals[this._calloutVisualIndex]?.metric.includeRecordRange(e,t)}includeCalloutCollisionBounds(e){this._calloutVisuals[this._calloutVisualIndex]?.metric.includeCalloutCollisionBounds(e)}includeCalloutPartCollisionBounds(e){this._calloutVisuals[this._calloutVisualIndex]?.metric.includeCalloutPartCollisionBounds(e)}_write(e,{target:t,effect:n,level:r,viewExtent:i}){if(this._zoomLevel=r,this._calloutVisuals=[],this._calloutVisualIndex=0,n?.geometry!=null)throw Error(`InternalError: EffectGeometry not support for LabelMeshWriter`);switch(t.geometryType){case`esriGeometryPoint`:{let n=t.readXForDisplay(),r=t.readYForDisplay();this._writePoint(e,n,r,0,t);break}case`esriGeometryEnvelope`:case`esriGeometryPolygon`:this._writePolygon(e,t,i);break;case`esriGeometryMultipoint`:{let n=0,r=y.fromFeatureSetReader(t);if(r?.nextPath())for(;r.nextPoint();)this._writePoint(e,r.x,r.y,n++,t);break}case`esriGeometryPolyline`:this._writeLines(e,t)}}_getMetricDir(){let{horizontalAlignment:e,verticalAlignment:t}=this.evaluatedMeshParams;return[e===`center`?0:e===`right`?-1:1,t===`middle`?0:t===`bottom`?-1:1]}_createLineLabelMetric(e,t,n,r,i,a){let[o,s]=this._getMetricDir(),c=this.evaluatedMeshParams.scaleInfo?.maxScale??0,l=this.evaluatedMeshParams.scaleInfo?.minScale??0,u=this.evaluatedMeshParams.labelClassId;return new E(e,u,t,n,r,i,o,s,c,l,a)}_writePolygon(e,t,n){let r=t.readGeometryForDisplay()?.justXY();e.requiresRefresh||=(r?.area()||0)>=P;let i=this._getPolygonLabelPoint(t,n);i&&this._writePoint(e,i[0],i[1],0,t)}_getPolygonLabelPoint(e,t){if(!t){let t=e.readCentroidForDisplay()?.coords;return t?[t[0],t[1]]:null}let n=I.module,r=L.module.constructFromFlatGeometry,i=e.readGeometryForDisplay()?.justXY(),a=e.readCentroidForDisplay()?.coords,o=i?.area()||0;if(!a)return;let s=o>=P,c=r(h(t)),l=r(h({x:a[0],y:a[1]})),u=!!n.execute(l,c,null);if(!i||!s||!u)return[a[0],a[1]];let d=r(g(`polygon`,i,null)),f=n.execute(d,c,null);if(!f)return[a[0],a[1]];let p=_(new v(f.toFlatGeometry())),m=y.fromOptimized(p,`esriGeometryPolygon`,1),x=b(m)??a;return[x[0],x[1]]}_writePoint(e,t,n,r,i){if(t<0||t>w||n<0||n>w)return;let a=this._getShaping();if(!a)return;let o=i.getDisplayId(),s=this.evaluatedMeshParams.labelClassId,c=this.evaluatedMeshParams.layerId,l=R(c,i.getObjectId(),r),u=B(i.getObjectId(),s,r),[d,f]=this._getMetricDir(),p=this.evaluatedMeshParams.scaleInfo?.maxScale??0,m=this.evaluatedMeshParams.scaleInfo?.minScale??0,h=this._getPointLabelReferenceBounds(),g=new E(o,s,l,u,t,n,d,f,p,m,h);this._calloutVisuals.push({metric:g,featureAnchor:[t,n],referenceInfo:this._createLocalCalloutReferenceInfo(a,h)}),e.metricStart(g),this._writeGlyphs(e,o,t,n,a,0,h,void 0,!1),e.metricBoxWrite(a.boundsT),e.metricEnd()}_getPointReferenceBounds(){return this._references?.get(`label-reference-symbol`)?.getBoundsInfo()??null}_getPointLabelReferenceBounds(){let e=this._getPointReferenceBounds()??{offsetX:0,offsetY:0,size:0},t=this.evaluatedMeshParams.labelOffsetDistance??0,[n,r]=this._getMetricDir();return{...e,offsetX:e.offsetX+n*t,offsetY:e.offsetY-r*t}}_writeLines(e,t){let{scaleInfo:n,verticalAlignment:r}=this.evaluatedMeshParams,i=this.evaluatedMeshParams.repeatLabelDistance||128,a=this._getShaping(`middle`);if(!a)return;let o=(e,t,n,r)=>this._placeSubdivGlyphs(e,t,n,r),s=(a.bounds.width+i)/2;this._current={out:e,id:t.getDisplayId(),objId:t.getObjectId(),shaping:a,zoomRange:A(n,this.getTileInfo()),referenceBounds:this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0},calloutPaths:t.readLegacyGeometryForDisplay().paths.map(e=>e.map(([e,t])=>[e,t])),offsetDirection:null,pathIndex:0},this._verticalPlacement=r===`bottom`?`above`:r===`top`?`below`:null,this._verticalPlacement?this._writeAboveAndBelowAlong(t,o,s):this._writeCenterAlong(t,o,s)}_writeAboveAndBelowAlong(e,t,n){let{repeatLabel:r}=this.evaluatedMeshParams,{shaping:i}=this._current,a=i.bounds.halfHeight,o=e.readGeometryForDisplay()?.justXY();if(!o)return;let s=x(o,`esriGeometryPolyline`,1)??new C,c=W(s,a),l=W(s,-a),u=S(l,`esriGeometryPolyline`,!1,!1),d=S(c,`esriGeometryPolyline`,!1,!1),f=D(d.paths,i.bounds.width),p=D(u.paths,i.bounds.width);this._current.offsetDirection=`above`;for(let e=0;e<f.length;e++)this._current.pathIndex=e,O(f[e],n,t,!!r);this._current.offsetDirection=`below`;for(let e=0;e<p.length;e++)this._current.pathIndex=e,O(p[e],n,t,!!r)}_writeCenterAlong(e,t,n){let{repeatLabel:r}=this.evaluatedMeshParams,{shaping:i}=this._current,a=D(e.readLegacyGeometryForDisplay().paths,i.bounds.width);for(let e=0;e<a.length;e++)this._current.pathIndex=e,O(a[e],n,t,!!r)}_placeSubdivGlyphs(e,t,n,r){if(e.x<0||e.x>w||e.y<0||e.y>w)return;let{allowOverrun:i,labelPosition:a,repeatLabelDistance:o,layerId:s,labelClassId:c}=this.evaluatedMeshParams,{objId:l,shaping:u,pathIndex:d}=this._current,f=this._current.zoomRange[0],p=H(t),m=this._current.shaping.bounds.width/2,h=Math.sqrt(o||128)/2,g=Math.min(n,r-n),_=u.isMultiline?N:Math.log2(g/(h+m/2)),v=t===0?_:Math.min(p,_),y=Math.max(f,this._zoomLevel+1-v),b=this._zoomLevel-y,x=u.bounds.width/2*2**b,S=z(s,l,d,t,this._zoomLevel),C=V(l,d,t,this._zoomLevel,c);i&&b<0?this._placeStraightAlong(e,f,S,C):a===`parallel`||u.isMultiline?this._placeStraightAlong(e,y,S,C):a===`curved`&&this._placeCurved(e,y,x,S,C)}_placeCurved(e,t,n,r,i){let{out:a,id:o}=this._current,s=this._createLineLabelMetric(o,r,i,e.x,e.y);this._registerLineCalloutMetric(s),a.metricStart(s);let c=e.clone(),l=e.angle*(180/Math.PI)%360,u=(e.angle*(180/Math.PI)+180)%360;this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||(this._placeFirst(c,t,1,l),this._placeBack(e,c,t,n,1,l),this._placeForward(e,c,t,n,1,l)),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||(this._placeFirst(c,t,0,u),this._placeBack(e,c,t,n,0,u),this._placeForward(e,c,t,n,0,u)),a.metricEnd()}_placeStraightAlong(e,t,r,s){let{out:c,id:l,shaping:u,zoomRange:d,referenceBounds:f}=this._current,{boxBorderLineColor:m,boxBackgroundColor:h}=this.evaluatedMeshParams,g=e.clone(),_=e.angle*(180/Math.PI)%360,v=(e.angle*(180/Math.PI)+180)%360,y=u.glyphs.length>0&&!!(m||h),b=this._createLineLabelMetric(l,r,s,e.x,e.y);if(this._registerLineCalloutMetric(b),c.metricStart(b),y){let r=Math.max(t,d[0],0),s=Math.min(N,d[1]),m=i(o(),-e.angle),h={minZoom:r,maxZoom:s,clipAngle:_,mapAligned:!0,isLineLabel:!0},g=n(this.evaluatedMeshParams.offsetX),y=n(this.evaluatedMeshParams.offsetY);if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){let t=p(g,-1*y),[n,r]=u.shapeBackground(a(o(),m,t));c.recordStart(this.instanceId,this.attributeLayout,u.glyphs[0].textureKey),this._writeTextBox(c,l,e.x,e.y,r,f,h),c.recordEnd()}if(!this._verticalPlacement||this._verticalPlacement!==this._current.offsetDirection){let t=p(g,y),[n,r]=u.shapeBackground(a(o(),m,t));h.clipAngle=v,c.recordStart(this.instanceId,this.attributeLayout,u.glyphs[0].textureKey),this._writeTextBox(c,l,e.x,e.y,r,f,h),c.recordEnd()}}this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||this._placeFirst(g,t,1,_,!0),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||this._placeFirst(g,t,0,v,!0),c.metricEnd()}_registerLineCalloutMetric(e){this._calloutVisuals.push({metric:e,featureAnchor:k(this._current.calloutPaths,e.anchorX,e.anchorY),referenceInfo:this._createLocalCalloutReferenceInfo(this._current.shaping)})}_placeBack(e,t,n,r,i,a){let o=e.clone(),s=e.backwardLength+0;for(;o.prev()&&!(s>=r);)this._placeOnSegment(o,t,s,n,-1,i,a),s+=o.length+0}_placeForward(e,t,n,r,i,a){let o=e.clone(),s=e.remainingLength+0;for(;o.next()&&!(s>=r);)this._placeOnSegment(o,t,s,n,1,i,a),s+=o.length+0}_placeFirst(e,t,n,r,i=!1){let{out:a,id:o,shaping:s,zoomRange:c,referenceBounds:l}=this._current,u=s.glyphs,d=this._getBoundsOffset(e.angle);for(let f of u){let u=f.x>s.bounds.x?n:1-n,p=u*e.remainingLength+(1-u)*e.backwardLength,m=Math.abs(f.x+f.width/2-s.bounds.x),h=Math.max(0,this._zoomLevel+Math.log2(m/(p+0))),g=Math.max(t,i?0:h);f.angle=e.angle+(1-n)*Math.PI;let _=[Math.max(c[0],g),Math.min(c[1],N)];this._writeLineGlyph(a,o,e.x,e.y,f,_,r,l),this._writeLineGlyphBox(a,f,n,_,d)}}_placeOnSegment(e,t,n,r,i,a,o){let{out:s,id:c,shaping:l,referenceBounds:u}=this._current,d=l.glyphs,f=e.dx/e.length,p=e.dy/e.length,m={x:e.x+n*-i*f,y:e.y+n*-i*p},h=this._getBoundsOffset(e.angle);for(let t of d){let d=t.x>l.bounds.x?a:1-a;if(!(d&&i===1||!d&&i===-1))continue;let f=Math.abs(t.x+t.width/2-l.bounds.x),p=Math.max(0,this._zoomLevel+Math.log2(f/n)-.1),g=Math.max(r,this._zoomLevel+Math.log2(f/(n+e.length+0)));if(p===0)continue;t.angle=e.angle+(1-a)*Math.PI;let _=[g,p];this._writeLineGlyph(s,c,m.x,m.y,t,_,o,u),this._writeLineGlyphBox(s,t,a,_,h)}}_getBoundsOffset(e){let t=n(this.evaluatedMeshParams.offsetX),r=n(this.evaluatedMeshParams.offsetY),a=p(t,r),c=i(o(),-e);return s(a,a,c)}_writeLineGlyph(e,t,n,r,i,a,o,s){e.recordStart(this.instanceId,this.attributeLayout,i.textureKey);let{texcoords:c,offsets:l}=i,{fontSize:u,haloSize:d,outlineSize:f}=this._textMeshTransformProps,p=this._getDefaultGlyphMetrics(this.evaluatedMeshParams.glyphs),m=i.fontSize??u;this._writeQuad(e,t,n,r,{sdfSize:p.sdfSize,sdfRadius:p.sdfRadius,texcoords:c,offsets:l,fontSize:m,haloSize:d,outlineSize:f,color:i.color?j(i.color):j(this.evaluatedMeshParams.color),isBackground:!1,referenceBounds:s,minZoom:Math.max(this._current.zoomRange[0],a[0]),maxZoom:Math.min(this._current.zoomRange[1],a[1]),clipAngle:o,mapAligned:!0,isLineLabel:!0}),e.recordEnd()}_writeLineGlyphBox(e,t,n,r,i){if((n||this._current.offsetDirection)&&this._isVisible(r)&&t.bounds){let n=t.bounds,r=new T(n.x+i[0],n.y+i[1],n.width,n.height);e.metricBoxWrite(r)}}_isVisible(e){let t=Math.max(this._current.zoomRange[0],e[0]),n=Math.min(this._current.zoomRange[1],e[1]),r=this._zoomLevel;return t<=r&&r<=n}}function W(e,t){let n=new C,{coords:r,lengths:i}=e,a=m(),o=m(),s=m(),p=m(),h=m(),g=m(),_=0;for(let e=0;e<i.length;e++){let m=i[e];for(let e=0;e<m;e++){let i=2*(e+_-1),v=2*(e+_),y=2*(e+_+1);e>0?c(a,r[i],r[i+1]):c(a,0,0),c(o,r[v],r[v+1]),e<m-1?c(s,r[y],r[y+1]):c(s,0,0),e===0?c(p,0,0):(l(p,o,a),u(p,p),c(p,p[1],-p[0])),e===m-1?c(h,0,0):(l(h,s,o),u(h,h),c(h,h[1],-h[0])),d(g,p,h),u(g,g);let b=g[0]*h[0]+g[1]*h[1];b!==0&&f(g,g,b),f(g,g,t),n.coords.push(o[0]+g[0],o[1]+g[1])}n.lengths.push(m),_+=m}return n}export{U as LabelMeshWriter,R as labelIdHash,B as labelMetricHash,z as lineLabelIdHash,V as lineLabelMetricHash};
|
|
2
|
+
import{importLazily as e}from"../../../../../../../core/importUtils.js";import{memoize as t}from"../../../../../../../core/MapUtils.js";import{pt2px as n}from"../../../../../../../core/screenUtils.js";import{numericHash as r}from"../../../../../../../core/string.js";import{fromRotation as i,translate as a}from"../../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as o}from"../../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as s,set as c,sub as l,normalize as u,add as d,scale as f}from"../../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as p}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{create as m}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{convertGeometryToFlat as h,convertOptimizedGeometryToFlat as g,convertFlatToOptimizedGeometry as _,FlatGeometry as v}from"../../../../../../../geometry/FlatGeometry.js";import{GeometryCursor as y}from"../../../../../../../geometry/GeometryCursor.js";import{getLabelPoint as b}from"../../../../../../../geometry/support/labelPoint.js";import{generalizeOptimizedGeometry as x,convertToGeometry as S}from"../../../../../../../layers/graphics/featureConversionUtils.js";import C from"../../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as w}from"../../../definitions.js";import T from"../../../collisions/BoundingBox.js";import{LabelMetric as E}from"../../../collisions/LabelMetric.js";import{smoothPaths as D,pathDivide as O,closestPointOnPaths as k}from"../../../mesh/templates/segmentUtils.js";import{getMinMaxZoom as A,processColorInput as j}from"../fill/meshWriterUtils.js";import{TextMeshWriter as M,maxLabelZoom as N}from"../text/TextMeshWriter.js";const P=w*w/16;function F(e,t,n,r){if(n===0&&r===0)return null;let i=Math.max(e.xmax-e.xmin,e.ymax-e.ymin)+1;return{x:t.x-n*i,y:t.y+r*i}}const I=e(()=>import(`../../../../../../../geometry/operators/gx/operatorIntersection.js`)),L=e(()=>import(`../../../../../../../chunks/FlatGeometry.js`));function R(e,t,n){return r(`${e}${t}${n}`)}function z(e,t,n,i,a){let o=i*2**(N-a);return r(`${e}${t}${n}${o}`)}function B(e,t,n){return r(`${e}${t}${n}`)}function V(e,t,n,i,a){let o=n*2**(N-i);return r(`${e}${a}${t}${o}`)}const H=t(e=>{let t=0;if(e===0)return 1/0;for(;!(e%2);)t++,e/=2;return t});class U extends M{constructor(){super(...arguments),this.calloutRecordsUseLabelPhase=!0,this._zoomLevel=0,this._calloutVisuals=[],this._calloutVisualIndex=0}async loadDependencies(){await Promise.all([super.loadDependencies(),I.getImportPromise(),L.getImportPromise()])}getCalloutEffectGeometry(e){return this._calloutVisuals[this._calloutVisualIndex]?.metric?y.fromJSON({x:0,y:0}):null}getLocalCalloutReferenceInfo(){let e=this._calloutVisuals[this._calloutVisualIndex],t=e?.referenceInfo;if(!t||!e)return t;let{metric:n,featureAnchor:r}=e,i=t.anchor??{x:0,y:0},a={x:r[0]-n.anchorX,y:n.anchorY-r[1]},o={x:a.x+i.x,y:a.y+i.y},s=F(t.bodyBounds,o,n.directionX,n.directionY);return{...t,anchor:o,...s?{layoutAnchor:s}:null}}getCalloutVisualCount(){return this._calloutVisuals.length}setCalloutVisualIndex(e){if(e<0||e>=this._calloutVisuals.length)throw Error(`InternalError: callout visual index is out of bounds`);this._calloutVisualIndex=e}includeCalloutRecordRange(e,t){this._calloutVisuals[this._calloutVisualIndex]?.metric.includeRecordRange(e,t)}includeCalloutCollisionBounds(e){this._calloutVisuals[this._calloutVisualIndex]?.metric.includeCalloutCollisionBounds(e)}includeCalloutPartCollisionBounds(e){this._calloutVisuals[this._calloutVisualIndex]?.metric.includeCalloutPartCollisionBounds(e)}_write(e,{target:t,effect:n,level:r,viewExtent:i}){if(this._zoomLevel=r,this._calloutVisuals=[],this._calloutVisualIndex=0,n?.geometry!=null)throw Error(`InternalError: EffectGeometry not support for LabelMeshWriter`);switch(t.geometryType){case`esriGeometryPoint`:{let n=t.readXForDisplay(),r=t.readYForDisplay();this._writePoint(e,n,r,0,t);break}case`esriGeometryEnvelope`:case`esriGeometryPolygon`:this._writePolygon(e,t,i);break;case`esriGeometryMultipoint`:{let n=0,r=y.fromFeatureSetReader(t);if(r?.nextPath())for(;r.nextPoint();)this._writePoint(e,r.x,r.y,n++,t);break}case`esriGeometryPolyline`:this._writeLines(e,t)}}_getMetricDir(){let{horizontalAlignment:e,verticalAlignment:t}=this.evaluatedMeshParams;return[e===`center`?0:e===`right`?-1:1,t===`middle`?0:t===`bottom`?-1:1]}_createLineLabelMetric(e,t,n,r,i,a){let[o,s]=this._getMetricDir(),c=this.evaluatedMeshParams.scaleInfo?.maxScale??0,l=this.evaluatedMeshParams.scaleInfo?.minScale??0,u=this.evaluatedMeshParams.labelClassId;return new E(e,u,t,n,r,i,o,s,c,l,a)}_writePolygon(e,t,n){let r=t.readGeometryForDisplay()?.justXY();e.requiresRefresh||=(r?.area()||0)>=P;let i=this._getPolygonLabelPoint(t,n);i&&this._writePoint(e,i[0],i[1],0,t)}_getPolygonLabelPoint(e,t){if(!t){let t=e.readCentroidForDisplay()?.coords;return t?[t[0],t[1]]:null}let n=I.module,r=L.module.constructFromFlatGeometry,i=e.readGeometryForDisplay()?.justXY(),a=e.readCentroidForDisplay()?.coords,o=i?.area()||0;if(!a)return;let s=o>=P,c=r(h(t)),l=r(h({x:a[0],y:a[1]})),u=!!n.execute(l,c,null);if(!i||!s||!u)return[a[0],a[1]];let d=r(g(`polygon`,i,null)),f=n.execute(d,c,null);if(!f)return[a[0],a[1]];let p=_(new v(f.toFlatGeometry())),m=y.fromOptimized(p,`esriGeometryPolygon`,1),x=b(m)??a;return[x[0],x[1]]}_writePoint(e,t,n,r,i){if(t<0||t>w||n<0||n>w)return;let a=this._getShaping();if(!a)return;let o=i.getDisplayId(),s=this.evaluatedMeshParams.labelClassId,c=this.evaluatedMeshParams.layerId,l=R(c,i.getObjectId(),r),u=B(i.getObjectId(),s,r),[d,f]=this._getMetricDir(),p=this.evaluatedMeshParams.scaleInfo?.maxScale??0,m=this.evaluatedMeshParams.scaleInfo?.minScale??0,h=this._getPointLabelReferenceBounds(),g=new E(o,s,l,u,t,n,d,f,p,m,h);this._calloutVisuals.push({metric:g,featureAnchor:[t,n],referenceInfo:this._createLocalCalloutReferenceInfo(a,h)}),e.metricStart(g),this._writeGlyphs(e,o,t,n,a,0,h,void 0,!1),e.metricBoxWrite(a.boundsT),e.metricEnd()}_getPointReferenceBounds(){return this._references?.get(`label-reference-symbol`)?.getBoundsInfo()??null}_getPointLabelReferenceBounds(){let e=this._getPointReferenceBounds()??{offsetX:0,offsetY:0,size:0},t=this.evaluatedMeshParams.labelOffsetDistance??0,[n,r]=this._getMetricDir();return{...e,offsetX:e.offsetX+n*t,offsetY:e.offsetY-r*t}}_writeLines(e,t){let{scaleInfo:n,verticalAlignment:r}=this.evaluatedMeshParams,i=this.evaluatedMeshParams.repeatLabelDistance||128,a=this._getShaping(`middle`);if(!a)return;let o=(e,t,n,r)=>this._placeSubdivGlyphs(e,t,n,r),s=(a.bounds.width+i)/2;this._current={out:e,id:t.getDisplayId(),objId:t.getObjectId(),shaping:a,zoomRange:A(n,this.getTileInfo()),referenceBounds:this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0},calloutPaths:t.readLegacyGeometryForDisplay().paths.map(e=>e.map(([e,t])=>[e,t])),offsetDirection:null,pathIndex:0},this._verticalPlacement=r===`bottom`?`above`:r===`top`?`below`:null,this._verticalPlacement?this._writeAboveAndBelowAlong(t,o,s):this._writeCenterAlong(t,o,s)}_writeAboveAndBelowAlong(e,t,n){let{repeatLabel:r}=this.evaluatedMeshParams,{shaping:i}=this._current,a=i.bounds.halfHeight,o=e.readGeometryForDisplay()?.justXY();if(!o)return;let s=x(o,`esriGeometryPolyline`,1)??new C,c=W(s,a),l=W(s,-a),u=S(l,`esriGeometryPolyline`,!1,!1),d=S(c,`esriGeometryPolyline`,!1,!1),f=D(d.paths,i.bounds.width),p=D(u.paths,i.bounds.width);this._current.offsetDirection=`above`;for(let e=0;e<f.length;e++)this._current.pathIndex=e,O(f[e],n,t,!!r);this._current.offsetDirection=`below`;for(let e=0;e<p.length;e++)this._current.pathIndex=e,O(p[e],n,t,!!r)}_writeCenterAlong(e,t,n){let{repeatLabel:r}=this.evaluatedMeshParams,{shaping:i}=this._current,a=D(e.readLegacyGeometryForDisplay().paths,i.bounds.width);for(let e=0;e<a.length;e++)this._current.pathIndex=e,O(a[e],n,t,!!r)}_placeSubdivGlyphs(e,t,n,r){if(e.x<0||e.x>w||e.y<0||e.y>w)return;let{allowOverrun:i,labelPosition:a,repeatLabelDistance:o,layerId:s,labelClassId:c}=this.evaluatedMeshParams,{objId:l,shaping:u,pathIndex:d}=this._current,f=this._current.zoomRange[0],p=H(t),m=this._current.shaping.bounds.width/2,h=Math.sqrt(o||128)/2,g=Math.min(n,r-n),_=u.isMultiline?N:Math.log2(g/(h+m/2)),v=t===0?_:Math.min(p,_),y=Math.max(f,this._zoomLevel+1-v),b=this._zoomLevel-y,x=u.bounds.width/2*2**b,S=z(s,l,d,t,this._zoomLevel),C=V(l,d,t,this._zoomLevel,c);i&&b<0?this._placeStraightAlong(e,f,S,C):a===`parallel`||u.isMultiline?this._placeStraightAlong(e,y,S,C):a===`curved`&&this._placeCurved(e,y,x,S,C)}_placeCurved(e,t,n,r,i){let{out:a,id:o}=this._current,s=this._createLineLabelMetric(o,r,i,e.x,e.y);this._registerLineCalloutMetric(s),a.metricStart(s);let c=e.clone(),l=e.angle*(180/Math.PI)%360,u=(e.angle*(180/Math.PI)+180)%360;this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||(this._placeFirst(c,t,1,l),this._placeBack(e,c,t,n,1,l),this._placeForward(e,c,t,n,1,l)),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||(this._placeFirst(c,t,0,u),this._placeBack(e,c,t,n,0,u),this._placeForward(e,c,t,n,0,u)),a.metricEnd()}_placeStraightAlong(e,t,r,s){let{out:c,id:l,shaping:u,zoomRange:d,referenceBounds:f}=this._current,{boxBorderLineColor:m,boxBackgroundColor:h}=this.evaluatedMeshParams,g=e.clone(),_=e.angle*(180/Math.PI)%360,v=(e.angle*(180/Math.PI)+180)%360,y=u.glyphs.length>0&&!!(m||h),b=this._createLineLabelMetric(l,r,s,e.x,e.y);if(this._registerLineCalloutMetric(b),c.metricStart(b),y){let r=Math.max(t,d[0],0),s=Math.min(N,d[1]),m=i(o(),-e.angle),h={minZoom:r,maxZoom:s,clipAngle:_,mapAligned:!0,isLineLabel:!0},g=n(this.evaluatedMeshParams.offsetX),y=n(this.evaluatedMeshParams.offsetY);if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){let t=p(g,-1*y),[n,r]=u.shapeBackground(a(o(),m,t));c.recordStart(this.instanceId,this.attributeLayout,u.glyphs[0].textureKey),this._writeTextBox(c,l,e.x,e.y,r,f,h),c.recordEnd()}if(!this._verticalPlacement||this._verticalPlacement!==this._current.offsetDirection){let t=p(g,y),[n,r]=u.shapeBackground(a(o(),m,t));h.clipAngle=v,c.recordStart(this.instanceId,this.attributeLayout,u.glyphs[0].textureKey),this._writeTextBox(c,l,e.x,e.y,r,f,h),c.recordEnd()}}this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||this._placeFirst(g,t,1,_,!0),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||this._placeFirst(g,t,0,v,!0),c.metricEnd()}_registerLineCalloutMetric(e){this._calloutVisuals.push({metric:e,featureAnchor:k(this._current.calloutPaths,e.anchorX,e.anchorY),referenceInfo:this._createLocalCalloutReferenceInfo(this._current.shaping)})}_placeBack(e,t,n,r,i,a){let o=e.clone(),s=e.backwardLength+0;for(;o.prev()&&!(s>=r);)this._placeOnSegment(o,t,s,n,-1,i,a),s+=o.length+0}_placeForward(e,t,n,r,i,a){let o=e.clone(),s=e.remainingLength+0;for(;o.next()&&!(s>=r);)this._placeOnSegment(o,t,s,n,1,i,a),s+=o.length+0}_placeFirst(e,t,n,r,i=!1){let{out:a,id:o,shaping:s,zoomRange:c,referenceBounds:l}=this._current,u=s.glyphs,d=this._getBoundsOffset(e.angle);for(let f of u){let u=f.x>s.bounds.x?n:1-n,p=u*e.remainingLength+(1-u)*e.backwardLength,m=Math.abs(f.x+f.width/2-s.bounds.x),h=Math.max(0,this._zoomLevel+Math.log2(m/(p+0))),g=Math.max(t,i?0:h);f.angle=e.angle+(1-n)*Math.PI;let _=[Math.max(c[0],g),Math.min(c[1],N)];this._writeLineGlyph(a,o,e.x,e.y,f,_,r,l),this._writeLineGlyphBox(a,f,n,_,d)}}_placeOnSegment(e,t,n,r,i,a,o){let{out:s,id:c,shaping:l,referenceBounds:u}=this._current,d=l.glyphs,f=e.dx/e.length,p=e.dy/e.length,m={x:e.x+n*-i*f,y:e.y+n*-i*p},h=this._getBoundsOffset(e.angle);for(let t of d){let d=t.x>l.bounds.x?a:1-a;if(!(d&&i===1||!d&&i===-1))continue;let f=Math.abs(t.x+t.width/2-l.bounds.x),p=Math.max(0,this._zoomLevel+Math.log2(f/n)-.1),g=Math.max(r,this._zoomLevel+Math.log2(f/(n+e.length+0)));if(p===0)continue;t.angle=e.angle+(1-a)*Math.PI;let _=[g,p];this._writeLineGlyph(s,c,m.x,m.y,t,_,o,u),this._writeLineGlyphBox(s,t,a,_,h)}}_getBoundsOffset(e){let t=n(this.evaluatedMeshParams.offsetX),r=n(this.evaluatedMeshParams.offsetY),a=p(t,r),c=i(o(),-e);return s(a,a,c)}_writeLineGlyph(e,t,n,r,i,a,o,s){e.recordStart(this.instanceId,this.attributeLayout,i.textureKey);let{texcoords:c,offsets:l}=i,{fontSize:u,haloSize:d,outlineSize:f}=this._textMeshTransformProps,p=this._getDefaultGlyphMetrics(this.evaluatedMeshParams.glyphs),m=i.fontSize??u;this._writeQuad(e,t,n,r,{sdfSize:p.sdfSize,sdfRadius:p.sdfRadius,texcoords:c,offsets:l,fontSize:m,haloSize:d,outlineSize:f,color:i.color?j(i.color):j(this.evaluatedMeshParams.color),isBackground:!1,referenceBounds:s,minZoom:Math.max(this._current.zoomRange[0],a[0]),maxZoom:Math.min(this._current.zoomRange[1],a[1]),clipAngle:o,mapAligned:!0,isLineLabel:!0}),e.recordEnd()}_writeLineGlyphBox(e,t,n,r,i){if((n||this._current.offsetDirection)&&this._isVisible(r)&&t.bounds){let n=t.bounds,r=new T(n.x+i[0],n.y+i[1],n.width,n.height);e.metricBoxWrite(r)}}_isVisible(e){let t=Math.max(this._current.zoomRange[0],e[0]),n=Math.min(this._current.zoomRange[1],e[1]),r=this._zoomLevel;return t<=r&&r<=n}}function W(e,t){let n=new C,{coords:r,lengths:i}=e,a=m(),o=m(),s=m(),p=m(),h=m(),g=m(),_=0;for(let e=0;e<i.length;e++){let m=i[e];for(let e=0;e<m;e++){let i=2*(e+_-1),v=2*(e+_),y=2*(e+_+1);e>0?c(a,r[i],r[i+1]):c(a,0,0),c(o,r[v],r[v+1]),e<m-1?c(s,r[y],r[y+1]):c(s,0,0),e===0?c(p,0,0):(l(p,o,a),u(p,p),c(p,p[1],-p[0])),e===m-1?c(h,0,0):(l(h,s,o),u(h,h),c(h,h[1],-h[0])),d(g,p,h),u(g,g);let b=g[0]*h[0]+g[1]*h[1];b!==0&&f(g,g,b),f(g,g,t),n.coords.push(o[0]+g[0],o[1]+g[1])}n.lengths.push(m),_+=m}return n}export{U as LabelMeshWriter,R as labelIdHash,B as labelMetricHash,z as lineLabelIdHash,V as lineLabelMetricHash};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{clamp as e}from"../../../../../../../core/mathUtils.js";import{disposeMaybe as t}from"../../../../../../../core/maybe.js";import{isSVG as n}from"../../../../../../../core/urlUtils.js";import{simplePipelineState as r}from"../../utils.js";import{Technique as i}from"../Technique.js";import{MagnifierShader as a}from"../shaders/MagnifierShader.js";import o
|
|
2
|
+
import{clamp as e}from"../../../../../../../core/mathUtils.js";import{disposeMaybe as t}from"../../../../../../../core/maybe.js";import{isSVG as n}from"../../../../../../../core/urlUtils.js";import{simplePipelineState as r}from"../../utils.js";import{Technique as i}from"../Technique.js";import{MagnifierShader as a}from"../shaders/MagnifierShader.js";import{Texture as o}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as s}from"../../../../../../webgl/TextureDescriptor.js";class c extends i{constructor(){super(...arguments),this.type=22,this._resourcePixelRatio=1,this._position=[0,0,0,0],this.shaders={magnifier:new a}}updateResources(t,n,r,i){t.pixelRatio!==this._resourcePixelRatio&&this._destroyResources(),this._readbackTexture||this._initializeResources(t,n,r,i);let{context:a,pixelRatio:o}=t,{factor:s,offset:c,position:l}=i,{size:u}=t.state,d=i.size*o,f=1/s,p=Math.ceil(f*d);this._readbackTexture.resize(p,p);let m=o*u[0],h=o*u[1],g=.5*p,_=.5*p,v=e(o*l.x,g,m-g-1),y=e(h-o*l.y,_,h-_-1),b=v-g,x=y-_,S=this._readbackTexture;a.bindTexture(S,0),a.gl.copyTexImage2D(S.descriptor.target,0,S.descriptor.pixelFormat,b,x,p,p,0);let C=c.x*o,w=c.y*o,T=-1+2*((v+C)/m),E=-1+2*((y-w)/h),D=d/m*2,O=d/h*2;this._position[0]=T,this._position[1]=E,this._position[2]=D,this._position[3]=O}render(e,t){let{context:n,painter:i}=e;i.setPipelineState(r);let a={drawPos:this._position,...t};i.submitDrawMesh(n,{shader:this.shaders.magnifier,uniforms:{config:a},textures:{readbackTexture:{texture:this._readbackTexture,unit:0},maskTexture:{texture:this._maskTexture,unit:7},overlayTexture:{texture:this._overlayTexture,unit:6}},defines:null,optionalAttributes:null,useComputeBuffer:!1},i.quadMesh)}shutdown(){this._destroyResources()}_initializeResources(e,t,r,i){let a=e.context;this._resourcePixelRatio=e.pixelRatio;let c=Math.ceil(i.size*e.pixelRatio);r.width=c,r.height=c;let l=new s(Math.ceil(c/i.factor));l.internalFormat=6408,l.wrapMode=33071,l.samplingMode=9728,l.flipped=!0,l.preMultiplyAlpha=!n(r.src)||!e.context.driverTest.svgPremultipliesAlpha.result,this._overlayTexture=new o(a,l,r),t.width=c,t.height=c,l.pixelFormat=l.internalFormat=6406,this._maskTexture=new o(a,l,t),l.pixelFormat=l.internalFormat=6408,l.samplingMode=9729,l.flipped=!1,this._readbackTexture=new o(a,l)}_destroyResources(){t(this._maskTexture),t(this._overlayTexture),t(this._readbackTexture),this._maskTexture=null,this._overlayTexture=null,this._readbackTexture=null}}export{c as MagnifierTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e,__param as t}from"tslib";import{location as n,option as r,uniform as i,texture as a,input as o,ComputeVertexInput as s}from"../../GraphShaderModule.js";import{Vec4 as c,Vec2 as l,Float as u,Sampler2D as d,Vec3 as f,min as p,max as m,Mat3 as h,ifElse as g,lessThan as _,equal as v,texture2D as y,clamp as b,abs as x,mix as S,distance as C,greaterThan as w,negate as T}from"../../graph/glsl.js";import{MarkerConstants as E}from"./markerConstants.js";import{FeatureVertexInput as D,AFeatureShader as O,FeatureFragmentInput as k}from"../shaders/AFeatureShader.js";import{c256ToRad as A,noHit as j,softEdgeRatio as M,trueHit as N}from"../shaders/constants.js";import{isRectHittest as P,hittestMarkerRect as F,isPolygonHittest as I,hittestPolygon as L,isPointHittest as ee,distPointTriangle as te,xyToBarycentric as R,inTriangle as z}from"../shaders/hittestUtils.js";import{MosaicInfo as ne}from"../shaders/MosaicInfo.js";import{getBit as B,getBitBool as V,rgba2float as H}from"../shaders/utils.js";import{VisualVariableColor as U}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as W}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as G}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as K}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as q}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as re}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as ie}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as ae,getVisualVariableColor as oe,getVisualVariableSize as se,getVisualVariableRotation as ce}from"../shaders/vvUtils.js";class J extends D{}e([n(3,c)],J.prototype,`color`,void 0),e([n(4,c)],J.prototype,`outlineColor`,void 0),e([n(5,l)],J.prototype,`offset`,void 0),e([n(6,l)],J.prototype,`textureUV`,void 0),e([n(7,c)],J.prototype,`sizing`,void 0),e([n(8,u)],J.prototype,`placementAngle`,void 0),e([n(9,u)],J.prototype,`sdfDecodeCoeff`,void 0),e([n(10,l)],J.prototype,`zoomRange`,void 0);class Y extends s{}e([n(11,l)],Y.prototype,`offsetNextVertex1`,void 0),e([n(12,l)],Y.prototype,`offsetNextVertex2`,void 0),e([n(13,l)],Y.prototype,`textureUVNextVertex1`,void 0),e([n(14,l)],Y.prototype,`textureUVNextVertex2`,void 0);class X extends k{}function Z(e,t,n,r){return t.multiply(e.x).add(n.multiply(e.y)).add(r.multiply(e.z))}function Q(e){return e.multiply(e).divide(128)}class $ extends O{constructor(){super(...arguments),this.type=`MarkerShader`,this.computeAttributes={offset:[`offsetNextVertex1`,`offsetNextVertex2`],textureUV:[`textureUVNextVertex1`,`textureUVNextVertex2`]}}vertex(e,t){let n=Q(e.sizing.x),r=Q(e.sizing.y),i=Q(e.sizing.z),a=e.placementAngle,o=B(e.bitset,E.bitset.isSDF),s=B(e.bitset,E.bitset.isMapAligned),l=B(e.bitset,E.bitset.scaleSymbolsProportionally),d=V(e.bitset,E.bitset.colorLocked),g=this.getFeatureId(e.id,e.bitset),_=ae(this,g),v=oe(this,g,e.color,d).multiply(_),y=this.
|
|
2
|
+
import{__decorate as e,__param as t}from"tslib";import{location as n,option as r,uniform as i,texture as a,input as o,ComputeVertexInput as s}from"../../GraphShaderModule.js";import{Vec4 as c,Vec2 as l,Float as u,Sampler2D as d,Vec3 as f,min as p,max as m,Mat3 as h,ifElse as g,lessThan as _,equal as v,texture2D as y,clamp as b,abs as x,mix as S,distance as C,greaterThan as w,negate as T}from"../../graph/glsl.js";import{MarkerConstants as E}from"./markerConstants.js";import{FeatureVertexInput as D,AFeatureShader as O,FeatureFragmentInput as k}from"../shaders/AFeatureShader.js";import{c256ToRad as A,noHit as j,softEdgeRatio as M,trueHit as N}from"../shaders/constants.js";import{isRectHittest as P,hittestMarkerRect as F,isPolygonHittest as I,hittestPolygon as L,isPointHittest as ee,distPointTriangle as te,xyToBarycentric as R,inTriangle as z}from"../shaders/hittestUtils.js";import{MosaicInfo as ne}from"../shaders/MosaicInfo.js";import{getBit as B,getBitBool as V,rgba2float as H}from"../shaders/utils.js";import{VisualVariableColor as U}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as W}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as G}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as K}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as q}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as re}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as ie}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as ae,getVisualVariableColor as oe,getVisualVariableSize as se,getVisualVariableRotation as ce}from"../shaders/vvUtils.js";class J extends D{}e([n(3,c)],J.prototype,`color`,void 0),e([n(4,c)],J.prototype,`outlineColor`,void 0),e([n(5,l)],J.prototype,`offset`,void 0),e([n(6,l)],J.prototype,`textureUV`,void 0),e([n(7,c)],J.prototype,`sizing`,void 0),e([n(8,u)],J.prototype,`placementAngle`,void 0),e([n(9,u)],J.prototype,`sdfDecodeCoeff`,void 0),e([n(10,l)],J.prototype,`zoomRange`,void 0);class Y extends s{}e([n(11,l)],Y.prototype,`offsetNextVertex1`,void 0),e([n(12,l)],Y.prototype,`offsetNextVertex2`,void 0),e([n(13,l)],Y.prototype,`textureUVNextVertex1`,void 0),e([n(14,l)],Y.prototype,`textureUVNextVertex2`,void 0);class X extends k{}function Z(e,t,n,r){return t.multiply(e.x).add(n.multiply(e.y)).add(r.multiply(e.z))}function Q(e){return e.multiply(e).divide(128)}class $ extends O{constructor(){super(...arguments),this.type=`MarkerShader`,this.computeAttributes={offset:[`offsetNextVertex1`,`offsetNextVertex2`],textureUV:[`textureUVNextVertex1`,`textureUVNextVertex2`]}}vertex(e,t){let n=Q(e.sizing.x),r=Q(e.sizing.y),i=Q(e.sizing.z),a=e.placementAngle,o=B(e.bitset,E.bitset.isSDF),s=B(e.bitset,E.bitset.isMapAligned),l=B(e.bitset,E.bitset.scaleSymbolsProportionally),d=V(e.bitset,E.bitset.colorLocked),g=this.getFeatureId(e.id,e.bitset),_=ae(this,g),v=oe(this,g,e.color,d).multiply(_),y=this.getCalloutPos(e.pos,e.id,e.bitset),b=this.getCalloutTransform(this.isLabelInstance(e.bitset)).multiply(new f(y,1)).xy,x=se(this,g,i).divide(i),S=n.multiply(x),C=e.offset.xy.multiply(x),w=r.multiply(l.multiply(x.subtract(1)).add(1));w=p(w,m(S.subtract(.99),new u(0)));let T=m(w,new u(1)),D=p(w,new u(1)),O=h.fromRotation(a.multiply(A)),k=ce(this,g),j=this._getViewRotationMatrix(s).multiply(k).multiply(O).multiply(new f(C.xy,0)).multiply(this.tileInfo.scaleFactor),M=this.clip(e.id,e.bitset,e.zoomRange),N=new c(b.add(j.xy),M,1),P=e.textureUV.divide(this.mosaicInfo.size),F=e.outlineColor.multiply(D),I=B(e.bitset,E.bitset.overrideOutlineColor),L=e.sdfDecodeCoeff.multiply(S);return{glPosition:N,color:v,textureUV:P,outlineColor:F,outlineSize:T,distanceToPx:L,isSDF:o,overrideOutlineColor:I,...this.maybeRunHittest(e,t,{pos:y,size:S,sizeCorrection:x,scaleFactor:this.tileInfo.scaleFactor,isMapAligned:s,vvRotationMat3:k,placementMat3:O,outlineSize:T,distanceToPx:L,isSDF:o})}}fragment(e){let t=this._getColor(e.textureUV,e);return this.getFragmentOutput(t,e)}hittest(e,t,n){let r=this.computeHittestTriangle(e,t,n);return g(ee(this.hittestRequest),()=>g(_(n.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(e,t,n),this._hittestMarker(e,t,n)),()=>g(P(this.hittestRequest),F(r,this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),g(I(this.hittestRequest),L(r,this.hittestRequest.viewSize,this.hittestMaskTexture),new u(j))))}_getViewRotationMatrix(e){let t=this.view.getDisplayViewMat3(),n=this.view.displayMat3,r=new u(1).subtract(e);return t.multiply(e).add(n.multiply(r))}_getViewScreenMatrix(e){let t=this.tile.getTileMat3(this.view),n=this.view.viewMat3.multiply(t),r=t,i=new u(1).subtract(e);return n.multiply(e).add(r.multiply(i))}_getColor(e,t){return g(v(t.isSDF,new u(1)),this._getSDFColor(e,t),this._getSpriteColor(e,t))}_getSpriteColor(e,t){return y(this.mosaicTexture,e).multiply(t.color)}_getSDFColor(e,t){let n=y(this.mosaicTexture,e),r=new u(.5).subtract(H(n)).multiply(t.distanceToPx).multiply(M),i=b(new u(.5).subtract(r),new u(0),new u(1)),a=t.color.multiply(i),o=t.outlineSize;this.highlight&&(o=m(o,t.overrideOutlineColor.multiply(4)));let s=o.multiply(.5),c=x(r).subtract(s),l=b(new u(.5).subtract(c),new u(0),new u(1)),d=S(t.outlineColor,t.color,t.overrideOutlineColor).multiply(l);return new u(1).subtract(d.a).multiply(a).add(d)}_hittestSmallMarker(e,t,n){let{position:r,distance:i,smallSymbolDistance:a}=this.hittestRequest,o=i.subtract(a),s=this.tile.getViewScreenMat3(this.view).multiply(new f(n.pos,1)).xy,c=n.size.multiply(.5),l=C(s,r).subtract(c).add(o);return g(w(l,this.hittestRequest.distance),new u(j),new u(N))}_hittestMarker(e,t,n){let{pos0:r,pos1:i,pos2:a}=this.computeHittestTriangle(e,t,n),o=this.hittestRequest.position,s=this.hittestRequest.distance,c=te(o,r,i,a);return g(w(c,s),new u(j),this._hittestSamples(r,i,a,e,t,n))}computeHittestTriangle(e,t,n){let{pos:r,sizeCorrection:i,scaleFactor:a,isMapAligned:o}=n,s=new f(e.offset.multiply(i).multiply(a),0),c=new f(t.offsetNextVertex1.multiply(i).multiply(a),0),l=new f(t.offsetNextVertex2.multiply(i).multiply(a),0),u=this.tile.getViewScreenMat3(this.view).multiply(new f(r,1)),d=this._getViewScreenMatrix(o).multiply(n.vvRotationMat3).multiply(n.placementMat3);return{pos0:u.add(d.multiply(s)).xy,pos1:u.add(d.multiply(c)).xy,pos2:u.add(d.multiply(l)).xy}}_hittestSamples(e,t,n,r,i,a){let{outlineSize:o,isSDF:s,distanceToPx:d}=a,f=this.hittestRequest.position,p=this.hittestRequest.distance,m=R(f.add(new l(T(p),T(p))),e,t,n),h=R(f.add(new l(0,T(p))),e,t,n),_=R(f.add(new l(p,T(p))),e,t,n),v=R(f.add(new l(T(p),0)),e,t,n),y=R(f,e,t,n),b=R(f.add(new l(p,0)),e,t,n),x=R(f.add(new l(T(p),p)),e,t,n),S=R(f.add(new l(0,p)),e,t,n),C=R(f.add(new l(p,p)),e,t,n),E=r.textureUV.divide(this.mosaicInfo.size),D=i.textureUVNextVertex1.divide(this.mosaicInfo.size),O=i.textureUVNextVertex2.divide(this.mosaicInfo.size),k={color:new c(1),outlineColor:new c(1),overrideOutlineColor:new u(1),outlineSize:o,distanceToPx:d,isSDF:s},A=new u(0);return A=A.add(z(m).multiply(this._getColor(Z(m,E,D,O),k).a)),A=A.add(z(h).multiply(this._getColor(Z(h,E,D,O),k).a)),A=A.add(z(_).multiply(this._getColor(Z(_,E,D,O),k).a)),A=A.add(z(v).multiply(this._getColor(Z(v,E,D,O),k).a)),A=A.add(z(y).multiply(this._getColor(Z(y,E,D,O),k).a)),A=A.add(z(b).multiply(this._getColor(Z(b,E,D,O),k).a)),A=A.add(z(x).multiply(this._getColor(Z(x,E,D,O),k).a)),A=A.add(z(S).multiply(this._getColor(Z(S,E,D,O),k).a)),A=A.add(z(C).multiply(this._getColor(Z(C,E,D,O),k).a)),g(w(A,new u(.05)),new u(N),new u(j))}}e([r(U)],$.prototype,`visualVariableColor`,void 0),e([r(W)],$.prototype,`visualVariableOpacity`,void 0),e([r(G)],$.prototype,`visualVariableRotation`,void 0),e([r(K)],$.prototype,`visualVariableSizeMinMaxValue`,void 0),e([r(q)],$.prototype,`visualVariableSizeScaleStops`,void 0),e([r(re)],$.prototype,`visualVariableSizeStops`,void 0),e([r(ie)],$.prototype,`visualVariableSizeUnitValue`,void 0),e([i(ne)],$.prototype,`mosaicInfo`,void 0),e([a(d)],$.prototype,`mosaicTexture`,void 0),e([t(0,o(J)),t(1,o(Y))],$.prototype,`vertex`,null),e([t(0,o(X))],$.prototype,`fragment`,null);export{X as MarkerFragmentInput,$ as MarkerShader,J as MarkerVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{OpacityShader as n}from"../shaders/OpacityShader.js";import r
|
|
2
|
+
import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{OpacityShader as n}from"../shaders/OpacityShader.js";import{Texture as r}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../../../../webgl/TextureDescriptor.js";class a extends t{constructor(){super(...arguments),this.type=25,this._layerFBOTexture=null,this._size=[0,0],this.shaders={opacity:new n}}shutdown(){super.shutdown(),this._layerFBOTexture=e(this._layerFBOTexture)}render(e,t){let{layerFBO:n}=t,{width:r,height:i}=n;this._createOrResizeResources(e,r,i);let{context:a,painter:o}=e,{amount:s}=t.effect,c=this._layerFBOTexture;a.bindFramebuffer(n),t.layerFBO.copyToTexture(0,0,r,i,0,0,c);let l={color:{write:[!0,!0,!0,!0],blendMode:`composite`},depth:!1,stencil:!1},u={opacity:s};c.setSamplingMode(9728),a.setClearColor(0,0,0,0),a.clear(16384),o.setPipelineState(l),o.submitDrawMesh(a,{shader:this.shaders.opacity,uniforms:{config:u},textures:{layerTexture:{texture:c,unit:0}},defines:null,optionalAttributes:null,useComputeBuffer:!1},o.quadMesh)}_createOrResizeResources(e,t,n){let{context:a}=e;if(!(this._layerFBOTexture&&this._size[0]===t&&this._size[1]===n)){if(this._size[0]=t,this._size[1]=n,this._layerFBOTexture)this._layerFBOTexture.resize(t,n);else{let e=new i(t,n);e.internalFormat=6408,e.wrapMode=33071,e.samplingMode=9728,this._layerFBOTexture=new r(a,e)}}}}export{a as OpacityTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import has from"../../../../../../../core/has.js";import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{TextureStatisticsTechnique as n}from"../TextureStatisticsTechnique.js";import{getInterpolationDefines as r}from"./processor/textureUtils.js";import{RasterColorizerLUTShader as i}from"../shaders/raster/RasterColorizerLUTShader.js";import{RasterColorizerShadedReliefShader as a}from"../shaders/raster/RasterColorizerShadedReliefShader.js";import{RasterColorizerStretchShader as o}from"../shaders/raster/RasterColorizerStretchShader.js";import{SizedPixelFormat as s,PixelType as c}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as l}from"../../../../../../webgl/FramebufferObject.js";import u
|
|
2
|
+
import has from"../../../../../../../core/has.js";import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{TextureStatisticsTechnique as n}from"../TextureStatisticsTechnique.js";import{getInterpolationDefines as r}from"./processor/textureUtils.js";import{RasterColorizerLUTShader as i}from"../shaders/raster/RasterColorizerLUTShader.js";import{RasterColorizerShadedReliefShader as a}from"../shaders/raster/RasterColorizerShadedReliefShader.js";import{RasterColorizerStretchShader as o}from"../shaders/raster/RasterColorizerStretchShader.js";import{SizedPixelFormat as s,PixelType as c}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as l}from"../../../../../../webgl/FramebufferObject.js";import{Texture as u}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as d}from"../../../../../../webgl/TextureDescriptor.js";const f=new Set([`f32`,`f64`,`u16`,`s16`,`u32`,`s32`]);class p extends t{constructor(){super(...arguments),this.name=`BrushRasterColorizer`,this.type=0,this.shaders={lut:new i,stretch:new o,shadedRelief:new a},this._mosaicFbo=null,this._statisticsTechnique=null,this._draTimer=0}shutdown(t){super.shutdown(t),this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique)}render(t,n){let r=n.tiles.some(({bitmap:e})=>h(e));r||(this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique));let i=r?this._computeStatisticsTextures(t,n):void 0;for(let e of n.tiles){let{bitmap:n}=e;if(!n.source||n.suspended)continue;t.timeline.begin(this.name);let{painter:r}=t;r.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`}}),n.updateTexture(t),n.updateProcessedTexture(),e.bind(t.context);let{type:a}=n.symbolizerParameters,o=a===`stretch`?this._getStretchOptions(e,i):a===`lut`?this._getLutOptions(e):this._getShadedReliefOptions(e);n.interpolation===`bilinear`&&!t.context.capabilities.textureFloatLinear&&(o.defines.bilinear=!0),r.submitDrawMesh(t.context,o,r.quadMesh,n),t.timeline.end(this.name)}}_computeStatisticsTextures(e,t){this._statisticsTechnique??=new n;let r=this._statisticsTechnique,i=has(`esri-2d-dra-delay`);if(i==null){let e=t.tiles.find(({bitmap:e})=>h(e)).bitmap,{stretchType:n,bandCount:r}=e.symbolizerParameters,{pixelType:a}=e.source;n===`minMax`&&r>=3&&f.has(a)&&(i=160)}if(i){let n=performance.now();(n-this._draTimer>=i||e.stationary||!r.minValuesTexture)&&(this._mosaic(e,t),r.render(e,{fbo:this._mosaicFbo}),this._draTimer=n)}else this._mosaic(e,t),r.render(e,{fbo:this._mosaicFbo});return{minTexture:r.minValuesTexture,maxTexture:r.maxValuesTexture,meanTexture:r.meanValuesTexture,stddevTexture:r.stdDevValuesTexture}}_mosaic(e,t){let{context:n,painter:r}=e,i=n.boundFramebuffer;if(i==null)return;if(this._mosaicFbo)this._mosaicFbo.resize(i.width,i.height);else{let e=m(n,i.width,i.height);this._mosaicFbo=new l(n,e)}n.bindFramebuffer(this._mosaicFbo);let a=`RasterColorizerMosaic`;for(let n of t.tiles){let{bitmap:t}=n;if(!h(t))continue;e.timeline.begin(a),r.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`}});let i=t.interpolation;t.interpolation=`nearest`,t.updateTexture(e),t.updateProcessedTexture(),n.bind(e.context);let o=this._getStretchOptions(n,void 0,!0);o.defines.noOp=!0,r.submitDrawMesh(e.context,o,r.quadMesh,t),t.interpolation=i,e.timeline.end(a)}n.bindFramebuffer(i)}_getLutOptions(e){let{bitmap:t}=e,{config:n,projectionConfig:i,projectionTextures:a,colormapConfig:o,colormapTextures:s,textures:c,projectionDefines:l}=this._getCommonConfig(t),u=r(t);return{shader:this.shaders.lut,uniforms:{projectionConfig:i,config:n,colormapConfig:o},textures:{...c,projectionTextures:a,colormapTextures:s},defines:{...l,...u,applyPixelMask:!!c.pixelMaskTexture,applyPixelHighlights:!!c.highlightTexture},optionalAttributes:null,useComputeBuffer:!1}}_getStretchOptions(e,t,n=!1){let{bitmap:i}=e,a=i.symbolizerParameters,{config:o,projectionConfig:s,projectionTextures:c,colormapConfig:l,colormapTextures:u,textures:d,projectionDefines:f,textureUnit:p}=this._getCommonConfig(i),m=r(i),h=t?{numberOfStandardDeviations:a.numberOfStandardDeviations||2}:void 0,g=t?{minTexture:{texture:t.minTexture,unit:p},maxTexture:{texture:t.maxTexture,unit:p+1},meanTexture:{texture:t.meanTexture,unit:p+2},stddevTexture:{texture:t.stddevTexture,unit:p+3}}:void 0,_=t?a.stretchType===`standardDeviation`?2:1:0;return{shader:this.shaders.stretch,uniforms:{projectionConfig:s,config:o,stretchConfig:a,colormapConfig:l,statisticsConfig:h},textures:{...d,projectionTextures:c,colormapTextures:u,statisticsTextures:g},defines:{...f,...m,isMultiband:a.bandCount>1,applyColormap:!!l,useGamma:a.useGamma,noOp:i.isRenderedSource&&!i.processed,applyPixelMask:!!d.pixelMaskTexture,applyPixelHighlights:!n&&!!d.highlightTexture,draStretchType:_},optionalAttributes:null,useComputeBuffer:!1}}_getShadedReliefOptions(e){let{bitmap:t}=e,n=t.symbolizerParameters,{config:i,projectionConfig:a,projectionTextures:o,colormapConfig:s,colormapTextures:c,textures:l,projectionDefines:u}=this._getCommonConfig(t),d=r(t);return{shader:this.shaders.shadedRelief,uniforms:{projectionConfig:a,config:i,hillshadeConfig:n,colormapConfig:s},textures:{...l,projectionTextures:o,colormapTextures:c},defines:{...u,...d,isMultidirectional:n.hillshadeType>0,applyColormap:!!s,applyPixelMask:!!l.pixelMaskTexture,applyPixelHighlights:!!l.highlightTexture},optionalAttributes:null,useComputeBuffer:!1}}_getCommonConfig(e){let{coordScale:t,computedOpacity:n}=e,{names:r,textures:i}=e.getTextures({useProcessedTexture:e.processed}),a=i[r.indexOf(`u_image`)],o=e.getRasterTextureSize(),s=0,c={coordScale:t,srcImageSize:o,opacity:n},l={texture:{texture:a,unit:s++},pixelMaskTexture:null,highlightTexture:null},u=i[r.indexOf(`u_transformGrid`)],{transformGrid:d}=e,f=!!(u&&d),p=f?{targetImageSize:[e.width,e.height],transformSpacing:d.spacing,transformGridSize:d.size}:void 0,m=f?{transformTexture:{texture:u,unit:s++}}:void 0,h=i[r.indexOf(`u_colormap`)],{colormap:g,colormapOffset:_}=e.symbolizerParameters,v=h&&g?{colormapOffset:_??0,colormapMaxIndex:g.length/4-1}:void 0,y=h&&g?{colormapTexture:{texture:h,unit:s++}}:void 0,b=i[r.indexOf(`u_mask`)];b&&(l.pixelMaskTexture={texture:b,unit:s++});let{highlightTexture:x}=e;return x&&(l.highlightTexture={texture:x,unit:s++}),{config:c,projectionConfig:p,projectionTextures:m,colormapConfig:v,colormapTextures:y,textures:l,projectionDefines:{applyProjection:f,lookupProjection:f&&d.spacing[0]===1},textureUnit:s}}}function m(e,t,n){let r=new d(t,n);return r.internalFormat=s.RGBA32F,r.samplingMode=9728,r.dataType=c.FLOAT,r.wrapMode=33071,new u(e,r)}function h(e){return!e.suspended&&e.source!=null&&!e.isRenderedSource&&e.symbolizerParameters.type===`stretch`&&!!e.symbolizerParameters.dynamicRangeAdjustment}export{p as RasterColorizerTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{tileSize as e}from"../../../definitions.js";import{Technique as t}from"../Technique.js";import{getInterpolationDefines as n}from"./processor/textureUtils.js";import{RasterRangeHighlightShader as r}from"../shaders/raster/RasterRangeHighlightShader.js";import{RasterXYBandHighlightShader as i}from"../shaders/raster/RasterXYBandHighlightShader.js";import{SizedPixelFormat as a,PixelType as o}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as s}from"../../../../../../webgl/FramebufferObject.js";import c
|
|
2
|
+
import{tileSize as e}from"../../../definitions.js";import{Technique as t}from"../Technique.js";import{getInterpolationDefines as n}from"./processor/textureUtils.js";import{RasterRangeHighlightShader as r}from"../shaders/raster/RasterRangeHighlightShader.js";import{RasterXYBandHighlightShader as i}from"../shaders/raster/RasterXYBandHighlightShader.js";import{SizedPixelFormat as a,PixelType as o}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as s}from"../../../../../../webgl/FramebufferObject.js";import{Texture as c}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as l}from"../../../../../../webgl/TextureDescriptor.js";class u extends t{constructor(){super(...arguments),this.name=`BrushRasterHighlight`,this.type=2,this.shaders={range:new r,xyBand:new i}}shutdown(e){super.shutdown(e),this._fbo?.dispose(),this._fbo=void 0}_getBandIds(e,t){let{type:n}=e,r=n===`xy-band`?e.bandIds:[e.bandId];return t?.length?r.map(e=>t.indexOf(e)):n===`xy-band`?[0,1]:[0]}_getSingleBandShaderOptions(e,t,r,i){let{config:a,projectionConfig:o,projectionTextures:s,textures:c,projectionDefines:l}=this._getCommonConfig(t),u=n(t,i),d={bandSwap:r,ranges:e.ranges,color:e.color};return{shader:this.shaders.range,uniforms:{projectionConfig:o,config:a,rangeHighlightConfig:d},textures:{...c,projectionTextures:s},defines:{...l,...u,applyPixelMask:!1,applyPixelHighlights:!1,hasExistingHighlights:!!c.highlightTexture},optionalAttributes:null,useComputeBuffer:!1}}_getXYBandShaderOptions(e,t,r,i,a){let{config:o,projectionConfig:s,projectionTextures:c,textures:l,projectionDefines:u}=this._getCommonConfig(t),d=n(t,i),f={bandSwap:r,xRange:e.xRange,yRange:e.yRange,color:e.color},p=a?{texture:a,unit:4}:void 0;return{shader:this.shaders.xyBand,uniforms:{projectionConfig:s,config:o,xyRangeHighlightConfig:f},textures:{...l,projectionTextures:c,xyMaskHighlightTexture:p},defines:{...u,...d,applyPixelMask:!1,applyPixelHighlights:!1,hasExistingHighlights:!!l.highlightTexture,useMask:!!p},optionalAttributes:null,useComputeBuffer:!1}}render(t,n){let{pixelHighlightOptions:r}=t;if(!r)return;let{context:i}=t;if(!this._fbo){let n=d(t.context,e,e);this._fbo=new s(i,n)}let{type:a}=r,o=a===`xy-band`?f(t.context,r):void 0,c=i.boundFramebuffer,l=i.getViewport();for(let s of n.bitmaps){if(!s.source||s.highlighted||s.suspended||s.isRenderedSource)continue;let n=this._getBandIds(r,s.bandIds);if(n.some(e=>e<0||e>2))continue;t.timeline.begin(this.name);let{painter:c}=t;c.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},blendEquation:32774}}),s.updateTexture(t),s.updateProcessedTexture(!1);let l=new Float32Array(9);l[n[0]*3]=1,l[n[1]*3+1]=+(a===`xy-band`);let u=a===`single-band`?this._getSingleBandShaderOptions(r,s,l,i):this._getXYBandShaderOptions(r,s,l,i,o);i.bindFramebuffer(this._fbo),i.setViewport(0,0,e,e),c.submitDrawMesh(t.context,u,c.quadMesh);let f=d(t.context,e,e);this._fbo.copyToTexture(0,0,e,e,0,0,f),s.highlightTexture=f,t.timeline.end(this.name)}o?.dispose(),i.bindFramebuffer(c),i.setViewport(l.x,l.y,l.width,l.height)}_getCommonConfig(e){let{names:t,textures:n}=e.getTextures({forProcessing:!0,useProcessedTexture:e.processed}),r=n[t.indexOf(`u_image`)],i={coordScale:[1,1],srcImageSize:e.getRasterTextureSize(),opacity:1},a={texture:{texture:r,unit:0},pixelMaskTexture:null,highlightTexture:null},o=n[t.indexOf(`u_transformGrid`)],{transformGrid:s}=e,c=!!(o&&s),l=c?{targetImageSize:[e.width,e.height],transformSpacing:s.spacing,transformGridSize:s.size}:void 0,u=c?{transformTexture:{texture:o,unit:1}}:void 0,{highlightTexture:d}=e;return d&&(a.highlightTexture={texture:d,unit:2}),{config:i,projectionConfig:l,projectionTextures:u,textures:a,projectionDefines:{applyProjection:c,lookupProjection:c&&s.spacing[0]===1}}}}function d(e,t,n){let r=new l(t,n);return r.internalFormat=a.RGBA8,r.samplingMode=9728,r.dataType=o.UNSIGNED_BYTE,r.isImmutable=!0,r.wrapMode=33071,new c(e,r)}function f(e,t){let{mask:n,maskSize:r}=t;if(!(n?.length&&r?.length))return;let i=new l(r[0],r[1]);return i.internalFormat=a.R8,i.samplingMode=9728,i.dataType=o.UNSIGNED_BYTE,i.isImmutable=!0,i.wrapMode=33071,new c(e,i,n)}export{u as RasterHighlightTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{SizedPixelFormat as e,PixelType as t}from"../../../../../../../webgl/enums.js";import{DisposableFramebufferObject as n}from"../../../../../../../webgl/FramebufferObject.js";import r
|
|
2
|
+
import{SizedPixelFormat as e,PixelType as t}from"../../../../../../../webgl/enums.js";import{DisposableFramebufferObject as n}from"../../../../../../../webgl/FramebufferObject.js";import{Texture as r}from"../../../../../../../webgl/Texture.js";import{TextureDescriptor as i}from"../../../../../../../webgl/TextureDescriptor.js";function a(n,r){let a=new i(n,r);return a.internalFormat=e.RGBA32F,a.samplingMode=9728,a.dataType=t.FLOAT,a.isImmutable=!0,a.wrapMode=33071,a}function o(e,t,n){let i=a(t,n);return new r(e,i)}function s(e,t,r){let i=a(t,r);return new n(e,i)}function c(e,t){let{symbolizerParameters:n}=e,{type:r}=n,i=r===`lut`?`nearest`:e.interpolation,a=i===`bilinear`?r===`lut`?!1:r!==`stretch`||n.bandCount===1:!1,o=i===`cubic`;return{bilinear:a||i===`bilinear`&&t!=null&&!t.capabilities.textureFloatLinear,bicubic:o,nearestOnEdge:a}}export{s as createNewFBO,o as createProcessedTexture,c as getInterpolationDefines};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{maxHighlightGroups as t}from"../../../definitions.js";import{location as n,define as r,option as i,uniform as a,texture as o,VertexInput as s,ComputeVertexInput as c,GraphShaderModule as l,FragmentOutput as u,FragmentInput as d}from"../../GraphShaderModule.js";import{Vec3 as f,Float as p,Vec2 as m,Sampler2D as h,float as g,step as _,Vec4 as v,equal as y,ifElse as b,or as x,texture2D as S,
|
|
2
|
+
import{__decorate as e}from"tslib";import{maxHighlightGroups as t}from"../../../definitions.js";import{location as n,define as r,option as i,uniform as a,texture as o,VertexInput as s,ComputeVertexInput as c,GraphShaderModule as l,FragmentOutput as u,FragmentInput as d}from"../../GraphShaderModule.js";import{Vec3 as f,Float as p,Vec2 as m,Sampler2D as h,float as g,step as _,Vec4 as v,equal as y,ifElse as b,or as x,texture2D as S,and as C,notEqual as w,textureSize as T,Int as E,mod as D}from"../../graph/glsl.js";import{trueHit as O,candidateHit as k,noHit as A,bitsetGenericLabelInstance as j,bitsetTextIsMapAligned as M}from"./constants.js";import{EntityStorage as N,EntityStorageTextures as P}from"./EntityStorage.js";import{ShaderHighlight as F}from"./ShaderHighlight.js";import{ShaderHittest as I}from"./ShaderHittest.js";import{Tile as L}from"./Tile.js";import{TileInfo as R}from"./TileInfo.js";import{getFilterBit as z,getHighlightBit as B,getBit as V,uvToClip as H,unpackDisplayIdTexel as U}from"./utils.js";import{ViewInfo as W}from"./ViewInfo.js";class G extends s{}e([n(0,f)],G.prototype,`id`,void 0),e([n(1,p)],G.prototype,`bitset`,void 0),e([n(2,m)],G.prototype,`pos`,void 0);class K extends c{}e([n(14,m)],K.prototype,`nextPos1`,void 0),e([n(15,m)],K.prototype,`nextPos2`,void 0);class q extends d{}class J extends l{clip(e,t=new p(0),n){let r=new p(0),i=this.getFeatureId(e,t),a=this.getFilterFlags(i);if(r=r.add(g(2).multiply(g(1).subtract(z(a,0)))),this.inside?r=r.add(g(2).multiply(g(1).subtract(z(a,1)))):this.outside?r=r.add(g(2).multiply(z(a,1))):this.highlight&&(r=r.add(g(2).multiply(g(1).subtract(this._checkHighlight(a))))),n!=null){let e=new p(1).subtract(_(n.x,this.tileInfo.currentZoom)),t=_(n.y,this.tileInfo.currentZoom);r=r.add(new p(2).multiply(e.add(t)))}return r=r.add(new p(2).multiply(this.getLabelHidden(e,t))),r}getFragmentOutput(e,t,n=new p(1/255)){let r=new u;return r.fragColor=this._maybeWriteHittest(t)??this._maybeHighlight(e,n)??e,r}_maybeHighlight(e,t){return this.highlight?new v(e.rgb,_(t,e.a)):null}_checkHighlight(e){let n=this._checkHighlightBit(e,0);for(let r=1;r<t;r++)n=n.add(this._checkHighlightBit(e,r));return _(new p(.1),n.add(this.highlight.highlightAll))}_checkHighlightBit(e,t){return B(e,t).multiply(V(this.highlight.activeGroups,t))}computeHittestTriangle(e,t,n){let r=this.tile.getViewScreenMat3(this.view),{nextPos1:i,nextPos2:a}=t,o=this.getCalloutPos(e.pos,e.id,e.bitset),s=this.getCalloutPos(i,e.id,e.bitset),c=this.getCalloutPos(a,e.id,e.bitset);return{pos0:r.multiply(new f(o,1)).xy,pos1:r.multiply(new f(s,1)).xy,pos2:r.multiply(new f(c,1)).xy}}maybeRunHittest(e,t,n){if(this.hittestRequest==null)return null;let r=this.hittest(e,t,n),i=y(r,new p(O)),a=y(r,new p(k)),o=b(a,()=>new v(new p(1/255),0,0,0),b(i,()=>new v(new p(2/255),0,0,0),new v(A))),s=b(x(i,a),new p(0),new p(2)),c=this.getAttributeDataCoords(this.getFeatureId(e.id,e.bitset)),l=H(c);return s=s.add(this.clip(e.id,e.bitset,e.zoomRange)),{glPointSize:new p(1),glPosition:new v(l,s,1),color:o}}_maybeWriteHittest(e){return this.hittestRequest==null?null:e.color}getAttributeDataCoords(e){return this.storage.getAttributeDataCoords(e)}getLabelReferenceSymbolVVOffset(e){return S(this.labelAnchorStoreTexture,this._getLabelStoreCoords(e)).zw}getFeatureId(e,t){let n=V(t,j);return b(y(n,new p(1)),()=>S(this.labelStoreTexture,this._getLabelStoreCoords(e)).rgb.multiply(255),e)}getScreenAnchor(e,t){let n=S(this.labelAnchorStoreTexture,this._getLabelStoreCoords(e)),r=this.tile.getViewScreenMat3(this.view).multiply(new f(n.xy,1)).xy;if(t){let e=y(t.x,new p(0)).and(y(t.y,new p(0)));r=r.add(b(e,new m(0),n.zw))}return r}getCalloutPos(e,t,n){return b(this.isLabelInstance(n),()=>this.getScreenAnchor(t,e).add(e),e)}getLabelTextPos(e,t,n){return b(this.isAnchoredLabel(n),()=>this.getScreenAnchor(t),e)}isLabelInstance(e){return y(V(e,j),new p(1))}isAnchoredLabel(e){return C(this.isLabelInstance(e),w(V(e,M),new p(1)))}getCalloutTransform(e){return b(e,this.view.displayMat3,this.tile.getDisplayViewScreenMat3(this.view))}getLabelHidden(e,t){return b(this.isLabelInstance(t),()=>S(this.labelStoreTexture,this._getLabelStoreCoords(e)).a,new p(0))}getVVData(e){return this.storageTextures.getVVData(this.getAttributeDataCoords(e))}getFilterFlags(e){return this.storageTextures.getFilterFlags(this.getAttributeDataCoords(e))}getLocalTimeOrigin(e){return this.storageTextures.getLocalTimeOrigin(this.getAttributeDataCoords(e))}getSizeValue(e){return this.storageTextures.getSizeValue(this.getAttributeDataCoords(e))}getColorValue(e){return this.storageTextures.getColorValue(this.getAttributeDataCoords(e))}getOpacityValue(e){return this.storageTextures.getOpacityValue(this.getAttributeDataCoords(e))}getRotationValue(e){return this.storageTextures.getRotationValue(this.getAttributeDataCoords(e))}_getLabelStoreCoords(e){let t=U(e),n=t.x,r=t.y.multiply(256),i=t.z.multiply(65536),a=n.add(r).add(i),o=g(T(this.labelStoreTexture,new E(0)).x),s=D(a,o),c=a.subtract(s).divide(o);return new m(s,c).add(.5).divide(o)}}e([r],J.prototype,`inside`,void 0),e([r],J.prototype,`outside`,void 0),e([i(F)],J.prototype,`highlight`,void 0),e([a(N)],J.prototype,`storage`,void 0),e([o(P)],J.prototype,`storageTextures`,void 0),e([o(h)],J.prototype,`labelStoreTexture`,void 0),e([o(h)],J.prototype,`labelAnchorStoreTexture`,void 0),e([o(h)],J.prototype,`hittestMaskTexture`,void 0),e([a(W)],J.prototype,`view`,void 0),e([a(R)],J.prototype,`tileInfo`,void 0),e([a(L)],J.prototype,`tile`,void 0),e([i(I)],J.prototype,`hittestRequest`,void 0);export{J as AFeatureShader,K as BaseHittestVertexInput,q as FeatureFragmentInput,G as FeatureVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e,__param as t}from"tslib";import{location as n,option as r,input as i}from"../../GraphShaderModule.js";import{Vec4 as a,Vec2 as o,Vec3 as s,Float as c,ifElse as l,greaterThan as u}from"../../graph/glsl.js";import{BaseHittestVertexInput as d,FeatureFragmentInput as f,FeatureVertexInput as p,AFeatureShader as m}from"./AFeatureShader.js";import{noHit as h,trueHit as g}from"./constants.js";import{isRectHittest as _,hittestRect as v,isPolygonHittest as y,hittestPolygon as b,hittestFill as x,isPointHittest as S}from"./hittestUtils.js";import{VisualVariableColor as C}from"./VisualVariableColor.js";import{VisualVariableOpacity as w}from"./VisualVariableOpacity.js";import{getVisualVariableOpacity as T,getVisualVariableColor as E}from"./vvUtils.js";class D extends p{}e([n(3,a)],D.prototype,`color`,void 0),e([n(4,o)],D.prototype,`zoomRange`,void 0);class O extends m{constructor(){super(...arguments),this.type=`FillShader`,this.computeAttributes={pos:[`nextPos1`,`nextPos2`]}}vertex(e,t){let n=this.getFeatureId(e.id,e.bitset),r=T(this,n),i=E(this,n,e.color).multiply(r),o=this.
|
|
2
|
+
import{__decorate as e,__param as t}from"tslib";import{location as n,option as r,input as i}from"../../GraphShaderModule.js";import{Vec4 as a,Vec2 as o,Vec3 as s,Float as c,ifElse as l,greaterThan as u}from"../../graph/glsl.js";import{BaseHittestVertexInput as d,FeatureFragmentInput as f,FeatureVertexInput as p,AFeatureShader as m}from"./AFeatureShader.js";import{noHit as h,trueHit as g}from"./constants.js";import{isRectHittest as _,hittestRect as v,isPolygonHittest as y,hittestPolygon as b,hittestFill as x,isPointHittest as S}from"./hittestUtils.js";import{VisualVariableColor as C}from"./VisualVariableColor.js";import{VisualVariableOpacity as w}from"./VisualVariableOpacity.js";import{getVisualVariableOpacity as T,getVisualVariableColor as E}from"./vvUtils.js";class D extends p{}e([n(3,a)],D.prototype,`color`,void 0),e([n(4,o)],D.prototype,`zoomRange`,void 0);class O extends m{constructor(){super(...arguments),this.type=`FillShader`,this.computeAttributes={pos:[`nextPos1`,`nextPos2`]}}vertex(e,t){let n=this.getFeatureId(e.id,e.bitset),r=T(this,n),i=E(this,n,e.color).multiply(r),o=this.getCalloutPos(e.pos,e.id,e.bitset),c=this.getCalloutTransform(this.isLabelInstance(e.bitset)).multiply(new s(o,1)).xy,l=this.clip(e.id,e.bitset,e.zoomRange);return{glPosition:new a(c,l,1),color:i,...this.maybeRunHittest(e,t,null)}}fragment(e){return this.getFragmentOutput(e.color,e,new c(0))}hittest(e,t){let n=this.computeHittestTriangle(e,t,null);return l(S(this.hittestRequest),()=>{let n=x(this,e,t);return l(u(n,this.hittestRequest.distance),new c(h),new c(g))},()=>l(_(this.hittestRequest),v(n,this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),l(y(this.hittestRequest),b(n,this.hittestRequest.viewSize,this.hittestMaskTexture),new c(h))))}}e([r(C)],O.prototype,`visualVariableColor`,void 0),e([r(w)],O.prototype,`visualVariableOpacity`,void 0),e([t(0,i(D)),t(1,i(d))],O.prototype,`vertex`,null),e([t(0,i(f))],O.prototype,`fragment`,null);export{O as FillShader,D as FillVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e,__param as t}from"tslib";import{location as n,option as r,input as i}from"../../GraphShaderModule.js";import{Vec4 as a,Vec2 as o,Float as s,step as c,min as l,ifElse as u,greaterThan as d,max as f,Vec3 as p,cond as m,lessThanEqual as h,length as g,clamp as _}from"../../graph/glsl.js";import{BaseHittestVertexInput as v,FeatureVertexInput as y,AFeatureShader as b,FeatureFragmentInput as x}from"./AFeatureShader.js";import{noHit as S,trueHit as C,epsilon as w,thinLineWidthFactor as T,thinLineHalfWidth as E}from"./constants.js";import{distPointSegment as D,isRectHittest as O,hittestMarkerRect as k,isPolygonHittest as A,hittestPolygon as j,isPointHittest as M}from"./hittestUtils.js";import{VisualVariableColor as N}from"./VisualVariableColor.js";import{VisualVariableOpacity as P}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as F}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as I}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as L}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as R}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableColor as z,getVisualVariableOpacity as B,hasVisualVariableSize as V,getVisualVariableSize as H}from"./vvUtils.js";class U extends y{}e([n(3,a)],U.prototype,`color`,void 0),e([n(4,o)],U.prototype,`offset`,void 0),e([n(5,o)],U.prototype,`normal`,void 0),e([n(6,s)],U.prototype,`halfWidth`,void 0),e([n(7,s)],U.prototype,`referenceHalfWidth`,void 0),e([n(8,o)],U.prototype,`zoomRange`,void 0);class W extends x{}function G(e){return f(new s(T).multiply(c(e,new s(E))),new s(1))}function K(e,t){let{halfWidth:n,normal:r}=e,i=G(n),a=g(r).multiply(n);return _(i.multiply(n.subtract(a)).divide(t.add(i).subtract(new s(1))),new s(0),new s(1))}function q(e,t,n){let{halfWidth:r,referenceHalfWidth:i}=t;if(V(e)){let t=new s(2).multiply(i),a=H(e,n,t),o=new s(.5).multiply(a),c=new s(w);return m([h(r,c),o],[h(i,c),r],[!0,r.divide(f(i,c)).multiply(o)])}return r}function J(e,t){let{id:n,offset:r,pos:i,normal:o,zoomRange:l}=t,
|
|
2
|
+
import{__decorate as e,__param as t}from"tslib";import{location as n,option as r,input as i}from"../../GraphShaderModule.js";import{Vec4 as a,Vec2 as o,Float as s,step as c,min as l,ifElse as u,greaterThan as d,max as f,Vec3 as p,cond as m,lessThanEqual as h,length as g,clamp as _}from"../../graph/glsl.js";import{BaseHittestVertexInput as v,FeatureVertexInput as y,AFeatureShader as b,FeatureFragmentInput as x}from"./AFeatureShader.js";import{noHit as S,trueHit as C,epsilon as w,thinLineWidthFactor as T,thinLineHalfWidth as E}from"./constants.js";import{distPointSegment as D,isRectHittest as O,hittestMarkerRect as k,isPolygonHittest as A,hittestPolygon as j,isPointHittest as M}from"./hittestUtils.js";import{VisualVariableColor as N}from"./VisualVariableColor.js";import{VisualVariableOpacity as P}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as F}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as I}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as L}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as R}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableColor as z,getVisualVariableOpacity as B,hasVisualVariableSize as V,getVisualVariableSize as H}from"./vvUtils.js";class U extends y{}e([n(3,a)],U.prototype,`color`,void 0),e([n(4,o)],U.prototype,`offset`,void 0),e([n(5,o)],U.prototype,`normal`,void 0),e([n(6,s)],U.prototype,`halfWidth`,void 0),e([n(7,s)],U.prototype,`referenceHalfWidth`,void 0),e([n(8,o)],U.prototype,`zoomRange`,void 0);class W extends x{}function G(e){return f(new s(T).multiply(c(e,new s(E))),new s(1))}function K(e,t){let{halfWidth:n,normal:r}=e,i=G(n),a=g(r).multiply(n);return _(i.multiply(n.subtract(a)).divide(t.add(i).subtract(new s(1))),new s(0),new s(1))}function q(e,t,n){let{halfWidth:r,referenceHalfWidth:i}=t;if(V(e)){let t=new s(2).multiply(i),a=H(e,n,t),o=new s(.5).multiply(a),c=new s(w);return m([h(r,c),o],[h(i,c),r],[!0,r.divide(f(i,c)).multiply(o)])}return r}function J(e,t){let{id:n,offset:r,pos:i,normal:o,zoomRange:l,bitset:d}=t,m=e.getFeatureId(n,t.bitset),h=z(e,m,t.color),g=B(e,m),_=q(e,t,m),v=new s(.5).multiply(e.view.getAntialiasing()),y=f(_.add(v),new s(.45)).add(new s(.1).multiply(v)),b=G(y).multiply(y).multiply(r).multiply(e.tileInfo.scaleFactor),x=e.isLabelInstance(d),S=e.getCalloutTransform(x),C=u(x,e.view.displayMat3,e.view.getDisplayViewMat3()),w=e.getCalloutPos(i,n,d),T=S.multiply(new p(w,1)),E=C.multiply(new p(b,0)),D=T.add(E).xy,O=new s(2).multiply(c(_,new s(0))).add(e.clip(n,t.bitset,l));return{color:h,opacity:g,halfWidth:y,normal:o,scaledOffset:b,scaledHalfWidth:_,glPosition:new a(D,O,1)}}function Y(e,t){let{opacity:n,color:r}=e,i=K(e,t);return n.multiply(r).multiply(i)}class X extends b{constructor(){super(...arguments),this.type=`LineShader`,this.computeAttributes={pos:[`nextPos1`,`nextPos2`]}}vertex(e,t){let n=J(this,e);return{...n,...this.maybeRunHittest(e,t,n.halfWidth)}}fragment(e){let t=Y(e,this.view.getAntialiasing());return this.getFragmentOutput(t,e)}hittest(e,t,n){let{pos0:r,pos1:i,pos2:a}=this.computeHittestTriangle(e,t,null),{distance:o,smallSymbolDistance:f,smallSymbolSizeThreshold:p}=this.hittestRequest,m=c(n,p.multiply(.5)).multiply(o.subtract(f)),h=this.hittestRequest.position,g=l(D(h,r,i),D(h,r,a)).subtract(n).add(m);return u(M(this.hittestRequest),u(d(g,o),new s(S),new s(C)),()=>u(O(this.hittestRequest),k({pos0:r,pos1:i,pos2:a},this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),u(A(this.hittestRequest),j({pos0:r,pos1:i,pos2:a},this.hittestRequest.viewSize,this.hittestMaskTexture),new s(S))))}}e([r(N)],X.prototype,`visualVariableColor`,void 0),e([r(P)],X.prototype,`visualVariableOpacity`,void 0),e([r(F)],X.prototype,`visualVariableSizeMinMaxValue`,void 0),e([r(I)],X.prototype,`visualVariableSizeScaleStops`,void 0),e([r(L)],X.prototype,`visualVariableSizeStops`,void 0),e([r(R)],X.prototype,`visualVariableSizeUnitValue`,void 0),e([t(0,i(U)),t(1,i(v))],X.prototype,`vertex`,null),e([t(0,i(W))],X.prototype,`fragment`,null);export{W as LineFragmentInput,X as LineShader,U as LineVertexInput,K as getLineAntialiasing,Y as getLineFragmentColor,G as getLineThinFactor,J as getLineVertexData};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e,__param as t}from"tslib";import{location as n,option as r,input as i}from"../../GraphShaderModule.js";import{Vec2 as a,Vec4 as o,Float as s,greaterThan as c,ifElse as l,or as u,Vec3 as d}from"../../graph/glsl.js";import{BaseHittestVertexInput as f,FeatureVertexInput as p,AFeatureShader as m}from"./AFeatureShader.js";import{noHit as h,trueHit as g,bitsetTypeFillOutline as _,bitsetOutlineUsesColorVV as v}from"./constants.js";import{isRectHittest as y,hittestRect as b,isPolygonHittest as x,hittestPolygon as S,hittestFill as C,isPointHittest as w}from"./hittestUtils.js";import{getLineFragmentColor as T,LineFragmentInput as E,getLineVertexData as D}from"./LineShader.js";import{getBit as O,getBitBool as k}from"./utils.js";import{VisualVariableColor as A}from"./VisualVariableColor.js";import{VisualVariableOpacity as j}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as M}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as N}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as P}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as F}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as I,getVisualVariableColor as L}from"./vvUtils.js";class R extends p{}e([n(3,a)],R.prototype,`offset`,void 0),e([n(4,o)],R.prototype,`color`,void 0),e([n(5,a)],R.prototype,`normal`,void 0),e([n(6,s)],R.prototype,`halfWidth`,void 0),e([n(7,s)],R.prototype,`referenceHalfWidth`,void 0),e([n(8,a)],R.prototype,`zoomRange`,void 0);class z extends E{}function B(e,t,n){let{
|
|
2
|
+
import{__decorate as e,__param as t}from"tslib";import{location as n,option as r,input as i}from"../../GraphShaderModule.js";import{Vec2 as a,Vec4 as o,Float as s,greaterThan as c,ifElse as l,or as u,Vec3 as d}from"../../graph/glsl.js";import{BaseHittestVertexInput as f,FeatureVertexInput as p,AFeatureShader as m}from"./AFeatureShader.js";import{noHit as h,trueHit as g,bitsetTypeFillOutline as _,bitsetOutlineUsesColorVV as v}from"./constants.js";import{isRectHittest as y,hittestRect as b,isPolygonHittest as x,hittestPolygon as S,hittestFill as C,isPointHittest as w}from"./hittestUtils.js";import{getLineFragmentColor as T,LineFragmentInput as E,getLineVertexData as D}from"./LineShader.js";import{getBit as O,getBitBool as k}from"./utils.js";import{VisualVariableColor as A}from"./VisualVariableColor.js";import{VisualVariableOpacity as j}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as M}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as N}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as P}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as F}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as I,getVisualVariableColor as L}from"./vvUtils.js";class R extends p{}e([n(3,a)],R.prototype,`offset`,void 0),e([n(4,o)],R.prototype,`color`,void 0),e([n(5,a)],R.prototype,`normal`,void 0),e([n(6,s)],R.prototype,`halfWidth`,void 0),e([n(7,s)],R.prototype,`referenceHalfWidth`,void 0),e([n(8,a)],R.prototype,`zoomRange`,void 0);class z extends E{}function B(e,t,n){let{pos:r,id:i,bitset:a}=t,u=O(a,_),f=c(u,new s(.5)),p=D(e,t),m=l(f,p.halfWidth,new s(0)),h=e.getFeatureId(i,a),g=I(e,h),y=L(e,h,t.color),b=l(f,l(k(a,v),y,t.color),y.multiply(g)),x=e.getCalloutTransform(e.isLabelInstance(a)).multiply(new d(e.getCalloutPos(r.xy,i,a),1)).xy,S=e.clip(t.id,t.bitset,t.zoomRange),C=new o(x,S,1),w=l(f,p.glPosition,C),T=n&&e.maybeRunHittest(t,n,f);return{isOutline:u,color:b,opacity:new s(1),halfWidth:m,normal:p.normal,glPosition:w,...T}}class V extends m{constructor(){super(...arguments),this.computeAttributes={pos:[`nextPos1`,`nextPos2`]}}}e([r(A)],V.prototype,`visualVariableColor`,void 0),e([r(j)],V.prototype,`visualVariableOpacity`,void 0),e([r(M)],V.prototype,`visualVariableSizeMinMaxValue`,void 0),e([r(N)],V.prototype,`visualVariableSizeScaleStops`,void 0),e([r(P)],V.prototype,`visualVariableSizeStops`,void 0),e([r(F)],V.prototype,`visualVariableSizeUnitValue`,void 0);class H extends V{constructor(){super(...arguments),this.type=`OutlineFillShader`}vertex(e,t){return B(this,e,t)}fragment(e){let{color:t,isOutline:n}=e,r=c(n,new s(.5)),i=T(e,this.view.getAntialiasing()),a=l(r,i,t),o=l(r,new s(1/255),new s(0));return this.getFragmentOutput(a,e,o)}hittest(e,t,n){let r=this.computeHittestTriangle(e,t,null);return l(w(this.hittestRequest),()=>{let r=C(this,e,t);return l(u(n,c(r,this.hittestRequest.distance)),new s(h),new s(g))},()=>l(y(this.hittestRequest),b(r,this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),l(x(this.hittestRequest),S(r,this.hittestRequest.viewSize,this.hittestMaskTexture),new s(h))))}}e([t(0,i(R)),t(1,i(f))],H.prototype,`vertex`,null),e([t(0,i(z))],H.prototype,`fragment`,null);export{V as AOutlineFillShader,z as OutlineFillFragmentInput,H as OutlineFillShader,R as OutlineFillVertexInput,B as getOutlineFillVertexData};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e,__param as t}from"tslib";import{labelU16ZoomPrecisionFactor as n,labelPlacementOffsetPadding as r,packDegreesU8 as i}from"../../../definitions.js";import{location as a,option as o,uniform as s,texture as c,define as l,input as u,ComputeVertexInput as d}from"../../GraphShaderModule.js";import{Vec4 as f,Vec2 as p,Float as m,Sampler2D as h,mod as g,floor as _,step as v,and as y,lessThan as b,greaterThanEqual as x,Vec3 as S,Mat3 as ee,equal as C,ifElse as w,greaterThan as T,Bool as E,texture2D as D,smoothstep as O,Int as k,bitRShift as A,bitAnd as j}from"../../graph/glsl.js";import{FeatureVertexInput as M,AFeatureShader as te,FeatureFragmentInput as N}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as ne,bitsetTextIsMapAligned as P,noHit as F,trueHit as re}from"../shaders/constants.js";import{isPointHittest as ie,distPointTriangle as ae,isRectHittest as I,hittestRect as L,isPolygonHittest as R,hittestLabelPolygon as z,hittestPolygon as B}from"../shaders/hittestUtils.js";import{MosaicInfo as V}from"../shaders/MosaicInfo.js";import{getBit as H}from"../shaders/utils.js";import{VisualVariableColor as U}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as W}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as G}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as K}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as q}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as oe}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as se}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as J,getVisualVariableRotation as Y}from"../shaders/vvUtils.js";const ce=1/i;class X extends M{}e([a(3,f)],X.prototype,`color`,void 0),e([a(4,p)],X.prototype,`offset`,void 0),e([a(5,p)],X.prototype,`textureUV`,void 0),e([a(6,f)],X.prototype,`fontAndReferenceSize`,void 0),e([a(7,f)],X.prototype,`outlineColor`,void 0),e([a(8,f)],X.prototype,`haloColor`,void 0),e([a(9,p)],X.prototype,`outlineAndHaloSize`,void 0),e([a(10,p)],X.prototype,`zoomRange`,void 0),e([a(11,m)],X.prototype,`clipAngle`,void 0),e([a(12,f)],X.prototype,`referenceSymbol`,void 0);class Z extends d{}e([a(13,p)],Z.prototype,`offsetNextVertex1`,void 0),e([a(14,p)],Z.prototype,`offsetNextVertex2`,void 0);class Q extends N{}class $ extends te{constructor(){super(...arguments),this.type=`TextShader`,this.computeAttributes={offset:[`offsetNextVertex1`,`offsetNextVertex2`]},this.textRenderPassType=0,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(e,t){let{clipAngle:r,zoomRange:i}=e,a=r.multiply(ce),o=g(a.subtract(this.view.getRotation()),new m(360)),s=new m(0),c=n,l=_(this.tileInfo.currentZoom.multiply(c)).divide(c),u=i.x,d=i.y,f=new m(1).subtract(v(u,l)).multiply(2),p=new m(y(x(o,new m(90)),b(o,new m(270)))).multiply(2),h=new m(2).multiply(new m(1).subtract(v(l,d)));return s=s.add(t.multiply(f)),s=s.add(t.multiply(p)),s=s.add(h),s=s.add(new m(2).multiply(this.getLabelHidden(e.id,e.bitset))),s}vertex(e,t){let n=H(e.bitset,ne),i=new m(1).subtract(n),a=this.getFeatureId(e.id,e.bitset),o=e.fontAndReferenceSize[0],s=e.fontAndReferenceSize[1],c=e.fontAndReferenceSize[2],l=e.fontAndReferenceSize[3],u=o.divide(c),d=this.textRenderPassType===1?e.outlineColor:this.textRenderPassType===2?e.haloColor:this._getVertexColor(e,a),h=this.
|
|
2
|
+
import{__decorate as e,__param as t}from"tslib";import{labelU16ZoomPrecisionFactor as n,labelPlacementOffsetPadding as r,packDegreesU8 as i}from"../../../definitions.js";import{location as a,option as o,uniform as s,texture as c,define as l,input as u,ComputeVertexInput as d}from"../../GraphShaderModule.js";import{Vec4 as f,Vec2 as p,Float as m,Sampler2D as h,mod as g,floor as _,step as v,and as y,lessThan as b,greaterThanEqual as x,Vec3 as S,Mat3 as ee,equal as C,ifElse as w,greaterThan as T,Bool as E,texture2D as D,smoothstep as O,Int as k,bitRShift as A,bitAnd as j}from"../../graph/glsl.js";import{FeatureVertexInput as M,AFeatureShader as te,FeatureFragmentInput as N}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as ne,bitsetTextIsMapAligned as P,noHit as F,trueHit as re}from"../shaders/constants.js";import{isPointHittest as ie,distPointTriangle as ae,isRectHittest as I,hittestRect as L,isPolygonHittest as R,hittestLabelPolygon as z,hittestPolygon as B}from"../shaders/hittestUtils.js";import{MosaicInfo as V}from"../shaders/MosaicInfo.js";import{getBit as H}from"../shaders/utils.js";import{VisualVariableColor as U}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as W}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as G}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as K}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as q}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as oe}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as se}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as J,getVisualVariableRotation as Y}from"../shaders/vvUtils.js";const ce=1/i;class X extends M{}e([a(3,f)],X.prototype,`color`,void 0),e([a(4,p)],X.prototype,`offset`,void 0),e([a(5,p)],X.prototype,`textureUV`,void 0),e([a(6,f)],X.prototype,`fontAndReferenceSize`,void 0),e([a(7,f)],X.prototype,`outlineColor`,void 0),e([a(8,f)],X.prototype,`haloColor`,void 0),e([a(9,p)],X.prototype,`outlineAndHaloSize`,void 0),e([a(10,p)],X.prototype,`zoomRange`,void 0),e([a(11,m)],X.prototype,`clipAngle`,void 0),e([a(12,f)],X.prototype,`referenceSymbol`,void 0);class Z extends d{}e([a(13,p)],Z.prototype,`offsetNextVertex1`,void 0),e([a(14,p)],Z.prototype,`offsetNextVertex2`,void 0);class Q extends N{}class $ extends te{constructor(){super(...arguments),this.type=`TextShader`,this.computeAttributes={offset:[`offsetNextVertex1`,`offsetNextVertex2`]},this.textRenderPassType=0,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(e,t){let{clipAngle:r,zoomRange:i}=e,a=r.multiply(ce),o=g(a.subtract(this.view.getRotation()),new m(360)),s=new m(0),c=n,l=_(this.tileInfo.currentZoom.multiply(c)).divide(c),u=i.x,d=i.y,f=new m(1).subtract(v(u,l)).multiply(2),p=new m(y(x(o,new m(90)),b(o,new m(270)))).multiply(2),h=new m(2).multiply(new m(1).subtract(v(l,d)));return s=s.add(t.multiply(f)),s=s.add(t.multiply(p)),s=s.add(h),s=s.add(new m(2).multiply(this.getLabelHidden(e.id,e.bitset))),s}vertex(e,t){let n=H(e.bitset,ne),i=new m(1).subtract(n),a=this.getFeatureId(e.id,e.bitset),o=e.fontAndReferenceSize[0],s=e.fontAndReferenceSize[1],c=e.fontAndReferenceSize[2],l=e.fontAndReferenceSize[3],u=o.divide(c),d=this.textRenderPassType===1?e.outlineColor:this.textRenderPassType===2?e.haloColor:this._getVertexColor(e,a),h=this.getCalloutTransform(this.isAnchoredLabel(e.bitset)).multiply(new S(this.getLabelTextPos(e.pos,e.id,e.bitset),1)).xy,g=e.offset,_=new m(1),v=ee.identity(),y=new p(0);if(this.isLabel){if(!e.referenceSymbol)throw Error(`InternalError: Optional attribute 'referenceSymbol' expected for labels`);let t=e.referenceSymbol,n=t.xy,i=t.z,o=this._unpackDirection(t.w),s=this.getLabelReferenceSymbolVVOffset(e.id),c=C(s.x,new m(0)).and(C(s.y,new m(0))),l=w(c,J(this,a,i).divide(2),i.divide(2)),u=o.multiply(l.add(r)).add(s);y=n.add(u),g=g.add(y)}else _=J(this,a,s).divide(s),o=o.multiply(_),u=u.multiply(_),g=g.multiply(_),v=Y(this,a),g=v.multiply(new S(g,0)).xy;let b=H(e.bitset,P),x=this._getViewRotationMatrix(b).multiply(new S(g,0)).multiply(this.tileInfo.scaleFactor).xy,D=this.isLabel?this.clipLabel(e,b):this.clip(e.id,e.bitset,e.zoomRange);D=this.isBackgroundPass?D.add(i.multiply(2)):D.add(n.multiply(2));let O=new m(0);if(this.textRenderPassType===1&&(D=D.add(w(C(e.outlineAndHaloSize.x,new m(0)),new m(2),new m(0))),O=new m(e.outlineAndHaloSize.x).divide(u).divide(l)),this.textRenderPassType===2){let t=e.outlineAndHaloSize.x,n=new m(e.outlineAndHaloSize.y);D=D.add(w(C(n,new m(0)),new m(2),new m(0))),O=n.add(t).divide(u).divide(l)}let k=this.isLabel?T(D,new m(1)):new E(!1),A=new f(h.add(x),D,1),j=e.textureUV.divide(this.mosaicInfo.size),M=new m(.105).multiply(c).divide(o).divide(this.view.pixelRatio);return{glPosition:A,color:d,size:u,textureUV:j,antialiasingWidth:M,outlineDistanceOffset:O,...this.maybeRunHittest(e,t,{vvSizeAdjustment:_,vvRotation:v,labelOffset:y,labelClipped:k,scaleFactor:this.tileInfo.scaleFactor})}}_getViewRotationMatrix(e){let t=this.view.getDisplayViewMat3(),n=this.view.displayMat3,r=new m(1).subtract(e);return t.multiply(e).add(n.multiply(r))}_getHittestAlignmentMatrix(e){let t=this.tile.getTileMat3(this.view),n=this.view.viewMat3.multiply(t),r=t,i=new m(1).subtract(e);return n.multiply(e).add(r.multiply(i))}fragment(e){let t=new m(2/8),n=new m(1).subtract(t),r=D(this.mosaicTexture,e.textureUV).a,i=n.subtract(e.outlineDistanceOffset);this.highlight&&(i=i.divide(2));let a=e.antialiasingWidth,o=O(i.subtract(a),i.add(a),r);return this.getFragmentOutput(e.color.multiply(o),e)}computeHittestTriangle(e,t,{vvSizeAdjustment:n,vvRotation:r,labelOffset:i,scaleFactor:a}){let o,s,c;this.isLabel?(o=new S(e.offset.multiply(a).add(i),0),s=new S(t.offsetNextVertex1.multiply(a).add(i),0),c=new S(t.offsetNextVertex2.multiply(a).add(i),0)):(o=r.multiply(new S(e.offset.multiply(a).multiply(n),0)),s=r.multiply(new S(t.offsetNextVertex1.multiply(a).multiply(n),0)),c=r.multiply(new S(t.offsetNextVertex2.multiply(a).multiply(n),0)));let l=this.tile.getViewScreenMat3(this.view).multiply(new S(e.pos,1)),u=H(e.bitset,P),d=this._getHittestAlignmentMatrix(u);return{pos0:l.add(d.multiply(o)).xy,pos1:l.add(d.multiply(s)).xy,pos2:l.add(d.multiply(c)).xy}}hittest(e,t,n){let{vvSizeAdjustment:r,vvRotation:i,labelOffset:a,labelClipped:o,scaleFactor:s}=n,{pos0:c,pos1:l,pos2:u}=this.computeHittestTriangle(e,t,{vvSizeAdjustment:r,vvRotation:i,labelOffset:a,scaleFactor:s}),d={pos0:c,pos1:l,pos2:u},f=this.isLabel?o:new E(!1);return w(f,new m(F),()=>w(ie(this.hittestRequest),()=>{let e=ae(this.hittestRequest.position,c,l,u);return w(T(e,this.hittestRequest.distance),new m(F),new m(re))},()=>w(I(this.hittestRequest),L(d,this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),w(R(this.hittestRequest),this.isLabel?z(d,this.hittestRequest.viewSize,this.hittestMaskTexture):B(d,this.hittestRequest.viewSize,this.hittestMaskTexture),new m(F)))))}_unpackDirection(e){let t=new k(e),n=A(t,new k(2)),r=j(t,new k(3));return new p(new m(n).subtract(1),new m(r).subtract(1))}_getVertexColor(e,t){let n=e.color;if(this.visualVariableColor){let r=this.getColorValue(t);n=this.visualVariableColor.getColor(r,e.color,new E(!1))}if(this.visualVariableOpacity){let e=this.getOpacityValue(t),r=this.visualVariableOpacity.getOpacity(e);n=n.multiply(r)}return n}}e([o(U)],$.prototype,`visualVariableColor`,void 0),e([o(W)],$.prototype,`visualVariableOpacity`,void 0),e([o(G)],$.prototype,`visualVariableRotation`,void 0),e([o(K)],$.prototype,`visualVariableSizeMinMaxValue`,void 0),e([o(q)],$.prototype,`visualVariableSizeScaleStops`,void 0),e([o(oe)],$.prototype,`visualVariableSizeStops`,void 0),e([o(se)],$.prototype,`visualVariableSizeUnitValue`,void 0),e([s(V)],$.prototype,`mosaicInfo`,void 0),e([c(h)],$.prototype,`mosaicTexture`,void 0),e([l],$.prototype,`textRenderPassType`,void 0),e([l],$.prototype,`isBackgroundPass`,void 0),e([l],$.prototype,`isLabel`,void 0),e([t(0,u(X)),t(1,u(Z))],$.prototype,`vertex`,null),e([t(0,u(Q))],$.prototype,`fragment`,null);export{Q as TextFragmentInput,$ as TextShader,X as TextVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e
|
|
2
|
+
import{Texture as e}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as t}from"../../../../../../webgl/TextureDescriptor.js";class n{shutdown(){this._ctx=null}getTexture(n,r){if(!this._ctx){let e=document.createElement(`canvas`);e.width=512,e.height=512,this._ctx=e.getContext(`2d`)}if(!r.tileDebugInfoTexture){let i=new t(512,512);i.wrapMode=33071,i.samplingMode=9729,i.isImmutable=!0,r.tileDebugInfoTexture=new e(n,i)}let i=this._ctx;i.clearRect(0,0,i.canvas.width,i.canvas.height),i.textAlign=`left`,i.textBaseline=`top`,i.font=`14px sans-serif`,i.lineWidth=2,i.fillStyle=`white`,i.strokeStyle=`black`;let{debugSlot:a}=r,o=8+99.2*a,s=`${a}) ${r.key.id} (${r.constructor.name})`;i.strokeText(s,8,o),i.fillText(s,8,o),o+=16;let{debugInfo:c}=r;if(c){let{length:e,minOrderedLength:t,minUnorderedLength:n,triangleCount:r}=c.display;if(e>0){let t=`Length: ${e}`;i.strokeText(t,8,o),i.fillText(t,8,o),o+=16}if(t){let e=`Min ordered length: ${t}`;i.strokeText(e,8,o),i.fillText(e,8,o),o+=16}if(n){let e=`Min unordered length: ${n}`;i.strokeText(e,8,o),i.fillText(e,8,o),o+=16}if(r>0){r>1e5&&(i.fillStyle=`red`,i.strokeStyle=`white`);let e=`Triangle count: ${r}`;i.strokeText(e,8,o),i.fillText(e,8,o),o+=16}let{bytesUsed:a,bytesReserved:s}=c.memory;if(i.fillStyle=`white`,i.strokeStyle=`black`,a>0||s>0){let e=`Memory usage: ${a} of ${s} bytes`;i.strokeText(e,8,o),i.fillText(e,8,o),o+=16}}return r.tileDebugInfoTexture.setData(i.canvas),r.tileDebugInfoTexture}}export{n as TileDebugInfoTexture};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import"../../../webgl/Program.js";import"../../../../core/has.js";import"../../../webgl/Renderbuffer.js";import e
|
|
2
|
+
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"../../../../core/memoryEstimations.js";import"../../../webgl/enums.js";import"../../../webgl/Util.js";import{TextureDescriptor as t}from"../../../webgl/TextureDescriptor.js";function n(n,r,i){let a=new t(r.width,r.height);return a.dataType=r.dataType,r.depth&&(a.depth=r.depth),r.flipped&&(a.flipped=r.flipped),r.hasMipmap&&(a.hasMipmap=r.hasMipmap),a.internalFormat=r.internalFormat,r.isImmutable&&(a.isImmutable=r.isImmutable),r.isOpaque&&(a.isOpaque=r.isOpaque),r.maxAnisotropy&&(a.maxAnisotropy=r.maxAnisotropy),a.pixelFormat=r.pixelFormat,r.preMultiplyAlpha&&(a.preMultiplyAlpha=r.preMultiplyAlpha),r.samplingMode&&(a.samplingMode=r.samplingMode),r.target&&(a.target=r.target),r.unpackAlignment&&(a.unpackAlignment=r.unpackAlignment),r.wrapMode&&(a.wrapMode=r.wrapMode),new e(n,a,i)}export{n as createTexture};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{FeatureMatcher as e,combineMeshWriterGroups as t}from"./Matcher.js";class n extends e{constructor(e,t){super(),this._intervals=[],this._isMaxInclusive=t,this._field=e}static async fromIntervalSchema(e,r){let i=await e.storage.createComputedField(r),a=new n(i,r.isMaxInclusive)
|
|
2
|
+
import{FeatureMatcher as e,combineMeshWriterGroups as t}from"./Matcher.js";class n extends e{constructor(e,t){super(),this._intervals=[],this._isMaxInclusive=t,this._field=e}static async fromIntervalSchema(e,r){let i=await e.storage.createComputedField(r),a=new n(i,r.isMaxInclusive),o=await Promise.all(r.intervals.map(async n=>{let r=await e.createMeshWriters(n.meshes),i=await e.createMeshWriters(n.alternateMeshes);return t(r,i)}));for(let e=0;e<r.intervals.length;e++)a.add(r.intervals[e],o[e]);let s=await e.createMeshWriters(r.defaultSymbol);a.setDefault(s);let c=await e.createMeshWriters(r.backgroundFill);return a.setBackgroundFill(c),a}add(e,t){this._intervals.push({interval:e,result:t}),this._intervals.sort((e,t)=>e.interval.min-t.interval.min)}size(){return super.size()+this._intervals.length}hasArcadeDependency(e){return this._field?.hasArcadeDependency(e)||this._intervals.some(t=>t.result.writers.some(t=>t.hasArcadeDependency(e)))}doMatch(e,t,n){let r=this._field?.read(e,t);if(r==null||isNaN(r)||r===1/0||r===-1/0)return null;for(let e=0;e<this._intervals.length;e++){let{interval:t,result:n}=this._intervals[e],i=r>=t.min,a=this._isMaxInclusive?r<=t.max:r<t.max;if(i&&a)return n}return null}}export{n as IntervalMatcher};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{referenceSetter as n}from"../../../core/collectionUtils.js";import{deprecatedFunction as r}from"../../../core/deprecate.js";import i from"../../../core/Error.js";import"../../../core/has.js";import a from"../../../core/Logger.js";import{watch as o,syncAndInitial as s,sync as c}from"../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{isInEffectiveScaleRange as d}from"../../../geometry/support/scaleUtils.js";import{isLinkChartView as f}from"../../../linkChart/guards.js";import{Container as p}from"../engine/Container.js";import{ClipMesh as m}from"../engine/webgl/ClipMesh.js";import{maxHighlightGroups as h}from"../engine/webgl/definitions.js";import{HighlightRegistry as g}from"./support/HighlightRegistry.js";import{createOrReuseHighlightGradient as _}from"./support/util.js";import v from"../../layers/support/ClipRect.js";import y from"../../layers/support/GeometryClipArea.js";import b from"../../layers/support/Path.js";import{defaultHighlightName as x}from"../../support/HighlightDefaults.js";import S from"../../support/HighlightOptions.js";const C=t.ofType({key:`type`,base:null,typeMap:{rect:v,path:b,geometry:y}}),w=new(t.ofType(S)),T=v=>{let y=v,b=class extends y{constructor(){super(...arguments),this._highlightRegistry=new g,this.attached=!1,this.clips=new C,this.highlights=null,this.lastUpdateId=-1,this.moving=!1,this.updateRequested=!1,this._visibleAtCurrentScale=!0}initialize(){let e=this.view?.spatialReferenceLocked??!0;this.view?.spatialReference&&e&&!this.spatialReferenceSupported?this.addResolvingPromise(Promise.reject(new i(`layerview:spatial-reference-incompatible`,`The spatial reference of this layer does not meet the requirements of the view`,{layer:this.layer}))):(this.container||=new p,this.container.fadeTransitionEnabled=!0,this.container.visible=!1,this.container.endTransitions(),this.addHandles([o(()=>this.suspended,e=>{this.container&&(this.container.visible=!e)},s),o(()=>this.updateSuspended,e=>{this.view&&!e&&this.updateRequested&&this.view.requestUpdate()},s),o(()=>this.layer?.opacity??1,e=>{this.container&&(this.container.opacity=e)},s),o(()=>this.layer&&`blendMode`in this.layer?this.layer.blendMode:`normal`,e=>{this.container&&(this.container.blendMode=e)},s),o(()=>this.layer&&`effect`in this.layer?this.layer.effect:null,e=>{this.container&&(this.container.effect=e)},s),o(()=>this._effectiveHighlightOptions.items.map(e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})),()=>{this.container.highlightGradient=_(this.container.highlightGradient,this._effectiveHighlightOptions.items)},s),o(()=>this._getHighlightFilterGroups(),()=>this._onHighlightChange(),c),o(()=>this.clips.map(e=>e.version),async()=>{if(this.container&&this.view?.spatialReference){let
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{referenceSetter as n}from"../../../core/collectionUtils.js";import{deprecatedFunction as r}from"../../../core/deprecate.js";import i from"../../../core/Error.js";import"../../../core/has.js";import a from"../../../core/Logger.js";import{watch as o,syncAndInitial as s,sync as c}from"../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{isInEffectiveScaleRange as d}from"../../../geometry/support/scaleUtils.js";import{isLinkChartView as f}from"../../../linkChart/guards.js";import{Container as p}from"../engine/Container.js";import{ClipMesh as m}from"../engine/webgl/ClipMesh.js";import{maxHighlightGroups as h}from"../engine/webgl/definitions.js";import{HighlightRegistry as g}from"./support/HighlightRegistry.js";import{createOrReuseHighlightGradient as _}from"./support/util.js";import v from"../../layers/support/ClipRect.js";import y from"../../layers/support/GeometryClipArea.js";import b from"../../layers/support/Path.js";import{defaultHighlightName as x}from"../../support/HighlightDefaults.js";import S from"../../support/HighlightOptions.js";const C=t.ofType({key:`type`,base:null,typeMap:{rect:v,path:b,geometry:y}}),w=new(t.ofType(S)),T=v=>{let y=v,b=class extends y{constructor(){super(...arguments),this._clipUpdateId=0,this._highlightRegistry=new g,this.attached=!1,this.clips=new C,this.highlights=null,this.lastUpdateId=-1,this.moving=!1,this.updateRequested=!1,this._visibleAtCurrentScale=!0}initialize(){let e=this.view?.spatialReferenceLocked??!0;this.view?.spatialReference&&e&&!this.spatialReferenceSupported?this.addResolvingPromise(Promise.reject(new i(`layerview:spatial-reference-incompatible`,`The spatial reference of this layer does not meet the requirements of the view`,{layer:this.layer}))):(this.container||=new p,this.container.fadeTransitionEnabled=!0,this.container.visible=!1,this.container.endTransitions(),this.addHandles([o(()=>this.suspended,e=>{this.container&&(this.container.visible=!e)},s),o(()=>this.updateSuspended,e=>{this.view&&!e&&this.updateRequested&&this.view.requestUpdate()},s),o(()=>this.layer?.opacity??1,e=>{this.container&&(this.container.opacity=e)},s),o(()=>this.layer&&`blendMode`in this.layer?this.layer.blendMode:`normal`,e=>{this.container&&(this.container.blendMode=e)},s),o(()=>this.layer&&`effect`in this.layer?this.layer.effect:null,e=>{this.container&&(this.container.effect=e)},s),o(()=>this._effectiveHighlightOptions.items.map(e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})),()=>{this.container.highlightGradient=_(this.container.highlightGradient,this._effectiveHighlightOptions.items)},s),o(()=>this._getHighlightFilterGroups(),()=>this._onHighlightChange(),c),o(()=>this.clips.map(e=>e.version),async()=>{let e=++this._clipUpdateId;if(this.container&&this.view?.spatialReference){let t=this.view.featuresTilingScheme,n=await this._updatingHandles.addPromise(Promise.all(this.clips.items.map(e=>m.create(e,t))));if(this.destroyed||e!==this._clipUpdateId){for(let e of n)e?.destroy();return}for(let e of this.container.clips)e.destroy();this.container.clips=n.filter(e=>!!e)}},s),o(()=>({scale:this.view?.scale,scaleRange:this.layer&&`effectiveScaleRange`in this.layer?this.layer.effectiveScaleRange:null}),({scale:e,scaleRange:t})=>{let n=d(t,e);n!==this._visibleAtCurrentScale&&(this._visibleAtCurrentScale=n)},s),o(()=>this.layer?.effectiveVisible,async e=>{this.container.requestDeclutter()})],`constructor`),this.view?.whenLayerView?this.view.whenLayerView(this.layer).then(e=>{e===this&&this.processAttach()},()=>{}):this.when().then(()=>{this.processAttach()},()=>{}))}destroy(){this.processDetach(),this.updateRequested=!1;for(let e of this.container?.clips??[])e.destroy()}get highlightOptions(){return this._logHighlightOptionsDeprecation(),this.highlights?.find(({name:e})=>e===x)}set highlightOptions(e){if(this._logHighlightOptionsDeprecation(),!this.highlights){if(!e)return;this.highlights=new t([new S])}let n=this.highlights.find(({name:e})=>e===x);e?n?.assignFrom(e):(this.highlights.remove(n),this.highlights.length===0&&(this.highlights=null))}_logHighlightOptionsDeprecation(){r(a.getLogger(this),"`LayerView.highlightOptions` is deprecated in favor of View.highlights",{replacement:`View.highlights`,version:`4.34`,see:`https://arcg.is/inbTa1#highlights`,warnOnce:!0})}get hasHighlight(){return this._highlightRegistry.size>0}get _effectiveHighlightOptions(){if(!this.view)return w;if(!this.highlights)return this.view.highlights;let e=this.view.highlights.clone();for(let t of this.highlights){let n=e.find(e=>e.name===t.name);n&&n.assignFrom(t)}return e}get highlightIds(){return this._highlightRegistry.highlightIds}get scheduler(){return this.view.scheduler}get spatialReferenceSupported(){let e=this.view?.spatialReference;return e==null||this.supportsSpatialReference(e)}get updating(){return this.spatialReferenceSupported?this.attached?this.suspended?!1:this.updateRequested||this.isUpdating()||this._updatingHandles?.updating||this.container.transitioning:!0:!1}get visibleAtCurrentScale(){return this._visibleAtCurrentScale}processAttach(){this.isResolved()&&!this.attached&&!this.destroyed&&this.spatialReferenceSupported&&(this.attach(),this.attached=!0,this.requestUpdate())}processDetach(){this.attached&&(this.attached=!1,this.removeHandles(`attach`),this.detach(),this.updateRequested=!1)}requestUpdate(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.updateSuspended||this.view.requestUpdate())}processUpdate(e){this.isFulfilled()&&!this.isResolved()?this.updateRequested=!1:(this._set(`updateParameters`,e),this.updateRequested&&!this.updateSuspended&&(this.updateRequested=!1,this.update(e)))}hitTest(e,t,n){return Promise.resolve(null)}supportsSpatialReference(e){return!0}canResume(){if(!this.spatialReferenceSupported)return!1;switch(this.layer?.type){case`link-chart`:case`knowledge-graph-sublayer`:case`graphics`:break;default:if(f(this.view)&&!this.view.inGeographicLayout)return!1}return super.canResume()?this.visibleAtCurrentScale:!1}getSuspendInfo(){let e=super.getSuspendInfo(),t=!this.spatialReferenceSupported;return t&&(e.spatialReferenceNotSupported=t),e}addAttachHandles(e){this.addHandles(e,`attach`)}_addHighlightFilter(e,t){return this._highlightRegistry.register(t,e)}_removeHighlight(e){this._highlightRegistry.unregister(e)}_onHighlightChange(){}_getHighlightFilterGroups(){let e=[];for(let{name:t,filters:n}of this._highlightRegistry.highlightGroups){let r=this._effectiveHighlightOptions.findIndex(e=>e.name===t);r<0||r>=h||e.push({order:r,filters:n})}return e}};return e([l()],b.prototype,`attached`,void 0),e([l({type:C,set(e){let t=n(e,this._get(`clips`),C);this._set(`clips`,t)}})],b.prototype,`clips`,void 0),e([l()],b.prototype,`container`,void 0),e([l({type:S})],b.prototype,`highlightOptions`,null),e([l({type:t.ofType(S)})],b.prototype,`highlights`,void 0),e([l()],b.prototype,`_effectiveHighlightOptions`,null),e([l()],b.prototype,`moving`,void 0),e([l({readOnly:!0})],b.prototype,`spatialReferenceSupported`,null),e([l({readOnly:!0})],b.prototype,`updateParameters`,void 0),e([l()],b.prototype,`updateRequested`,void 0),e([l()],b.prototype,`updating`,null),e([l()],b.prototype,`view`,void 0),e([l()],b.prototype,`_visibleAtCurrentScale`,void 0),e([l({readOnly:!0})],b.prototype,`visibleAtCurrentScale`,null),b=e([u(`esri.views.2d.layers.LayerView2D`)],b),b};export{T as LayerView2D};
|
package/views/2d/webglDeps.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
export{BufferObject}from"../webgl/BufferObject.js";export{FramebufferObject}from"../webgl/FramebufferObject.js";export{DisposableProgram}from"../webgl/Program.js";export{ProgramCache}from"../webgl/ProgramCache.js";export{Renderbuffer}from"../webgl/Renderbuffer.js";export{
|
|
2
|
+
export{BufferObject}from"../webgl/BufferObject.js";export{FramebufferObject}from"../webgl/FramebufferObject.js";export{DisposableProgram}from"../webgl/Program.js";export{ProgramCache}from"../webgl/ProgramCache.js";export{Renderbuffer}from"../webgl/Renderbuffer.js";export{Texture}from"../webgl/Texture.js";export{VertexArrayObject}from"../webgl/VertexArrayObject.js";export{glslifyDefineMap}from"../webgl/programUtils.js";export{createProgram}from"../webgl/ProgramTemplate.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{equals as n}from"../../core/arrayUtils.js";import r from"../../core/Collection.js";import i from"../../core/Error.js";import a from"../../core/Logger.js";import{mapCollection as o}from"../../core/mapCollectionUtils.js";import{isPromiseLike as s}from"../../core/promiseUtils.js";import{watch as c,initial as l}from"../../core/reactiveUtils.js";import{property as u,subclass as d}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as f}from"../../core/support/UpdatingHandles.js";import p from"../../geometry/Point.js";import{polygonToVolume as m}from"./focusAreaUtils.js";import{ElevationContext as h}from"./layers/graphics/ElevationContext.js";import{FocusArea as g}from"./webgl-engine/effects/focusArea/FocusArea.js";import{FocusAreaMask as _}from"./webgl-engine/effects/focusArea/FocusAreaMask.js";import{FocusAreaOutlineItem as v}from"./webgl-engine/effects/focusArea/FocusAreaOutlineItem.js";let y=class extends t{get updating(){return this._updatingHandles.updating||!!this._outlineMap?.some(e=>e.updating)}constructor(e){super(e),this._updatingHandles=new f,this._elevationContext=new h,this.
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{equals as n}from"../../core/arrayUtils.js";import r from"../../core/Collection.js";import i from"../../core/Error.js";import a from"../../core/Logger.js";import{mapCollection as o}from"../../core/mapCollectionUtils.js";import{isPromiseLike as s}from"../../core/promiseUtils.js";import{watch as c,initial as l}from"../../core/reactiveUtils.js";import{property as u,subclass as d}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as f}from"../../core/support/UpdatingHandles.js";import p from"../../geometry/Point.js";import{polygonToVolume as m}from"./focusAreaUtils.js";import{ElevationContext as h}from"./layers/graphics/ElevationContext.js";import{FocusArea as g}from"./webgl-engine/effects/focusArea/FocusArea.js";import{FocusAreaMask as _}from"./webgl-engine/effects/focusArea/FocusAreaMask.js";import{FocusAreaOutlineItem as v}from"./webgl-engine/effects/focusArea/FocusAreaOutlineItem.js";let y=class extends t{get updating(){return this._updatingHandles.updating||!!this._outlineMap?.some(e=>e.updating)}constructor(e){super(e),this._updatingHandles=new f,this._elevationContext=new h,this._outlineMap=new r}initialize(){this.addHandles([c(()=>({volumes:this.volumes,ready:this.view.groundView?.ready}),({volumes:e,ready:t})=>{t&&(e.size!==0&&this._mask?.updateGeometries(),this._ensureRenderNodes())},l)]),this._outlineMap=o(()=>this.areas?.areas,e=>new v({area:e,view:this.view}),{recycleItems:!0})}destroy(){this.removeAllHandles(),this._outlineMap.destroy(),this._updatingHandles.destroy()}get areas(){return this.view.map?.focusAreas}get enabledAreas(){return this.areas?.areas.toArray().filter(({enabled:e})=>e)??[]}get style(){return this.areas?.style??`bright`}get polygons(){return this.enabledAreas.reduce((e,t)=>e.concat(t.geometries.toArray()),[])}containsGeometry(e){if(this.polygons.length===0)return!0;let t=new p(e);return this.polygons.some(e=>e.contains(t))}get volumes(){let e=this.polygons,t=this._get(`volumes`);if(n(Array.from(t?.keys()??[]),e))return t??new Map;let r=new Map;for(let n of e){let e=t?.get(n);if(e)r.set(n,e);else try{let e=m(n,this.view,this._elevationContext);if(e==null)continue;if(s(e)){this._updatingHandles.consumePromise(e);continue}r.set(n,e)}catch(e){a.getLogger(this).error(new i(`focusareasview:projection-failed`,`Failed to project focus area geometry to view spatial reference`,{geometry:n,error:e}))}}return r}_ensureRenderNodes(){if(this.view.stage){if(this.volumes.size===0){let{_mask:e,_visualization:t}=this;this._mask=this._visualization=null,t?.fadeOut(()=>{e?.destroy(),t?.destroy()})}else this._mask??=new _({focusAreasView:this}),this._visualization??=new g({focusAreasView:this}),this.view.stage.renderView.requestRender()}}};e([u()],y.prototype,`updating`,null),e([u()],y.prototype,`volumes`,null),e([u({constructOnly:!0})],y.prototype,`view`,void 0),y=e([d(`esri.views.3d.FocusAreasView`)],y);export{y as FocusAreasView};
|
package/views/3d/GroundView3D.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../core/Evented.js";import has from"../../core/has.js";import{when as n,watch as r,syncAndInitial as i}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{create as s,equals as c,intersection as l,union as u}from"../../geometry/support/aaBoundingRect.js";import d from"../GroundView.js";import{ElevationRange as f}from"./support/ElevationRange.js";import{toBoundingRect as p}from"./support/extentUtils.js";import{webMercatorWorldExtent as m,geographicWorldExtent as h}from"./terrain/TerrainConst.js";import{isIntegratedMeshLayerView as g}from"../support/layerViewUtils.js";const _=Symbol(`integrated-mesh-elevation-providers`);let v=class extends t(d){initialize(){super.initialize(),this.addHandles(n(()=>this._terrainSurface,e=>e.on(`elevation-change`,e=>this._elevationChange(e)))),r(()=>[this.view?.basemapView?.groundLayerViews.toArray(),this.layerViews.toArray()],()=>{this.removeHandles(_),this.addHandles(this._integratedMeshGroundLayerViews.map(({elevationProvider:e})=>e.on(`elevation-change`,e=>this._elevationChange(e))),_)},i),this.addHandles([r(()=>this.memoizedElevationQueryDependencies,()=>{this.emit(`elevation-query-change`)})])}get memoizedElevationQueryDependencies(){return(this.ground?.allLayers??[]).filter(e=>e.type===`elevation`||e.type===`integrated-mesh-3dtiles`&&e.replacesTerrain).map(e=>e.memoizedElevationQueryDependencies)}_elevationChange(e){this.emit(`elevation-change`,e)}get _integratedMeshGroundLayerViews(){return has(`enable-feature:im-as-ground`)?[...this.view?.basemapView?.groundLayerViews.filter(g)??[],...this.layerViews.filter(g)]:[...this.view?.basemapView?.groundLayerViews.filter(g).filter(e=>e.replacesTerrain)??[]]}get _terrainSurface(){return this.view.basemapTerrain}get _usingTerrain(){return!this.hasTerrainReplacement&&(this._terrainSurface?.enabled??!1)}get spatialReference(){return this._terrainSurface?.spatialReference}get userClippingExtent(){let{spatialReference:e}=this,{clippingArea:t}=this.view;if(t==null||e==null)return null;let n=s(),r=p(t,n,e)?n:null,i=this._get(`userClippingExtent`);return c(r,i)?i:r}isUpdating(){return this._usingTerrain&&this._terrainSurface.updating||super.isUpdating()}getElevation(e,t,n,r){let i=this._usingTerrain?this._terrainSurface?.getElevation(e,t,n,r):null;return this._integratedMeshGroundLayerViews.reduce((i,a)=>{let o=a.elevationProvider.getElevation(e,t,n,r);return o==null?i:Math.max(o,i??o)},i)}getElevations(e,t,n){let r=this.view.groundSpatialReference;if(r==null)for(let e=0;e<t;++e)n(e,null);else for(let i=0;i<t;++i){let t=i*3;n(i,this.getElevation(e[t],e[t+1],e[t+2],r))}}intersect(e,t,n,r){this._usingTerrain&&this._terrainSurface.intersect(e,t,n,r),this._integratedMeshGroundLayerViews.forEach(i=>i.intersect(e,t,n,r))}getSphereElevationRange(e,t,n){let r=this._usingTerrain?this._terrainSurface?.getSphereElevationRange?.(e,t):null;return this._integratedMeshGroundLayerViews.reduce((n,r)=>{let i=r.elevationProvider.getSphereElevationRange?.(e,t);return i==null||(n??=new f,n.expandElevationRange(i)),n},r?new f(r.minElevation,r.maxElevation):null)}getRootElevationRange(){let e=this._usingTerrain?this._terrainSurface?.getRootElevationRange?.():null;return this._integratedMeshGroundLayerViews.reduce((e,t)=>{let n=t.elevationProvider.getRootElevationRange?.();return n==null||(e??=new f,e.expandElevationRange(n)),e},e?new f(e.minElevation,e.maxElevation):null)}get elevationQueryCache(){let e=this.view?.basemapTerrain;return e?.enabled?e.elevationQueryCache:null}get elevationQueryReady(){for(let e of this.ground?.allLayers??[])if(e.type===`integrated-mesh-3dtiles`&&e.replacesTerrain&&e.loadStatus!==`failed`&&e.queryElevationCallback==null)return!1;return!0}get groundExtent(){let{fullGroundExtent:e}=this;return e?this.userClippingExtent?l(e,this.userClippingExtent,s()):this.fullGroundExtent:null}get fullGroundExtent(){let e=this._usingTerrain?this._terrainSurface.fullGroundExtent:null;if(this._integratedMeshGroundLayerViews.length===0)return e;let t=this.view.spatialReference;if(!t.isWebMercator&&!t.isWGS84)return e;let n=b(t);return e?u(e,n,s()):n}get visibleElevationRange(){let e=this._usingTerrain?this._terrainSurface.visibleElevationRange:null
|
|
2
|
+
import{__decorate as e}from"tslib";import{EventedMixin as t}from"../../core/Evented.js";import has from"../../core/has.js";import{when as n,watch as r,syncAndInitial as i}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{create as s,equals as c,intersection as l,union as u}from"../../geometry/support/aaBoundingRect.js";import d from"../GroundView.js";import{ElevationRange as f}from"./support/ElevationRange.js";import{toBoundingRect as p}from"./support/extentUtils.js";import{webMercatorWorldExtent as m,geographicWorldExtent as h}from"./terrain/TerrainConst.js";import{isIntegratedMeshLayerView as g}from"../support/layerViewUtils.js";const _=Symbol(`integrated-mesh-elevation-providers`);let v=class extends t(d){initialize(){super.initialize(),this.addHandles(n(()=>this._terrainSurface,e=>e.on(`elevation-change`,e=>this._elevationChange(e)))),r(()=>[this.view?.basemapView?.groundLayerViews.toArray(),this.layerViews.toArray()],()=>{this.removeHandles(_),this.addHandles(this._integratedMeshGroundLayerViews.map(({elevationProvider:e})=>e.on(`elevation-change`,e=>this._elevationChange(e))),_)},i),this.addHandles([r(()=>this.memoizedElevationQueryDependencies,()=>{this.emit(`elevation-query-change`)})])}get memoizedElevationQueryDependencies(){return(this.ground?.allLayers??[]).filter(e=>e.type===`elevation`||e.type===`integrated-mesh`||e.type===`integrated-mesh-3dtiles`&&e.replacesTerrain).map(e=>e.memoizedElevationQueryDependencies)}_elevationChange(e){this.emit(`elevation-change`,e)}get _integratedMeshGroundLayerViews(){return has(`enable-feature:im-as-ground`)?[...this.view?.basemapView?.groundLayerViews.filter(g)??[],...this.layerViews.filter(g)]:[...this.view?.basemapView?.groundLayerViews.filter(g).filter(e=>e.replacesTerrain)??[]]}get _terrainSurface(){return this.view.basemapTerrain}get _usingTerrain(){return!this.hasTerrainReplacement&&(this._terrainSurface?.enabled??!1)}get spatialReference(){return this._terrainSurface?.spatialReference}get userClippingExtent(){let{spatialReference:e}=this,{clippingArea:t}=this.view;if(t==null||e==null)return null;let n=s(),r=p(t,n,e)?n:null,i=this._get(`userClippingExtent`);return c(r,i)?i:r}isUpdating(){return this._usingTerrain&&this._terrainSurface.updating||super.isUpdating()}getElevation(e,t,n,r){let i=this._usingTerrain?this._terrainSurface?.getElevation(e,t,n,r):null;return this._integratedMeshGroundLayerViews.reduce((i,a)=>{let o=a.elevationProvider.getElevation(e,t,n,r);return o==null?i:Math.max(o,i??o)},i)}getElevations(e,t,n){let r=this.view.groundSpatialReference;if(r==null)for(let e=0;e<t;++e)n(e,null);else for(let i=0;i<t;++i){let t=i*3;n(i,this.getElevation(e[t],e[t+1],e[t+2],r))}}intersect(e,t,n,r){this._usingTerrain&&this._terrainSurface.intersect(e,t,n,r),this._integratedMeshGroundLayerViews.forEach(i=>i.intersect(e,t,n,r))}getSphereElevationRange(e,t,n){let r=this._usingTerrain?this._terrainSurface?.getSphereElevationRange?.(e,t):null;return this._integratedMeshGroundLayerViews.reduce((n,r)=>{let i=r.elevationProvider.getSphereElevationRange?.(e,t);return i==null||(n??=new f,n.expandElevationRange(i)),n},r?new f(r.minElevation,r.maxElevation):null)}getRootElevationRange(){let e=this._usingTerrain?this._terrainSurface?.getRootElevationRange?.():null;return this._integratedMeshGroundLayerViews.reduce((e,t)=>{let n=t.elevationProvider.getRootElevationRange?.();return n==null||(e??=new f,e.expandElevationRange(n)),e},e?new f(e.minElevation,e.maxElevation):null)}get elevationQueryCache(){let e=this.view?.basemapTerrain;return e?.enabled?e.elevationQueryCache:null}get elevationQueryReady(){for(let e of this.ground?.allLayers??[])if(e.type===`integrated-mesh-3dtiles`&&e.replacesTerrain&&e.loadStatus!==`failed`&&e.queryElevationCallback==null)return!1;return!0}get groundExtent(){let{fullGroundExtent:e}=this;return e?this.userClippingExtent?l(e,this.userClippingExtent,s()):this.fullGroundExtent:null}get fullGroundExtent(){let e=this._usingTerrain?this._terrainSurface.fullGroundExtent:null;if(this._integratedMeshGroundLayerViews.length===0)return e;let t=this.view.spatialReference;if(!t.isWebMercator&&!t.isWGS84)return e;let n=b(t);return e?u(e,n,s()):n}get visibleElevationRange(){let e=this._usingTerrain?this._terrainSurface.visibleElevationRange:null,t=this._integratedMeshGroundLayerViews.reduce((e,t)=>e==null?new f(t.visibleElevationRange.minElevation,t.visibleElevationRange.maxElevation):(e.expandElevationRange(t.visibleElevationRange),e),e?new f(e.minElevation,e.maxElevation):null);return t&&!t.isEmpty?t:y}get opaque(){return this._usingTerrain&&this._terrainSurface.opaque||this._integratedMeshGroundLayerViews.some(({opaque:e})=>e)}get invisible(){return(!this._usingTerrain||this._terrainSurface.invisible)&&this._integratedMeshGroundLayerViews.every(({invisible:e})=>e)}get baseOpacity(){return this.ground?.opacity??1}get wireframe(){return this._usingTerrain?this._terrainSurface?.wireframe??!1:!1}get freeze(){return this._usingTerrain&&(this._terrainSurface?.freeze??!1)||this._integratedMeshGroundLayerViews.some(e=>e.type===`integrated-mesh-3dtiles`&&e.freeze)}set freeze(e){this._usingTerrain&&(this._terrainSurface.freeze=e),this._integratedMeshGroundLayerViews.forEach(t=>{t.type===`integrated-mesh-3dtiles`&&(t.freeze=e)})}get suspended(){return(!this._usingTerrain||super.suspended)&&this._integratedMeshGroundLayerViews.length>0&&this._integratedMeshGroundLayerViews.every(({suspended:e})=>e)}get ready(){return!this._usingTerrain&&this._integratedMeshGroundLayerViews.length===0?!1:(!this._usingTerrain||this._terrainSurface.ready)&&this._integratedMeshGroundLayerViews.every(({ready:e})=>e)}updateOverlayParameters(){this._terrainSurface?.updateOverlayParameters()}requestRender(e){this.view.stage.renderView?.requestRender(e)}};e([a()],v.prototype,`memoizedElevationQueryDependencies`,null),e([a({readOnly:!0})],v.prototype,`_integratedMeshGroundLayerViews`,null),e([a({readOnly:!0})],v.prototype,`_terrainSurface`,null),e([a({readOnly:!0})],v.prototype,`_usingTerrain`,null),e([a({readOnly:!0})],v.prototype,`spatialReference`,null),e([a({readOnly:!0})],v.prototype,`userClippingExtent`,null),e([a({readOnly:!0})],v.prototype,`elevationQueryCache`,null),e([a()],v.prototype,`elevationQueryReady`,null),e([a({readOnly:!0})],v.prototype,`groundExtent`,null),e([a({readOnly:!0})],v.prototype,`fullGroundExtent`,null),e([a({readOnly:!0})],v.prototype,`visibleElevationRange`,null),e([a({readOnly:!0})],v.prototype,`opaque`,null),e([a({readOnly:!0})],v.prototype,`invisible`,null),e([a({readOnly:!0})],v.prototype,`baseOpacity`,null),e([a({readOnly:!0})],v.prototype,`wireframe`,null),e([a()],v.prototype,`freeze`,null),e([a({readOnly:!0})],v.prototype,`suspended`,null),e([a({readOnly:!0})],v.prototype,`ready`,null),v=e([o(`esri.views.3d.GroundView3D`)],v);const y=new f(0,0);function b(e){return e.isWebMercator?m:h}export{v as GroundView3D};
|