@arcgis/core 5.2.0-next.120 → 5.2.0-next.122
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/Ground.js +1 -1
- 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 +9 -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/0148cb611bf7c8c5fe8a.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/{deb5b1d772ca407654d4.js → 0acc754907395e83bbc6.js} +1 -1
- package/assets/esri/core/workers/chunks/1302bf9718747cd9fdd9.js +1 -0
- package/assets/esri/core/workers/chunks/{956432c9d45940983bc2.js → 1b42d163ef22e3565bb7.js} +1 -1
- package/assets/esri/core/workers/chunks/1b551ef3d84d9c1e93f9.js +1 -0
- package/assets/esri/core/workers/chunks/1c38ce72160d5a4e4b3d.js +1 -0
- package/assets/esri/core/workers/chunks/1c3b087fbf2d102376fc.js +1 -0
- package/assets/esri/core/workers/chunks/{e18b8646c7378213b618.js → 1e46703cb566c25458ad.js} +1 -1
- package/assets/esri/core/workers/chunks/1f135269aea3931e11b2.js +1 -0
- package/assets/esri/core/workers/chunks/{ea9e770efc85594e4dd2.js → 216d8cb86548e92a8196.js} +1 -1
- package/assets/esri/core/workers/chunks/23279303cd7698314c56.js +1 -0
- package/assets/esri/core/workers/chunks/{4bf2cc4d092601ff2b86.js → 24673aac70d6c949b6fa.js} +1 -1
- package/assets/esri/core/workers/chunks/24cf91aeab53a897e951.js +1 -0
- package/assets/esri/core/workers/chunks/26bc509a031788bfa678.js +1 -0
- 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/2ae6deade655fdbc28de.js +1 -0
- package/assets/esri/core/workers/chunks/{37cf4ca2083cd3b6002e.js → 2c7bb5c9751524687002.js} +1 -1
- package/assets/esri/core/workers/chunks/2c8957f9c7610805208c.js +1 -0
- package/assets/esri/core/workers/chunks/{dc1944a7601b518a9c48.js → 2ca49fb4590cc34a02bd.js} +1 -1
- package/assets/esri/core/workers/chunks/2d592c935571de80a2e2.js +1 -0
- package/assets/esri/core/workers/chunks/{a917a1df8270860dc514.js → 2f52ad525744b8793d49.js} +1 -1
- package/assets/esri/core/workers/chunks/{f890359d972cce54459e.js → 2f829321bfbd3bacd64f.js} +1 -1
- package/assets/esri/core/workers/chunks/{6efc5873747b9cd44fb9.js → 323451ef52d0c2805f1d.js} +1 -1
- package/assets/esri/core/workers/chunks/{7232fc11b23777b6be94.js → 369012c032ea6882607c.js} +1 -1
- package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +1 -0
- package/assets/esri/core/workers/chunks/38890ac5917942374ab8.js +1 -0
- package/assets/esri/core/workers/chunks/3e33d953e41b281a120b.js +1 -0
- package/assets/esri/core/workers/chunks/3e52351e06d85bf9bedd.js +1 -0
- package/assets/esri/core/workers/chunks/{9f760dc4492a03e0504c.js → 45d87af48a21644590c2.js} +1 -1
- package/assets/esri/core/workers/chunks/462fd57af8ed7921d6ba.js +1 -0
- package/assets/esri/core/workers/chunks/463d69f596d1d34ef275.js +2 -0
- package/assets/esri/core/workers/chunks/475906b079f4f1ddacf2.js +1 -0
- package/assets/esri/core/workers/chunks/48a2f68e06a2e90b77d0.js +1 -0
- package/assets/esri/core/workers/chunks/49affbed22e201f7c32b.js +1 -0
- package/assets/esri/core/workers/chunks/{b6ca73c1384f07b30b74.js → 4bb8432d99a39733368f.js} +1 -1
- package/assets/esri/core/workers/chunks/{cb983f65995e57fff7a1.js → 4f58e0322707f63f5bf2.js} +1 -1
- 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/{b0058619e0363002ad86.js → 59cd139712d919e6a738.js} +1 -1
- package/assets/esri/core/workers/chunks/59d5247ac4075b024244.js +1 -0
- package/assets/esri/core/workers/chunks/5b9f3c4f65412c66316f.js +1 -0
- package/assets/esri/core/workers/chunks/{be3421ffb5b391bca02e.js → 5d35e0c2665f5e625ee9.js} +1 -1
- package/assets/esri/core/workers/chunks/5e70bfb9d6235a87b87a.js +1 -0
- package/assets/esri/core/workers/chunks/6006bd8a5ed945fa2776.js +1 -0
- package/assets/esri/core/workers/chunks/618927cfcb93dd1d92fd.js +1 -0
- package/assets/esri/core/workers/chunks/6709d24867d275b33d24.js +1 -0
- package/assets/esri/core/workers/chunks/68e24fa3f564c2a5c9fd.js +1 -0
- package/assets/esri/core/workers/chunks/{6ab7bb3834841834f839.js → 724ea2e2843e6dac0a90.js} +1 -1
- package/assets/esri/core/workers/chunks/7441d121f00ce747c08e.js +1 -0
- package/assets/esri/core/workers/chunks/{090c9c2dbf92f2cac0b8.js → 770ca70d363184e39d60.js} +1 -1
- package/assets/esri/core/workers/chunks/781fa83e8063b8f685dc.js +1 -0
- package/assets/esri/core/workers/chunks/78c1b75b1a8937eaa3cd.js +1 -0
- package/assets/esri/core/workers/chunks/793b072519ded0dc6f34.js +1 -0
- package/assets/esri/core/workers/chunks/7994fce5f36963aadc51.js +1 -0
- package/assets/esri/core/workers/chunks/7adee504107cb9ad8563.js +1 -0
- package/assets/esri/core/workers/chunks/7efc45858ebd3fd3302e.js +1 -0
- package/assets/esri/core/workers/chunks/7ff536284942c5284a16.js +1 -0
- package/assets/esri/core/workers/chunks/813dd84933b407c8fe86.js +1 -0
- package/assets/esri/core/workers/chunks/83c7c4218bc6ba2f16ee.js +1 -0
- package/assets/esri/core/workers/chunks/8daeac785af725c3ebdf.js +1 -0
- package/assets/esri/core/workers/chunks/{3ab25279aaa30f035038.js → 8daed13400d9e63e65ae.js} +1 -1
- package/assets/esri/core/workers/chunks/9020bd7a0e488d55ef14.js +1 -0
- 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/{cf7c06702babd6fa88b4.js → 9af36ee6a0df224859bc.js} +1 -1
- package/assets/esri/core/workers/chunks/{452d069ba7ad6759b558.js → 9c46c7f00d42f5c02b26.js} +1 -1
- package/assets/esri/core/workers/chunks/{32fc7d1db4b311f6b880.js → 9e5b30b907102bc0c201.js} +1 -1
- package/assets/esri/core/workers/chunks/a3ab53b534e2872131be.js +1 -0
- package/assets/esri/core/workers/chunks/{f18ee2eaa96d103627a6.js → aa6b2cc8f6f5627891c1.js} +1 -1
- package/assets/esri/core/workers/chunks/ac7af417ebf7721d7400.js +1 -0
- package/assets/esri/core/workers/chunks/aed479c14d93955f4798.js +1 -0
- package/assets/esri/core/workers/chunks/{60c61f34733063730386.js → b013b70e40dfb6ce013e.js} +1 -1
- package/assets/esri/core/workers/chunks/b22de8bf4a4a739bc36d.js +1 -0
- package/assets/esri/core/workers/chunks/b39cd78d2d97bef9909e.js +1 -0
- package/assets/esri/core/workers/chunks/b5f50955c1eee55b67d1.js +1 -0
- package/assets/esri/core/workers/chunks/b688e6463a651779a016.js +1 -0
- package/assets/esri/core/workers/chunks/bb5ed2a796a45c41b0b4.js +1 -0
- package/assets/esri/core/workers/chunks/bdf012e591a8476db467.js +1 -0
- package/assets/esri/core/workers/chunks/{daf7b647bd960d8bad56.js → be52c319a0a81ce1ba36.js} +1 -1
- 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/{89edaa1ffa566908ebca.js → ca5a4f62b09cc8579dc0.js} +1 -1
- package/assets/esri/core/workers/chunks/ce08e3369641da0d7a27.js +2 -0
- package/assets/esri/core/workers/chunks/ce1ccf9ec90b786591e5.js +1 -0
- package/assets/esri/core/workers/chunks/cf0bed7ae27021fd7b05.js +1 -0
- package/assets/esri/core/workers/chunks/cf6f671823fa6c2a9a5e.js +1 -0
- package/assets/esri/core/workers/chunks/d25210574168ead2f813.js +1 -0
- package/assets/esri/core/workers/chunks/d3378c479052d566317c.js +1 -0
- package/assets/esri/core/workers/chunks/{1742dbc6a827cfda471b.js → d3d48401462ef3bf0ad9.js} +1 -1
- package/assets/esri/core/workers/chunks/d3ef23923424ad8c5048.js +1 -0
- package/assets/esri/core/workers/chunks/{46388b86d1b10e6121bd.js → d507d7d7a7282fc38e8d.js} +1 -1
- package/assets/esri/core/workers/chunks/dc0816f064be576a2fa6.js +1 -0
- package/assets/esri/core/workers/chunks/{862e1acd80c4e43831dc.js → dc923e50958b68a50014.js} +1 -1
- package/assets/esri/core/workers/chunks/dd4ecf81250cc001d040.js +1 -0
- package/assets/esri/core/workers/chunks/e10fe4c77b8dc4492092.js +1 -0
- package/assets/esri/core/workers/chunks/e4e1db4e9e5f13167401.js +1 -0
- package/assets/esri/core/workers/chunks/e5ee64e2fb5bfcb716d8.js +1 -0
- package/assets/esri/core/workers/chunks/{e755075ac2e02e881fad.js → e6637f9176566382ed3e.js} +1 -1
- package/assets/esri/core/workers/chunks/e6dc68c4bd8eddb168d1.js +1 -0
- package/assets/esri/core/workers/chunks/eb780f2dafa14f776166.js +1 -0
- package/assets/esri/core/workers/chunks/{723478607badcde5706b.js → eb7f45736c852725b0bb.js} +150 -118
- package/assets/esri/core/workers/chunks/ed31ec586b754241474d.js +1 -0
- package/assets/esri/core/workers/chunks/f38d11be766043413659.js +1 -0
- package/assets/esri/core/workers/chunks/{98a5327fd96d9542b39f.js → f90cad9f007a11154c0d.js} +1 -1
- package/assets/esri/libs/pdfjs/pdf.worker.mjs +63075 -0
- package/assets/esri/libs/pdfjs/wasm/jbig2.wasm +0 -0
- package/assets/esri/libs/pdfjs/wasm/openjpeg.wasm +0 -0
- package/assets/esri/libs/pdfjs/wasm/qcms_bg.wasm +0 -0
- package/assets/esri/libs/pdfjs/wasm/quickjs-eval.wasm +0 -0
- 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/assets/esri/widgets/support/SelectionToolbar/t9n/messages.en.json +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/CloudsComposition.glsl.js +2 -2
- 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/GlobalIllumination.glsl.js +42 -13
- package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
- 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/core/arrayUtils.js +1 -1
- package/core/workers/registry.js +1 -1
- package/geometry/support/geometryUtils.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/meshUtils/elevation.js +1 -1
- 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/GeospatialPDFLayer.d.ts +40 -0
- package/layers/GeospatialPDFLayer.js +2 -0
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/OGCFeatureLayer.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFFrame.js +2 -0
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +5 -0
- package/layers/geospatialPDF/GeospatialPDFParserUtils.js +2 -0
- package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +2 -0
- package/layers/geospatialPDF/LGIDictMapFrame.js +2 -0
- package/layers/geospatialPDF/Projection.js +2 -0
- package/layers/geospatialPDF/ViewportMeasureFrame.js +2 -0
- package/layers/geospatialPDF/renderExtentUtils.js +2 -0
- package/layers/geospatialPDF/sharedUtils.js +2 -0
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/raster/datasets/GeospatialPDFRaster.js +2 -0
- package/layers/support/ElevationQuery.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/layers/support/layersLoader.js +1 -1
- package/layers/types.d.ts +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 +7 -7
- package/portal/PortalItem.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- 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/mesh/templates/shapingUtils.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/input/MapViewInputManager.js +1 -1
- package/views/2d/input/handlers/KeyPan.js +1 -1
- package/views/2d/input/handlers/KeyRotate.js +1 -1
- package/views/2d/layerViewModuleImportUtils.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/GeospatialPDFLayerView2D.js +2 -0
- 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/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.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/2d/types.d.ts +2 -0
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/KeyboardNavigation.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/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/GeospatialPDFLayerView3D.js +2 -0
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/LayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/Intersector.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/support/GroundAndIMSurface.js +1 -1
- package/views/3d/support/MemoryController.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
- package/views/3d/types.d.ts +2 -0
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.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/EvaluateSceneLighting.glsl.js +8 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +1 -1
- 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/CloudsParallaxShading.glsl.js +6 -6
- 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/clouds/CloudsComposition.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusArea.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.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/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.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/SceneView.d.ts +31 -0
- package/views/SceneView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View.d.ts +35 -0
- package/views/View.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileQuerySourceUtils.js +1 -1
- package/views/interactive/options/ViewOptions.d.ts +98 -0
- package/views/interactive/options/ViewOptions.js +2 -0
- package/views/interactive/support/Units.d.ts +10 -2
- package/views/interactive/support/Units.js +1 -1
- package/views/layers/FeatureLikeLayerView.d.ts +27 -5
- package/views/layers/GraphicsLayerView.d.ts +25 -2
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/selection/types.d.ts +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/types.d.ts +9 -3
- 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/ElevationProfile/ElevationProfileLineGround.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/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +8 -2
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar/VisibleElements.d.ts +8 -1
- package/widgets/support/SelectionToolbar/VisibleElements.js +1 -1
- package/widgets/support/SelectionToolbar.d.ts +7 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/assets/esri/core/workers/chunks/01ca17092545d72be7b6.js +0 -1
- package/assets/esri/core/workers/chunks/03918a862455191a8910.js +0 -1
- package/assets/esri/core/workers/chunks/0b727d7bf3e36e146725.js +0 -1
- package/assets/esri/core/workers/chunks/0bd067a5c0bac96caeb5.js +0 -1
- package/assets/esri/core/workers/chunks/0ff13f7a18b0123d253e.js +0 -1
- package/assets/esri/core/workers/chunks/114bc14c49176f64a2c5.js +0 -1
- package/assets/esri/core/workers/chunks/1630913399384030d0b9.js +0 -1
- package/assets/esri/core/workers/chunks/173417fe995e9bfc49d8.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/2cf571d968118b6bdde0.js +0 -1
- package/assets/esri/core/workers/chunks/2e999b05ce179dd9fa08.js +0 -1
- package/assets/esri/core/workers/chunks/354912041363502c6a89.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/43436c7ccc6baefc885d.js +0 -1
- package/assets/esri/core/workers/chunks/4396ef5ab3eb9e9a7df2.js +0 -1
- package/assets/esri/core/workers/chunks/445b0ca1b70730c9a2e6.js +0 -1
- package/assets/esri/core/workers/chunks/48d3da636be15581fd7d.js +0 -1
- package/assets/esri/core/workers/chunks/49e8ff5ed079a9e3be4b.js +0 -1
- package/assets/esri/core/workers/chunks/4efe5827a5c61db3b19d.js +0 -2
- package/assets/esri/core/workers/chunks/501df20cdd09384f6ee2.js +0 -1
- package/assets/esri/core/workers/chunks/50ae209237f104735a30.js +0 -1
- package/assets/esri/core/workers/chunks/54f9062526c2002b7fd7.js +0 -1
- package/assets/esri/core/workers/chunks/56b7ac280bf0be938c14.js +0 -1
- package/assets/esri/core/workers/chunks/5938d5f6e37f49867d5a.js +0 -1
- package/assets/esri/core/workers/chunks/61bcbafd676804ce3e1d.js +0 -1
- package/assets/esri/core/workers/chunks/63f7141c71f29dbe8270.js +0 -1
- package/assets/esri/core/workers/chunks/70347d25968975126fa7.js +0 -1
- package/assets/esri/core/workers/chunks/726ca458b98bb4334431.js +0 -1
- package/assets/esri/core/workers/chunks/75410a4de76e67ed5da4.js +0 -1
- package/assets/esri/core/workers/chunks/85780f4fa4b5509f864e.js +0 -1
- package/assets/esri/core/workers/chunks/862754d2d659528fe884.js +0 -1
- package/assets/esri/core/workers/chunks/8628c027198982baed7c.js +0 -1
- package/assets/esri/core/workers/chunks/8675ab3c4dec2f13b9c6.js +0 -1
- package/assets/esri/core/workers/chunks/8c521caf050a486b6548.js +0 -1
- package/assets/esri/core/workers/chunks/8ce14dd209462f88b163.js +0 -1
- package/assets/esri/core/workers/chunks/917dec9c004218c58950.js +0 -1
- package/assets/esri/core/workers/chunks/91f451b98e0f696043df.js +0 -1
- package/assets/esri/core/workers/chunks/9d92e6f0beed9a8580fa.js +0 -1
- package/assets/esri/core/workers/chunks/a42505b978d54d36d3b6.js +0 -1
- package/assets/esri/core/workers/chunks/a6d4132a16c51323a38a.js +0 -1
- package/assets/esri/core/workers/chunks/a86a4e550a92f770d6d5.js +0 -1
- package/assets/esri/core/workers/chunks/add834f867900a7091d2.js +0 -1
- package/assets/esri/core/workers/chunks/b45ebb1b64ee7314375e.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/baa8bce361a2677533ec.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/cf1106eda10f3cccb1bd.js +0 -1
- package/assets/esri/core/workers/chunks/cfd8317ecd2e63af7c40.js +0 -1
- package/assets/esri/core/workers/chunks/d5e3f8e5b8d2576d3cb3.js +0 -2
- package/assets/esri/core/workers/chunks/d6130cd8a20d24dd9d3c.js +0 -1
- package/assets/esri/core/workers/chunks/da5b3421a984cb94fd58.js +0 -1
- package/assets/esri/core/workers/chunks/da6583e8d88441a1c02a.js +0 -1
- 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/e52f30dfb7c82491a7f2.js +0 -1
- package/assets/esri/core/workers/chunks/e707534a700a2de687ca.js +0 -1
- package/assets/esri/core/workers/chunks/e88eee4c2fc4229c2a8b.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/f75e57d3e02f9828b049.js +0 -1
- package/assets/esri/core/workers/chunks/f774e5b94710ccee1af0.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{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};
|
|
@@ -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 s,uniform as i,define as o,input as r,UniformGroup as l}from"../../GraphShaderModule.js";import{Vec2 as n,Float as a,Vec3 as u,Vec4 as p,length as h,step as m,ifElse as d,greaterThan as c}from"../../graph/glsl.js";import{FeatureVertexInput as y,AFeatureShader as f,FeatureFragmentInput as w}from"./AFeatureShader.js";import{noHit as x,trueHit as v}from"./constants.js";import{getHeatmapCompressionFactor as g}from"./heatmapUtils.js";import{isRectHittest as R,hittestRectCircle as q,isPolygonHittest as F,hittestPolygonCircle as V,hittestCircle as j,isPointHittest as k}from"./hittestUtils.js";class S extends y{}t([s(5,n)],S.prototype,"offset",void 0);class
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as s,uniform as i,define as o,input as r,UniformGroup as l}from"../../GraphShaderModule.js";import{Vec2 as n,Float as a,Vec3 as u,Vec4 as p,length as h,step as m,ifElse as d,greaterThan as c}from"../../graph/glsl.js";import{FeatureVertexInput as y,AFeatureShader as f,FeatureFragmentInput as w}from"./AFeatureShader.js";import{noHit as x,trueHit as v}from"./constants.js";import{getHeatmapCompressionFactor as g}from"./heatmapUtils.js";import{isRectHittest as R,hittestRectCircle as q,isPolygonHittest as F,hittestPolygonCircle as V,hittestCircle as j,isPointHittest as k}from"./hittestUtils.js";class S extends y{}t([s(5,n)],S.prototype,"offset",void 0);class b extends w{}class C extends l{}t([i(a)],C.prototype,"radius",void 0),t([i(a)],C.prototype,"isFieldActive",void 0);class H extends f{constructor(){super(...arguments),this.type="HeatmapAccumulateShader",this.usesHalfFloatPrecision=!1}vertex(t){const{radius:e,isFieldActive:s}=this.kernelControls,i=t.offset,o=s.multiply(this.getVVData(t.id).x).add(new a(1).subtract(s)),r=this.tile.getDisplayViewScreenMat3(this.view).multiply(new u(t.pos,1)).add(this.view.getDisplayViewMat3().multiply(new u(i,0)).multiply(e)),l=this.clip(t.id,t.bitset);return{glPosition:new p(r.xy,l,1),offset:i,fieldValue:o,color:new p(0),...this.maybeRunHittest(t,{},null)}}fragment(t){const{offset:e,fieldValue:s}=t,i=h(e),o=m(i,new a(1)),r=new a(1).subtract(i.multiply(i)),l=r.multiply(r),n=o.multiply(l).multiply(s).multiply(new a(g(this.usesHalfFloatPrecision)));return this.getFragmentOutput(new p(n),t)}hittest(t){const e=this.tile.getViewScreenMat3(this.view).multiply(new u(t.pos,1));return d(k(this.hittestRequest),d(c(j(e.xy,this.kernelControls.radius,this.hittestRequest.position),this.hittestRequest.distance),new a(x),new a(v)),()=>d(R(this.hittestRequest),q(e.xy,this.kernelControls.radius,this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),d(F(this.hittestRequest),V(e.xy,this.kernelControls.radius,this.hittestRequest.viewSize,this.hittestMaskTexture),new a(x))))}}t([o],H.prototype,"usesHalfFloatPrecision",void 0),t([i(C)],H.prototype,"kernelControls",void 0),t([e(0,r(S))],H.prototype,"vertex",null),t([e(0,r(b))],H.prototype,"fragment",null);export{b as HeatmapAccumulateFragmentInput,H as HeatmapAccumulateShader,S as HeatmapAccumulateVertexInput};
|
|
@@ -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 o,input as s}from"../../GraphShaderModule.js";import{Vec4 as l,Vec2 as r,Float as a,step as n,min as p,ifElse as u,greaterThan as m,max as d,Vec3 as c,length as h,clamp as y}from"../../graph/glsl.js";import{BaseHittestVertexInput as f,FeatureVertexInput as w,AFeatureShader as v,FeatureFragmentInput as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,input as s}from"../../GraphShaderModule.js";import{Vec4 as l,Vec2 as r,Float as a,step as n,min as p,ifElse as u,greaterThan as m,max as d,Vec3 as c,length as h,clamp as y}from"../../graph/glsl.js";import{BaseHittestVertexInput as f,FeatureVertexInput as w,AFeatureShader as v,FeatureFragmentInput as b}from"./AFeatureShader.js";import{noHit as V,trueHit as S,epsilon as g,thinLineWidthFactor as x,thinLineHalfWidth as z}from"./constants.js";import{distPointSegment as j,isRectHittest as R,hittestMarkerRect as q,isPolygonHittest as M,hittestPolygon as W,isPointHittest as H}from"./hittestUtils.js";import{VisualVariableColor as O}from"./VisualVariableColor.js";import{VisualVariableOpacity as A}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as F}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as P}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as U}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as D}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableColor as L,getVisualVariableOpacity as T,hasVisualVariableSize as C,getVisualVariableSize as I}from"./vvUtils.js";class k extends w{}t([i(3,l)],k.prototype,"color",void 0),t([i(4,r)],k.prototype,"offset",void 0),t([i(5,r)],k.prototype,"normal",void 0),t([i(6,a)],k.prototype,"halfWidth",void 0),t([i(7,a)],k.prototype,"referenceHalfWidth",void 0),t([i(8,r)],k.prototype,"zoomRange",void 0);class G extends b{}function B(t){return d(new a(x).multiply(n(t,new a(z))),new a(1))}function E(t,e){const{halfWidth:i,normal:o}=t,s=B(i),l=h(o).multiply(i);return y(s.multiply(i.subtract(l)).divide(e.add(s).subtract(new a(1))),new a(0),new a(1))}function J(t,e,i){const{halfWidth:o,referenceHalfWidth:s}=e;if(C(t)){const e=new a(2).multiply(s),l=I(t,i,e),r=new a(g),n=u(m(o,r),o.divide(d(s,r)),new a(1));return new a(.5).multiply(n).multiply(l)}return o}function K(t,e){const{id:i,offset:o,pos:s,normal:r,zoomRange:p}=e,u=t.getFeatureId(i,e.bitset),m=t.view.getDisplayViewMat3(),h=t.tile.getDisplayViewScreenMat3(t.view),y=L(t,u,e.color),f=T(t,u),w=J(t,e,u),v=new a(.5).multiply(t.view.getAntialiasing()),b=d(w.add(v),new a(.45)).add(new a(.1).multiply(v)),V=B(b).multiply(b).multiply(o).multiply(t.tileInfo.scaleFactor),S=t.getLabelOffset(V,e.bitset),g=m.multiply(new c(S,new a(0))),x=h.multiply(new c(t.getLabelPosition(s,i,e.bitset),new a(1))).add(g),z=new a(2).multiply(n(w,new a(0))).add(t.clip(i,e.bitset,p)),j=new l(x.xy,z,1);return{color:y,opacity:f,halfWidth:b,normal:r,scaledOffset:V,scaledHalfWidth:w,glPosition:new l(j.xy,z,1)}}function N(t,e){const{opacity:i,color:o}=t,s=E(t,e);return i.multiply(o).multiply(s)}class Q extends v{constructor(){super(...arguments),this.type="LineShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,e){const i=K(this,t);return{...i,...this.maybeRunHittest(t,e,i.halfWidth)}}fragment(t){const e=N(t,this.view.getAntialiasing());return this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:o,pos1:s,pos2:l}=this.computeHittestTriangle(t,e,null),{distance:r,smallSymbolDistance:d,smallSymbolSizeThreshold:c}=this.hittestRequest,h=n(i,c.multiply(.5)).multiply(r.subtract(d)),y=this.hittestRequest.position,f=p(j(y,o,s),j(y,o,l)).subtract(i).add(h);return u(H(this.hittestRequest),u(m(f,r),new a(V),new a(S)),()=>u(R(this.hittestRequest),q({pos0:o,pos1:s,pos2:l},this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),u(M(this.hittestRequest),W({pos0:o,pos1:s,pos2:l},this.hittestRequest.viewSize,this.hittestMaskTexture),new a(V))))}}t([o(O)],Q.prototype,"visualVariableColor",void 0),t([o(A)],Q.prototype,"visualVariableOpacity",void 0),t([o(F)],Q.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(P)],Q.prototype,"visualVariableSizeScaleStops",void 0),t([o(U)],Q.prototype,"visualVariableSizeStops",void 0),t([o(D)],Q.prototype,"visualVariableSizeUnitValue",void 0),t([e(0,s(k)),e(1,s(f))],Q.prototype,"vertex",null),t([e(0,s(G))],Q.prototype,"fragment",null);export{G as LineFragmentInput,Q as LineShader,k as LineVertexInput,E as getLineAntialiasing,N as getLineFragmentColor,B as getLineThinFactor,K as getLineVertexData};
|
|
@@ -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 o,input as s}from"../../GraphShaderModule.js";import{Vec2 as r,Vec4 as a,Float as l,greaterThan as p,ifElse as n,or as u,Vec3 as m}from"../../graph/glsl.js";import{BaseHittestVertexInput as h,FeatureVertexInput as c,AFeatureShader as d}from"./AFeatureShader.js";import{noHit as f,trueHit as v,bitsetTypeFillOutline as y,bitsetOutlineUsesColorVV as V}from"./constants.js";import{isRectHittest as S,hittestRect as b,isPolygonHittest as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,input as s}from"../../GraphShaderModule.js";import{Vec2 as r,Vec4 as a,Float as l,greaterThan as p,ifElse as n,or as u,Vec3 as m}from"../../graph/glsl.js";import{BaseHittestVertexInput as h,FeatureVertexInput as c,AFeatureShader as d}from"./AFeatureShader.js";import{noHit as f,trueHit as v,bitsetTypeFillOutline as y,bitsetOutlineUsesColorVV as V}from"./constants.js";import{isRectHittest as S,hittestRect as b,isPolygonHittest as g,hittestPolygon as w,hittestFill as x,isPointHittest as j}from"./hittestUtils.js";import{getLineFragmentColor as z,LineFragmentInput as R,getLineVertexData as q}from"./LineShader.js";import{getBit as M,getBitBool as O}from"./utils.js";import{VisualVariableColor as P}from"./VisualVariableColor.js";import{VisualVariableOpacity as F}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as U}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as W}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as A}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as H}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as C,getVisualVariableColor as L}from"./vvUtils.js";class T extends c{}t([i(3,r)],T.prototype,"offset",void 0),t([i(4,a)],T.prototype,"color",void 0),t([i(5,r)],T.prototype,"normal",void 0),t([i(6,l)],T.prototype,"halfWidth",void 0),t([i(7,l)],T.prototype,"referenceHalfWidth",void 0),t([i(8,r)],T.prototype,"zoomRange",void 0);class k extends R{}function D(t,e,i){const{id:o,bitset:s}=e,r=M(s,y),u=p(r,new l(.5)),h=q(t,e),c=n(u,h.halfWidth,new l(0)),d=t.getFeatureId(o,s),f=C(t,d),v=L(t,d,e.color),S=n(u,n(O(s,V),v,e.color),v.multiply(f)),b=t.tile.getDisplayViewScreenMat3(t.view).multiply(new m(t.getLabelPosition(e.pos.xy,e.id,e.bitset),1)),g=t.clip(e.id,e.bitset,e.zoomRange),w=new a(b.xy,g,1),x=n(u,h.glPosition,w),j=i&&t.maybeRunHittest(e,i,u);return{isOutline:r,color:S,opacity:new l(1),halfWidth:c,normal:h.normal,glPosition:x,...j}}class G extends d{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}}t([o(P)],G.prototype,"visualVariableColor",void 0),t([o(F)],G.prototype,"visualVariableOpacity",void 0),t([o(U)],G.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(W)],G.prototype,"visualVariableSizeScaleStops",void 0),t([o(A)],G.prototype,"visualVariableSizeStops",void 0),t([o(H)],G.prototype,"visualVariableSizeUnitValue",void 0);class I extends G{constructor(){super(...arguments),this.type="OutlineFillShader"}vertex(t,e){return D(this,t,e)}fragment(t){const{color:e,isOutline:i}=t,o=p(i,new l(.5)),s=z(t,this.view.getAntialiasing()),r=n(o,s,e),a=n(o,new l(1/255),new l(0));return this.getFragmentOutput(r,t,a)}hittest(t,e,i){const o=this.computeHittestTriangle(t,e,null);return n(j(this.hittestRequest),()=>{const o=x(this,t,e);return n(u(i,p(o,this.hittestRequest.distance)),new l(f),new l(v))},()=>n(S(this.hittestRequest),b(o,this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),n(g(this.hittestRequest),w(o,this.hittestRequest.viewSize,this.hittestMaskTexture),new l(f))))}}t([e(0,s(T)),e(1,s(h))],I.prototype,"vertex",null),t([e(0,s(k))],I.prototype,"fragment",null);export{G as AOutlineFillShader,k as OutlineFillFragmentInput,I as OutlineFillShader,T as OutlineFillVertexInput,D as getOutlineFillVertexData};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const e=3.14159265359/180,o=3.14159265359/128,t=180/3.141592654,c=1/8,n=1,p=1,r=1.1,s=1,x=1/4,a=1/8,b=.2,d=8,f=1e-5,g=.05,h=2,i=0,j=1,k=2,l=3,m=1e-30,q=1,u=4,v=
|
|
2
|
+
const e=3.14159265359/180,o=3.14159265359/128,t=180/3.141592654,c=1/8,n=1,p=1,r=1.1,s=1,x=1/4,a=1/8,b=.2,d=8,f=1e-5,g=.05,h=2,i=0,j=1,k=2,l=3,m=1e-30,q=1,u=4,v=7,w=0,y=2,z=3,A=0,B=2,C=2,D=3,E=0,F=3,G=16777216,H=1.1,I=16,J=128,K=1,L=0,M=1,N=2;export{j as attrVvColor,k as attrVvOpacity,l as attrVvRotation,i as attrVvSize,B as bitsetFillRandomPatternOffset,u as bitsetGenericConsiderAlphaOnly,v as bitsetGenericLabelInstance,q as bitsetGenericLockColor,D as bitsetLineIsSdf,C as bitsetLineScaleDash,w as bitsetMarkerAlignmentMap,y as bitsetMarkerOutlineAllowColorOverride,z as bitsetMarkerScaleSymbolsProportionally,K as bitsetOutlineUsesColorVV,E as bitsetTextIsBackground,F as bitsetTextIsMapAligned,A as bitsetTypeFillOutline,o as c256ToRad,e as cDegToRad,t as cRadToDeg,M as candidateHit,f as epsilon,g as epsilonHitTest,x as extrudeScalePlacementPadding,n as fillPositionPrecision,H as magnifierBarrelFactor,h as maxFilterCount,G as maxRepresentableInt,m as nanMagicNumber,L as noHit,a as offsetPrecision,b as outlineScale,I as packPrecision,d as placementPadding,c as positionPrecision,J as signedToUnsignedByte,p as softEdgeRatio,s as thinLineHalfWidth,r as thinLineWidthFactor,N as trueHit};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{clamp as t}from"../../../../../../../core/mathUtils.js";import{pt2px as e}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as o}from"../../../../../../../geometry/GeometryCursor.js";import{asCIMGeometryCursor as i}from"../../../../../../../symbols/cim/utils.js";import{CIMMarkerPlacementHelper as s}from"../../../../../../../symbols/cim/placements/CIMMarkerPlacementHelper.js";import{getXDirection as r,getYDirection as n}from"../../../alignmentUtils.js";import{labelU16ZoomPrecisionFactor as a,maxLineHeightRatio as l,minLineHeightRatio as h,maxTextLineWidth as c,minTextLineWidth as d,magicLabelLineHeight as f,packDegreesU8 as u}from"../../../definitions.js";import{shapeTextResource as p,shapeTextResourceForMultipoint as m}from"../../../mesh/templates/shapingUtils.js";import{processColorInput as g,getMinMaxZoom as y,packBitset as x}from"../fill/meshWriterUtils.js";import{MeshWriter as S}from"../mesh/MeshWriter.js";import{bitsetTextIsBackground as z,bitsetTextIsMapAligned as _}from"../shaders/constants.js";import{TextMeshTransformProps as b}from"./TextParams.js";import{DataType as M}from"../../../../../../webgl/enums.js";const P=28,R=[4,4],B=[16,4],L={topLeft:B,topRight:B,bottomLeft:B,bottomRight:B};function T(o){return null==o?c:t(e(o),d,c)}function k(e,o){return e/24*f*t(o,h,l)}const v=[4,2],A=[4,6],w={topLeft:v,topRight:v,bottomLeft:A,bottomRight:A},G={topLeft:v,topRight:A,bottomLeft:v,bottomRight:A},I={topLeft:A,topRight:A,bottomLeft:R,bottomRight:R},C={topLeft:R,topRight:R,bottomLeft:A,bottomRight:A},D={topLeft:A,topRight:R,bottomLeft:A,bottomRight:R},E={topLeft:R,topRight:A,bottomLeft:R,bottomRight:A};function N(t){return{backgroundColor:t.boxBackgroundColor??t.backgroundColor??null,borderLineColor:t.boxBorderLineColor??t.borderLineColor??null,borderLineSize:t.boxBorderLineSize>0?t.boxBorderLineSize:t.borderLineWidth??0}}const H={createComputedParams:t=>t,optionalAttributes:{zoomRange:{type:M.UNSIGNED_SHORT,count:2,packPrecisionFactor:a,packTessellation:({minZoom:t,maxZoom:e})=>[t||0,e||P]},clipAngle:{type:M.UNSIGNED_BYTE,count:1,packTessellation:({clipAngle:t})=>Y(t||0)},referenceSymbol:{type:M.BYTE,count:4,packTessellation:(t,o)=>{const i=t.isLineLabel||!t.referenceBounds,s=r(i?"center":o.horizontalAlignment),a=n(i?"middle":o.verticalAlignment),{offsetX:l,offsetY:h,size:c}=i?{offsetX:0,offsetY:0,size:0}:t.referenceBounds;return[e(l),-e(h),Math.round(e(c)),s+1<<2|a+1]}},visibility:{type:M.FLOAT,count:1,otherSource:!0}},attributes:{pos:{type:M.SHORT,count:2,pack:"position",packPrecisionFactor:10},id:{type:M.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:M.UNSIGNED_BYTE,count:1,packTessellation:({isBackground:t,mapAligned:e})=>x([[z,t],[_,!!e]])},offset:{type:M.SHORT,count:2,packPrecisionFactor:8,packAlternating:{count:4,packTessellation:({offsets:t})=>{const{bottomLeft:e,bottomRight:o,topLeft:i,topRight:s}=t;return[i,s,e,o]}}},textureUV:{type:M.UNSIGNED_SHORT,count:2,packAlternating:{count:4,packTessellation:({texcoords:t})=>{const{bottomLeft:e,bottomRight:o,topLeft:i,topRight:s}=t;return[i,s,e,o]}}},color:{type:M.UNSIGNED_BYTE,count:4,normalized:!0,packTessellation:({color:t})=>t},fontAndReferenceSize:{type:M.UNSIGNED_SHORT,count:4,packPrecisionFactor:4,packTessellation:({fontSize:t,sdfSize:o,sdfRadius:i},{referenceSize:s})=>[Math.round(e(t)),Math.round(e(s||t)),o,i]},outlineColor:{type:M.UNSIGNED_BYTE,count:4,normalized:!0,pack:({outlineColor:t})=>g(t)},haloColor:{type:M.UNSIGNED_BYTE,count:4,normalized:!0,pack:({haloColor:t})=>g(t)},outlineAndHaloSize:{type:M.UNSIGNED_SHORT,count:2,packPrecisionFactor:4,packTessellation:({outlineSize:t,haloSize:o})=>[Math.round(e(t)),Math.round(e(o))]}}};class U extends S{constructor(){super(...arguments),this.vertexSpec=H,this._textMeshParamsPropsInitialized=!1}ensurePacked(t,e,o){super.ensurePacked(t,e,o),this._textMeshParamsPropsInitialized&&!this._evaluator.hasDynamicProperties||(this._textMeshTransformProps=new b(this.evaluatedMeshParams),this._textMeshParamsPropsInitialized=!0)}_write(t,{target:e,effectGeometry:o}){const s=this._getShaping();if(!s)return;const r=1===this.evaluatedMeshParams.alignment,n=e.getDisplayId(),{placement:a}=this.evaluatedMeshParams;if(null!=a){if("PrivatePlacementMultipoint"!==a.type)this._writePlacedTextMarkers(t,e,s,i(o));else{const s=this._getMultipointShaping();s&&this._writeMultipointText(t,e,s,i(o))}return}if(o?.nextPath())return o.nextPoint(),this._writeGlyphs(t,n,o.x,o.y,s,0,void 0,{mapAligned:r});if("esriGeometryPolygon"===e.geometryType){const o=e.readCentroidForDisplay();if(!o)return;const[i,a]=o.coords;return this._writeGlyphs(t,n,i,a,s,0,void 0,{mapAligned:r})}if("esriGeometryMultipoint"===e.geometryType){const o=e.readGeometryForDisplay();return void o?.forEachVertex((e,o)=>this._writeGlyphs(t,n,e,o,s,0,void 0,{mapAligned:r}))}const l=e.readXForDisplay(),h=e.readYForDisplay();return this._writeGlyphs(t,n,l,h,s,0,void 0,{mapAligned:r})}_writePlacedTextMarkers(t,i,r,n){const a=n??o.fromFeatureSetReaderCIM(i);if(!a)return;const l=-1,h=s.getPlacement(a,l,this.evaluatedMeshParams.placement,e(1),t.id);if(!h)return;const c=i.getDisplayId();let d=h.next();for(;null!=d;){const e=-d.getAngle(),o=d.tx,i=-d.ty;this._writeGlyphs(t,c,o,i,r,e,void 0,{mapAligned:1===this.evaluatedMeshParams.alignment}),d=h.next()}}_writeMultipointText(t,i,r,n){const a=n??o.fromFeatureSetReaderCIM(i);if(!a)return;const l=-1,h=s.getPlacement(a,l,this.evaluatedMeshParams.placement,e(1),t.id);if(!h)return;const c=i.getDisplayId();let d=h.next(),f=0;for(;null!=d;){const e=d.tx,o=-d.ty,i=-d.getAngle();if(f>=r.glyphs.length)break;this._writeGlyph(t,c,e,o,r,f,i,void 0,{mapAligned:1===this.evaluatedMeshParams.alignment}),d=h.next(),f++}}_getShaping(o){const i=this._textMeshTransformProps,s=this.evaluatedMeshParams;if(!this._hasGlyphs(s.glyphs))return null;const r=e(i.fontSize),n=e(i.offsetX),a=e(i.offsetY),{sdfSize:c}=this._getDefaultGlyphMetrics(s.glyphs),d=T(s.lineWidth),f=k(c,s.lineHeightRatio),{backgroundColor:u,borderLineSize:m}=N(s);return p(s.glyphs,{scale:r/c,angle:i.postAngle,xOffset:n,yOffset:a,horizontalAlignment:s.horizontalAlignment,verticalAlignment:o||s.verticalAlignment,maxLineWidth:d,lineHeight:f,lineHeightRatio:t(s.lineHeightRatio,h,l),decoration:s.decoration,borderLineSizePx:e(m),hasBackground:!!u,useCIMAngleBehavior:s.useCIMAngleBehavior})}_getMultipointShaping(){const o=this._textMeshTransformProps,i=this.evaluatedMeshParams;if(!this._hasGlyphs(i.glyphs))return null;const s=e(o.fontSize),r=e(o.offsetX),n=e(o.offsetY),{sdfSize:a}=this._getDefaultGlyphMetrics(i.glyphs),c=T(i.lineWidth),d=k(a,i.lineHeightRatio),{backgroundColor:f,borderLineSize:u}=N(i);return m(i.glyphs,{scale:s/a,angle:o.postAngle,xOffset:r,yOffset:n,horizontalAlignment:i.horizontalAlignment,verticalAlignment:i.verticalAlignment,maxLineWidth:c,lineHeight:d,lineHeightRatio:t(i.lineHeightRatio,h,l),decoration:i.decoration,borderLineSizePx:e(u),hasBackground:!!f,useCIMAngleBehavior:i.useCIMAngleBehavior})}_hasGlyphs(t){return!!t&&("glyphs"===t.type?t.glyphs.length>0:t.runs.some(t=>t.glyphs.glyphs.length>0))}_getDefaultGlyphMetrics(t){if("glyphs"===t.type)return{sdfSize:t.sdfSize,sdfRadius:t.sdfRadius};const[e]=t.runs;return{sdfSize:e?.glyphs.sdfSize??24,sdfRadius:e?.glyphs.sdfRadius??8}}_writeGlyphs(t,o,i,s,r,n,a,l,h=!0){const c=this.evaluatedMeshParams,d=this._textMeshTransformProps,f=e(d.fontSize),u=d.haloSize,p=d.outlineSize,m=e(d.offsetX),x=e(d.offsetY),S=this._getDefaultGlyphMetrics(c.glyphs),z=g(c.color),[_,b]=y(c.scaleInfo,this.getTileInfo());0!==n&&r.setRotation(n);const M=r.bounds,P=i+M.x+m,R=s+M.y-x,B=2*(c.minPixelBuffer?c.minPixelBuffer/f:1),L=Math.max(M.width,M.height)*B;r.textBox&&(t.recordStart(this.instanceId,this.attributeLayout,r.glyphs[0].textureBinding),h&&t.recordBounds(P,R,L,L),this._writeTextBox(t,o,i,s,r.textBox,a,l),t.recordEnd());for(const e of r.glyphs){t.recordStart(this.instanceId,this.attributeLayout,e.textureBinding),h&&t.recordBounds(P,R,L,L);const{texcoords:r,offsets:n}=e,c=e.fontSize??f;this._writeQuad(t,o,i,s,{texcoords:r,offsets:n,fontSize:c,haloSize:u,outlineSize:p,sdfSize:S.sdfSize,sdfRadius:S.sdfRadius,color:e.color?g(e.color):z,isBackground:!1,referenceBounds:a,minZoom:_,maxZoom:b,...l}),t.recordEnd()}0!==n&&r.setRotation(-n)}_writeGlyph(t,o,i,s,r,n,a,l,h,c=!0){const d=this.evaluatedMeshParams,f=this._textMeshTransformProps,u=e(f.fontSize),p=f.haloSize,m=f.outlineSize,y=e(f.offsetX),x=e(f.offsetY),S=this._getDefaultGlyphMetrics(d.glyphs),z=g(d.color);0!==a&&r.setRotation(a);const _=r.bounds,b=i+_.x+y,M=s+_.y-x,P=2*(d.minPixelBuffer?d.minPixelBuffer/u:1),R=Math.max(_.width,_.height)*P,B=r.glyphs[n];t.recordStart(this.instanceId,this.attributeLayout,B.textureBinding),c&&t.recordBounds(b,M,R,R);const{texcoords:L,offsets:T}=B,k=B.fontSize??u;this._writeQuad(t,o,i,s,{texcoords:L,offsets:T,fontSize:k,haloSize:p,outlineSize:m,sdfSize:S.sdfSize,sdfRadius:S.sdfRadius,color:B.color?g(B.color):z,isBackground:!1,referenceBounds:l,minZoom:0,maxZoom:30,...h}),t.recordEnd(),0!==a&&r.setRotation(-a)}_writeTextBox(t,e,o,i,s,r,n){const a=this.evaluatedMeshParams,{fontSize:l,haloSize:h,outlineSize:c}=this._textMeshTransformProps,{backgroundColor:d,borderLineColor:f,borderLineSize:u}=N(a),{sdfSize:p,sdfRadius:m}=this._getDefaultGlyphMetrics(a.glyphs),y=!!f&&u>0,x={isBackground:!0,fontSize:l,haloSize:h,outlineSize:c,referenceBounds:r,sdfSize:p,sdfRadius:m,...n};d&&(this._writeQuad(t,e,o,i,{texcoords:L,offsets:s.main,color:g(d),...x}),y||(this._writeQuad(t,e,o,i,{texcoords:I,offsets:s.top,color:g(d),...x}),this._writeQuad(t,e,o,i,{texcoords:C,offsets:s.bot,color:g(d),...x}),this._writeQuad(t,e,o,i,{texcoords:D,offsets:s.left,color:g(d),...x}),this._writeQuad(t,e,o,i,{texcoords:E,offsets:s.right,color:g(d),...x}))),y&&(this._writeQuad(t,e,o,i,{texcoords:w,offsets:s.top,color:g(f),...x}),this._writeQuad(t,e,o,i,{texcoords:w,offsets:s.bot,color:g(f),...x}),this._writeQuad(t,e,o,i,{texcoords:G,offsets:s.left,color:g(f),...x}),this._writeQuad(t,e,o,i,{texcoords:G,offsets:s.right,color:g(f),...x}))}_writeQuad(t,e,o,i,s){const r=t.vertexCount();this._writeVertex(t,e,o,i,s),t.indexWrite(r+0),t.indexWrite(r+1),t.indexWrite(r+2),t.indexWrite(r+1),t.indexWrite(r+3),t.indexWrite(r+2)}}const Y=t=>Math.round(t*u);export{U as TextMeshWriter,H as TextVertexSpec,N as getTextBoxStyle,P as maxLabelZoom};
|
|
2
|
+
import{clamp as t}from"../../../../../../../core/mathUtils.js";import{pt2px as e}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as o}from"../../../../../../../geometry/GeometryCursor.js";import{asCIMGeometryCursor as i}from"../../../../../../../symbols/cim/utils.js";import{CIMMarkerPlacementHelper as s}from"../../../../../../../symbols/cim/placements/CIMMarkerPlacementHelper.js";import{getXDirection as r,getYDirection as n}from"../../../alignmentUtils.js";import{labelU16ZoomPrecisionFactor as a,labelPlacementOffsetPadding as l,maxLineHeightRatio as f,minLineHeightRatio as c,maxTextLineWidth as h,minTextLineWidth as d,magicLabelLineHeight as u,packDegreesU8 as m}from"../../../definitions.js";import{shapeTextResource as p,shapeTextResourceForMultipoint as g}from"../../../mesh/templates/shapingUtils.js";import{processColorInput as y,getMinMaxZoom as x,packBitset as S}from"../fill/meshWriterUtils.js";import{MeshWriter as _}from"../mesh/MeshWriter.js";import{bitsetTextIsBackground as z,bitsetTextIsMapAligned as b}from"../shaders/constants.js";import{TextMeshTransformProps as M}from"./TextParams.js";import{DataType as R}from"../../../../../../webgl/enums.js";const P=28,B=[4,4],G=[16,4],L={topLeft:G,topRight:G,bottomLeft:G,bottomRight:G};function k(o){return null==o?h:t(e(o),d,h)}function C(e,o){return e/24*u*t(o,c,f)}const T=[4,2],v=[4,6],A={topLeft:T,topRight:T,bottomLeft:v,bottomRight:v},E={topLeft:T,topRight:v,bottomLeft:T,bottomRight:v},w={topLeft:v,topRight:v,bottomLeft:B,bottomRight:B},I={topLeft:B,topRight:B,bottomLeft:v,bottomRight:v},D={topLeft:v,topRight:B,bottomLeft:v,bottomRight:B},N={topLeft:B,topRight:v,bottomLeft:B,bottomRight:v};function U(t){return t.useBackgroundCallout?{backgroundColor:null,borderLineColor:null,borderLineSize:0}:{backgroundColor:t.boxBackgroundColor??t.backgroundColor??null,borderLineColor:t.boxBorderLineColor??t.borderLineColor??null,borderLineSize:t.boxBorderLineSize>0?t.boxBorderLineSize:t.borderLineWidth??0}}const H={createComputedParams:t=>t,optionalAttributes:{zoomRange:{type:R.UNSIGNED_SHORT,count:2,packPrecisionFactor:a,packTessellation:({minZoom:t,maxZoom:e})=>[t||0,e||P]},clipAngle:{type:R.UNSIGNED_BYTE,count:1,packTessellation:({clipAngle:t})=>O(t||0)},referenceSymbol:{type:R.BYTE,count:4,packTessellation:(t,o)=>{const i=t.isLineLabel||!t.referenceBounds,s=r(i?"center":o.horizontalAlignment),a=n(i?"middle":o.verticalAlignment),{offsetX:l,offsetY:f,size:c}=i?{offsetX:0,offsetY:0,size:0}:t.referenceBounds;return[e(l),-e(f),Math.round(e(c)),s+1<<2|a+1]}}},attributes:{pos:{type:R.SHORT,count:2,pack:"position",packPrecisionFactor:10},id:{type:R.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:R.UNSIGNED_BYTE,count:1,packTessellation:({isBackground:t,mapAligned:e})=>S([[z,t],[b,!!e]])},offset:{type:R.SHORT,count:2,packPrecisionFactor:8,packAlternating:{count:4,packTessellation:({offsets:t})=>{const{bottomLeft:e,bottomRight:o,topLeft:i,topRight:s}=t;return[i,s,e,o]}}},textureUV:{type:R.UNSIGNED_SHORT,count:2,packAlternating:{count:4,packTessellation:({texcoords:t})=>{const{bottomLeft:e,bottomRight:o,topLeft:i,topRight:s}=t;return[i,s,e,o]}}},color:{type:R.UNSIGNED_BYTE,count:4,normalized:!0,packTessellation:({color:t})=>t},fontAndReferenceSize:{type:R.UNSIGNED_SHORT,count:4,packPrecisionFactor:4,packTessellation:({fontSize:t,sdfSize:o,sdfRadius:i},{referenceSize:s})=>[Math.round(e(t)),Math.round(e(s||t)),o,i]},outlineColor:{type:R.UNSIGNED_BYTE,count:4,normalized:!0,pack:({outlineColor:t})=>y(t)},haloColor:{type:R.UNSIGNED_BYTE,count:4,normalized:!0,pack:({haloColor:t})=>y(t)},outlineAndHaloSize:{type:R.UNSIGNED_SHORT,count:2,packPrecisionFactor:4,packTessellation:({outlineSize:t,haloSize:o})=>[Math.round(e(t)),Math.round(e(o))]}}};class Y extends _{constructor(){super(...arguments),this.calloutRecordsUseLabelPhase=!1,this.vertexSpec=H,this._textMeshParamsPropsInitialized=!1,this._calloutEffectGeometry=null}getCalloutEffectGeometry(t){return this._calloutEffectGeometry}ensurePacked(t,e,o){super.ensurePacked(t,e,o),this._textMeshParamsPropsInitialized&&!this._evaluator.hasDynamicProperties||(this._textMeshTransformProps=new M(this.evaluatedMeshParams),this._textMeshParamsPropsInitialized=!0)}getLocalCalloutReferenceInfo(){return this._createLocalCalloutReferenceInfo(this._getShaping())}_createLocalCalloutReferenceInfo(t){if(!t)return;const e=t.boundsT,[o,i]=this._getReferenceSymbolOffset(),s={xmin:e.xmin,ymin:-e.ymax,xmax:e.xmax,ymax:-e.ymin};return{anchor:{x:0,y:0},bodyBounds:{xmin:s.xmin+o,ymin:s.ymin-i,xmax:s.xmax+o,ymax:s.ymax-i},collisionBodyBounds:s}}_getReferenceSymbolOffset(){if(!this._references)return[0,0];for(const t of this._references){const o=t.getBoundsInfo();if(!o)continue;const i=e(o.size)/2+l+e(this.evaluatedMeshParams.labelOffsetDistance??0);return[e(o.offsetX)+r(this.evaluatedMeshParams.horizontalAlignment)*i,-e(o.offsetY)+n(this.evaluatedMeshParams.verticalAlignment)*i]}return[0,0]}_write(t,{target:e,effectGeometry:o}){this._calloutEffectGeometry=null;const s=this._getShaping();if(!s)return;const r=1===this.evaluatedMeshParams.alignment,n=e.getDisplayId(),{placement:a}=this.evaluatedMeshParams;if(null!=a){if("PrivatePlacementMultipoint"!==a.type)this._writePlacedTextMarkers(t,e,s,i(o));else{const s=this._getMultipointShaping();s&&this._writeMultipointText(t,e,s,i(o))}return}if(o?.nextPath())return o.nextPoint(),this._setCalloutEffectGeometry(o.x,o.y),this._writeGlyphs(t,n,o.x,o.y,s,0,void 0,{mapAligned:r});if("esriGeometryPolygon"===e.geometryType){const o=e.readCentroidForDisplay();if(!o)return;const[i,a]=o.coords;return this._setCalloutEffectGeometry(i,a),this._writeGlyphs(t,n,i,a,s,0,void 0,{mapAligned:r})}if("esriGeometryMultipoint"===e.geometryType){const o=e.readGeometryForDisplay();return void o?.forEachVertex((e,o)=>{this._setCalloutEffectGeometry(e,o),this._writeGlyphs(t,n,e,o,s,0,void 0,{mapAligned:r})})}const l=e.readXForDisplay(),f=e.readYForDisplay();return this._setCalloutEffectGeometry(l,f),this._writeGlyphs(t,n,l,f,s,0,void 0,{mapAligned:r})}_writePlacedTextMarkers(t,i,r,n){const a=n??o.fromFeatureSetReaderCIM(i);if(!a)return;const l=-1,f=s.getPlacement(a,l,this.evaluatedMeshParams.placement,e(1),t.id);if(!f)return;const c=i.getDisplayId();let h=f.next();for(;null!=h;){const e=-h.getAngle(),o=h.tx,i=-h.ty;this._setCalloutEffectGeometry(o,i),this._writeGlyphs(t,c,o,i,r,e,void 0,{mapAligned:1===this.evaluatedMeshParams.alignment}),h=f.next()}}_writeMultipointText(t,i,r,n){const a=n??o.fromFeatureSetReaderCIM(i);if(!a)return;const l=-1,f=s.getPlacement(a,l,this.evaluatedMeshParams.placement,e(1),t.id);if(!f)return;const c=i.getDisplayId();let h=f.next(),d=0;for(;null!=h;){const e=h.tx,o=-h.ty,i=-h.getAngle();if(this._setCalloutEffectGeometry(e,o),d>=r.glyphs.length)break;this._writeGlyph(t,c,e,o,r,d,i,void 0,{mapAligned:1===this.evaluatedMeshParams.alignment}),h=f.next(),d++}}_setCalloutEffectGeometry(t,e){this._calloutEffectGeometry??=o.fromJSON({x:t,y:e})}_getShaping(o){const i=this._textMeshTransformProps,s=this.evaluatedMeshParams;if(!this._hasGlyphs(s.glyphs))return null;const r=e(i.fontSize),n=e(i.offsetX),a=e(i.offsetY),{sdfSize:l}=this._getDefaultGlyphMetrics(s.glyphs),h=k(s.lineWidth),d=C(l,s.lineHeightRatio),{backgroundColor:u,borderLineSize:m}=U(s);return p(s.glyphs,{scale:r/l,angle:i.postAngle,xOffset:n,yOffset:a,horizontalAlignment:s.horizontalAlignment,verticalAlignment:o||s.verticalAlignment,maxLineWidth:h,lineHeight:d,lineHeightRatio:t(s.lineHeightRatio,c,f),decoration:s.decoration,borderLineSizePx:e(m),hasBackground:!!u,useCIMAngleBehavior:s.useCIMAngleBehavior})}_getMultipointShaping(){const o=this._textMeshTransformProps,i=this.evaluatedMeshParams;if(!this._hasGlyphs(i.glyphs))return null;const s=e(o.fontSize),r=e(o.offsetX),n=e(o.offsetY),{sdfSize:a}=this._getDefaultGlyphMetrics(i.glyphs),l=k(i.lineWidth),h=C(a,i.lineHeightRatio),{backgroundColor:d,borderLineSize:u}=U(i);return g(i.glyphs,{scale:s/a,angle:o.postAngle,xOffset:r,yOffset:n,horizontalAlignment:i.horizontalAlignment,verticalAlignment:i.verticalAlignment,maxLineWidth:l,lineHeight:h,lineHeightRatio:t(i.lineHeightRatio,c,f),decoration:i.decoration,borderLineSizePx:e(u),hasBackground:!!d,useCIMAngleBehavior:i.useCIMAngleBehavior})}_hasGlyphs(t){return!!t&&("glyphs"===t.type?t.glyphs.length>0:t.runs.some(t=>t.glyphs.glyphs.length>0))}_getDefaultGlyphMetrics(t){if("glyphs"===t.type)return{sdfSize:t.sdfSize,sdfRadius:t.sdfRadius};const[e]=t.runs;return{sdfSize:e?.glyphs.sdfSize??24,sdfRadius:e?.glyphs.sdfRadius??8}}_writeGlyphs(t,o,i,s,r,n,a,l,f=!0){const c=this.evaluatedMeshParams,h=this._textMeshTransformProps,d=e(h.fontSize),u=h.haloSize,m=h.outlineSize,p=e(h.offsetX),g=e(h.offsetY),S=this._getDefaultGlyphMetrics(c.glyphs),_=y(c.color),[z,b]=x(c.scaleInfo,this.getTileInfo());0!==n&&r.setRotation(n);const M=r.bounds,R=i+M.x+p,P=s+M.y-g,B=2*(c.minPixelBuffer?c.minPixelBuffer/d:1),G=Math.max(M.width,M.height)*B;r.textBox&&(t.recordStart(this.instanceId,this.attributeLayout,r.glyphs[0].textureBinding),f&&t.recordBounds(R,P,G,G),this._writeTextBox(t,o,i,s,r.textBox,a,l),t.recordEnd());for(const e of r.glyphs){t.recordStart(this.instanceId,this.attributeLayout,e.textureBinding),f&&t.recordBounds(R,P,G,G);const{texcoords:r,offsets:n}=e,c=e.fontSize??d;this._writeQuad(t,o,i,s,{texcoords:r,offsets:n,fontSize:c,haloSize:u,outlineSize:m,sdfSize:S.sdfSize,sdfRadius:S.sdfRadius,color:e.color?y(e.color):_,isBackground:!1,referenceBounds:a,minZoom:z,maxZoom:b,...l}),t.recordEnd()}0!==n&&r.setRotation(-n)}_writeGlyph(t,o,i,s,r,n,a,l,f,c=!0){const h=this.evaluatedMeshParams,d=this._textMeshTransformProps,u=e(d.fontSize),m=d.haloSize,p=d.outlineSize,g=e(d.offsetX),x=e(d.offsetY),S=this._getDefaultGlyphMetrics(h.glyphs),_=y(h.color);0!==a&&r.setRotation(a);const z=r.bounds,b=i+z.x+g,M=s+z.y-x,R=2*(h.minPixelBuffer?h.minPixelBuffer/u:1),P=Math.max(z.width,z.height)*R,B=r.glyphs[n];t.recordStart(this.instanceId,this.attributeLayout,B.textureBinding),c&&t.recordBounds(b,M,P,P);const{texcoords:G,offsets:L}=B,k=B.fontSize??u;this._writeQuad(t,o,i,s,{texcoords:G,offsets:L,fontSize:k,haloSize:m,outlineSize:p,sdfSize:S.sdfSize,sdfRadius:S.sdfRadius,color:B.color?y(B.color):_,isBackground:!1,referenceBounds:l,minZoom:0,maxZoom:30,...f}),t.recordEnd(),0!==a&&r.setRotation(-a)}_writeTextBox(t,e,o,i,s,r,n){const a=this.evaluatedMeshParams,{fontSize:l,haloSize:f,outlineSize:c}=this._textMeshTransformProps,{backgroundColor:h,borderLineColor:d,borderLineSize:u}=U(a),{sdfSize:m,sdfRadius:p}=this._getDefaultGlyphMetrics(a.glyphs),g=!!d&&u>0,x={isBackground:!0,fontSize:l,haloSize:f,outlineSize:c,referenceBounds:r,sdfSize:m,sdfRadius:p,...n};h&&(this._writeQuad(t,e,o,i,{texcoords:L,offsets:s.main,color:y(h),...x}),g||(this._writeQuad(t,e,o,i,{texcoords:w,offsets:s.top,color:y(h),...x}),this._writeQuad(t,e,o,i,{texcoords:I,offsets:s.bot,color:y(h),...x}),this._writeQuad(t,e,o,i,{texcoords:D,offsets:s.left,color:y(h),...x}),this._writeQuad(t,e,o,i,{texcoords:N,offsets:s.right,color:y(h),...x}))),g&&(this._writeQuad(t,e,o,i,{texcoords:A,offsets:s.top,color:y(d),...x}),this._writeQuad(t,e,o,i,{texcoords:A,offsets:s.bot,color:y(d),...x}),this._writeQuad(t,e,o,i,{texcoords:E,offsets:s.left,color:y(d),...x}),this._writeQuad(t,e,o,i,{texcoords:E,offsets:s.right,color:y(d),...x}))}_writeQuad(t,e,o,i,s){const r=t.vertexCount();this._writeVertex(t,e,o,i,s),t.indexWrite(r+0),t.indexWrite(r+1),t.indexWrite(r+2),t.indexWrite(r+1),t.indexWrite(r+3),t.indexWrite(r+2)}}const O=t=>Math.round(t*m);export{Y as TextMeshWriter,H as TextVertexSpec,U as getTextBoxStyle,P as maxLabelZoom};
|
|
@@ -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{labelU16ZoomPrecisionFactor as i,labelPlacementOffsetPadding as s,packDegreesU8 as o}from"../../../definitions.js";import{location as l,option as a,uniform as r,texture as n,define as p,input as d,ComputeVertexInput as u}from"../../GraphShaderModule.js";import{Vec4 as
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{labelU16ZoomPrecisionFactor as i,labelPlacementOffsetPadding as s,packDegreesU8 as o}from"../../../definitions.js";import{location as l,option as a,uniform as r,texture as n,define as p,input as d,ComputeVertexInput as u}from"../../GraphShaderModule.js";import{Vec4 as c,Vec2 as m,Float as y,Sampler2D as h,mod as f,floor as v,step as w,and as b,lessThan as x,greaterThanEqual as V,Vec3 as g,Mat3 as S,ifElse as R,equal as z,greaterThan as j,Bool as A,texture2D as M,smoothstep as C,Int as O,bitRShift as T,bitAnd as H}from"../../graph/glsl.js";import{FeatureVertexInput as L,AFeatureShader as P,FeatureFragmentInput as F}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as q,bitsetTextIsMapAligned as I,noHit as N,trueHit as U}from"../shaders/constants.js";import{isPointHittest as _,distPointTriangle as k,isRectHittest as D,hittestRect as B,isPolygonHittest as E,hittestPolygon as W}from"../shaders/hittestUtils.js";import{MosaicInfo as G}from"../shaders/MosaicInfo.js";import{getBit as Z}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 X}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as Y}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as $}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as tt}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as et,getVisualVariableRotation as it}from"../shaders/vvUtils.js";const st=1/o;class ot extends L{}t([l(3,c)],ot.prototype,"color",void 0),t([l(4,m)],ot.prototype,"offset",void 0),t([l(5,m)],ot.prototype,"textureUV",void 0),t([l(6,c)],ot.prototype,"fontAndReferenceSize",void 0),t([l(7,c)],ot.prototype,"outlineColor",void 0),t([l(8,c)],ot.prototype,"haloColor",void 0),t([l(9,m)],ot.prototype,"outlineAndHaloSize",void 0),t([l(10,m)],ot.prototype,"zoomRange",void 0),t([l(11,y)],ot.prototype,"clipAngle",void 0),t([l(12,c)],ot.prototype,"referenceSymbol",void 0);class lt extends u{}t([l(13,m)],lt.prototype,"offsetNextVertex1",void 0),t([l(14,m)],lt.prototype,"offsetNextVertex2",void 0);class at extends F{}class rt extends P{constructor(){super(...arguments),this.type="TextShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"]},this.textRenderPassType=0,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(t,e){const{clipAngle:s,zoomRange:o}=t,l=s.multiply(st),a=f(l.subtract(this.view.getRotation()),new y(360));let r=new y(0);const n=i,p=v(this.tileInfo.currentZoom.multiply(n)).divide(n),d=o.x,u=o.y,c=new y(1).subtract(w(d,p)).multiply(2),m=new y(b(V(a,new y(90)),x(a,new y(270)))).multiply(2),h=new y(2).multiply(new y(1).subtract(w(p,u)));return r=r.add(e.multiply(c)),r=r.add(e.multiply(m)),r=r.add(h),r=r.add(new y(2).multiply(this.getLabelHidden(t.id,t.bitset))),r}vertex(t,e){const i=Z(t.bitset,q),o=new y(1).subtract(i),l=this.getFeatureId(t.id,t.bitset);let a=t.fontAndReferenceSize[0];const r=t.fontAndReferenceSize[1],n=t.fontAndReferenceSize[2],p=t.fontAndReferenceSize[3];let d=a.divide(n);const u=1===this.textRenderPassType?t.outlineColor:2===this.textRenderPassType?t.haloColor:this._getVertexColor(t,l),h=this.tile.getDisplayViewScreenMat3(this.view).multiply(new g(t.pos,1));let f=t.offset,v=new y(1),w=S.identity(),b=new m(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,i=e.xy,o=e.z,a=this._unpackDirection(e.w),r=et(this,l,o).divide(2),n=a.multiply(r.add(s));b=i.add(n),f=f.add(b)}else{v=et(this,l,r).divide(r),a=a.multiply(v),d=d.multiply(v),f=f.multiply(v),w=it(this,l),f=w.multiply(new g(f,0)).xy}const x=Z(t.bitset,I),V=this._getViewRotationMatrix(x).multiply(new g(f,0)).multiply(this.tileInfo.scaleFactor);let M=this.isLabel?this.clipLabel(t,x):this.clip(t.id,t.bitset,t.zoomRange);M=this.isBackgroundPass?M.add(o.multiply(2)):M.add(i.multiply(2));let C=new y(0);if(1===this.textRenderPassType){M=M.add(R(z(t.outlineAndHaloSize.x,new y(0)),new y(2),new y(0)));C=new y(t.outlineAndHaloSize.x).divide(d).divide(p)}if(2===this.textRenderPassType){const e=t.outlineAndHaloSize.x,i=new y(t.outlineAndHaloSize.y);M=M.add(R(z(i,new y(0)),new y(2),new y(0)));C=i.add(e).divide(d).divide(p)}const O=this.isLabel?j(M,new y(1)):new A(!1);return{glPosition:new c(h.xy.add(V.xy),M,1),color:u,size:d,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new y(.105).multiply(n).divide(a).divide(this.view.pixelRatio),outlineDistanceOffset:C,...this.maybeRunHittest(t,e,{vvSizeAdjustment:v,vvRotation:w,labelOffset:b,labelClipped:O,scaleFactor:this.tileInfo.scaleFactor})}}_getViewRotationMatrix(t){const e=this.view.getDisplayViewMat3(),i=this.view.displayMat3,s=new y(1).subtract(t);return e.multiply(t).add(i.multiply(s))}_getHittestAlignmentMatrix(t){const e=this.tile.getTileMat3(this.view),i=this.view.viewMat3.multiply(e),s=e,o=new y(1).subtract(t);return i.multiply(t).add(s.multiply(o))}fragment(t){const e=new y(2/8),i=new y(1).subtract(e),s=M(this.mosaicTexture,t.textureUV).a;let o=i.subtract(t.outlineDistanceOffset);this.highlight&&(o=o.divide(2));const l=t.antialiasingWidth,a=C(o.subtract(l),o.add(l),s);return this.getFragmentOutput(t.color.multiply(a),t)}computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:s,labelOffset:o,scaleFactor:l}){let a,r,n;this.isLabel?(a=new g(t.offset.multiply(l).add(o),0),r=new g(e.offsetNextVertex1.multiply(l).add(o),0),n=new g(e.offsetNextVertex2.multiply(l).add(o),0)):(a=s.multiply(new g(t.offset.multiply(l).multiply(i),0)),r=s.multiply(new g(e.offsetNextVertex1.multiply(l).multiply(i),0)),n=s.multiply(new g(e.offsetNextVertex2.multiply(l).multiply(i),0)));const p=this.tile.getViewScreenMat3(this.view).multiply(new g(t.pos,1)),d=Z(t.bitset,I),u=this._getHittestAlignmentMatrix(d);return{pos0:p.add(u.multiply(a)).xy,pos1:p.add(u.multiply(r)).xy,pos2:p.add(u.multiply(n)).xy}}hittest(t,e,i){const{vvSizeAdjustment:s,vvRotation:o,labelOffset:l,labelClipped:a,scaleFactor:r}=i,{pos0:n,pos1:p,pos2:d}=this.computeHittestTriangle(t,e,{vvSizeAdjustment:s,vvRotation:o,labelOffset:l,scaleFactor:r}),u={pos0:n,pos1:p,pos2:d},c=this.isLabel?a:new A(!1);return R(c,new y(N),()=>R(_(this.hittestRequest),()=>{const t=k(this.hittestRequest.position,n,p,d);return R(j(t,this.hittestRequest.distance),new y(N),new y(U))},()=>R(D(this.hittestRequest),B(u,this.hittestRequest.rect.xy,this.hittestRequest.rect.zw),R(E(this.hittestRequest),W(u,this.hittestRequest.viewSize,this.hittestMaskTexture),new y(N)))))}_unpackDirection(t){const e=new O(t),i=T(e,new O(2)),s=H(e,new O(3));return new m(new y(i).subtract(1),new y(s).subtract(1))}_getVertexColor(t,e){let i=t.color;if(this.visualVariableColor){const s=this.getColorValue(e);i=this.visualVariableColor.getColor(s,t.color,new A(!1))}if(this.visualVariableOpacity){const t=this.getOpacityValue(e),s=this.visualVariableOpacity.getOpacity(t);i=i.multiply(s)}return i}}t([a(J)],rt.prototype,"visualVariableColor",void 0),t([a(K)],rt.prototype,"visualVariableOpacity",void 0),t([a(Q)],rt.prototype,"visualVariableRotation",void 0),t([a(X)],rt.prototype,"visualVariableSizeMinMaxValue",void 0),t([a(Y)],rt.prototype,"visualVariableSizeScaleStops",void 0),t([a($)],rt.prototype,"visualVariableSizeStops",void 0),t([a(tt)],rt.prototype,"visualVariableSizeUnitValue",void 0),t([r(G)],rt.prototype,"mosaicInfo",void 0),t([n(h)],rt.prototype,"mosaicTexture",void 0),t([p],rt.prototype,"textRenderPassType",void 0),t([p],rt.prototype,"isBackgroundPass",void 0),t([p],rt.prototype,"isLabel",void 0),t([e(0,d(ot)),e(1,d(lt))],rt.prototype,"vertex",null),t([e(0,d(at))],rt.prototype,"fragment",null);export{at as TextFragmentInput,rt as TextShader,ot as TextVertexInput};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"../../../../../core/has.js";import{clone as e}from"../../../../../core/lang.js";import{OverrideHelper as t}from"../../../../../symbols/cim/OverrideHelper.js";import{FeatureMatcher as r}from"./Matcher.js";import{getCIMSymbols as s,getCIMSymbol as
|
|
2
|
+
import has from"../../../../../core/has.js";import{clone as e}from"../../../../../core/lang.js";import{OverrideHelper as t}from"../../../../../symbols/cim/OverrideHelper.js";import{FeatureMatcher as r,combineMeshWriterGroups as o}from"./Matcher.js";import{getCIMSymbols as s,getCIMSymbol as n}from"../../../layers/support/annodime/cimAnnotations.js";import{createDebugWriters as i}from"../../../layers/support/annodime/debugUtils.js";import{createAnnotationMatcherFeatureInfo as l,mixFeature as m}from"../../../layers/support/annodime/MatcherGeometryOverride.js";import{createTileObjectId as c}from"../../../layers/support/annodime/TileObjectId.js";import{hasSymbolFields as a,symbolFields as y}from"../../../layers/support/annodime/virtualFields.js";class u extends r{constructor(e,t){super(),this._context=e,this._symbolCollection=t,this._meshWriters=new Map,this._matcherGeometryOverrides=new Map,this._symbols=s(t)}static async fromAnnotationSchema(e,t){return new u(e,t.symbolCollection)}hasArcadeDependency(){return!1}doMatch(e,t,r){return this._meshWriters.get(c(r,e.getObjectId()))}async fetchResources(e,t,r,o){this._meshWriters.clear(),this._matcherGeometryOverrides.clear();const s=t.getCursor();for(;s.next();){const r=l(s);if(!r)continue;const n=m(s,r);if(!n)continue;const i=await this._createSymbolReference(s,n,r);if(!i)continue;const a=c(o,s.getObjectId());let y=this._meshWriters.get(a);y||(y=await this._createGroup(i,e,t.geometryType),this._meshWriters.set(a,y)),this._matcherGeometryOverrides.set(a,r.geometryOverride)}}async _createGroup(e,t,r){const s=await t.fetchMeshResourceImmediate({type:"mesh-request",symbolReference:e}),n=await b(this._context,s?.meshes||[]);if(has("esri-2d-annotation-dimension-debug")){const e=await i(this._context,t,r);return e.writers.length?o(n,e):n}return n}async _createSymbolReference(e,r,o){const s=this._getUnresolvedSymbolReference(o);if(!s)return null;p(s);const n=await t.resolveSymbolOverrides(s,r,e.metadata.outSpatialReference,null,e.geometryType);return n?{type:"CIMSymbolReference",symbol:n}:null}_getUnresolvedSymbolReference(t){const{annotationGraphic:r,annotationGeometryType:o}=t,{bloated:s,symbolID:n}=r;if(s||a(r))return this._getProcessedSymbolReference(t);if(null!=n){const t=this._symbols[n][o];return t?e(t.data):null}return null}_getProcessedSymbolReference(e){const{annotationGraphic:t,annotationGeometryType:r}=e,{bloated:o,symbol:s,symbolID:i}=t;let l=this._getRawSymbolReference(s,i);if(!l||!l.symbol)return null;if(o||(l=this._applySymbolFields(l,t)),!l.symbol||"CIMTextSymbol"!==l.symbol.type)return null;const{data:m}=n(l.symbol,r);return{type:"CIMSymbolReference",symbol:m.symbol,primitiveOverrides:[...l.primitiveOverrides||[],...m.primitiveOverrides||[]]}}_getRawSymbolReference(e,t){if(e&&null!=e.symbol&&"CIMTextSymbol"===e.symbol.type)return e;if(null!=t){const e=this._symbolCollection.find(e=>(e.iD??0)===t);if(e)return{type:"CIMSymbolReference",symbol:e.symbol}}return null}_applySymbolFields(t,r){if(!t.symbol||"CIMTextSymbol"!==t.symbol.type)return t;const o=e(t.symbol);for(const e of y)e.setOnSymbol(o,r);return{type:"CIMSymbolReference",symbol:o,primitiveOverrides:t.primitiveOverrides}}cleanup(e,t,r){const o=t.getObjectId(),s=c(r,o);this._matcherGeometryOverrides.delete(s),this._meshWriters.delete(s)}getMatcherGeometryOverride(e){return this._matcherGeometryOverrides.get(e)??null}getCalloutAnchor(e,t){return this._matcherGeometryOverrides.get(c(t,e.getObjectId()))?.absoluteCalloutAnchor??null}}function b(e,t){const r=t.map(e=>({...e}));return e.createMeshWriters(r)}function h(e){return e}function p(e){if(!e.symbol||!("symbolLayers"in e.symbol))return;const t=h({type:"PrivateMatcherGeometryOverrideEffect"});e.symbol.symbolLayers=(e.symbol.symbolLayers||[]).map(e=>({...e,effects:[t,...e.effects||[]]}))}export{u as AnnotationMatcher};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"../../../../../core/has.js";import{OverrideHelper as e}from"../../../../../symbols/cim/OverrideHelper.js";import{hasRichTextFormattingTags as t}from"../../../../../symbols/cim/richTextUtils.js";import{FeatureMatcher as r}from"./Matcher.js";import{createDebugWriters as
|
|
2
|
+
import has from"../../../../../core/has.js";import{OverrideHelper as e}from"../../../../../symbols/cim/OverrideHelper.js";import{hasRichTextFormattingTags as t}from"../../../../../symbols/cim/richTextUtils.js";import{FeatureMatcher as r,combineMeshWriterGroups as s}from"./Matcher.js";import{createDebugWriters as i}from"../../../layers/support/annodime/debugUtils.js";import o from"../../../layers/support/annodime/DimensionInfo.js";import{dimensionSymbols as n}from"../../../layers/support/annodime/dimensionSymbols.js";import{getFontForCIMTextSymbol as m}from"../../../layers/support/annodime/dimensionUtils.js";import{createDimensionMatcherFeatureInfo as a,mixFeature as c}from"../../../layers/support/annodime/MatcherGeometryOverride.js";import{createTileObjectId as h}from"../../../layers/support/annodime/TileObjectId.js";class l extends r{constructor(e,t){super(),this._context=e,this._schema=t,this._meshWriters=new Map,this._dimensionInfos=new Map,this._matcherGeometryOverrides=new Map}static async fromDimensionSchema(e,t){return new l(e,t)}hasArcadeDependency(){return!1}doMatch(e,t,r){return this._meshWriters.get(h(r,e.getObjectId()))}async fetchResources(e,t,r,s){this._meshWriters.clear(),this._dimensionInfos.clear(),this._matcherGeometryOverrides.clear();const n=t.metadata.outSpatialReference,m=t.metadata.attributeSpatialReference??t.metadata.spatialReference??n,l=t.getCursor();for(;l.next();){const r=a(l);if(!r)continue;const y=c(l,r);if(!y)continue;const p=h(s,l.getObjectId()),d=this._readStyleId(l),u=this._getStyle(d);if(!u){let r=this._meshWriters.get(p);r||(r=await i(this._context,e,t.geometryType),this._meshWriters.set(p,r));continue}const f=await o.create(u,y,n,m);await this._cacheGlyphs(f,y,e),this._dimensionInfos.set(p,f),this._matcherGeometryOverrides.set(p,r.geometryOverride);let _=this._meshWriters.get(p);_||(_=await this._createGroup(u,l,y,e,t.geometryType),this._meshWriters.set(p,_))}}async _createGroup(e,t,r,o,m){const a=n.processDimensionStyle(e),[c,h,l,y,p]=await Promise.all([this._createMeshesForSymbol(a.beginDimensionLineSymbol,a.primitiveOverrides,t,r,o),this._createMeshesForSymbol(a.endDimensionLineSymbol,a.primitiveOverrides,t,r,o),this._createMeshesForSymbol(a.beginExtensionLineSymbol,a.primitiveOverrides,t,r,o),this._createMeshesForSymbol(a.endExtensionLineSymbol,a.primitiveOverrides,t,r,o),this._createMeshesForSymbol(a.textSymbol,a.primitiveOverrides,t,r,o)]),d=await this._context.createMeshWriters([...c,...h,...l,...y,...p]);if(has("esri-2d-annotation-dimension-debug")){const e=await i(this._context,o,m);return e.writers.length?s(d,e):d}return d}async _createMeshesForSymbol(t,r,s,i,o){if(!t)return[];const n=await e.resolveSymbolOverrides({type:"CIMSymbolReference",primitiveOverrides:r,symbol:t},i,s.metadata.outSpatialReference,null,s.geometryType);if(!n)return[];const m=await o.fetchMeshResourceImmediate({type:"mesh-request",symbolReference:{type:"CIMSymbolReference",symbol:n}});return m?.meshes??[]}_readStyleId(e){return parseInt(`${e.readAttribute("STYLEID")}`,10)}_getStyle(e){return this._schema.styleCollection.find(t=>(t.iD??0)===e)}async _cacheGlyphs(e,r,s){const i=e.getTextString(r);if(!i)return;const o=await s.fetchResourceImmediate({type:"cim-rasterization-info",resource:{type:"text",textString:i||"",font:m(e.textSymbol),symbol:e.textSymbol,supportsRichText:t(i)}});"glyphs"!==o?.type&&"rich-glyphs"!==o?.type||e.setTextResource(o)}cleanup(e,t,r){const s=t.getObjectId(),i=h(r,s);this._meshWriters.delete(i),this._dimensionInfos.delete(i),this._matcherGeometryOverrides.delete(i)}getAnalyzedGraphic(e){return this._dimensionInfos.get(e)||null}getMatcherGeometryOverride(e){return this._matcherGeometryOverrides.get(e)??null}}export{l as DimensionMatcher};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{FeatureMatcher as e}from"./Matcher.js";class
|
|
2
|
+
import{FeatureMatcher as e,combineMeshWriterGroups as t}from"./Matcher.js";class s extends e{constructor(e,t){super(),this._intervals=[],this._isMaxInclusive=t,this._field=e}static async fromIntervalSchema(e,r){const a=await e.storage.createComputedField(r),i=new s(a,r.isMaxInclusive);await Promise.all(r.intervals.map(async s=>{const r=await e.createMeshWriters(s.meshes),a=await e.createMeshWriters(s.alternateMeshes),n=t(r,a);i.add(s,n)}));const n=await e.createMeshWriters(r.defaultSymbol);i.setDefault(n);const l=await e.createMeshWriters(r.backgroundFill);return i.setBackgroundFill(l),i}add(e,t){this._intervals.push({interval:e,result:t}),this._intervals.sort((e,t)=>e.interval.min-t.interval.min)}size(){return super.size()+this._intervals.length}hasArcadeDependency(e){return this._field?.hasArcadeDependency(e)||this._intervals.some(t=>t.result.writers.some(t=>t.hasArcadeDependency(e)))}doMatch(e,t,s){const r=this._field?.read(e,t);if(null==r||isNaN(r)||r===1/0||r===-1/0)return null;for(let a=0;a<this._intervals.length;a++){const{interval:e,result:t}=this._intervals[a],s=r>=e.min,i=this._isMaxInclusive?r<=e.max:r<e.max;if(s&&i)return t}return null}}export{s as IntervalMatcher};
|