@arcgis/core 5.0.0-next.65 → 5.0.0-next.67
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.d.ts +4 -4
- package/Map.d.ts +1 -1
- package/WebDocument2D.d.ts +2 -3
- package/WebScene.d.ts +2 -3
- package/applications/Components/QuantityFormatter.d.ts +14 -1
- package/applications/Components/SelectionOperation.d.ts +45 -9
- package/applications/Components/SketchTooltipControls.d.ts +31 -6
- package/applications/Components/actionUtils.d.ts +1 -0
- package/applications/Components/analysisUtils.d.ts +98 -26
- package/applications/Components/arcadeEditorUtils.d.ts +3 -0
- package/applications/Components/arcadeFeatureUtils.d.ts +34 -6
- package/applications/Components/baUtils.d.ts +8 -8
- package/applications/Components/basemapUtils.d.ts +2 -0
- package/applications/Components/drawUtils.d.ts +6 -1
- package/applications/Components/featureUtils.d.ts +9 -0
- package/applications/Components/fontUtils.d.ts +2 -0
- package/applications/Components/formatUtils.d.ts +2 -0
- package/applications/Components/getDefaultUnits.d.ts +2 -0
- package/applications/Components/imageryUtils.d.ts +135 -27
- package/applications/Components/layerOriginUtils.d.ts +5 -0
- package/applications/Components/layersEffectsJsonUtils.d.ts +2 -0
- package/applications/Components/previewSymbol2D.d.ts +2 -0
- package/applications/Components/reactiveUtils.d.ts +13 -9
- package/applications/Components/sanitizerUtils.d.ts +2 -0
- package/applications/Components/stringUtils.d.ts +5 -0
- package/applications/Components/styleUtils.d.ts +2 -0
- package/applications/Components/svgUtils.d.ts +4 -0
- package/applications/Components/testUtils.d.ts +3 -0
- package/applications/Components/viewUtils.d.ts +2 -0
- package/applications/Components/webStyleSymbolUtils.d.ts +2 -0
- package/applications/Excalibur/videoViewUtils.d.ts +19 -3
- package/applications/ExperienceBuilder/sketchUtils.d.ts +10 -1
- package/applications/KnowledgeStudio/dataModelVisualization.d.ts +2 -0
- package/applications/KnowledgeStudio/generalSdkInternalAccess.d.ts +33 -4
- package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +73 -10
- package/applications/KnowledgeStudio/layerInternalAccessUtils.d.ts +12 -1
- package/applications/KnowledgeStudio/reshape.d.ts +144 -28
- package/applications/KnowledgeStudio/resourceSerializationUtils.d.ts +17 -3
- package/applications/MapViewer/layerUtils.d.ts +2 -0
- package/applications/MapViewer/mediaUtils.d.ts +42 -8
- package/applications/MapViewer/templateUtils.d.ts +78 -16
- package/applications/PortalApp/layerUtils.d.ts +2 -0
- package/applications/SceneViewer/colorUtils.d.ts +2 -0
- package/applications/SceneViewer/devEnvironmentUtils.d.ts +3 -0
- package/applications/SceneViewer/layerUtils.d.ts +5 -3
- package/applications/SceneViewer/sceneViewerUtils.d.ts +52 -5
- package/applications/SceneViewer/symbolUtils.d.ts +2 -0
- package/applications/Urban/LineImagePattern3D.d.ts +8 -2
- package/applications/Urban/imagePatternUtils.d.ts +10 -2
- package/applications/Urban/meshUtils.d.ts +2 -0
- package/applications/WebEditor/sketchUtils.d.ts +24 -4
- package/assets/components/assets/icon/fileEsl16.json +1 -0
- package/assets/components/assets/icon/fileEsl24.json +1 -0
- package/assets/components/assets/icon/fileEsl32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/04958494022f82dca473.js +1 -0
- package/assets/esri/core/workers/chunks/{22dd5cecc7e2d4d0baf8.js → 055fdc5134d54174444d.js} +2 -2
- package/assets/esri/core/workers/chunks/0629087bd5bb8048493e.js +1 -0
- package/assets/esri/core/workers/chunks/{ee186ddbb1eb5144a790.js → 08359ae020238a565955.js} +1 -1
- package/assets/esri/core/workers/chunks/0b7bbdc0d71ee6721751.js +2 -0
- package/assets/esri/core/workers/chunks/{5909a0e763fddc3542e7.js.LICENSE.txt → 0b7bbdc0d71ee6721751.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/0cd3acfbf9ee991bdab4.js +1 -0
- package/assets/esri/core/workers/chunks/0f8149fdcf0adeca268e.js +1 -0
- package/assets/esri/core/workers/chunks/{aa7a1705266eec353cb6.js → 0fc22ad791d3ec0a9c5e.js} +1 -1
- package/assets/esri/core/workers/chunks/119822a646834c1cebc0.js +1 -0
- package/assets/esri/core/workers/chunks/1a6d2f525dd30d08cf9b.js +1 -0
- package/assets/esri/core/workers/chunks/204d738c8b651314ae64.js +1 -0
- package/assets/esri/core/workers/chunks/{e95821a199e10b389e29.js → 25f3ee666f545a7a7993.js} +2 -2
- package/assets/esri/core/workers/chunks/{e95821a199e10b389e29.js.LICENSE.txt → 25f3ee666f545a7a7993.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/36ecf951c0c7dad84b69.js +1 -0
- package/assets/esri/core/workers/chunks/37002a46f03a9fc5f644.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/43e2c1d72cd9c8beed2f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/45a9cd722e98dd1548ae.js +1 -0
- package/assets/esri/core/workers/chunks/4773a358832f87963766.js +1 -0
- package/assets/esri/core/workers/chunks/492515860198f38dd698.js +1 -0
- package/assets/esri/core/workers/chunks/4f6f181ee83b4d484518.js +1 -0
- package/assets/esri/core/workers/chunks/59a45533e96cedf1c480.js +1 -0
- package/assets/esri/core/workers/chunks/{c2aeecd27e004c6cd7e1.js → 5b9f2aa3ba1bf12c3240.js} +2 -2
- package/assets/esri/core/workers/chunks/{c2aeecd27e004c6cd7e1.js.LICENSE.txt → 5b9f2aa3ba1bf12c3240.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/679cd6424e0e2d7f372b.js +1 -0
- package/assets/esri/core/workers/chunks/6be530ab81291745485b.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/73c416ae0ec5a1815591.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{23b623637126f8411a30.js → 7aec07f2482934259d12.js} +1 -1
- package/assets/esri/core/workers/chunks/7bed14d9bcd7fc5e2eec.js +1 -0
- package/assets/esri/core/workers/chunks/{741d170187e58e81584d.js → 7d744554d14057d9b2b1.js} +1 -1
- package/assets/esri/core/workers/chunks/{e85da52d9cc7d9396872.js → 942fad4ec96295672ce8.js} +1 -1
- package/assets/esri/core/workers/chunks/9ccabf8142fb5de4d3e2.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/aeb524eded012217a865.js +1 -0
- package/assets/esri/core/workers/chunks/{ac6f002cfad42e60de8f.js → b48033645091c91e0d88.js} +1 -1
- package/assets/esri/core/workers/chunks/b7960ab9a9da7f88184c.js +1 -0
- package/assets/esri/core/workers/chunks/b8988771bfa4e785ebd6.js +1 -0
- package/assets/esri/core/workers/chunks/{ac83c2999a3d2ffb4356.js → c7838ac0db8570a2d2c1.js} +1 -1
- package/assets/esri/core/workers/chunks/c91ef3814e7f024043cf.js +1 -0
- package/assets/esri/core/workers/chunks/{310f3268582e61cd86da.js → d21480925a8bc9c7de96.js} +1 -1
- package/assets/esri/core/workers/chunks/d75adfd4acb3c92accc9.js +1 -0
- package/assets/esri/core/workers/chunks/d9ca754f51b9812bb179.js +1 -0
- package/assets/esri/core/workers/chunks/d9ef0b3341e2744d8f2f.js +1 -0
- package/assets/esri/core/workers/chunks/e4ba850e8344ac2c5fc0.js +1 -0
- package/assets/esri/core/workers/chunks/e5aac523c37d906eece6.js +1 -0
- package/assets/esri/core/workers/chunks/{f351007cdcd0938d3b6c.js → eeb24a4ab4993f1f4e8e.js} +1 -1
- package/assets/esri/core/workers/chunks/f25bebd2b6eb0d0f6626.js.LICENSE.txt +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/libs/text/pkg/bundle_bg.wasm +0 -0
- package/chunks/bundle2.js +5 -0
- package/config.js +1 -1
- package/copyright.txt +70 -1
- package/core/BidiText.js +1 -1
- package/geometry/support/FloatArray.js +1 -1
- package/geometry/support/Indices.js +1 -1
- package/interfaces.d.ts +24 -24
- package/kernel.js +1 -1
- package/layers/BingMapsLayer.d.ts +2 -3
- package/layers/BuildingSceneLayer.d.ts +2 -4
- package/layers/CatalogLayer.d.ts +2 -4
- package/layers/DimensionLayer.d.ts +2 -3
- package/layers/ElevationLayer.d.ts +2 -4
- package/layers/FeatureLayer.d.ts +2 -4
- package/layers/GaussianSplatLayer.d.ts +1 -3
- package/layers/GeoJSONLayer.d.ts +2 -3
- package/layers/GeoRSSLayer.d.ts +2 -3
- package/layers/GroupLayer.d.ts +2 -3
- package/layers/ImageryLayer.d.ts +2 -5
- package/layers/ImageryTileLayer.d.ts +3 -7
- package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -4
- package/layers/IntegratedMeshLayer.d.ts +2 -4
- package/layers/KMLLayer.d.ts +2 -3
- package/layers/KnowledgeGraphLayer.d.ts +2 -4
- package/layers/LineOfSightLayer.d.ts +2 -3
- package/layers/LinkChartLayer.d.ts +2 -3
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/MapImageLayer.d.ts +2 -4
- package/layers/MapNotesLayer.d.ts +2 -3
- package/layers/MediaLayer.d.ts +3 -4
- package/layers/OGCFeatureLayer.d.ts +2 -3
- package/layers/ParquetLayer.d.ts +2 -3
- package/layers/PointCloudLayer.d.ts +2 -4
- package/layers/RouteLayer.d.ts +2 -3
- package/layers/SceneLayer.d.ts +2 -4
- package/layers/StreamLayer.d.ts +2 -4
- package/layers/SubtypeGroupLayer.d.ts +2 -4
- package/layers/TileLayer.d.ts +2 -4
- package/layers/UnknownLayer.d.ts +2 -3
- package/layers/UnsupportedLayer.d.ts +2 -3
- package/layers/VectorTileLayer.d.ts +2 -4
- package/layers/VideoLayer.d.ts +8 -9
- package/layers/ViewshedLayer.d.ts +2 -3
- package/layers/VoxelLayer.d.ts +2 -4
- package/layers/WCSLayer.d.ts +2 -4
- package/layers/WFSLayer.d.ts +2 -3
- package/layers/WMSLayer.d.ts +5 -6
- package/layers/WMTSLayer.d.ts +4 -5
- package/layers/WebTileLayer.d.ts +2 -3
- package/layers/buildingSublayers/BuildingSublayer.d.ts +3 -3
- package/layers/buildingSublayers/BuildingSublayer.js +1 -1
- package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -3
- package/layers/catalog/CatalogFootprintLayer.d.ts +2 -3
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +4 -6
- package/layers/{support/media.d.ts → media/types.d.ts} +9 -9
- package/layers/mixins/ArcGISImageService.d.ts +1 -1
- package/layers/mixins/ImageryTileMixin.d.ts +1 -1
- package/layers/raster/datasets/wcsCoverageParser.d.ts +1 -1
- package/layers/raster/functions/creators/createLocalFunctions.d.ts +1 -1
- package/layers/raster/functions/types.d.ts +1 -1
- package/layers/{support/RasterTypes.d.ts → raster/types.d.ts} +2 -2
- package/layers/support/ElevationQuery.d.ts +2 -2
- package/layers/support/FeatureType.d.ts +2 -2
- package/layers/support/Field.d.ts +2 -3
- package/layers/support/FieldConfiguration.d.ts +1 -1
- package/layers/support/ImageElement.d.ts +3 -3
- package/layers/support/LocalMediaElementSource.d.ts +1 -1
- package/layers/support/MediaElementBase.d.ts +4 -7
- package/layers/support/PixelBlock.d.ts +1 -1
- package/layers/support/RasterFunction.d.ts +1 -1
- package/layers/support/RasterInfo.d.ts +1 -1
- package/layers/support/Sublayer.d.ts +2 -3
- package/layers/support/Subtype.d.ts +2 -2
- package/layers/support/SubtypeSublayer.d.ts +2 -3
- package/layers/support/VideoElement.d.ts +2 -2
- package/layers/support/WMSSublayer.d.ts +6 -6
- package/layers/support/WMSSublayer.js +1 -1
- package/layers/support/domains.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +1 -1
- package/layers/support/tiles3DUtils.js +1 -1
- package/layers/support/types.d.ts +33 -1
- package/layers/types.d.ts +17 -2
- package/layers/wmts/types.d.ts +2 -0
- package/libs/text/loadTextModule.js +5 -0
- package/linkChart/LinkChartProperties.d.ts +4 -6
- package/linkChart/LinkChartProperties.js +1 -1
- package/networks/Network.d.ts +2 -4
- package/networks/support/NamedTraceConfiguration.d.ts +3 -3
- package/networks/support/NamedTraceConfiguration.js +1 -1
- package/package.json +2 -2
- package/popup/FieldInfo.d.ts +1 -1
- package/request/process.js +1 -1
- package/rest/geometryService/types.d.ts +59 -0
- package/rest/geometryService.d.ts +3 -5
- package/rest/query/operations/query.js +1 -1
- package/rest/query/support/AttachmentInfo.d.ts +2 -2
- package/rest/support/AlgorithmicColorRamp.d.ts +2 -2
- package/rest/support/BinParametersBase.d.ts +2 -2
- package/rest/support/BinParametersBase.js +1 -1
- package/rest/support/DateBinTimeInterval.d.ts +1 -1
- package/rest/support/GeneralizeParameters.d.ts +1 -1
- package/rest/support/ImageSampleParameters.d.ts +1 -1
- package/rest/support/PrintTemplate.d.ts +4 -6
- package/rest/support/types.d.ts +17 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/WebStyleSymbol.d.ts +0 -24
- package/symbols/WebStyleSymbol.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/GlyphSDFCreator.js +5 -0
- package/views/2d/engine/webgl/GlyphSource.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.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/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/BaseLayerView2D.d.ts +3 -6
- package/views/2d/layers/BaseLayerViewGL2D.d.ts +3 -6
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeWorkerHandle.js +1 -1
- package/views/VideoView.d.ts +2 -3
- package/views/View2D.d.ts +2 -3
- package/views/layers/MediaLayerViewMixin.d.ts +1 -1
- package/views/types.d.ts +1 -1
- package/webdoc/applicationProperties/SearchLayerField.d.ts +1 -1
- package/webdoc/applicationProperties/SearchTableField.d.ts +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/Editor/components/PendingFeatureList.js +1 -1
- package/widgets/Editor/components/workflowAdapters/pendingFeatureList/{CreateFeaturesWorkflowPendingFeatureListAdapter.ts.js → CreateFeaturesWorkflowPendingFeatureListAdapter.js} +1 -1
- package/widgets/Editor/types.d.ts +1 -1
- package/widgets/Feature.d.ts +3 -5
- package/widgets/FeatureForm/FieldInput.d.ts +2 -2
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +1 -1
- package/widgets/FeatureTemplates/TemplateItem.d.ts +1 -1
- package/widgets/FeatureTemplates/types.d.ts +1 -1
- package/widgets/Features.d.ts +3 -5
- package/widgets/Print/CustomTemplate.d.ts +3 -4
- package/widgets/Print/TemplateOptions.d.ts +3 -4
- package/widgets/Print/types.d.ts +3 -4
- package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +1 -1
- package/assets/esri/core/workers/chunks/0099f4729c94c779ba35.js +0 -1
- package/assets/esri/core/workers/chunks/1ab98591d2f2bc604505.js +0 -1
- package/assets/esri/core/workers/chunks/1b838638e66e82d76cf3.js +0 -1
- package/assets/esri/core/workers/chunks/2a6231db5ee6cbfd59a5.js +0 -1
- package/assets/esri/core/workers/chunks/45b898367b6224dda46f.js +0 -1
- package/assets/esri/core/workers/chunks/4785cd108e2dec6e1697.js +0 -1
- package/assets/esri/core/workers/chunks/4d6d962d25aa836f53ee.js +0 -1
- package/assets/esri/core/workers/chunks/5909a0e763fddc3542e7.js +0 -2
- package/assets/esri/core/workers/chunks/5cee6c3ff23fb93f857a.js +0 -1
- package/assets/esri/core/workers/chunks/6035daa65fc3ebf86515.js +0 -1
- package/assets/esri/core/workers/chunks/7033fa18b7dd7bd3e49c.js +0 -1
- package/assets/esri/core/workers/chunks/7306b5b66e738a281d83.js +0 -1
- package/assets/esri/core/workers/chunks/7694abe44d55dae8872d.js +0 -1
- package/assets/esri/core/workers/chunks/964de713042f52d71e42.js +0 -1
- package/assets/esri/core/workers/chunks/ad92427bf597a6e0a299.js +0 -1
- package/assets/esri/core/workers/chunks/b285de471ca90f38ec25.js +0 -1
- package/assets/esri/core/workers/chunks/b8f83a272fc41765031d.js +0 -1
- package/assets/esri/core/workers/chunks/bcf612eabe7577540953.js +0 -1
- package/assets/esri/core/workers/chunks/c02b09f16241db233103.js +0 -1
- package/assets/esri/core/workers/chunks/c3007b916ba933137709.js +0 -1
- package/assets/esri/core/workers/chunks/cc5c1887e6d7079e5fe3.js +0 -1
- package/assets/esri/core/workers/chunks/ce8f075c814a8378c00c.js +0 -1
- package/assets/esri/core/workers/chunks/cfe1506a443fc84a0b91.js +0 -1
- package/assets/esri/core/workers/chunks/d723619579cc8f5ef2cd.js +0 -1
- package/assets/esri/core/workers/chunks/e69255e38ff200dda14b.js +0 -1
- package/core/MultiOriginJSONSupport.d.ts +0 -13
- package/core/NumericIdentifiable.d.ts +0 -6
- package/core/ReadOnlyMultiOriginJSONSupport.d.ts +0 -6
- package/core/WriteableMultiOriginJSONMixin.d.ts +0 -6
- package/layers/knowledgeGraph/KnowledgeGraphSublayerBase.d.ts +0 -6
- package/layers/mixins/ArcGISService.d.ts +0 -6
- package/layers/mixins/RasterJobHandlerMixin.d.ts +0 -6
- package/layers/support/RasterFunctionProperties.d.ts +0 -2
- package/layers/support/domains.d.ts +0 -5
- package/layers/support/editableLayers.d.ts +0 -11
- package/layers/support/exifUtils.d.ts +0 -21
- package/layers/support/fieldFormatUtils.d.ts +0 -4
- package/layers/support/fieldType.d.ts +0 -2
- package/layers/support/layerUtils.d.ts +0 -4
- package/layers/support/wmtsUtils.d.ts +0 -2
- package/layers/video/videoUtils.d.ts +0 -5
- package/rest/geometryService/cut.d.ts +0 -7
- package/rest/geometryService/fromGeoCoordinateString.d.ts +0 -28
- package/rest/geometryService/toGeoCoordinateString.d.ts +0 -25
- package/rest/operations/generalize.d.ts +0 -3
- package/rest/support/DateBinUtils.d.ts +0 -2
- package/rest/support/colorRamps.d.ts +0 -6
- package/rest/support/fileFormat.d.ts +0 -4
- package/rest/support/layoutTemplate.d.ts +0 -2
- package/rest/support/reportTemplate.d.ts +0 -2
- package/views/2d/layers/LayerView2D.d.ts +0 -6
- package/views/Viewport2DBaseMixin.d.ts +0 -6
- package/views/layers/RefreshableLayerView.d.ts +0 -6
- package/widgets/Feature/support/FeatureContentMixin.d.ts +0 -6
- /package/layers/video/{IVideoController.d.ts → types.d.ts} +0 -0
- /package/layers/{support/wmsUtils.d.ts → wms/types.d.ts} +0 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const t=8,e=t-2,c=1e-30,h=64,i=4294967295,o=512,a=256,d=256/360,n=128,p=16777216,r=!1,s=128,f=8,g=10,l=29,m=1,v=16,w=16,x=o/s,b=8,j=50,k=10,q=24,u=
|
|
5
|
+
const t=8,e=t-2,c=1e-30,h=64,i=4294967295,o=512,a=256,d=256/360,n=128,p=16777216,r=!1,s=128,f=8,g=10,l=29,m=1,v=16,w=16,x=o/s,b=8,j=50,k=10,q=24,u=3,y=8,z=24,A=8,B=64,C=14,D=4,E={metrics:{width:15,height:17,left:0,top:-7,advance:14}},F=1024,G=0,H=0,I=0,J=1,K=2,L=3,M=4,N=5,O=6,P=12,Q=13,R=5,S=6,T=5,U=6,V=6,W=1<<V,X=W<<1,Y=!1,Z=1.05,$=3,_=1,tt=3,et=3,ct=5,ht=6,it=1.15,ot=2,at=4,dt=128,nt=256,pt=nt-2*at,rt=2,st=128,ft=1,gt=8,lt=500,mt=4,vt=128,wt=10,xt=1024,bt=2,jt=0,kt=1,qt=4,ut=8,yt=16,zt=4,At=1,Bt=4,Ct=8,Dt=32,Et=64,Ft=128,Gt=4,Ht=1,It=1<<20,Jt=.75,Kt=10,Lt=.75,Mt=12,Nt=256,Ot=32,Pt=512,Qt=0,Rt=1;export{Ht as MAX_TILE_RESHUFFLES_PER_FRAME,Kt as RESHUFFLING_EXEMPT_DRAW_CALLS,It as RESHUFFLING_EXEMPT_MEMORY_BYTES,Lt as RESHUFFLING_TARGET_DRAW_EFFICIENCY,Jt as RESHUFFLING_TARGET_MEMORY_EFFICIENCY,d as angleFactor256,K as animationUnit,Nt as attributeStoreInitialSize,F as attributeStoreTextureSize,E as averageGlyphMosaicItem,Rt as backbufferStencilClipped,Qt as backbufferStencilVisible,Dt as bitsetFillHasPatternHeightPrecisionFactor,Et as bitsetFillHasPatternWidthPrecisionFactor,Ct as bitsetFillHasUnresolvedReplacementColor,Bt as bitsetFillRandomPatternOffset,yt as bitsetGenericConsiderAlphaOnly,bt as bitsetGenericLockColor,zt as bitsetLineScaleDash,kt as bitsetMarkerAlignmentMap,jt as bitsetMarkerAlignmentScreen,qt as bitsetMarkerOutlineAllowColorOverride,ut as bitsetMarkerScaleSymbolsProportionally,At as bitsetTypeFillOutline,vt as bufferDataMinimumSize,mt as bufferDataPoolSize,g as chartMaxFields,w as collisionBoxPadding,s as collisionBucketSize,v as collisionEarlyRejectBucketSize,m as collisionMaxZoomDelta,b as collisionPlacementPadding,x as collisionTileBoxSize,n as compressionFactorForU16,M as dataDrivenUnit0,N as dataDrivenUnit1,O as dataDrivenUnit2,r as debugLabels,dt as defaultSdfTextureSize,gt as displayRecordIntPerElement,f as dotDensityMaxFields,X as effectFlag0,Y as enableEarlyLabelDiscard,h as extrudeScale,W as filterFlag0,J as filterFlagsUnit,q as glyphSize,P as gpgpuUnit,ft as gradientTextureExternalPadding,k as heuristicGlyphsPerFeature,j as heuristicGlyphsPerLine,et as hittestSmallSymbolThreshold,_ as hittestToleranceDesktop,$ as hittestToleranceMobile,tt as hittestToleranceSmallSymbol,D as labelPlacementOffsetPadding,Q as localTimeOriginUnit,l as magicLabelLineHeight,Mt as maxGeohashLevel,ot as maxGpuUploadsPerFrame,V as maxHighlightReasons,p as maxRepresentableInt,Pt as maxTextLineWidth,wt as minMaxZoomPrecisionFactor,Ot as minTextLineWidth,c as nanMagicNumber,lt as patchPixelBufferAllocSize,rt as patternFillRasterizationScale,i as pictureFillColor,xt as randomInsidePolygonTextureSize,a as rasterTileSize,st as rasterizedVectorMarkerMinSize,y as sdfBufferGlyphSDFCreator,u as sdfBufferServer,C as sdfRadiusComplex,A as sdfRadiusSimple,B as sdfSizeComplex,z as sdfSizeSimple,at as spritePadding,pt as svgSdfTextureInnerSize,nt as svgSdfTextureSize,I as textureBindingBitmap,H as textureBindingGlyphAtlas,R as textureBindingHighlight0,S as textureBindingHighlight1,T as textureBindingRenderer0,U as textureBindingRenderer1,G as textureBindingSpriteAtlas,Gt as textureUploadManagerBudget,Ft as textureUploadManagerChunkSize,Z as thinLineHalfWidthThreshold,o as tileSize,L as visualVariableUnit,it as vtlHighResCutoff,ht as vtlTextureBindingUnitGlyphs,ct as vtlTextureBindingUnitSprites,e as webglMaxInnerStops,t as webglMaxStops};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{fromRotation as t,multiply as s,translate as i,rotate as e}from"../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as o,transformMany as h}from"../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as n,set as r}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{getXAnchorDirection as f,getYAnchorDirection as c}from"../../alignmentUtils.js";import
|
|
5
|
+
import{fromRotation as t,multiply as s,translate as i,rotate as e}from"../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as o,transformMany as h}from"../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as n,set as r}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{getXAnchorDirection as f,getYAnchorDirection as c}from"../../alignmentUtils.js";import d from"../../Rect.js";import m from"../../collisions/BoundingBox.js";const g=22,_=4,l=g+_,u=g-6,x=Math.PI/180,p=8,b=1.5;class y{constructor(t,s,i,e){this._rotationT=o(),this._xBounds=0,this._yBounds=0,this.minZoom=0,this.maxZoom=255,this._bounds=null;const h=i.rect,n=new Float32Array(8);t*=e,s*=e;const r=0===i.code?i.metrics.width:h.width*e,a=0===i.code?i.metrics.height:h.height*e;this.width=r,this.height=a,n[0]=t,n[1]=s,n[2]=t+r,n[3]=s,n[4]=t,n[5]=s+a,n[6]=t+r,n[7]=s+a,this._data=n,this._setTextureCoords(h),this._scale=e,this._mosaic=i,this.x=t,this.y=s,this.maxOffset=Math.max(t+r,s+a)}get mosaic(){return this._mosaic}set angle(s){this._angle=s,t(this._rotationT,-s),this._setOffsets()}get angle(){return this._angle}get xTopLeft(){return this._data[0]}get yTopLeft(){return this._data[1]}get xBottomRight(){return this._data[6]}get yBottomRight(){return this._data[7]}get texcoords(){return this._texcoords}get textureBinding(){return this._mosaic.textureBinding}get offsets(){return this._offsets||this._setOffsets(),this._offsets}get bounds(){if(!this._bounds){const{height:t,width:i}=this._mosaic.metrics,e=i*this._scale,n=Math.abs(t)*this._scale,r=new Float32Array(8);r[0]=this.x,r[1]=this.y,r[2]=this.x+e,r[3]=this.y,r[4]=this.x,r[5]=this.y+n,r[6]=this.x+e,r[7]=this.y+n;const a=s(o(),this._rotationT,this._transform);h(r,r,a);let f=1/0,c=1/0,d=-1/0,g=-1/0;for(let s=0;s<4;s++){const t=r[2*s],i=r[2*s+1];f=Math.min(f,t),c=Math.min(c,i),d=Math.max(d,t),g=Math.max(g,i)}const _=d-f,l=g-c,u=f+_/2,x=c+l/2;this._bounds=new m(u,x,_,l)}return this._bounds}setTransform(t){this._transform=t,this._offsets=null}_setOffsets(){this._offsets||(this._offsets={topLeft:[0,0],topRight:[0,0],bottomLeft:[0,0],bottomRight:[0,0]});const t=s(o(),this._rotationT,this._transform);this._offsets.topLeft[0]=this._data[0],this._offsets.topLeft[1]=this._data[1],this._offsets.topRight[0]=this._data[2],this._offsets.topRight[1]=this._data[3],this._offsets.bottomLeft[0]=this._data[4],this._offsets.bottomLeft[1]=this._data[5],this._offsets.bottomRight[0]=this._data[6],this._offsets.bottomRight[1]=this._data[7],n(this._offsets.topLeft,this._offsets.topLeft,t),n(this._offsets.topRight,this._offsets.topRight,t),n(this._offsets.bottomLeft,this._offsets.bottomLeft,t),n(this._offsets.bottomRight,this._offsets.bottomRight,t)}_setTextureCoords({x:t,y:s,width:i,height:e}){this._texcoords={topLeft:[t,s],topRight:[t+i,s],bottomLeft:[t,s+e],bottomRight:[t+i,s+e]}}}const w=(t,s)=>({code:0,page:0,sdf:!0,rect:new d(0,0,11,8),textureBinding:s,metrics:{advance:0,height:4,width:t,left:0,top:0}});function L(t,s){return t.forEach(t=>n(t,t,s)),{topLeft:t[0],topRight:t[1],bottomLeft:t[2],bottomRight:t[3]}}class M{constructor(t,s,i,e){this._rotation=0,this._decorate(t,s,i,e),this.glyphs=t,this.bounds=this._createBounds(t),this.isMultiline=s.length>1,this._hasRotation=0!==i.angle,this._transform=this._createGlyphTransform(this.bounds,i),this._borderLineSizePx=i.borderLineSizePx,(i.borderLineSizePx||i.hasBackground)&&([this.bounds,this.textBox]=this.shapeBackground(this._transform));for(const o of t)o.setTransform(this._transform)}setRotation(i){if(0===i&&0===this._rotation)return;this._rotation=i;const e=this._transform,h=t(o(),i);s(e,h,e);for(const t of this.glyphs)t.setTransform(this._transform)}_decorate(t,s,i,e){if(!i.decoration||"none"===i.decoration||!t.length)return;const o=i.scale,h="underline"===i.decoration?e?.baseline??l:e?.midline??u,n=t[0].textureBinding;for(const r of s){const s=r.startX*o,i=r.startY*o,e=(r.width+r.glyphWidthEnd)*o;t.push(new y(s,i+h*o,w(e,n),1))}}shapeBackground(t){const s=this._borderLineSizePx||0,i=(b+s)/2,e=this._borderLineSizePx?i:0,{xmin:o,ymin:h,xmax:n,ymax:r,x:a,y:f,width:c,height:d}=this.bounds,g=[o-p,h-p],_=[n+p,h-p],l=[o-p,r+p],u=[n+p,r+p],x=L([[g[0]-i,g[1]-i],[_[0]+i,_[1]-i],[g[0]+e,g[1]+e],[_[0]-e,_[1]+e]],t),y=L([[l[0]+e,l[1]-e],[u[0]-e,u[1]-e],[l[0]-i,l[1]+i],[u[0]+i,u[1]+i]],t),w=L([[g[0]-i,g[1]-i],[g[0]+e,g[1]+e],[l[0]-i,l[1]+i],[l[0]+e,l[1]-e]],t),M=L([[_[0]-e,_[1]+e],[_[0]+i,_[1]-i],[u[0]-e,u[1]-e],[u[0]+i,u[1]+i]],t),R={main:L([g,_,l,u],t),top:x,bot:y,left:w,right:M};return[new m(a,f,c+2*i,d+2*i),R]}get boundsT(){const t=this.bounds,s=r(a(),t.x,t.y);if(n(s,s,this._transform),this._hasRotation){const i=Math.max(t.width,t.height);return new m(s[0],s[1],i,i)}return new m(s[0],s[1],t.width,t.height)}_createBounds(t){let s=1/0,i=1/0,e=0,o=0;for(const r of t)s=Math.min(s,r.xTopLeft),i=Math.min(i,r.yTopLeft),e=Math.max(e,r.xBottomRight),o=Math.max(o,r.yBottomRight);const h=e-s,n=o-i;return new m(s+h/2,i+n/2,h,n)}_createGlyphTransform(t,s){const h=x*s.angle,n=o(),f=a();return i(n,n,r(f,s.xOffset,-s.yOffset)),s.useCIMAngleBehavior?e(n,n,h):(i(n,n,r(f,t.x,t.y)),e(n,n,h),i(n,n,r(f,-t.x,-t.y))),n}}class R{constructor(t,s,i,e,o,h){this.glyphWidthEnd=0,this.startX=0,this.startY=0,this.start=Math.max(0,Math.min(s,i)),this.end=Math.max(0,Math.max(s,i)),this.end<t.length&&(this.glyphWidthEnd=t[this.end].metrics.width),this.width=e,this.yMin=o,this.yMax=h}}const B=t=>10===t,T=t=>32===t;function v(t,s,i){const e=new Array,o=1/i.scale,h=i.maxLineWidth*o,n=s?t.length-1:0,r=s?-1:t.length,a=s?-1:1;let f=n,c=0,d=0,m=f,g=m,_=0,l=1/0,u=0;for(;f!==r;){const{code:s,metrics:i}=t[f],o=Math.abs(i.top);if(B(s)||T(s)||(l=Math.min(l,o),u=Math.max(u,o+i.height)),B(s))f!==n&&(e.push(new R(t,m,f-a,c,l===1/0?0:l,u)),l=1/0,u=0),c=0,m=f+a,g=f+a,d=0;else if(T(s))g=f+a,d=0,_=i.advance,c+=i.advance;else if(c>h){if(g!==m){const s=g-2*a;c-=_,e.push(new R(t,m,s,c-d,l,u)),l=1/0,u=0,m=g,c=d}else e.push(new R(t,m,f-a,c,l,u)),l=1/0,u=0,m=f,g=f,c=0;c+=i.advance,d+=i.advance}else c+=i.advance,d+=i.advance;f+=a}const x=new R(t,m,f-a,c,l,u);return x.start>=0&&x.end<t.length&&e.push(x),e}function j(t,s){let i=0;for(let h=0;h<t.length;h++){const{width:s}=t[h];i=Math.max(s,i)}const e="underline"===s.decoration?_:0,o=t[0].yMin;return{x:0,y:o,height:t[t.length-1].yMax+s.lineHeight*(t.length-1)+e-o,width:i}}function A(t,s){const i=s.scale,e=new Array,o=t.sdfPadding,{faceInfo:h,glyphs:n,isRightToLeft:r}=t,a=v(n,r,s),d=a.length?j(a,s):{y:0,height:0},m=f(s.horizontalAlignment),_=c(s.verticalAlignment),l=2===_?1:0,u=l?0:_-1,x=(1-l)*-d.y+u*(d.height/2)+l*-g;for(let f=0;f<a.length;f++){const{start:h,end:r,width:c}=a[f];let d=-1*(m+1)*(c/2)-o;const g=(t.isRightToLeft?a.length-1-f:f)*s.lineHeight+x-o;a[f].startX=d,a[f].startY=g;for(let t=h;t<=r;t++){const s=n[t];if(B(s.code))continue;const o=new y(d+s.metrics.left,g-s.metrics.top,s,i);d+=s.metrics.advance,e.push(o)}}return new M(e,a,s,h)}export{y as ShapedGlyph,M as ShapingInfo,A as shapeGlyphs};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{memoize as e}from"../../../../../../../core/MapUtils.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{numericHash as i}from"../../../../../../../core/string.js";import{fromRotation as r,translate as s}from"../../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as o}from"../../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as n,set as a,sub as l,normalize as c,add as h,scale as m}from"../../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as d}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{create as u}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{GeometryCursor as f}from"../../../../../../../geometry/GeometryCursor.js";import{generalizeOptimizedGeometry as g,convertToGeometry as _}from"../../../../../../../layers/graphics/featureConversionUtils.js";import p from"../../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as b,minMaxZoomPrecisionFactor as x}from"../../../definitions.js";import v from"../../../collisions/BoundingBox.js";import{LabelMetric as M}from"../../../collisions/LabelMetric.js";import{smoothPaths as P,pathDivide as y}from"../../../mesh/templates/segmentUtils.js";import{getMinMaxZoom as w,processColorInput as L}from"../fill/meshWriterUtils.js";import{TextMeshWriter as I,maxLabelZoom as B}from"../text/TextMeshWriter.js";const S=1,z=0,D=128;function A(e,t,r){return i(`${e}${t}${r}`)}function j(e,t,r,s,o){return i(`${e}${t}${r}${s*2**(B-o)}`)}function G(e,t,r){return i(`${e}${t}${r}`)}function Z(e,t,r,s,o){return i(`${e}${o}${t}${r*2**(B-s)}`)}const k=e(e=>{let t=0;if(0===e)return 1/0;for(;!(e%2);)t++,e/=2;return t});class F extends I{constructor(){super(...arguments),this._zoomLevel=0}_write(e,t,i,r){if(this._zoomLevel=r||0,null!=i)throw new Error("InternalError: EffectGeometry not support for LabelMeshWriter");switch(t.geometryType){case"esriGeometryPoint":{const i=t.readXForDisplay(),r=t.readYForDisplay();this._writePoint(e,i,r,0,t);break}case"esriGeometryEnvelope":case"esriGeometryPolygon":{const i=t.readCentroidForDisplay();if(!i)return;const[r,s]=i.coords;this._writePoint(e,r,s,0,t);break}case"esriGeometryMultipoint":{let i=0;const r=f.fromFeatureSetReader(t);if(r?.nextPath())for(;r.nextPoint();)this._writePoint(e,r.x,r.y,i++,t);break}case"esriGeometryPolyline":this._writeLines(e,t)}}_getMetricDir(){const{horizontalAlignment:e,verticalAlignment:t}=this.evaluatedMeshParams;return["center"===e?0:"right"===e?-1:1,"middle"===t?0:"bottom"===t?-1:1]}_createLineLabelMetric(e,t,i,r,s,o){const[n,a]=this._getMetricDir(),l=this.evaluatedMeshParams.scaleInfo?.maxScale??0,c=this.evaluatedMeshParams.scaleInfo?.minScale??0,h=this.evaluatedMeshParams.labelClassId;return new M(e,h,t,i,r,s,n,a,l,c,o)}_writePoint(e,t,i,r,s){if(t<0||t>b||i<0||i>b)return;const o=this._getShaping();if(!o)return;const n=s.getDisplayId(),a=this.evaluatedMeshParams.labelClassId,l=A(this.evaluatedMeshParams.layerId,s.getObjectId(),r),c=G(s.getObjectId(),a,r),[h,m]=this._getMetricDir(),d=this.evaluatedMeshParams.scaleInfo?.maxScale??0,u=this.evaluatedMeshParams.scaleInfo?.minScale??0,f=this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0};e.metricStart(new M(n,a,l,c,t,i,h,m,d,u,f)),this._writeGlyphs(e,n,t,i,o,0,f,void 0,!1),e.metricBoxWrite(o.boundsT),e.metricEnd()}_getPointReferenceBounds(){if(!this._references)return null;for(const e of this._references){const t=e.getBoundsInfo();if(t)return t}return null}_writeLines(e,t){const{scaleInfo:i,verticalAlignment:r}=this.evaluatedMeshParams,s=this.evaluatedMeshParams.repeatLabelDistance||128,o=this._getShaping("middle");if(!o)return;const n=(e,t,i,r)=>this._placeSubdivGlyphs(e,t,i,r),a=(o.bounds.width+s)/(1<<S);this._current={out:e,id:t.getDisplayId(),objId:t.getObjectId(),shaping:o,zoomRange:w(i,this.getTileInfo()),referenceBounds:this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0},offsetDirection:null,pathIndex:0},this._verticalPlacement="bottom"===r?"above":"top"===r?"below":null,this._verticalPlacement?this._writeAboveAndBelowAlong(t,n,a):this._writeCenterAlong(t,n,a)}_writeAboveAndBelowAlong(e,t,i){const{repeatLabel:r}=this.evaluatedMeshParams,{shaping:s}=this._current,o=s.bounds.halfHeight,n=e.readGeometryForDisplay();if(!n)return;const a=g(n,"esriGeometryPolyline",1)??new p,l=$(a,o),c=$(a,-o),h=_(c,"esriGeometryPolyline",!1,!1),m=_(l,"esriGeometryPolyline",!1,!1),d=P(m.paths,s.bounds.width),u=P(h.paths,s.bounds.width);this._current.offsetDirection="above";for(let f=0;f<d.length;f++)this._current.pathIndex=f,y(d[f],i,t,!!r);this._current.offsetDirection="below";for(let f=0;f<u.length;f++)this._current.pathIndex=f,y(u[f],i,t,!!r)}_writeCenterAlong(e,t,i){const{repeatLabel:r}=this.evaluatedMeshParams,{shaping:s}=this._current,o=P(e.readLegacyGeometryForDisplay().paths,s.bounds.width);for(let n=0;n<o.length;n++)this._current.pathIndex=n,y(o[n],i,t,!!r)}_placeSubdivGlyphs(e,t,i,r){const{allowOverrun:s,labelPosition:o,repeatLabelDistance:n,layerId:a,labelClassId:l}=this.evaluatedMeshParams,{objId:c,shaping:h,pathIndex:m}=this._current,d=this._current.zoomRange[0],u=k(t),f=this._current.shaping.bounds.width/(1<<S),g=Math.sqrt(n||D)/(1<<S),_=Math.min(i,r-i),p=h.isMultiline?B:Math.log2(_/(g+f/2)),b=0===t?p:Math.min(u,p),x=Math.max(d,this._zoomLevel+S-b),v=this._zoomLevel-x,M=h.bounds.width/2*2**v,P=j(a,c,m,t,this._zoomLevel),y=Z(c,m,t,this._zoomLevel,l);this._current.shaping.isMultiline?0===t&&this._placeStraight(e,x,P,y):s&&v<0?this._placeStraightAlong(e,d,P,y):"parallel"===o?this._placeStraightAlong(e,x,P,y):"curved"===o&&this._placeCurved(e,x,M,P,y)}_placeStraight(e,t,i,r){const{out:s,id:o,shaping:n,referenceBounds:a}=this._current,{x:l,y:c}=e;s.metricStart(this._createLineLabelMetric(o,i,r,l,c)),s.metricBoxWrite(n.boundsT);const h=e.angle*(180/Math.PI)%360,m=(e.angle*(180/Math.PI)+180)%360;if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){const e={clipAngle:h,mapAligned:!0,isLineLabel:!0,minZoom:t};this._writeGlyphs(s,o,l,c,n,0,a,e,!1)}if(!this._verticalPlacement||this._verticalPlacement!==this._current.offsetDirection){const e={clipAngle:m,mapAligned:!0,isLineLabel:!0,minZoom:t};this._writeGlyphs(s,o,l,c,n,0,a,e,!1)}s.metricEnd()}_placeCurved(e,t,i,r,s){const{out:o,id:n}=this._current;o.metricStart(this._createLineLabelMetric(n,r,s,e.x,e.y));const a=e.clone(),l=e.angle*(180/Math.PI)%360,c=(e.angle*(180/Math.PI)+180)%360;this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||(this._placeFirst(a,t,1,l),this._placeBack(e,a,t,i,1,l),this._placeForward(e,a,t,i,1,l)),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||(this._placeFirst(a,t,0,c),this._placeBack(e,a,t,i,0,c),this._placeForward(e,a,t,i,0,c)),o.metricEnd()}_placeStraightAlong(e,i,n,a){const{out:l,id:c,shaping:h,zoomRange:m,referenceBounds:u}=this._current,{boxBorderLineColor:f,boxBackgroundColor:g}=this.evaluatedMeshParams,_=e.clone(),p=e.angle*(180/Math.PI)%360,b=(e.angle*(180/Math.PI)+180)%360,x=h.glyphs.length>0&&!(!f&&!g);if(l.metricStart(this._createLineLabelMetric(c,n,a,e.x,e.y)),x){const n=Math.max(i,m[0],0),a=Math.min(B,m[1]),f=r(o(),-e.angle),g={minZoom:n,maxZoom:a,clipAngle:p,mapAligned:!0,isLineLabel:!0},_=t(this.evaluatedMeshParams.offsetX),x=t(this.evaluatedMeshParams.offsetY);if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){const t=d(_,-1*x),[i,r]=h.shapeBackground(s(o(),f,t));l.recordStart(this.instanceId,this.attributeLayout,h.glyphs[0].textureBinding),this._writeTextBox(l,c,e.x,e.y,r,u,g),l.recordEnd()}if(!this._verticalPlacement||this._verticalPlacement!==this._current.offsetDirection){const t=d(_,x),[i,r]=h.shapeBackground(s(o(),f,t));g.clipAngle=b,l.recordStart(this.instanceId,this.attributeLayout,h.glyphs[0].textureBinding),this._writeTextBox(l,c,e.x,e.y,r,u,g),l.recordEnd()}}this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||this._placeFirst(_,i,1,p,!0),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||this._placeFirst(_,i,0,b,!0),l.metricEnd()}_placeBack(e,t,i,r,s,o){const n=e.clone();let a=e.backwardLength+z;for(;n.prev()&&!(a>=r);)this._placeOnSegment(n,t,a,i,-1,s,o),a+=n.length+z}_placeForward(e,t,i,r,s,o){const n=e.clone();let a=e.remainingLength+z;for(;n.next()&&!(a>=r);)this._placeOnSegment(n,t,a,i,1,s,o),a+=n.length+z}_placeFirst(e,i,s,a,l=!1){const{out:c,id:h,shaping:m,zoomRange:u,referenceBounds:f}=this._current,g=m.glyphs,_=t(this.evaluatedMeshParams.offsetX),p=t(this.evaluatedMeshParams.offsetY),b=d(_,p),x=r(o(),-e.angle);n(b,b,x);for(const t of g){const r=t.x>m.bounds.x?s:1-s,o=r*e.remainingLength+(1-r)*e.backwardLength,n=Math.abs(t.x+t.width/2-m.bounds.x),d=Math.max(0,this._zoomLevel+Math.log2(n/(o+z))),g=Math.max(i,l?0:d);if(t.maxZoom=Math.min(u[1],B),t.angle=e.angle+(1-s)*Math.PI,t.minZoom=Math.max(u[0],g),this._writeLineGlyph(c,h,e.x,e.y,t,a,f,!0),(s||this._current.offsetDirection)&&this._isVisible(t.minZoom,t.maxZoom)){const e=new v(t.bounds.x+b[0],t.bounds.y+b[1],t.bounds.width,t.bounds.height);c.metricBoxWrite(e)}}}_placeOnSegment(e,i,s,a,l,c,h){const{out:m,id:u,shaping:f,referenceBounds:g}=this._current,_=f.glyphs,p=e.dx/e.length,b=e.dy/e.length,x={x:e.x+s*-l*p,y:e.y+s*-l*b},M=t(this.evaluatedMeshParams.offsetX),P=t(this.evaluatedMeshParams.offsetY),y=d(M,P),w=r(o(),-e.angle);n(y,y,w);for(const t of _){const i=t.x>f.bounds.x?c:1-c;if(!(i&&1===l||!i&&-1===l))continue;const r=Math.abs(t.x+t.width/2-f.bounds.x),o=Math.max(0,this._zoomLevel+Math.log2(r/s)-.1),n=Math.max(a,this._zoomLevel+Math.log2(r/(s+e.length+z)));if(0!==o&&(t.angle=e.angle+(1-c)*Math.PI,t.minZoom=n,t.maxZoom=o,this._writeLineGlyph(m,u,x.x,x.y,t,h,g,!0),(c||this._current.offsetDirection)&&this._isVisible(t.minZoom,t.maxZoom))){const e=new v(t.bounds.x+y[0],t.bounds.y+y[1],t.bounds.width,t.bounds.height);m.metricBoxWrite(e)}}}_writeLineGlyph(e,t,i,r,s,o,n,a){if(i<0||i>b||r<0||r>b)return;e.recordStart(this.instanceId,this.attributeLayout,s.textureBinding);const{texcoords:l,offsets:c}=s,{fontSize:h,haloSize:m,outlineSize:d}=this._textMeshTransformProps;this._writeQuad(e,t,i,r,{texcoords:l,offsets:c,fontSize:h,haloSize:m,outlineSize:d,color:L(this.evaluatedMeshParams.color),isBackground:!1,referenceBounds:n,minZoom:Math.max(this._current.zoomRange[0],s.minZoom),maxZoom:Math.min(this._current.zoomRange[1],s.maxZoom),clipAngle:o,mapAligned:a,isLineLabel:!0}),e.recordEnd()}_packedZoom(e){return Math.floor(e*x)/x}_isVisible(e,t){let i=Math.max(this._current.zoomRange[0],e),r=Math.min(this._current.zoomRange[1],t);i=this._packedZoom(i),r=this._packedZoom(r);const s=this._packedZoom(this._zoomLevel);return i<=s&&s<=r}}function $(e,t){const i=new p,{coords:r,lengths:s}=e,o=u(),n=u(),d=u(),f=u(),g=u(),_=u(),b=2;let x=0;for(let u=0;u<s.length;u++){const e=s[u];for(let s=0;s<e;s++){const u=b*(s+x-1),p=b*(s+x),v=b*(s+x+1);s>0?a(o,r[u],r[u+1]):a(o,0,0),a(n,r[p],r[p+1]),s<e-1?a(d,r[v],r[v+1]):a(d,0,0),0===s?a(f,0,0):(l(f,n,o),c(f,f),a(f,f[1],-f[0])),s===e-1?a(g,0,0):(l(g,d,n),c(g,g),a(g,g[1],-g[0])),h(_,f,g),c(_,_);const M=_[0]*g[0]+_[1]*g[1];0!==M&&m(_,_,M),m(_,_,t),i.coords.push(n[0]+_[0],n[1]+_[1])}i.lengths.push(e),x+=e}return i}export{F as LabelMeshWriter,A as labelIdHash,G as labelMetricHash,j as lineLabelIdHash,Z as lineLabelMetricHash};
|
|
5
|
+
import{memoize as e}from"../../../../../../../core/MapUtils.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{numericHash as i}from"../../../../../../../core/string.js";import{fromRotation as s,translate as r}from"../../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as o}from"../../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as n,set as a,sub as l,normalize as h,add as c,scale as m}from"../../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as d}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{create as u}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{GeometryCursor as f}from"../../../../../../../geometry/GeometryCursor.js";import{generalizeOptimizedGeometry as g,convertToGeometry as _}from"../../../../../../../layers/graphics/featureConversionUtils.js";import p from"../../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as b,minMaxZoomPrecisionFactor as x}from"../../../definitions.js";import v from"../../../collisions/BoundingBox.js";import{LabelMetric as M}from"../../../collisions/LabelMetric.js";import{smoothPaths as P,pathDivide as y}from"../../../mesh/templates/segmentUtils.js";import{getMinMaxZoom as w,processColorInput as L}from"../fill/meshWriterUtils.js";import{TextMeshWriter as I,maxLabelZoom as S}from"../text/TextMeshWriter.js";const B=1,z=0,D=128;function A(e,t,s){return i(`${e}${t}${s}`)}function j(e,t,s,r,o){return i(`${e}${t}${s}${r*2**(S-o)}`)}function G(e,t,s){return i(`${e}${t}${s}`)}function Z(e,t,s,r,o){return i(`${e}${o}${t}${s*2**(S-r)}`)}const k=e(e=>{let t=0;if(0===e)return 1/0;for(;!(e%2);)t++,e/=2;return t});class F extends I{constructor(){super(...arguments),this._zoomLevel=0}_write(e,t,i,s){if(this._zoomLevel=s||0,null!=i)throw new Error("InternalError: EffectGeometry not support for LabelMeshWriter");switch(t.geometryType){case"esriGeometryPoint":{const i=t.readXForDisplay(),s=t.readYForDisplay();this._writePoint(e,i,s,0,t);break}case"esriGeometryEnvelope":case"esriGeometryPolygon":{const i=t.readCentroidForDisplay();if(!i)return;const[s,r]=i.coords;this._writePoint(e,s,r,0,t);break}case"esriGeometryMultipoint":{let i=0;const s=f.fromFeatureSetReader(t);if(s?.nextPath())for(;s.nextPoint();)this._writePoint(e,s.x,s.y,i++,t);break}case"esriGeometryPolyline":this._writeLines(e,t)}}_getMetricDir(){const{horizontalAlignment:e,verticalAlignment:t}=this.evaluatedMeshParams;return["center"===e?0:"right"===e?-1:1,"middle"===t?0:"bottom"===t?-1:1]}_createLineLabelMetric(e,t,i,s,r,o){const[n,a]=this._getMetricDir(),l=this.evaluatedMeshParams.scaleInfo?.maxScale??0,h=this.evaluatedMeshParams.scaleInfo?.minScale??0,c=this.evaluatedMeshParams.labelClassId;return new M(e,c,t,i,s,r,n,a,l,h,o)}_writePoint(e,t,i,s,r){if(t<0||t>b||i<0||i>b)return;const o=this._getShaping();if(!o)return;const n=r.getDisplayId(),a=this.evaluatedMeshParams.labelClassId,l=A(this.evaluatedMeshParams.layerId,r.getObjectId(),s),h=G(r.getObjectId(),a,s),[c,m]=this._getMetricDir(),d=this.evaluatedMeshParams.scaleInfo?.maxScale??0,u=this.evaluatedMeshParams.scaleInfo?.minScale??0,f=this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0};e.metricStart(new M(n,a,l,h,t,i,c,m,d,u,f)),this._writeGlyphs(e,n,t,i,o,0,f,void 0,!1),e.metricBoxWrite(o.boundsT),e.metricEnd()}_getPointReferenceBounds(){if(!this._references)return null;for(const e of this._references){const t=e.getBoundsInfo();if(t)return t}return null}_writeLines(e,t){const{scaleInfo:i,verticalAlignment:s}=this.evaluatedMeshParams,r=this.evaluatedMeshParams.repeatLabelDistance||128,o=this._getShaping("middle");if(!o)return;const n=(e,t,i,s)=>this._placeSubdivGlyphs(e,t,i,s),a=(o.bounds.width+r)/(1<<B);this._current={out:e,id:t.getDisplayId(),objId:t.getObjectId(),shaping:o,zoomRange:w(i,this.getTileInfo()),referenceBounds:this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0},offsetDirection:null,pathIndex:0},this._verticalPlacement="bottom"===s?"above":"top"===s?"below":null,this._verticalPlacement?this._writeAboveAndBelowAlong(t,n,a):this._writeCenterAlong(t,n,a)}_writeAboveAndBelowAlong(e,t,i){const{repeatLabel:s}=this.evaluatedMeshParams,{shaping:r}=this._current,o=r.bounds.halfHeight,n=e.readGeometryForDisplay();if(!n)return;const a=g(n,"esriGeometryPolyline",1)??new p,l=R(a,o),h=R(a,-o),c=_(h,"esriGeometryPolyline",!1,!1),m=_(l,"esriGeometryPolyline",!1,!1),d=P(m.paths,r.bounds.width),u=P(c.paths,r.bounds.width);this._current.offsetDirection="above";for(let f=0;f<d.length;f++)this._current.pathIndex=f,y(d[f],i,t,!!s);this._current.offsetDirection="below";for(let f=0;f<u.length;f++)this._current.pathIndex=f,y(u[f],i,t,!!s)}_writeCenterAlong(e,t,i){const{repeatLabel:s}=this.evaluatedMeshParams,{shaping:r}=this._current,o=P(e.readLegacyGeometryForDisplay().paths,r.bounds.width);for(let n=0;n<o.length;n++)this._current.pathIndex=n,y(o[n],i,t,!!s)}_placeSubdivGlyphs(e,t,i,s){const{allowOverrun:r,labelPosition:o,repeatLabelDistance:n,layerId:a,labelClassId:l}=this.evaluatedMeshParams,{objId:h,shaping:c,pathIndex:m}=this._current,d=this._current.zoomRange[0],u=k(t),f=this._current.shaping.bounds.width/(1<<B),g=Math.sqrt(n||D)/(1<<B),_=Math.min(i,s-i),p=c.isMultiline?S:Math.log2(_/(g+f/2)),b=0===t?p:Math.min(u,p),x=Math.max(d,this._zoomLevel+B-b),v=this._zoomLevel-x,M=c.bounds.width/2*2**v,P=j(a,h,m,t,this._zoomLevel),y=Z(h,m,t,this._zoomLevel,l);this._current.shaping.isMultiline?0===t&&this._placeStraight(e,x,P,y):r&&v<0?this._placeStraightAlong(e,d,P,y):"parallel"===o?this._placeStraightAlong(e,x,P,y):"curved"===o&&this._placeCurved(e,x,M,P,y)}_placeStraight(e,t,i,s){const{out:r,id:o,shaping:n,referenceBounds:a}=this._current,{x:l,y:h}=e;r.metricStart(this._createLineLabelMetric(o,i,s,l,h)),r.metricBoxWrite(n.boundsT);const c=e.angle*(180/Math.PI)%360,m=(e.angle*(180/Math.PI)+180)%360;if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){const e={clipAngle:c,mapAligned:!0,isLineLabel:!0,minZoom:t};this._writeGlyphs(r,o,l,h,n,0,a,e,!1)}if(!this._verticalPlacement||this._verticalPlacement!==this._current.offsetDirection){const e={clipAngle:m,mapAligned:!0,isLineLabel:!0,minZoom:t};this._writeGlyphs(r,o,l,h,n,0,a,e,!1)}r.metricEnd()}_placeCurved(e,t,i,s,r){const{out:o,id:n}=this._current;o.metricStart(this._createLineLabelMetric(n,s,r,e.x,e.y));const a=e.clone(),l=e.angle*(180/Math.PI)%360,h=(e.angle*(180/Math.PI)+180)%360;this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||(this._placeFirst(a,t,1,l),this._placeBack(e,a,t,i,1,l),this._placeForward(e,a,t,i,1,l)),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||(this._placeFirst(a,t,0,h),this._placeBack(e,a,t,i,0,h),this._placeForward(e,a,t,i,0,h)),o.metricEnd()}_placeStraightAlong(e,i,n,a){const{out:l,id:h,shaping:c,zoomRange:m,referenceBounds:u}=this._current,{boxBorderLineColor:f,boxBackgroundColor:g}=this.evaluatedMeshParams,_=e.clone(),p=e.angle*(180/Math.PI)%360,b=(e.angle*(180/Math.PI)+180)%360,x=c.glyphs.length>0&&!(!f&&!g);if(l.metricStart(this._createLineLabelMetric(h,n,a,e.x,e.y)),x){const n=Math.max(i,m[0],0),a=Math.min(S,m[1]),f=s(o(),-e.angle),g={minZoom:n,maxZoom:a,clipAngle:p,mapAligned:!0,isLineLabel:!0},_=t(this.evaluatedMeshParams.offsetX),x=t(this.evaluatedMeshParams.offsetY);if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){const t=d(_,-1*x),[i,s]=c.shapeBackground(r(o(),f,t));l.recordStart(this.instanceId,this.attributeLayout,c.glyphs[0].textureBinding),this._writeTextBox(l,h,e.x,e.y,s,u,g),l.recordEnd()}if(!this._verticalPlacement||this._verticalPlacement!==this._current.offsetDirection){const t=d(_,x),[i,s]=c.shapeBackground(r(o(),f,t));g.clipAngle=b,l.recordStart(this.instanceId,this.attributeLayout,c.glyphs[0].textureBinding),this._writeTextBox(l,h,e.x,e.y,s,u,g),l.recordEnd()}}this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||this._placeFirst(_,i,1,p,!0),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||this._placeFirst(_,i,0,b,!0),l.metricEnd()}_placeBack(e,t,i,s,r,o){const n=e.clone();let a=e.backwardLength+z;for(;n.prev()&&!(a>=s);)this._placeOnSegment(n,t,a,i,-1,r,o),a+=n.length+z}_placeForward(e,t,i,s,r,o){const n=e.clone();let a=e.remainingLength+z;for(;n.next()&&!(a>=s);)this._placeOnSegment(n,t,a,i,1,r,o),a+=n.length+z}_placeFirst(e,i,r,a,l=!1){const{out:h,id:c,shaping:m,zoomRange:u,referenceBounds:f}=this._current,g=m.glyphs,_=t(this.evaluatedMeshParams.offsetX),p=t(this.evaluatedMeshParams.offsetY),b=d(_,p),x=s(o(),-e.angle);n(b,b,x);for(const t of g){const s=t.x>m.bounds.x?r:1-r,o=s*e.remainingLength+(1-s)*e.backwardLength,n=Math.abs(t.x+t.width/2-m.bounds.x),d=Math.max(0,this._zoomLevel+Math.log2(n/(o+z))),g=Math.max(i,l?0:d);if(t.maxZoom=Math.min(u[1],S),t.angle=e.angle+(1-r)*Math.PI,t.minZoom=Math.max(u[0],g),this._writeLineGlyph(h,c,e.x,e.y,t,a,f,!0),(r||this._current.offsetDirection)&&this._isVisible(t.minZoom,t.maxZoom)){const e=new v(t.bounds.x+b[0],t.bounds.y+b[1],t.bounds.width,t.bounds.height);h.metricBoxWrite(e)}}}_placeOnSegment(e,i,r,a,l,h,c){const{out:m,id:u,shaping:f,referenceBounds:g}=this._current,_=f.glyphs,p=e.dx/e.length,b=e.dy/e.length,x={x:e.x+r*-l*p,y:e.y+r*-l*b},M=t(this.evaluatedMeshParams.offsetX),P=t(this.evaluatedMeshParams.offsetY),y=d(M,P),w=s(o(),-e.angle);n(y,y,w);for(const t of _){const i=t.x>f.bounds.x?h:1-h;if(!(i&&1===l||!i&&-1===l))continue;const s=Math.abs(t.x+t.width/2-f.bounds.x),o=Math.max(0,this._zoomLevel+Math.log2(s/r)-.1),n=Math.max(a,this._zoomLevel+Math.log2(s/(r+e.length+z)));if(0!==o&&(t.angle=e.angle+(1-h)*Math.PI,t.minZoom=n,t.maxZoom=o,this._writeLineGlyph(m,u,x.x,x.y,t,c,g,!0),(h||this._current.offsetDirection)&&this._isVisible(t.minZoom,t.maxZoom))){const e=new v(t.bounds.x+y[0],t.bounds.y+y[1],t.bounds.width,t.bounds.height);m.metricBoxWrite(e)}}}_writeLineGlyph(e,t,i,s,r,o,n,a){if(i<0||i>b||s<0||s>b)return;e.recordStart(this.instanceId,this.attributeLayout,r.textureBinding);const{texcoords:l,offsets:h}=r,{fontSize:c,haloSize:m,outlineSize:d}=this._textMeshTransformProps,{sdfSize:u,sdfRadius:f}=this.evaluatedMeshParams.glyphs;this._writeQuad(e,t,i,s,{sdfSize:u,sdfRadius:f,texcoords:l,offsets:h,fontSize:c,haloSize:m,outlineSize:d,color:L(this.evaluatedMeshParams.color),isBackground:!1,referenceBounds:n,minZoom:Math.max(this._current.zoomRange[0],r.minZoom),maxZoom:Math.min(this._current.zoomRange[1],r.maxZoom),clipAngle:o,mapAligned:a,isLineLabel:!0}),e.recordEnd()}_packedZoom(e){return Math.floor(e*x)/x}_isVisible(e,t){let i=Math.max(this._current.zoomRange[0],e),s=Math.min(this._current.zoomRange[1],t);i=this._packedZoom(i),s=this._packedZoom(s);const r=this._packedZoom(this._zoomLevel);return i<=r&&r<=s}}function R(e,t){const i=new p,{coords:s,lengths:r}=e,o=u(),n=u(),d=u(),f=u(),g=u(),_=u(),b=2;let x=0;for(let u=0;u<r.length;u++){const e=r[u];for(let r=0;r<e;r++){const u=b*(r+x-1),p=b*(r+x),v=b*(r+x+1);r>0?a(o,s[u],s[u+1]):a(o,0,0),a(n,s[p],s[p+1]),r<e-1?a(d,s[v],s[v+1]):a(d,0,0),0===r?a(f,0,0):(l(f,n,o),h(f,f),a(f,f[1],-f[0])),r===e-1?a(g,0,0):(l(g,d,n),h(g,g),a(g,g[1],-g[0])),c(_,f,g),h(_,_);const M=_[0]*g[0]+_[1]*g[1];0!==M&&m(_,_,M),m(_,_,t),i.coords.push(n[0]+_[0],n[1]+_[1])}i.lengths.push(e),x+=e}return i}export{F as LabelMeshWriter,A as labelIdHash,G as labelMetricHash,j as lineLabelIdHash,Z as lineLabelMetricHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
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=
|
|
5
|
+
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=0,w=2,y=3,z=0,A=2,B=2,C=3,D=0,E=3,F=16777216,G=1.1,H=16,I=128,J=1;export{j as attrVvColor,k as attrVvOpacity,l as attrVvRotation,i as attrVvSize,A as bitsetFillRandomPatternOffset,u as bitsetGenericConsiderAlphaOnly,q as bitsetGenericLockColor,C as bitsetLineIsSdf,B as bitsetLineScaleDash,v as bitsetMarkerAlignmentMap,w as bitsetMarkerOutlineAllowColorOverride,y as bitsetMarkerScaleSymbolsProportionally,J as bitsetOutlineUsesColorVV,D as bitsetTextIsBackground,E as bitsetTextIsMapAligned,z as bitsetTypeFillOutline,o as c256ToRad,e as cDegToRad,t as cRadToDeg,f as epsilon,g as epsilonHitTest,x as extrudeScalePlacementPadding,n as fillPositionPrecision,G as magnifierBarrelFactor,h as maxFilterCount,F as maxRepresentableInt,m as nanMagicNumber,a as offsetPrecision,b as outlineScale,H as packPrecision,d as placementPadding,c as positionPrecision,I as signedToUnsignedByte,p as softEdgeRatio,s as thinLineHalfWidth,r as thinLineWidthFactor};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clamp as t}from"../../../../../../../core/mathUtils.js";import{pt2px as e}from"../../../../../../../core/screenUtils.js";import{GeometryCursor as o}from"../../../../../../../geometry/GeometryCursor.js";import{CIMMarkerPlacementHelper as i}from"../../../../../../../symbols/cim/placements/CIMMarkerPlacementHelper.js";import{getXDirection as r,getYDirection as s}from"../../../alignmentUtils.js";import{minMaxZoomPrecisionFactor as n,maxTextLineWidth as a,minTextLineWidth as
|
|
5
|
+
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{CIMMarkerPlacementHelper as i}from"../../../../../../../symbols/cim/placements/CIMMarkerPlacementHelper.js";import{getXDirection as r,getYDirection as s}from"../../../alignmentUtils.js";import{minMaxZoomPrecisionFactor as n,maxTextLineWidth as a,minTextLineWidth as l,magicLabelLineHeight as c}from"../../../definitions.js";import{shapeGlyphs as f}from"../../../mesh/templates/shapingUtils.js";import{processColorInput as h,packBitset as d,getMinMaxZoom as p}from"../fill/meshWriterUtils.js";import{MeshWriter as u}from"../mesh/MeshWriter.js";import{bitsetTextIsBackground as m,bitsetTextIsMapAligned as g}from"../shaders/constants.js";import{TextMeshTransformProps as x}from"./TextParams.js";import{DataType as y}from"../../../../../../webgl/enums.js";const S=28,_=[4,4],z=[16,4],P={topLeft:z,topRight:z,bottomLeft:z,bottomRight:z},b=[4,2],R=[4,6],T={topLeft:b,topRight:b,bottomLeft:R,bottomRight:R},k={topLeft:b,topRight:R,bottomLeft:b,bottomRight:R},B={topLeft:R,topRight:R,bottomLeft:_,bottomRight:_},M={topLeft:_,topRight:_,bottomLeft:R,bottomRight:R},L={topLeft:R,topRight:_,bottomLeft:R,bottomRight:_},w={topLeft:_,topRight:R,bottomLeft:_,bottomRight:R},I={createComputedParams:t=>t,optionalAttributes:{zoomRange:{type:y.UNSIGNED_SHORT,count:2,packPrecisionFactor:n,packTessellation:({minZoom:t,maxZoom:e})=>[t||0,e||S]},clipAngle:{type:y.UNSIGNED_BYTE,count:1,packTessellation:({clipAngle:t})=>E(t||0)},referenceSymbol:{type:y.BYTE,count:4,packPrecisionFactor:1,packTessellation:(t,o)=>{const i=t.isLineLabel||!t.referenceBounds,n=r(i?"center":o.horizontalAlignment),a=s(i?"middle":o.verticalAlignment),{offsetX:l,offsetY:c,size:f}=i?{offsetX:0,offsetY:0,size:0}:t.referenceBounds;return[e(l),-e(c),Math.round(e(f)),n+1<<2|a+1]}},visibility:{type:y.FLOAT,count:1,otherSource:!0}},attributes:{pos:{type:y.SHORT,count:2,pack:"position",packPrecisionFactor:10},id:{type:y.UNSIGNED_BYTE,count:3,pack:"id"},bitset:{type:y.UNSIGNED_BYTE,count:1,packTessellation:({isBackground:t,mapAligned:e})=>d([[m,t],[g,!!e]])},offset:{type:y.SHORT,count:2,packPrecisionFactor:8,packAlternating:{count:4,packTessellation:({offsets:t})=>{const{bottomLeft:e,bottomRight:o,topLeft:i,topRight:r}=t;return[i,r,e,o]}}},textureUV:{type:y.SHORT,count:2,packPrecisionFactor:4,packAlternating:{count:4,packTessellation:({texcoords:t})=>{const{bottomLeft:e,bottomRight:o,topLeft:i,topRight:r}=t;return[i,r,e,o]}}},color:{type:y.UNSIGNED_BYTE,count:4,normalized:!0,packTessellation:({color:t})=>t},fontAndReferenceSize:{type:y.UNSIGNED_SHORT,count:4,packPrecisionFactor:4,packTessellation:({fontSize:t,sdfSize:o,sdfRadius:i},{referenceSize:r})=>[Math.round(e(t)),Math.round(e(r??t)),o,i]},outlineColor:{type:y.UNSIGNED_BYTE,count:4,normalized:!0,pack:({outlineColor:t})=>h(t)},haloColor:{type:y.UNSIGNED_BYTE,count:4,normalized:!0,pack:({haloColor:t})=>h(t)},outlineAndHaloSize:{type:y.UNSIGNED_SHORT,count:2,packPrecisionFactor:4,packTessellation:({outlineSize:t,haloSize:o})=>[Math.round(e(t)),Math.round(e(o))]}}};class A extends u{constructor(){super(...arguments),this.vertexSpec=I,this._textMeshParamsPropsInitialized=!1}ensurePacked(t,e,o){super.ensurePacked(t,e,o),this._textMeshParamsPropsInitialized&&!this._evaluator.hasDynamicProperties||(this._textMeshTransformProps=new x(this.evaluatedMeshParams),this._textMeshParamsPropsInitialized=!0)}_write(t,e,o){const i=this._getShaping();if(!i)return;const r=e.getDisplayId();if(null!=this.evaluatedMeshParams.placement)return this._writePlacedTextMarkers(t,e,i,o);if(o?.nextPath())return o.nextPoint(),this._writeGlyphs(t,r,o.x,o.y,i,0);if("esriGeometryPolygon"===e.geometryType){const o=e.readCentroidForDisplay();if(!o)return;const[s,n]=o.coords;return this._writeGlyphs(t,r,s,n,i,0)}if("esriGeometryMultipoint"===e.geometryType){const o=e.readGeometryForDisplay();return void o?.forEachVertex((e,o)=>this._writeGlyphs(t,r,e,o,i,0))}const s=e.readXForDisplay(),n=e.readYForDisplay();return this._writeGlyphs(t,r,s,n,i,0)}_writePlacedTextMarkers(t,r,s,n){const a=n??o.fromFeatureSetReaderCIM(r);if(!a)return;const l=-1,c=i.getPlacement(a,l,this.evaluatedMeshParams.placement,e(1),t.id);if(!c)return;const f=r.getDisplayId();let h=c.next();for(;null!=h;){const e=h.tx,o=-h.ty,i=-h.getAngle();this._writeGlyphs(t,f,e,o,s,i),h=c.next()}}_getShaping(o){const i=this._textMeshTransformProps,r=this.evaluatedMeshParams;if(!r.glyphs?.glyphs.length)return null;const s=e(i.fontSize),n=e(i.offsetX),h=e(i.offsetY),d=r.glyphs.sdfSize,p=t(e(r.lineWidth),l,a),u=d/24*c*t(r.lineHeightRatio,.25,4);return f(r.glyphs,{scale:s/d,angle:i.postAngle,xOffset:n,yOffset:h,horizontalAlignment:r.horizontalAlignment,verticalAlignment:o||r.verticalAlignment,maxLineWidth:p,lineHeight:u,decoration:r.decoration,borderLineSizePx:e(r.boxBorderLineSize),hasBackground:!!r.boxBackgroundColor,useCIMAngleBehavior:r.useCIMAngleBehavior})}_writeGlyphs(t,o,i,r,s,n,a,l,c=!0){const f=this.evaluatedMeshParams,d=this._textMeshTransformProps,u=e(d.fontSize),m=d.haloSize,g=d.outlineSize,x=e(d.offsetX),y=e(d.offsetY),{sdfSize:S,sdfRadius:_}=f.glyphs,[z,P]=p(f.scaleInfo,this.getTileInfo());0!==n&&s.setRotation(n);const b=s.bounds,R=i+b.x+x,T=r+b.y-y,k=2*(f.minPixelBuffer?f.minPixelBuffer/u:1),B=Math.max(b.width,b.height)*k;s.textBox&&(t.recordStart(this.instanceId,this.attributeLayout,s.glyphs[0].textureBinding),c&&t.recordBounds(R,T,B,B),this._writeTextBox(t,o,i,r,s.textBox,a,l),t.recordEnd());for(const e of s.glyphs){t.recordStart(this.instanceId,this.attributeLayout,e.textureBinding),c&&t.recordBounds(R,T,B,B);const{texcoords:s,offsets:n}=e;this._writeQuad(t,o,i,r,{texcoords:s,offsets:n,fontSize:u,haloSize:m,outlineSize:g,sdfSize:S,sdfRadius:_,color:h(f.color),isBackground:!1,referenceBounds:a,minZoom:z,maxZoom:P,...l}),t.recordEnd()}0!==n&&s.setRotation(-n)}_writeTextBox(t,e,o,i,r,s,n){const a=this.evaluatedMeshParams,{fontSize:l,haloSize:c,outlineSize:f}=this._textMeshTransformProps,{boxBackgroundColor:d,boxBorderLineColor:p}=a,{sdfSize:u,sdfRadius:m}=a.glyphs,g={isBackground:!0,fontSize:l,haloSize:c,outlineSize:f,referenceBounds:s,sdfSize:u,sdfRadius:m,...n};d&&(this._writeQuad(t,e,o,i,{texcoords:P,offsets:r.main,color:h(d),...g}),p||(this._writeQuad(t,e,o,i,{texcoords:B,offsets:r.top,color:h(d),...g}),this._writeQuad(t,e,o,i,{texcoords:M,offsets:r.bot,color:h(d),...g}),this._writeQuad(t,e,o,i,{texcoords:L,offsets:r.left,color:h(d),...g}),this._writeQuad(t,e,o,i,{texcoords:w,offsets:r.right,color:h(d),...g}))),p&&(this._writeQuad(t,e,o,i,{texcoords:T,offsets:r.top,color:h(p),...g}),this._writeQuad(t,e,o,i,{texcoords:T,offsets:r.bot,color:h(p),...g}),this._writeQuad(t,e,o,i,{texcoords:k,offsets:r.left,color:h(p),...g}),this._writeQuad(t,e,o,i,{texcoords:k,offsets:r.right,color:h(p),...g}))}_writeQuad(t,e,o,i,r){const s=t.vertexCount();this._writeVertex(t,e,o,i,r),t.indexWrite(s+0),t.indexWrite(s+1),t.indexWrite(s+2),t.indexWrite(s+1),t.indexWrite(s+3),t.indexWrite(s+2)}}const E=t=>Math.round(t*(254/360));export{A as TextMeshWriter,I as TextVertexSpec,S as maxLabelZoom};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t,__param as e}from"tslib";import{minMaxZoomPrecisionFactor as i,labelPlacementOffsetPadding as o}from"../../../definitions.js";import{location as s,option as l,uniform as
|
|
5
|
+
import{__decorate as t,__param as e}from"tslib";import{minMaxZoomPrecisionFactor as i,labelPlacementOffsetPadding as o}from"../../../definitions.js";import{location as s,option as l,uniform as r,define as a,input as n,ComputeVertexInput as d}from"../../GraphShaderModule.js";import{abs as p,min as u,Float as y,floor as m,step as c,Vec3 as f,Mat3 as h,Vec2 as v,ifElse as w,equal as x,greaterThan as b,Bool as V,Vec4 as S,texture2D as g,smoothstep as z,Int as R,bitRShift as j,bitAnd as A}from"../../graph/glsl.js";import{AFeatureShader as C,FeatureVertexInput as M,FeatureFragmentInput as O}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as P,bitsetTextIsMapAligned as L}from"../shaders/constants.js";import{distPointTriangle as N,failHittest as U}from"../shaders/hittestUtils.js";import{MosaicInfo as T}from"../shaders/MosaicInfo.js";import{getBit as H}from"../shaders/utils.js";import{VisualVariableColor as _}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as k}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as I}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as D}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as B}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as q}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as E}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as F,getVisualVariableRotation as W}from"../shaders/vvUtils.js";const G=360/254;class Z extends M{}t([s(3,S)],Z.prototype,"color",void 0),t([s(4,v)],Z.prototype,"offset",void 0),t([s(5,v)],Z.prototype,"textureUV",void 0),t([s(6,S)],Z.prototype,"fontAndReferenceSize",void 0),t([s(7,S)],Z.prototype,"outlineColor",void 0),t([s(8,S)],Z.prototype,"haloColor",void 0),t([s(9,v)],Z.prototype,"outlineAndHaloSize",void 0),t([s(10,v)],Z.prototype,"zoomRange",void 0),t([s(11,y)],Z.prototype,"clipAngle",void 0),t([s(12,S)],Z.prototype,"referenceSymbol",void 0),t([s(15,y)],Z.prototype,"visibility",void 0);class J extends d{}t([s(13,v)],J.prototype,"offsetNextVertex1",void 0),t([s(14,v)],J.prototype,"offsetNextVertex2",void 0);class K extends O{}class Q extends C{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:o,zoomRange:s,visibility:l}=t,r=o.multiply(G),a=p(this.view.rotation.subtract(r)),n=u(new y(360).subtract(a),a);let d=new y(0);const f=m(this.view.currentZoom.multiply(i)).divide(i),h=s.x,v=s.y,w=new y(1).subtract(c(h,f)).multiply(2),x=c(new y(90),n).multiply(2),b=new y(2).multiply(new y(1).subtract(c(f,v)));return d=d.add(e.multiply(w)),d=d.add(e.multiply(x)),d=d.add(b),l&&(d=d.add(l)),d}vertex(t,e){const i=H(t.bitset,P),s=new y(1).subtract(i);let l=t.fontAndReferenceSize[0];const r=t.fontAndReferenceSize[1],a=t.fontAndReferenceSize[2],n=t.fontAndReferenceSize[3];let d=l.divide(a);const p=1===this.textRenderPassType?t.outlineColor:2===this.textRenderPassType?t.haloColor:this._getVertexColor(t),u=this.view.displayViewScreenMat3.multiply(new f(t.pos,1));let m=t.offset,c=new y(1),g=h.identity(),z=new v(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,i=e.xy,s=e.z,l=this._unpackDirection(e.w),r=F(this,t.id,s).divide(2),a=l.multiply(r.add(o));z=i.add(a),m=m.add(z)}else{c=F(this,t.id,r).divide(r),l=l.multiply(c),d=d.multiply(c),m=m.multiply(c),g=W(this,t.id),m=g.multiply(new f(m,0)).xy}const R=H(t.bitset,L),j=this._getViewRotationMatrix(R).multiply(new f(m,0));let A=this.isLabel?this.clipLabel(t,R):this.clip(t.id,t.zoomRange);A=this.isBackgroundPass?A.add(s.multiply(2)):A.add(i.multiply(2));let C=new y(0);if(1===this.textRenderPassType){A=A.add(w(x(t.outlineAndHaloSize.x,new y(0)),new y(2),new y(0)));C=new y(t.outlineAndHaloSize.x).divide(d).divide(n)}if(2===this.textRenderPassType){const e=t.outlineAndHaloSize.x,i=new y(t.outlineAndHaloSize.y);A=A.add(w(x(i,new y(0)),new y(2),new y(0)));C=i.add(e).divide(d).divide(n)}const M=this.isLabel?b(A,new y(1)):new V(!1);return{glPosition:new S(u.xy.add(j.xy),A,1),color:p,size:d,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new y(.315).divide(a.divide(n)).multiply(a).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:C,...this.maybeRunHittest(t,e,{vvSizeAdjustment:c,vvRotation:g,labelOffset:z,labelClipped:M})}}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new y(1).subtract(t);return e.multiply(t).add(i.multiply(o))}fragment(t){const e=new y(2/8),i=new y(1).subtract(e),o=g(this.mosaicInfo.texture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,r=z(s.subtract(l),s.add(l),o);return this.getFragmentOutput(t.color.multiply(r),t)}hittest(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s,labelClipped:l}){let r,a,n;this.isLabel?(r=new f(t.offset.add(s),0),a=new f(e.offsetNextVertex1.add(s),0),n=new f(e.offsetNextVertex2.add(s),0)):(r=o.multiply(new f(t.offset.multiply(i),0)),a=o.multiply(new f(e.offsetNextVertex1.multiply(i),0)),n=o.multiply(new f(e.offsetNextVertex2.multiply(i),0)));const{viewMat3:d,tileMat3:p}=this.view,u=d.multiply(p).multiply(new f(t.pos,1)),y=u.add(p.multiply(r)).xy,m=u.add(p.multiply(a)).xy,c=u.add(p.multiply(n)).xy,h=N(this.hittestRequest.position,y.xy,m.xy,c.xy);return this.isLabel?w(l,U(this.hittestRequest),h):h}_unpackDirection(t){const e=new R(t),i=j(e,new R(2)),o=A(e,new R(3));return new v(new y(i).subtract(1),new y(o).subtract(1))}_getVertexColor(t){let e=t.color;if(this.visualVariableColor){const i=this.storage.getColorValue(t.id);e=this.visualVariableColor.getColor(i,t.color,new V(!1))}if(this.visualVariableOpacity){const i=this.storage.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([l(_)],Q.prototype,"visualVariableColor",void 0),t([l(k)],Q.prototype,"visualVariableOpacity",void 0),t([l(I)],Q.prototype,"visualVariableRotation",void 0),t([l(D)],Q.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(B)],Q.prototype,"visualVariableSizeScaleStops",void 0),t([l(q)],Q.prototype,"visualVariableSizeStops",void 0),t([l(E)],Q.prototype,"visualVariableSizeUnitValue",void 0),t([r(T)],Q.prototype,"mosaicInfo",void 0),t([a],Q.prototype,"textRenderPassType",void 0),t([a],Q.prototype,"isBackgroundPass",void 0),t([a],Q.prototype,"isLabel",void 0),t([e(0,n(Z)),e(1,n(J))],Q.prototype,"vertex",null),t([e(0,n(K))],Q.prototype,"fragment",null);export{K as TextFragmentInput,Q as TextShader,Z as TextVertexInput};
|