@arcgis/core 5.2.0-next.120 → 5.2.0-next.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arcade/containerUtils.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/arcgisGlobal.d.ts +7 -0
- package/assets/components/assets/icon/addCellAbove16.json +1 -0
- package/assets/components/assets/icon/addCellAbove24.json +1 -0
- package/assets/components/assets/icon/addCellAbove32.json +1 -0
- package/assets/components/assets/icon/addCellBelow16.json +1 -0
- package/assets/components/assets/icon/addCellBelow24.json +1 -0
- package/assets/components/assets/icon/addCellBelow32.json +1 -0
- package/assets/components/assets/icon/linkedChart16.json +1 -0
- package/assets/components/assets/icon/linkedChart24.json +1 -0
- package/assets/components/assets/icon/linkedChart32.json +1 -0
- package/assets/components/assets/icon/polygonFromFeature16.json +1 -0
- package/assets/components/assets/icon/polygonFromFeature24.json +1 -0
- package/assets/components/assets/icon/polygonFromFeature32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/015cb790262a59857c5f.js +1 -0
- package/assets/esri/core/workers/chunks/025da54eef112d7e8f66.js +1 -0
- package/assets/esri/core/workers/chunks/033debcbf6b3683dc4fe.js +2 -0
- package/assets/esri/core/workers/chunks/064445e6f9512817ac87.js +2 -0
- package/assets/esri/core/workers/chunks/{304462b049116f59accc.js → 09676cfa99b90fe0cc63.js} +1 -1
- package/assets/esri/core/workers/chunks/0aadee0437fa061e4ff5.js +1 -0
- package/assets/esri/core/workers/chunks/{b0058619e0363002ad86.js → 0e9f54d7f158195bd203.js} +1 -1
- package/assets/esri/core/workers/chunks/1086f190f94c715bbfe4.js +1 -0
- package/assets/esri/core/workers/chunks/1846296be959e28c42bb.js +1 -0
- package/assets/esri/core/workers/chunks/{ea9e770efc85594e4dd2.js → 216d8cb86548e92a8196.js} +1 -1
- package/assets/esri/core/workers/chunks/{d629708bf23da24ee523.js → 298f234f11a10c5120a2.js} +1 -1
- package/assets/esri/core/workers/chunks/29ae19206bbeb480be0f.js +1 -0
- package/assets/esri/core/workers/chunks/{dc1944a7601b518a9c48.js → 2ca49fb4590cc34a02bd.js} +1 -1
- package/assets/esri/core/workers/chunks/{f890359d972cce54459e.js → 2f829321bfbd3bacd64f.js} +1 -1
- package/assets/esri/core/workers/chunks/{7232fc11b23777b6be94.js → 369012c032ea6882607c.js} +1 -1
- package/assets/esri/core/workers/chunks/39c5e0f6262f69a62c66.js +1 -0
- package/assets/esri/core/workers/chunks/{9f760dc4492a03e0504c.js → 45d87af48a21644590c2.js} +1 -1
- package/assets/esri/core/workers/chunks/463d69f596d1d34ef275.js +2 -0
- package/assets/esri/core/workers/chunks/49affbed22e201f7c32b.js +1 -0
- package/assets/esri/core/workers/chunks/4adad3312caa24af98ac.js +1 -0
- package/assets/esri/core/workers/chunks/{8f0ecf4d06ec7b67d4ed.js → 52744dfd430cd0c0edfb.js} +1 -1
- package/assets/esri/core/workers/chunks/58a17fb3c0dd07c63d57.js +2 -0
- package/assets/esri/core/workers/chunks/5993db944b9e7825e0bc.js +1 -0
- package/assets/esri/core/workers/chunks/{090c9c2dbf92f2cac0b8.js → 770ca70d363184e39d60.js} +1 -1
- package/assets/esri/core/workers/chunks/83c7c4218bc6ba2f16ee.js +1 -0
- package/assets/esri/core/workers/chunks/{cfd8317ecd2e63af7c40.js → 8a103b6e9534516421e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{49e8ff5ed079a9e3be4b.js → 91a51d959ee5c6123c46.js} +1 -1
- package/assets/esri/core/workers/chunks/92f35b2c3c5f13778308.js +1 -0
- package/assets/esri/core/workers/chunks/97cd4145c016cf379120.js +1 -0
- package/assets/esri/core/workers/chunks/99ebc99e8d1bca105b5e.js +1 -0
- package/assets/esri/core/workers/chunks/{e18b8646c7378213b618.js → 9b3813e39992b1b99941.js} +1 -1
- package/assets/esri/core/workers/chunks/{32fc7d1db4b311f6b880.js → 9e5b30b907102bc0c201.js} +1 -1
- package/assets/esri/core/workers/chunks/a005efcde3ca9def4e6b.js +1 -0
- package/assets/esri/core/workers/chunks/a3c1a5a5c5cbf27b376d.js +1 -0
- package/assets/esri/core/workers/chunks/a70c59129ea808857d07.js +1 -0
- package/assets/esri/core/workers/chunks/b5b30c8447a0f967fa79.js +1 -0
- package/assets/esri/core/workers/chunks/bb5ed2a796a45c41b0b4.js +1 -0
- package/assets/esri/core/workers/chunks/bcb06a0643b4c83535ee.js +1 -0
- package/assets/esri/core/workers/chunks/{066b7f6866d602f963e0.js → c3008b20cb5fd38bd900.js} +1 -1
- package/assets/esri/core/workers/chunks/{22e85819e23202a8ba90.js → c39ebd8d469f1e8bb61e.js} +1 -1
- package/assets/esri/core/workers/chunks/{7f2ac03efaa4a4898ba2.js → c3b96d1d43afccd23e45.js} +2 -2
- package/assets/esri/core/workers/chunks/{cb983f65995e57fff7a1.js → c44cbe04efddbbbaec13.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ce14dd209462f88b163.js → c70a32ac0fa49f4493ca.js} +1 -1
- package/assets/esri/core/workers/chunks/ce08e3369641da0d7a27.js +2 -0
- package/assets/esri/core/workers/chunks/d1b5be1aeab16d36d4b1.js +1 -0
- package/assets/esri/core/workers/chunks/{da6583e8d88441a1c02a.js → d38252956c3d9e2168f7.js} +1 -1
- package/assets/esri/core/workers/chunks/{1742dbc6a827cfda471b.js → d3d48401462ef3bf0ad9.js} +1 -1
- package/assets/esri/core/workers/chunks/d9b761104ab6e4acaf91.js +1 -0
- package/assets/esri/core/workers/chunks/{723478607badcde5706b.js → d9d5f50af047ee7af129.js} +87 -86
- package/assets/esri/core/workers/chunks/{354912041363502c6a89.js → da161f8cbe1cfc5fcf7c.js} +1 -1
- package/assets/esri/core/workers/chunks/{862e1acd80c4e43831dc.js → dc923e50958b68a50014.js} +1 -1
- package/assets/esri/core/workers/chunks/e86f83a6514a35255f64.js +1 -0
- package/assets/esri/core/workers/chunks/ea49721fdd2172d1c799.js +1 -0
- package/assets/esri/core/workers/chunks/{98a5327fd96d9542b39f.js → f90cad9f007a11154c0d.js} +1 -1
- package/assets/esri/core/workers/chunks/{f18ee2eaa96d103627a6.js → fa3f824c874f29d24953.js} +1 -1
- package/assets/esri/core/workers/chunks/fbb390c0d92d1536fce3.js +1 -0
- package/assets/esri/core/workers/chunks/fbc5f275c4e5e6bfffaa.js +1 -0
- package/assets/esri/core/workers/chunks/{6ab7bb3834841834f839.js → fd5e61cb6f936eadcfe3.js} +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/basemaps/BasemapCollection.d.ts +148 -0
- package/basemaps/BasemapCollection.js +2 -0
- package/basemaps/BasemapsSource.d.ts +39 -0
- package/basemaps/BasemapsSource.js +2 -0
- package/basemaps/LocalBasemapsSource.d.ts +55 -0
- package/basemaps/LocalBasemapsSource.js +2 -0
- package/basemaps/PortalBasemapsSource.d.ts +98 -0
- package/basemaps/PortalBasemapsSource.js +2 -0
- package/basemaps/support/BasemapItem.d.ts +74 -0
- package/basemaps/support/BasemapItem.js +2 -0
- package/basemaps/support/basemapCompatibilityUtils.js +2 -0
- package/basemaps/types.d.ts +42 -0
- package/chunks/CheckerBoard.glsl.js +1 -1
- package/chunks/ColorMaterial.glsl.js +1 -1
- package/chunks/Component.glsl.js +11 -11
- package/chunks/DeepSky.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +4 -4
- package/chunks/EdgeShader.glsl.js +1 -1
- package/chunks/FocusArea.glsl.js +1 -1
- package/chunks/GaussianSplat.glsl.js +9 -9
- package/chunks/HUDMaterial.glsl.js +1 -1
- package/chunks/ImageMaterial.glsl.js +1 -1
- package/chunks/LineCallout.glsl.js +1 -1
- package/chunks/LineMarker.glsl.js +97 -89
- package/chunks/NativeLine.glsl.js +1 -1
- package/chunks/Path.glsl.js +8 -7
- package/chunks/Pattern.glsl.js +1 -1
- package/chunks/PointRenderer.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +4 -4
- package/chunks/RibbonLine.glsl.js +58 -56
- package/chunks/ShadowCastAccumulate.glsl.js +3 -3
- package/chunks/ShadowHighlight.glsl.js +4 -4
- package/chunks/ShadowHighlightBuffer.glsl.js +3 -3
- package/chunks/Terrain.glsl.js +12 -14
- package/chunks/Viewshed.glsl.js +1 -1
- package/chunks/Water.glsl.js +3 -3
- package/chunks/languageUtils.js +1 -1
- package/config.js +1 -1
- package/core/Accessor.d.ts +10 -0
- package/kernel.js +1 -1
- package/layers/CSVLayer.js +1 -1
- package/layers/GeoJSONLayer.d.ts +1 -1
- package/layers/GeoJSONLayer.js +1 -1
- package/layers/OGCFeatureLayer.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/support/LabelClass.d.ts +13 -4
- package/layers/support/LabelClass.js +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/legend/ActiveLayerInfo.d.ts +130 -0
- package/legend/ActiveLayerInfo.js +2 -0
- package/legend/LegendContent.d.ts +118 -0
- package/legend/LegendContent.js +2 -0
- package/legend/support/clusterUtils.js +2 -0
- package/legend/support/colorRampUtils.js +2 -0
- package/legend/support/heatmapRampUtils.js +2 -0
- package/legend/support/relationshipRampUtils.js +2 -0
- package/legend/support/sizeRampUtils.js +2 -0
- package/legend/support/utils.js +2 -0
- package/legend/types.d.ts +403 -0
- package/libs/i3s/I3SModule.js +1 -1
- package/package.json +5 -5
- package/support/revision.js +1 -1
- package/support/userTypeGuards/isBasemapsSource.js +2 -0
- package/symbols/cim/CIMOperators.js +1 -1
- package/symbols/cim/callouts/effects/BackgroundCallout.js +2 -0
- package/symbols/cim/callouts/effects/BalloonCallout.js +2 -0
- package/symbols/cim/callouts/effects/PointSymbolCallout.js +2 -0
- package/symbols/cim/callouts/effects/SimpleLineCallout.js +2 -0
- package/symbols/cim/callouts/effects/calloutUtils.js +2 -0
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/symbols/support/typeUtils.js +1 -1
- package/views/2d/LabelManager.js +1 -1
- package/views/2d/engine/AFeatureContainer.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
- package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/engine/webgl/TileCpuState.js +1 -1
- package/views/2d/engine/webgl/TileGpuState.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelStore.js +2 -0
- package/views/2d/engine/webgl/cpuMapped/CpuBuffer.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/CpuMeshData.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/GpuMeshState.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/CalloutMeshWriterCoordinator.js +2 -0
- package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +2 -0
- package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueInstance.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TestDisplayObject.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/CalloutMeshWriterPolicy.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterReferences.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/dataViewUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.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/shaders/constants.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
- package/views/2d/engine/webgl/util/DimensionMatcher.js +1 -1
- package/views/2d/engine/webgl/util/IntervalMatcher.js +1 -1
- package/views/2d/engine/webgl/util/LabelMatcher.js +1 -1
- package/views/2d/engine/webgl/util/MapMatcher.js +1 -1
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/engine/webgl/util/MatcherContext.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/support/GraphicsReader.js +1 -1
- package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +1 -1
- package/views/2d/layers/support/annodime/PrivateMatcherGeometryOverrideEffect.js +1 -1
- package/views/2d/layers/support/annodime/annotationGraphic.js +1 -1
- package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
- package/views/2d/layers/support/annodime/debugUtils.js +1 -1
- package/views/2d/layers/support/annodime/virtualFields.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +2 -0
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/support/MemoryController.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +1 -3
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/forwardLinearDepthToReadShadow.glsl.js +4 -0
- package/views/3d/webgl-engine/core/shaderLibrary/{ForwardLinearDepthToWriteShadowMap.glsl.js → forwardLinearDepthToWriteShadow.glsl.js} +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +3 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/readFragmentShadow.glsl.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js +24 -0
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusArea.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/LineMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/{AnimatedLine.glsl.js → animatedAlpha.glsl.js} +11 -17
- package/views/ToolViewManager.js +1 -1
- package/views/VideoView.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.d.ts +3 -0
- package/widgets/BasemapGallery/support/BasemapGalleryItem.d.ts +3 -0
- package/widgets/BasemapGallery/support/LocalBasemapsSource.d.ts +2 -0
- package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +2 -0
- package/widgets/BasemapGallery/types.d.ts +6 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +2 -0
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/legacy/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor.d.ts +2 -1
- package/widgets/Editor.js +1 -1
- package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.d.ts +1 -0
- package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
- package/widgets/HistogramRangeSlider.js +1 -1
- package/widgets/Legend/LegendViewModel.d.ts +1 -0
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/styles/card/CardView.d.ts +1 -0
- package/widgets/Legend/styles/card/CardView.js +1 -1
- package/widgets/Legend/styles/classic/ClassicView.d.ts +1 -0
- package/widgets/Legend/styles/classic/ClassicView.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.d.ts +2 -0
- package/widgets/Legend.js +1 -1
- package/assets/esri/core/workers/chunks/03918a862455191a8910.js +0 -1
- package/assets/esri/core/workers/chunks/1630913399384030d0b9.js +0 -1
- package/assets/esri/core/workers/chunks/1a39335aa2dce6d564d9.js +0 -1
- package/assets/esri/core/workers/chunks/25bb07d3c32b16a08813.js +0 -1
- package/assets/esri/core/workers/chunks/25cc6d7178a52f2f46b7.js +0 -1
- package/assets/esri/core/workers/chunks/2e999b05ce179dd9fa08.js +0 -1
- package/assets/esri/core/workers/chunks/36792b8a85e88044cb49.js +0 -1
- package/assets/esri/core/workers/chunks/3acc1299c1382c3b034d.js +0 -1
- package/assets/esri/core/workers/chunks/430802108b63194b7ddd.js +0 -2
- package/assets/esri/core/workers/chunks/4396ef5ab3eb9e9a7df2.js +0 -1
- package/assets/esri/core/workers/chunks/4efe5827a5c61db3b19d.js +0 -2
- package/assets/esri/core/workers/chunks/5938d5f6e37f49867d5a.js +0 -1
- package/assets/esri/core/workers/chunks/70347d25968975126fa7.js +0 -1
- package/assets/esri/core/workers/chunks/8628c027198982baed7c.js +0 -1
- package/assets/esri/core/workers/chunks/8c521caf050a486b6548.js +0 -1
- package/assets/esri/core/workers/chunks/a6d4132a16c51323a38a.js +0 -1
- package/assets/esri/core/workers/chunks/add834f867900a7091d2.js +0 -1
- package/assets/esri/core/workers/chunks/b56c5883a5468b18b122.js +0 -1
- package/assets/esri/core/workers/chunks/b5a102cf9f4377fb9842.js +0 -1
- package/assets/esri/core/workers/chunks/b6409d89914030d5854a.js +0 -1
- package/assets/esri/core/workers/chunks/c118b88a7c4359e68d9b.js +0 -1
- package/assets/esri/core/workers/chunks/c5e288d57bacb8451e2d.js +0 -2
- package/assets/esri/core/workers/chunks/ce3fb992f6c6ae7378a3.js +0 -1
- package/assets/esri/core/workers/chunks/ceda1e08c9ff26248db0.js +0 -1
- package/assets/esri/core/workers/chunks/d5e3f8e5b8d2576d3cb3.js +0 -2
- package/assets/esri/core/workers/chunks/ddb5d29a8998d0a76fd4.js +0 -1
- package/assets/esri/core/workers/chunks/de8a3a0796bd115426c0.js +0 -1
- package/assets/esri/core/workers/chunks/e707534a700a2de687ca.js +0 -1
- package/assets/esri/core/workers/chunks/f465fb26541372fdc908.js +0 -2
- package/assets/esri/core/workers/chunks/f5423006fb07db7dd6ee.js +0 -1
- package/assets/esri/core/workers/chunks/fdad31bbe8aee68a6eaf.js +0 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToReadShadowMap.glsl.js +0 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +0 -18
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js +0 -4
- /package/assets/esri/core/workers/chunks/{430802108b63194b7ddd.js.LICENSE.txt → 033debcbf6b3683dc4fe.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{4efe5827a5c61db3b19d.js.LICENSE.txt → 064445e6f9512817ac87.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{c5e288d57bacb8451e2d.js.LICENSE.txt → 463d69f596d1d34ef275.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{d5e3f8e5b8d2576d3cb3.js.LICENSE.txt → 58a17fb3c0dd07c63d57.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{7f2ac03efaa4a4898ba2.js.LICENSE.txt → c3b96d1d43afccd23e45.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{f465fb26541372fdc908.js.LICENSE.txt → ce08e3369641da0d7a27.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{defineMeshWriterReferences as a}from"./mesh/MeshWriterReferences.js";import{noVisualVariables as e}from"../../../../layers/features/schema/processor/VisualVariablesSchema.js";import{getScaleInfo as s,createComplexSimpleOutlineFillMeshInfos as i,createGradientStrokeMeshInfos as n,createGradientFillMeshInfos as t,createComplexTextMeshInfos as r,createAnimatedPolyMeshInfos as o,createComplexTexturedLineMeshInfos as l,createComplexSimpleLineMeshInfos as c,createComplexSimpleFillMeshInfos as m,createComplexFillMeshInfos as u,createAnimatedMarkerMeshInfos as p,createComplexMarkerMeshInfos as h}from"../../../../layers/features/schema/processor/symbols/ComplexSymbolSchema.js";async function f(f,k,b,d){const y=[],P={scaleInfo:s(f),scaleExpression:null,rotationVariable:null,viewRotation:null};for(const a of k)if(!d||!a.effects?.some(({effect:a})=>"CIMBackgroundCallout"===a.type))switch(a.type){case"marker":if(a.animationParams){if(a.animationParams.params.hasShiftAnimation){y.push(...p(b.instances.animatedMarkerShift,a,e,P));break}y.push(...p(b.instances.animatedMarker,a,e,P));break}y.push(...h(b.instances.marker,a,e,P));break;case"fill":if(a.animationParams){y.push(...o(b.instances.animatedPolygon,a,e,P));break}null==a.spriteRasterizationParam?y.push(...m(b.instances.fill,a,P)):y.push(...u(b.instances.complexFill,a,!1,P));break;case"line":if(a.animationParams){if(a.animationParams.params.hasShiftAnimation){y.push(...o(b.instances.animatedPolylineShift,a,e,P));break}y.push(...o(b.instances.animatedPolyline,a,e,P));break}a.spriteRasterizationParam?y.push(...l(b.instances.texturedLine,a,!1,P)):y.push(...c(b.instances.line,a,!1,P));break;case"text":y.push(...r(b.instances.text,d&&a.useBackgroundCallout?{...a,useBackgroundCallout:!1}:a,e,P));break;case"gradientFill":y.push(...t(b.instances.gradientFill,a,P));break;case"gradientStroke":y.push(...n(b.instances.gradientStroke,a,P));break;case"outlineFill":y.push(...i(b.instances.outlineFill,a,P))}return a(y)}export{f as createGraphicSymbolMeshSchemas};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as e}from"tslib";import{tileSize as o}from"../../../definitions.js";import{location as s,uniform as i,texture as r,define as d,input as l,UniformGroup as n,TextureGroup as a,FragmentOutput as p}from"../../GraphShaderModule.js";import{Float as h,FixedArray as c,Vec4 as u,Sampler2D as m,Mat3 as y,Vec3 as v,texture2D as g,Mat4 as x,step as w,dot as f,max as T}from"../../graph/glsl.js";import{FeatureFragmentInput as A,FeatureVertexInput as D,AFeatureShader as b}from"../shaders/AFeatureShader.js";import{noHit as C}from"../shaders/constants.js";import{max4 as j}from"../shaders/utils.js";class V extends D{}t([s(3,h)],V.prototype,"inverseArea",void 0);class F extends A{}class O extends n{}t([i(c.ofType(u,2))],O.prototype,"isActive",void 0),t([i(c.ofType(u,8))],O.prototype,"colors",void 0),t([i(h)],O.prototype,"dotValue",void 0);class S extends n{}t([i(h)],S.prototype,"tileZoomFactor",void 0),t([i(h)],S.prototype,"pixelRatio",void 0),t([i(h)],S.prototype,"tileDotsOverArea",void 0);class _ extends a{}t([r(m)],_.prototype,"dotTexture0",void 0),t([r(m)],_.prototype,"dotTexture1",void 0);class P extends b{constructor(){super(...arguments),this.type="DotDensityPolygonShader"}_dotThreshold(t,e,o){return t.divide(e).divide(o)}vertex(t){const e=new y(2/o,0,0,0,-2/o,0,-1,1,1).multiply(new v(t.pos,1)),s=this.clip(t.id),i=new u(e.xy,s,1),r=this.getVVData(t.id).multiply(this.instance.isActive.get(0)).multiply(t.inverseArea),d=this.storageTextures.getDataDrivenData0(this.getAttributeDataCoords(t.id)).multiply(this.instance.isActive.get(1)).multiply(t.inverseArea),l=this.draw.tileZoomFactor.multiply(o).divide(this.draw.pixelRatio),n=this._dotThreshold(r,this.instance.dotValue,this.draw.tileDotsOverArea),a=this._dotThreshold(d,this.instance.dotValue,this.draw.tileDotsOverArea),p=t.pos.add(.5).divide(l);return{glPosition:i,color:new u(0,0,0,0),textureCoords:p,thresholds0:n,thresholds1:a}}fragment(t){const e=new p,o=g(this.drawTextures.dotTexture0,t.textureCoords),s=g(this.drawTextures.dotTexture1,t.textureCoords),i=t.thresholds0.subtract(o),r=t.thresholds1.subtract(s);let d;const l=x.fromColumns(this.instance.colors.get(0),this.instance.colors.get(1),this.instance.colors.get(2),this.instance.colors.get(3)),n=x.fromColumns(this.instance.colors.get(4),this.instance.colors.get(5),this.instance.colors.get(6),this.instance.colors.get(7));if(this.blending){const t=w(new h(0),i),e=w(new h(0),r),o=f(t,i).add(f(e,r)),s=w(o,new h(0)),a=new h(1).subtract(s),p=o.add(s),c=i.multiply(t).divide(p),u=r.multiply(e).divide(p),m=l.multiply(c).add(n.multiply(u));d=a.multiply(m)}else{const t=T(j(i),j(r)),e=w(t,new h(0)),o=new h(1).subtract(e),s=w(t,i),a=w(t,r),p=l.multiply(s).add(n.multiply(a));d=o.multiply(p)}return e.fragColor=d,e}hittest(t){return new h(C)}}t([d],P.prototype,"blending",void 0),t([i(O)],P.prototype,"instance",void 0),t([i(S)],P.prototype,"draw",void 0),t([r(_)],P.prototype,"drawTextures",void 0),t([e(0,l(V))],P.prototype,"vertex",null),t([e(0,l(A))],P.prototype,"fragment",null);export{_ as DotDensityPolygonDrawTextures,S as DotDensityPolygonDrawUniforms,F as DotDensityPolygonFragmentInput,O as DotDensityPolygonInstanceUniforms,P as DotDensityPolygonShader,V as DotDensityPolygonVertexInput};
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{tileSize as o}from"../../../definitions.js";import{location as s,uniform as i,texture as r,define as d,input as l,UniformGroup as n,TextureGroup as a,FragmentOutput as p}from"../../GraphShaderModule.js";import{Float as h,FixedArray as c,Vec4 as u,Sampler2D as m,Mat3 as y,Vec3 as v,texture2D as g,Mat4 as x,step as w,dot as f,max as T}from"../../graph/glsl.js";import{FeatureFragmentInput as A,FeatureVertexInput as D,AFeatureShader as b}from"../shaders/AFeatureShader.js";import{noHit as C}from"../shaders/constants.js";import{max4 as j}from"../shaders/utils.js";class V extends D{}t([s(3,h)],V.prototype,"inverseArea",void 0);class F extends A{}class O extends n{}t([i(c.ofType(u,2))],O.prototype,"isActive",void 0),t([i(c.ofType(u,8))],O.prototype,"colors",void 0),t([i(h)],O.prototype,"dotValue",void 0);class S extends n{}t([i(h)],S.prototype,"tileZoomFactor",void 0),t([i(h)],S.prototype,"pixelRatio",void 0),t([i(h)],S.prototype,"tileDotsOverArea",void 0);class _ extends a{}t([r(m)],_.prototype,"dotTexture0",void 0),t([r(m)],_.prototype,"dotTexture1",void 0);class P extends b{constructor(){super(...arguments),this.type="DotDensityPolygonShader"}_dotThreshold(t,e,o){return t.divide(e).divide(o)}vertex(t){const e=new y(2/o,0,0,0,-2/o,0,-1,1,1).multiply(new v(t.pos,1)),s=this.clip(t.id,t.bitset),i=new u(e.xy,s,1),r=this.getVVData(t.id).multiply(this.instance.isActive.get(0)).multiply(t.inverseArea),d=this.storageTextures.getDataDrivenData0(this.getAttributeDataCoords(t.id)).multiply(this.instance.isActive.get(1)).multiply(t.inverseArea),l=this.draw.tileZoomFactor.multiply(o).divide(this.draw.pixelRatio),n=this._dotThreshold(r,this.instance.dotValue,this.draw.tileDotsOverArea),a=this._dotThreshold(d,this.instance.dotValue,this.draw.tileDotsOverArea),p=t.pos.add(.5).divide(l);return{glPosition:i,color:new u(0,0,0,0),textureCoords:p,thresholds0:n,thresholds1:a}}fragment(t){const e=new p,o=g(this.drawTextures.dotTexture0,t.textureCoords),s=g(this.drawTextures.dotTexture1,t.textureCoords),i=t.thresholds0.subtract(o),r=t.thresholds1.subtract(s);let d;const l=x.fromColumns(this.instance.colors.get(0),this.instance.colors.get(1),this.instance.colors.get(2),this.instance.colors.get(3)),n=x.fromColumns(this.instance.colors.get(4),this.instance.colors.get(5),this.instance.colors.get(6),this.instance.colors.get(7));if(this.blending){const t=w(new h(0),i),e=w(new h(0),r),o=f(t,i).add(f(e,r)),s=w(o,new h(0)),a=new h(1).subtract(s),p=o.add(s),c=i.multiply(t).divide(p),u=r.multiply(e).divide(p),m=l.multiply(c).add(n.multiply(u));d=a.multiply(m)}else{const t=T(j(i),j(r)),e=w(t,new h(0)),o=new h(1).subtract(e),s=w(t,i),a=w(t,r),p=l.multiply(s).add(n.multiply(a));d=o.multiply(p)}return e.fragColor=d,e}hittest(t){return new h(C)}}t([d],P.prototype,"blending",void 0),t([i(O)],P.prototype,"instance",void 0),t([i(S)],P.prototype,"draw",void 0),t([r(_)],P.prototype,"drawTextures",void 0),t([e(0,l(V))],P.prototype,"vertex",null),t([e(0,l(A))],P.prototype,"fragment",null);export{_ as DotDensityPolygonDrawTextures,S as DotDensityPolygonDrawUniforms,F as DotDensityPolygonFragmentInput,O as DotDensityPolygonInstanceUniforms,P as DotDensityPolygonShader,V as DotDensityPolygonVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{maxRepresentableInt as t,hittestMaskTextureUnit as e,tileSize as n}from"../../definitions.js";const i={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},s={color:{write:[!0,!0,!0,!0],blendParameters:{srcRGB:1,dstRGB:1,srcAlpha:1,dstAlpha:1},blendEquation:32776,blendMode:"custom"},depth:!1,stencil:!1},o={...i,color:{write:[!0,!0,!0,!0],blendMode:"delete"}};function
|
|
2
|
+
import{maxRepresentableInt as t,hittestMaskTextureUnit as e,tileSize as n}from"../../definitions.js";const i={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},s={color:{write:[!0,!0,!0,!0],blendParameters:{srcRGB:1,dstRGB:1,srcAlpha:1,dstAlpha:1},blendEquation:32776,blendMode:"custom"},depth:!1,stencil:!1},o={...i,stencil:{write:!1,test:{compare:516,mask:255,op:{fail:7680,zFail:7680,zPass:7680}}}},r={...i,color:{write:[!0,!0,!0,!0],blendMode:"delete"}};function l(t){return"highlight"===t.passOptions?.type}function a(t){return"hittest"===t.passOptions?.type}function c(t){if(!a(t))return null;const{target:e,distance:n,smallSymbolDistance:i,smallSymbolSizeThreshold:s,hittestType:o}=t.passOptions,r=[e[0],e[1]],l=4===e.length?e:[-1,-1,-1,-1],c="point"===o?0:"rect"===o?1:2;return{position:r,distance:n,smallSymbolDistance:i,smallSymbolSizeThreshold:s,viewSize:t.state.size,rect:l,hittestType:c}}function u(t){if(!l(t))return null;const{activeGroups:e,highlightAll:n}=t.passOptions;return{activeGroups:e,highlightAll:n?1:0}}function p(t,e,n){const i={};for(const s in n)"function"!=typeof n[s]?i[s]=n[s]:i[s]=n[s](t,e);return i}function h(t){return{storage:t.attributeView.getUniforms(),hittestRequest:c(t),highlight:u(t)}}function f(t){if(!a(t)||"polygon"!==t.passOptions.hittestType)return null;const n=t.painter.effects.hittest.getHittestMaskTexture();return n?{texture:n,unit:e}:null}function d(t){return t.attributeView.getTextures(t.context)}function m(t){return{storageTextures:d(t),...t.labelStore.getTexture(t.context),hittestMaskTexture:f(t)}}function g(t){return{inside:2===t.selection,outside:3===t.selection}}function y(t){return a(t)?s:2===t.drawPhase?o:l(t)&&"clear"===t.passOptions.stepType?r:i}function b(e){const{row:i,col:s}=e.key,o=s*n,r=i*n;return{tileOffsetFromLocalOrigin:[o%t,r%t],maxIntsToLocalOrigin:[Math.floor(o/t),Math.floor(r/t)]}}export{f as getFeatureHittestTexture,y as getFeaturePipelineState,d as getFeatureStorageTextures,m as getFeatureTextures,h as getFeatureUniforms,b as getLocalTileOffset,g as getSelectionDefines,l as isHighlight,a as isHittest,p as resolveDynamicUniforms};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{loadLibtessF32 as e}from"../../../../../../../geometry/libtess.js";import{clipMarshall as t,triangulateSyncUnsafe as
|
|
2
|
+
import{loadLibtessF32 as e}from"../../../../../../../geometry/libtess.js";import{clipMarshall as t,triangulateSyncUnsafe as s}from"../../../mesh/templates/templateUtils.js";import{MeshWriter as r}from"../mesh/MeshWriter.js";class i extends r{async loadDependencies(){await Promise.all([super.loadDependencies(),e()])}_write(e,{target:t,effectGeometry:s}){const r=s?.asOptimized()??t.readGeometryForDisplay(),i=this._clip(r);i&&e.withRecord(this.instanceId,this.attributeLayout,void 0,()=>{this._writeGeometry(e,t,i)})}_clip(e){if(!e)return null;const s=this.hasEffects;return t(e,s?256:8)}_writeGeometry(e,t,r){r=r.justXY();const i=s(r);if(!i||!i.vertices.length)return;const o=this.createTesselationParams(t);this._writeVertices(e,t,i,o)}_writeVertices(e,t,s,r){const i=t.getDisplayId(),o=e.vertexCount(),n=this.hasEffects,{vertices:c,indices:a}=s;let l=0;if(a)for(const d of a){const t=c[2*d],s=c[2*d+1];n&&e.recordBounds(t,s,0,0),this._writeVertex(e,i,t,s,r),l++}else for(let d=0;d<c.length;d+=2){const t=Math.round(c[d]),s=Math.round(c[d+1]);n&&e.recordBounds(t,s,0,0),this._writeVertex(e,i,t,s,r),l++}e.indexEnsureSize(l);for(let d=0;d<l;d++)e.indexWrite(d+o)}}export{i as AFillMeshWriter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{pt2px as e}from"../../../../../../../core/screenUtils.js";import{complexFillVertexSpec as t,getPatternSize as s,packComplexFillBitset as r}from"./ComplexFillMeshWriter.js";import{packBitset as i}from"./meshWriterUtils.js";import{OutlineFillMeshWriter as a,OutlineFillOutlineMeshWriter as o,outlineFillVertexSpec_Outline as u}from"./OutlineFillMeshWriter.js";import{packPrecision as n,signedToUnsignedByte as c,bitsetTypeFillOutline as p}from"../shaders/constants.js";import{DataType as l}from"../../../../../../webgl/enums.js";const
|
|
2
|
+
import{pt2px as e}from"../../../../../../../core/screenUtils.js";import{complexFillVertexSpec as t,getPatternSize as s,packComplexFillBitset as r}from"./ComplexFillMeshWriter.js";import{packBitset as i}from"./meshWriterUtils.js";import{OutlineFillMeshWriter as a,OutlineFillOutlineMeshWriter as o,outlineFillVertexSpec_Outline as u}from"./OutlineFillMeshWriter.js";import{packPrecision as n,signedToUnsignedByte as c,bitsetTypeFillOutline as p}from"../shaders/constants.js";import{DataType as l}from"../../../../../../webgl/enums.js";const h=t,m=u,d={createComputedParams:e=>e,optionalAttributes:h.optionalAttributes,attributes:{...h.attributes,bitset:{type:l.UNSIGNED_BYTE,count:1,pack:e=>r(e)},aux1:{count:1,type:l.HALF_FLOAT,pack:e=>s(e).width},aux2:{count:1,type:l.HALF_FLOAT,pack:e=>s(e).height},aux3:{count:2,type:l.HALF_FLOAT,pack:({offsetX:t,offsetY:s})=>[e(t),e(s)]},aux4:{count:2,type:l.UNSIGNED_BYTE,pack:({scaleX:e,scaleY:t})=>[e*n,t*n]}}},x={createComputedParams:e=>e,optionalAttributes:h.optionalAttributes,attributes:{...h.attributes,color:m.attributes.color,bitset:{type:l.UNSIGNED_BYTE,count:1,pack:e=>i([[p,!0]])},aux1:{count:1,type:l.HALF_FLOAT,pack:t=>e(.5*t.width)},aux2:{count:1,type:l.HALF_FLOAT,pack:t=>e(.5*t.referenceWidth)},aux3:{count:2,type:l.HALF_FLOAT,packTessellation:({extrusionOffsetX:e,extrusionOffsetY:t})=>[e,t]},aux4:{count:2,type:l.UNSIGNED_BYTE,packTessellation:({normalX:e,normalY:t})=>[e*n+c,t*n+c]}}};class A extends o{constructor(){super(...arguments),this.vertexSpec=x}}class f extends a{constructor(){super(...arguments),this.vertexSpec=d}_createOutlineWriter(e,t,s,r){return new A(e,t,s,r)}write(e,t,s,r,i,a,o,u){this.ensurePacked(t,s,r);const n=this.evaluatedMeshParams.sprite?.textureBinding;e.withRecord(this.instanceId,this.attributeLayout,n,()=>{this._write(e,{target:s,options:r,level:i,viewExtent:a,scaleFactor:o,matcher:u})})}ensurePacked(e,t,s){super.ensurePacked(e,t,s),this._lineMeshWriter.ensurePacked(e,t,s)}enqueueRequest(e,t,s){super.enqueueRequest(e,t,s),this._lineMeshWriter.enqueueRequest(e,t,s)}async loadDependencies(){await Promise.all([super.loadDependencies(),this._lineMeshWriter.loadDependencies()])}}export{f as ComplexOutlineFillMeshWriter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{clipMarshall as t}from"../../../mesh/templates/templateUtils.js";import{FillMeshWriter as i}from"./FillMeshWriter.js";import{processColorInput as r,packBitset as s}from"./meshWriterUtils.js";import{LineVertexSpec as o,LineMeshWriter as n}from"../line/LineMeshWriter.js";import{getLineClippingMargin as l}from"../mesh/utils.js";import{bitsetTypeFillOutline as a,bitsetOutlineUsesColorVV as
|
|
2
|
+
import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{clipMarshall as t}from"../../../mesh/templates/templateUtils.js";import{FillMeshWriter as i}from"./FillMeshWriter.js";import{processColorInput as r,packBitset as s}from"./meshWriterUtils.js";import{LineVertexSpec as o,LineMeshWriter as n}from"../line/LineMeshWriter.js";import{getLineClippingMargin as l}from"../mesh/utils.js";import{bitsetTypeFillOutline as a,bitsetOutlineUsesColorVV as c}from"../shaders/constants.js";import{DataType as u}from"../../../../../../webgl/enums.js";const h={createComputedParams:e=>e,optionalAttributes:o.optionalAttributes,attributes:{...o.attributes,bitset:{type:u.UNSIGNED_BYTE,count:1,pack:e=>0},color:{type:u.UNSIGNED_BYTE,count:4,normalized:!0,pack:({color:e})=>r(e)}}},m={createComputedParams:e=>e,optionalAttributes:o.optionalAttributes,attributes:{...o.attributes,bitset:{type:u.UNSIGNED_BYTE,count:1,pack:e=>s([[a,!0],[c,e.outlineUsesColorVV]])},color:{type:u.UNSIGNED_BYTE,count:4,normalized:!0,pack:({outlineColor:e})=>r(e)}}};class p extends n{constructor(){super(...arguments),this.vertexSpec=m}}class f extends i{constructor(e,t,i,r){super(e,t,i,r),this.vertexSpec=h,this._lineMeshWriter=this._createOutlineWriter(e,t,i,r)}_createOutlineWriter(e,t,i,r){return new p(e,t,i,r)}_write(e,t){const{target:i,options:r,scaleFactor:s,matcher:o}=t,n=this.evaluatedMeshParams.effects,l=this.evaluatedMeshParams.outlineEffects,a=e.id||"",c=this._createEffectExecutionContext(i,r,a,s,o);if(n?.length||l?.length){if(n?.length){const r=this.getEffectCursor(i,n,c,t);if(r){let t;for(;t=r?.next();)t.invertY(),this._writeFill(e,i,t)}}else this._writeFill(e,i);if(l?.length){const r=this.getEffectCursor(i,l,c,t);if(r){let t;for(;t=r?.next();)t.invertY(),this._writeOutline(e,i,t)}}else this._writeOutline(e,i)}else this._writeSimpleOutlineFill(e,i)}_writeSimpleOutlineFill(t,i){const r=i.readGeometryForDisplay(),s=this._clip(r);s&&(this._writeGeometry(t,i,s),this._lineMeshWriter.writeLineVertices(t,e.fromOptimizedCIM(s,"esriGeometryPolyline"),i))}_writeFill(e,t,i){const r=i?.asOptimized()??t.readGeometryForDisplay(),s=this._clip(r);s&&this._writeGeometry(e,t,s)}_writeOutline(t,i,r){if(r)return void this._lineMeshWriter.writeLineVertices(t,r,i);const s=i.readGeometryForDisplay(),o=this._clip(s);o&&this._lineMeshWriter.writeLineVertices(t,e.fromOptimizedCIM(o,"esriGeometryPolyline"),i)}_clip(e){return e?t(e,l(this.evaluatedMeshParams)):null}get effectInfos(){return[...this._evaluator.inputMeshParams.effects?.effectInfos??[],...this._evaluator.inputMeshParams.outlineEffects?.effectInfos??[]]}write(e,t,i,r,s,o,n,l){this.ensurePacked(t,i,r),e.withRecord(this.instanceId,this.attributeLayout,void 0,()=>{this._write(e,{target:i,options:r,level:s,viewExtent:o,scaleFactor:n,matcher:l})})}ensurePacked(e,t,i){super.ensurePacked(e,t,i),this._lineMeshWriter.ensurePacked(e,t,i)}enqueueRequest(e,t,i){super.enqueueRequest(e,t,i),this._lineMeshWriter.enqueueRequest(e,t,i)}async loadDependencies(){await Promise.all([super.loadDependencies(),this._lineMeshWriter.loadDependencies()])}get hasEffects(){return!!this.evaluatedMeshParams.outlineEffects}}export{f as OutlineFillMeshWriter,p as OutlineFillOutlineMeshWriter,h as outlineFillVertexSpec_Fill,m as outlineFillVertexSpec_Outline};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{OutlineFillMeshWriter as e,outlineFillVertexSpec_Fill as t,OutlineFillOutlineMeshWriter as
|
|
2
|
+
import{OutlineFillMeshWriter as e,outlineFillVertexSpec_Fill as t,OutlineFillOutlineMeshWriter as s,outlineFillVertexSpec_Outline as r}from"./OutlineFillMeshWriter.js";import{patternFillVertexSpec as i}from"./PatternFillMeshWriter.js";const a={optionalAttributes:i.optionalAttributes,createComputedParams:e=>e,attributes:{...i.attributes,...t.attributes}},u={optionalAttributes:i.optionalAttributes,createComputedParams:e=>e,attributes:{...i.attributes,...r.attributes}};class n extends s{constructor(){super(...arguments),this.vertexSpec=u}}class o extends e{constructor(){super(...arguments),this.vertexSpec=a}_createOutlineWriter(e,t,s,r){return new n(e,t,s,r)}write(e,t,s,r,i,a,u,n){this.ensurePacked(t,s,r);const o=this.evaluatedMeshParams.sprite?.textureBinding;e.withRecord(this.instanceId,this.attributeLayout,o,()=>{this._write(e,{target:s,options:r,level:i,viewExtent:a,scaleFactor:u,matcher:n})})}ensurePacked(e,t,s){super.ensurePacked(e,t,s),this._lineMeshWriter.ensurePacked(e,t,s)}enqueueRequest(e,t,s){super.enqueueRequest(e,t,s),this._lineMeshWriter.enqueueRequest(e,t,s)}async loadDependencies(){await Promise.all([super.loadDependencies(),this._lineMeshWriter.loadDependencies()])}}export{o as PatternOutlineFillMeshWriter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{importLazily as e}from"../../../../../../../core/importUtils.js";import{memoize as t}from"../../../../../../../core/MapUtils.js";import{pt2px as i}from"../../../../../../../core/screenUtils.js";import{numericHash as r}from"../../../../../../../core/string.js";import{fromRotation as s,translate as o}from"../../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as n}from"../../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as a,set as l,sub as c,normalize as h,add as m,scale as u}from"../../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as d}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{create as f}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{convertGeometryToFlat as g,convertOptimizedGeometryToFlat as p,convertFlatToOptimizedGeometry as _,FlatGeometry as y}from"../../../../../../../geometry/FlatGeometry.js";import{GeometryCursor as x}from"../../../../../../../geometry/GeometryCursor.js";import{getLabelPoint as v}from"../../../../../../../geometry/support/labelPoint.js";import{generalizeOptimizedGeometry as P,convertToGeometry as b}from"../../../../../../../layers/graphics/featureConversionUtils.js";import M from"../../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as w}from"../../../definitions.js";import L from"../../../collisions/BoundingBox.js";import{LabelMetric as I}from"../../../collisions/LabelMetric.js";import{smoothPaths as B,pathDivide as z}from"../../../mesh/templates/segmentUtils.js";import{getMinMaxZoom as G,processColorInput as S}from"../fill/meshWriterUtils.js";import{TextMeshWriter as j,maxLabelZoom as D}from"../text/TextMeshWriter.js";const F=1,A=0,R=128,$=w*w/16,k=e(()=>import("../../../../../../../geometry/operators/gx/operatorIntersection.js")),C=e(()=>import("../../../../../../../chunks/FlatGeometry.js"));function O(e,t,i){return r(`${e}${t}${i}`)}function E(e,t,i,s,o){return r(`${e}${t}${i}${s*2**(D-o)}`)}function T(e,t,i){return r(`${e}${t}${i}`)}function X(e,t,i,s,o){return r(`${e}${o}${t}${i*2**(D-s)}`)}const Y=t(e=>{let t=0;if(0===e)return 1/0;for(;!(e%2);)t++,e/=2;return t});class U extends j{constructor(){super(...arguments),this._zoomLevel=0}async loadDependencies(){await Promise.all([super.loadDependencies(),k.getImportPromise(),C.getImportPromise()])}_write(e,{target:t,effectGeometry:i,level:r,viewExtent:s}){if(this._zoomLevel=r,null!=i)throw new Error("InternalError: EffectGeometry not support for LabelMeshWriter");switch(t.geometryType){case"esriGeometryPoint":{const i=t.readXForDisplay(),r=t.readYForDisplay();this._writePoint(e,i,r,0,t);break}case"esriGeometryEnvelope":case"esriGeometryPolygon":this._writePolygon(e,t,s);break;case"esriGeometryMultipoint":{let i=0;const r=x.fromFeatureSetReader(t);if(r?.nextPath())for(;r.nextPoint();)this._writePoint(e,r.x,r.y,i++,t);break}case"esriGeometryPolyline":this._writeLines(e,t)}}_getMetricDir(){const{horizontalAlignment:e,verticalAlignment:t}=this.evaluatedMeshParams;return["center"===e?0:"right"===e?-1:1,"middle"===t?0:"bottom"===t?-1:1]}_createLineLabelMetric(e,t,i,r,s,o){const[n,a]=this._getMetricDir(),l=this.evaluatedMeshParams.scaleInfo?.maxScale??0,c=this.evaluatedMeshParams.scaleInfo?.minScale??0,h=this.evaluatedMeshParams.labelClassId;return new I(e,h,t,i,r,s,n,a,l,c,o)}_writePolygon(e,t,i){const r=k.module,s=C.module.constructFromFlatGeometry,o=t.readGeometryForDisplay()?.justXY(),n=t.readCentroidForDisplay()?.coords,a=o?.area()||0;if(!n)return;const l=a>=$;e.requiresRefresh||=l;const c=s(g(i)),h=s(g({x:n[0],y:n[1]})),m=!!r.execute(h,c,null);if(!o||!l||!m)return void this._writePoint(e,n[0],n[1],0,t);const u=s(p("polygon",o,null)),d=r.execute(u,c,null);if(!d)return void this._writePoint(e,n[0],n[1],0,t);const f=_(new y(d.toFlatGeometry())),P=x.fromOptimized(f,"esriGeometryPolygon",1),b=v(P)??n;this._writePoint(e,b[0],b[1],0,t)}_writePoint(e,t,i,r,s){if(t<0||t>w||i<0||i>w)return;const o=this._getShaping();if(!o)return;const n=s.getDisplayId(),a=this.evaluatedMeshParams.labelClassId,l=O(this.evaluatedMeshParams.layerId,s.getObjectId(),r),c=T(s.getObjectId(),a,r),[h,m]=this._getMetricDir(),u=this.evaluatedMeshParams.scaleInfo?.maxScale??0,d=this.evaluatedMeshParams.scaleInfo?.minScale??0,f=this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0};e.metricStart(new I(n,a,l,c,t,i,h,m,u,d,f)),this._writeGlyphs(e,n,t,i,o,0,f,void 0,!1),e.metricBoxWrite(o.boundsT),e.metricEnd()}_getPointReferenceBounds(){if(!this._references)return null;for(const e of this._references){const t=e.getBoundsInfo();if(t)return t}return null}_writeLines(e,t){const{scaleInfo:i,verticalAlignment:r}=this.evaluatedMeshParams,s=this.evaluatedMeshParams.repeatLabelDistance||128,o=this._getShaping("middle");if(!o)return;const n=(e,t,i,r)=>this._placeSubdivGlyphs(e,t,i,r),a=(o.bounds.width+s)/(1<<F);this._current={out:e,id:t.getDisplayId(),objId:t.getObjectId(),shaping:o,zoomRange:G(i,this.getTileInfo()),referenceBounds:this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0},offsetDirection:null,pathIndex:0},this._verticalPlacement="bottom"===r?"above":"top"===r?"below":null,this._verticalPlacement?this._writeAboveAndBelowAlong(t,n,a):this._writeCenterAlong(t,n,a)}_writeAboveAndBelowAlong(e,t,i){const{repeatLabel:r}=this.evaluatedMeshParams,{shaping:s}=this._current,o=s.bounds.halfHeight,n=e.readGeometryForDisplay()?.justXY();if(!n)return;const a=P(n,"esriGeometryPolyline",1)??new M,l=W(a,o),c=W(a,-o),h=b(c,"esriGeometryPolyline",!1,!1),m=b(l,"esriGeometryPolyline",!1,!1),u=B(m.paths,s.bounds.width),d=B(h.paths,s.bounds.width);this._current.offsetDirection="above";for(let f=0;f<u.length;f++)this._current.pathIndex=f,z(u[f],i,t,!!r);this._current.offsetDirection="below";for(let f=0;f<d.length;f++)this._current.pathIndex=f,z(d[f],i,t,!!r)}_writeCenterAlong(e,t,i){const{repeatLabel:r}=this.evaluatedMeshParams,{shaping:s}=this._current,o=B(e.readLegacyGeometryForDisplay().paths,s.bounds.width);for(let n=0;n<o.length;n++)this._current.pathIndex=n,z(o[n],i,t,!!r)}_placeSubdivGlyphs(e,t,i,r){if(e.x<0||e.x>w||e.y<0||e.y>w)return;const{allowOverrun:s,labelPosition:o,repeatLabelDistance:n,layerId:a,labelClassId:l}=this.evaluatedMeshParams,{objId:c,shaping:h,pathIndex:m}=this._current,u=this._current.zoomRange[0],d=Y(t),f=this._current.shaping.bounds.width/(1<<F),g=Math.sqrt(n||R)/(1<<F),p=Math.min(i,r-i),_=h.isMultiline?D:Math.log2(p/(g+f/2)),y=0===t?_:Math.min(d,_),x=Math.max(u,this._zoomLevel+F-y),v=this._zoomLevel-x,P=h.bounds.width/2*2**v,b=E(a,c,m,t,this._zoomLevel),M=X(c,m,t,this._zoomLevel,l);s&&v<0?this._placeStraightAlong(e,u,b,M):"parallel"===o||h.isMultiline?this._placeStraightAlong(e,x,b,M):"curved"===o&&this._placeCurved(e,x,P,b,M)}_placeCurved(e,t,i,r,s){const{out:o,id:n}=this._current;o.metricStart(this._createLineLabelMetric(n,r,s,e.x,e.y));const a=e.clone(),l=e.angle*(180/Math.PI)%360,c=(e.angle*(180/Math.PI)+180)%360;this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||(this._placeFirst(a,t,1,l),this._placeBack(e,a,t,i,1,l),this._placeForward(e,a,t,i,1,l)),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||(this._placeFirst(a,t,0,c),this._placeBack(e,a,t,i,0,c),this._placeForward(e,a,t,i,0,c)),o.metricEnd()}_placeStraightAlong(e,t,r,a){const{out:l,id:c,shaping:h,zoomRange:m,referenceBounds:u}=this._current,{boxBorderLineColor:f,boxBackgroundColor:g}=this.evaluatedMeshParams,p=e.clone(),_=e.angle*(180/Math.PI)%360,y=(e.angle*(180/Math.PI)+180)%360,x=h.glyphs.length>0&&!(!f&&!g);if(l.metricStart(this._createLineLabelMetric(c,r,a,e.x,e.y)),x){const r=Math.max(t,m[0],0),a=Math.min(D,m[1]),f=s(n(),-e.angle),g={minZoom:r,maxZoom:a,clipAngle:_,mapAligned:!0,isLineLabel:!0},p=i(this.evaluatedMeshParams.offsetX),x=i(this.evaluatedMeshParams.offsetY);if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){const t=d(p,-1*x),[i,r]=h.shapeBackground(o(n(),f,t));l.recordStart(this.instanceId,this.attributeLayout,h.glyphs[0].textureBinding),this._writeTextBox(l,c,e.x,e.y,r,u,g),l.recordEnd()}if(!this._verticalPlacement||this._verticalPlacement!==this._current.offsetDirection){const t=d(p,x),[i,r]=h.shapeBackground(o(n(),f,t));g.clipAngle=y,l.recordStart(this.instanceId,this.attributeLayout,h.glyphs[0].textureBinding),this._writeTextBox(l,c,e.x,e.y,r,u,g),l.recordEnd()}}this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||this._placeFirst(p,t,1,_,!0),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||this._placeFirst(p,t,0,y,!0),l.metricEnd()}_placeBack(e,t,i,r,s,o){const n=e.clone();let a=e.backwardLength+A;for(;n.prev()&&!(a>=r);)this._placeOnSegment(n,t,a,i,-1,s,o),a+=n.length+A}_placeForward(e,t,i,r,s,o){const n=e.clone();let a=e.remainingLength+A;for(;n.next()&&!(a>=r);)this._placeOnSegment(n,t,a,i,1,s,o),a+=n.length+A}_placeFirst(e,t,i,r,s=!1){const{out:o,id:n,shaping:a,zoomRange:l,referenceBounds:c}=this._current,h=a.glyphs,m=this._getBoundsOffset(e.angle);for(const u of h){const h=u.x>a.bounds.x?i:1-i,d=h*e.remainingLength+(1-h)*e.backwardLength,f=Math.abs(u.x+u.width/2-a.bounds.x),g=Math.max(0,this._zoomLevel+Math.log2(f/(d+A))),p=Math.max(t,s?0:g);u.angle=e.angle+(1-i)*Math.PI;const _=[Math.max(l[0],p),Math.min(l[1],D)];this._writeLineGlyph(o,n,e.x,e.y,u,_,r,c),this._writeLineGlyphBox(o,u,i,_,m)}}_placeOnSegment(e,t,i,r,s,o,n){const{out:a,id:l,shaping:c,referenceBounds:h}=this._current,m=c.glyphs,u=e.dx/e.length,d=e.dy/e.length,f={x:e.x+i*-s*u,y:e.y+i*-s*d},g=this._getBoundsOffset(e.angle);for(const p of m){const t=p.x>c.bounds.x?o:1-o;if(!(t&&1===s||!t&&-1===s))continue;const m=Math.abs(p.x+p.width/2-c.bounds.x),u=Math.max(0,this._zoomLevel+Math.log2(m/i)-.1),d=Math.max(r,this._zoomLevel+Math.log2(m/(i+e.length+A)));if(0===u)continue;p.angle=e.angle+(1-o)*Math.PI;const _=[d,u];this._writeLineGlyph(a,l,f.x,f.y,p,_,n,h),this._writeLineGlyphBox(a,p,o,_,g)}}_getBoundsOffset(e){const t=i(this.evaluatedMeshParams.offsetX),r=i(this.evaluatedMeshParams.offsetY),o=d(t,r),l=s(n(),-e);return a(o,o,l)}_writeLineGlyph(e,t,i,r,s,o,n,a){e.recordStart(this.instanceId,this.attributeLayout,s.textureBinding);const{texcoords:l,offsets:c}=s,{fontSize:h,haloSize:m,outlineSize:u}=this._textMeshTransformProps,d=this._getDefaultGlyphMetrics(this.evaluatedMeshParams.glyphs),f=s.fontSize??h;this._writeQuad(e,t,i,r,{sdfSize:d.sdfSize,sdfRadius:d.sdfRadius,texcoords:l,offsets:c,fontSize:f,haloSize:m,outlineSize:u,color:s.color?S(s.color):S(this.evaluatedMeshParams.color),isBackground:!1,referenceBounds:a,minZoom:Math.max(this._current.zoomRange[0],o[0]),maxZoom:Math.min(this._current.zoomRange[1],o[1]),clipAngle:n,mapAligned:!0,isLineLabel:!0}),e.recordEnd()}_writeLineGlyphBox(e,t,i,r,s){if((i||this._current.offsetDirection)&&this._isVisible(r)&&t.bounds){const i=t.bounds,r=new L(i.x+s[0],i.y+s[1],i.width,i.height);e.metricBoxWrite(r)}}_isVisible(e){const t=Math.max(this._current.zoomRange[0],e[0]),i=Math.min(this._current.zoomRange[1],e[1]),r=this._zoomLevel;return t<=r&&r<=i}}function W(e,t){const i=new M,{coords:r,lengths:s}=e,o=f(),n=f(),a=f(),d=f(),g=f(),p=f(),_=2;let y=0;for(let f=0;f<s.length;f++){const e=s[f];for(let s=0;s<e;s++){const f=_*(s+y-1),x=_*(s+y),v=_*(s+y+1);s>0?l(o,r[f],r[f+1]):l(o,0,0),l(n,r[x],r[x+1]),s<e-1?l(a,r[v],r[v+1]):l(a,0,0),0===s?l(d,0,0):(c(d,n,o),h(d,d),l(d,d[1],-d[0])),s===e-1?l(g,0,0):(c(g,a,n),h(g,g),l(g,g[1],-g[0])),m(p,d,g),h(p,p);const P=p[0]*g[0]+p[1]*g[1];0!==P&&u(p,p,P),u(p,p,t),i.coords.push(n[0]+p[0],n[1]+p[1])}i.lengths.push(e),y+=e}return i}export{U as LabelMeshWriter,O as labelIdHash,T as labelMetricHash,E as lineLabelIdHash,X as lineLabelMetricHash};
|
|
2
|
+
import{importLazily as e}from"../../../../../../../core/importUtils.js";import{memoize as t}from"../../../../../../../core/MapUtils.js";import{pt2px as i}from"../../../../../../../core/screenUtils.js";import{numericHash as r}from"../../../../../../../core/string.js";import{fromRotation as s,translate as o}from"../../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as n}from"../../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as a,set as l,sub as c,normalize as h,add as u,scale as m}from"../../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as d}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{create as f}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{convertGeometryToFlat as g,convertOptimizedGeometryToFlat as _,convertFlatToOptimizedGeometry as p,FlatGeometry as y}from"../../../../../../../geometry/FlatGeometry.js";import{GeometryCursor as x}from"../../../../../../../geometry/GeometryCursor.js";import{getLabelPoint as P}from"../../../../../../../geometry/support/labelPoint.js";import{generalizeOptimizedGeometry as b,convertToGeometry as M}from"../../../../../../../layers/graphics/featureConversionUtils.js";import v from"../../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as w}from"../../../definitions.js";import L from"../../../collisions/BoundingBox.js";import{LabelMetric as I}from"../../../collisions/LabelMetric.js";import{smoothPaths as B,pathDivide as G,closestPointOnPaths as z}from"../../../mesh/templates/segmentUtils.js";import{getMinMaxZoom as C,processColorInput as D}from"../fill/meshWriterUtils.js";import{TextMeshWriter as S,maxLabelZoom as j}from"../text/TextMeshWriter.js";const R=1,F=0,V=128,A=w*w/16,E=e(()=>import("../../../../../../../geometry/operators/gx/operatorIntersection.js")),O=e(()=>import("../../../../../../../chunks/FlatGeometry.js"));function $(e,t,i){return r(`${e}${t}${i}`)}function k(e,t,i,s,o){return r(`${e}${t}${i}${s*2**(j-o)}`)}function X(e,t,i){return r(`${e}${t}${i}`)}function Y(e,t,i,s,o){return r(`${e}${o}${t}${i*2**(j-s)}`)}const T=t(e=>{let t=0;if(0===e)return 1/0;for(;!(e%2);)t++,e/=2;return t});class U extends S{constructor(){super(...arguments),this.calloutRecordsUseLabelPhase=!0,this._zoomLevel=0,this._calloutVisuals=[],this._calloutVisualIndex=0}async loadDependencies(){await Promise.all([super.loadDependencies(),E.getImportPromise(),O.getImportPromise()])}getCalloutEffectGeometry(e){const t=this._calloutVisuals[this._calloutVisualIndex]?.metric;return t?x.fromJSON({x:t.anchorX,y:t.anchorY}):null}getLocalCalloutReferenceInfo(){const e=this._calloutVisuals[this._calloutVisualIndex],t=e?.referenceInfo;if(!t||!e)return t;const{metric:i,featureAnchor:r}=e;return{...t,anchor:{x:r[0]-i.anchorX,y:i.anchorY-r[1]}}}getCalloutVisualCount(){return this._calloutVisuals.length}setCalloutVisualIndex(e){if(e<0||e>=this._calloutVisuals.length)throw new 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,effectGeometry:i,level:r,viewExtent:s}){if(this._zoomLevel=r,this._calloutVisuals=[],this._calloutVisualIndex=0,null!=i)throw new Error("InternalError: EffectGeometry not support for LabelMeshWriter");switch(t.geometryType){case"esriGeometryPoint":{const i=t.readXForDisplay(),r=t.readYForDisplay();this._writePoint(e,i,r,0,t);break}case"esriGeometryEnvelope":case"esriGeometryPolygon":this._writePolygon(e,t,s);break;case"esriGeometryMultipoint":{let i=0;const r=x.fromFeatureSetReader(t);if(r?.nextPath())for(;r.nextPoint();)this._writePoint(e,r.x,r.y,i++,t);break}case"esriGeometryPolyline":this._writeLines(e,t)}}_getMetricDir(){const{horizontalAlignment:e,verticalAlignment:t}=this.evaluatedMeshParams;return["center"===e?0:"right"===e?-1:1,"middle"===t?0:"bottom"===t?-1:1]}_createLineLabelMetric(e,t,i,r,s,o){const[n,a]=this._getMetricDir(),l=this.evaluatedMeshParams.scaleInfo?.maxScale??0,c=this.evaluatedMeshParams.scaleInfo?.minScale??0,h=this.evaluatedMeshParams.labelClassId;return new I(e,h,t,i,r,s,n,a,l,c,o)}_writePolygon(e,t,i){const r=t.readGeometryForDisplay()?.justXY();e.requiresRefresh||=(r?.area()||0)>=A;const s=this._getPolygonLabelPoint(t,i);s&&this._writePoint(e,s[0],s[1],0,t)}_getPolygonLabelPoint(e,t){if(!t){const t=e.readCentroidForDisplay()?.coords;return t?[t[0],t[1]]:null}const i=E.module,r=O.module.constructFromFlatGeometry,s=e.readGeometryForDisplay()?.justXY(),o=e.readCentroidForDisplay()?.coords,n=s?.area()||0;if(!o)return;const a=n>=A,l=r(g(t)),c=r(g({x:o[0],y:o[1]})),h=!!i.execute(c,l,null);if(!s||!a||!h)return[o[0],o[1]];const u=r(_("polygon",s,null)),m=i.execute(u,l,null);if(!m)return[o[0],o[1]];const d=p(new y(m.toFlatGeometry())),f=x.fromOptimized(d,"esriGeometryPolygon",1),b=P(f)??o;return[b[0],b[1]]}_writePoint(e,t,i,r,s){if(t<0||t>w||i<0||i>w)return;const o=this._getShaping();if(!o)return;const n=s.getDisplayId(),a=this.evaluatedMeshParams.labelClassId,l=$(this.evaluatedMeshParams.layerId,s.getObjectId(),r),c=X(s.getObjectId(),a,r),[h,u]=this._getMetricDir(),m=this.evaluatedMeshParams.scaleInfo?.maxScale??0,d=this.evaluatedMeshParams.scaleInfo?.minScale??0,f=this._getPointLabelReferenceBounds(),g=new I(n,a,l,c,t,i,h,u,m,d,f);this._calloutVisuals.push({metric:g,featureAnchor:[t,i],referenceInfo:this._createLocalCalloutReferenceInfo(o)}),e.metricStart(g),this._writeGlyphs(e,n,t,i,o,0,f,void 0,!1),e.metricBoxWrite(o.boundsT),e.metricEnd()}_getPointReferenceBounds(){if(!this._references)return null;for(const e of this._references){const t=e.getBoundsInfo();if(t)return t}return null}_getPointLabelReferenceBounds(){const e=this._getPointReferenceBounds()??{offsetX:0,offsetY:0,size:0},t=this.evaluatedMeshParams.labelOffsetDistance??0,[i,r]=this._getMetricDir();return{...e,offsetX:e.offsetX+i*t,offsetY:e.offsetY-r*t}}_writeLines(e,t){const{scaleInfo:i,verticalAlignment:r}=this.evaluatedMeshParams,s=this.evaluatedMeshParams.repeatLabelDistance||128,o=this._getShaping("middle");if(!o)return;const n=(e,t,i,r)=>this._placeSubdivGlyphs(e,t,i,r),a=(o.bounds.width+s)/(1<<R);this._current={out:e,id:t.getDisplayId(),objId:t.getObjectId(),shaping:o,zoomRange:C(i,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="bottom"===r?"above":"top"===r?"below":null,this._verticalPlacement?this._writeAboveAndBelowAlong(t,n,a):this._writeCenterAlong(t,n,a)}_writeAboveAndBelowAlong(e,t,i){const{repeatLabel:r}=this.evaluatedMeshParams,{shaping:s}=this._current,o=s.bounds.halfHeight,n=e.readGeometryForDisplay()?.justXY();if(!n)return;const a=b(n,"esriGeometryPolyline",1)??new v,l=W(a,o),c=W(a,-o),h=M(c,"esriGeometryPolyline",!1,!1),u=M(l,"esriGeometryPolyline",!1,!1),m=B(u.paths,s.bounds.width),d=B(h.paths,s.bounds.width);this._current.offsetDirection="above";for(let f=0;f<m.length;f++)this._current.pathIndex=f,G(m[f],i,t,!!r);this._current.offsetDirection="below";for(let f=0;f<d.length;f++)this._current.pathIndex=f,G(d[f],i,t,!!r)}_writeCenterAlong(e,t,i){const{repeatLabel:r}=this.evaluatedMeshParams,{shaping:s}=this._current,o=B(e.readLegacyGeometryForDisplay().paths,s.bounds.width);for(let n=0;n<o.length;n++)this._current.pathIndex=n,G(o[n],i,t,!!r)}_placeSubdivGlyphs(e,t,i,r){if(e.x<0||e.x>w||e.y<0||e.y>w)return;const{allowOverrun:s,labelPosition:o,repeatLabelDistance:n,layerId:a,labelClassId:l}=this.evaluatedMeshParams,{objId:c,shaping:h,pathIndex:u}=this._current,m=this._current.zoomRange[0],d=T(t),f=this._current.shaping.bounds.width/(1<<R),g=Math.sqrt(n||V)/(1<<R),_=Math.min(i,r-i),p=h.isMultiline?j:Math.log2(_/(g+f/2)),y=0===t?p:Math.min(d,p),x=Math.max(m,this._zoomLevel+R-y),P=this._zoomLevel-x,b=h.bounds.width/2*2**P,M=k(a,c,u,t,this._zoomLevel),v=Y(c,u,t,this._zoomLevel,l);s&&P<0?this._placeStraightAlong(e,m,M,v):"parallel"===o||h.isMultiline?this._placeStraightAlong(e,x,M,v):"curved"===o&&this._placeCurved(e,x,b,M,v)}_placeCurved(e,t,i,r,s){const{out:o,id:n}=this._current,a=this._createLineLabelMetric(n,r,s,e.x,e.y);this._registerLineCalloutMetric(a),o.metricStart(a);const l=e.clone(),c=e.angle*(180/Math.PI)%360,h=(e.angle*(180/Math.PI)+180)%360;this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||(this._placeFirst(l,t,1,c),this._placeBack(e,l,t,i,1,c),this._placeForward(e,l,t,i,1,c)),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||(this._placeFirst(l,t,0,h),this._placeBack(e,l,t,i,0,h),this._placeForward(e,l,t,i,0,h)),o.metricEnd()}_placeStraightAlong(e,t,r,a){const{out:l,id:c,shaping:h,zoomRange:u,referenceBounds:m}=this._current,{boxBorderLineColor:f,boxBackgroundColor:g}=this.evaluatedMeshParams,_=e.clone(),p=e.angle*(180/Math.PI)%360,y=(e.angle*(180/Math.PI)+180)%360,x=h.glyphs.length>0&&!(!f&&!g),P=this._createLineLabelMetric(c,r,a,e.x,e.y);if(this._registerLineCalloutMetric(P),l.metricStart(P),x){const r=Math.max(t,u[0],0),a=Math.min(j,u[1]),f=s(n(),-e.angle),g={minZoom:r,maxZoom:a,clipAngle:p,mapAligned:!0,isLineLabel:!0},_=i(this.evaluatedMeshParams.offsetX),x=i(this.evaluatedMeshParams.offsetY);if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){const t=d(_,-1*x),[i,r]=h.shapeBackground(o(n(),f,t));l.recordStart(this.instanceId,this.attributeLayout,h.glyphs[0].textureBinding),this._writeTextBox(l,c,e.x,e.y,r,m,g),l.recordEnd()}if(!this._verticalPlacement||this._verticalPlacement!==this._current.offsetDirection){const t=d(_,x),[i,r]=h.shapeBackground(o(n(),f,t));g.clipAngle=y,l.recordStart(this.instanceId,this.attributeLayout,h.glyphs[0].textureBinding),this._writeTextBox(l,c,e.x,e.y,r,m,g),l.recordEnd()}}this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||this._placeFirst(_,t,1,p,!0),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||this._placeFirst(_,t,0,y,!0),l.metricEnd()}_registerLineCalloutMetric(e){this._calloutVisuals.push({metric:e,featureAnchor:z(this._current.calloutPaths,e.anchorX,e.anchorY),referenceInfo:this._createLocalCalloutReferenceInfo(this._current.shaping)})}_placeBack(e,t,i,r,s,o){const n=e.clone();let a=e.backwardLength+F;for(;n.prev()&&!(a>=r);)this._placeOnSegment(n,t,a,i,-1,s,o),a+=n.length+F}_placeForward(e,t,i,r,s,o){const n=e.clone();let a=e.remainingLength+F;for(;n.next()&&!(a>=r);)this._placeOnSegment(n,t,a,i,1,s,o),a+=n.length+F}_placeFirst(e,t,i,r,s=!1){const{out:o,id:n,shaping:a,zoomRange:l,referenceBounds:c}=this._current,h=a.glyphs,u=this._getBoundsOffset(e.angle);for(const m of h){const h=m.x>a.bounds.x?i:1-i,d=h*e.remainingLength+(1-h)*e.backwardLength,f=Math.abs(m.x+m.width/2-a.bounds.x),g=Math.max(0,this._zoomLevel+Math.log2(f/(d+F))),_=Math.max(t,s?0:g);m.angle=e.angle+(1-i)*Math.PI;const p=[Math.max(l[0],_),Math.min(l[1],j)];this._writeLineGlyph(o,n,e.x,e.y,m,p,r,c),this._writeLineGlyphBox(o,m,i,p,u)}}_placeOnSegment(e,t,i,r,s,o,n){const{out:a,id:l,shaping:c,referenceBounds:h}=this._current,u=c.glyphs,m=e.dx/e.length,d=e.dy/e.length,f={x:e.x+i*-s*m,y:e.y+i*-s*d},g=this._getBoundsOffset(e.angle);for(const _ of u){const t=_.x>c.bounds.x?o:1-o;if(!(t&&1===s||!t&&-1===s))continue;const u=Math.abs(_.x+_.width/2-c.bounds.x),m=Math.max(0,this._zoomLevel+Math.log2(u/i)-.1),d=Math.max(r,this._zoomLevel+Math.log2(u/(i+e.length+F)));if(0===m)continue;_.angle=e.angle+(1-o)*Math.PI;const p=[d,m];this._writeLineGlyph(a,l,f.x,f.y,_,p,n,h),this._writeLineGlyphBox(a,_,o,p,g)}}_getBoundsOffset(e){const t=i(this.evaluatedMeshParams.offsetX),r=i(this.evaluatedMeshParams.offsetY),o=d(t,r),l=s(n(),-e);return a(o,o,l)}_writeLineGlyph(e,t,i,r,s,o,n,a){e.recordStart(this.instanceId,this.attributeLayout,s.textureBinding);const{texcoords:l,offsets:c}=s,{fontSize:h,haloSize:u,outlineSize:m}=this._textMeshTransformProps,d=this._getDefaultGlyphMetrics(this.evaluatedMeshParams.glyphs),f=s.fontSize??h;this._writeQuad(e,t,i,r,{sdfSize:d.sdfSize,sdfRadius:d.sdfRadius,texcoords:l,offsets:c,fontSize:f,haloSize:u,outlineSize:m,color:s.color?D(s.color):D(this.evaluatedMeshParams.color),isBackground:!1,referenceBounds:a,minZoom:Math.max(this._current.zoomRange[0],o[0]),maxZoom:Math.min(this._current.zoomRange[1],o[1]),clipAngle:n,mapAligned:!0,isLineLabel:!0}),e.recordEnd()}_writeLineGlyphBox(e,t,i,r,s){if((i||this._current.offsetDirection)&&this._isVisible(r)&&t.bounds){const i=t.bounds,r=new L(i.x+s[0],i.y+s[1],i.width,i.height);e.metricBoxWrite(r)}}_isVisible(e){const t=Math.max(this._current.zoomRange[0],e[0]),i=Math.min(this._current.zoomRange[1],e[1]),r=this._zoomLevel;return t<=r&&r<=i}}function W(e,t){const i=new v,{coords:r,lengths:s}=e,o=f(),n=f(),a=f(),d=f(),g=f(),_=f(),p=2;let y=0;for(let f=0;f<s.length;f++){const e=s[f];for(let s=0;s<e;s++){const f=p*(s+y-1),x=p*(s+y),P=p*(s+y+1);s>0?l(o,r[f],r[f+1]):l(o,0,0),l(n,r[x],r[x+1]),s<e-1?l(a,r[P],r[P+1]):l(a,0,0),0===s?l(d,0,0):(c(d,n,o),h(d,d),l(d,d[1],-d[0])),s===e-1?l(g,0,0):(c(g,a,n),h(g,g),l(g,g[1],-g[0])),u(_,d,g),h(_,_);const b=_[0]*g[0]+_[1]*g[1];0!==b&&m(_,_,b),m(_,_,t),i.coords.push(n[0]+_[0],n[1]+_[1])}i.lengths.push(e),y+=e}return i}export{U as LabelMeshWriter,$ as labelIdHash,X as labelMetricHash,k as lineLabelIdHash,Y as lineLabelMetricHash};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as
|
|
2
|
+
import{FeatureTechnique as e}from"../FeatureTechnique.js";import{isHittest as t,getSelectionDefines as r,getFeatureTextures as s,getFeatureUniforms as i,resolveDynamicUniforms as o,isHighlight as n,getFeaturePipelineState as a}from"../featureTechniqueUtils.js";import{GradientStrokeShader as h}from"../shaders/GradientStrokeShader.js";class u extends e{constructor(){super(...arguments),this.type=17,this.shaders={geometry:new h},this.symbologyPlane=1}_getShaderOptions(e,n,a){const{painter:h}=e,u=n.instance.getInput(),{mosaicInfo:p,mosaicTexture:c}=h.textureManager.getBindingInfo(e,n.textureKey,!1);return{shader:this.shaders.geometry,uniforms:{...o(e,n.target,u.uniforms),...i(e),mosaicInfo:p,technique:{isColorPass:a}},textures:{...s(e),mosaicTexture:c},defines:{...r(e)},optionalAttributes:u.optionalAttributes,useComputeBuffer:t(e)}}render(e,r){const{painter:s}=e;if(t(e)||n(e)){const t=a(e);return s.setPipelineState(t),s.setShader(this._getShaderOptions(e,r,1)),void s.submitDraw(e,r)}e.context.setClearDepth(1),e.context.clear(256);const i={...a(e),color:!1,depth:{write:{zNear:0,zFar:1},test:513}};s.setShader(this._getShaderOptions(e,r,0)),s.setPipelineState(i),s.submitDraw(e,r);const o={...a(e),color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:{write:!1,test:515}};s.setShader(this._getShaderOptions(e,r,1)),s.setPipelineState(o),s.submitDraw(e,r)}}export{u as GradientStrokeTechnique};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{thinLineHalfWidthThreshold as s}from"../../../definitions.js";import{LineTessellation as i}from"../../../TurboLine.js";import{clipLinesMarshall as r}from"../../../mesh/templates/templateUtils.js";import{processLineCapInput as n,processLineJoinInput as o,packRounded as a,processColorInput as
|
|
2
|
+
import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{thinLineHalfWidthThreshold as s}from"../../../definitions.js";import{LineTessellation as i}from"../../../TurboLine.js";import{clipLinesMarshall as r}from"../../../mesh/templates/templateUtils.js";import{processLineCapInput as n,processLineJoinInput as o,packRounded as a,processColorInput as h,getMinMaxZoom as c}from"../fill/meshWriterUtils.js";import{MeshWriter as l}from"../mesh/MeshWriter.js";import{getLineClippingMargin as u}from"../mesh/utils.js";import{DataType as m}from"../../../../../../webgl/enums.js";class f{constructor(){this.extrusionOffsetX=0,this.extrusionOffsetY=0,this.normalX=0,this.normalY=0,this.directionX=0,this.directionY=0,this.distance=0,this.pathLength=0,this.distanceOffset=0,this.lineLength=0}}const d={createComputedParams:t=>t,optionalAttributes:{zoomRange:{type:m.HALF_FLOAT,count:2,pack:({scaleInfo:t},{tileInfo:e})=>c(t,e)}},attributes:{id:{type:m.UNSIGNED_BYTE,count:3,pack:"id"},pos:{type:m.SHORT,count:2,pack:"position",packPrecisionFactor:10},bitset:{type:m.UNSIGNED_BYTE,count:1},color:{type:m.UNSIGNED_BYTE,count:4,normalized:!0,pack:({color:t})=>h(t)},offset:{type:m.BYTE,count:2,packPrecisionFactor:16,packTessellation:({extrusionOffsetX:t,extrusionOffsetY:e})=>[a(t,16),a(e,16)]},normal:{type:m.BYTE,count:2,packPrecisionFactor:16,packTessellation:({normalX:t,normalY:e})=>[a(t,16),a(e,16)]},halfWidth:{type:m.HALF_FLOAT,count:1,pack:({width:e})=>t(.5*e)},referenceHalfWidth:{type:m.HALF_FLOAT,count:1,pack:({referenceWidth:e})=>t(.5*e)}}};class p{constructor(){this.id=0,this.bitset=0,this.indexCount=0,this.vertexCount=0,this.vertexFrom=0,this.vertexBounds=0,this.pathLength=0,this.distanceOffset=0}}const _=65535;function x(t,e,i=0){const r=e&&t<s?0:Math.max(1,2*t+1);return Math.max(r,i)}class T extends l{getCalloutCollisionPadding(){return t(.5*this.evaluatedMeshParams.width)}get _effectRotation(){const{effectRotation:t,effectRotationType:e,useEffectOrigin:s,viewRotation:i}=this.evaluatedMeshParams;return null==t&&null==i?null:{value:t,type:e,useEffectOrigin:!!s,viewRotation:i}}constructor(t,e,s,i){super(t,e,s,i),this.vertexSpec=d,this._currentWrite=new p,this._tessellationOptions={halfWidth:0,pixelCoordRatio:1,offset:0,wrapDistance:_,textured:!1},this._tessParams=new f,this._initializeTessellator()}writeLineVertices(t,e,s){const i=this._getLines(e);null!=i&&this._writeVertices(t,s,i)}_initializeTessellator(){this._lineTessellator=new i(this._writeTesselatedVertex.bind(this),this._writeTriangle.bind(this),!0)}_write(t,{target:s,effectGeometry:i}){const r=i??e.fromFeatureSetReaderCIM(s);r&&this._writeGeometry(t,s,r)}_writeGeometry(t,e,s,i){t.recordStart(this.instanceId,this.attributeLayout,i),this.writeLineVertices(t,s,e),t.recordEnd()}_getLines(t){return r(t,u(this.evaluatedMeshParams))}_writeVertices(e,s,i){const{_currentWrite:r,_tessellationOptions:a,evaluatedMeshParams:h}=this,{width:c,capType:l,joinType:u,miterLimit:m,hasSizeVV:f}=h,d=t(.5*c);a.halfWidth=d,a.capType=n(l),a.joinType=o(u),a.miterLimit=m;const p=!f;r.out=e,r.id=s.getDisplayId(),r.vertexCount=0,r.indexCount=0,r.vertexFrom=e.vertexCount(),r.vertexBounds=x(d,p,h.minPixelBuffer);for(const{line:t,start:n,pathLength:o}of i)a.initialDistance=n%_,r.pathLength=o,r.distanceOffset=Math.floor(n/_)*_,this._lineTessellator.tessellate(t,a,p)}_writeTesselatedVertex(t,e,s,i,r,n,o,a,h,c,l){const{out:u,id:m,vertexBounds:f,pathLength:d,distanceOffset:p}=this._currentWrite;return this.hasEffects&&u.recordBounds(t,e,f,f),this._tessParams.extrusionOffsetX=o,this._tessParams.extrusionOffsetY=a,this._tessParams.normalX=h,this._tessParams.normalY=c,this._tessParams.directionX=r,this._tessParams.directionY=n,this._tessParams.distance=l,this._tessParams.pathLength=d,this._tessParams.distanceOffset=p,this._writeVertex(u,m,t,e,this._tessParams),this._currentWrite.vertexFrom+this._currentWrite.vertexCount++}_writeTriangle(t,e,s){const{out:i}=this._currentWrite;i.indexEnsureSize(3),i.indexWrite(t),i.indexWrite(e),i.indexWrite(s),this._currentWrite.indexCount+=3}}export{T as LineMeshWriter,f as LineTessellationParams,d as LineVertexSpec,x as getLinePixelBufferSize};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{applyParentTransform as e}from"../../../../../../../symbols/cim/utils.js";import{spritePadding as i}from"../../../definitions.js";class
|
|
2
|
+
import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{applyParentTransform as e}from"../../../../../../../symbols/cim/utils.js";import{spritePadding as i}from"../../../definitions.js";class s{static from(t){return"width"in t?this.fromSimpleMeshParams(t):this.fromComplexMeshParams(t)}static fromSimpleMeshParams(e){const i=new s(e.sprite,e.color,e.outlineColor,e.minPixelBuffer,e.placement,e.scaleInfo,e.effects),{type:h,width:o,height:a,angle:r,alignment:n,outlineSize:c,referenceSize:m,sprite:d,overrideOutlineColor:l}=e;return i.rawWidth=t(o),i.rawHeight=t(a),i.angle=r,i.alignment=n,i.outlineSize=t(c),i.referenceSize=t(m),i.overrideOutlineColor=l,i.offsetX=t(e.offsetX),i.offsetY=t(e.offsetY),"simple"!==h||d.sdf||(i.rawWidth=d.width,i.rawHeight=d.height),i._initializeSizeComputation(!1,e.hasSizeVV),i._captureBaseSizeState(),i._computeSize(),i._captureBaseComputedSize(),i}static fromComplexMeshParams(i){const h=new s(i.sprite,i.color,i.outlineColor,i.minPixelBuffer,i.placement,i.scaleInfo,i.effects);let{alignment:o,transforms:a,size:r,scaleX:n,anchorX:c,anchorY:m,angle:d,colorLocked:l,frameHeight:f,widthRatio:u,offsetX:p,offsetY:g,outlineSize:_,referenceSize:S,scaleFactor:z,sizeRatio:b,isAbsoluteAnchorPoint:C,rotateClockwise:w,scaleSymbolsProportionally:x,sprite:H}=i;if(a&&a.infos.length>0){const t=e(r,d,w,p,g,a);r=t.size,d=t.rotation,p=t.offsetX,g=t.offsetY,w=!1}z&&(r*=z,p*=z,g*=z);const W=n*(H.width/H.height);h.alignment=o,h.rawHeight=t(r),h.rawWidth=h.rawHeight*W,h.referenceSize=t(S),h.sizeRatio=b,h.sdfDecodeCoeff=(H.sdfDecodeCoeff??1)*b,h.angle=d,h.rotateClockwise=w,h.anchorX=c,h.anchorY=m,h.offsetX=t(p),h.offsetY=t(g),C&&r&&(H.sdf?h.anchorX=c/(r*u):h.anchorX=c/(r*W),h.anchorY=m/r);const X=x&&f?r/f:1;return h.outlineSize=0===_||isNaN(_)?0:t(_)*X,h.scaleSymbolsProportionally=x,h.colorLocked=l,h._initializeSizeComputation(!0,i.hasSizeVV),h._captureBaseSizeState(),h._computeSize(),h._captureBaseComputedSize(),h}constructor(t,e,i,s,h,o,a){this.sprite=t,this.color=e,this.outlineColor=i,this.minPixelBuffer=s,this.placement=h,this.scaleInfo=o,this.effects=a,this.rawWidth=0,this.rawHeight=0,this.angle=0,this.outlineSize=0,this.referenceSize=0,this.sizeRatio=1,this.sdfDecodeCoeff=1,this.alignment=0,this.scaleSymbolsProportionally=!1,this.overrideOutlineColor=!1,this.colorLocked=!1,this.anchorX=0,this.anchorY=0,this.computedWidth=0,this.computedHeight=0,this.texXmin=0,this.texYmin=0,this.texXmax=0,this.texYmax=0,this.offsetX=0,this.offsetY=0,this.rotateClockwise=!0,this._baseRawWidth=0,this._baseRawHeight=0,this._baseComputedWidth=0,this._baseComputedHeight=0,this._baseAnchorX=0,this._baseAnchorY=0,this._isCIM=!1,this._hasSizeVV=!1}applyPointSymbolCalloutBackgroundScale(t,e,i){if(!Number.isFinite(e)||!Number.isFinite(i)||e<=0||i<=0||this._baseComputedWidth<=0||this._baseComputedHeight<=0)return void this.resetSizeOverride();let s=this._baseComputedWidth,h=this._baseComputedHeight;switch(t){case 1:{const t=Math.max(e/this._baseComputedWidth,i/this._baseComputedHeight);s*=t,h*=t;break}case 2:case 4:s=e,h=i;break;case 3:{const t=Math.max(e-this._baseComputedWidth,i-this._baseComputedHeight);s+=t,h+=t;break}}this._applyComputedSizeTarget(s,h)}getPointSymbolCalloutBounds(t){const e=this.computedWidth,i=this.computedHeight,s=(t.xmin+t.xmax)/2+this.offsetX-this.anchorX*e,h=(t.ymin+t.ymax)/2+this.offsetY-this.anchorY*i;return{xmin:s-e/2,ymin:h-i/2,xmax:s+e/2,ymax:h+i/2}}resetSizeOverride(){this._restoreBaseSize(),this._computeSize()}get boundsInfo(){return{size:Math.max(this.computedHeight,this.computedWidth),offsetX:this.offsetX,offsetY:this.offsetY}}_initializeSizeComputation(t,e){this._isCIM=t,this._hasSizeVV=e}_captureBaseSizeState(){this._baseRawWidth=this.rawWidth,this._baseRawHeight=this.rawHeight,this._baseAnchorX=this.anchorX,this._baseAnchorY=this.anchorY}_captureBaseComputedSize(){this._baseComputedWidth=this.computedWidth,this._baseComputedHeight=this.computedHeight}_restoreBaseSize(){this.rawWidth=this._baseRawWidth,this.rawHeight=this._baseRawHeight,this.anchorX=this._baseAnchorX,this.anchorY=this._baseAnchorY}_applyComputedSizeTarget(t,e){const i=this._baseComputedWidth,s=this._baseComputedHeight;!Number.isFinite(t)||!Number.isFinite(e)||t<=0||e<=0||i<=0||s<=0?this.resetSizeOverride():(this._restoreBaseSize(),this.rawWidth*=t/i,this.rawHeight*=e/s,this._computeSize())}_computeSize(){const{sprite:t}=this,e=this._hasSizeVV,s=this._isCIM,a=!!t.sdf,r=t.sdfPaddingRatio??.5,{rawWidth:n,rawHeight:c,sizeRatio:m,outlineSize:d}=this,l=t.rect;let f=n*m,u=c*m,p=0,g=0;if(a){const i=1/(1-r);if(f*=i,u*=i,e)this.computedWidth=f,this.computedHeight=u;else{const e=s&&n>c?f:n,i=c,h=d+2*1;this.computedWidth=Math.min(e+h,f),this.computedHeight=Math.min(i+h,u);const o=Math.max(t.width,t.height)/Math.max(f,u);p=(this.computedWidth-f)*o,g=(this.computedHeight-u)*o}}else this.computedWidth=f*(l.width/t.width),this.computedHeight=u*(l.height/t.height),p=2*i,g=2*i;const _=l.x+i-p/2,S=l.y+i-g/2,z=_+t.width+p,b=S+t.height+g;this.texXmin=h(_),this.texYmin=h(S),this.texXmax=o(z),this.texYmax=o(b),this.computedWidth*=(this.texXmax-this.texXmin)/(z-_),this.computedHeight*=(this.texYmax-this.texYmin)/(b-S),this.anchorX*=f/this.computedWidth,this.anchorY*=u/this.computedHeight}}function h(t,e=1e-7){const i=Math.ceil(t);return i-t<e?i:Math.floor(t)}function o(t,e=1e-7){const i=Math.floor(t);return t-i<e?i:Math.ceil(t)}export{s as ComputedMarkerParams};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{pt2px as e}from"../../../../../../../core/screenUtils.js";import{identity as t,translate as
|
|
2
|
+
import{pt2px as e}from"../../../../../../../core/screenUtils.js";import{identity as t,translate as o,rotate as r}from"../../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as a}from"../../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as s}from"../../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{GeometryCursor as i}from"../../../../../../../geometry/GeometryCursor.js";import{clipCursorToTileExtent as n}from"../../../../../../../symbols/cim/CIMEffects.js";import{maxTileCoordValue as l}from"../../../../../../../symbols/cim/constants.js";import{CIMMarkerPlacementHelper as c}from"../../../../../../../symbols/cim/placements/CIMMarkerPlacementHelper.js";import{packByteSqrt as u,processColorInput as m,getMinMaxZoom as d,getBitMask as f}from"../fill/meshWriterUtils.js";import{ComputedMarkerParams as h}from"./ComputedMarkerParams.js";import{MarkerConstants as p}from"./markerConstants.js";import{MeshWriter as y}from"../mesh/MeshWriter.js";import{DataType as P}from"../../../../../../webgl/enums.js";const g=3.14159265359/180,x=128/Math.PI;function M(e,t){return e%=t,Math.abs(e>=0?e:e+t)}function b(e){return M(e*x,256)}function k(e,s,i,n,l=!1){const c=a(),u=l?1:-1;return t(c),(s||i)&&o(c,c,[s,-i]),n&&r(c,c,u*g*-n),c}const C={createComputedParams:e=>h.from(e),optionalAttributes:{zoomRange:{type:P.HALF_FLOAT,count:2,pack:({scaleInfo:e},{tileInfo:t})=>d(e,t)}},attributes:{pos:{type:P.SHORT,count:2,pack:"position",packPrecisionFactor:10},id:{type:P.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:P.UNSIGNED_BYTE,count:1,pack:({sprite:e,alignment:t,scaleSymbolsProportionally:o,overrideOutlineColor:r,colorLocked:a})=>{let s=0;return e.sdf&&(s|=f(p.bitset.isSDF)),1===t&&(s|=f(p.bitset.isMapAligned)),o&&(s|=f(p.bitset.scaleSymbolsProportionally)),r&&(s|=f(p.bitset.overrideOutlineColor)),a&&(s|=f(p.bitset.colorLocked)),s}},offset:{type:P.HALF_FLOAT,count:2,packAlternating:{count:4,pack:({angle:e,computedWidth:t,computedHeight:o,anchorX:r,anchorY:a,offsetX:i,offsetY:n,rotateClockwise:l})=>{const c=k(0,i,n,-e,l),u=-(.5+r)*t,m=-(.5-a)*o,d=[u,m],f=[u+t,m],h=[u,m+o],p=[u+t,m+o];return s(d,d,c),s(f,f,c),s(h,h,c),s(p,p,c),[d,f,h,p]}}},textureUV:{type:P.SHORT,count:2,packPrecisionFactor:4,packAlternating:{count:4,pack:({texXmax:e,texXmin:t,texYmax:o,texYmin:r})=>[[t,r],[e,r],[t,o],[e,o]]}},color:{type:P.UNSIGNED_BYTE,count:4,normalized:!0,pack:({color:e})=>m(e)},outlineColor:{type:P.UNSIGNED_BYTE,count:4,normalized:!0,pack:({outlineColor:e})=>m(e)},sizing:{type:P.UNSIGNED_BYTE,count:4,pack:({rawWidth:e,rawHeight:t,outlineSize:o,referenceSize:r})=>{const a=Math.max(e,t);return[u(a,128),u(o,128),u(r,128),0]}},placementAngle:{type:P.UNSIGNED_BYTE,count:1,packTessellation:({placementAngle:e})=>b(e)},sdfDecodeCoeff:{type:P.UNSIGNED_SHORT,count:1,packPrecisionFactor:64,pack:({sdfDecodeCoeff:e})=>e}}};class v extends y{constructor(){super(...arguments),this.calloutRecordsUseLabelPhase=!1,this.vertexSpec=C}get _requiresPerFeaturePacking(){return null!=this._getPointSymbolCalloutMarkerEffect()}getBoundsInfo(){return this.evaluatedMeshParams.boundsInfo}getLocalCalloutReferenceInfo(){const e=this.evaluatedMeshParams.boundsInfo;if(!e)return;const t=e.size/2;return{anchor:{x:0,y:0},bodyBounds:{xmin:e.offsetX-t,ymin:e.offsetY-t,xmax:e.offsetX+t,ymax:e.offsetY+t}}}getCalloutCollisionBounds(){if(!this._getPointSymbolCalloutMarkerEffect())return;const e=this._getReferencedCalloutReferenceInfo();return e?this.evaluatedMeshParams.getPointSymbolCalloutBounds(e.bodyBounds):void 0}_prepareEvaluatedMeshParams(e,t){const o=this._getPointSymbolCalloutMarkerEffect();if(!o)return;const r=this._getReferencedCalloutReferenceInfo();if(!r)return void e.resetSizeOverride();const a=r.bodyBounds.xmax-r.bodyBounds.xmin,s=r.bodyBounds.ymax-r.bodyBounds.ymin;e.applyPointSymbolCalloutBackgroundScale(o.backgroundScale,a,s)}_write(e,{target:t,effectGeometry:o,scaleFactor:r}){const a=this.evaluatedMeshParams.sprite?.textureBinding,s=t.getDisplayId();e.recordStart(this.instanceId,this.attributeLayout,a);const i=this.evaluatedMeshParams.minPixelBuffer,c=Math.max(this.evaluatedMeshParams.computedWidth,i),u=Math.max(this.evaluatedMeshParams.computedHeight,i),m=-this.evaluatedMeshParams.anchorX*this.evaluatedMeshParams.computedWidth,d=this.evaluatedMeshParams.anchorY*this.evaluatedMeshParams.computedHeight,f=this.evaluatedMeshParams.offsetX+m,h=-this.evaluatedMeshParams.offsetY+d;if(null!=this.evaluatedMeshParams.placement){let a=null;if(null!=o){const e=Math.max(this.evaluatedMeshParams.computedWidth,this.evaluatedMeshParams.computedHeight);if(a=n(o,2*(e*(r??1)),!1),null===a)return}this._writePlacedMarkers(e,t,a,c,u)}else if(o?.nextPath()){o.nextPoint();const t=o.x,r=o.y;e.recordBounds(t+f,r+h,c,u),this._writeQuad(e,s,t,r)}else if("esriGeometryPolygon"===t.geometryType){const o=t.readCentroidForDisplay();if(!o)return;const[r,a]=o.coords;e.recordBounds(r+f,a+h,c,u),this._writeQuad(e,s,r,a)}else if("esriGeometryPoint"===t.geometryType){const o=t.readXForDisplay(),r=t.readYForDisplay();e.recordBounds(o+f,r+h,c,u),this._writeQuad(e,s,o,r)}else{const o=t.readGeometryForDisplay();o?.forEachVertex((t,o)=>{e.recordBounds(t+f,o+h,c,u),Math.abs(t)>l||Math.abs(o)>l||this._writeQuad(e,s,t,o)})}e.recordEnd()}_writePlacedMarkers(t,o,r,a,s){const n=r??i.fromFeatureSetReaderCIM(o);if(!n)return;const u=-1,m=c.getPlacement(n,u,this.evaluatedMeshParams.placement,e(1),t.id);if(!m)return;const d=o.getDisplayId();let f=m.next();const h=this.evaluatedMeshParams.offsetX,p=-this.evaluatedMeshParams.offsetY;for(;null!=f;){const e=f.tx,o=-f.ty;if(Math.abs(e)>l||Math.abs(o)>l){f=m.next();continue}const r=-f.getAngle();t.recordBounds(e+h,o+p,a,s),this._writeQuad(t,d,e,o,r),f=m.next()}}_writeQuad(e,t,o,r,a){const s=e.vertexCount(),i=null==a?null:{placementAngle:a};this._writeVertex(e,t,o,r,i),e.indexWrite(s+0),e.indexWrite(s+1),e.indexWrite(s+2),e.indexWrite(s+1),e.indexWrite(s+3),e.indexWrite(s+2)}_getPointSymbolCalloutMarkerEffect(){for(const{effect:e}of this.effectInfos??[])if("CIMPointSymbolCallout"===e.type&&"marker"===e.part)return e}}export{v as MarkerMeshWriter,C as MarkerVertexSpec};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as e}from"tslib";import{location as i,option as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as i,option as s,uniform as o,texture as l,input as r,ComputeVertexInput as a}from"../../GraphShaderModule.js";import{Vec4 as n,Vec2 as p,Float as u,Sampler2D as d,Vec3 as m,min as h,max as y,Mat3 as c,ifElse as x,lessThan as w,equal as V,texture2D as f,clamp as v,abs as g,mix as S,distance as b,greaterThan as z,negate as C}from"../../graph/glsl.js";import{MarkerConstants as M}from"./markerConstants.js";import{FeatureVertexInput as _,AFeatureShader as R,FeatureFragmentInput as j}from"../shaders/AFeatureShader.js";import{c256ToRad as U,noHit as F,softEdgeRatio as T,trueHit as q}from"../shaders/constants.js";import{isRectHittest as D,hittestMarkerRect as N,isPolygonHittest as I,hittestPolygon as k,isPointHittest as O,distPointTriangle as P,xyToBarycentric as A,inTriangle as H}from"../shaders/hittestUtils.js";import{MosaicInfo as L}from"../shaders/MosaicInfo.js";import{getBit as G,getBitBool as B,rgba2float as E}from"../shaders/utils.js";import{VisualVariableColor as J}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as K}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as Q}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as W}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as X}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as Y}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as Z}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as $,getVisualVariableColor as tt,getVisualVariableSize as et,getVisualVariableRotation as it}from"../shaders/vvUtils.js";class st extends _{}t([i(3,n)],st.prototype,"color",void 0),t([i(4,n)],st.prototype,"outlineColor",void 0),t([i(5,p)],st.prototype,"offset",void 0),t([i(6,p)],st.prototype,"textureUV",void 0),t([i(7,n)],st.prototype,"sizing",void 0),t([i(8,u)],st.prototype,"placementAngle",void 0),t([i(9,u)],st.prototype,"sdfDecodeCoeff",void 0),t([i(10,p)],st.prototype,"zoomRange",void 0);class ot extends a{}t([i(11,p)],ot.prototype,"offsetNextVertex1",void 0),t([i(12,p)],ot.prototype,"offsetNextVertex2",void 0),t([i(13,p)],ot.prototype,"textureUVNextVertex1",void 0),t([i(14,p)],ot.prototype,"textureUVNextVertex2",void 0);class lt extends j{}function rt(t,e,i,s){return e.multiply(t.x).add(i.multiply(t.y)).add(s.multiply(t.z))}function at(t){return t.multiply(t).divide(128)}class nt extends R{constructor(){super(...arguments),this.type="MarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],textureUV:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=at(t.sizing.x),s=at(t.sizing.y),o=at(t.sizing.z),l=t.placementAngle,r=G(t.bitset,M.bitset.isSDF),a=G(t.bitset,M.bitset.isMapAligned),p=G(t.bitset,M.bitset.scaleSymbolsProportionally),d=B(t.bitset,M.bitset.colorLocked),x=this.getFeatureId(t.id,t.bitset),w=$(this,x),V=tt(this,x,t.color,d).multiply(w),f=this.getLabelPosition(t.pos.xy,t.id,t.bitset),v=this.tile.getDisplayViewScreenMat3(this.view).multiply(new m(f,1)),g=et(this,x,o).divide(o),S=i.multiply(g),b=t.offset.xy.multiply(g);let z=s.multiply(p.multiply(g.subtract(1)).add(1));z=h(z,y(S.subtract(.99),new u(0)));const C=y(z,new u(1)),_=h(z,new u(1)),R=c.fromRotation(l.multiply(U)),j=it(this,x),F=this._getViewRotationMatrix(a).multiply(j).multiply(R).multiply(new m(b.xy,0)).multiply(this.tileInfo.scaleFactor),T=this.clip(t.id,t.bitset,t.zoomRange),q=new n(v.xy.add(F.xy),T,1),D=t.textureUV.divide(this.mosaicInfo.size),N=t.outlineColor.multiply(_),I=G(t.bitset,M.bitset.overrideOutlineColor),k=t.sdfDecodeCoeff.multiply(S);return{glPosition:q,color:V,textureUV:D,outlineColor:N,outlineSize:C,distanceToPx:k,isSDF:r,overrideOutlineColor:I,...this.maybeRunHittest(t,e,{pos:f,size:S,sizeCorrection:g,scaleFactor:this.tileInfo.scaleFactor,isMapAligned:a,vvRotationMat3:j,placementMat3:R,outlineSize:C,distanceToPx:k,isSDF:r})}}fragment(t){const e=this._getColor(t.textureUV,t);return this.getFragmentOutput(e,t)}hittest(t,e,i){const s=this.computeHittestTriangle(t,e,i);return x(O(this.hittestRequest),()=>x(w(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i)),()=>x(D(this.hittestRequest),N(s,this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),x(I(this.hittestRequest),k(s,this.hittestRequest.viewSize,this.hittestMaskTexture),new u(F))))}_getViewRotationMatrix(t){const e=this.view.getDisplayViewMat3(),i=this.view.displayMat3,s=new u(1).subtract(t);return e.multiply(t).add(i.multiply(s))}_getViewScreenMatrix(t){const e=this.tile.getTileMat3(this.view),i=this.view.viewMat3.multiply(e),s=e,o=new u(1).subtract(t);return i.multiply(t).add(s.multiply(o))}_getColor(t,e){return x(V(e.isSDF,new u(1)),this._getSDFColor(t,e),this._getSpriteColor(t,e))}_getSpriteColor(t,e){return f(this.mosaicTexture,t).multiply(e.color)}_getSDFColor(t,e){const i=f(this.mosaicTexture,t),s=new u(.5).subtract(E(i)).multiply(e.distanceToPx).multiply(T),o=v(new u(.5).subtract(s),new u(0),new u(1)),l=e.color.multiply(o);let r=e.outlineSize;this.highlight&&(r=y(r,e.overrideOutlineColor.multiply(4)));const a=r.multiply(.5),n=g(s).subtract(a),p=v(new u(.5).subtract(n),new u(0),new u(1)),d=S(e.outlineColor,e.color,e.overrideOutlineColor).multiply(p);return new u(1).subtract(d.a).multiply(l).add(d)}_hittestSmallMarker(t,e,i){const{position:s,distance:o,smallSymbolDistance:l}=this.hittestRequest,r=o.subtract(l),a=this.tile.getViewScreenMat3(this.view).multiply(new m(i.pos,1)).xy,n=i.size.multiply(.5),p=b(a,s).subtract(n).add(r);return x(z(p,this.hittestRequest.distance),new u(F),new u(q))}_hittestMarker(t,e,i){const{pos0:s,pos1:o,pos2:l}=this.computeHittestTriangle(t,e,i),r=this.hittestRequest.position,a=this.hittestRequest.distance,n=P(r,s,o,l);return x(z(n,a),new u(F),this._hittestSamples(s,o,l,t,e,i))}computeHittestTriangle(t,e,i){const{pos:s,sizeCorrection:o,scaleFactor:l,isMapAligned:r}=i,a=new m(t.offset.multiply(o).multiply(l),0),n=new m(e.offsetNextVertex1.multiply(o).multiply(l),0),p=new m(e.offsetNextVertex2.multiply(o).multiply(l),0),u=this.tile.getViewScreenMat3(this.view).multiply(new m(s,1)),d=this._getViewScreenMatrix(r).multiply(i.vvRotationMat3).multiply(i.placementMat3);return{pos0:u.add(d.multiply(a)).xy,pos1:u.add(d.multiply(n)).xy,pos2:u.add(d.multiply(p)).xy}}_hittestSamples(t,e,i,s,o,l){const{outlineSize:r,isSDF:a,distanceToPx:d}=l,m=this.hittestRequest.position,h=this.hittestRequest.distance,y=A(m.add(new p(C(h),C(h))),t,e,i),c=A(m.add(new p(0,C(h))),t,e,i),w=A(m.add(new p(h,C(h))),t,e,i),V=A(m.add(new p(C(h),0)),t,e,i),f=A(m,t,e,i),v=A(m.add(new p(h,0)),t,e,i),g=A(m.add(new p(C(h),h)),t,e,i),S=A(m.add(new p(0,h)),t,e,i),b=A(m.add(new p(h,h)),t,e,i),M=s.textureUV.divide(this.mosaicInfo.size),_=o.textureUVNextVertex1.divide(this.mosaicInfo.size),R=o.textureUVNextVertex2.divide(this.mosaicInfo.size),j={color:new n(1),outlineColor:new n(1),overrideOutlineColor:new u(1),outlineSize:r,distanceToPx:d,isSDF:a};let U=new u(0);return U=U.add(H(y).multiply(this._getColor(rt(y,M,_,R),j).a)),U=U.add(H(c).multiply(this._getColor(rt(c,M,_,R),j).a)),U=U.add(H(w).multiply(this._getColor(rt(w,M,_,R),j).a)),U=U.add(H(V).multiply(this._getColor(rt(V,M,_,R),j).a)),U=U.add(H(f).multiply(this._getColor(rt(f,M,_,R),j).a)),U=U.add(H(v).multiply(this._getColor(rt(v,M,_,R),j).a)),U=U.add(H(g).multiply(this._getColor(rt(g,M,_,R),j).a)),U=U.add(H(S).multiply(this._getColor(rt(S,M,_,R),j).a)),U=U.add(H(b).multiply(this._getColor(rt(b,M,_,R),j).a)),x(z(U,new u(.05)),new u(q),new u(F))}}t([s(J)],nt.prototype,"visualVariableColor",void 0),t([s(K)],nt.prototype,"visualVariableOpacity",void 0),t([s(Q)],nt.prototype,"visualVariableRotation",void 0),t([s(W)],nt.prototype,"visualVariableSizeMinMaxValue",void 0),t([s(X)],nt.prototype,"visualVariableSizeScaleStops",void 0),t([s(Y)],nt.prototype,"visualVariableSizeStops",void 0),t([s(Z)],nt.prototype,"visualVariableSizeUnitValue",void 0),t([o(L)],nt.prototype,"mosaicInfo",void 0),t([l(d)],nt.prototype,"mosaicTexture",void 0),t([e(0,r(st)),e(1,r(ot))],nt.prototype,"vertex",null),t([e(0,r(lt))],nt.prototype,"fragment",null);export{lt as MarkerFragmentInput,nt as MarkerShader,st as MarkerVertexInput};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{GeometryCursor as t}from"../../../../../../../geometry/GeometryCursor.js";import{autoSnap as e,contains as n,distance as o,inflateBounds as r,scaleMargins as i,createBalloonGeometry as s,createAccentBar as l,createLeaderPath as u}from"../../../../../../../symbols/cim/callouts/effects/calloutUtils.js";const a=96/72,f=1,c=16;class y{constructor(t){this._properties=t}augmentEffectExecutionContext(t){const e=this._hasCalloutEffects?this.getReferencedReferenceInfo()??I(this._properties.writer):null,n=this._hasCalloutEffects&&t.matcher&&t.target&&null!=t.tileKey?t.matcher.getCalloutAnchor(t.target,t.tileKey):null,o=t.scaleFactor??1;return{...t,relativeCalloutAnchor:e?.anchor??void 0,absoluteCalloutAnchor:n?{x:n.x,y:-n.y}:void 0,calloutBodyBounds:e?m(e.bodyBounds,o):void 0}}resolveEffectGeometry(e,n,o){const r=this._getReferencedEffectGeometry(e);return r||(this._hasCalloutEffects&&this._properties.getReferences()&&!o?t.fromJSON({x:0,y:0}):n)}getViewRotation(t){return this._hasCalloutEffects&&this._properties.getCollisionVisibility()?0:t}getCollisionBounds(t=1){const e=this.getReferencedReferenceInfo();if(!e)return;const n=m(e.collisionBodyBounds??e.bodyBounds,t);for(const o of this._properties.getEffects()??[]){if(!_(o)||"background"!==o.part||"CIMBackgroundCallout"!==o.type&&"CIMBalloonCallout"!==o.type)continue;const e=o.margin,r=a*t;return{xmin:n.xmin-(e?.left??0)*r,ymin:n.ymin-(e?.bottom??0)*r,xmax:n.xmax+(e?.right??0)*r,ymax:n.ymax+(e?.top??0)*r}}}getPartCollisionBounds(t=1){const e=this.getReferencedReferenceInfo();if(!e)return[];const n=m(e.bodyBounds,t),o=m(e.collisionBodyBounds??e.bodyBounds,t),r=S(n),i=S(o),s=e.anchor??r,l={x:s.x-(r.x-i.x),y:s.y-(r.y-i.y)},u=a*t,c=Math.max(f,this._properties.getCollisionPadding()),y=[];for(const a of this._properties.getEffects()??[])_(a)&&y.push(...x(a,o,l,u,c));return y}getReferenceInfo(){return I(this._properties.writer)}getReferencedReferenceInfo(){for(const t of this._properties.getReferences()??[]){const e=I(t);if(e)return e}}get _hasCalloutEffects(){return!!this._properties.getEffectInfos()?.some(({effect:t})=>_(t))}_getReferencedEffectGeometry(t){if(this._hasCalloutEffects)for(const e of this._properties.getReferences()??[]){if(!N(e))continue;const n=e.getCalloutEffectGeometry(t);if(n)return n}}}function m(t,e){return 1===e?t:{xmin:t.xmin*e,ymin:t.ymin*e,xmax:t.xmax*e,ymax:t.ymax*e}}function x(t,e,n,o,r){switch(t.type){case"CIMBackgroundCallout":return d(t,e,n,o,r);case"CIMBalloonCallout":return h(t,e,n,o,r);case"CIMPointSymbolCallout":return p(t,e,n,o,r);case"CIMSimpleLineCallout":return C(t,e,n,o,r)}}function d(t,e,n,o,s){const u=r(e,i(t.margin,o));return"background"===t.part?[]:"accent-bar"===t.part?B(l(u,n,(t.gap??0)*o,1),s):g(u,n,t,o,s)}function h(t,e,o,l,u){const a=r(e,i(t.margin,l));return B(s(a,o,t.balloonStyle,(t.leaderTolerance??0)*l,1),u,(t,e)=>!n(a,t)||!n(a,e))}function p(t,e,n,o,r){return"marker"===t.part?[]:g(e,n,t,o,r)}function g(t,r,i,s,l){return n(t,r)||o(e(t,r),r)<(i.leaderTolerance??0)*s?[]:B(u(t,r,i.lineStyle,(i.leaderOffset??0)*s,1),l)}function C(t,r,i,s,l){const u=!1===t.autoSnap?{x:r.xmin,y:r.ymin}:e(r,i);return n(r,i)||o(u,i)<(t.leaderTolerance??0)*s?[]:b(u,i,l)}function B(t,e,n=()=>!0){const o=[];for(t.reset();t.nextPath();){let r=null;for(;t.nextPoint();){const i={x:t.x,y:t.y};r&&n(r,i)&&o.push(...b(r,i,e)),r=i}}return t.reset(),o}function b(t,e,n){const o=e.x-t.x,r=e.y-t.y,i=0!==o&&0!==r?Math.ceil(Math.max(Math.abs(o),Math.abs(r))/c):1,s=[];for(let l=0;l<i;l++){const e=l/i,u=(l+1)/i,a=t.x+o*e,f=t.y+r*e,c=t.x+o*u,y=t.y+r*u;s.push({xmin:Math.min(a,c)-n,ymin:Math.min(f,y)-n,xmax:Math.max(a,c)+n,ymax:Math.max(f,y)+n})}return s}function I(t){return M(t)?E(t.getLocalCalloutReferenceInfo()):R(t.getBoundsInfo())}function M(t){return"getLocalCalloutReferenceInfo"in t&&"function"==typeof t.getLocalCalloutReferenceInfo}function N(t){return"getCalloutEffectGeometry"in t&&"function"==typeof t.getCalloutEffectGeometry}function _(t){return"CIMBackgroundCallout"===t.type||"CIMBalloonCallout"===t.type||"CIMPointSymbolCallout"===t.type||"CIMSimpleLineCallout"===t.type}function R(t){if(!G(t))return;const e=t.size/2,n={xmin:t.offsetX-e,ymin:t.offsetY-e,xmax:t.offsetX+e,ymax:t.offsetY+e};return{anchor:S(n),bodyBounds:n}}function E(t){if(!t||!k(t.bodyBounds))return;const e=t.anchor??S(t.bodyBounds),n=t.collisionBodyBounds;return v(e)?n&&k(n)?{anchor:e,bodyBounds:t.bodyBounds,collisionBodyBounds:n}:{anchor:e,bodyBounds:t.bodyBounds}:void 0}function S(t){return{x:(t.xmin+t.xmax)/2,y:(t.ymin+t.ymax)/2}}function G(t){return null!=t&&null!=t.offsetX&&!isNaN(t.offsetX)&&null!=t.offsetY&&!isNaN(t.offsetY)&&null!=t.size&&!isNaN(t.size)}function k(t){return!(null==t.xmin||isNaN(t.xmin)||null==t.ymin||isNaN(t.ymin)||null==t.xmax||isNaN(t.xmax)||null==t.ymax||isNaN(t.ymax))}function v(t){return null!=t.x&&!isNaN(t.x)&&null!=t.y&&!isNaN(t.y)}export{y as CalloutMeshWriterPolicy,I as getCalloutReferenceInfo,M as isLocalCalloutReferenceProvider};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{loadGeometryOperatorsForEffect as t,loadGeometryOperatorsForPlacement as
|
|
2
|
+
import{GeometryCursor as e}from"../../../../../../../geometry/GeometryCursor.js";import{loadGeometryOperatorsForEffect as t,loadGeometryOperatorsForPlacement as i}from"../../../../../../../symbols/cim/CIMEffects.js";import{getEffectsInflateSize as s}from"../../../../../../../symbols/cim/utils.js";import{EffectHelper as r}from"../../../../../../../symbols/cim/effects/EffectHelper.js";import{CalloutMeshWriterPolicy as a}from"./CalloutMeshWriterPolicy.js";import{MeshWriterVertexPack as n}from"./MeshWriterVertexPack.js";const o=96/72;class c{constructor(e,t,i,s){this._instanceId=e,this._evaluator=t,this._enabledOptionalAttributes=i,this._viewParams=s,this._evaluator.evaluator=e=>this.vertexSpec.createComputedParams(e),this._calloutPolicy=new a({writer:this,getEffectInfos:()=>this.effectInfos,getEffects:()=>this.evaluatedMeshParams.effects,getReferences:()=>this._references,getCollisionVisibility:()=>!!this._evaluator.inputMeshParams.collisionVisibility,getCollisionPadding:()=>this.getCalloutCollisionPadding()})}get _vertexPack(){if(!this._cachedVertexPack){const e=n.fromVertexSpec(this.vertexSpec,this._enabledOptionalAttributes);this._evaluator.hasDynamicProperties||this._requiresPerFeaturePacking||e.pack(this._evaluator.evaluatedMeshParams,this._viewParams),e.collisionVisibility=!!this._evaluator.inputMeshParams.collisionVisibility,this._cachedVertexPack=e}return this._cachedVertexPack}get evaluatedMeshParams(){return this._evaluator.evaluatedMeshParams}get hasEffects(){return!!this.evaluatedMeshParams.effects}get effectInfos(){return this._evaluator.inputMeshParams.effects?.effectInfos}get placementInfo(){return this._evaluator.inputMeshParams.placement}get instanceId(){return this._instanceId}get attributeLayout(){return this._vertexPack.attributeLayout}get _preventEffectClipping(){return!1}get _requiresPerFeaturePacking(){return!1}get _effectRotation(){return null}setReferences(e){this._references=e}getBoundsInfo(){return null}getCalloutReferenceInfo(){return this._calloutPolicy.getReferenceInfo()}getCalloutCollisionBounds(e=1){return this._calloutPolicy.getCollisionBounds(e)}getCalloutPartCollisionBounds(e=1){return this._calloutPolicy.getPartCollisionBounds(e)}getCalloutCollisionPadding(){return 0}getTileInfo(){return this._viewParams.tileInfo}async loadDependencies(){for(const{effect:e}of this.effectInfos||[])await t(e);this.placementInfo&&await i(this.placementInfo.placement)}enqueueRequest(e,t,i){this._evaluator.hasDynamicProperties&&this._evaluator.enqueueRequest(e,t,i)}write(e,t,i,s,r,a,n,o){this.ensurePacked(t,i,s);const c={target:i,options:s,level:r,viewExtent:a,matcher:o},l=e.id||"",u=this.evaluatedMeshParams.effects,f=this._createEffectExecutionContext(i,s,l,n,o);if(!u||0===u.length)return void this._write(e,c);const h=this.getEffectCursor(i,u,f,c);if(!h)return;let m;for(;m=h.next();)m.invertY(),this._write(e,{...c,effectGeometry:m,scaleFactor:n})}ensurePacked(e,t,i){if(!this._evaluator.hasDynamicProperties&&!this._requiresPerFeaturePacking)return;const s=this._evaluator.hasDynamicProperties?this._evaluator.evaluateMeshParams(e,t,i):this.evaluatedMeshParams;this._prepareEvaluatedMeshParams(s,t,i),this._vertexPack.pack(s,this._viewParams)}hasArcadeDependency(e){return this._evaluator.hasArcadeDependency(e)}_writeVertex(e,t,i,s,r){const a=this.evaluatedMeshParams;this._vertexPack.writeVertex(e,t,i,s,a,r)}_prepareEvaluatedMeshParams(e,t,i){}_createEffectExecutionContext(e,t,i,r,a){return this._calloutPolicy.augmentEffectExecutionContext({geomUnitsPerPoint:o,maxInflateSize:s(this.evaluatedMeshParams.effects),scale:t.$view.scale,spatialReference:e.metadata.outSpatialReference??e.metadata.spatialReference,preventClipping:this._preventEffectClipping,tileKey:i,scaleFactor:r,matcher:a,target:e})}_getReferencedCalloutReferenceInfo(){return this._calloutPolicy.getReferencedReferenceInfo()}getEffectCursor(t,i,s,a){null==s.scaleFactor&&(s={...s,scaleFactor:1});const n=null!=t.geometryType&&t.readGeometryForDisplay()?e.fromOptimizedCIM(t.readGeometryForDisplay().clone(),t.geometryType):null,o="esriGeometryPoint"===t.geometryType||"esriGeometryMultipoint"===t.geometryType,c=this._calloutPolicy.resolveEffectGeometry(a,n,o);if(!c)return;const u=e.fromOptimizedCIM(c.asOptimized(),c.geometryType);u.invertY();const f=r.executeEffects(i,u,s),h=this._effectRotation,m=h?.value,_=this._calloutPolicy.getViewRotation(h?.viewRotation);if((null==m||isNaN(m))&&(null==_||isNaN(_)))return f;const P=(null==m||isNaN(m)?0:"arithmetic"===h?.type?90-m:m)+(null==_||isNaN(_)?0:-_);if(0===P)return f;let p=null;return"esriGeometryPoint"===u.geometryType&&(u.reset(),u.nextPath()&&u.nextPoint()&&(p=[u.x,u.y]),u.reset()),new l(f,s,p,h?.useEffectOrigin??!1,-P*Math.PI/180)}}class l{constructor(e,t,i,s,r){this._cursor=e,this._executionContext=t,this._sourceOrigin=i,this._useEffectOrigin=s,this._cos=Math.cos(r),this._sin=Math.sin(r)}next(){this._executionContext.effectOrigin=null;const e=this._cursor.next();if(!e)return null;const t=(this._useEffectOrigin?this._executionContext.effectOrigin:null)??this._sourceOrigin;if(!t)return e;const[i,s]=t,r=e.clone();for(;r.nextPath();)for(;r.nextPoint();){const e=r.x-i,t=r.y-s;r.x=i+e*this._cos-t*this._sin,r.y=s+e*this._sin+t*this._cos}return r.reset(),r}}export{c as MeshWriter};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
const e=new Set(["CIMSimpleLineCallout","CIMBackgroundCallout","CIMBalloonCallout","CIMPointSymbolCallout"]);function n(e){if(0===e.length)return[];const n=new Set(e.filter(t)),l=n.size>0?e.find(e=>!t(e)&&r(e)):void 0,c=e.find(e=>23===e.techniqueType&&!t(e))??l??e[0];if(n.size>0&&!l)throw new Error("InternalError: CIM callout symbol has no reference provider");return e.map(e=>{const t=[...e.references?.exports??[]],r=[...e.references?.dependencies??[]];return e===c&&o(t,"label-reference-symbol"),e===l&&o(t,"callout-body"),n.has(e)&&o(r,"callout-body"),{...e,references:{...e.references,...t.length?{exports:t}:null,...r.length?{dependencies:r}:null}}})}function t(n){const t=n.inputParams.effects;return"cim-effect-infos"===t?.type&&t.effectInfos.some(({effect:n})=>e.has(n.type))}function r(e){return 23===e.techniqueType||32===e.techniqueType}function o(e,n){e.includes(n)||e.push(n)}export{n as defineMeshWriterReferences};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{i1616to32 as t,i16 as
|
|
2
|
+
import{i1616to32 as t,i16 as s}from"../../../number.js";import{AlignedVertexSpec as e}from"./AlignedVertexSpec.js";import{unpackDataView as i,packDataView as c}from"./dataViewUtils.js";import{bitsetGenericLabelInstance as a}from"../shaders/constants.js";class o{static fromVertexSpec(t,s){const i=e.fromVertexSpec(t,s);return new o(i)}constructor(t){this._spec=t,this.collisionVisibility=!1,this._packed=new Uint8Array(this._spec.stride*this._spec.packVertexCount),this._packedU32View=new Uint32Array(this._packed.buffer),this._dataView=new DataView(this._packed.buffer)}get attributeLayout(){return this._spec.attributeLayout}get stride(){return this._spec.stride}writeVertex(t,s,e,c,o,p){for(let r=0;r<this._spec.packVertexCount;r++){const t=r*this._spec.stride;this._packPosition(e,c,t),this._packId(s,t);const n=this._spec.bitset;if(p){if(n.packTessellation){const s=n.packTessellation(p,o,e,c);this._pack(s,n,t)}for(const s of this._spec.standardAttributes)if(null!=s.packTessellation){const i=s.packTessellation(p,o,e,c);this._pack(i,s,t)}else if(s.packAlternating?.packTessellation){const t=s.packAlternating.packTessellation(p,o,e,c);for(let e=0;e<this._spec.packVertexCount;e++){const i=t[e];this._pack(i,s,e*this._spec.stride)}}}const h=i(this._dataView,n,t),_=1<<a;let k=h;this.collisionVisibility?k|=_:k&=~_,this._pack(k,n,t)}t.vertexWriteRegion(this._packedU32View)}pack(t,s){for(const e of this._spec.standardAttributes)if(e.pack&&"string"!=typeof e.pack){const i=e.pack(t,s);for(let t=0;t<this._spec.packVertexCount;t++)this._pack(i,e,t*this._spec.stride)}else if(e.packAlternating?.pack){const i=e.packAlternating.pack(t,s);for(let t=0;t<this._spec.packVertexCount;t++){const s=i[t];this._pack(s,e,t*this._spec.stride)}}}_packPosition(e,i,c){const{offset:a}=this._spec.position,o=this._spec.position.packPrecisionFactor??1,p=s(e*o),r=s(i*o),n=t(p,r);this._dataView.setUint32(c+a,n,!0)}_packId(t,s){const e=t*(this._spec.id.packPrecisionFactor??1),i=4278190080&this._dataView.getUint32(s+this._spec.id.offset,!0);this._dataView.setUint32(s+this._spec.id.offset,e|i,!0)}_pack(t,s,e){c(this._dataView,t,s,e)}}export{o as MeshWriterVertexPack};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{fromUint16 as t,toUint16 as e}from"../../../number.js";import{DataType as n}from"../../../../../../webgl/enums.js";function o(t,o,s,f){const r=s.packPrecisionFactor??1;switch(s.type){case n.BYTE:if(1===s.count)t.setInt8(f+s.offset,o*r);else for(let e=0;e<s.count;e++){const n=e*Int8Array.BYTES_PER_ELEMENT;t.setInt8(f+s.offset+n,o[e]*r)}break;case n.UNSIGNED_BYTE:if(1===s.count)t.setUint8(f+s.offset,o*r);else for(let e=0;e<s.count;e++){const n=e*Uint8Array.BYTES_PER_ELEMENT;t.setUint8(f+s.offset+n,o[e]*r)}break;case n.SHORT:if(1===s.count)t.setInt16(f+s.offset,o*r,!0);else for(let e=0;e<s.count;e++){const n=e*Int16Array.BYTES_PER_ELEMENT;t.setInt16(f+s.offset+n,o[e]*r,!0)}break;case n.UNSIGNED_SHORT:if(1===s.count)t.setUint16(f+s.offset,o*r,!0);else for(let e=0;e<s.count;e++){const n=e*Uint16Array.BYTES_PER_ELEMENT;t.setUint16(f+s.offset+n,o[e]*r,!0)}break;case n.INT:if(1===s.count)t.setInt32(f+s.offset,o*r,!0);else for(let e=0;e<s.count;e++){const n=e*Int32Array.BYTES_PER_ELEMENT;t.setInt32(f+s.offset+n,o[e]*r,!0)}break;case n.UNSIGNED_INT:if(1===s.count)t.setUint32(f+s.offset,o*r,!0);else for(let e=0;e<s.count;e++){const n=e*Uint32Array.BYTES_PER_ELEMENT;t.setUint32(f+s.offset+n,o[e]*r,!0)}break;case n.FLOAT:if(1===s.count)t.setFloat32(f+s.offset,o*r,!0);else for(let e=0;e<s.count;e++){const n=e*Float32Array.BYTES_PER_ELEMENT;t.setFloat32(f+s.offset+n,o[e]*r,!0)}break;case n.HALF_FLOAT:if(1===s.count)t.setUint16(f+s.offset,e(o*r),!0);else for(let n=0;n<s.count;n++){const E=n*Uint16Array.BYTES_PER_ELEMENT;t.setUint16(f+s.offset+E,e(o[n]*r),!0)}}}function s(e,o,s){switch(o.type){case n.BYTE:{if(1===o.count)return e.getInt8(s+o.offset);const t=[];for(let n=0;n<o.count;n++){const f=n*Int8Array.BYTES_PER_ELEMENT;t.push(e.getInt8(s+o.offset+f))}return t}case n.UNSIGNED_BYTE:{if(1===o.count)return e.getUint8(s+o.offset);const t=[];for(let n=0;n<o.count;n++){const f=n*Uint8Array.BYTES_PER_ELEMENT;t.push(e.getUint8(s+o.offset+f))}return t}case n.SHORT:{if(1===o.count)return e.getInt16(s+o.offset,!0);const t=[];for(let n=0;n<o.count;n++){const f=n*Int16Array.BYTES_PER_ELEMENT;t.push(e.getInt16(s+o.offset+f,!0))}return t}case n.UNSIGNED_SHORT:{if(1===o.count)return e.getUint16(s+o.offset,!0);const t=[];for(let n=0;n<o.count;n++){const f=n*Uint16Array.BYTES_PER_ELEMENT;t.push(e.getUint16(s+o.offset+f,!0))}return t}case n.INT:{if(1===o.count)return e.getInt32(s+o.offset,!0);const t=[];for(let n=0;n<o.count;n++){const f=n*Int32Array.BYTES_PER_ELEMENT;t.push(e.getInt32(s+o.offset+f,!0))}return t}case n.UNSIGNED_INT:{if(1===o.count)return e.getUint32(s+o.offset,!0);const t=[];for(let n=0;n<o.count;n++){const f=n*Uint32Array.BYTES_PER_ELEMENT;t.push(e.getUint32(s+o.offset+f,!0))}return t}case n.FLOAT:{if(1===o.count)return e.getFloat32(s+o.offset,!0);const t=[];for(let n=0;n<o.count;n++){const f=n*Float32Array.BYTES_PER_ELEMENT;t.push(e.getFloat32(s+o.offset+f,!0))}return t}case n.HALF_FLOAT:{if(1===o.count)return t(e.getUint16(s+o.offset,!0));const n=[];for(let f=0;f<o.count;f++){const r=f*Uint16Array.BYTES_PER_ELEMENT;n.push(t(e.getUint16(s+o.offset+r,!0)))}return n}}}export{o as packDataView,s as unpackDataView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as e}from"tslib";import{uniform as r,location as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{uniform as r,location as i,option as o,input as s,UniformGroup as l}from"../../GraphShaderModule.js";import{Float as a,FixedArray as n,Vec4 as u,Vec2 as d,Vec3 as h,Int as c,ifElse as p,greaterThan as m,or as w,max as y,lessThan as g,and as S,greaterThanEqual as b,equal as f,abs as v,length as V,smoothstep as x,mix as C,step as _,not as A,mod as z,atan2 as T}from"../../graph/glsl.js";import{FeatureVertexInput as R,AFeatureShader as D,FeatureFragmentInput as j}from"../shaders/AFeatureShader.js";import{bitsetMarkerScaleSymbolsProportionally as M,bitsetMarkerAlignmentMap as O,noHit as q,trueHit as F,epsilon as I,cRadToDeg as W}from"../shaders/constants.js";import{isRectHittest as U,hittestRectCircle as P,isPolygonHittest as k,hittestPolygonCircle as G,hittestCircle as H,isPointHittest as B}from"../shaders/hittestUtils.js";import{getBit as E,isNan as J}from"../shaders/utils.js";import{VisualVariableOpacity as K}from"../shaders/VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as L}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as N}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as Q}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as X}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as Y,getVisualVariableSize as Z}from"../shaders/vvUtils.js";const $=10;class tt extends l{}t([r(a)],tt.prototype,"outlineWidth",void 0),t([r(n.ofType(u,$))],tt.prototype,"colors",void 0),t([r(u)],tt.prototype,"defaultColor",void 0),t([r(u)],tt.prototype,"othersColor",void 0),t([r(u)],tt.prototype,"outlineColor",void 0),t([r(a)],tt.prototype,"donutRatio",void 0),t([r(a)],tt.prototype,"sectorThreshold",void 0),t([r(a)],tt.prototype,"fieldCount",void 0);class et extends R{}t([i(3,d)],et.prototype,"offset",void 0),t([i(4,d)],et.prototype,"texCoords",void 0),t([i(5,a)],et.prototype,"referenceSize",void 0),t([i(6,d)],et.prototype,"zoomRange",void 0);class rt extends j{}class it extends D{constructor(){super(...arguments),this.type="PieChartShader"}vertex(t){const e=Y(this,t.id),r=Z(this,t.id,t.referenceSize).divide(t.referenceSize),i=t.referenceSize.multiply(.5).multiply(r),o=t.offset.multiply(r),s=E(t.bitset,M),l=this.chart.outlineWidth.multiply(s.multiply(r.subtract(1)).add(1)),p=this.tile.getDisplayViewScreenMat3(this.view).multiply(new h(t.pos,1)),m=this._getViewRotationMatrix(E(t.bitset,O)).multiply(new h(o,0)),w=new u(p.xy.add(m.xy),this.clip(t.id,t.bitset,t.zoomRange),1),y=null==this.hittestRequest?this._getSectorData(t.id):{filteredSectorToColorId:new n(new d(0),$),numberOfFilteredSectors:new c(0),maxSectorAngle:new a(0)};return{glPosition:w,color:new u(0),offset:t.texCoords.multiply(2).subtract(1),size:i,outlineWidth:l,opacity:e,filteredSectorToColorId:y.filteredSectorToColorId,numberOfFilteredSectors:y.numberOfFilteredSectors,maxSectorAngle:y.maxSectorAngle,...this.maybeRunHittest(t,{},i)}}fragment(t){return this.getFragmentOutput(null!=this.hittestRequest?new u(0):this._getColor(t),t)}hittest(t,e,r){const i=this.tile.getViewScreenMat3(this.view).multiply(new h(t.pos,1)).xy;return p(B(this.hittestRequest),p(m(H(i,r,this.hittestRequest.position),this.hittestRequest.distance),new a(q),new a(F)),()=>p(U(this.hittestRequest),P(i,r,this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),p(k(this.hittestRequest),G(i,r,this.hittestRequest.viewSize,this.hittestMaskTexture),new a(q))))}_getColor(t){const e=this._getAngle(t.offset),r=m(this.chart.sectorThreshold,new a(0));let i=p(w(m(t.maxSectorAngle,new a(0)),r),this.chart.othersColor,this.chart.defaultColor);const o=y(t.numberOfFilteredSectors.subtract(1),new c(0)),s=this._getSectorColor(t.filteredSectorToColorId,o),l=this._getSectorColor(t.filteredSectorToColorId,0),n=m(t.numberOfFilteredSectors,new c(0));let u=p(n,s,i),d=p(n,l,i),h=p(n,t.maxSectorAngle,new a(0)),_=p(n,new a(360),new a(0));const A=g(e,t.maxSectorAngle),z=S(r,g(t.maxSectorAngle.add(new a(I)),new a(360)));let T=new a(0);for(let w=0;w<$;w++){const r=t.filteredSectorToColorId.get(w).x,o=g(new c(w),t.numberOfFilteredSectors),l=S(A,S(o,S(m(r,e),b(e,T)))),n=w>0?this._getSectorColor(t.filteredSectorToColorId,w-1):s,y=p(g(new c(w+1),t.numberOfFilteredSectors),new c(w+1),new c(0)),V=this._getSectorColor(t.filteredSectorToColorId,y),x=p(S(z,f(new a(w),new a(0))),this.chart.othersColor,n),C=p(S(z,g(v(r.subtract(t.maxSectorAngle)),new a(I))),this.chart.othersColor,V);i=p(l,this._getSectorColor(t.filteredSectorToColorId,w),i),u=p(l,x,u),d=p(l,C,d),h=p(l,T,h),_=p(l,r,_),T=p(o,r,T)}const R=V(t.offset),D=R.multiply(t.size),j=new a(.75),M=e.subtract(h),O=_.subtract(e),q=x(j.multiply(-1),j,M.multiply(R)),F=x(j.multiply(-1),j,O.multiply(R));i=C(u,i,q).add(C(d,i,F)).subtract(i);const W=t.size.subtract(t.outlineWidth).subtract(j),U=this.chart.donutRatio.multiply(W),P=U.subtract(t.outlineWidth),k=p(m(P,j),x(P.subtract(j),P.add(j),D),new a(1)),G=new a(1).subtract(x(t.size.subtract(j.multiply(2)),t.size,D)),H=k.multiply(G),B=S(m(W,new a(0)),m(t.outlineWidth,new a(.25))),E=x(W.subtract(j),W.add(j),D),J=p(m(U,j),new a(1).subtract(x(U.subtract(j),U.add(j),D)),new a(0));return i=p(B,C(i,this.chart.outlineColor,J.add(E)),i),t.opacity.multiply(H).multiply(i)}_getSectorData(t){const e=this._getAttributeValues(t);let r=new a(0);for(let a=0;a<$;a++)r=r.add(e[a]);const i=this.chart.sectorThreshold.multiply(360);let o=new n(new d(0),$),s=new a(0),l=new c(0);for(let n=0;n<$;n++){const t=p(m(r,new a(0)),e[n].multiply(360).divide(r),new a(0)),u=p(m(t,i),new a(1),new a(0)),h=s.add(u.multiply(t)),w=new d(h,new a(n));o=o.set(l,w),s=h,l=l.add(new c(u))}return{filteredSectorToColorId:o,numberOfFilteredSectors:l,maxSectorAngle:s}}_getAttributeValues(t){const e=this.getAttributeDataCoords(t),r=this.storageTextures.getDataDrivenData0(e),i=this.storageTextures.getDataDrivenData1(e),o=this.storageTextures.getDataDrivenData2(e);return[this._getAttributeValue(r.x,0),this._getAttributeValue(r.y,1),this._getAttributeValue(r.z,2),this._getAttributeValue(r.w,3),this._getAttributeValue(i.x,4),this._getAttributeValue(i.y,5),this._getAttributeValue(i.z,6),this._getAttributeValue(i.w,7),this._getAttributeValue(o.x,8),this._getAttributeValue(o.y,9)]}_getAttributeValue(t,e){const r=_(new a(e+1),this.chart.fieldCount);return p(S(A(J(t)),m(t,new a(0))),t,new a(0)).multiply(r)}_getAngle(t){return z(new a(90).subtract(new a(W).multiply(T(t.y,t.x))),new a(360))}_getSectorColor(t,e){return this.chart.colors.get(new c(t.get(e).y))}_getViewRotationMatrix(t){const e=this.view.getDisplayViewMat3(),r=this.view.displayMat3,i=new a(1).subtract(t);return e.multiply(t).add(r.multiply(i))}}t([r(tt)],it.prototype,"chart",void 0),t([o(K)],it.prototype,"visualVariableOpacity",void 0),t([o(L)],it.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(N)],it.prototype,"visualVariableSizeScaleStops",void 0),t([o(Q)],it.prototype,"visualVariableSizeStops",void 0),t([o(X)],it.prototype,"visualVariableSizeUnitValue",void 0),t([e(0,s(et))],it.prototype,"vertex",null),t([e(0,s(rt))],it.prototype,"fragment",null);export{it as PieChartShader,et as PieChartVertexInput,$ as maxPieChartFields};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{maxHighlightGroups as e}from"../../../definitions.js";import{location as i,define as o,option as r,uniform as s,texture as l,VertexInput as a,ComputeVertexInput as
|
|
2
|
+
import{__decorate as t}from"tslib";import{maxHighlightGroups as e}from"../../../definitions.js";import{location as i,define as o,option as r,uniform as s,texture as l,VertexInput as a,ComputeVertexInput as n,GraphShaderModule as h,FragmentOutput as u,FragmentInput as g}from"../../GraphShaderModule.js";import{Vec3 as d,Float as p,Vec2 as m,Sampler2D as y,float as c,step as b,Vec4 as w,equal as x,ifElse as f,or as v,texture2D as T,Mat3 as S,textureSize as C,Int as H,mod as V}from"../../graph/glsl.js";import{trueHit as A,candidateHit as D,noHit as L,bitsetGenericLabelInstance as _}from"./constants.js";import{EntityStorage as P,EntityStorageTextures as j}from"./EntityStorage.js";import{ShaderHighlight as F}from"./ShaderHighlight.js";import{ShaderHittest as I}from"./ShaderHittest.js";import{Tile as R}from"./Tile.js";import{TileInfo as k}from"./TileInfo.js";import{getFilterBit as z,getHighlightBit as O,getBit as M,uvToClip as q,unpackDisplayIdTexel as B}from"./utils.js";import{ViewInfo as Z}from"./ViewInfo.js";class G extends a{}t([i(0,d)],G.prototype,"id",void 0),t([i(1,p)],G.prototype,"bitset",void 0),t([i(2,m)],G.prototype,"pos",void 0);class W extends n{}t([i(14,m)],W.prototype,"nextPos1",void 0),t([i(15,m)],W.prototype,"nextPos2",void 0);class E extends g{}class J extends h{clip(t,e=new p(0),i){let o=new p(0);const r=this.getFeatureId(t,e),s=this.getFilterFlags(r);if(o=o.add(c(2).multiply(c(1).subtract(z(s,0)))),this.inside?o=o.add(c(2).multiply(c(1).subtract(z(s,1)))):this.outside?o=o.add(c(2).multiply(z(s,1))):this.highlight&&(o=o.add(c(2).multiply(c(1).subtract(this._checkHighlight(s))))),null!=i){const t=new p(1).subtract(b(i.x,this.tileInfo.currentZoom)),e=b(i.y,this.tileInfo.currentZoom);o=o.add(new p(2).multiply(t.add(e)))}return o=o.add(new p(2).multiply(this.getLabelHidden(t,e))),o}getFragmentOutput(t,e,i=new p(1/255)){const o=new u;return o.fragColor=this._maybeWriteHittest(e)??this._maybeHighlight(t,i)??t,o}_maybeHighlight(t,e){return this.highlight?new w(t.rgb,b(e,t.a)):null}_checkHighlight(t){let i=this._checkHighlightBit(t,0);for(let o=1;o<e;o++)i=i.add(this._checkHighlightBit(t,o));return b(new p(.1),i.add(this.highlight.highlightAll))}_checkHighlightBit(t,e){return O(t,e).multiply(M(this.highlight.activeGroups,e))}computeHittestTriangle(t,e,i){const o=this.tile.getViewScreenMat3(this.view),{nextPos1:r,nextPos2:s}=e,l=this.getLabelPosition(t.pos,t.id,t.bitset),a=this.getLabelPosition(r,t.id,t.bitset),n=this.getLabelPosition(s,t.id,t.bitset);return{pos0:o.multiply(new d(l,1)).xy,pos1:o.multiply(new d(a,1)).xy,pos2:o.multiply(new d(n,1)).xy}}maybeRunHittest(t,e,i){if(null==this.hittestRequest)return null;const o=this.hittest(t,e,i),r=x(o,new p(A)),s=x(o,new p(D)),l=f(s,()=>new w(new p(1/255),0,0,0),f(r,()=>new w(new p(2/255),0,0,0),new w(L)));let a=f(v(r,s),new p(0),new p(2));const n=this.getAttributeDataCoords(this.getFeatureId(t.id,t.bitset)),h=q(n);return a=a.add(this.clip(t.id,t.bitset,t.zoomRange)),{glPointSize:new p(1),glPosition:new w(h,a,1),color:l}}_maybeWriteHittest(t){return null!=this.hittestRequest?t.color:null}getAttributeDataCoords(t){return this.storage.getAttributeDataCoords(t)}getFeatureId(t,e){const i=M(e,_);return f(x(i,new p(1)),()=>T(this.labelStoreTexture,this._getLabelStoreCoords(t)).rgb.multiply(255),t)}getLabelPosition(t,e,i){const o=M(i,_);return f(x(o,new p(1)),()=>{const i=T(this.labelAnchorStoreTexture,this._getLabelStoreCoords(e)),o=i.xy,r=x(t.x,o.x).and(x(t.y,o.y)),s=f(r,new m(0),i.zw),l=this.view.getRotation().divide(-180).multiply(Math.PI),a=S.fromRotation(l).multiply(new d(t.subtract(o).add(s),0)).xy.multiply(this.tile.getDisplayZoomFactor(this.tileInfo));return o.add(a)},t)}getLabelOffset(t,e){return f(x(M(e,_),new p(1)),()=>{const e=this.view.getRotation().divide(-180).multiply(Math.PI);return S.fromRotation(e).multiply(new d(t,0)).xy},t)}getLabelHidden(t,e){return f(x(M(e,_),new p(1)),()=>T(this.labelStoreTexture,this._getLabelStoreCoords(t)).a,new p(0))}getVVData(t){return this.storageTextures.getVVData(this.getAttributeDataCoords(t))}getFilterFlags(t){return this.storageTextures.getFilterFlags(this.getAttributeDataCoords(t))}getLocalTimeOrigin(t){return this.storageTextures.getLocalTimeOrigin(this.getAttributeDataCoords(t))}getSizeValue(t){return this.storageTextures.getSizeValue(this.getAttributeDataCoords(t))}getColorValue(t){return this.storageTextures.getColorValue(this.getAttributeDataCoords(t))}getOpacityValue(t){return this.storageTextures.getOpacityValue(this.getAttributeDataCoords(t))}getRotationValue(t){return this.storageTextures.getRotationValue(this.getAttributeDataCoords(t))}_getLabelStoreCoords(t){const e=B(t),i=e.x,o=e.y.multiply(256),r=e.z.multiply(65536),s=i.add(o).add(r),l=c(C(this.labelStoreTexture,new H(0)).x),a=V(s,l),n=s.subtract(a).divide(l);return new m(a,n).add(.5).divide(l)}}t([o],J.prototype,"inside",void 0),t([o],J.prototype,"outside",void 0),t([r(F)],J.prototype,"highlight",void 0),t([s(P)],J.prototype,"storage",void 0),t([l(j)],J.prototype,"storageTextures",void 0),t([l(y)],J.prototype,"labelStoreTexture",void 0),t([l(y)],J.prototype,"labelAnchorStoreTexture",void 0),t([l(y)],J.prototype,"hittestMaskTexture",void 0),t([s(Z)],J.prototype,"view",void 0),t([s(k)],J.prototype,"tileInfo",void 0),t([s(R)],J.prototype,"tile",void 0),t([r(I)],J.prototype,"hittestRequest",void 0);export{J as AFeatureShader,W as BaseHittestVertexInput,E as FeatureFragmentInput,G as FeatureVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as e}from"tslib";import{location as o,uniform as i,texture as r,input as l}from"../../GraphShaderModule.js";import{Vec4 as s,Float as p,Vec2 as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as o,uniform as i,texture as r,input as l}from"../../GraphShaderModule.js";import{Vec4 as s,Float as p,Vec2 as a,Sampler2D as d,sin as n,cos as m,Vec3 as u,ifElse as f,mod as y,mix as c,texture2D as v,greaterThan as x,equal as h,float as g,mat3 as b,negate as w,vec2 as j}from"../../graph/glsl.js";import{BaseHittestVertexInput as O,FeatureFragmentInput as T}from"./AFeatureShader.js";import{c256ToRad as F,bitsetGenericConsiderAlphaOnly as C,bitsetFillRandomPatternOffset as I}from"./constants.js";import{FillVertexInput as A,FillShader as S}from"./FillShader.js";import{LocalTileOffset as z}from"./LocalTileOffset.js";import{MosaicInfo as M}from"./MosaicInfo.js";import{getBit as V,isNan as q,rgba2float as G,rand as L}from"./utils.js";class P extends A{}t([o(5,s)],P.prototype,"tlbr",void 0),t([o(6,p)],P.prototype,"width",void 0),t([o(7,p)],P.prototype,"height",void 0),t([o(8,a)],P.prototype,"offset",void 0),t([o(9,a)],P.prototype,"scale",void 0),t([o(10,p)],P.prototype,"angle",void 0);class R extends T{}function Z(t,e,o,i,r){const l=h(V(r,I),g(1)),p=G(new s(t,0));return f(l,b(i.divide(e.x),o.divide(e.y),0,w(o.divide(e.x)),i.divide(e.y),0,L(j(p,0)),L(j(0,p)),1),b(i.divide(e.x),o.divide(e.y),0,w(o.divide(e.x)),i.divide(e.y),0,0,0,1))}function k(t,e){const o=t.getFeatureId(e.id,e.bitset),i=t.tile.getRequiredZoomFactor(t.tileInfo),r=new a(e.width,e.height),l=r.multiply(e.scale).multiply(i),s=e.angle.multiply(F),d=n(s),y=m(s),c=Z(o,l,d,y,e.bitset),v=t.localTileOffset.getPatternOffsetAtTileOrigin(r,d,y),x=i.multiply(e.scale).multiply(e.offset.subtract(v)).divide(l),h=new u(e.pos,1),g=c.multiply(h).xy.subtract(x),b=e.tlbr.divide(t.mosaicInfo.size.xyxy);let w=V(e.bitset,C);return null!=t.visualVariableColor&&(w=f(q(t.getColorValue(o)),new p(0),w)),{tileTextureCoord:g,tlbr:b,sampleAlphaOnly:w}}function B(t,e){const o=y(e.tileTextureCoord,new p(1)),i=c(e.tlbr.xy,e.tlbr.zw,o);let r=v(t.mosaicTexture,i);return r=f(x(e.sampleAlphaOnly,new p(.5)),r.aaaa,r),e.color.multiply(r)}class D extends S{constructor(){super(...arguments),this.type="ComplexFillShader"}vertex(t,e){return{...super.vertex(t,e),...k(this,t)}}fragment(t){const e=B(this,t);return this.getFragmentOutput(e,t,new p(0))}}t([i(M)],D.prototype,"mosaicInfo",void 0),t([r(d)],D.prototype,"mosaicTexture",void 0),t([i(z)],D.prototype,"localTileOffset",void 0),t([e(0,l(P)),e(1,l(O))],D.prototype,"vertex",null),t([e(0,l(R))],D.prototype,"fragment",null);export{R as ComplexFillFragmentInput,D as ComplexFillShader,P as ComplexFillVertexInput,B as getComplexFillFragmentColor,k as getComplexFillVertexData,Z as getPatternMatrix};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as e}from"tslib";import{location as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as i,option as s,input as o}from"../../GraphShaderModule.js";import{Vec4 as r,Vec2 as l,Vec3 as p,Float as a,ifElse as h,greaterThan as n}from"../../graph/glsl.js";import{BaseHittestVertexInput as u,FeatureFragmentInput as m,FeatureVertexInput as c,AFeatureShader as y}from"./AFeatureShader.js";import{noHit as d,trueHit as g}from"./constants.js";import{isRectHittest as v,hittestRect as b,isPolygonHittest as f,hittestPolygon as x,hittestFill as w,isPointHittest as R}from"./hittestUtils.js";import{VisualVariableColor as j}from"./VisualVariableColor.js";import{VisualVariableOpacity as q}from"./VisualVariableOpacity.js";import{getVisualVariableOpacity as V,getVisualVariableColor as S}from"./vvUtils.js";class z extends c{}t([i(3,r)],z.prototype,"color",void 0),t([i(4,l)],z.prototype,"zoomRange",void 0);class F extends y{constructor(){super(...arguments),this.type="FillShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,e){const i=this.getFeatureId(t.id,t.bitset),s=V(this,i),o=S(this,i,t.color).multiply(s),l=this.tile.getDisplayViewScreenMat3(this.view).multiply(new p(this.getLabelPosition(t.pos.xy,t.id,t.bitset),1)),a=this.clip(t.id,t.bitset,t.zoomRange);return{glPosition:new r(l.xy,a,1),color:o,...this.maybeRunHittest(t,e,null)}}fragment(t){return this.getFragmentOutput(t.color,t,new a(0))}hittest(t,e){const i=this.computeHittestTriangle(t,e,null);return h(R(this.hittestRequest),()=>{const i=w(this,t,e);return h(n(i,this.hittestRequest.distance),new a(d),new a(g))},()=>h(v(this.hittestRequest),b(i,this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),h(f(this.hittestRequest),x(i,this.hittestRequest.viewSize,this.hittestMaskTexture),new a(d))))}}t([s(j)],F.prototype,"visualVariableColor",void 0),t([s(q)],F.prototype,"visualVariableOpacity",void 0),t([e(0,o(z)),e(1,o(u))],F.prototype,"vertex",null),t([e(0,o(m))],F.prototype,"fragment",null);export{F as FillShader,z as FillVertexInput};
|