@arcgis/core 5.0.0-next.66 → 5.0.0-next.68
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/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +9 -6
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.js +1 -1
- 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/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/batchExec.js +1 -1
- package/arcade/compilerUtils.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/geometry/unitConversion.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/arcade.js +1 -1
- 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/{251eb6e00f99a816d55c.js → 0326314947734b8e640a.js} +1 -1
- package/assets/esri/core/workers/chunks/04176244b0a3539c9681.js +1 -0
- package/assets/esri/core/workers/chunks/04958494022f82dca473.js +1 -0
- 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/0f8149fdcf0adeca268e.js +1 -0
- package/assets/esri/core/workers/chunks/{aa7a1705266eec353cb6.js → 0fc22ad791d3ec0a9c5e.js} +1 -1
- package/assets/esri/core/workers/chunks/10e474d664b20adcd917.js +1 -0
- package/assets/esri/core/workers/chunks/12f9a55253084a910b2e.js +1 -0
- package/assets/esri/core/workers/chunks/14dedd80fb797303f91f.js +1 -0
- package/assets/esri/core/workers/chunks/1a6d2f525dd30d08cf9b.js +1 -0
- package/assets/esri/core/workers/chunks/{81d89107ff82604a3ea0.js → 1b445981fbc8373f4dd8.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ba3c2b9f699d94d62b8.js → 1ec1a1997b5577619040.js} +1 -1
- package/assets/esri/core/workers/chunks/204d738c8b651314ae64.js +1 -0
- package/assets/esri/core/workers/chunks/2085084324cd5a81783f.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/2c2c0f66cffc521df736.js +1 -0
- package/assets/esri/core/workers/chunks/2dd347aa2a061d536e69.js +1 -0
- package/assets/esri/core/workers/chunks/2dfa7abf2d39fa5a3874.js +1 -0
- package/assets/esri/core/workers/chunks/322085d63719da6e443c.js +1 -0
- package/assets/esri/core/workers/chunks/{76086517591d0eb35156.js → 34a2e0462eb05986cdd1.js} +1 -1
- package/assets/esri/core/workers/chunks/{a6dcd13c792b6538ac50.js → 35593a9790818b689455.js} +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/3a04153ca9d8e4f01185.js +1 -0
- package/assets/esri/core/workers/chunks/{4e9a8fce55cad841c731.js → 3b25f5d9c8f78bb6e011.js} +1 -1
- package/assets/esri/core/workers/chunks/3e7ea06b342e33bc48a5.js +1 -0
- package/assets/esri/core/workers/chunks/3ed317900f0edf635508.js +1 -0
- package/assets/esri/core/workers/chunks/401ce5cb98fa14c1a725.js +1 -0
- package/assets/esri/core/workers/chunks/4319b89cfa02894a8cae.js +1 -0
- 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/4a060147d25929680ec8.js +1 -0
- package/assets/esri/core/workers/chunks/4bcd74951477e8977ba1.js +1 -0
- package/assets/esri/core/workers/chunks/4d0eaeb4cd6cd55e25fd.js +1 -0
- package/assets/esri/core/workers/chunks/{687d2b761dc5b5cf0c31.js → 4d4d71d24c1a9cb342b8.js} +1 -1
- package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +1 -0
- package/assets/esri/core/workers/chunks/50f03813fba4b752ca9f.js +1 -0
- package/assets/esri/core/workers/chunks/{abc236e99b52be1c83b9.js → 52a14266fe239b95c5ce.js} +1 -1
- package/assets/esri/core/workers/chunks/53b5c77832df7df4d4e3.js +1 -0
- package/assets/esri/core/workers/chunks/{34178ace79e8dea3567d.js → 562cddaf63985e53ee6e.js} +1 -1
- 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/{6599cc702a46f81a5634.js → 5dd5be91038df8902dc4.js} +1 -1
- package/assets/esri/core/workers/chunks/{49a1b7f700b8a42de817.js → 60c7f896f2246a8aa6d7.js} +19 -19
- package/assets/esri/core/workers/chunks/60f363ee2add089e8f0b.js +1 -0
- package/assets/esri/core/workers/chunks/61801bb8c7be8fe77086.js +1 -0
- package/assets/esri/core/workers/chunks/679cd6424e0e2d7f372b.js +1 -0
- package/assets/esri/core/workers/chunks/68074a484d7f9bc713c0.js +1 -0
- package/assets/esri/core/workers/chunks/6acfa51b81e6f4255118.js +1 -0
- package/assets/esri/core/workers/chunks/{3fe7be535affae31de7e.js → 6b85a8776ec2beff63cb.js} +1 -1
- package/assets/esri/core/workers/chunks/6be530ab81291745485b.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/6df484faf54e90a6cc77.js +1 -0
- package/assets/esri/core/workers/chunks/6ea6ad894ac634aa4391.js +1 -0
- package/assets/esri/core/workers/chunks/6f8098f9fe233833245a.js +1 -0
- package/assets/esri/core/workers/chunks/73c416ae0ec5a1815591.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/75fd2ef1236a9364ca7f.js +1 -0
- package/assets/esri/core/workers/chunks/{23b623637126f8411a30.js → 7aec07f2482934259d12.js} +1 -1
- package/assets/esri/core/workers/chunks/7be9bbae23895d1cfa92.js +1 -0
- package/assets/esri/core/workers/chunks/{741d170187e58e81584d.js → 7d744554d14057d9b2b1.js} +1 -1
- package/assets/esri/core/workers/chunks/7ea48661f1087d06aa41.js +1 -0
- package/assets/esri/core/workers/chunks/{47e5149765beee46f208.js → 7ee68f67f9cc48a328f0.js} +1 -1
- package/assets/esri/core/workers/chunks/866477acdf03b8a40bc9.js +1 -0
- package/assets/esri/core/workers/chunks/8e83c133b201b9b61e70.js +1 -0
- package/assets/esri/core/workers/chunks/9086a4933d3d3d9ffa72.js +1 -0
- package/assets/esri/core/workers/chunks/94174d40de39dbe7d0bf.js +1 -0
- package/assets/esri/core/workers/chunks/98f4b44eca91c42ca08e.js +1 -0
- package/assets/esri/core/workers/chunks/9ccabf8142fb5de4d3e2.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{dd99b77a7c0a052507bb.js → 9d88b4ba8e511da64583.js} +3 -3
- package/assets/esri/core/workers/chunks/a808be466812db51813d.js +1 -0
- package/assets/esri/core/workers/chunks/{6b4a24248182245167ca.js → a931515a2569713e743b.js} +1 -1
- package/assets/esri/core/workers/chunks/a95e28ade258b144cbb5.js +1 -0
- package/assets/esri/core/workers/chunks/adc68e2c6d2698a52bfe.js +1 -0
- package/assets/esri/core/workers/chunks/aeb524eded012217a865.js +1 -0
- package/assets/esri/core/workers/chunks/b2a1e5e9182b643909eb.js +316 -0
- package/assets/esri/core/workers/chunks/{ac6f002cfad42e60de8f.js → b48033645091c91e0d88.js} +1 -1
- package/assets/esri/core/workers/chunks/b8988771bfa4e785ebd6.js +1 -0
- package/assets/esri/core/workers/chunks/bb4574a87ca21e719f0d.js +1 -0
- package/assets/esri/core/workers/chunks/{07639f406b71bb49ffd6.js → bdbb5b33f0f49661bf6d.js} +1 -1
- package/assets/esri/core/workers/chunks/c042269586921e337be9.js +1 -0
- package/assets/esri/core/workers/chunks/c623918e289a09905cd1.js +1 -0
- package/assets/esri/core/workers/chunks/c7391b0b5a9c916a53f7.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/{43d28c6509c21b8917a8.js → ca7523c14d81c470e92e.js} +1 -1
- package/assets/esri/core/workers/chunks/cd2708fb7636b3ace229.js +1 -0
- package/assets/esri/core/workers/chunks/{310f3268582e61cd86da.js → d21480925a8bc9c7de96.js} +1 -1
- package/assets/esri/core/workers/chunks/d445e9399fe4ca3d2a50.js +1 -0
- package/assets/esri/core/workers/chunks/d7683a95775c9f401a7e.js +1 -0
- package/assets/esri/core/workers/chunks/{9d6945cda99d14af83ac.js → d7d9656b990ce8be2152.js} +1 -1
- 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/df4a0af329ce94a47a7b.js +1 -0
- package/assets/esri/core/workers/chunks/e10d6e511921394474ca.js +1 -0
- package/assets/esri/core/workers/chunks/e4b6aa8f67c2bd285020.js +1 -0
- package/assets/esri/core/workers/chunks/e5aac523c37d906eece6.js +1 -0
- package/assets/esri/core/workers/chunks/e6ca02f98f855024f74b.js +1 -0
- package/assets/esri/core/workers/chunks/{892157696e8f9e38c472.js → e6e837e43b9348050832.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3325ed8d224e2350db7.js → e8a3ad00936f2ccaf362.js} +1 -1
- package/assets/esri/core/workers/chunks/{f351007cdcd0938d3b6c.js → eeb24a4ab4993f1f4e8e.js} +1 -1
- package/assets/esri/core/workers/chunks/ef7063ee790d2d64d4b2.js +1 -0
- package/assets/esri/core/workers/chunks/{b65fcfde62d49de1fa54.js → ef977be20a647aeded0a.js} +1 -1
- package/assets/esri/core/workers/chunks/efb631371b6bb3f043bb.js +1 -0
- package/assets/esri/core/workers/chunks/{0f5693541111fcae0c2f.js → f0914715e90e43466f8c.js} +1 -1
- package/assets/esri/core/workers/chunks/f25bebd2b6eb0d0f6626.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/f95e488d2b86e320624f.js +1 -0
- package/assets/esri/core/workers/chunks/{bfc063d4431bfa162160.js → fd09f38fb4d99bf34988.js} +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/boundedPlane.js +1 -1
- package/chunks/bundle2.js +5 -0
- package/config.js +1 -1
- package/copyright.txt +70 -1
- package/core/BidiText.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/compilerUtils.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/core/units.js +1 -1
- package/core/workers/loaderConfig.js +1 -1
- package/editing/sharedTemplates/SharedTemplate.js +1 -1
- package/geometry/support/FloatArray.js +1 -1
- package/geometry/support/Indices.js +1 -1
- package/geometry/support/MeshTexture.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/boundedPlane.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/meshUtils/External.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/imageutils.js +1 -1
- package/geometry/support/meshUtils/loadExternal.js +1 -1
- package/geometry/support/rotate.js +1 -1
- package/interfaces.d.ts +23 -24
- package/kernel.js +1 -1
- package/layers/BingMapsLayer.d.ts +2 -3
- package/layers/BuildingSceneLayer.d.ts +3 -5
- 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/BuildingGroupSublayer.d.ts +1 -1
- 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/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/dehydratedFeatureComparison.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/graphics/hydratedFeatures.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/orientedImagery/transformations/rectifyMapPoint.js +1 -1
- package/layers/raster/datasets/wcsCoverageParser.d.ts +1 -1
- package/layers/raster/functions/changeDetectionUtils.js +1 -1
- package/layers/raster/functions/creators/createLocalFunctions.d.ts +1 -1
- package/layers/raster/functions/customBandIndexUtils.js +1 -1
- package/layers/raster/functions/focalStatUtils.js +1 -1
- package/layers/raster/functions/pixelTransformUtils.js +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/save/featureLayerUtils.js +1 -1
- package/layers/support/ElevationQuery.d.ts +2 -2
- package/layers/support/ElevationSampler.js +1 -1
- 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/SubtypeSublayer.js +1 -1
- 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/networks/support/TopologyValidationJobInfo.js +1 -1
- package/networks/support/TraceJobInfo.js +1 -1
- package/package.json +3 -3
- package/popup/FieldInfo.d.ts +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/rendererConversion.js +1 -1
- package/renderers/visualVariables/support/visualVariableUtils.js +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/pbfDehydratedFeatureSet.js +1 -1
- 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/JobInfo.js +1 -1
- package/rest/support/PrintTemplate.d.ts +4 -6
- package/rest/support/ServiceAreaParameters.js +1 -1
- package/rest/support/types.d.ts +17 -1
- package/smartMapping/heuristics/sizeRange.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/statistics/support/statsWorker.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/smartMapping/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/symbols/support/ElevationInfo.d.ts +2 -2
- package/symbols/support/IconSymbol3DLayerResource.d.ts +1 -1
- package/symbols/support/defaults.js +1 -1
- package/symbols/support/defaults3D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/symbolLayerUtils3D.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +16 -11
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.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/TextureUploadManager.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/input/handlers/DoubleTapDragZoom.js +1 -1
- package/views/2d/input/handlers/KeyZoom.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/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- 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/AreaMeasurement/support/utils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +16 -11
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/environment/CloudsParameters.js +1 -1
- package/views/3d/environment/CloudsRenderer.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/glTF/internal/fillDefaults.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/editingTools/isSupportedObjectUtils.js +1 -1
- package/views/3d/interactive/editingTools/move/isSupportedObject.js +1 -1
- package/views/3d/interactive/editingTools/transform/isSupportedGraphic.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.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/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/LabelInfo.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/lineUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/primitiveObjectUtils.js +1 -1
- package/views/3d/layers/graphics/primitiveObjectSymbolUtils.js +1 -1
- package/views/3d/layers/i3s/BuildingFilterUtil.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
- package/views/3d/layers/i3s/SphereCone.js +5 -0
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/layers/support/edgeUtils.js +1 -1
- package/views/3d/layers/support/featureReference.js +1 -1
- package/views/3d/layers/support/featureTileQuery3D.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/buffer/glUtil.js +1 -1
- package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
- package/views/3d/webgl/RenderNode.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/ComponentData.glsl.js +8 -8
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.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/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +4 -4
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +8 -8
- package/views/VideoView.d.ts +2 -3
- package/views/VideoView.js +1 -1
- package/views/View2D.d.ts +2 -3
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileIndicatorPointVisualization.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/constants.js +1 -1
- package/views/draw/Draw.js +1 -1
- package/views/input/ViewEvents.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationFilter.js +1 -1
- package/views/interactive/snapping/featureSources/symbologySnappingCandidates.js +1 -1
- package/views/layers/MediaLayerViewMixin.d.ts +1 -1
- package/views/support/PromiseQueue.js +1 -1
- package/views/support/screenUtils.js +1 -1
- package/views/support/screenshotUtils.js +1 -1
- package/views/types.d.ts +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Uniform.js +1 -1
- package/views/webgl/Util.js +1 -1
- package/webdoc/applicationProperties/SearchLayerField.d.ts +1 -1
- package/webdoc/applicationProperties/SearchTableField.d.ts +1 -1
- package/webscene/Slide.d.ts +2 -2
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm.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/Editor/workflowUtils.js +1 -1
- package/widgets/Feature.d.ts +3 -5
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FieldInput.d.ts +2 -2
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- 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/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/support/OperationHandle.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0099f4729c94c779ba35.js +0 -1
- package/assets/esri/core/workers/chunks/058fb2cd6387acfd458c.js +0 -1
- package/assets/esri/core/workers/chunks/0ae018098906d6a88904.js +0 -1
- package/assets/esri/core/workers/chunks/0dc3a04ce717b7ddd957.js +0 -1
- package/assets/esri/core/workers/chunks/0e5cd0cf6ab7cb37d723.js +0 -1
- package/assets/esri/core/workers/chunks/0ee407b8db5c07a00d82.js +0 -1
- package/assets/esri/core/workers/chunks/10373885604655f673df.js +0 -1
- package/assets/esri/core/workers/chunks/13d61d34e55c80e4ecdf.js +0 -1
- package/assets/esri/core/workers/chunks/17dea03fc4eb414f0022.js +0 -1
- package/assets/esri/core/workers/chunks/1967239713b58dccfd81.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/1c350a2c4014146dbcd9.js +0 -1
- package/assets/esri/core/workers/chunks/2266a8f2c2ec37c19bb4.js +0 -1
- package/assets/esri/core/workers/chunks/226acd251ad7d7ee3b57.js +0 -1
- package/assets/esri/core/workers/chunks/22b07c54a5fcc27771b0.js +0 -1
- package/assets/esri/core/workers/chunks/22ca80f491e070b2a5e7.js +0 -1
- package/assets/esri/core/workers/chunks/22dd5cecc7e2d4d0baf8.js +0 -316
- package/assets/esri/core/workers/chunks/2402d305a77fef4694a0.js +0 -1
- package/assets/esri/core/workers/chunks/27f096c434f049b8df01.js +0 -1
- package/assets/esri/core/workers/chunks/2a6231db5ee6cbfd59a5.js +0 -1
- package/assets/esri/core/workers/chunks/3371935a4fd6346d3a17.js +0 -1
- package/assets/esri/core/workers/chunks/3c4f8597f602779174f1.js +0 -1
- package/assets/esri/core/workers/chunks/3da53c017f9c5d2d778a.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/4f33a2ecb154a2c2449c.js +0 -1
- package/assets/esri/core/workers/chunks/52726458f590e726d52c.js +0 -1
- package/assets/esri/core/workers/chunks/536c492fdda30f2f1288.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/600e2e6b51e2fb9c598c.js +0 -1
- package/assets/esri/core/workers/chunks/6035daa65fc3ebf86515.js +0 -1
- package/assets/esri/core/workers/chunks/63b8cd7d5cafbaeed894.js +0 -1
- package/assets/esri/core/workers/chunks/6cb44cd319cb6c2539c8.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/7f4fa2f2e85863d3cfb9.js +0 -1
- package/assets/esri/core/workers/chunks/8f4c480c418eba299c2b.js +0 -1
- package/assets/esri/core/workers/chunks/964de713042f52d71e42.js +0 -1
- package/assets/esri/core/workers/chunks/a3836f6a93924ee4816e.js +0 -1
- package/assets/esri/core/workers/chunks/ab520fd1ae917daf07d8.js +0 -1
- package/assets/esri/core/workers/chunks/acc7ff44bfcb5c195114.js +0 -1
- package/assets/esri/core/workers/chunks/ad92427bf597a6e0a299.js +0 -1
- package/assets/esri/core/workers/chunks/b25a131c04092c3ab75d.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/b9909264cfea68d5f2a1.js +0 -1
- package/assets/esri/core/workers/chunks/bb08359610a41e304b55.js +0 -1
- package/assets/esri/core/workers/chunks/bcf612eabe7577540953.js +0 -1
- package/assets/esri/core/workers/chunks/bfbbcaa1fb04f17fc869.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/d30cfc5fa302cc08d862.js +0 -1
- package/assets/esri/core/workers/chunks/d723619579cc8f5ef2cd.js +0 -1
- package/assets/esri/core/workers/chunks/da99fd0d3106dd357743.js +0 -1
- package/assets/esri/core/workers/chunks/de71db3b0fb947b13c97.js +0 -1
- package/assets/esri/core/workers/chunks/dfbbead4c24d13682891.js +0 -1
- package/assets/esri/core/workers/chunks/e69255e38ff200dda14b.js +0 -1
- package/assets/esri/core/workers/chunks/e705d041f6c1632bfbcc.js +0 -1
- package/assets/esri/core/workers/chunks/e85da52d9cc7d9396872.js +0 -1
- package/assets/esri/core/workers/chunks/ee186ddbb1eb5144a790.js +0 -1
- package/assets/esri/core/workers/chunks/f9370830051865a3435b.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/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +0 -5
- 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
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type Portal from "../portal/Portal.js";
|
|
2
|
-
import type CIMSymbol from "./CIMSymbol.js";
|
|
3
2
|
import type Symbol from "./Symbol.js";
|
|
4
3
|
import type { AbortOptions } from "../core/promiseUtils.js";
|
|
5
4
|
import type { SymbolProperties } from "./Symbol.js";
|
|
@@ -126,29 +125,6 @@ export default class WebStyleSymbol extends Symbol {
|
|
|
126
125
|
* let symLyr = graphic.symbol.clone();
|
|
127
126
|
*/
|
|
128
127
|
clone(): WebStyleSymbol;
|
|
129
|
-
/**
|
|
130
|
-
* Returns the [CIMSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html) instance the WebStyleSymbol refers to.
|
|
131
|
-
*
|
|
132
|
-
* @deprecated
|
|
133
|
-
* since version 4.33. Use [fetchSymbol()](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-WebStyleSymbol.html#fetchSymbol) instead. Pass `{ acceptedFormats: ["cim"] }`
|
|
134
|
-
* as options to [fetchSymbol()](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-WebStyleSymbol.html#fetchSymbol) to retrieve only CIM symbols.
|
|
135
|
-
* @param options - An object with the following properties.
|
|
136
|
-
* @returns When resolved, returns a [CIMSymbol](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-CIMSymbol.html) instance.
|
|
137
|
-
* @since 4.16
|
|
138
|
-
* @example
|
|
139
|
-
* // Given a SimpleRenderer with a WebStyleSymbol,
|
|
140
|
-
* // fetch the corresponding CIMSymbol,
|
|
141
|
-
* // then replace the renderer symbol with the returned CIMSymbol
|
|
142
|
-
* renderer.symbol.fetchCIMSymbol().then(function (cimSymbol) {
|
|
143
|
-
* renderer.symbol = cimSymbol;
|
|
144
|
-
* });
|
|
145
|
-
*
|
|
146
|
-
* // note: the above is deprecated functionality. Use the following instead:
|
|
147
|
-
* renderer.symbol.fetchSymbol({ acceptedFormats: ["cim"] }).then(function (cimSymbol) {
|
|
148
|
-
* renderer.symbol = cimSymbol;
|
|
149
|
-
* });
|
|
150
|
-
*/
|
|
151
|
-
fetchCIMSymbol(options?: WebStyleSymbolFetchSymbolOptions | null | undefined): Promise<CIMSymbol>;
|
|
152
128
|
/**
|
|
153
129
|
* Resolves and returns the symbol instance the WebStyleSymbol refers to.
|
|
154
130
|
*
|
|
@@ -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}from"tslib";import
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../core/Logger.js";import{throwIfAborted as o}from"../core/promiseUtils.js";import{property as r,subclass as l}from"../core/accessorSupport/decorators.js";import s from"../portal/Portal.js";import{w as i,r as p}from"../chunks/persistableUrlUtils.js";import a from"./Symbol.js";import{Thumbnail as n}from"./support/Thumbnail.js";import{enumeration as y}from"../core/accessorSupport/decorators/enumeration.js";var m;let c=m=class extends a{constructor(t){super(t),this.color=null,this.styleName=null,this.portal=null,this.styleUrl=null,this.thumbnail=null,this.name=null,this.type="web-style"}get _fetchCacheKey(){const t=null!=this.portal?this.portal:s.getDefault(),e=t.user?t.user.username:null;return`${this.styleName}:${this.styleUrl}:${this.name}:${e}:${t.url}`}read(t,e){this.portal=e?.portal,super.read(t,e)}clone(){return new m({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})}fetchSymbol(t){return this._fetchSymbol(t)}async _fetchSymbol(t){const r=null!=t?t.cache:null,l=r?this._fetchCacheKey:null;if(null!=r){const t=l&&r.get(l);if(t)return t.clone()}const{resolveWebStyleSymbol:s}=await import("./support/webStyleSymbolUtils.js");o(t);const i=s(this,{portal:this.portal},t);i.catch(t=>{e.getLogger(this).error("#fetchSymbol()","Failed to create symbol from style",t)});const p=await i;return null!=r&&r.set(l,p.clone()),p}};t([r({json:{write:!1}})],c.prototype,"color",void 0),t([r({type:String,json:{write:!0}})],c.prototype,"styleName",void 0),t([r({type:s,json:{write:!1}})],c.prototype,"portal",void 0),t([r({type:String,json:{read:p,write:i}})],c.prototype,"styleUrl",void 0),t([r({type:n,json:{read:!1}})],c.prototype,"thumbnail",void 0),t([r({type:String,json:{write:!0}})],c.prototype,"name",void 0),t([y({styleSymbolReference:"web-style"},{readOnly:!0})],c.prototype,"type",void 0),t([r()],c.prototype,"_fetchCacheKey",null),c=m=t([l("esri.symbols.WebStyleSymbol")],c);export{c as default};
|
|
@@ -18,7 +18,7 @@ export interface ElevationInfoProperties<Modes extends ElevationInfoMode = Eleva
|
|
|
18
18
|
* Mode | Description
|
|
19
19
|
* ------|------------
|
|
20
20
|
* on-the-ground | Elements are aligned to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html). If the scene contains an [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMesh3DTilesLayer.html), then elements are aligned to the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMesh3DTilesLayer.html). If elements have z-values, then the z-values are ignored in this mode. Elements with 2D symbols are draped on the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMesh3DTilesLayer.html). This is the default mode for layers without z-values containing [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) rendered with [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html).
|
|
21
|
-
* absolute-height | Elements are placed at an absolute elevation (z-value) above sea level. This z-value is determined by the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value. This mode doesn't take the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or any other layers into account. This is the default value of elements with any geometry type where
|
|
21
|
+
* absolute-height | Elements are placed at an absolute elevation (z-value) above sea level. This z-value is determined by the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value. This mode doesn't take the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or any other layers into account. This is the default value of elements with any geometry type where `hasZ = true`.
|
|
22
22
|
* relative-to-ground | Elements are placed at an elevation relative to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMesh3DTilesLayer.html). The element's elevation is determined by summing up the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMesh3DTilesLayer.html) and the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value. If the geometries don't have z-values, `relative-to-ground` is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [IconSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html).
|
|
23
23
|
* relative-to-scene | Elements are aligned to [extruded polygons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html), [meshes](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html), 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [BuildingSceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), depending on which one has higher elevation. If the element is not directly above a building or any other element, it is aligned to the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMesh3DTilesLayer.html). If present, the geometry's z-value is added to the elevation. If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value.
|
|
24
24
|
*/
|
|
@@ -51,7 +51,7 @@ export default class ElevationInfo<Modes extends ElevationInfoMode = ElevationIn
|
|
|
51
51
|
* Mode | Description
|
|
52
52
|
* ------|------------
|
|
53
53
|
* on-the-ground | Elements are aligned to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html). If the scene contains an [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMesh3DTilesLayer.html), then elements are aligned to the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMesh3DTilesLayer.html). If elements have z-values, then the z-values are ignored in this mode. Elements with 2D symbols are draped on the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMesh3DTilesLayer.html). This is the default mode for layers without z-values containing [Polyline](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html), [Polygon](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html) or [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) rendered with [ObjectSymbol3DLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ObjectSymbol3DLayer.html).
|
|
54
|
-
* absolute-height | Elements are placed at an absolute elevation (z-value) above sea level. This z-value is determined by the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value. This mode doesn't take the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or any other layers into account. This is the default value of elements with any geometry type where
|
|
54
|
+
* absolute-height | Elements are placed at an absolute elevation (z-value) above sea level. This z-value is determined by the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value. This mode doesn't take the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or any other layers into account. This is the default value of elements with any geometry type where `hasZ = true`.
|
|
55
55
|
* relative-to-ground | Elements are placed at an elevation relative to the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMesh3DTilesLayer.html). The element's elevation is determined by summing up the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMesh3DTilesLayer.html) and the geometry's z-value (if present). If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value. If the geometries don't have z-values, `relative-to-ground` is the default value for [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) geometries rendered with [IconSymbol3DLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html).
|
|
56
56
|
* relative-to-scene | Elements are aligned to [extruded polygons](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-ExtrudeSymbol3DLayer.html), [meshes](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-MeshSymbol3D.html), 3D Object [SceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SceneLayer.html) or [BuildingSceneLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BuildingSceneLayer.html), depending on which one has higher elevation. If the element is not directly above a building or any other element, it is aligned to the elevation of the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) or the [IntegratedMeshLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMeshLayer.html) or [IntegratedMesh3DTilesLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-IntegratedMesh3DTilesLayer.html). If present, the geometry's z-value is added to the elevation. If `featureExpressionInfo` is defined, the result of the expression is used instead of the geometry's z-value.
|
|
57
57
|
*/
|
|
@@ -12,7 +12,7 @@ export default class IconSymbol3DLayerResource extends JSONSupport {
|
|
|
12
12
|
accessor href: string | null | undefined;
|
|
13
13
|
/**
|
|
14
14
|
* Uses a built-in shape.
|
|
15
|
-
* Note that when using the `cross` or `x` primitive, the
|
|
15
|
+
* Note that when using the `cross` or `x` primitive, the [IconSymbol3DLayer.outline](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-IconSymbol3DLayer.html#outline) property has to be defined to make the symbol visible. See the table below for list of possible values.
|
|
16
16
|
*
|
|
17
17
|
* Value | Description
|
|
18
18
|
* ------|------------
|
|
@@ -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
|
|
5
|
+
import r from"../SimpleFillSymbol.js";import o from"../SimpleLineSymbol.js";import m from"../SimpleMarkerSymbol.js";import e from"../TextSymbol.js";import{defaultPointSymbolJSON as t,defaultPolylineSymbolJSON as l,defaultPolygonSymbolJSON as n,defaultTextSymbolJSON as i,errorPointSymbolJSON as s,errorPolylineSymbolJSON as f,errorPolygonSymbolJSON as S}from"./defaultsJSON.js";const p=m.fromJSON(t),u=o.fromJSON(l),c=r.fromJSON(n),a=e.fromJSON(i);function J(r){if(null==r)return null;switch(r.type){case"mesh":return null;case"point":case"multipoint":return p;case"polyline":return u;case"polygon":case"extent":return c}return null}const N=m.fromJSON(s),O=o.fromJSON(f),y=r.fromJSON(S);export{p as defaultPointSymbol2D,c as defaultPolygonSymbol2D,u as defaultPolylineSymbol2D,a as defaultTextSymbol2D,N as errorPointSymbol2D,y as errorPolygonSymbol2D,O as errorPolylineSymbol2D,J as getDefaultSymbol2D};
|
|
@@ -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 o from"../../Color.js";import e from"../../core/Collection.js";import
|
|
5
|
+
import o from"../../Color.js";import e from"../../core/Collection.js";import{px2pt as r}from"../../core/screenUtils.js";import m from"../FillSymbol3DLayer.js";import l from"../LineSymbol3D.js";import n from"../LineSymbol3DLayer.js";import s from"../MeshSymbol3D.js";import i from"../PointSymbol3D.js";import t from"../PolygonSymbol3D.js";import p from"../edges/SolidEdges3D.js";import{defaultPointSymbol2D as y,defaultPolylineSymbol2D as f,defaultPolygonSymbol2D as a}from"./defaults.js";import{defaultColor as c,defaultOutlineColor as u}from"./defaultsJSON.js";const w=i.fromSimpleMarkerSymbol(y),S=l.fromSimpleLineSymbol(f),b=t.fromSimpleFillSymbol(a),j=new s({symbolLayers:new e([new m({material:{color:c},edges:new p({size:r(1),color:new o(u)})})])}),L=new l({symbolLayers:new e([new n({material:{color:new o([0,0,0])},size:r(1)})])}),D=new t({symbolLayers:new e([new m({outline:{color:new o([0,0,0]),size:r(1)}})])});function d(o){if(null==o)return null;switch(o.type){case"mesh":return j;case"point":case"multipoint":return w;case"polyline":return S;case"polygon":case"extent":return b}return null}export{D as defaultRendererPolygonSymbol3D,L as defaultRendererPolylineSymbol3D,d as getDefaultSymbol3D};
|
|
@@ -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{getAssetUrl as e}from"../../assets.js";import{toHSV as t,toRGB as l}from"../../core/colorUtils.js";import
|
|
5
|
+
import{getAssetUrl as e}from"../../assets.js";import{toHSV as t,toRGB as l}from"../../core/colorUtils.js";import a from"../../core/Error.js";import s from"../../core/Logger.js";import{pt2px as n}from"../../core/screenUtils.js";import{defaultThematicColor as r,dekebabifyLineStyle as o,getPatternUrlWithColor as i}from"./gfxUtils.js";import{adjustColorComponentBrightness as c,shapes as p,getTetrahedronShapes as u,getDiamondShapes as h,getCylinderShapes as m,getCubeShapes as f,getInvertedConeShapes as y,getConeShapes as d,getPathSymbolShapes as b,getWaterSymbolShapes as k,getExtrudeSymbolShapes as v}from"./previewUtils.js";import{defaultObjectPrimitive as g,defaultIconPrimitive as w}from"./primitives.js";import{renderSymbol as x,tintImageWithColor as M}from"./renderUtils.js";import{isVolumetricSymbol as L,getIconHref as j}from"./utils.js";import{resolveWebStyleSymbol as z}from"./webStyleSymbolUtils.js";const S=22,P=120,U=80,C=50,D=20;function O(e){const t=e.outline,l=null!=e.material?e.material.color:null,a=null!=l?l.toHex():null;if(null==t||"pattern"in t&&null!=t.pattern&&"style"===t.pattern.type&&"none"===t.pattern.style)return"fill"===e.type&&"#ffffff"===a?{color:"#bdc3c7",width:.75}:null;const s=n(t.size)||0;return{color:"rgba("+(null!=t.color?t.color.toRgba():"255,255,255,1")+")",width:Math.min(s,U),style:"pattern"in t&&null!=t.pattern&&"style"===t.pattern.type?o(t.pattern.style):null,join:"butt",cap:"patternCap"in t?t.patternCap:"butt"}}async function E(t,l){if(t.thumbnail?.url)return t.thumbnail.url;if("icon"===l.type){const e=l?.resource?.href;if(e)return j(l)}const a=e("esri/images/Legend/legend3dsymboldefault.png");if(t.styleOrigin&&(t.styleOrigin.styleName||t.styleOrigin.styleUrl)){const e=await z(t.styleOrigin,{portal:t.styleOrigin.portal}).catch(()=>null);if(e&&"thumbnail"in e&&e.thumbnail?.url)return e.thumbnail.url}return a}function q(e,a=1){const s=e.a,n=t(e),r=n.h,o=n.s/a,i=100-(100-n.v)/a,{r:c,g:p,b:u}=l({h:r,s:o,v:i});return[c,p,u,s]}function R(e){return"water"===e.type?null==e.color?null:e.color:null==e.material?.color?null:e.material.color}function Z(e,t=0){const l=R(e);if(!l){if("fill"===e.type)return null;const l=r.r,a=c(l,t);return[a,a,a,100]}const a=l.toRgba();for(let s=0;s<3;s++)a[s]=c(a[s],t);return a}async function H(t,l){const a=t.style;if("none"===a)return null;return{type:"pattern",x:0,y:0,src:await i(e(`esri/symbols/patterns/${a}.png`),l.toCss(!0)),width:5,height:5}}function I(e){return e.outline?O(e):{color:"rgba(0, 0, 0, 1)",width:1.5}}function N(e,t){const l=R(e);if(!l)return null;let a="rgba(";return a+=c(l.r,t)+",",a+=c(l.g,t)+",",a+=c(l.b,t)+",",a+l.a+");"}function T(e,t){const l=e.edges;if(!l||!l.color||!l.size)return null;return{color:l.color.toCss(!0),width:Math.min(n(l.size),t,U),join:"round"}}function F(e,t){const l=N(e,t);if(!l)return null;if("pattern"in e&&null!=e.pattern&&"style"===e.pattern.type&&"none"===e.pattern.style)return null;const a={color:l,width:Math.min(e.size?n(e.size):.75,U)};return"pattern"in e&&"style"===e.pattern?.type&&(a.style=o(e.pattern.style)),"cap"in e&&e.cap&&(a.cap=e.cap),"join"in e&&e.join&&(a.join="miter"===e.join?n(2):e.join),a}function $(e,t,l){const a=null!=l?.75*l:0;return{type:"linear",x1:a?.25*a:0,y1:a?.5*a:0,x2:a||4,y2:a?.5*a:4,colors:[{color:e,offset:0},{color:t,offset:1}]}}function A(e){const t=e.depth,l=e.height,a=e.width;return 0!==a&&0!==t&&0!==l&&a===t&&null!=a&&null!=l&&a<l}function B(e,t,l){const a=[];if(!e)return a;switch(e.type){case"icon":{const l=0,s=0,n=t,r=t;switch(e.resource?.primitive??w){case"circle":a.push({shape:{type:"circle",cx:0,cy:0,r:.5*t},fill:Z(e,0),stroke:O(e)});break;case"square":a.push({shape:{type:"path",path:[{command:"M",values:[l,r]},{command:"L",values:[l,s]},{command:"L",values:[n,s]},{command:"L",values:[n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:O(e)});break;case"triangle":a.push({shape:{type:"path",path:[{command:"M",values:[l,r]},{command:"L",values:[.5*n,s]},{command:"L",values:[n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:O(e)});break;case"cross":a.push({shape:{type:"path",path:[{command:"M",values:[.5*n,s]},{command:"L",values:[.5*n,r]},{command:"M",values:[l,.5*r]},{command:"L",values:[n,.5*r]}]},stroke:I(e)});break;case"x":a.push({shape:{type:"path",path:[{command:"M",values:[l,s]},{command:"L",values:[n,r]},{command:"M",values:[n,s]},{command:"L",values:[l,r]}]},stroke:I(e)});break;case"kite":a.push({shape:{type:"path",path:[{command:"M",values:[l,.5*r]},{command:"L",values:[.5*n,s]},{command:"L",values:[n,.5*r]},{command:"L",values:[.5*n,r]},{command:"Z",values:[]}]},fill:Z(e,0),stroke:O(e)})}break}case"object":switch(e.resource?.primitive??g){case"cone":{const s=$(Z(e,0),Z(e,-.6),l?D:t),n=d(t,l);a.push({shape:n[0],fill:s},{shape:n[1],fill:s});break}case"inverted-cone":{const l=Z(e,0),s=$(l,Z(e,-.6),t),n=y(t);a.push({shape:n[0],fill:s},{shape:n[1],fill:l});break}case"cube":{const s=f(t,l);a.push({shape:s[0],fill:Z(e,0)},{shape:s[1],fill:Z(e,-.3)},{shape:s[2],fill:Z(e,-.5)});break}case"cylinder":{const s=$(Z(e,0),Z(e,-.6),l?D:t),n=m(t,l);a.push({shape:n[0],fill:s},{shape:n[1],fill:s},{shape:n[2],fill:Z(e,0)});break}case"diamond":{const l=h(t);a.push({shape:l[0],fill:Z(e,-.3)},{shape:l[1],fill:Z(e,0)},{shape:l[2],fill:Z(e,-.3)},{shape:l[3],fill:Z(e,-.7)});break}case"sphere":{const l=$(Z(e,0),Z(e,-.6));l.x1=0,l.y1=0,l.x2=.25*t,l.y2=.25*t,a.push({shape:{type:"circle",cx:0,cy:0,r:.5*t},fill:l});break}case"tetrahedron":{const l=u(t);a.push({shape:l[0],fill:Z(e,-.3)},{shape:l[1],fill:Z(e,0)},{shape:l[2],fill:Z(e,-.6)});break}}break}return a}function G(e){const t="number"==typeof e?.size?e?.size:null;return t?n(t):null}function J(e){return"icon"===e.type?"multiply":"tint"}async function K(e,t){const l=G(t),a=t?.maxSize?n(t.maxSize):null,r=t?.disableUpsampling??!1,o=e.symbolLayers,i=[],c=[];let p=!1,u=0,h=0,m=0;o.forEach(s=>{if("icon"!==s.type&&"object"!==s.type)return;s&&"icon"===s.type&&(m=Math.max(s.size&&n(s.size),m));const o="icon"===s.type?s.size&&n(s.size):0,f=l||o?Math.ceil(Math.min(l||o,a||P)):S;let y="icon"===s.type?s.angle:null;if(null!=t?.rotation&&(y=(y??0)+t.rotation),c.push(y),s?.resource?.href){const t=E(e,s).then(e=>{const t=s?.material?.color,l=J(s);return M(e,f,t,l,r)}).then(e=>{const t=e.width,l=e.height;return u=Math.max(u,t),h=Math.max(h,l),y&&(p=!0),[{shape:{type:"image",x:0,y:0,width:t,height:l,src:e.url},fill:null,stroke:null}]});i.push(t)}else{let e=f;"icon"===s.type&&l&&(e=f*(o/m));const a="tall"===t?.symbolConfig||t?.symbolConfig?.isTall||"object"===s.type&&A(s);u=Math.max(u,a?D:e),h=Math.max(h,e),y&&s.resource?.primitive&&["square","triangle","x"].includes(s.resource?.primitive)&&(p=!0),i.push(Promise.resolve(B(s,e,a)))}});const f=await Promise.allSettled(i),y=[];return f.forEach(e=>{"fulfilled"===e.status?y.push(e.value):e.reason&&s.getLogger("esri.symbols.support.previewSymbol3D").warn("error while building swatchInfo!",e.reason)}),x(y,[u,h],{node:t?.node,scale:!1,opacity:t?.opacity,ariaLabel:t?.ariaLabel,rotations:c,useRotationSize:p})}function Q(e,t){const l=e.symbolLayers,a=[],s=L(e),r=G(t),o=(t?.maxSize?n(t.maxSize):null)||U;let i,c=0,u=0;return l.forEach((e,t)=>{if(!e)return;if("line"!==e.type&&"path"!==e.type)return;const l=[];switch(e.type){case"line":{const a=F(e,0);if(null==a)break;const s=a?.width||0;0===t&&(i=s);const n=Math.min(r||s,o),p=0===t?n:r?n*(s/i):n,h=p>C/2?2*p:C;u=Math.max(u,p),c=Math.max(c,h),a.width=p,l.push({shape:{type:"path",path:[{command:"M",values:[0,.5*u]},{command:"L",values:[c,.5*u]}]},stroke:a});break}case"path":{const t=Math.min(r||S,o),a=Z(e,0),s=Z(e,-.2),n=N(e,-.4),i=n?{color:n,width:1}:{};if("quad"===e.profile){const t=e.width,n=e.height,r=b(t&&n?t/n:1,0===n,0===t),o={...i,join:"bevel"};l.push({shape:r[0],fill:s,stroke:o},{shape:r[1],fill:s,stroke:o},{shape:r[2],fill:a,stroke:o})}else l.push({shape:p.pathSymbol3DLayer[0],fill:s,stroke:i},{shape:p.pathSymbol3DLayer[1],fill:a,stroke:i});u=Math.max(u,t),c=u}}a.push(l)}),Promise.resolve(x(a,[c,u],{node:t?.node,scale:s,opacity:t?.opacity,ariaLabel:t?.ariaLabel}))}async function V(e,t){const l="mesh-3d"===e.type,a=e.symbolLayers,s=G(t),r=t?.maxSize?n(t.maxSize):null,o=s||S,i=[];let c=0,u=0,h=!1;for(let n=0;n<a.length;n++){const e=a.at(n),t=[];if(!l||"fill"===e.type){switch(e.type){case"fill":{const a=Math.min(o,r||P);if(c=Math.max(c,a),u=Math.max(u,a),h=!0,l){const l=p.meshSymbol3DFill,s=N(e,-.4),n=T(e,.05*a)??(s?{join:"round",color:s,width:1}:null);t.push({shape:l[0],fill:Z(e,0),stroke:n},{shape:l[1],fill:Z(e,-.2),stroke:n},{shape:l[2],fill:Z(e,-.6),stroke:n})}else{let l=Z(e,0);const a="pattern"in e?e.pattern:null,s=O(e),n=R(e);null!=a&&"style"===a.type&&"solid"!==a.style&&n&&(l=await H(a,n)),t.push({shape:p.fill[0],fill:l,stroke:s})}break}case"line":{const l=F(e,0);if(null==l)break;const a={stroke:l,shape:p.fill[0]};c=Math.max(c,S),u=Math.max(u,S),t.push(a);break}case"extrude":{const l=Z(e,0),a=Z(e,-.2),s=Math.min(o,r||P),n=v(s),i=S,p=.7*S+.5*s,h=T(e,.1*Math.min(i,p))??{join:"round",...F(e,-.4),width:1};t.push({shape:n[0],fill:a,stroke:h},{shape:n[1],fill:a,stroke:h},{shape:n[2],fill:l,stroke:h}),c=Math.max(c,i),u=Math.max(u,p);break}case"water":{const l=R(e),a=q(l),s=q(l,2),n=q(l,3),i=k();h=!0,t.push({shape:i[0],fill:a},{shape:i[1],fill:s},{shape:i[2],fill:n});const p=Math.min(o,r||P);c=Math.max(c,p),u=Math.max(u,p);break}}i.push(t)}}return x(i,[c,u],{node:t?.node,scale:h,opacity:t?.opacity,ariaLabel:t?.ariaLabel})}function W(e,t){if(0===e.symbolLayers.length)return Promise.reject(new a("symbolPreview: renderPreviewHTML3D","No symbolLayers in the symbol."));switch(e.type){case"point-3d":return K(e,t);case"line-3d":return Q(e,t);case"polygon-3d":case"mesh-3d":return V(e,t)}return Promise.reject(new a("symbolPreview: swatchInfo3D","symbol not supported."))}export{H as getPatternDescriptor,G as getSizeFromOptions,Z as getSymbolLayerFill,W as previewSymbol3D};
|
|
@@ -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
|
|
5
|
+
import{fromValues as e}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as r}from"../../geometry/support/aaBoundingBox.js";function t(r,{isPrimitive:t,width:n,depth:o,height:s}){const c=t?10:1;if(null==n&&null==s&&null==o)return[c*r[0],c*r[1],c*r[2]];const u=e(n,o,s);let i;for(let e=0;e<3;e++){const t=u[e];if(null!=t){i=t/r[e];break}}for(let e=0;e<3;e++)null==u[e]&&(u[e]=r[e]*i);return u}const n=r(-.5,-.5,-.5,.5,.5,.5),o=r(-.5,-.5,0,.5,.5,1),s=r(-.5,-.5,0,.5,.5,.5);function c(e){switch(e){case"sphere":case"cube":case"diamond":return n;case"cylinder":case"cone":case"inverted-cone":return o;case"tetrahedron":return s;default:return}}const u=["butt","square","round"],i=[...u,"none"],l=["miter","bevel","round"];export{u as lineCaps,l as lineJoins,s as objectSymbolLayerBoundingBoxTetrahedron,n as objectSymbolLayerBoundingBoxUnitCube,o as objectSymbolLayerBoundingBoxUnitCylinder,c as objectSymbolLayerPrimitiveBoundingBox,t as objectSymbolLayerSizeWithResourceSize,i as pathCaps};
|
|
@@ -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
|
|
5
|
+
import{pt2px as e,toPt as t,px2pt as l}from"../../core/screenUtils.js";import{isSubtypeGroupLayer as a}from"../../layers/support/layerUtils.js";import{loadArcade as i}from"../../support/loadArcade.js";import{getStroke as r}from"./gfxUtils.js";import{renderSymbol as s,renderOnce as o}from"./renderUtils.js";import{isSymbol3D as n}from"./typeUtils.js";import{applyColorToSymbol as c,applySizesToSymbol as u,applyRotationToSymbol as p,getColorFromSymbol as f,applyOpacityToColor as y}from"./utils.js";import{renderRelationshipRamp as d}from"../../widgets/Legend/styles/support/relationshipUtils.js";import{getRelationshipRampElement as h}from"../../widgets/Legend/support/relationshipRampUtils.js";let m=null;const b=[255,255,255];function g(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function w(e,t,l){const{backgroundColor:a,outline:i,dotSize:r}=e,s=l?.swatchSize||22,o=.8,n=Math.round(s*s/Math.max(r,.5)**2*o),c=window.devicePixelRatio,u=document.createElement("canvas"),p=s*c;u.width=p,u.height=p,u.style.width=u.width/c+"px",u.style.height=u.height/c+"px";const f=u.getContext("2d");if(a&&(f.fillStyle=a.toCss(!0),f.fillRect(0,0,p,p),f.fill()),f.fillStyle=t?.toCss(!0)??"",m&&m.length/2===n)for(let d=0;d<2*n;d+=2){const e=m[d],t=m[d+1];f.fillRect(e,t,r*c,r*c),f.fill()}else{m=[];for(let e=0;e<2*n;e+=2){const e=g(0,p),t=g(0,p);m.push(e,t),f.fillRect(e,t,r*c,r*c),f.fill()}}i&&(i.color&&(f.strokeStyle=i.color.toCss(!0)),f.lineWidth=i.width,f.strokeRect(0,0,p,p));const y=new Image(s,s);return y.src=u.toDataURL(),y.ariaLabel=l?.ariaLabel??null,y.alt=l?.ariaLabel??"",y}function S(e,t={}){const l=t.radius||40,a=2*Math.PI*l,i=e.length,o=a/i,n=[],c=r(t.outline);null!=c?.width&&(c.width*=2),(c||t.backgroundColor)&&n.push({shape:{type:"circle",cx:l,cy:l,r:l},fill:t.backgroundColor,stroke:c,offset:[0,0]});const u=t.values,p=u?.length===i&&100===u.reduce((e,t)=>e+t,0),f=[0];for(let r=0;r<i;r++){let t=null;p&&(t=u[r]*a/100,f.push(t+f[r])),n.push({shape:{type:"circle",cx:l,cy:l,r:l/2},fill:[0,0,0,0],stroke:{width:l,dashArray:`${(t??o)/2} ${a}`,dashoffset:"-"+(p?f[r]/2:r*(o/2)),color:e[r]},offset:[0,0]})}let y=null;const d=2*l+(c?.width||0),h=t.holePercentage;if(h){c&&n.push({shape:{type:"circle",cx:l,cy:l,r:l*h},fill:null,stroke:c,offset:[0,0]});const e=d/2;y=[[{shape:{type:"circle",cx:e,cy:e,r:e},fill:b,stroke:c?{...c,color:b}:null,offset:[0,0]},{shape:{type:"circle",cx:e,cy:e,r:l*h},fill:[0,0,0],stroke:null,offset:[0,0]}]]}return s([n],[d,d],{cssEffectFilter:t.cssEffectFilter,ignoreStrokeWidth:!0,masking:y,rotations:[-90],ariaLabel:t.ariaLabel})}function v(e,t={}){const l=e?.authoringInfo;if(!("relationship"===l?.type)||!l?.numClasses||!e.uniqueValueInfos)return null;const{focus:a,numClasses:i}=l,r=h({focus:a,numClasses:i,infos:e.uniqueValueInfos}),s=t?.node||document.createElement("div");return o(s,()=>d(r,t.id||"relationship",{opacity:t.opacity||1,cssEffectFilter:t.cssEffectFilter,ariaLabel:t.ariaLabel})),s}function V(e,t={}){const l=24,a=75,i="horizontal"===t.align,r=i?a:l,s=i?l:a,o=t.width??r,n=t.height??s,c=t.gradient??!0,u=window.devicePixelRatio,p=o*u,f=n*u,y=document.createElement("canvas");y.width=p,y.height=f,y.ariaLabel=t.ariaLabel??null,y.style.width=`${o}px`,y.style.height=`${n}px`;const d=y.getContext("2d"),h=i?p:0,m=i?0:f;if(c){const t=d.createLinearGradient(0,0,h,m),l=e.length,a=1===l?0:1/(l-1);e.forEach((e,l)=>t.addColorStop(l*a,e.toString())),d.fillStyle=t,d.fillRect(0,0,p,f)}else{const t=i?p/e.length:p,l=i?f:f/e.length;let a=0,r=0;for(const s of e)d.fillStyle=s.toString(),d.fillRect(a,r,t,l),a=i?a+t:0,r=i?0:r+l}const b=document.createElement("div");return b.style.width=`${o}px`,b.style.height=`${n}px`,x(b,t?.cssEffectFilter),b.appendChild(y),b}function k(e){const t=e.match(/drop-shadow\(\s*([^\s]+)\s+[^\s]+\s+[^\s]+\s+.+?\)/);return t?t[1]:null}function x(l,a){if(!a)return;l.style.filter=a;const i=k(a);if(i){const a=e(t(i));a<0?l.style.marginLeft=`${Math.abs(a)}px`:l.style.marginRight=`${a}px`}}async function L(e,t){switch(e.type){case"web-style":{const{previewWebStyleSymbol:l}=await import("./previewWebStyleSymbol.js");return l(e,L,t)}case"label-3d":case"line-3d":case"mesh-3d":case"point-3d":case"polygon-3d":{const{previewSymbol3D:l}=await import("./previewSymbol3D.js");return l(e,t)}case"simple-marker":case"simple-line":case"simple-fill":case"picture-marker":case"picture-fill":case"text":{const{previewSymbol2D:l}=await import("./previewSymbol2D.js");return l(e,t)}case"cim":{const{previewCIMSymbol:l}=await import("./previewCIMSymbol.js");return l(e,t)}default:return}}function R(e){return e&&void 0!==e.opacity?e.opacity*("parent"in e?R(e.parent):1):1}async function F(e,t){if(!e)return;const l=e.sourceLayer,a=(null!=t&&t.useSourceLayer?l:e.layer)??l,r=t?.ignoreOpacity?1:R(a);if(null!=e.symbol&&(null==t||!0!==t.ignoreGraphicSymbol)){const l="web-style"===e.symbol.type?await e.symbol.fetchSymbol({...t,acceptedFormats:t?.webStyleAcceptedFormats,cache:t?.webStyleCache}):e.symbol.clone();return c(l,null,{add:r}),l}const s=t?.renderer??I(a);let o=s&&"getSymbolAsync"in s?await s.getSymbolAsync(e,t):null;if(!o)return;if(o="web-style"===o.type?await o.fetchSymbol({...t,acceptedFormats:t?.webStyleAcceptedFormats,cache:t?.webStyleCache}):o.clone(),!(s&&"visualVariables"in s&&s.visualVariables?.length&&j(o)))return c(o,null,{add:r}),o;if("arcadeRequiredForVisualVariables"in s&&s.arcadeRequiredForVisualVariables&&null==t?.arcade){const e={...t};e.arcade=await i(),t=e}const{getColor:n,getOpacity:f,getAllSizes:y,getRotationAngle:d}=await import("../../renderers/visualVariables/support/visualVariableUtils.js"),h=[],m=[],b=[],g=[];for(const i of s.visualVariables)switch(i.type){case"color":h.push(i);break;case"opacity":m.push(i);break;case"rotation":g.push(i);break;case"size":i.target||b.push(i)}const w=!!h.length&&h[h.length-1],S=w?n(w,e,t):null,v=!!t?.ignoreOpacity,V=!!m.length&&m[m.length-1],k=V?f(V,e,t):null;if(c(o,S,v?void 0:{override:k,add:r}),b.length&&!0!==t?.ignoreSizeVariables){const l=y(b,e,t);await u(o,l)}if(!0!==t?.ignoreRotationVariables)for(const i of g)p(o,d(i,e,t),i.axis);return o}async function C(e,t){if(!e)return;const{layer:l,sourceLayer:a}=e,r=R(l??a);if(null!=e.symbol&&(null==t||!0!==t.ignoreGraphicSymbol)){const l="web-style"===e.symbol.type?await e.symbol.fetchSymbol({...t,acceptedFormats:t?.webStyleAcceptedFormats}):e.symbol.clone();return f(l,r)}const s=t?.renderer??I(l)??I(a);let o=s&&"getSymbolAsync"in s?await s.getSymbolAsync(e,t):void 0;if(!o)return;o="web-style"===o.type?await o.fetchSymbol({...t,acceptedFormats:t?.webStyleAcceptedFormats}):o.clone();const n=f(o,void 0);if(!s||!("visualVariables"in s)||"visualVariables"in s&&!s.visualVariables||"visualVariables"in s&&!s.visualVariables?.length||!j(o))return n?y(n,r):void 0;if("arcadeRequiredForVisualVariables"in s&&s.arcadeRequiredForVisualVariables&&null==t?.arcade){const e={...t};e.arcade=await i(),t=e}const{getColor:c,getOpacity:u}=await import("../../renderers/visualVariables/support/visualVariableUtils.js"),p=[],d=[];if(s.visualVariables)for(const i of s.visualVariables)switch(i.type){case"color":p.push(i);break;case"opacity":d.push(i)}const h=p.length>0?p[p.length-1]:null,m=(h?c(h,e,t):void 0)??n,b=d.length>0?d[d.length-1]:null,g=b?u(b,e,t):null;return null!=m&&null!=g&&(m.a=g),m?y(m,r):null}function j(e){return!n(e)||"water"!==e.symbolLayers.at(0)?.type}function I(e){if(e)return"renderer"in e?e.renderer:void 0}async function U(e,t,l){if(!e)return;const{layer:a,sourceLayer:i}=e,r=l?.renderer??I(a)??I(i);if(!r)return null;if("visualVariables"in r&&r.visualVariables?.length){const{getRampStops:i}=await import("../../widgets/Legend/support/colorRampUtils.js"),{getRampStops:s}=await import("../../widgets/Legend/support/sizeRampUtils.js"),{getFormatOptionsForVisualVariable:o}=await import("../../widgets/Legend/support/utils.js");let n=null;for(const c of r.visualVariables){const u=t?o(a,c,t.timeZone):null;let p=null;switch(c.type){case"color":p=await i(c,null,u);break;case"opacity":p=await i(c);break;case"size":c.target||(p=await s(r,c,null,l?.scale||t?.scale,t,u))}if(p?.length){const t=p.find((t,l)=>{const a=e.attributes[c.field];return 0===l?a>=t.value:l===p?.length-1?a<=t.value:t.value===a});if(t){n=t.label;break}}}if(n)return n}switch(r.type){case"class-breaks":{const t="getClassBreakInfo"in r?await r.getClassBreakInfo(e,l):null;return t?.label??(t&&r.classBreakInfos?.length>1)?`${t.minValue} - ${t.maxValue}`:null}case"unique-value":{const t="getUniqueValueInfo"in r?await r.getUniqueValueInfo(e,l):null;return t?.label}}return null}async function z(e,t){e?.layer&&a(e.layer)&&((e=e.cloneShallow()).layer=e.layer.findSublayerForFeature(e)??null);const i=null===e?t?.fallbackSymbol??null:await F(e,{ignoreGraphicSymbol:!!e.layer,ignoreOpacity:t?.ignoreOpacity??!0,ignoreRotationVariables:t?.ignoreRotationVariables??!0,ignoreSizeVariables:t?.ignoreSizeVariables??!0})??t?.fallbackSymbol??null;if(!i)return null;const r=await L(i,{geometry:t.useGeometryForShape?e?.geometry??null:null,useMarkerSymbolSize:!1!==t.useMarkerSymbolSize,size:{width:l(t.widthInPixels??16),height:l(t.heightInPixels??16)},..."cim"===i?.type?{cimOptions:{feature:{attributes:e?.attributes??{}}}}:{}});if(!r)return null;return"element"===(t?.format??"element")?r:r.outerHTML}export{C as getDisplayedColor,F as getDisplayedSymbol,U as getLegendLabel,z as previewGraphic,V as renderColorRampPreviewHTML,w as renderDotDensityPreviewHTML,S as renderPieChartPreviewHTML,L as renderPreviewHTML,v as renderRelationshipRampPreviewHTML};
|
package/symbols/support/utils.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../Color.js";import{forEach as t}from"../../core/asyncUtils.js";import
|
|
5
|
+
import e from"../../Color.js";import{forEach as t}from"../../core/asyncUtils.js";import{px2pt as r}from"../../core/screenUtils.js";import{ONES as o}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{effectFunctionsFromJSON as n}from"../../layers/effects/jsonUtils.js";import{applyCIMSymbolRotation as l,getCIMSymbolColor as i}from"./cimSymbolUtils.js";import{getStroke as c}from"./gfxUtils.js";import s from"./Symbol3DMaterial.js";import{isSymbol3D as u,isSymbol2D as a}from"./typeUtils.js";function f(e){const t=e.symbolLayers?.at(-1);if(t&&"outline"in t)return t?.outline?.size}function m(e){if(!e)return 0;if(u(e)){const t=f(e);return null!=t?t:0}return r(c(e)?.width)}function y(e){const t=e.symbolLayers?.at(-1);if(t&&"outline"in t)return t?.outline?.color}function p(t){if(!t)return null;if(u(t))return y(t);const r=c(t)?.color;return r?new e(r):null}function h(e){if(null==e||!("symbolLayers"in e)||null==e.symbolLayers)return!1;switch(e.type){case"point-3d":return e.symbolLayers.some(e=>"object"===e.type);case"line-3d":return e.symbolLayers.some(e=>"path"===e.type);case"polygon-3d":return e.symbolLayers.some(e=>"object"===e.type||"extrude"===e.type);default:return!1}}function d(e){return e.resource?.href??""}function b(t,r){if(!t)return null;let o=null;return u(t)?o=w(t):a(t)&&(o="cim"===t.type?i(t):t.color?new e(t.color):null),o?k(o,r):null}function w(t){const r=t.symbolLayers;if(!r)return null;let o=null;return r.forEach(e=>{"object"===e.type&&e.resource?.href||(o="water"===e.type?e.color:e.material?e.material.color:null)}),o?new e(o):null}function k(t,r){if(null==r||null==t)return t;const o=t.toRgba();return o[3]=o[3]*r,new e(o)}function g(t,r,o){const n=t.symbolLayers;if(!n)return;const l=(t,n=!1)=>{let l=r??t??null;return null!=o?.override&&(!l&&n&&(l=new e([255,255,255])),l&&(l.a=o.override)),k(l,o?.add)};n.forEach(e=>{if("water"===e.type)return void(e.color=k(e.color,o?.add));const t=null!=e.material?e.material.color:null,r=l(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new s({color:r}):e.material.color=r,"outline"in e&&e.outline?.color&&null!=o?.add&&(e.outline.color=k(e.outline.color,o.add)),"marker"in e&&null!=e.marker&&(e.marker.color=l(e.marker.color))})}function j(e,t,r){t=t??e.color,null!=r?.override&&t&&(t.a=r.override),t&&(e.color=k(t,r?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=k(e.outline.color,r?.add))}function L(t,r,o){t&&(r||null!=o)&&(r&&(r=new e(r)),u(t)?g(t,r,o):a(t)&&j(t,r,o))}async function v(e,r){const o=e.symbolLayers;o&&await t(o,async e=>z(e,r))}async function z(e,t){switch(e.type){case"extrude":U(e,t);break;case"icon":case"line":case"text":x(e,t);break;case"path":O(e,t);break;case"object":await E(e,t)}}function x(e,t){const r=S(t);null!=r&&(e.size=r)}function S(e){for(const t of e)if("number"==typeof t)return t;return null}function U(e,t){const r=t[2];"number"==typeof r&&(e.size=r)}async function E(e,t){const{resourceSize:r,symbolSize:o}=await C(e),n=R(t,r,o);null!=n&&(e.width=D(t[0],o[0],r[0],n),e.depth=D(t[1],o[1],r[1],n),e.height=D(t[2],o[2],r[2],n))}function O(e,t){const r=R(t,o,[e.width,void 0,e.height]);null!=r&&(e.width=D(t[0],e.width,1,r),e.height=D(t[2],e.height,1,r))}function R(e,t,r){for(let o=0;o<3;o++){const n=e[o];switch(n){case"symbol-value":{const e=r[o];return null!=e?e/t[o]:1}case"proportional":break;default:if(n&&t[o])return n/t[o]}}return null}async function C(e){const{computeObjectLayerResourceSize:t}=await import("./symbolLayerUtils.js"),r=await t(e,10),{width:o,height:n,depth:l}=e,i=[o,l,n];let c=1;for(let s=0;s<3;s++){const e=i[s];if(null!=e){c=e/r[s];break}}for(let s=0;s<3;s++)null==i[s]&&(i[s]=r[s]*c);return{resourceSize:r,symbolSize:i}}function D(e,t,r,o){switch(e){case"proportional":return r*o;case"symbol-value":return null!=t?t:r;default:return e}}function J(e,t){const r=S(t);if(null!=r)switch(e.type){case"simple-marker":e.size=r;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=r,e.height=r*t):(e.width=r*t,e.height=r);break}case"simple-line":e.width=r;break;case"text":e.font.size=r}}async function M(e,t){if(e&&t)return u(e)?v(e,t):void(a(e)&&J(e,t))}function N(e,t,r){if(e&&null!=t)if(u(e)){const o=e.symbolLayers;o&&o.forEach(e=>{if("object"===e.type)switch(r){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)})}else if(a(e))switch(e.type){case"simple-marker":case"picture-marker":case"text":e.angle+=t;break;case"cim":l(e,t,!0)}}function q(e,t){if(!e)return null;const r=(t?e.effects:e.effects.filter(e=>"bloom"!==e.type)).map(e=>e.toJSON());return n(r)}function A(e){return null!=e&&"polygon-3d"===e.type&&e.symbolLayers.some(e=>"extrude"===e.type)}export{L as applyColorToSymbol,k as applyOpacityToColor,N as applyRotationToSymbol,M as applySizesToSymbol,q as getCSSFilterFromEffectList,b as getColorFromSymbol,d as getIconHref,p as getSymbolOutlineColor,m as getSymbolOutlineSize,h as isVolumetricSymbol,A as symbolHasExtrudeSymbolLayer};
|
|
@@ -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
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../../../Graphic.js";import i from"../../../../core/Accessor.js";import{getContrast as o}from"../../../../core/colorUtils.js";import{watch as s,syncAndInitial as r}from"../../../../core/reactiveUtils.js";import{throttle as a}from"../../../../core/throttle.js";import{property as l,subclass as n}from"../../../../core/accessorSupport/decorators.js";import p from"../../../../symbols/CIMSymbol.js";import{getConfig as c}from"../../../analysis/ElevationProfile/constants.js";import{ElevationProfileIndicatorPointVisualization as h}from"../../../analysis/ElevationProfile/ElevationProfileIndicatorPointVisualization.js";import{createLineGeometry as y}from"../../../analysis/ElevationProfile/elevationProfileVisualizationUtils.js";let d=class extends i{constructor(t){super(t),this._graphic=new e,this._updateGeometryThrottled=a(t=>{t&&(this._graphic.geometry=y(t.samples,t.spatialReference))},c().profileLinesUpdateThrottleMillis)}initialize(){this.addGraphic(this._graphic),this._indicatorVisualization=new h({analysisViewData:this.analysisViewData,line:this.line,view:this.view}),this.addHandles([s(()=>this._effectiveLineVisible,t=>{this._graphic.visible=t},r),s(()=>this._effectiveIndicatorVisible,t=>{this._indicatorVisualization.visible=t},r),s(()=>this._colorUpdateParameters,t=>this._updateColor(t),r),s(()=>this.analysisViewData.analysis.geometry,()=>{this._graphic.geometry=null},r),s(()=>this._geometryUpdateParameters,t=>this._updateGeometryThrottled(t),r),this._updateGeometryThrottled])}destroy(){this._graphic.destroy()}get updating(){return this._updateGeometryThrottled.hasPendingUpdates()}get _result(){return this.analysisViewData.results.find(t=>t.computation.profile===this.line)}get _effectiveLineVisible(){return this.getEffectiveVisible("lineVisible")}get _effectiveIndicatorVisible(){const t=this.getEffectiveVisible("indicatorPointVisible");return this._effectiveLineVisible?t&&!!this._graphic.geometry:t}getEffectiveVisible(t){const{analysisViewData:e,_result:i}=this;return e.visible&&!!i?.available&&i.computation.profile.viewOptions[t]}get _geometryUpdateParameters(){const t={samples:this._result?.samples,spatialReference:this.view.spatialReference};return t.samples&&this._effectiveLineVisible&&1!==this.analysisViewData.progress?null:t}get _colorUpdateParameters(){const t=this._result?.computation.profile.color;return t?{color:t.toArray(),contrastColor:o(t).toArray()}:null}_updateColor(t){t&&(this._graphic.symbol=new p({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",capStyle:"Butt",color:t.color,effects:[{type:"CIMGeometricEffectDashes",dashTemplate:[5,4],lineDashEnding:"FullGap",controlPointEnding:"NoConstraint"}],joinStyle:"Round",width:1.5},{type:"CIMSolidStroke",capStyle:"Butt",color:t.contrastColor,joinStyle:"Round",width:1.5}]}}}))}};t([l({constructOnly:!0})],d.prototype,"addGraphic",void 0),t([l({constructOnly:!0})],d.prototype,"analysisViewData",void 0),t([l({constructOnly:!0})],d.prototype,"line",void 0),t([l({constructOnly:!0})],d.prototype,"view",void 0),t([l()],d.prototype,"updating",null),t([l()],d.prototype,"_result",null),t([l()],d.prototype,"_effectiveLineVisible",null),t([l()],d.prototype,"_effectiveIndicatorVisible",null),t([l()],d.prototype,"_geometryUpdateParameters",null),t([l()],d.prototype,"_colorUpdateParameters",null),d=t([n("esri.views.2d.analysis.ElevationProfile.ElevationProfileLineVisualization2D")],d);export{d as ElevationProfileLineVisualization2D};
|
|
@@ -51,22 +51,27 @@ export default abstract class ElevationProfileAnalysisView2D extends AnalysisVie
|
|
|
51
51
|
*/
|
|
52
52
|
get error(): ElevationProfileError | null | undefined;
|
|
53
53
|
/**
|
|
54
|
-
* Points in the view that are computed from the [
|
|
54
|
+
* Points in the view that are computed from the [indicatorRelativePosition](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-ElevationProfileAnalysisView2D.html#indicatorRelativePosition)
|
|
55
|
+
* property (in the view's spatial reference).
|
|
55
56
|
* There is one point for each [profile line](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html#profiles).
|
|
56
|
-
* When a [result](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-ElevationProfileResult.html) of a profile line
|
|
57
|
-
*
|
|
58
|
-
*
|
|
57
|
+
* When a [result](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-ElevationProfileResult.html) of a profile line is not available or
|
|
58
|
+
* no [sample](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-ElevationProfileResult.html#samples) exists for the specified indicator
|
|
59
|
+
* position, the point is `undefined`.
|
|
59
60
|
*
|
|
60
|
-
* Whenever the [
|
|
61
|
-
* can be hidden using
|
|
62
|
-
*
|
|
61
|
+
* Whenever the [indicatorRelativePosition](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-ElevationProfileAnalysisView2D.html#indicatorRelativePosition) property has a
|
|
62
|
+
* value, the points are calculated and, by default, rendered in the view. The points in the view can be hidden using
|
|
63
|
+
* the [viewOptions.indicatorPointVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfile-ElevationProfileLine.html#viewOptions) setting on
|
|
64
|
+
* any of the [profile lines](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html#profiles).
|
|
63
65
|
*/
|
|
64
|
-
get
|
|
66
|
+
get indicatorPoints(): Array<Point | null | undefined>;
|
|
65
67
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
+
* Relative position along a [result](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-ElevationProfileResult.html)'s profile line, in
|
|
69
|
+
* [0, 1]. Set this (e.g., when hovering a chart) to compute locations along each configured profile line and expose
|
|
70
|
+
* them via [indicatorPoints](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-ElevationProfileAnalysisView2D.html#indicatorPoints). The view shows points at these
|
|
71
|
+
* locations unless a line's [viewOptions.indicatorPointVisible](https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfile-ElevationProfileLine.html#viewOptions)
|
|
72
|
+
* disables them.
|
|
68
73
|
*/
|
|
69
|
-
accessor
|
|
74
|
+
accessor indicatorRelativePosition: number | null | undefined;
|
|
70
75
|
/**
|
|
71
76
|
* Enables interactivity for the [analysis](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-ElevationProfileAnalysisView2D.html#analysis). When set to `true` the input geometry can be edited
|
|
72
77
|
* interactively.
|
|
@@ -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}from"tslib";import e from"../../../core/Error.js";import{property as
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{property as i,subclass as o}from"../../../core/accessorSupport/decorators.js";import r from"./AnalysisView2D.js";import{ElevationProfileVisualization2D as s}from"./ElevationProfile/ElevationProfileVisualization2D.js";import{ElevationProfileController as l}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as n}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as a}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as p}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as c}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let u=class extends r{constructor(t){super(t),this.type="elevation-profile-view-2d",this.analysis=null,this.indicatorRelativePosition=null}initialize(){const{analysis:t,view:i}=this;this._controller=new l({analysis:t,analysisViewData:this,view:i,computationFactory:{create:t=>{switch(t.profile.type){case"ground":return new n(t);case"input":return new a(t);case"query":return new p(t);case"scene":throw new e("elevation-profile-analysis-view-2d:unsupported","The scene profile line type is not supported in 2D views.")}}}}),this._visualization=new s({view:i,analysisViewData:this}),this._sketchTool=new c({view:i,analysisViewData:this})}destroy(){this._controller?.destroy(),this._visualization?.destroy(),this._sketchTool?.destroy()}get effectiveDisplayUnits(){return this._controller?.effectiveDisplayUnits??{distance:"meters",elevation:"meters"}}get error(){return this._controller?.error}get indicatorPoints(){return this._controller?.indicatorPoints??[]}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller?.progress??0}get results(){return this._controller?.results??[]}get statistics(){return this._controller?.statistics}get updating(){return!0===this._controller?.updating||!0===this._visualization?.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickFeature(t){return this._sketchTool.pickFeature(t)}};t([i({readOnly:!0})],u.prototype,"type",void 0),t([i({constructOnly:!0,nonNullable:!0})],u.prototype,"analysis",void 0),t([i({readOnly:!0})],u.prototype,"effectiveDisplayUnits",null),t([i({readOnly:!0})],u.prototype,"error",null),t([i()],u.prototype,"indicatorRelativePosition",void 0),t([i()],u.prototype,"indicatorPoints",null),t([i({readOnly:!0})],u.prototype,"progress",null),t([i({readOnly:!0})],u.prototype,"results",null),t([i({readOnly:!0})],u.prototype,"statistics",null),t([i({readOnly:!0})],u.prototype,"updating",null),t([i()],u.prototype,"sketchGraphic",null),t([i()],u.prototype,"toolState",null),t([i()],u.prototype,"_controller",void 0),t([i()],u.prototype,"_visualization",void 0),t([i()],u.prototype,"_sketchTool",void 0),u=t([o("esri.views.2d.analysis.ElevationProfileAnalysisView2D")],u);const y=u;export{y as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
5
|
+
import{identity as t,translate as e,rotate as a,scaleByVec2 as s,multiply as i}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{createVFMesh as l,createVFMeshScalar as n}from"../../../../layers/raster/functions/vectorFieldUtils.js";import{DisplayObject as c}from"../DisplayObject.js";import{createProgramDescriptor as h}from"../webgl/Utils.js";import{BufferObject as m}from"../../../webgl/BufferObject.js";import{DataType as u}from"../../../webgl/enums.js";import{VertexArrayObject as d}from"../../../webgl/VertexArrayObject.js";import{VertexBuffer as f}from"../../../webgl/VertexBuffer.js";class v extends c{constructor(t=null){super(),this._source=null,this._symbolizerParameters=null,this._vaoInvalidated=!0,this.coordScale=[1,1],this.height=null,this.key=null,this.offset=null,this.stencilRef=0,this.resolution=null,this.pixelRatio=1,this.x=0,this.y=0,this.rotation=0,this.rawPixelData=null,this.vaoData=null,this.width=null,this.source=t}destroy(){super.destroy(),null!=this.vaoData&&(this.vaoData.magdir?.vao.dispose(),this.vaoData.scalar?.vao.dispose(),this.vaoData=null)}get symbolizerParameters(){return this._symbolizerParameters}set symbolizerParameters(t){JSON.stringify(this._symbolizerParameters)!==JSON.stringify(t)&&(this._symbolizerParameters=t,this.invalidateVAO())}get source(){return this._source}set source(t){this._source=t,this.invalidateVAO()}invalidateVAO(){this._vaoInvalidated||null==this.vaoData||(this.vaoData.magdir?.vao.dispose(),this.vaoData.scalar?.vao.dispose(),this.vaoData=null,this._vaoInvalidated=!0,this.requestRender())}updateVectorFieldVAO(t){if(this._vaoInvalidated){if(this._vaoInvalidated=!1,null!=this.source&&null==this.vaoData){const{style:e}=this.symbolizerParameters;switch(e){case"beaufort_ft":case"beaufort_km":case"beaufort_kn":case"beaufort_m":case"beaufort_mi":case"classified_arrow":case"ocean_current_kn":case"ocean_current_m":case"single_arrow":{const e=l(this.source,this.symbolizerParameters),a=this._createVectorFieldVAO(t.context,e);this.vaoData={magdir:a}}break;case"simple_scalar":{const e=n(this.source,this.symbolizerParameters),a=this._createVectorFieldVAO(t.context,e);this.vaoData={scalar:a}}break;case"wind_speed":{const e=l(this.source,this.symbolizerParameters),a=this._createVectorFieldVAO(t.context,e),s=n(this.source,this.symbolizerParameters),i=this._createVectorFieldVAO(t.context,s);this.vaoData={magdir:a,scalar:i}}}}this.ready(),this.requestRender()}}_createTransforms(){return{displayViewScreenMat3:r()}}setTransform(r){const l=t(this.transforms.displayViewScreenMat3),[n,c]=r.toScreenNoRotation([0,0],[this.x,this.y]),h=this.resolution/this.pixelRatio/r.resolution,m=h*this.width,u=h*this.height,d=Math.PI*this.rotation/180;e(l,l,o(n,c)),e(l,l,o(m/2,u/2)),a(l,l,-d),e(l,l,o(-m/2,-u/2)),s(l,l,o(m,u)),i(this.transforms.displayViewScreenMat3,r.displayViewMat3,l)}onAttach(){this.invalidateVAO()}onDetach(){this.invalidateVAO()}_createVectorFieldVAO(t,e){const{vertexData:a,indexData:s}=e,i=m.createIndex(t,35044,new Uint32Array(s)),r=h("vector-field",[{location:0,name:"a_pos",count:2,type:u.FLOAT,normalized:!1},{location:1,name:"a_offset",count:2,type:u.FLOAT,normalized:!1},{location:2,name:"a_vv",count:2,type:u.FLOAT,normalized:!1}]),o=new f(t,r.bufferLayout,new Float32Array(a));return{vao:new d(t,o,i),elementCount:s.length}}}export{v as RasterVFDisplayObject};
|
|
@@ -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
|
|
5
|
+
import{identity as e,translate as t,rotate as s,scale as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{tileCoordSize as i}from"./constants.js";import{CircleRenderBucket as o,SymbolRenderBucket as h,LineRenderBucket as n,FillRenderBucket as l}from"./RenderBucket.js";import{fadeDuration as c}from"./decluttering/config.js";import{TiledDisplayObject as d}from"../webgl/TiledDisplayObject.js";const u=null;class y extends d{constructor(e,t,s,r,a,o,h,n=null){super(e,t,s,r,a,o,i,i),this.styleRepository=h,this._owner=n,this.type="vector-tile",this._referenced=1,this._hasSymbolBuckets=!1,this._usedMemory=256,this.layerData=new Map,this.status="loading",this.allSymbolsFadingOut=!1,this.lastOpacityUpdate=0,this.symbols=new Map,this.isCoverage=!1,this.neededForCoverage=!1,this.decluttered=!1,this.parentTile=null,this.childrenTiles=new Set,this.featureIndex=null,this.triangleCount=0,this._processed=!1,this.id=e.id}get styleLayerUIDs(){return Array.from(this.layerData.keys())}get hasSymbolBuckets(){return this._hasSymbolBuckets}get isFading(){return this._hasSymbolBuckets&&performance.now()-this.lastOpacityUpdate<c}get isHoldingForFade(){return this._hasSymbolBuckets&&(!this.allSymbolsFadingOut||performance.now()-this.lastOpacityUpdate<c)}get wasRequested(){return"errored"===this.status||"loaded"===this.status||"reloading"===this.status}setData(e){this.changeDataImpl(e),this.requestRender(),this.ready(),this._processed=!0}deleteLayerData(e){let t=!1;for(const s of e){const e=this.layerData.get(s);e&&(this._usedMemory-=e.usedMemory,3===e.type&&this.symbols.delete(s)&&(t=!0),e.destroy(),this.layerData.delete(s))}this._owner?.updateTileSize(this),t&&(this.featureIndex?.clear(),this.emit("symbols-changed")),this.requestRender()}processed(){return this._processed}hasData(){return this.layerData.size>0}hasFeatures(){const e=this.layerData.values();for(const t of e)if(t.hasData())return!0;return!1}dispose(){"unloaded"!==this.status&&(y._destroyRenderBuckets(this.layerData),this.layerData.clear(),this.featureIndex=null,this._usedMemory=0,this.destroy(),this.status="unloaded")}release(){0===--this._referenced&&(this._owner?.onDisposeTile(this),this.dispose(),this.stage=null)}retain(){++this._referenced}get usedMemory(){return this._usedMemory}get usedMemoryPerReference(){return this._usedMemory/(this._referenced||1)}changeDataImpl(e){this.featureIndex?.clear();let t=!1;if(e){const{bucketsWithData:s,emptyBuckets:r}=e,a=this._createRenderBuckets(s);if(r&&r.byteLength>0){const e=new Uint32Array(r);for(const t of e)this._deleteLayerData(t)}for(const[e,i]of a)this._deleteLayerData(e),3===i.type&&(this.symbols.set(e,i.symbols),t=!0),this._usedMemory+=i.usedMemory,this.layerData.set(e,i);this._owner?.updateTileSize(this)}this._hasSymbolBuckets=!1;for(const s of this.layerData.values())3===s.type&&(this._hasSymbolBuckets=!0);t&&this.emit("symbols-changed")}attachWithContext(e){this.stage={context:e,trashDisplayObject(e){e.processDetach()},untrashDisplayObject:()=>!1}}setTransform(a){super.setTransform(a);const i=this.resolution/(a.resolution*a.pixelRatio),o=this.width/this.rangeX*i,h=this.height/this.rangeY*i,n=[0,0];a.toScreen(n,[this.x,this.y]);const l=this.transforms.tileUnitsToPixels;e(l),t(l,l,n),s(l,l,Math.PI*a.rotation/180),r(l,l,[o,h,1])}_createTransforms(){return{displayViewScreenMat3:a(),tileMat3:a(),tileUnitsToPixels:a()}}static _destroyRenderBuckets(e){if(!e)return;const t=new Set;for(const s of e.values())t.has(s)||(s.destroy(),t.add(s));e.clear()}_createRenderBuckets(e){const t=new Map,s=new Map;for(const r of e){const e=this._deserializeBucket(r,s);for(const s of e.layerUIDs)t.set(s,e)}return t}_deserializeBucket(e,t){let s=t.get(e);if(s)return s;switch(new Uint32Array(e)[0]){case 1:s=new l(e,this.styleRepository);break;case 2:s=new n(e,this.styleRepository);break;case 3:s=new h(e,this.styleRepository,this);break;case 4:s=new o(e,this.styleRepository)}return t.set(e,s),s}_deleteLayerData(e){if(!this.layerData.has(e))return;const t=this.layerData.get(e);this._usedMemory-=t.usedMemory,t.destroy(),this.layerData.delete(e)}}export{y as VectorTile,u as tracer};
|
|
@@ -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={background:{"background.frag":"#ifdef PATTERN\nuniform lowp float u_opacity;\nuniform lowp sampler2D u_texture;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_tileTextureCoord;\n#else\nuniform lowp vec4 u_color;\n#endif\nvoid main() {\n#ifdef PATTERN\nmediump vec2 normalizedTextureCoord = mod(v_tileTextureCoord, 1.0);\nmediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color = texture2D(u_texture, samplePos);\ngl_FragColor = u_opacity * color;\n#else\ngl_FragColor = u_color;\n#endif\n}","background.vert":"precision mediump float;\nattribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform mediump float u_coord_range;\nuniform mediump float u_depth;\n#ifdef PATTERN\nuniform mediump mat3 u_pattern_matrix;\nvarying mediump vec2 v_tileTextureCoord;\nuniform mediump vec4 u_tlbr;\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\n#endif\nvoid main() {\ngl_Position = vec4((u_dvsMat3 * vec3(u_coord_range * a_pos, 1.0)).xy, u_depth, 1.0);\n#ifdef PATTERN\nv_tileTextureCoord = (u_pattern_matrix * vec3(a_pos, 1.0)).xy;\nv_tlbr = u_tlbr / u_mosaicSize.xyxy;\n#endif\n}"},circle:{"circle.frag":"precision lowp float;\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\nvoid main()\n{\nmediump float dist = length(v_offset);\nmediump float alpha = smoothstep(0.0, -v_blur, dist - 1.0);\nlowp float color_mix_ratio = v_stroke_width < 0.01 ? 0.0 : smoothstep(-v_blur, 0.0, dist - v_radius / (v_radius + v_stroke_width));\ngl_FragColor = alpha * mix(v_color, v_stroke_color, color_mix_ratio);\n}","circle.vert":"precision mediump float;\nattribute vec2 a_pos;\n#pragma header\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_circleTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_antialiasingWidth;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_stroke_color = stroke_color * stroke_opacity;\nv_stroke_width = stroke_width;\nv_radius = radius;\nv_blur = max(blur, u_antialiasingWidth / (radius + stroke_width));\nmediump vec2 offset = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\nv_offset = offset;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos * 0.5, 1.0) + u_displayMat3 * vec3((v_radius + v_stroke_width) * offset + u_circleTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},fill:{"fill.frag":"precision lowp float;\n#ifdef PATTERN\nuniform lowp sampler2D u_texture;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\nvarying lowp vec4 v_color;\nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef PATTERN\nmediump vec2 normalizedTextureCoord = fract(v_tileTextureCoord);\nmediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color = texture2D(u_texture, samplePos);\ngl_FragColor = v_color[3] * color;\n#else\ngl_FragColor = v_color;\n#endif\n}","fill.vert":"precision mediump float;\nattribute vec2 a_pos;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump float u_depth;\nuniform mediump vec2 u_fillTranslation;\n#ifdef PATTERN\n#include <util/util.glsl>\nuniform mediump vec2 u_mosaicSize;\nuniform mediump float u_patternFactor;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\nvarying lowp vec4 v_color;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\n#ifdef PATTERN\nfloat patternWidth = nextPOT(tlbr.z - tlbr.x);\nfloat patternHeight = nextPOT(tlbr.w - tlbr.y);\nfloat scaleX = 1.0 / (patternWidth * u_patternFactor);\nfloat scaleY = 1.0 / (patternHeight * u_patternFactor);\nmat3 patterMat = mat3(scaleX, 0.0, 0.0,\n0.0, -scaleY, 0.0,\n0.0, 0.0, 1.0);\nv_tileTextureCoord = (patterMat * vec3(a_pos, 1.0)).xy;\nv_tlbr = tlbr / u_mosaicSize.xyxy;\n#endif\nvec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(u_fillTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},icon:{"icon.frag":"precision mediump float;\nuniform lowp sampler2D u_texture;\n#ifdef SDF\nuniform lowp vec4 u_color;\nuniform lowp vec4 u_outlineColor;\n#endif\nuniform highp int u_isStencilPass;\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\nvarying mediump vec2 v_size;\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump float v_halo_width;\n#endif\nconst float alphaCutoff = 1.0 / 255.5;\n#include <util/encoding.glsl>\nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef SDF\nlowp vec4 fillPixelColor = v_color;\nfloat d = rgba2float(texture2D(u_texture, v_tex)) - 0.5;\nconst float softEdgeRatio = 0.248062016;\nfloat size = max(v_size.x, v_size.y);\nfloat dist = d * softEdgeRatio * size;\nfillPixelColor *= clamp(0.5 - dist, 0.0, 1.0);\nif (v_halo_width > 0.25) {\nlowp vec4 outlinePixelColor = u_outlineColor;\nconst float outlineLimitRatio = (16.0 / 86.0);\nfloat clampedOutlineSize = softEdgeRatio * min(v_halo_width, outlineLimitRatio * max(v_size.x, v_size.y));\noutlinePixelColor *= clamp(0.5 - (abs(dist) - clampedOutlineSize), 0.0, 1.0);\ngl_FragColor = v_opacity * mixColors(fillPixelColor, outlinePixelColor);\n}\nelse {\ngl_FragColor = v_opacity * fillPixelColor;\n}\n#else\nlowp vec4 texColor = texture2D(u_texture, v_tex);\nif (u_isStencilPass == 1 && texColor.a < alphaCutoff) {\ndiscard;\n}\ngl_FragColor = v_opacity * texColor;\n#endif\n}","icon.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump float v_halo_width;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_iconTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeDuration;\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\nvarying mediump vec2 v_size;\nconst float C_OFFSET_PRECISION = 1.0 / 8.0;\nconst float C_256_TO_RAD = 3.14159265359 / 128.0;\nconst float C_DEG_TO_RAD = 3.14159265359 / 180.0;\nconst float tileCoordRatio = 1.0 / 8.0;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nv_color = color;\nv_opacity = opacity;\n#ifdef SDF\nv_halo_width = halo_width;\n#endif\nfloat modded = mod(a_opacityInfo, 128.0);\nfloat targetOpacity = (a_opacityInfo - modded) / 128.0;\nfloat startOpacity = modded / 127.0;\nfloat interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_opacity *= interpolatedOpacity;\nmediump float a_angle = a_levelInfo[1];\nmediump float a_minLevel = a_levelInfo[2];\nmediump float a_maxLevel = a_levelInfo[3];\nmediump vec2 a_tex = a_texAngleRange.xy;\nmediump float delta_z = 0.0;\nmediump float rotated = mod(a_angle + u_mapRotation, 256.0);\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * step(64.0, rotated) * (1.0 - step(192.0, rotated));\ndelta_z += 1.0 - step(a_minLevel, u_level);\ndelta_z += step(a_maxLevel, u_level);\ndelta_z += step(v_opacity, 0.0);\nvec2 offset = C_OFFSET_PRECISION * a_vertexOffset;\nv_size = abs(offset);\n#ifdef SDF\noffset = (120.0 / 86.0) * offset;\n#endif\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayViewMat3 * vec3(size * offset, 0.0) + u_displayMat3 * vec3(u_iconTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\nv_tex = a_tex.xy / u_mosaicSize;\n}"},line:{"line.frag":"precision lowp float;\nvarying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nvarying mediump float v_lineHalfWidth;\nvarying lowp vec4 v_color;\nvarying mediump float v_blur;\n#if defined (PATTERN) || defined(SDF)\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\nuniform sampler2D u_texture;\nuniform mediump float u_antialiasing;\n#endif\n#ifdef SDF\n#include <util/encoding.glsl>\n#endif\nvoid main()\n{\nmediump float fragDist = length(v_normal) * v_lineHalfWidth;\nlowp float alpha = clamp((v_lineHalfWidth - fragDist) / v_blur, 0.0, 1.0);\n#ifdef PATTERN\nmediump float relativeTexX = fract(v_accumulatedDistance / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY = 0.5 + v_normal.y * v_lineHalfWidth / (v_patternSize.y * v_widthRatio);\nmediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nlowp vec4 color = texture2D(u_texture, texCoord);\ngl_FragColor = alpha * v_color[3] * color;\n#elif defined(SDF)\nmediump float relativeTexX = fract((v_accumulatedDistance * 0.5) / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY = 0.5 + 0.25 * v_normal.y;\nmediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nmediump float d = rgba2float(texture2D(u_texture, texCoord)) - 0.5;\nfloat dist = d * (v_lineHalfWidth + u_antialiasing / 2.0);\ngl_FragColor = alpha * clamp(0.5 - dist, 0.0, 1.0) * v_color;\n#else\ngl_FragColor = alpha * v_color;\n#endif\n}","line.vert":"precision mediump float;\nattribute vec2 a_pos;\nattribute vec4 a_extrude_offset;\nattribute vec4 a_dir_normal;\nattribute vec2 a_accumulatedDistance;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump float u_zoomFactor;\nuniform mediump vec2 u_lineTranslation;\nuniform mediump float u_antialiasing;\nuniform mediump float u_depth;\nvarying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nconst float scale = 1.0 / 31.0;\nconst mediump float tileCoordRatio = 8.0;\n#if defined (SDF)\nconst mediump float sdfPatternHalfWidth = 15.5;\n#endif\n#if defined (PATTERN) || defined(SDF)\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\n#endif\nvarying lowp vec4 v_color;\nvarying mediump float v_lineHalfWidth;\nvarying mediump float v_blur;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_blur = blur + u_antialiasing;\nv_normal = a_dir_normal.zw * scale;\n#if defined (PATTERN) || defined(SDF)\nv_tlbr = tlbr / u_mosaicSize.xyxy;\nv_patternSize = vec2(tlbr.z - tlbr.x, tlbr.y - tlbr.w);\n#if defined (PATTERN)\nv_widthRatio = width / v_patternSize.y;\n#else\nv_widthRatio = width / sdfPatternHalfWidth / 2.0;\n#endif\n#endif\nv_lineHalfWidth = (width + u_antialiasing) * 0.5;\nmediump vec2 dir = a_dir_normal.xy * scale;\nmediump vec2 offset_ = a_extrude_offset.zw * scale * offset;\nmediump vec2 dist = v_lineHalfWidth * scale * a_extrude_offset.xy;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos + offset_ * tileCoordRatio / u_zoomFactor, 1.0) + u_displayViewMat3 * vec3(dist, 0.0) + u_displayMat3 * vec3(u_lineTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n#if defined (PATTERN) || defined(SDF)\nv_accumulatedDistance = a_accumulatedDistance.x * u_zoomFactor / tileCoordRatio + dot(dir, dist + offset_);\n#endif\n}"},outline:{"outline.frag":"varying lowp vec4 v_color;\nvarying mediump vec2 v_normal;\nvoid main()\n{\nlowp float dist = abs(v_normal.y);\nlowp float alpha = smoothstep(1.0, 0.0, dist);\ngl_FragColor = alpha * v_color;\n}","outline.vert":"attribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_xnormal;\n#pragma header\nvarying lowp vec4 v_color;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_fillTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_outline_width;\nvarying lowp vec2 v_normal;\nconst float scale = 1.0 / 15.0;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_normal = a_xnormal;\nmediump vec2 dist = u_outline_width * scale * a_offset;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(dist + u_fillTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},text:{"text.frag":"uniform lowp sampler2D u_texture;\nvarying lowp vec2 v_tex;\nvarying lowp vec4 v_color;\nvarying mediump float v_edgeWidth;\nvarying mediump float v_edgeDistance;\nvoid main()\n{\nlowp float dist = texture2D(u_texture, v_tex).a;\nmediump float alpha = smoothstep(v_edgeDistance - v_edgeWidth, v_edgeDistance + v_edgeWidth, dist);\ngl_FragColor = alpha * v_color;\n}","text.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\nvarying lowp vec4 v_color;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_textTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeDuration;\nvarying lowp vec2 v_tex;\nconst float offsetPrecision = 1.0 / 8.0;\nconst mediump float edgePos = 0.75;\nuniform mediump float u_antialiasingWidth;\nvarying mediump float v_edgeDistance;\nvarying mediump float v_edgeWidth;\nuniform lowp float u_halo;\nconst float sdfFontScale = 1.0 / 24.0;\nconst float sdfPixel = 3.0;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nif (u_halo > 0.5)\n{\nv_color = halo_color * opacity;\nhalo_width *= sdfPixel;\nhalo_blur *= sdfPixel;\n}\nelse\n{\nv_color = color * opacity;\nhalo_width = 0.0;\nhalo_blur = 0.0;\n}\nfloat modded = mod(a_opacityInfo, 128.0);\nfloat targetOpacity = (a_opacityInfo - modded) / 128.0;\nfloat startOpacity = modded / 127.0;\nfloat interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_color *= interpolatedOpacity;\nmediump float a_angle = a_levelInfo[1];\nmediump float a_minLevel = a_levelInfo[2];\nmediump float a_maxLevel = a_levelInfo[3];\nmediump vec2 a_tex = a_texAngleRange.xy;\nmediump float a_visMinAngle = a_texAngleRange.z;\nmediump float a_visMaxAngle = a_texAngleRange.w;\nmediump float delta_z = 0.0;\nmediump float angle = mod(a_angle + u_mapRotation, 256.0);\nif (a_visMinAngle < a_visMaxAngle)\n{\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) + (1.0 - step(a_visMinAngle, angle)));\n}\nelse\n{\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) * (1.0 - step(a_visMinAngle, angle)));\n}\ndelta_z += 1.0 - step(a_minLevel, u_level);\ndelta_z += step(a_maxLevel, u_level);\ndelta_z += step(v_color[3], 0.0);\nv_tex = a_tex.xy / u_mosaicSize;\nv_edgeDistance = edgePos - halo_width / size;\nv_edgeWidth = (u_antialiasingWidth + halo_blur) / size;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + sdfFontScale * u_displayViewMat3 * vec3(offsetPrecision * size * a_vertexOffset, 0.0) + u_displayMat3 * vec3(u_textTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\n}"},util:{"encoding.glsl":"const vec4 rgba2float_factors = vec4(\n255.0 / (256.0),\n255.0 / (256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n);\nfloat rgba2float(vec4 rgba) {\nreturn dot(rgba, rgba2float_factors);\n}","util.glsl":"float nextPOT(in float x) {\nreturn pow(2.0, ceil(log2(abs(x))));\n}"}};export{e as default};
|
|
5
|
+
const e={circle:{"circle.frag":"precision lowp float;\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\nvoid main()\n{\nmediump float dist = length(v_offset);\nmediump float alpha = smoothstep(0.0, -v_blur, dist - 1.0);\nlowp float color_mix_ratio = v_stroke_width < 0.01 ? 0.0 : smoothstep(-v_blur, 0.0, dist - v_radius / (v_radius + v_stroke_width));\ngl_FragColor = alpha * mix(v_color, v_stroke_color, color_mix_ratio);\n}","circle.vert":"precision mediump float;\nattribute vec2 a_pos;\n#pragma header\nvarying lowp vec4 v_color;\nvarying lowp vec4 v_stroke_color;\nvarying mediump float v_blur;\nvarying mediump float v_stroke_width;\nvarying mediump float v_radius;\nvarying mediump vec2 v_offset;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_circleTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_antialiasingWidth;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_stroke_color = stroke_color * stroke_opacity;\nv_stroke_width = stroke_width;\nv_radius = radius;\nv_blur = max(blur, u_antialiasingWidth / (radius + stroke_width));\nmediump vec2 offset = vec2(mod(a_pos, 2.0) * 2.0 - 1.0);\nv_offset = offset;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos * 0.5, 1.0) + u_displayMat3 * vec3((v_radius + v_stroke_width) * offset + u_circleTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},fill:{"fill.frag":"precision lowp float;\n#ifdef PATTERN\nuniform lowp sampler2D u_texture;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\nvarying lowp vec4 v_color;\nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef PATTERN\nmediump vec2 normalizedTextureCoord = fract(v_tileTextureCoord);\nmediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color = texture2D(u_texture, samplePos);\ngl_FragColor = v_color[3] * color;\n#else\ngl_FragColor = v_color;\n#endif\n}","fill.vert":"precision mediump float;\nattribute vec2 a_pos;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump float u_depth;\nuniform mediump vec2 u_fillTranslation;\n#ifdef PATTERN\n#include <util/util.glsl>\nuniform mediump vec2 u_mosaicSize;\nuniform mediump float u_patternFactor;\nvarying mediump vec2 v_tileTextureCoord;\nvarying mediump vec4 v_tlbr;\n#endif\nvarying lowp vec4 v_color;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\n#ifdef PATTERN\nfloat patternWidth = nextPOT(tlbr.z - tlbr.x);\nfloat patternHeight = nextPOT(tlbr.w - tlbr.y);\nfloat scaleX = 1.0 / (patternWidth * u_patternFactor);\nfloat scaleY = 1.0 / (patternHeight * u_patternFactor);\nmat3 patterMat = mat3(scaleX, 0.0, 0.0,\n0.0, -scaleY, 0.0,\n0.0, 0.0, 1.0);\nv_tileTextureCoord = (patterMat * vec3(a_pos, 1.0)).xy;\nv_tlbr = tlbr / u_mosaicSize.xyxy;\n#endif\nvec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(u_fillTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},background:{"background.frag":"#ifdef PATTERN\nuniform lowp float u_opacity;\nuniform lowp sampler2D u_texture;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_tileTextureCoord;\n#else\nuniform lowp vec4 u_color;\n#endif\nvoid main() {\n#ifdef PATTERN\nmediump vec2 normalizedTextureCoord = mod(v_tileTextureCoord, 1.0);\nmediump vec2 samplePos = mix(v_tlbr.xy, v_tlbr.zw, normalizedTextureCoord);\nlowp vec4 color = texture2D(u_texture, samplePos);\ngl_FragColor = u_opacity * color;\n#else\ngl_FragColor = u_color;\n#endif\n}","background.vert":"precision mediump float;\nattribute vec2 a_pos;\nuniform highp mat3 u_dvsMat3;\nuniform mediump float u_coord_range;\nuniform mediump float u_depth;\n#ifdef PATTERN\nuniform mediump mat3 u_pattern_matrix;\nvarying mediump vec2 v_tileTextureCoord;\nuniform mediump vec4 u_tlbr;\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\n#endif\nvoid main() {\ngl_Position = vec4((u_dvsMat3 * vec3(u_coord_range * a_pos, 1.0)).xy, u_depth, 1.0);\n#ifdef PATTERN\nv_tileTextureCoord = (u_pattern_matrix * vec3(a_pos, 1.0)).xy;\nv_tlbr = u_tlbr / u_mosaicSize.xyxy;\n#endif\n}"},icon:{"icon.frag":"precision mediump float;\nuniform lowp sampler2D u_texture;\n#ifdef SDF\nuniform lowp vec4 u_color;\nuniform lowp vec4 u_outlineColor;\n#endif\nuniform highp int u_isStencilPass;\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\nvarying mediump vec2 v_size;\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump float v_halo_width;\n#endif\nconst float alphaCutoff = 1.0 / 255.5;\n#include <util/encoding.glsl>\nvec4 mixColors(vec4 color1, vec4 color2) {\nfloat compositeAlpha = color2.a + color1.a * (1.0 - color2.a);\nvec3 compositeColor = color2.rgb + color1.rgb * (1.0 - color2.a);\nreturn vec4(compositeColor, compositeAlpha);\n}\nvoid main()\n{\n#ifdef SDF\nlowp vec4 fillPixelColor = v_color;\nfloat d = rgba2float(texture2D(u_texture, v_tex)) - 0.5;\nconst float softEdgeRatio = 0.248062016;\nfloat size = max(v_size.x, v_size.y);\nfloat dist = d * softEdgeRatio * size;\nfillPixelColor *= clamp(0.5 - dist, 0.0, 1.0);\nif (v_halo_width > 0.25) {\nlowp vec4 outlinePixelColor = u_outlineColor;\nconst float outlineLimitRatio = (16.0 / 86.0);\nfloat clampedOutlineSize = softEdgeRatio * min(v_halo_width, outlineLimitRatio * max(v_size.x, v_size.y));\noutlinePixelColor *= clamp(0.5 - (abs(dist) - clampedOutlineSize), 0.0, 1.0);\ngl_FragColor = v_opacity * mixColors(fillPixelColor, outlinePixelColor);\n}\nelse {\ngl_FragColor = v_opacity * fillPixelColor;\n}\n#else\nlowp vec4 texColor = texture2D(u_texture, v_tex);\nif (u_isStencilPass == 1 && texColor.a < alphaCutoff) {\ndiscard;\n}\ngl_FragColor = v_opacity * texColor;\n#endif\n}","icon.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\nvarying lowp vec4 v_color;\n#ifdef SDF\nvarying mediump float v_halo_width;\n#endif\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_iconTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeDuration;\nvarying mediump vec2 v_tex;\nvarying lowp float v_opacity;\nvarying mediump vec2 v_size;\nconst float C_OFFSET_PRECISION = 1.0 / 8.0;\nconst float C_256_TO_RAD = 3.14159265359 / 128.0;\nconst float C_DEG_TO_RAD = 3.14159265359 / 180.0;\nconst float tileCoordRatio = 1.0 / 8.0;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nv_color = color;\nv_opacity = opacity;\n#ifdef SDF\nv_halo_width = halo_width;\n#endif\nfloat modded = mod(a_opacityInfo, 128.0);\nfloat targetOpacity = (a_opacityInfo - modded) / 128.0;\nfloat startOpacity = modded / 127.0;\nfloat interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_opacity *= interpolatedOpacity;\nmediump float a_angle = a_levelInfo[1];\nmediump float a_minLevel = a_levelInfo[2];\nmediump float a_maxLevel = a_levelInfo[3];\nmediump vec2 a_tex = a_texAngleRange.xy;\nmediump float delta_z = 0.0;\nmediump float rotated = mod(a_angle + u_mapRotation, 256.0);\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * step(64.0, rotated) * (1.0 - step(192.0, rotated));\ndelta_z += 1.0 - step(a_minLevel, u_level);\ndelta_z += step(a_maxLevel, u_level);\ndelta_z += step(v_opacity, 0.0);\nvec2 offset = C_OFFSET_PRECISION * a_vertexOffset;\nv_size = abs(offset);\n#ifdef SDF\noffset = (120.0 / 86.0) * offset;\n#endif\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayViewMat3 * vec3(size * offset, 0.0) + u_displayMat3 * vec3(u_iconTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\nv_tex = a_tex.xy / u_mosaicSize;\n}"},line:{"line.frag":"precision lowp float;\nvarying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nvarying mediump float v_lineHalfWidth;\nvarying lowp vec4 v_color;\nvarying mediump float v_blur;\n#if defined (PATTERN) || defined(SDF)\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\nuniform sampler2D u_texture;\nuniform mediump float u_antialiasing;\n#endif\n#ifdef SDF\n#include <util/encoding.glsl>\n#endif\nvoid main()\n{\nmediump float fragDist = length(v_normal) * v_lineHalfWidth;\nlowp float alpha = clamp((v_lineHalfWidth - fragDist) / v_blur, 0.0, 1.0);\n#ifdef PATTERN\nmediump float relativeTexX = fract(v_accumulatedDistance / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY = 0.5 + v_normal.y * v_lineHalfWidth / (v_patternSize.y * v_widthRatio);\nmediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nlowp vec4 color = texture2D(u_texture, texCoord);\ngl_FragColor = alpha * v_color[3] * color;\n#elif defined(SDF)\nmediump float relativeTexX = fract((v_accumulatedDistance * 0.5) / (v_patternSize.x * v_widthRatio));\nmediump float relativeTexY = 0.5 + 0.25 * v_normal.y;\nmediump vec2 texCoord = mix(v_tlbr.xy, v_tlbr.zw, vec2(relativeTexX, relativeTexY));\nmediump float d = rgba2float(texture2D(u_texture, texCoord)) - 0.5;\nfloat dist = d * (v_lineHalfWidth + u_antialiasing / 2.0);\ngl_FragColor = alpha * clamp(0.5 - dist, 0.0, 1.0) * v_color;\n#else\ngl_FragColor = alpha * v_color;\n#endif\n}","line.vert":"precision mediump float;\nattribute vec2 a_pos;\nattribute vec4 a_extrude_offset;\nattribute vec4 a_dir_normal;\nattribute vec2 a_accumulatedDistance;\n#pragma header\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump float u_zoomFactor;\nuniform mediump vec2 u_lineTranslation;\nuniform mediump float u_antialiasing;\nuniform mediump float u_depth;\nvarying mediump vec2 v_normal;\nvarying highp float v_accumulatedDistance;\nconst float scale = 1.0 / 31.0;\nconst mediump float tileCoordRatio = 8.0;\n#if defined (SDF)\nconst mediump float sdfPatternHalfWidth = 15.5;\n#endif\n#if defined (PATTERN) || defined(SDF)\nuniform mediump vec2 u_mosaicSize;\nvarying mediump vec4 v_tlbr;\nvarying mediump vec2 v_patternSize;\nvarying mediump float v_widthRatio;\n#endif\nvarying lowp vec4 v_color;\nvarying mediump float v_lineHalfWidth;\nvarying mediump float v_blur;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_blur = blur + u_antialiasing;\nv_normal = a_dir_normal.zw * scale;\n#if defined (PATTERN) || defined(SDF)\nv_tlbr = tlbr / u_mosaicSize.xyxy;\nv_patternSize = vec2(tlbr.z - tlbr.x, tlbr.y - tlbr.w);\n#if defined (PATTERN)\nv_widthRatio = width / v_patternSize.y;\n#else\nv_widthRatio = width / sdfPatternHalfWidth / 2.0;\n#endif\n#endif\nv_lineHalfWidth = (width + u_antialiasing) * 0.5;\nmediump vec2 dir = a_dir_normal.xy * scale;\nmediump vec2 offset_ = a_extrude_offset.zw * scale * offset;\nmediump vec2 dist = v_lineHalfWidth * scale * a_extrude_offset.xy;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos + offset_ * tileCoordRatio / u_zoomFactor, 1.0) + u_displayViewMat3 * vec3(dist, 0.0) + u_displayMat3 * vec3(u_lineTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n#if defined (PATTERN) || defined(SDF)\nv_accumulatedDistance = a_accumulatedDistance.x * u_zoomFactor / tileCoordRatio + dot(dir, dist + offset_);\n#endif\n}"},outline:{"outline.frag":"varying lowp vec4 v_color;\nvarying mediump vec2 v_normal;\nvoid main()\n{\nlowp float dist = abs(v_normal.y);\nlowp float alpha = smoothstep(1.0, 0.0, dist);\ngl_FragColor = alpha * v_color;\n}","outline.vert":"attribute vec2 a_pos;\nattribute vec2 a_offset;\nattribute vec2 a_xnormal;\n#pragma header\nvarying lowp vec4 v_color;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform mediump vec2 u_fillTranslation;\nuniform mediump float u_depth;\nuniform mediump float u_outline_width;\nvarying lowp vec2 v_normal;\nconst float scale = 1.0 / 15.0;\nvoid main()\n{\n#pragma main\nv_color = color * opacity;\nv_normal = a_xnormal;\nmediump vec2 dist = u_outline_width * scale * a_offset;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + u_displayMat3 * vec3(dist + u_fillTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth, 1.0);\n}"},text:{"text.frag":"uniform lowp sampler2D u_texture;\nvarying lowp vec2 v_tex;\nvarying lowp vec4 v_color;\nvarying mediump float v_edgeWidth;\nvarying mediump float v_edgeDistance;\nvoid main()\n{\nlowp float dist = texture2D(u_texture, v_tex).a;\nmediump float alpha = smoothstep(v_edgeDistance - v_edgeWidth, v_edgeDistance + v_edgeWidth, dist);\ngl_FragColor = alpha * v_color;\n}","text.vert":"attribute vec2 a_pos;\nattribute vec2 a_vertexOffset;\nattribute vec4 a_texAngleRange;\nattribute vec4 a_levelInfo;\nattribute float a_opacityInfo;\n#pragma header\nvarying lowp vec4 v_color;\nuniform highp mat3 u_dvsMat3;\nuniform highp mat3 u_displayMat3;\nuniform highp mat3 u_displayViewMat3;\nuniform mediump vec2 u_textTranslation;\nuniform vec2 u_mosaicSize;\nuniform mediump float u_depth;\nuniform mediump float u_mapRotation;\nuniform mediump float u_level;\nuniform lowp float u_keepUpright;\nuniform mediump float u_fadeDuration;\nvarying lowp vec2 v_tex;\nconst float offsetPrecision = 1.0 / 8.0;\nconst mediump float edgePos = 0.75;\nuniform mediump float u_antialiasingWidth;\nvarying mediump float v_edgeDistance;\nvarying mediump float v_edgeWidth;\nuniform lowp float u_halo;\nconst float sdfFontScale = 1.0 / 24.0;\nconst float sdfPixel = 3.0;\nuniform highp float u_time;\nvoid main()\n{\n#pragma main\nif (u_halo > 0.5)\n{\nv_color = halo_color * opacity;\nhalo_width *= sdfPixel;\nhalo_blur *= sdfPixel;\n}\nelse\n{\nv_color = color * opacity;\nhalo_width = 0.0;\nhalo_blur = 0.0;\n}\nfloat modded = mod(a_opacityInfo, 128.0);\nfloat targetOpacity = (a_opacityInfo - modded) / 128.0;\nfloat startOpacity = modded / 127.0;\nfloat interpolatedOpacity = clamp(startOpacity + 2.0 * (targetOpacity - 0.5) * u_time / u_fadeDuration, 0.0, 1.0);\nv_color *= interpolatedOpacity;\nmediump float a_angle = a_levelInfo[1];\nmediump float a_minLevel = a_levelInfo[2];\nmediump float a_maxLevel = a_levelInfo[3];\nmediump vec2 a_tex = a_texAngleRange.xy;\nmediump float a_visMinAngle = a_texAngleRange.z;\nmediump float a_visMaxAngle = a_texAngleRange.w;\nmediump float delta_z = 0.0;\nmediump float angle = mod(a_angle + u_mapRotation, 256.0);\nif (a_visMinAngle < a_visMaxAngle)\n{\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) + (1.0 - step(a_visMinAngle, angle)));\n}\nelse\n{\ndelta_z += (1.0 - step(u_keepUpright, 0.0)) * (step(a_visMaxAngle, angle) * (1.0 - step(a_visMinAngle, angle)));\n}\ndelta_z += 1.0 - step(a_minLevel, u_level);\ndelta_z += step(a_maxLevel, u_level);\ndelta_z += step(v_color[3], 0.0);\nv_tex = a_tex.xy / u_mosaicSize;\nv_edgeDistance = edgePos - halo_width / size;\nv_edgeWidth = (u_antialiasingWidth + halo_blur) / size;\nmediump vec3 pos = u_dvsMat3 * vec3(a_pos, 1.0) + sdfFontScale * u_displayViewMat3 * vec3(offsetPrecision * size * a_vertexOffset, 0.0) + u_displayMat3 * vec3(u_textTranslation, 0.0);\ngl_Position = vec4(pos.xy, u_depth + delta_z, 1.0);\n}"},util:{"encoding.glsl":"const vec4 rgba2float_factors = vec4(\n255.0 / (256.0),\n255.0 / (256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0),\n255.0 / (256.0 * 256.0 * 256.0 * 256.0)\n);\nfloat rgba2float(vec4 rgba) {\nreturn dot(rgba, rgba2float_factors);\n}","util.glsl":"float nextPOT(in float x) {\nreturn pow(2.0, ceil(log2(abs(x))));\n}"}};export{e as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"../../../../core/has.js";import{throwIfNotAbortError as
|
|
5
|
+
import t from"../../../../request.js";import{bidiText as e}from"../../../../core/BidiText.js";import has from"../../../../core/has.js";import{throwIfNotAbortError as i}from"../../../../core/promiseUtils.js";import{loadTextModule as s}from"../../../../libs/text/loadTextModule.js";import{sdfRadiusComplex as h,sdfBufferGlyphSDFCreator as r,sdfSizeComplex as a,sdfBufferServer as o}from"./definitions.js";import{GlyphSDFCreator as n}from"./GlyphSDFCreator.js";import c from"./Rect.js";import l from"./RectangleBinPack.js";import{charCodes as p}from"./Utils.js";import g from"../../../webgl/Texture.js";import{TextureDescriptor as _}from"../../../webgl/TextureDescriptor.js";const d=256,f=.25,u=t=>Math.floor(t/256);function y(t){const e=new Set;for(const i of t)e.add(u(i));return e}function m(t,e,s){return t.has(e)||t.set(e,s().then(()=>{t.delete(e)}).catch(s=>{t.delete(e),i(s)})),t.get(e)}const w=t=>({rect:new c(0,0,0,0),page:0,metrics:{left:0,width:0,height:0,advance:0,top:0},code:t,sdf:!0});class x{constructor(t,e,i){this.width=0,this.height=0,this._dirties=[],this._glyphData=[],this._currentPage=0,this._glyphCache={},this._glyphCacheById={},this._textures=[],this._rangePromises=new Map,this._facePromises=new Map,this._preloadCache={},this._glyphSDFCreator=new n({sdfSizePx:a,sdfBufferPx:r,radius:h,cutoff:f}),this._faces=new Map,this.width=t,this.height=e,this._glyphSource=i,this._binPack=new l(t,e),this._glyphData.push(new Uint8Array(t*e)),this._dirties.push(!0),this._textures.push(null),this._initDecorationGlyphs()}dispose(){this._binPack=null;for(const t of this._textures)t&&t.dispose();this._textures.length=0,this._glyphData.length=0}_initDecorationGlyphs(){const t=[117,149,181,207,207,181,149,117],e=[],i=[];for(let r=0;r<t.length;r++){const s=t[r];for(let t=0;t<11;t++){const h=r>=3&&r<5&&t>=3&&t<8?255:0;e.push(s),i.push(h)}}const s={metrics:{width:5,height:2,left:0,top:0,advance:0},bitmap:new Uint8Array(e)},h={metrics:{width:5,height:2,left:0,top:0,advance:0},bitmap:new Uint8Array(i)};this._recordGlyph(s,o),this._recordGlyph(h,o)}getTexture(t,e){if(!this._textures[e]){const i=new _(this.width,this.height);i.pixelFormat=6406,i.wrapMode=33071,this._textures[e]=new g(t,i,new Uint8Array(this.width*this.height))}return this._dirties[e]&&(this._textures[e].setData(this._glyphData[e]),this._dirties[e]=!1),this._textures[e]}async getGlyphItems(t,i,s,h){let r,a,o=!1;if(i){const i=this._getGlyphCacheById(s),h=await this.getFace(s),n=this._glyphSDFCreator.sdfSizePx,[c,l,p]=e(t,!1);o=l;const g=new Uint32Array(Array.from(c).map((t,e)=>p.levels[p.targetToSource[e]]));r={baseline:h.baseline()/n,midline:h.midline()/n},a=h.shape(c,g,n).map(t=>this._getMosaicItemComplex(i,t,h))}else{const[i,r,n]=e(t);o=r;const c=this._getGlyphCache(s),l=p(i);await this._fetchRanges(s,l,h),a=l.map(t=>this._getMosaicItem(c,s,t))}return{isRightToLeft:o,glyphs:a,faceInfo:r}}async getFace(e){if(this._faces.has(e))return this._faces.get(e);const i=this._glyphSource.woffURL(e);return await m(this._facePromises,e,async()=>{const h=await t(i,{responseType:"array-buffer"}),r=(await s()).Face.parseWoff2(new Uint8Array(h.data));this._faces.set(e,r)}),this._faces.get(e)}_getMosaicItem(t,e,i){if(!t[i]){const s=this._glyphSource.getGlyph(e,i);if(!s?.metrics)return w(i);const h=this._recordGlyph(s,o),r=this._currentPage,a=s.metrics;t[i]={rect:h,page:r,metrics:a,code:i,sdf:!0},this._invalidate()}return t[i]}_getMosaicItemComplex(t,e,i){if(!t[e.glyphId]){const s=this._glyphSDFCreator.draw(i,e.glyphId),h={width:s?.width??0,height:s?.height??0,left:s?.left??0,top:s?.top??0,advance:e.xAdvance};let a=new c(0,0,0,0);if(s){const t={bitmap:s.buffer,metrics:h};a=this._recordGlyph(t,r)}const o=e.isNewline?10:e.isWhitespace?32:NaN;t[e.glyphId]={rect:a,page:this._currentPage,metrics:h,sdf:!0,code:o}}return t[e.glyphId]}bind(t,e,i,s){const h=this.getTexture(t,i);h.setSamplingMode(e),t.bindTexture(h,s)}preloadASCIIGlyphCache(t){const e=this._preloadCache[t];if(null!=e)return e;const i=this._glyphSource.preloadASCIIRange(t).then(()=>{const e=this._getGlyphCache(t);for(let i=0;i<256;i++)this._getMosaicItem(e,t,i)});return this._preloadCache[t]=i,i}_getGlyphCache(t){return this._glyphCache[t]||(this._glyphCache[t]={}),this._glyphCache[t]}_getGlyphCacheById(t){return this._glyphCacheById[t]||(this._glyphCacheById[t]={}),this._glyphCacheById[t]}_invalidate(){this._dirties[this._currentPage]=!0}async _fetchRanges(t,e,i){const s=y(e),h=[];s.forEach(e=>{h.push(this._fetchRange(t,e,i))}),await Promise.all(h)}async _fetchRange(t,e,i){if(e>d)return;const s=t+e;return m(this._rangePromises,s,()=>this._glyphSource.getRange(t,e,i))}_allocNewPage(){this._dirties[this._currentPage]||(this._glyphData[this._currentPage]=null),this._currentPage=this._glyphData.length,this._glyphData.push(new Uint8Array(this.width*this.height)),this._dirties.push(!0),this._textures.push(null),this._initDecorationGlyphs(),this._binPack=new l(this.width,this.height)}_recordGlyph(t,e){const i=t.metrics;let s;if(0===i.width)s=new c(0,0,0,0);else{const h=i.width+2*e,r=i.height+2*e;s=this._binPack.allocate(h,r),s.isEmpty&&(this._allocNewPage(),s=this._binPack.allocate(h,r));const a=this._glyphData[this._currentPage],o=t.bitmap;let n,c;if(o)for(let t=0;t<r;t++){n=h*t,c=this.width*(s.y+t)+s.x;for(let t=0;t<h;t++)a[c+t]=o[n+t]}has("esri-glyph-debug")&&this._showDebugPage(a)}return s}_showDebugPage(t){const e=document.createElement("canvas"),i=e.getContext("2d"),s=new ImageData(this.width,this.height),h=s.data;e.width=this.width,e.height=this.height,e.style.border="1px solid black";for(let r=0;r<t.length;++r)h[4*r]=t[r],h[4*r+1]=0,h[4*r+2]=0,h[4*r+3]=255;i.putImageData(s,0,0),document.body.appendChild(e)}}export{x as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
const t=1e20;class e{constructor(t){this.sdfSizePx=t.sdfSizePx,this.sdfBufferPx=t.sdfBufferPx,this.radius=t.radius,this.cutoff=t.cutoff;const e=t.sdfSizePx+8*t.sdfBufferPx;this.canvasSize=e;const s=this._createCanvas(e);this.context=s.getContext("2d",{willReadFrequently:!0}),this.context.imageSmoothingEnabled=!1,this.context.fillStyle="black",this.context.strokeStyle="black",this.gridOuter=new Float64Array(e*e),this.gridInner=new Float64Array(e*e),this.gridValues=new Float64Array(e),this.parabolaBoundaries=new Float64Array(e+1),this.parabolaIndices=new Uint16Array(e)}draw(e,s){const{context:i,gridInner:r,gridOuter:a,sdfSizePx:n,sdfBufferPx:o,canvasSize:l,cutoff:c,radius:h}=this;this.context.fillStyle="black",this.context.strokeStyle="black",this.context.clearRect(0,0,l,l);const f=e.paintCurves(s,i,n,o);if(!f)return null;const d=Math.ceil(f.width),u=Math.ceil(f.height),x=f.top,g=f.left;f.free();const w=d+2*o,y=u+2*o,S=new Uint8ClampedArray(Math.max(w*y,0)),b={buffer:S,width:d,height:u,top:x,left:g};if(0===d||0===u)return b;const p=i.getImageData(o,o,d,u);a.fill(t,0,S.length),r.fill(0,0,S.length);for(let P=0;P<u;P++)for(let e=0;e<d;e++){const s=p.data[4*(P*d+e)+3]/255;if(0===s)continue;const i=(P+o)*w+e+o;if(1===s)a[i]=0,r[i]=t;else{const t=.5-s;a[i]=t>0?t*t:0,r[i]=t<0?t*t:0}}this._edt(a,0,0,w,y,w),this._edt(r,0,0,w,y,w);for(let t=0;t<S.length;t++){const e=Math.sqrt(a[t])-Math.sqrt(r[t]);S[t]=Math.round(255-255*(e/h+c))}return b}_createCanvas(t){const e=document.createElement("canvas");return e.width=e.height=t,e}_edt(t,e,s,i,r,a){for(let n=e;n<e+i;n++)this._edt1d(t,s*a+n,a,r);for(let n=s;n<s+r;n++)this._edt1d(t,n*a+e,1,i)}_edt1d(e,s,i,r){const a=this.parabolaIndices,n=this.parabolaBoundaries,o=this.gridValues;a[0]=0,n[0]=-t,n[1]=t,o[0]=e[s];for(let l=1,c=0,h=0;l<r;l++){o[l]=e[s+l*i];const r=l*l;do{const t=a[c];h=(o[l]-o[t]+r-t*t)/(l-t)/2}while(h<=n[c]&&--c>-1);c++,a[c]=l,n[c]=h,n[c+1]=t}for(let t=0,l=0;t<r;t++){for(;n[l+1]<t;)l++;const r=a[l],c=t-r;e[s+t*i]=o[r]+c*c}}}export{e as GlyphSDFCreator};
|