@arcgis/core 5.0.0-next.67 → 5.0.0-next.69
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 +3 -4
- package/WebDocument2D.d.ts +1 -1
- package/WebLinkChart.d.ts +2 -0
- package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +3 -4
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +9 -6
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.js +1 -1
- package/analysis/types.d.ts +1 -0
- package/applications/Components/analysisUtils.d.ts +1 -3
- package/applications/Components/arcadeFeatureUtils.d.ts +1 -1
- package/applications/ExperienceBuilder/sketchUtils.d.ts +2 -2
- package/applications/KnowledgeStudio/reshape.d.ts +2 -2
- package/applications/SceneViewer/sceneViewerUtils.d.ts +11 -0
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- 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/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01d7542d85a453384cf1.js +1 -0
- 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/{168ec8fca2702617a543.js → 09dfec3e097ebbef6a89.js} +1 -1
- package/assets/esri/core/workers/chunks/{942fad4ec96295672ce8.js → 10e474d664b20adcd917.js} +1 -1
- package/assets/esri/core/workers/chunks/12f9a55253084a910b2e.js +1 -0
- package/assets/esri/core/workers/chunks/{0629087bd5bb8048493e.js → 14dedd80fb797303f91f.js} +1 -1
- package/assets/esri/core/workers/chunks/{81d89107ff82604a3ea0.js → 1b445981fbc8373f4dd8.js} +1 -1
- package/assets/esri/core/workers/chunks/{794960ec36e11f4416c2.js → 1d1e25bb61eeeee8ee94.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ba3c2b9f699d94d62b8.js → 1ec1a1997b5577619040.js} +1 -1
- package/assets/esri/core/workers/chunks/2085084324cd5a81783f.js +1 -0
- 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/{6cb44cd319cb6c2539c8.js → 2e2c47f8a80ee9234350.js} +1 -1
- 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/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/{7bed14d9bcd7fc5e2eec.js → 4bcd74951477e8977ba1.js} +1 -1
- package/assets/esri/core/workers/chunks/4c04c54330b693892cfc.js +314 -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/563933a84fc9b0e021f6.js +1 -0
- package/assets/esri/core/workers/chunks/58b3a776ef129f7f86dc.js +1 -0
- package/assets/esri/core/workers/chunks/58e8d41dcc450e6427c9.js +1 -0
- 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/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/{0dc3a04ce717b7ddd957.js → 6c9dac4a869742cc2718.js} +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/75fd2ef1236a9364ca7f.js +1 -0
- package/assets/esri/core/workers/chunks/7be9bbae23895d1cfa92.js +1 -0
- 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/{e5aac523c37d906eece6.js → 827277e5da652bcecaf2.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/{dd99b77a7c0a052507bb.js → 9d88b4ba8e511da64583.js} +3 -3
- package/assets/esri/core/workers/chunks/9f34cf024231f574009c.js +1 -0
- package/assets/esri/core/workers/chunks/{e705d041f6c1632bfbcc.js → a10c6dd3bb8b3602de68.js} +1 -1
- package/assets/esri/core/workers/chunks/a64cd02ca959d511101c.js +1 -0
- 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/{0f8149fdcf0adeca268e.js → b28e0b89603d8b03f9e1.js} +1 -1
- package/assets/esri/core/workers/chunks/b5e4a36784d598ae6679.js +1 -0
- package/assets/esri/core/workers/chunks/{204d738c8b651314ae64.js → b899b4e7979c13b99526.js} +1 -1
- 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/bf05164b7a3e4f31e9db.js +1 -0
- package/assets/esri/core/workers/chunks/c042269586921e337be9.js +1 -0
- package/assets/esri/core/workers/chunks/c7391b0b5a9c916a53f7.js +1 -0
- package/assets/esri/core/workers/chunks/{43d28c6509c21b8917a8.js → ca7523c14d81c470e92e.js} +1 -1
- package/assets/esri/core/workers/chunks/d0ae8752419d5b761190.js +1 -0
- 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/dbfb00fb28b8b9f687a1.js +1 -0
- package/assets/esri/core/workers/chunks/df4a0af329ce94a47a7b.js +1 -0
- package/assets/esri/core/workers/chunks/e071b912539304564b69.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/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/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/{ab71865b94022e78035c.js → f92845eb7df1804fcd6d.js} +1 -1
- package/assets/esri/core/workers/chunks/{bfc063d4431bfa162160.js → fd09f38fb4d99bf34988.js} +1 -1
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +108 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/chunks/GaussianSplatDepthComposition.glsl.js +4 -5
- package/chunks/HUDMaterial.glsl.js +45 -47
- package/chunks/LineMarker.glsl.js +33 -34
- package/chunks/PointRenderer.glsl.js +6 -6
- package/chunks/RibbonLine.glsl.js +62 -54
- package/chunks/boundedPlane.js +1 -1
- package/chunks/libtess-f32.js +1 -1
- package/chunks/libtess-f64.js +1 -1
- package/config.js +1 -1
- package/core/Collection.d.ts +3 -2
- package/core/Identifiable.d.ts +1 -3
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/accessorSupport/types.d.ts +0 -8
- package/core/compilerUtils.js +1 -1
- package/core/promiseUtils.d.ts +1 -1
- package/core/reactiveUtils.d.ts +2 -2
- package/core/typedArrayUtil.js +1 -1
- package/core/units.d.ts +8 -2
- package/core/units.js +1 -1
- package/core/workers/loaderConfig.js +1 -1
- package/editing/sharedTemplates/SharedTemplate.js +1 -1
- package/geometry/HeightModelInfo.d.ts +3 -3
- package/geometry/SpatialReference.d.ts +2 -2
- package/geometry/libtess.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/meshUtils/types.d.ts +2 -2
- package/geometry/support/rotate.js +1 -1
- package/geometry/types.d.ts +2 -0
- package/identity/IdentityManagerBase.d.ts +4 -4
- package/interfaces.d.ts +2937 -2955
- package/kernel.js +1 -1
- package/layers/BaseElevationLayer.d.ts +3 -4
- package/layers/BuildingSceneLayer.d.ts +1 -1
- package/layers/ElevationLayer.d.ts +3 -4
- package/layers/FeatureLayer.d.ts +12 -11
- package/layers/FeatureLayer.js +1 -1
- package/layers/GroupLayer.d.ts +3 -3
- package/layers/ImageryLayer.d.ts +3 -3
- package/layers/ImageryTileLayer.d.ts +3 -4
- package/layers/Layer.d.ts +4 -4
- package/layers/LineOfSightLayer.d.ts +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/MapImageLayer.d.ts +7 -8
- package/layers/MediaLayer.d.ts +3 -3
- package/layers/OrientedImageryLayer.d.ts +3 -3
- package/layers/ParquetLayer.d.ts +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/RouteLayer.d.ts +2 -3
- package/layers/SceneLayer.d.ts +167 -3
- package/layers/SceneLayer.js +1 -1
- package/layers/StreamLayer.d.ts +3 -3
- package/layers/SubtypeGroupLayer.d.ts +3 -3
- package/layers/WCSLayer.d.ts +3 -3
- package/layers/buildingSublayers/BuildingGroupSublayer.d.ts +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.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/graphics/sources/ParquetSource.d.ts +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/layers/mixins/SceneService.d.ts +2 -2
- package/layers/orientedImagery/queries.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.d.ts +2 -2
- package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
- package/layers/orientedImagery/transformations/types.d.ts +1 -1
- package/layers/raster/datasets/pixelReader.d.ts +1 -7
- package/layers/raster/functions/changeDetectionUtils.js +1 -1
- package/layers/raster/functions/creators/createBandIndexFunctions.d.ts +29 -29
- 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/save/featureLayerUtils.js +1 -1
- package/layers/support/BuildingFilterMode.d.ts +3 -1
- package/layers/support/BuildingFilterMode.js +1 -1
- package/layers/support/BuildingFilterModeSolid.js +1 -1
- package/layers/support/BuildingFilterModeWireFrame.js +1 -1
- package/layers/support/BuildingFilterModeXRay.js +1 -1
- package/layers/support/CodedValue.d.ts +1 -1
- package/layers/support/ControlPoint.d.ts +6 -20
- package/layers/support/ControlPointsGeoreference.d.ts +2 -1
- package/layers/support/ElevationSampler.d.ts +2 -2
- package/layers/support/ElevationSampler.js +1 -1
- package/layers/support/FeatureReductionBinning.d.ts +4 -4
- package/layers/support/FeatureReductionBinning.js +1 -1
- package/layers/support/FeatureReductionSelection.d.ts +3 -3
- package/layers/support/FeatureReductionSelection.js +1 -1
- package/layers/support/Field.d.ts +1 -2
- package/layers/support/ParquetGeometryEncodingLocation.d.ts +6 -4
- package/layers/support/ParquetGeometryEncodingLocation.js +1 -1
- package/layers/support/ParquetGeometryEncodingWkb.d.ts +6 -4
- package/layers/support/ParquetGeometryEncodingWkb.js +1 -1
- package/layers/support/PixelBlock.d.ts +11 -3
- package/layers/support/RangeDomain.d.ts +2 -1
- package/layers/support/SceneServiceTimeInfo.js +5 -0
- package/layers/support/SpriteSource.d.ts +1 -0
- package/layers/support/Sublayer.d.ts +17 -16
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/domains.js +1 -1
- package/layers/support/featureReductionUtils.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +30 -30
- package/layers/support/types.d.ts +101 -1
- package/layers/types.d.ts +12 -1
- package/layers/wms/types.d.ts +0 -4
- package/networks/CircuitManager.d.ts +5 -5
- package/networks/Network.d.ts +5 -5
- package/networks/UtilityNetwork.d.ts +2 -2
- package/networks/support/TopologyValidationJobInfo.js +1 -1
- package/networks/support/TraceJobInfo.js +1 -1
- package/package.json +2 -2
- package/popup/content/types.d.ts +1 -3
- package/portal/PortalItem.d.ts +8 -8
- package/portal/PortalItemResource.d.ts +2 -2
- package/portal/PortalUser.d.ts +3 -3
- package/portal/support/resourceUtils.d.ts +3 -3
- package/portal/types.d.ts +6 -6
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/pointCloud/types.d.ts +1 -0
- package/renderers/support/raster/types.d.ts +1 -0
- package/renderers/support/rendererConversion.js +1 -1
- package/renderers/types.d.ts +2 -0
- package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.d.ts +0 -2
- package/rest/layerSources/DynamicDataLayer.d.ts +102 -0
- package/rest/layerSources/DynamicDataLayer.js +5 -0
- package/{layers/support/source/MapLayerSource.d.ts → rest/layerSources/DynamicMapLayer.d.ts} +4 -4
- package/rest/layerSources/DynamicMapLayer.js +5 -0
- package/rest/layerSources/JoinTableDataSource.d.ts +75 -0
- package/rest/layerSources/JoinTableDataSource.js +5 -0
- package/{layers/support/source → rest/layerSources}/QueryTableDataSource.d.ts +8 -7
- package/rest/layerSources/QueryTableDataSource.js +5 -0
- package/{layers/support/source → rest/layerSources}/RasterDataSource.d.ts +2 -2
- package/rest/layerSources/RasterDataSource.js +5 -0
- package/{layers/support/source → rest/layerSources}/TableDataSource.d.ts +2 -2
- package/rest/layerSources/TableDataSource.js +5 -0
- package/rest/layerSources/utils.js +5 -0
- package/rest/print.js +1 -1
- package/rest/query/executeQuery.js +1 -1
- package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
- package/rest/support/JobInfo.js +1 -1
- package/rest/support/Query.js +1 -1
- package/rest/support/RelationshipQuery.js +1 -1
- package/rest/support/ServiceAreaParameters.js +1 -1
- package/rest/support/types.d.ts +0 -4
- package/smartMapping/heuristics/binLevel.d.ts +2 -2
- package/smartMapping/heuristics/scaleRange.d.ts +2 -2
- package/smartMapping/heuristics/sizeRange.d.ts +2 -2
- package/smartMapping/heuristics/sizeRange.js +1 -1
- package/smartMapping/heuristics/types.d.ts +3 -3
- package/smartMapping/labels/bins.d.ts +2 -2
- package/smartMapping/labels/clusters.d.ts +2 -2
- package/smartMapping/renderers/color.d.ts +14 -14
- package/smartMapping/renderers/dotDensity.d.ts +2 -2
- package/smartMapping/renderers/heatmap.d.ts +4 -4
- package/smartMapping/renderers/location.d.ts +2 -2
- package/smartMapping/renderers/opacity.d.ts +2 -2
- package/smartMapping/renderers/pieChart.d.ts +4 -4
- package/smartMapping/renderers/predominance.d.ts +2 -2
- package/smartMapping/renderers/relationship.d.ts +4 -4
- package/smartMapping/renderers/size.d.ts +15 -15
- package/smartMapping/renderers/support/rendererUtils.d.ts +2 -2
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/renderers/type.d.ts +4 -4
- package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
- package/smartMapping/statistics/classBreaks.d.ts +2 -2
- package/smartMapping/statistics/heatmapStatistics.d.ts +2 -2
- package/smartMapping/statistics/histogram.d.ts +2 -2
- package/smartMapping/statistics/predominantCategories.d.ts +2 -2
- package/smartMapping/statistics/summaryStatistics.d.ts +2 -2
- package/smartMapping/statistics/summaryStatisticsForAge.d.ts +2 -2
- package/smartMapping/statistics/support/ageUtils.d.ts +2 -2
- package/smartMapping/statistics/support/statsWorker.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/statistics/types.d.ts +7 -7
- package/smartMapping/statistics/uniqueValues.d.ts +2 -2
- 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/utils.js +1 -1
- package/smartMapping/symbology/color.d.ts +8 -8
- package/smartMapping/symbology/dotDensity.d.ts +6 -6
- package/smartMapping/symbology/flow.d.ts +6 -6
- package/smartMapping/symbology/heatmap.d.ts +6 -6
- package/smartMapping/symbology/location.d.ts +2 -2
- package/smartMapping/symbology/pieChart.d.ts +6 -6
- package/smartMapping/symbology/predominance.d.ts +6 -6
- package/smartMapping/symbology/relationship.d.ts +6 -6
- package/smartMapping/symbology/size.d.ts +2 -2
- package/smartMapping/symbology/support/colorRamps.d.ts +2 -2
- package/smartMapping/symbology/type.d.ts +6 -6
- package/support/popupUtils.d.ts +2 -2
- package/support/revision.js +1 -1
- package/symbols/LineSymbol3D.d.ts +2 -2
- package/symbols/PointSymbol3D.d.ts +2 -2
- package/symbols/PolygonSymbol3D.d.ts +2 -2
- package/symbols/patterns/LinePattern3D.d.ts +8 -0
- package/symbols/patterns/LineStylePattern3D.d.ts +1 -2
- package/symbols/patterns/Pattern3D.d.ts +9 -0
- package/symbols/patterns/StylePattern3D.d.ts +1 -2
- 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/symbols/types.d.ts +7 -0
- package/unionTypes.d.ts +13 -13
- 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/analysis/types.d.ts +1 -0
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/webgl/TextureUploadManager.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.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 +0 -5
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/support/MediaLayerInteractionOptions.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/LineOfSightAnalysisView3D.d.ts +0 -2
- 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/analysis/types.d.ts +1 -0
- 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/environment/SunLighting.d.ts +1 -3
- 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/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.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/MediaLayerInteractionOptions.d.ts +4 -0
- 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/QualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.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/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.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/Material/ComponentData.glsl.js +8 -8
- package/views/3d/webgl-engine/collections/Component/Transform.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/shading/PositionOutsideClipSpace.js +5 -0
- 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/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/LocalOriginManager.js +1 -1
- package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/LegacyTransform.js +5 -0
- 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/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.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/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- 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/analysis/types.d.ts +4 -0
- package/views/draw/Draw.js +1 -1
- package/views/input/ViewEvents.js +1 -1
- package/views/input/types.d.ts +2 -4
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.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/CatalogLayerView.d.ts +1 -4
- package/views/layers/DimensionLayerView.d.ts +4 -6
- package/views/layers/DimensionLayerViewMixin.d.ts +0 -97
- package/views/layers/LineOfSightLayerView.d.ts +4 -6
- package/views/layers/LineOfSightLayerViewMixin.d.ts +0 -77
- package/views/layers/StreamLayerView.d.ts +31 -2
- package/views/support/PromiseQueue.js +1 -1
- package/views/support/WebAssemblyRequirements.js +5 -0
- package/views/support/WebGLRequirements.js +1 -1
- package/views/support/screenUtils.js +1 -1
- package/views/support/screenshotUtils.js +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/support/SlideThumbnail.d.ts +6 -3
- package/webdoc/support/SlideThumbnail.js +1 -1
- package/webscene/Slide.d.ts +2 -2
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +2 -2
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +2 -2
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/BatchAttributeForm/inputs/TextElementInput.d.ts +7 -0
- package/widgets/BatchAttributeForm/inputs/TextElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/textInputElementUtils.js +5 -0
- package/widgets/BatchAttributeForm/templates/TextElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +2 -2
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/Directions/DirectionsViewModel.d.ts +20 -4
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.d.ts +2 -3
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +2 -2
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -2
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +2 -2
- package/widgets/ElevationProfile/support/HoveredPoints.js +1 -1
- package/widgets/ElevationProfile/types.d.ts +3 -4
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/Feature/types.d.ts +1 -5
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/Grid/types.d.ts +0 -2
- package/widgets/FeatureTable/support/types.d.ts +8 -8
- package/widgets/Features/FeaturesViewModel.d.ts +3 -3
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.d.ts +2 -2
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/Popup/types.d.ts +0 -2
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +2 -0
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/OperationHandle.js +1 -1
- package/widgets/Sketch/types.d.ts +2 -2
- package/widgets/Slice/SliceViewModel.d.ts +2 -2
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Spinner/SpinnerViewModel.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/support/AnalysisViewModelMixin.js +5 -0
- package/widgets/support/AnchorElementViewModel.js +1 -1
- package/widgets/support/InteractiveToolViewModelMixin.js +5 -0
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/055fdc5134d54174444d.js +0 -316
- package/assets/esri/core/workers/chunks/058fb2cd6387acfd458c.js +0 -1
- package/assets/esri/core/workers/chunks/08359ae020238a565955.js +0 -1
- package/assets/esri/core/workers/chunks/0ae018098906d6a88904.js +0 -1
- package/assets/esri/core/workers/chunks/0cd3acfbf9ee991bdab4.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/119822a646834c1cebc0.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/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/2402d305a77fef4694a0.js +0 -1
- package/assets/esri/core/workers/chunks/27f096c434f049b8df01.js +0 -1
- package/assets/esri/core/workers/chunks/3371935a4fd6346d3a17.js +0 -1
- package/assets/esri/core/workers/chunks/3c3d311b88f5400951ef.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/4773a358832f87963766.js +0 -1
- package/assets/esri/core/workers/chunks/492515860198f38dd698.js +0 -1
- package/assets/esri/core/workers/chunks/4f33a2ecb154a2c2449c.js +0 -1
- package/assets/esri/core/workers/chunks/4f6f181ee83b4d484518.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/600e2e6b51e2fb9c598c.js +0 -1
- package/assets/esri/core/workers/chunks/62b28f73f814413c10fc.js +0 -1
- package/assets/esri/core/workers/chunks/63b8cd7d5cafbaeed894.js +0 -1
- package/assets/esri/core/workers/chunks/6925f09d44cc38480d53.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/990341f7c47bd656c782.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/b25a131c04092c3ab75d.js +0 -1
- package/assets/esri/core/workers/chunks/b7960ab9a9da7f88184c.js +0 -1
- package/assets/esri/core/workers/chunks/b9909264cfea68d5f2a1.js +0 -1
- package/assets/esri/core/workers/chunks/ba7f57788847cc0f68df.js +0 -1
- package/assets/esri/core/workers/chunks/bb08359610a41e304b55.js +0 -1
- package/assets/esri/core/workers/chunks/bf06250be7a7a36306b1.js +0 -1
- package/assets/esri/core/workers/chunks/bfbbcaa1fb04f17fc869.js +0 -1
- package/assets/esri/core/workers/chunks/d30cfc5fa302cc08d862.js +0 -1
- package/assets/esri/core/workers/chunks/d75adfd4acb3c92accc9.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/e4ba850e8344ac2c5fc0.js +0 -1
- package/assets/esri/core/workers/chunks/f7d93aae350796b88562.js +0 -1
- package/assets/esri/core/workers/chunks/f9370830051865a3435b.js +0 -1
- package/layers/mixins/TemporalSceneLayer.d.ts +0 -177
- package/layers/mixins/TemporalSceneLayer.js +0 -5
- package/layers/mixins/properties/ILayerWithSave.d.ts +0 -11
- package/layers/support/ContingencyConstraintViolation.d.ts +0 -2
- package/layers/support/ContingentValue.d.ts +0 -2
- package/layers/support/ContingentValuesResult.d.ts +0 -2
- package/layers/support/ElevationQuery.d.ts +0 -35
- package/layers/support/ElevationQueryContext.d.ts +0 -37
- package/layers/support/FeatureReduction.d.ts +0 -3
- package/layers/support/FeatureReduction.js +0 -5
- package/layers/support/FieldGroup.d.ts +0 -2
- package/layers/support/FieldValueType.d.ts +0 -2
- package/layers/support/I3SLayer.d.ts +0 -9
- package/layers/support/ParquetGeometryEncodingBase.d.ts +0 -9
- package/layers/support/ParquetGeometryEncodingBase.js +0 -5
- package/layers/support/SimpleBandStatistics.d.ts +0 -10
- package/layers/support/source/DataLayerSource.d.ts +0 -171
- package/layers/support/source/DataLayerSource.js +0 -5
- package/layers/support/source/MapLayerSource.js +0 -5
- package/layers/support/source/QueryTableDataSource.js +0 -5
- package/layers/support/source/RasterDataSource.js +0 -5
- package/layers/support/source/TableDataSource.js +0 -5
- package/layers/support/source/types.d.ts +0 -4
- package/views/2d/layers/features/FeaturePipelineWorkerProxy.d.ts +0 -32
- package/views/3d/webgl-engine/shaders/GaussianSplatColorTechnique.js +0 -5
- package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +0 -5
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +0 -5
- package/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +0 -5
- package/widgets/support/AnalysisViewModel.d.ts +0 -5
- package/widgets/support/AnalysisViewModel.js +0 -5
- package/widgets/support/AnchorElementViewModel.d.ts +0 -3
- package/widgets/support/InteractiveToolViewModel.d.ts +0 -4
- package/widgets/support/InteractiveToolViewModel.js +0 -5
- /package/webdoc/support/{thumbnailUtils.d.ts → types.d.ts} +0 -0
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../core/has.js";import e from"../../../../core/Error.js";import{translate as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as r,create as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as s,scale as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as o,fromArray as n,clone as l}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{h}from"../../../../chunks/vec32.js";import{fromArray as c,create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as m}from"../../../../geometry/projection/projectBuffer.js";import{create as f,fromSubBuffer as d,intersectsClippingArea as u}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as g,doubleArrayFrom as _}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as b}from"../../../../geometry/support/FloatArray.js";import{needsElevationUpdates3D as y,evaluateElevationAlignmentAtPoint as v,SampleElevationInfo as w}from"./elevationAlignmentUtils.js";import{Graphics3DObject3DGraphicLayer as x}from"./Graphics3DObject3DGraphicLayer.js";import{pathNumRoundJoinSubdivisions as S,pathNumRoundCapExtrusionSubdivisions as C}from"./Graphics3DPathSymbolLayerConstants.js";import{Graphics3DSymbolLayer as P,nanFallbackColor as D}from"./Graphics3DSymbolLayer.js";import{isValidSize as j}from"./graphicUtils.js";import{ConvertOptions as V,initFastSymbolUpdatesState as U,updateFastSymbolUpdatesState as A,getAttributeValue as z}from"../support/FastSymbolUpdates.js";import{SamplePosition as E}from"../../support/ElevationProvider.js";import{Object3D as R}from"../../webgl-engine/lib/Object3D.js";import{Path as k}from"../../webgl-engine/lib/Path.js";import{PathBuilder as L}from"../../webgl-engine/lib/PathBuilder.js";import{RoundCapBuilder as G,TriangulationCapBuilder as O,NoCapBuilder as I}from"../../webgl-engine/lib/PathCapBuilder.js";import{SimpleExtruder as B,MiterExtruder as F}from"../../webgl-engine/lib/PathExtruder.js";import{PathGeometry as M,isPathGeometry as T}from"../../webgl-engine/lib/PathGeometry.js";import{FastUpdatePathGeometry as q,StaticPathGeometry as H}from"../../webgl-engine/lib/PathGeometryData.js";import{computeMinimumRotationTangentFrame as N}from"../../webgl-engine/lib/pathGeometryUtils.js";import{quadProfiles as W,circleProfiles as Z}from"../../webgl-engine/lib/PathProfile.js";import{newPathVertex as J}from"../../webgl-engine/lib/PathVertex.js";import{DefaultMaterial as K}from"../../webgl-engine/materials/DefaultMaterial.js";import{PathMaterial as Q}from"../../webgl-engine/materials/PathMaterial.js";const X=["polyline"];class Y extends P{constructor(e,t,r,i){super(e,t,r,i,ie(t)),this._intrinsicSize=o(1,1),this._upVectorAlignment=1,this._stencilWidth=.1,this.ensureDrapedStatus(!1)}async doLoad(){const t=this.symbolLayer,r=null!=t.width?t.width:t.height,i=null!=t.height?t.height:r;this._vvConvertOptions=new V({supports:{size:!0,color:!0,rotation:!1,opacity:!0},modelSize:[1,1,1],symbolSize:[r,1,i],unitInMeters:this._context.renderCoordsHelper.unitInMeters,fallbackColor:this._getFallbackOpacityAndColor(D),fallbackSize:[r,1,i]});const o=this._context.renderer?.visualVariables;this._fastUpdates=o?.length?U(this._context.renderer,this._vvConvertOptions):null;const l=t.anchor||"center";this._upVectorAlignment="heading"===t.profileRotation?0:1;const h=t.profile||"circle";switch(h){default:case"circle":this._profile=Z[l];break;case"quad":this._profile=W[l]}switch(t.join){case"round":this._extruder=new F(0,S);break;case"bevel":this._extruder=new F(0,1);break;case"miter":this._extruder=new F(.8*Math.PI,1);break;default:this._extruder=new B}switch(this._cap){case"none":this._startCap=new I,this._endCap=new I;break;case"butt":default:this._startCap=new O(this._profile,0),this._endCap=new O(this._profile,0,!0);break;case"square":this._startCap=new O(this._profile,-.5),this._endCap=new O(this._profile,.5,!0);break;case"round":{const e="quad"===h;this._startCap=new G({profile:this._profile,flip:!1,breakNormals:e,subdivisions:C}),this._endCap=new G({profile:this._profile,flip:!0,breakNormals:e,subdivisions:C});break}}const p=this._materialColor,m=this._getCombinedOpacityAndColor(p),f=c(m),d=m[3],u=this.needsDrivenTransparentPass,g=t.material?.emissive,_={diffuse:f,ambient:f,emissiveStrengthFromSymbol:g?.strength??0,emissiveSource:1,opacity:d,drivenOpacity:u,hasVertexColors:!1,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:this.symbolLayer.castShadows,offsetTransparentBackfaces:!0};if(!this._drivenProperties.size&&(s(this._intrinsicSize,r,i),!j(this._intrinsicSize[0])||!j(this._intrinsicSize[1])))throw new e("graphics3dpathsymbollayer:invalid-size","Symbol sizes may not be negative values");let b;this._fastUpdates?.visualVariables.size||a(this._intrinsicSize,this._intrinsicSize,1/this._context.renderCoordsHelper.unitInMeters),this._fastUpdates?b=new Q({..._,...this._fastUpdates.materialParameters,size:n(this._intrinsicSize)},this._context):(_.hasVertexColors=this._drivenProperties.color||this._drivenProperties.opacity,_.normalType=1,b=new K(_,this._context)),b.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),this._materials[0]=b,this._updateTransparentDepedentMaterialParameters()}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,X,this.symbolLayer.type))return null;const r=this.createElevationContextForGraphic(t);return this._createAs3DShape(e,r)}layerOpacityChanged(){const e=this._materialColor,t=this._getCombinedOpacity(e),r=this._materials[0];r&&(r.setParameters({opacity:t}),this._updateTransparentDepedentMaterialParameters())}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,y)}slicePlaneEnabledChanged(){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),!0}physicalBasedRenderingChanged(){return this._materials[0]?.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),!0}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return 0;if(!A(this._fastUpdates,t,this._vvConvertOptions))return 0;this._materials[0]?.setParameters(this._fastUpdates.materialParameters)}return 2}_getVertexData(e){let t=0;const r=e.paths,i=[],s=e.spatialReference,a=this._context.elevationProvider.spatialReference,o=this._context.renderCoordsHelper.spatialReference;for(const c of r)t+=c.length;const n=g(3*t);let l,h=0;for(const c of r){i.push({offset:h,numVertices:c.length});for(const t of c)n[h++]=t[0],n[h++]=t[1],n[h++]=e.hasZ?t[2]:0}return null==a||s.equals(a)||m(n,s,0,n,a,0,t)?(null==a||a.equals(o)?l=_(n):(l=g(3*t),m(n,a,0,l,o,0,t)),{pathVertexDataInfos:i,vertexDataES:n,vertexDataRS:l}):null}_createAs3DShape(e,s){const{graphic:a,renderingInfo:o}=e,n=a.geometry,c=this._getVertexData(n);if(null==c)return this.logger.warn("PathSymbol3DLayer geometry failed to be created (failed to project geometry to view spatial reference)"),null;if(0===c.pathVertexDataInfos.length)return 0!==n.paths.length&&n.paths.some(e=>e.length>0)||this.logger.warn("PathSymbol3DLayer geometry failed to be created (no paths were defined)"),null;const p=new Array,m=n.spatialReference,g=f(),_=this._context.renderCoordsHelper,w=new E(c.vertexDataES),S=a.uid,C=b(c.vertexDataRS.length);for(const f of c.pathVertexDataInfos){const e=f.numVertices;if(e<2)continue;const n=f.offset;if(null!=this._context.clippingExtent&&(d(c.vertexDataES,n,e,g),!u(g,this._context.clippingExtent)))continue;const b=new Array,y=n+3*e;for(let t=n;t<y;t+=3){w.offset=t;const e=v(w,this._context.elevationProvider,s,_);h(se,c.vertexDataRS[t],c.vertexDataRS[t+1],c.vertexDataRS[t+2]),_.setAltitude(se,e),c.vertexDataRS[t]=se[0],c.vertexDataRS[t+1]=se[1],c.vertexDataRS[t+2]=se[2],b.push(J(this._upVectorAlignment))}const x=new k(b,c.vertexDataES,c.vertexDataRS,n,C);$(x,this._upVectorAlignment,this._context.renderCoordsHelper);const P=new L(x,this._profile,this._extruder,this._startCap,this._endCap);let D=null;if(this._fastUpdates){const e=this._fastUpdates.visualVariables,t=z(e.size?.field,a),r=z(e.color?.field,a),i=z(e.opacity?.field,a);D=new q(P,t,r,i)}else{const e=l(this._intrinsicSize);if(this._drivenProperties.size){const t=o.size??["symbol-value","symbol-value","symbol-value"];e[0]*=ee(t[0],"symbol-value"===t[2]?this.symbolLayer.height||0:t[2],this.symbolLayer.width||0),e[1]*=ee(t[2],"symbol-value"===t[0]?this.symbolLayer.width||0:t[0],this.symbolLayer.height||0)}const t=new H(P);t.bake(e);const r=this._getDrivenColor(o);r&&t.bakeVertexColors(r),D=t}const j=D.createGeometryData(),V=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:S,layerViewUid:this._context.layerViewUid}),U=new M(this._materials[0],j,D,m,this._stencilWidth,V);U.transformation=t(i(),r,P.path.origin),p.push(U)}if(0===p.length)return null;const P=new R({geometries:p,layerViewUid:this._context.layerViewUid,graphicUid:S}),D=new x(this,P,null,(e,t,r,i,s)=>re(e,t,i,s,this._upVectorAlignment),s,null);return D.alignedSampledElevation=0,D.needsElevationUpdates=y(s.mode),D}_getDrivenColor(e){return this._hasDrivenColorOrOpacity?this._getDrivenUInt8ColorWithNaNSupport(e,this._materialColor,!1):null}get _materialColor(){return this.symbolLayer.material?.color}_getFallbackOpacityAndColor(e){return this._materialColor?.toUnitRGBA()??e}get _cap(){return this.symbolLayer.cap||"butt"}_updateTransparentDepedentMaterialParameters(){const e=this._materials[0];e&&e.setParameters({cullFace:e.transparent||"none"===this._cap?0:2})}}function $(e,t,r){const{origin:i,positions:s}=e;let a=e.offset;switch(t){default:case 0:for(const t of e.vertices)se[0]=s[a++]+i[0],se[1]=s[a++]+i[1],se[2]=s[a++]+i[2],r.worldUpAtPosition(se,se),t.setFrameFromUpVector(se);break;case 1:se[0]=s[a]+i[0],se[1]=s[a+1]+i[1],se[2]=s[a+2]+i[2],r.worldUpAtPosition(se,se),N(e,se)}}function ee(e,t,r){switch(e){case"symbol-value":return r;case"proportional":return t;default:return e}}function te(e,t,r,i){let s=0;const{origin:a,vertices:o,positions:n,positionsES:l}=e,c=e.offset+3*o.length;for(let p=e.offset;p<c;p+=3)h(se,l[p],l[p+1],l[p+2]),r(se,ae),s+=ae.sampledElevation,se[0]=n[p]+a[0],se[1]=n[p+1]+a[1],se[2]=n[p+2]+a[2],i.setAltitude(se,ae.z),n[p]=se[0]-a[0],n[p+1]=se[1]-a[1],n[p+2]=se[2]-a[2];return e.updatePathVertexInformation(),s/o.length}function re(e,t,r,i,s){const a=e.stageObject,o=a.geometries;let n=0;for(const l of o){if(!T(l))continue;const e=l.path,o=e.builder.path;n+=te(o,t,r,i),0!==s&&$(o,s,i),e.onPathChanged(l),l.invalidateBoundingInfo(),a.geometryVertexAttributeUpdated(l,"position")}return n/o.length}function ie(e){return 1===(e.material?.color?.a??0)}const se=p(),ae=new w;export{Y as Graphics3DPathSymbolLayer};
|
|
5
|
+
import e from"../../../../core/Error.js";import{translate as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as r,create as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as s,scale as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as o,fromArray as n,clone as l}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{h}from"../../../../chunks/vec32.js";import{fromArray as c,create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as m}from"../../../../geometry/projection/projectBuffer.js";import{create as f,fromSubBuffer as d,intersectsClippingArea as u}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as g,doubleArrayFrom as _}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as b}from"../../../../geometry/support/FloatArray.js";import{needsElevationUpdates3D as y,evaluateElevationAlignmentAtPoint as v,SampleElevationInfo as w}from"./elevationAlignmentUtils.js";import{Graphics3DObject3DGraphicLayer as x}from"./Graphics3DObject3DGraphicLayer.js";import{pathNumRoundJoinSubdivisions as S,pathNumRoundCapExtrusionSubdivisions as C}from"./Graphics3DPathSymbolLayerConstants.js";import{Graphics3DSymbolLayer as P,nanFallbackColor as D}from"./Graphics3DSymbolLayer.js";import{isValidSize as j}from"./graphicUtils.js";import{ConvertOptions as V,initFastSymbolUpdatesState as U,updateFastSymbolUpdatesState as A,getAttributeValue as z}from"../support/FastSymbolUpdates.js";import{SamplePosition as E}from"../../support/ElevationProvider.js";import{Object3D as R}from"../../webgl-engine/lib/Object3D.js";import{Path as k}from"../../webgl-engine/lib/Path.js";import{PathBuilder as L}from"../../webgl-engine/lib/PathBuilder.js";import{RoundCapBuilder as G,TriangulationCapBuilder as O,NoCapBuilder as I}from"../../webgl-engine/lib/PathCapBuilder.js";import{SimpleExtruder as B,MiterExtruder as F}from"../../webgl-engine/lib/PathExtruder.js";import{PathGeometry as M,isPathGeometry as T}from"../../webgl-engine/lib/PathGeometry.js";import{FastUpdatePathGeometry as q,StaticPathGeometry as H}from"../../webgl-engine/lib/PathGeometryData.js";import{computeMinimumRotationTangentFrame as N}from"../../webgl-engine/lib/pathGeometryUtils.js";import{quadProfiles as W,circleProfiles as Z}from"../../webgl-engine/lib/PathProfile.js";import{newPathVertex as J}from"../../webgl-engine/lib/PathVertex.js";import{DefaultMaterial as K}from"../../webgl-engine/materials/DefaultMaterial.js";import{PathMaterial as Q}from"../../webgl-engine/materials/PathMaterial.js";const X=["polyline"];class Y extends P{constructor(e,t,r,i){super(e,t,r,i,ie(t)),this._intrinsicSize=o(1,1),this._upVectorAlignment=1,this._stencilWidth=.1,this.ensureDrapedStatus(!1)}async doLoad(){const t=this.symbolLayer,r=null!=t.width?t.width:t.height,i=null!=t.height?t.height:r;this._vvConvertOptions=new V({supports:{size:!0,color:!0,rotation:!1,opacity:!0},modelSize:[1,1,1],symbolSize:[r,1,i],unitInMeters:this._context.renderCoordsHelper.unitInMeters,fallbackColor:this._getFallbackOpacityAndColor(D),fallbackSize:[r,1,i]});const o=this._context.renderer?.visualVariables;this._fastUpdates=o?.length?U(this._context.renderer,this._vvConvertOptions):null;const l=t.anchor||"center";this._upVectorAlignment="heading"===t.profileRotation?0:1;const h=t.profile||"circle";switch(h){default:case"circle":this._profile=Z[l];break;case"quad":this._profile=W[l]}switch(t.join){case"round":this._extruder=new F(0,S);break;case"bevel":this._extruder=new F(0,1);break;case"miter":this._extruder=new F(.8*Math.PI,1);break;default:this._extruder=new B}switch(this._cap){case"none":this._startCap=new I,this._endCap=new I;break;case"butt":default:this._startCap=new O(this._profile,0),this._endCap=new O(this._profile,0,!0);break;case"square":this._startCap=new O(this._profile,-.5),this._endCap=new O(this._profile,.5,!0);break;case"round":{const e="quad"===h;this._startCap=new G({profile:this._profile,flip:!1,breakNormals:e,subdivisions:C}),this._endCap=new G({profile:this._profile,flip:!0,breakNormals:e,subdivisions:C});break}}const p=this._materialColor,m=this._getCombinedOpacityAndColor(p),f=c(m),d=m[3],u=this.needsDrivenTransparentPass,g=t.material?.emissive,_={diffuse:f,ambient:f,emissiveStrengthFromSymbol:g?.strength??0,emissiveSource:1,opacity:d,drivenOpacity:u,hasVertexColors:!1,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:this.symbolLayer.castShadows,offsetTransparentBackfaces:!0};if(!this._drivenProperties.size&&(s(this._intrinsicSize,r,i),!j(this._intrinsicSize[0])||!j(this._intrinsicSize[1])))throw new e("graphics3dpathsymbollayer:invalid-size","Symbol sizes may not be negative values");let b;this._fastUpdates?.visualVariables.size||a(this._intrinsicSize,this._intrinsicSize,1/this._context.renderCoordsHelper.unitInMeters),this._fastUpdates?b=new Q({..._,...this._fastUpdates.materialParameters,size:n(this._intrinsicSize)},this._context):(_.hasVertexColors=this._drivenProperties.color||this._drivenProperties.opacity,_.normalType=1,b=new K(_,this._context)),b.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),this._materials[0]=b,this._updateTransparentDepedentMaterialParameters()}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,X,this.symbolLayer.type))return null;const r=this.createElevationContextForGraphic(t);return this._createAs3DShape(e,r)}layerOpacityChanged(){const e=this._materialColor,t=this._getCombinedOpacity(e),r=this._materials[0];r&&(r.setParameters({opacity:t}),this._updateTransparentDepedentMaterialParameters())}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,y)}slicePlaneEnabledChanged(){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),!0}physicalBasedRenderingChanged(){return this._materials[0]?.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),!0}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return 0;if(!A(this._fastUpdates,t,this._vvConvertOptions))return 0;this._materials[0]?.setParameters(this._fastUpdates.materialParameters)}return 2}_getVertexData(e){let t=0;const r=e.paths,i=[],s=e.spatialReference,a=this._context.elevationProvider.spatialReference,o=this._context.renderCoordsHelper.spatialReference;for(const c of r)t+=c.length;const n=g(3*t);let l,h=0;for(const c of r){i.push({offset:h,numVertices:c.length});for(const t of c)n[h++]=t[0],n[h++]=t[1],n[h++]=e.hasZ?t[2]:0}return null==a||s.equals(a)||m(n,s,0,n,a,0,t)?(null==a||a.equals(o)?l=_(n):(l=g(3*t),m(n,a,0,l,o,0,t)),{pathVertexDataInfos:i,vertexDataES:n,vertexDataRS:l}):null}_createAs3DShape(e,s){const{graphic:a,renderingInfo:o}=e,n=a.geometry,c=this._getVertexData(n);if(null==c)return this.logger.warn("PathSymbol3DLayer geometry failed to be created (failed to project geometry to view spatial reference)"),null;if(0===c.pathVertexDataInfos.length)return 0!==n.paths.length&&n.paths.some(e=>e.length>0)||this.logger.warn("PathSymbol3DLayer geometry failed to be created (no paths were defined)"),null;const p=new Array,m=n.spatialReference,g=f(),_=this._context.renderCoordsHelper,w=new E(c.vertexDataES),S=a.uid,C=b(c.vertexDataRS.length);for(const f of c.pathVertexDataInfos){const e=f.numVertices;if(e<2)continue;const n=f.offset;if(null!=this._context.clippingExtent&&(d(c.vertexDataES,n,e,g),!u(g,this._context.clippingExtent)))continue;const b=new Array,y=n+3*e;for(let t=n;t<y;t+=3){w.offset=t;const e=v(w,this._context.elevationProvider,s,_);h(se,c.vertexDataRS[t],c.vertexDataRS[t+1],c.vertexDataRS[t+2]),_.setAltitude(se,e),c.vertexDataRS[t]=se[0],c.vertexDataRS[t+1]=se[1],c.vertexDataRS[t+2]=se[2],b.push(J(this._upVectorAlignment))}const x=new k(b,c.vertexDataES,c.vertexDataRS,n,C);$(x,this._upVectorAlignment,this._context.renderCoordsHelper);const P=new L(x,this._profile,this._extruder,this._startCap,this._endCap);let D=null;if(this._fastUpdates){const e=this._fastUpdates.visualVariables,t=z(e.size?.field,a),r=z(e.color?.field,a),i=z(e.opacity?.field,a);D=new q(P,t,r,i)}else{const e=l(this._intrinsicSize);if(this._drivenProperties.size){const t=o.size??["symbol-value","symbol-value","symbol-value"];e[0]*=ee(t[0],"symbol-value"===t[2]?this.symbolLayer.height||0:t[2],this.symbolLayer.width||0),e[1]*=ee(t[2],"symbol-value"===t[0]?this.symbolLayer.width||0:t[0],this.symbolLayer.height||0)}const t=new H(P);t.bake(e);const r=this._getDrivenColor(o);r&&t.bakeVertexColors(r),D=t}const j=D.createGeometryData(),V=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:S,layerViewUid:this._context.layerViewUid}),U=new M(this._materials[0],j,D,m,this._stencilWidth,V);U.transformation=t(i(),r,P.path.origin),p.push(U)}if(0===p.length)return null;const P=new R({geometries:p,layerViewUid:this._context.layerViewUid,graphicUid:S}),D=new x(this,P,null,(e,t,r,i,s)=>re(e,t,i,s,this._upVectorAlignment),s,null);return D.alignedSampledElevation=0,D.needsElevationUpdates=y(s.mode),D}_getDrivenColor(e){return this._hasDrivenColorOrOpacity?this._getDrivenUInt8ColorWithNaNSupport(e,this._materialColor,!1):null}get _materialColor(){return this.symbolLayer.material?.color}_getFallbackOpacityAndColor(e){return this._materialColor?.toUnitRGBA()??e}get _cap(){return this.symbolLayer.cap||"butt"}_updateTransparentDepedentMaterialParameters(){const e=this._materials[0];e&&e.setParameters({cullFace:e.transparent||"none"===this._cap?0:2})}}function $(e,t,r){const{origin:i,positions:s}=e;let a=e.offset;switch(t){default:case 0:for(const t of e.vertices)se[0]=s[a++]+i[0],se[1]=s[a++]+i[1],se[2]=s[a++]+i[2],r.worldUpAtPosition(se,se),t.setFrameFromUpVector(se);break;case 1:se[0]=s[a]+i[0],se[1]=s[a+1]+i[1],se[2]=s[a+2]+i[2],r.worldUpAtPosition(se,se),N(e,se)}}function ee(e,t,r){switch(e){case"symbol-value":return r;case"proportional":return t;default:return e}}function te(e,t,r,i){let s=0;const{origin:a,vertices:o,positions:n,positionsES:l}=e,c=e.offset+3*o.length;for(let p=e.offset;p<c;p+=3)h(se,l[p],l[p+1],l[p+2]),r(se,ae),s+=ae.sampledElevation,se[0]=n[p]+a[0],se[1]=n[p+1]+a[1],se[2]=n[p+2]+a[2],i.setAltitude(se,ae.z),n[p]=se[0]-a[0],n[p+1]=se[1]-a[1],n[p+2]=se[2]-a[2];return e.updatePathVertexInformation(),s/o.length}function re(e,t,r,i,s){const a=e.stageObject,o=a.geometries;let n=0;for(const l of o){if(!T(l))continue;const e=l.path,o=e.builder.path;n+=te(o,t,r,i),0!==s&&$(o,s,i),e.onPathChanged(l),l.invalidateBoundingInfo(),a.geometryVertexAttributeUpdated(l,"position")}return n/o.length}function ie(e){return 1===(e.material?.color?.a??0)}const se=p(),ae=new w;export{Y as Graphics3DPathSymbolLayer};
|
|
@@ -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 e from"../../../../core/Logger.js";import{ONES as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{f as r,s as i}from"../../../../chunks/vec42.js";import{fromValues as o,ONES as n,ZEROS as s,fromArray as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{closeRings as l}from"../../../../geometry/support/coordsUtils.js";import{defaultSymbolLayerComplexity as p}from"./defaultSymbolComplexity.js";import{ElevationContext as c}from"./ElevationContext.js";import{zeroContext as d}from"./featureExpressionInfoUtils.js";import{mixinColorAndOpacity as h}from"./graphicUtils.js";import{Loadable as u}from"./Loadable.js";import{getAttributeValue as y}from"../support/FastSymbolUpdates.js";import{encodeNaNUInt8 as f}from"../support/symbolColorUtils.js";const g=()=>e.getLogger("esri.views.3d.layers.graphics.Graphics3DSymbolLayer");class v extends u{constructor(e,t,r,i,o=!0){super(r.schedule),this.symbol=e,this.symbolLayer=t,this._context=r,this._drivenOpacityFallbackAlwaysOpaque=o,this.ignoreDrivers=!1,this._drivenProperties={color:!1,opacity:!1,opacityAlwaysOpaque:!0,size:!1,rotation:!1},this._materials=[],this.logger=g(),this._elevationOptions={supportsOffsetAdjustment:!1,supportsOnTheGround:!0},this.skipHighSymbolLodsChanged=!0,this._renderPriority=i.renderPriority,this._renderPriorityStep=i.renderPriorityStep,this._elevationContext=new c,this.updateComplexity(),this.ignoreDrivers=i.ignoreDrivers,this.ignoreDrivers||(this._drivenProperties=m(this._context.renderer,o)),this._updateElevationContext()}destroy(){this.complexity=null,this._materials.length=0,super.destroy()}get view(){return this._context.stage.view}getCachedSize(){return null}get extentPadding(){return 0}get materials(){return this._materials}get estimatedMemory(){const{complexity:e}=this;if(null==e)return 0;return(this.draped?e.memory.draped:e.memory).bytesPerFeature}get usedMemory(){return this.estimatedMemory}_drivenPropertiesChanged(e){if(this.ignoreDrivers)return!1;const t=this._drivenProperties,r=m(e,this._drivenOpacityFallbackAlwaysOpaque);return r.color!==t.color||r.opacity!==t.opacity||r.opacityAlwaysOpaque!==t.opacityAlwaysOpaque||r.size!==t.size||r.rotation!==t.rotation}get needsDrivenTransparentPass(){return this._hasDrivenColorOrOpacity&&!this._drivenProperties.opacityAlwaysOpaque}get _hasDrivenColorOrOpacity(){return this._drivenProperties.color||this._drivenProperties.opacity}_logGeometryCreationWarnings(e,t,r,i){const o=e.projectionSuccess,n="polygons"in e?e.polygons:null,s=`${i} geometry failed to be created`;o?!this._logGeometryValidationWarnings(t,r,i)&&0===n?.length&&"rings"===r&&t.length>0&&t[0].length>2&&g().warnOncePerTick(`${s} (filled rings should use clockwise winding - try reversing the order of vertices)`):g().warnOncePerTick(`${s} (failed to project geometry to view spatial reference)`)}get needsUpdateFocus(){return!1}_logGeometryValidationWarnings(e,t,r){const i=`${r} geometry failed to be created`;return!e.length||1===e.length&&!e[0].length?(g().warnOncePerTick(`${i} (no ${t} were defined)`),!0):(!Array.isArray(e)||!Array.isArray(e[0]))&&(g().warnOncePerTick(`${i} (${t} should be defined as a 2D array)`),!0)}_validateGeometry(e,t=null,r=null){if(null!=t&&!t.includes(e.type))return this.logger.warn("unsupported geometry type for "+r+` symbol: ${e.type}`),!1;switch(e.type){case"point":{const t=e;if(!isFinite(t.x)||!isFinite(t.y))return g().warn("point coordinate is not a valid number, graphic skipped"),!1;break}case"polygon":l(e)}return!0}_defaultElevationInfoNoZ(){return _}_defaultElevationInfoZ(){return x}_updateElevationContext(){null!=this._elevationInfoOverride?(this._elevationContext.setFromElevationInfo(this._elevationInfoOverride),this._elevationContext.setFeatureExpressionInfoContext(null)):this._context.layer.elevationInfo?(this._elevationContext.setFromElevationInfo(this._context.layer.elevationInfo),this._elevationContext.setFeatureExpressionInfoContext(this._context.featureExpressionInfoContext)):this._elevationContext.reset()}getDefaultElevationInfo(e){return e.hasZ?this._defaultElevationInfoZ():this._defaultElevationInfoNoZ()}getGeometryElevationMode(e,t=this.getDefaultElevationInfo(e)){return this._elevationContext.mode||t.mode}setElevationInfoOverride(e){this._elevationInfoOverride=e,this._updateElevationContext()}createElevationContextForGraphic(e){const t=new c;return this.updateElevationContextForGraphic(t,e),t}updateElevationContextForGraphic(e,t){const r=t.geometry,i=this.getDefaultElevationInfo(r);e.unit=null!=this._elevationContext.unit?this._elevationContext.unit:i.unit,e.mode=this.getGeometryElevationMode(r,i),e.offsetMeters=this._elevationContext.meterUnitOffset??i.offset??0;const o=!this._elevationOptions.supportsOnTheGround&&"on-the-ground"===e.mode;o&&(e.mode="relative-to-ground",e.offsetMeters=0);const n=o?d:this._elevationContext.featureExpressionInfoContext;n?e.updateFeatureExpressionInfoContextForGraphic(n,t,this._context.layer):e.setFeatureExpressionInfoContext(null)}prepareSymbolLayerPatch(e){}onRemoveGraphic(e){}_getLayerOpacity(){if(this._context.graphicsCoreOwner&&"fullOpacity"in this._context.graphicsCoreOwner)return this._context.graphicsCoreOwner.fullOpacity??0;const e=this._context.layer.opacity;return e??1}_getCombinedOpacity(e,t=C){const r=this.draped?1:this._getLayerOpacity();return this._drivenProperties.color?r:e?r*(this._drivenProperties.opacity?1:e.a):t.hasIntrinsicColor?r:0}_getCombinedOpacityAndColor(e,r=C){const i=this._getCombinedOpacity(e,r);if(this._drivenProperties.color)return h(null,i);const o=e?.toUnitRGB()??t;return h(o,i)}_getDrivenUInt8Color({color:e,opacity:t},r,i){const{color:o,opacity:a}=this._drivenProperties,l=r?.toUnitRGBA()??(i?n:s),p=o?e??l:null,c=e||r||i,d=o?null:l[3];return h(p,a&&c?t??d:null,255)}_getDrivenUInt8ColorWithNaNSupport({color:e,opacity:t},n,s){const l=n?a(n.toUnitRGBA()):o(NaN,NaN,NaN,s?NaN:0);return this._drivenProperties.color&&null!=e&&r(l,e),this._drivenProperties.opacity&&null!=t&&(l[3]=t),i(l,l,255),f(l,l)}isFastUpdatesEnabled(){return null!=this._fastUpdates}updateComplexity(){this.complexity=this.computeComplexity()}computeComplexity(){return p(this.symbol,this.symbolLayer)}globalPropertyChanged(e,t,r){switch(e){case"opacity":return this.layerOpacityChanged(t,r),!0;case"screenSizePerspectiveEnabled":return this.layerScreenSizePerspectiveChanged(t,r),!0;case"elevationInfo":{const e=this._elevationContext.mode;this._updateElevationContext();return 2!==this.layerElevationInfoChanged(t,r,e)}case"slicePlaneEnabled":return this.slicePlaneEnabledChanged(t,r);case"physicalBasedRenderingEnabled":return this.physicalBasedRenderingChanged();case"pixelRatio":return this.pixelRatioChanged;case"skipHighSymbolLods":return this.skipHighSymbolLodsChanged;case"terrainTransparency":return this.terrainTransparencyChanged();default:return!1}}terrainTransparencyChanged(){return!0}get pixelRatioChanged(){return!0}updateGraphics3DGraphicElevationInfo(e,t,r){let i=1;return e?.forEach(e=>{const o=t(e);if(null!=o){const t=e.graphic;this.updateElevationContextForGraphic(o.elevationContext,t),o.needsElevationUpdates=r(o.elevationContext.mode)}else i=2}),i}applyRendererDiff(e,t){return 0}getFastUpdateAttrValues(e){if(!this._fastUpdates)return null;const t=this._fastUpdates.visualVariables,r=t.size?y(t.size.field,e):0,i=t.color?y(t.color.field,e):0,n=t.opacity?y(t.opacity.field,e):0;return o(r,i,n,0)}get draped(){return this._draped}ensureDrapedStatus(e){return null==this._draped?(this._draped=e,!0):(e!==this.draped&&g().warnOnce("A symbol can only produce either draped or non-draped visualizations. Use two separate symbol instances for draped and non-draped graphics if necessary."),!1)}test(){const e=()=>({size:this._fastUpdates?.visualVariables.size?.field??null,color:this._fastUpdates?.visualVariables.color?.field??null,opacity:this._fastUpdates?.visualVariables.opacity?.field??null,rotation:this._fastUpdates?.visualVariables.rotation?.field??null});return{drivenProperties:this._drivenProperties,getVisVarFields:e}}}function m(e,t){const r={color:!1,opacity:!1,opacityAlwaysOpaque:t,size:!1,rotation:!1};return e&&"visualVariables"in e&&e.visualVariables&&e.visualVariables.forEach(e=>{switch(e.type){case"color":if(r.color=!0,e.stops)for(let t=0;t<e.stops.length;t++){const i=e.stops[t].color;i&&i.a<1&&(r.opacityAlwaysOpaque=!1)}break;case"opacity":r.opacity=!0,r.opacityAlwaysOpaque=!1;break;case"size":r.size=!0;break;case"rotation":r.rotation=!0}}),r}const _={mode:"on-the-ground",offset:0,unit:"meters"},x={mode:"absolute-height",offset:0,unit:"meters"},C={hasIntrinsicColor:!1},b=o(NaN,NaN,NaN,NaN);export{v as Graphics3DSymbolLayer,m as getDrivenProperties,b as nanFallbackColor};
|
|
@@ -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 e from"../../../../core/Logger.js";import{d as t,h as n,b as r}from"../../../../chunks/vec32.js";import{ZEROS as l,fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as c,center as s,height as i}from"../../../../geometry/support/aaBoundingBox.js";import{labelMarginPx as o}from"./constants.js";import{getGraphics3DSymbol as f}from"./graphicSymbolUtils.js";import{LabelPlacement as m}from"./LabelParameters.js";import{textVerticalPaddingPx as h}from"../../webgl-engine/lib/TextRenderer.js";import{HUDMaterial as p}from"../../webgl-engine/materials/HUDMaterial.js";const u=()=>e.getLogger("esri.views.3d.layers.graphics.labelPlacement");class b{constructor(e,t,n,r=null){this._graphic=e,this._symbol=t,this._class=n,this._disablePlacement=r}get placement(){const e=this._verticalOffsetPlacement;if(null==e)return null;const t=this._getPlacementInfo(e);if(null==t)return null;const n=t.anchor,r=!!e.hasLabelVerticalOffset,l=e.verticalOffset,a=new m(l,n,r);return this._calculatePlacementOffsets(a,t)}get _verticalOffsetPlacement(){const e=this._class.labelPlacement,{_symbol:t,_graphic:n}=this,r=f(n.graphics3DSymbol),l="point-3d"===r?.symbol.type?r.symbol:null,a=P[e]||this._defaultPlacementInfo;return l?.supportsCallout()&&l.hasVisibleVerticalOffset()&&!n.isDraped?{placement:null,hasLabelVerticalOffset:!1,verticalOffset:l.verticalOffset.clone(),anchor:null,normalizedOffset:null}:!t?.hasVisibleVerticalOffset()||null!=l&&l.supportsCallout()&&l.verticalOffset&&!n.isDraped?{placement:null,verticalOffset:null,anchor:null,normalizedOffset:null,hasLabelVerticalOffset:!1}:a&&d(a.placement)?{placement:"above-center",verticalOffset:t.verticalOffset.clone(),anchor:"bottom",normalizedOffset:[0,a.normalizedOffset[1],0],hasLabelVerticalOffset:!0}:(u().errorOncePerTick("Callouts and vertical offset on labels are currently only supported with 'above-center' label placement (not with "+e+" placement)"),null)}_getPlacementInfo(e){if(e.anchor)return e;const t=this._class.labelPlacement,n=P[t],r=n||this._defaultPlacementInfo;return t&&!n&&u().warnOnce(`the requested label placement '${t}' is currently unsupported in SceneView.`),this._validatePlacementInfo(r)}_calculatePlacementOffsets(e,t){const n=this._graphic.graphic.geometry;if(null==n)return null;switch(n.type){case"point":this._setPointSpecificPlacement(e,t);break;case"mesh":this._setMeshSpecificPlacement(e,t);break;case"polygon":this._setPolygonSpecificPlacement(e,t)}const r=o-h;return e.screenOffset[0]+=r*t.normalizedOffset[0],e.screenOffset[1]+=r*t.normalizedOffset[1],e}get _defaultPlacementInfo(){const e=this._graphic.graphic.geometry;if(null==e)return null;switch(e.type){case"polyline":case"extent":case"multipoint":return{placement:"center-center",normalizedOffset:l,anchor:"center"};case"polygon":{const e=this._firstSymbolLayer;return"extrude"===e?.type?P["above-center"]:{placement:"center-center",normalizedOffset:l,anchor:"center"}}case"point":case"mesh":return P["above-center"];default:return}}_validatePlacementInfo(e){const t=this._graphic.graphic.geometry;if(null==t)return null;if(null!=this._disablePlacement){const t=this._class.labelPlacement;return t?(u().warnOncePerTick(g(t,this._disablePlacement.logEntityDescription)),this._defaultPlacementInfo):e}const n=t.type;switch(n){case"polyline":case"polygon":case"extent":case"multipoint":{const e=this._class.labelPlacement;if(e)return P[e]&&u().warnOnce(g(e,`'${n}' geometries`)),this._defaultPlacementInfo;break}case"point":case"mesh":return e}return e}_setPointSpecificPlacement(e,r){const l=this._firstSymbolLayer;if(null==l)return;const a=this._graphic.layers[0];switch(null!=a?t(e.translation,a.getCenterObjectSpace()):n(e.translation,0,0,0),l.type){case"icon":case"text":this._setHUDSpecificPlacement(e,r,a);break;case"object":O(e,r,a)}}_setMeshSpecificPlacement(e,t){const n=this._firstSymbolLayer;if(null!=n&&"fill"===n.type){O(e,t,this._graphic.layers[0])}}_setPolygonSpecificPlacement(e,t){const r=this._firstSymbolLayer;if(null!=r)switch(r.type){case"extrude":{const r=this._graphic.layers[0];null!=r?(r.getBoundingBoxObjectSpace(v),s(v,e.translation),e.translation[2]=i(v)/2):n(e.translation,0,0,0),O(e,t,r);break}}}_setHUDSpecificPlacement(e,t,n){const r=null!=n?n.getScreenSize():null;if(this._graphic.isDraped||null==r)e.hasLabelVerticalOffset||"center"===e.anchor||(P[this._class.labelPlacement]&&u().warnOncePerTick(`the requested placement '${t.placement}' is currently unsupported for draped graphics`),e.anchor="center");else{const n=this._normalizedSymbolAnchorPos;e.screenOffset[0]=r[0]/2*(t.normalizedOffset[0]-n[0]);const l=r[1]/2*(t.normalizedOffset[1]-n[1]);e.hasLabelVerticalOffset?(e.centerOffset[1]=l,e.centerOffsetUnits="screen"):e.screenOffset[1]=l}}get _firstSymbolLayer(){const e=this._graphic.graphics3DSymbol,t=f(e);return null!=t?t.symbol.symbolLayers.at(0):null}get _normalizedSymbolAnchorPos(){const e=this._graphic.layers[0],t=e?.stageObject.geometries[0].material??null;if(t&&t instanceof p){const e=t.parameters.anchorPosition;_[0]=2*(e[0]-.5),_[1]=2*(e[1]-.5)}else _[0]=0,_[1]=0;return _}}function g(e,t){return`the requested label placement '${e}' is currently unsupported for ${t} in SceneView.`}function O(e,t,n){const l=null!=n?n.getBoundingBoxObjectSpace(v):v,c=a(l[3]-l[0],l[4]-l[1],l[5]-l[2]),s=Math.sqrt(c[0]*c[0]+c[1]*c[1]);e.centerOffset[0]=s/2*t.normalizedOffset[0];const i=e.translation[2],o=c[2]/2*t.normalizedOffset[1];e.translation[2]=0,e.elevationOffset=i+o;const f=r(c);e.centerOffset[2]=f/2*t.normalizedOffset[2]}function d(e){return"above-center"===e}const P={"above-center":{placement:"above-center",normalizedOffset:[0,1,0],anchor:"bottom"},"above-left":{placement:"above-left",normalizedOffset:[-1,1,0],anchor:"bottom-right"},"above-right":{placement:"above-right",normalizedOffset:[1,1,0],anchor:"bottom-left"},"below-center":{placement:"below-center",normalizedOffset:[0,-1,2],anchor:"top"},"below-left":{placement:"below-left",normalizedOffset:[-1,-1,0],anchor:"top-right"},"below-right":{placement:"below-right",normalizedOffset:[1,-1,0],anchor:"top-left"},"center-center":{placement:"center-center",normalizedOffset:[0,0,1],anchor:"center"},"center-left":{placement:"center-left",normalizedOffset:[-1,0,0],anchor:"right"},"center-right":{placement:"center-right",normalizedOffset:[1,0,0],anchor:"left"}},y={"above-center":["default","esriServerPointLabelPlacementAboveCenter"],"above-left":["esriServerPointLabelPlacementAboveLeft"],"above-right":["esriServerPointLabelPlacementAboveRight"],"below-center":["esriServerPointLabelPlacementBelowCenter"],"below-left":["esriServerPointLabelPlacementBelowLeft"],"below-right":["esriServerPointLabelPlacementBelowRight"],"center-center":["esriServerPointLabelPlacementCenterCenter"],"center-left":["esriServerPointLabelPlacementCenterLeft"],"center-right":["esriServerPointLabelPlacementCenterRight"]};for(const S in y){const e=y[S],t=P[S];e.forEach(e=>{P[e]=t})}Object.freeze&&(Object.freeze(P),Object.keys(P).forEach(e=>{Object.freeze(P[e]),Object.freeze(P[e]?.normalizedOffset)}));const _=[0,0],v=c();export{b as LabelInfo};
|
|
@@ -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 has from"../../../../core/has.js";import{defaultObjectPrimitive as e}from"../../../../symbols/support/primitives.js";import{pathNumCircleProfileSubdivisions as r,pathNumRoundJoinSubdivisions as t,pathNumRoundCapExtrusionSubdivisions as a}from"./Graphics3DPathSymbolLayerConstants.js";import{primitiveLodResources as s}from"./primitiveObjectSymbolUtils.js";import{EstimatedSymbolComplexity as u,SymbolComplexityMemory as o,EstimatedAggregateSymbolComplexity as b,AggregateSymbolComplexity as i,SymbolComplexity as y}from"./SymbolComplexity.js";import{hasEdges as n}from"../support/edgeUtils.js";import{DefaultMaterial as c}from"../../webgl-engine/materials/DefaultMaterial.js";const P=new u({});function l(e){if("web-style"===e.type)return P;return F(e.symbolLayers.toArray().map(r=>p(e,r)))}function F(e){let r=0,t=0,a=0,s=!1,u=0;const y=new o;for(const o of e)null!=o&&(r+=o.verticesPerFeature,t+=o.verticesPerCoordinate,a+=o.drawCallsPerFeature,y.bytesPerFeature+=o.memory.bytesPerFeature,y.bytesPerFeatureLabel+=o.memory.bytesPerFeatureLabel,y.resourceBytes+=o.memory.resourceBytes,y.draped.bytesPerFeature+=o.memory.bytesPerFeature,y.draped.bytesPerFeatureLabel+=o.memory.bytesPerFeatureLabel,s=s||o.estimated,++u);return s?new b(u,{verticesPerFeature:r,verticesPerCoordinate:t,drawCallsPerFeature:a,memory:y}):new i(u,{verticesPerFeature:r,verticesPerCoordinate:t,drawCallsPerFeature:a,memory:y})}function m(e){const r=F(e);return r.numComplexities>0&&(r.verticesPerFeature/=r.numComplexities,r.verticesPerCoordinate/=r.numComplexities,r.drawCallsPerFeature/=r.numComplexities,r.memory.bytesPerFeature/=r.numComplexities,r.memory.bytesPerFeatureLabel/=r.numComplexities,r.memory.resourceBytes/=r.numComplexities,r.memory.draped.bytesPerFeature/=r.numComplexities,r.memory.draped.bytesPerFeatureLabel/=r.numComplexities),r}const d={};function p(s,o){const b=L(s,o),i=n(o)?2:0;switch(o.type){case"extrude":return new y({verticesPerFeature:-12,verticesPerCoordinate:12,drawCallsPerFeature:i,memory:b});case"fill":if("mesh-3d"===s.type)return new y({drawCallsPerFeature:i,memory:b});if(null!=o.outline&&o.outline.size>0)return new y({verticesPerFeature:-12,verticesPerCoordinate:9,memory:b});case"water":return new y({verticesPerFeature:-6,verticesPerCoordinate:3,memory:b});case"line":return new y({verticesPerFeature:-6,verticesPerCoordinate:6,memory:b});case"object":return o.resource?.href?new u({verticesPerFeature:100,memory:b}):{...C(o.resource?.primitive??e),memory:b};case"path":{let e=0,s=0;switch(o.profile){case"circle":e=r;break;case"quad":e=4;break;default:return void o.profile}switch(o.join){case"round":s=t;break;case"miter":case"bevel":s=1;break;default:return}const u=2*e,i=e*s*2,n=i+u;let c=-2*i-u;switch(o.cap){case"none":break;case"butt":case"square":c+=2*(e-1);break;case"round":c+=2*(e*(a-1)*2+e);break;default:return}return new y({verticesPerFeature:c,verticesPerCoordinate:n,memory:b})}case"text":{const e="label-3d"===s.type?0:2;return new y({verticesPerFeature:6,memory:b,drawCallsPerFeature:e})}case"icon":return new y({verticesPerFeature:6,memory:b});default:return}}function L(e,r){const t="point-3d"===e.type;switch(r.type){case"extrude":return r.edges&&r.edges.size>0?w.EXTRUDE_EDGES:w.EXTRUDE;case"fill":return null!=r.outline&&r.outline.size>0?w.FILL_OUTLINE:w.FILL;case"water":return w.FILL;case"line":return"round"===r.join?w.LINE_ROUND:w.LINE_MITER;case"path":switch(r.join){case"round":switch(r.profile){case"circle":return w.PATH_ROUND_CIRCLE;case"quad":return w.PATH_ROUND_QUAD;default:return void r.profile}case"miter":case"bevel":switch(r.profile){case"circle":return w.PATH_MITER_CIRCLE;case"quad":return w.PATH_MITER_QUAD;default:return void r.profile}default:return}case"object":return t?w.OBJECT_POINT:w.OBJECT_POLYGON;case"icon":case"text":return t?w.ICON_POINT:w.ICON_POLYGON;default:return}}function C(e){const r=d[e];if(r)return r;const t=f(s(e,new c({},{spherical:!0})).levels);return d[e]=new y({verticesPerFeature:t}),d[e]}function f(e){return e.reduce((e,r,t)=>e+r.numVertices*(1/10**t),0)/e.reduce((e,r,t)=>e+1/10**t,0)}const w={ICON_POINT:{bytesPerFeature:2658,bytesPerFeatureLabel:3484,resourceBytes:0,draped:{bytesPerFeature:1845,bytesPerFeatureLabel:3498}},ICON_POLYGON:{bytesPerFeature:3086,bytesPerFeatureLabel:2996,resourceBytes:0,draped:{bytesPerFeature:2694,bytesPerFeatureLabel:3014}},OBJECT_POINT:{bytesPerFeature:497,bytesPerFeatureLabel:2933,resourceBytes:0,draped:{bytesPerFeature:497,bytesPerFeatureLabel:2933}},OBJECT_POLYGON:{bytesPerFeature:867,bytesPerFeatureLabel:2491,resourceBytes:0,draped:{bytesPerFeature:867,bytesPerFeatureLabel:2491}},LINE_MITER:{bytesPerFeature:2337,bytesPerFeatureLabel:2658,resourceBytes:0,draped:{bytesPerFeature:1864,bytesPerFeatureLabel:2656}},LINE_ROUND:{bytesPerFeature:2341,bytesPerFeatureLabel:2672,resourceBytes:0,draped:{bytesPerFeature:1873,bytesPerFeatureLabel:2643}},PATH_MITER_CIRCLE:{bytesPerFeature:22374,bytesPerFeatureLabel:2558,resourceBytes:0,draped:{bytesPerFeature:22374,bytesPerFeatureLabel:2558}},PATH_ROUND_CIRCLE:{bytesPerFeature:24004,bytesPerFeatureLabel:2598,resourceBytes:0,draped:{bytesPerFeature:24004,bytesPerFeatureLabel:2598}},PATH_MITER_QUAD:{bytesPerFeature:24040,bytesPerFeatureLabel:2940,resourceBytes:0,draped:{bytesPerFeature:24040,bytesPerFeatureLabel:2940}},PATH_ROUND_QUAD:{bytesPerFeature:23088,bytesPerFeatureLabel:2886,resourceBytes:0,draped:{bytesPerFeature:23088,bytesPerFeatureLabel:2886}},FILL:{bytesPerFeature:3059,bytesPerFeatureLabel:2838,resourceBytes:0,draped:{bytesPerFeature:2352,bytesPerFeatureLabel:2808}},FILL_OUTLINE:{bytesPerFeature:3093,bytesPerFeatureLabel:2632,resourceBytes:0,draped:{bytesPerFeature:2480,bytesPerFeatureLabel:2601}},EXTRUDE:{bytesPerFeature:5075,bytesPerFeatureLabel:2559,resourceBytes:0,draped:{bytesPerFeature:5075,bytesPerFeatureLabel:2559}},EXTRUDE_EDGES:{bytesPerFeature:2843,bytesPerFeatureLabel:2139,resourceBytes:0,draped:{bytesPerFeature:2843,bytesPerFeatureLabel:2139}}};if(has("esri-tests-disable-symbol-memory-estimators"))for(const E in w){const e=w[E];e.bytesPerFeature=0,e.bytesPerFeatureLabel=0,e.draped.bytesPerFeature=0,e.draped.bytesPerFeatureLabel=0}export{m as averageSymbolComplexities,l as defaultSymbolComplexity,p as defaultSymbolLayerComplexity,L as defaultSymbolLayerMemoryComplexity,P as emptySymbolComplexity,f as estimateNumVerticesForLods,w as memoryEstimators,F as totalSymbolComplexities};
|
|
@@ -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
|
-
|
|
5
|
+
function r(r){switch(r){case"butt":return 0;case"square":return 1;case"round":return 2;default:return null}}function t(r){return"diamond"===r?"kite":r}export{r as parseCapType,t as parseLineMarkerStyle};
|
|
@@ -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 e}from"tslib";import r from"../../../../../../core/Accessor.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import r from"../../../../../../core/Accessor.js";import{createAbortError as t}from"../../../../../../core/promiseUtils.js";import{property as s,subclass as i}from"../../../../../../core/accessorSupport/decorators.js";import{ONES as d}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{DirectRenderer as n}from"./DirectRenderer.js";import{LodRenderer as o}from"./LodRenderer.js";import{ManagedTexture as l}from"../../../../webgl-engine/lib/ManagedTexture.js";import{DefaultMaterial as c}from"../../../../webgl-engine/materials/DefaultMaterial.js";import{HUDMaterial as u}from"../../../../webgl-engine/materials/HUDMaterial.js";import{schematicMRRFactors as m}from"../../../../webgl-engine/materials/pbrUtils.js";let h=class extends r{constructor(e){super(),this.view=null,this.layerViewUid=null,this._stage=null,this._materials=new Map,this._textures=new Map,this._directRenderers=new Map,this._lodRenderers=new Map,this.totalFeatures=0,this.view=e.view,this.layerViewUid=e.layerViewUid}initialize(){this._stage=this.view.stage}destroy(){this.removeAllHandles(),this._lodRenderers.forEach(e=>e.destroy())}async createTexture(e,r){const{_textures:t,_stage:s}=this,i=new l(e,r);return t.set(i.id,i),s&&(i.load(s.renderView.renderingContext),s.addTexture(i)),i.id}async releaseTexture(e){const{_textures:r,_stage:t}=this,s=r.get(e);s&&(t&&(s.unload(),t.removeTexture(s)),r.delete(e))}_destroyTexture(e){const{_textures:r,_stage:t}=this,s=r.get(e);s&&(t&&(s.unload(),t.removeTexture(s)),r.delete(e))}async createMaterial(e){const{view:r}=this,t=1===r.state.viewingMode;let s=null;switch(e.type){case"default":{const r=e.parameters,i=new c(r,{spherical:t});i.setParameters({cullFace:i.transparent?0:2}),s=i;break}case"hud":{const r=e.parameters;s=new u(r,t)}}this._materials.set(e.materialId,s)}async destroyMaterial(e){this._materials.delete(e)}async updateMaterial(e){}async createDirectRenderer(e){if(this._directRenderers.has(e))return;const r=this._materials.get(e);if(null==r)throw new Error(`material not found ${e}`);const{view:t}=this,s=new n({material:r,layerViewUid:this.layerViewUid});this._directRenderers.set(e,s),t.stage.addRenderPlugin(s),t.stage.renderView.renderer.updateHasFlags()}setBaseInstance(e,r){const t=this._directRenderers.get(e);if(null==t)throw new Error(`renderer not found ${e}`);t.setBaseInstance(r)}async destroyDirectRenderer(e){const r=this._directRenderers.get(e);if(null==r)return;const t=this.view;t.stage.removeRenderPlugin(r),this._directRenderers.delete(e),t.stage.renderView.renderer.updateHasFlags()}async createLoDRenderer(e,r,s){const i=new o({view:this.view,layerViewUid:this.layerViewUid}),d=e=>this._materials.get(e);if(await i.doLoad(r,d,s),s?.aborted)throw i.destroy(),t();this._lodRenderers.set(e,i)}async destroyLoDRenderer(e,r){const t=this._lodRenderers.get(e);null!=t&&(t.destroy(),this._lodRenderers.delete(e))}_destroyLodRenderer({rendererId:e}){const r=this._lodRenderers.get(e);null!=r&&(r.destroy(),this._lodRenderers.delete(e))}async executeRenderCommands(e){for(const r of e)switch(r.id){case"destroy-texture":this._destroyTexture(r.textureId);break;case"update-material":this._updateMaterial(r);break;case"destroy-material":this._destroyMaterial(r);break;case"add-direct-renderer-geometry-buffer":this._addDirectRendererGeometryBuffer(r);break;case"update-direct-renderer-geometry-buffer":this._updateDirectRendererGeometryBuffer(r);break;case"remove-direct-renderer-geometry-buffer":this._removeDirectRendererGeometryBuffer(r);break;case"destroy-lod-renderer":this._destroyLodRenderer(r);break;case"add-lod-instances":this._addLodInstances(r);break;case"remove-lod-instances":this._removeLodInstances(r);break;case"update-lod-instance-data":this._updateLodInstanceData(r);break;case"update-visibility":this._updateVisibility(r)}e.length>0&&this._updateFeatureCount()}_updateFeatureCount(){let e=0;for(const r of this._directRenderers.values())e+=r.numFeatures;for(const r of this._lodRenderers.values())e+=r.numFeatures;this._set("totalFeatures",e)}get usedMemory(){let e=0;for(const r of this._directRenderers.values())e+=r.usedMemory;for(const r of this._lodRenderers.values())e+=r.usedMemory;return e}_updateMaterial({materialId:e,parameters:r}){const t=this._materials.get(e);null!=t?t.setParameters(r):console.error("material not found")}_destroyMaterial({materialId:e}){null!=this._materials.get(e)?this._materials.delete(e):console.error("material not found")}_addDirectRendererGeometryBuffer({groupId:e,rendererId:r,renderGeometryBuffer:t,renderGeometryBufferItems:s,localOrigin:i}){const d=this._directRenderers.get(r);null!=d?(d.addRenderGeometryBuffer(e,t,s,i),this.view.stage.renderView.requestRender()):console.error("no renderer assigned to provided material")}_updateDirectRendererGeometryBuffer({groupId:e,rendererId:r,renderGeometryBuffer:t,renderGeometryBufferItems:s,localOrigin:i}){const d=this._directRenderers.get(r);null!=d?(d.updateRenderGeometryBuffer(e,t,s,i),this.view.stage.renderView.requestRender()):console.error("no renderer assigned to provided material")}_removeDirectRendererGeometryBuffer({groupId:e,rendererId:r}){const t=this._directRenderers.get(r);null!=t?(t.removeRenderGeometryBuffer(e),this.view.stage.renderView.requestRender()):console.error("no renderer assigned to provided material")}_addLodInstances({rendererId:e,groupId:r,data:t}){const s=this._lodRenderers.get(e);if(null==s)throw new Error("no lod renderer assigned to provided lod renderer Id");s.addInstances(r,t),this.view.stage.renderView.requestRender()}_removeLodInstances({rendererId:e,groupId:r}){const t=this._lodRenderers.get(e);if(null==t)throw new Error("no lod renderer assigned to provided lod renderer Id");t.removeInstances(r),this.view.stage.renderView.requestRender()}_updateLodInstanceData({rendererId:e,groupId:r,globalTransforms:t}){const s=this._lodRenderers.get(e);if(null==s)throw new Error("No renderer found with the provided id");null!=t&&s.updateGlobalTransforms(r,t),this.view.stage.renderView.requestRender()}_updateVisibility({rendererId:e,groupId:r,visibility:t}){const s=this._directRenderers.get(e)??this._lodRenderers.get(e);if(null==s)throw new Error("No renderer found with the provided id");s.updateVisibility(r,t),this.view.stage.renderView.requestRender()}};function f(e,r,t){const s={usePBR:r.physicalBasedRenderingEnabled,isSchematic:!0,mrrFactors:m,ambient:d,diffuse:d,hasSlicePlane:r.slicePlaneEnabled,castShadows:r.castShadows,offsetTransparentBackfaces:!r.isPrimitive};r.screenSizePerspectiveEnabled&&(s.screenSizePerspective=e.screenSizePerspective.parameters),s.externalColor=a,s.instanced=!0;const i=new c(s,{spherical:t});return i.setParameters({cullFace:i.transparent?0:2}),i}e([s({readOnly:!0})],h.prototype,"totalFeatures",void 0),h=e([i("esri.views.3d.layers.graphics.pipeline.rendering.FeaturePipelineRenderManager")],h);export{h as FeaturePipelineRenderManager,f as createDefaultMaterial};
|
|
@@ -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{inputAttributesToAttributesMap as e}from"./symbolizationUtils.js";import{cloneAttributeData as t}from"../../../../webgl-engine/lib/AttributeArray.js";import{createPolySphereData as n,createConeGeometryData as i}from"../../../../webgl-engine/lib/GeometryUtil.js";function a(t,a){const o=(t,n,i=!1)=>({levels:t.map(t=>{const o=e(n(t.tesselation));i&&s(o);return{components:[{attributes:o,olidColor:void 0,transformation:null,materialId:a,visibilities:new Uint8Array([1]),objectIds:new Uint32Array([-1])}],minScreenSpaceRadius:t.minScreenSpaceRadius}})});switch(t){case"cone":return o(r,e=>i(1,.5,e,!1),!0);case"sphere":return o([{tesselation:0,minScreenSpaceRadius:0},{tesselation:1,minScreenSpaceRadius:8},{tesselation:2,minScreenSpaceRadius:16},{tesselation:3,minScreenSpaceRadius:50},{tesselation:4,minScreenSpaceRadius:250}],e=>n(.5,e,!0));case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function s(e){const t=e,n=t.get("position").data,i=t.get("normal").data;if(i){const t=o(e,"normal").data;for(let e=0;e<i.length;e+=3){const n=i[e+1];t[e+1]=-i[e+2],t[e+2]=n}}if(n){const t=o(e,"position").data;for(let e=0;e<n.length;e+=3){const i=n[e+1];t[e+1]=-n[e+2],t[e+2]=i}}}function o(e,n){let i=e.get(n);return i&&!i.exclusive&&(i={...i,exclusive:!0,data:t(i.data)},e.set(n,i)),i}const r=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];export{a as createPrimitiveGeometry};
|
|
@@ -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{cgToGIS as e,createDiamondGeometry as n,createTetrahedronGeometry as s,createCylinderGeometry as a,createConeGeometry as c,createBoxGeometry as i,createPolySphereGeometry as t}from"../../webgl-engine/lib/GeometryUtil.js";import{LodResources as r,LodLevelResources as o,LodComponentResources as u,LodComponentEngineGeometry as d}from"../../webgl-engine/lib/lodRendering/LodResources.js";function S(e){switch(e){case"sphere":case"cube":case"diamond":case"cylinder":case"cone":case"inverted-cone":case"tetrahedron":return!0}return!1}function l(S,l){const p=(n,s,a=!1)=>new r(n.map(n=>{const c=s(n.tesselation);return a&&e(c),new o([new u(new d(c))],n.minScreenSpaceRadius)}));switch(S){case"sphere":return p([{tesselation:0,minScreenSpaceRadius:0},{tesselation:1,minScreenSpaceRadius:8},{tesselation:2,minScreenSpaceRadius:16},{tesselation:3,minScreenSpaceRadius:50},{tesselation:4,minScreenSpaceRadius:250}],e=>t(l,.5,e,!0));case"cube":return p([{tesselation:0,minScreenSpaceRadius:0}],()=>i(l,1));case"cone":return p(m,e=>c(l,1,.5,e,!1),!0);case"inverted-cone":return p(m,e=>c(l,1,.5,e,!0),!0);case"cylinder":return p(m,e=>a(l,1,.5,e,[0,0,1],[0,0,.5]));case"tetrahedron":return p([{tesselation:0,minScreenSpaceRadius:0}],()=>s(l,1),!0);case"diamond":return p([{tesselation:0,minScreenSpaceRadius:0}],()=>n(l,1),!0);default:return}}const m=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];export{S as isValidPrimitive,l as primitiveLodResources};
|
|
@@ -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{clone as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{createMaterialFromEdges as r}from"../support/edgeUtils.js";const o=.15,t=.5*o;function a(e){switch(e.filterMode.type){case"solid":return{mode:0};case"wire-frame":return{mode:1,edgeMaterial:r(e.filterMode.edges,{})};case"x-ray":return{mode:2}}}function l(e,r){if(null==r)return e.color[3]=0,void(e.edgeMaterial=null);switch(r.mode){case 0:return;case 1:return e.color[3]=0,void(e.edgeMaterial=r.edgeMaterial);case 2:return e.color[0]=1,e.color[1]=1,e.color[2]=1,e.color[3]*=o,e.colorMixMode=3,e.castShadows=!1,e.pickable=!1,void(e.edgeMaterial=c(e.edgeMaterial))}}function c(e){return null==e?null:(n.lastMaterial!==e&&(n.cachedMaterial=i(e),n.lastMaterial=e),n.cachedMaterial)}function i(r){const o=e(r.color);return o[3]*=t,{...r,color:o}}const n={cachedMaterial:null,lastMaterial:null};export{l as applyFilterMode,a as parseFilterMode};
|
|
@@ -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{I3sTarget as e}from"./Intersector.js";import{IntersectorResult as t}from"../../webgl-engine/lib/IntersectorResult.js";import{MeshIntersectionOptions as n}from"../../webgl-engine/lib/RayIntersections.js";import{getVerticalOffsetI3S as i}from"../../webgl-engine/lib/verticalOffsetUtils.js";class r{constructor(e){this.type=2,this._needVerticalOffset=!1,this.layerViewUid=e.layerViewUid,this.sublayerId=e.sublayerId,this._collection=e.collection,this._traverseNodeHierarchy=e.traverseNodeHierarchy,this.slicePlaneEnabled=e.slicePlaneEnabled,this.isGround=e.isGround}updateElevationAlignState(e,t){this._needVerticalOffset=e&&1===t}intersect(r,l,o,c,a,d){const u=2===r.options.store,b=r.ray.direction;let
|
|
5
|
+
import{I3sTarget as e}from"./Intersector.js";import{IntersectorResult as t}from"../../webgl-engine/lib/IntersectorResult.js";import{MeshIntersectionOptions as n}from"../../webgl-engine/lib/RayIntersections.js";import{getVerticalOffsetI3S as i}from"../../webgl-engine/lib/verticalOffsetUtils.js";class r{constructor(e){this.type=2,this._needVerticalOffset=!1,this.layerViewUid=e.layerViewUid,this.sublayerId=e.sublayerId,this._collection=e.collection,this._traverseNodeHierarchy=e.traverseNodeHierarchy,this.slicePlaneEnabled=e.slicePlaneEnabled,this.isGround=e.isGround}updateElevationAlignState(e,t){this._needVerticalOffset=e&&1===t}intersect(r,l,o,c,a,d){const u=2===r.options.store,b=r.ray.direction;let f=e=>e,h=e=>e;const y=i(r.verticalOffset??(this._needVerticalOffset?0:null));null!=r.verticalOffset&&null!=y&&(f=e=>y.applyToMbs(e),h=e=>y.applyToObb(e));const{results:m,tolerance:p}=r,R=new n(p,d,r.options.normalRequired),g=(n,i)=>{if(0===n.childrenLoaded)return!1;const a=n.serviceObbInRenderSR?.isValid?n.serviceObbInRenderSR:null;if(a&&!h(a).intersectRay(o,b,p))return!1;const{serviceMbsInRenderSRElevationAdjusted:d}=n;return!i||!a&&d.isValid&&!s(f(d),o,b,p)||null!=n.geometryObbInRenderSR&&!h(n.geometryObbInRenderSR).intersectRay(o,b,p)||this._collection.intersect(i,o,c,y,R,(i,s,a,d)=>{if(s<0||null!=l&&!l(o,c,s))return;const b=t=>{const r=new e(this.layerViewUid,this.sublayerId,n.index,i,d);t.set(this.type,r,s,a)};if(this.isGround&&(null==m.ground.distance||s<m.ground.distance)&&b(m.ground),!r.options.isFiltered&&((null==m.min.distance||s<m.min.distance)&&b(m.min),(null==m.max.distance||s>m.max.distance)&&b(m.max),u)){const e=new t(r.ray);b(e),r.results.all.push(e)}}),!0};this._traverseNodeHierarchy(g)}}function s(e,t,n,i=0){const r=e.radius+i,s=t[0]-e.center[0],l=t[1]-e.center[1],o=t[2]-e.center[2],[c,a,d]=n,u=c*s+a*l+d*o;return u*u-(c*c+a*a+d*d)*(s*s+l*l+o*o-r*r)>=0}export{r as I3SIntersectionHandler};
|
|
@@ -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{Sphere as e}from"../../../../geometry/support/sphere.js";import{ElevationRange as s}from"../../support/ElevationRange.js";class
|
|
5
|
+
import{Sphere as e}from"../../../../geometry/support/sphere.js";import{ElevationRange as s}from"../../support/ElevationRange.js";class i extends s{constructor(s,i){super(NaN,NaN),this.id=s,this.serviceMbsInIndexSR=i,this._serviceMbsInRenderSRElevationAdjusted=new e(0,0,0,-1),this._serviceMbsInRenderSR=new e(0,0,0,-1),this._mbsConeInRenderSR=null}get serviceMbsInRenderSRElevationAdjusted(){return this._serviceMbsInRenderSRElevationAdjusted}updateServiceMbsInRenderSRElevationAdjusted(e){return this._serviceMbsInRenderSRElevationAdjusted.copyFrom(e),this._serviceMbsInRenderSRElevationAdjusted}get serviceMbsInRenderSR(){return this._serviceMbsInRenderSR}updateServiceMbsInRenderSR(e){return this._serviceMbsInRenderSR.copyFrom(e),this._serviceMbsInRenderSR}get mbsConeInRenderSR(){return this._mbsConeInRenderSR}updateMbsConeInRenderSR(e){return this._mbsConeInRenderSR=e?.clone()??null,this._mbsConeInRenderSR}invalidateServiceBVsInRenderSR(){this._serviceMbsInRenderSRElevationAdjusted.invalidate(),this._serviceMbsInRenderSR.invalidate(),this._mbsConeInRenderSR=null,this.serviceObbInRenderSR?.invalidate()}shareServiceBVsInRenderSRWith(e){this.serviceObbInRenderSR=e.serviceObbInRenderSR,this._serviceMbsInRenderSRElevationAdjusted=e._serviceMbsInRenderSRElevationAdjusted,this._serviceMbsInRenderSR=e._serviceMbsInRenderSR,this._mbsConeInRenderSR=e._mbsConeInRenderSR}}class t extends i{constructor(e,s,i,t,n,d,a,R,o,h){super(e,i),this.index=s,this.childCount=t,this.level=n,this.resources=d,this.version=a,this.lodMetric=R,this.maxError=o,this.numFeatures=h,this.failed=!1,this.cacheState=0,this.vertexCount=0,this.memory=0,this.childrenLoaded=0,this.hasModifications=!1,this.imModificationImpact=4,this.elevationAgnosticBoundingVolume=new r}invalidateServiceBVsInRenderSR(){super.invalidateServiceBVsInRenderSR(),this.elevationAgnosticBoundingVolume.invalidate()}}class n{constructor(e,s,i,t){this.nodeHasLOD=e,this.isChosen=s,this.lodLevel=i,this.version=t}}class r{constructor(){this._data=[0,0,0,r.invalidRadius]}static{this.invalidRadius=-2}invalidate(){this._data[3]=r.invalidRadius}get valid(){return this._data[3]!==r.invalidRadius}get radius(){return this._data[3]}getAxis(e){return e[0]=this._data[0],e[1]=this._data[1],e[2]=this._data[2],e}set(e,s){this._data[0]=e[0],this._data[1]=e[1],this._data[2]=e[2],this._data[3]=s}}export{r as ElevationAgnosticBoundingVolume,t as Node,i as NodeBoundingData,n as NodeTraversalState};
|
|
@@ -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{n as e,a as t,g as i,c as s,h as r,E as n,e as o,d as a,u as c,G as u,j as l,F as h,s as d,B as m,b as _,D as p,i as f}from"../../../../chunks/vec32.js";import{create as v}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as g}from"../../../../geometry/ellipsoidUtils.js";import{getSphericalPCPF as R}from"../../../../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingSphere as b}from"../../../../geometry/projection/projectBoundingSphere.js";import{getProjector as S}from"../../../../geometry/projection/projectors.js";import{create as M,fromMatrix as x,createPoints as I,intersectsSphere as C}from"../../../../geometry/support/frustum.js";import{getNormal as D,signedDistance as P}from"../../../../geometry/support/plane.js";import{isPlateCarree as E}from"../../../../geometry/support/spatialReferenceUtils.js";import{Sphere as O}from"../../../../geometry/support/sphere.js";import{evaluateElevationAlignmentAtPoint as F}from"../graphics/elevationAlignmentUtils.js";import{ElevationContext as V}from"../graphics/ElevationContext.js";import{createContextWithoutExpressionSupport as A,extractExpressionInfo as B}from"../graphics/featureExpressionInfoUtils.js";import{intersectBoundingRectWithMbs as L}from"./I3SUtil.js";import{Obb as j,computeOffsetObb as y}from"../../support/orientedBoundingBox.js";const w=1e5;class q{get _frustumMbsCenter(){return this._frustumMbs.center}get _frustumMbsRadius(){return this._frustumMbs.radius}get _frustumPlanes(){return this._frustum}constructor(e,t,i,s,r,n,o,a,c={}){this._indexSR=e,this._renderCoordsHelper=t,this._clippingArea=r,this._elevationProvider=n,this._viewingMode=o,this._options=c,this._frustum=M(),this._frustumMbs=new O,this._viewDirection=v(),this._useFrustumCulling=!1,this._poi=v(),this._cameraPOIDirection=v(),this._elevationContext=null,this.minDistance=1/0,this.maxDistance=0,this.maxLodLevel=2,this._screenspaceErrorBias=c.screenspaceErrorBias||1,this._progressiveLoadFactor=c.progressiveLoadFactor||1,this.updateCamera(i,s);const u=this._renderCoordsHelper.spatialReference;this._renderSR=u,this._renderSRSphericalPCPF=R(u),this._isGlobalMode=u===this._renderSRSphericalPCPF,this.updateElevationInfo(a),this._isECEFOBBInLocalMode=this._indexSR.isWGS84&&(u.isWebMercator||E(u)),this._indexSREllipsoidRadius=g(this._indexSR).radius,this._indexSRSphericalPCPF=R(e),this._projectorIndexSRToIndexSRSphericalPCPF=S(this._indexSR,this._indexSRSphericalPCPF)}updateElevationInfo(e){null!=e?(this._elevationContext=V.fromElevationInfo(e),this._elevationContext.setFeatureExpressionInfoContext(A(B(e,!1)))):this._elevationContext=null}updateCamera(r,n){if(this._useFrustumCulling=n,e(this._viewDirection,r.viewForward),n){x(r.viewMatrix,r.projectionMatrix,this._frustum,U);{const e=r.eye,n=N;t(n,U[4],e);const o=.5*i(n,n)/i(this._viewDirection,n),a=this._frustumMbs,c=a.center;s(c,e,this._viewDirection,o);const u=1+o;a.radius=u}}this._screenSizeFactor=1/(r.perScreenPixelRatio/2),this._camPos=r.eye,this._updateCameraPOIDirection(),this.minDistance=1/0,this.maxDistance=0}setPointOfInterest(e){this._poi=e,this._updateCameraPOIDirection()}updateScreenSpaceErrorBias(e){const t=this._screenspaceErrorBias;return this._screenspaceErrorBias=e,t}updateClippingArea(e){this._clippingArea=e}expandElevationRange(e,t,i){if(null==this._elevationContext)return;const s=e.serviceMbsInIndexSR;if(!s)return;const r="relative-to-scene"===this._elevationContext.mode?"scene":"ground",n=this._elevationProvider;if(n.getSphereElevationRange){const e=n.getSphereElevationRange(s,this._indexSR,r);if(e)return void i.expandElevationRange(e)}const[o,a,c]=s.center,u=n.getElevation(o,a,c,this._indexSR,r);u&&i.expandElevationRangeValues(u,u);const l=t?null:n.getRootElevationRange?.();l&&i.expandElevationRange(l)}calculateServiceMbsInRenderSR(e){const{serviceMbsInRenderSR:t}=e;if(t.isValid)return t;const{serviceMbsInIndexSR:i}=e;if(!i)return t;const s=ee;s.copyFrom(i);const{minElevation:r}=e,{_elevationContext:n,_renderCoordsHelper:o}=this,{center:a}=s;if(n&&Number.isFinite(r)){let t=0,i=0;const{maxElevation:c}=e;switch(n.mode){case"relative-to-ground":case"relative-to-scene":t=n.geometryZWithOffset(a[2],o)+r-a[2],i=c-r;break;case"on-the-ground":t=r-a[2],i=c-r}a[2]+=t+.5*i,s.radius+=.5*i}else n&&s.radius<w&&(a[2]=F(a,this._elevationProvider,n,o));return b(s,this._indexSR,s,this._renderSR),e.updateServiceMbsInRenderSR(s)}getAndUpdateVisibilityObbInRenderSR(e){{const t=e.visibilityObbInRenderSR;if(t)return t}const t=.01*this._indexSREllipsoidRadius,{serviceMbsInIndexSR:i,serviceObbInIndexSR:s}=e;if(null==s||!i||!s.isValid||this._isECEFOBBInLocalMode&&(s.halfSizeX>t||s.halfSizeY>t||s.halfSizeZ>t))return null;{let t=e.serviceObbInRenderSR;if(null==t)t=new j,e.serviceObbInRenderSR=t;else if(t.isValid)return t;const n=i.radius;let o=0,a=0;const c=s.centerZ,u=this._renderCoordsHelper,l=this._elevationContext;if(l&&e.elevationRangeValid){const{minElevation:t,maxElevation:i}=e;switch(l.mode){case"relative-to-ground":case"relative-to-scene":o=l.geometryZWithOffset(c,u)+t-c,a=i-t;break;case"on-the-ground":o=t-c,a=i-t}}else if(l&&n<w){const e=r(Z,s.centerX,s.centerY,c);o=F(e,this._elevationProvider,l,u)-c}const h=a>0,d=h?W:t;return s.transform(d,this._indexSR,this._renderSR,o,this._renderSRSphericalPCPF,this._indexSRSphericalPCPF,this._projectorIndexSRToIndexSRSphericalPCPF),h&&y(d,0,a,this._viewingMode,t),t}}getNodeObbInRenderSRIndependentOfElevationOffset(e){{const t=e.visibilityObbInRenderSR??e.serviceObbInRenderSR??null;if(t?.isValid)return t}const t=e.serviceObbInIndexSR;return t?(t.transform(W,this._indexSR,this._renderSR,void 0,this._renderSRSphericalPCPF,this._indexSRSphericalPCPF,this._projectorIndexSRToIndexSRSphericalPCPF),W):null}ensureElevationAgnosticBoundingVolume(e){return!e.elevationAgnosticBoundingVolume.valid&&e.level>0&&(1===this._viewingMode?this._updateElevationAgnosticBoundingVolumeGlobal(e):this._updateElevationAgnosticBoundingVolumeLocal(e)),e.elevationAgnosticBoundingVolume}_updateCameraPOIDirection(){n(this._poi,this._camPos)?this._cameraPOIDirection=this._viewDirection:(o(this._cameraPOIDirection,this._camPos,this._poi),e(this._cameraPOIDirection,this._cameraPOIDirection))}_updateElevationAgnosticBoundingVolumeGlobal(t){const s=this.getNodeObbInRenderSRIndependentOfElevationOffset(t),r=t.elevationAgnosticBoundingVolume;let n,o=-1;if(s){const t=Z;s.getCenter(t),e(t,t),n=t,s.getCorners(X);for(const s of X){e(s,s);const n=i(s,t);if(n<=0)return void r.invalidate();const a=Math.sqrt(1-n*n);o=Math.max(o,a)}}else{const i=t.serviceMbsInRenderSR;if(!i.isValid)return void r.invalidate();const s=a(Z,i.center),u=i.radius,l=c(s);if(l<u)return void r.invalidate();o=u/l,e(s,s),n=s}const u=.001;r.set(n,o+u)}_updateElevationAgnosticBoundingVolumeLocal(e){const t=e.elevationAgnosticBoundingVolume,i=this.getNodeObbInRenderSRIndependentOfElevationOffset(e);if(i){const e=i.getCenter(Z);e[2]=0;let s=0;const r=Y;i.getCorners(X);for(const t of X){t[2]=0;const e=u(r,t);s=Math.max(s,e)}t.set(e,Math.sqrt(s))}else{const i=e.serviceMbsInRenderSR;if(i.isValid){const e=a(Z,i.center);e[2]=0,t.set(e,i.radius)}}}isNodeVisible(e){const t=this.calculateServiceMbsInRenderSR(e);if(!this._isMBSinClippingArea(t))return!1;if(!this._useFrustumCulling)return!0;const i=this.getAndUpdateVisibilityObbInRenderSR(e);return i?i.intersectsFrustumConservativeApproximation(this._frustum):C(this._frustum,t)}isElevationAgnosticBoundingVolumeVisible(e){return!this._useFrustumCulling||(!e.valid||(1===this._viewingMode?this._isConeVisibleInFrustum(e):this._isCylinderVisibleInFrustum(e)))}_isConeVisibleInFrustum(r){if(!this._isConeVisibleInFrustumMbs(r))return!1;const n=r.radius;if(-1===n||n>.9)return!0;const o=this._frustumPlanes,a=this._frustumMbsCenter,c=r.getAxis($),u=i(c,a),h=this._frustumMbsRadius,d=u-h,m=u+h;if(d<=0)return!0;const _=l(k,c,d),p=l(z,c,m),f=n/Math.sqrt(1-n*n);for(const v of o){const r=D(v),n=e(H,r),o=i(n,c);if(Math.abs(1-o)<.01)continue;const a=J;l(a,c,o),t(a,a,n),e(a,a);const u=K;s(u,_,a,d*f);if(P(v,u)<=0)continue;s(u,p,a,m*f);if(P(v,u)<=0)continue;return!1}return!0}_isConeVisibleInFrustumMbs(e){const t=e.radius;if(t>.9)return!0;const s=this._frustumMbsRadius,r=this._frustumMbsCenter,n=c(r);if(n<=s)return!0;const o=e.getAxis($),a=i(o,r);{const e=l(T,o,a);if(h(e,r)<s)return!0}const u=a/n;if(a<=0){return-u<s}const d=Math.sqrt(1-u*u);if(d<t)return!0;const m=s/n;return d*Math.sqrt(1-m*m)-m*u<t}isObbVisibleIndependentOfElevation(e,t){if(!this._useFrustumCulling)return!0;if(!e.valid)return!0;const s=this._frustumMbsRadius,r=this._frustumMbsCenter,n=this._frustumPlanes,o=X;if(t.getCorners(o),1===this._viewingMode){const t=e.getAxis($),a=i(t,r),c=a-s,u=a+s;if(c<=0)return!0;for(const e of n){let s=!0;for(const r of o){const n=i(r,t),o=Q;if(l(o,r,c/n),P(e,o)<=0){s=!1;break}const a=Q;if(l(a,r,u/n),P(e,a)<=0){s=!1;break}}if(s)return!1}}else{const e=r[2]-s,t=r[2]+s;for(const i of n){let s=!0;const r=D(i),n=r[0],a=r[1],c=r[2],u=i[3];for(const i of o){const r=n*i[0]+a*i[1]+u;if(r+c*e<=0||r+c*t<=0){s=!1;break}}if(s)return!1}}return!0}_isCylinderVisibleInFrustum(e){const t=this._frustumMbsCenter,i=this._frustumMbsRadius,s=a(T,t);s[2]=0;const r=e.radius,n=e.getAxis($);return h(s,n)<=r+i}isGeometryVisible(e){if(!this._useFrustumCulling)return!0;const t=e.geometryObbInRenderSR;return t?.intersectsFrustumConservativeApproximation(this._frustum)??this.isNodeVisible(e)}_isMBSinClippingArea(e){return null==this._clippingArea||0!==L(this._clippingArea,e)}_screenSpaceDiameterMbs(e,t){const i=this.calculateServiceMbsInRenderSR(e),s=Math.sqrt(d(i.center,this._camPos)),r=s-i.radius;return this._updateMinMaxDistance(s),r<0?.5*Number.MAX_VALUE:t/r*this._screenSizeFactor}calcCameraDistance(e){return this.calcCameraDistanceToCenter(e)-this.calculateServiceMbsInRenderSR(e).radius}calcCameraDistanceToCenter(e){const t=this.calculateServiceMbsInRenderSR(e),i=m(t.center,this._camPos);return this._updateMinMaxDistance(i),i}calcAngleDependentLoD(e){const{center:s,radius:r}=this.calculateServiceMbsInRenderSR(e),n=t(Y,s,this._camPos),o=(Math.abs(i(s,n))/_(s)+r)/_(n);return Math.min(1,o)}hasLOD(e){return 0!==e.lodMetric}_getDistanceGlobeMode(e,t){const s=_(t.center),r=_(e)-s;l(te,e,i(e,t.center)/p(e));const n=d(t.center,te),a=t.radius;if(n<=a*a)return Math.abs(r);{const n=l(te,t.center,1/s),c=l(ie,n,s-a*a/2/s),u=e,h=o(se,u,c),d=o(se,h,l(re,n,i(n,h))),p=f(se,c,l(se,d,a/_(d)));let v=m(u,p);if(r>=2e5){const e=o(ie,u,p);let t=i(e,n)/_(e);t<.08&&(t=1e-4),v/=t}return v}}_getDistance(e,t){return this._isGlobalMode?this._getDistanceGlobeMode(e,t):G(e,t)}_updateMinMaxDistance(e){e>0?(this.minDistance=Math.min(this.minDistance,e),this.maxDistance=Math.max(this.maxDistance,e)):(this.minDistance=0,this.maxDistance=Math.max(this.maxDistance,-e))}getLodLevel(e){if(0===e.lodMetric)return 0;if(0===e.childCount)return this.maxLodLevel;if(this._useFrustumCulling&&this._progressiveLoadFactor<1){const t=this._progressiveLoadFactor*this._screenspaceErrorBias,i=this._screenspaceErrorBias;return this.evaluateLODmetric(e,t)?this.evaluateLODmetric(e,i)?2:1:0}return this.evaluateLODmetric(e,this._screenspaceErrorBias)?this.maxLodLevel:0}evaluateLODmetric(e,t){switch(e.lodMetric){case 2:{const i=this.calculateServiceMbsInRenderSR(e),s=this._getDistance(this._camPos,i),r=2*s/this._screenSizeFactor,n=s+i.radius;return this._updateMinMaxDistance(n),e.maxError*t<=r}case 1:{let i=this._screenSpaceDiameterMbs(e,(e.serviceMbsInIndexSR?.radius??0)*t);return this._options.angleDependentLoD&&(i*=this.calcAngleDependentLoD(e)),i<e.maxError}case 3:return this._screenSpaceDiameterMbs(e,e.maxError)*t<10;case 4:return this.calcCameraDistance(e)>e.maxError*t}return!1}distToCameraPOIRay(e){if(null==e)return 0;const t=this.calculateServiceMbsInRenderSR(e),s=t.center,r=i(s,this._cameraPOIDirection),n=r*r,o=p(s)-n;return Math.sqrt(o)-t.radius}distCameraToPOI(){return m(this._camPos,this._poi)}}function G(e,t){const i=e[0]-t.center[0],s=e[1]-t.center[1],r=e[2]-t.center[2],n=i*i+s*s,o=t.radius;if(n<=o*o)return Math.abs(r);const a=Math.sqrt(n)-o;return Math.sqrt(r*r+a*a)}const U=I(),N=v(),T=v(),k=v(),z=v(),H=v(),W=new j,Z=v(),X=[v(),v(),v(),v(),v(),v(),v(),v()],Y=v(),J=v(),K=v(),Q=v(),$=v(),ee=new O,te=v(),ie=v(),se=v(),re=v();export{q as default};
|
|
5
|
+
import{n as e,a as t,g as i,c as s,h as n,E as r,e as o,u as a,G as c,d as u,j as l,F as d,B as h,b as m,D as _,s as p,i as f}from"../../../../chunks/vec32.js";import{create as v}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as R}from"../../../../geometry/ellipsoidUtils.js";import{getSphericalPCPF as S}from"../../../../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingSphere as b}from"../../../../geometry/projection/projectBoundingSphere.js";import{getProjector as g}from"../../../../geometry/projection/projectors.js";import{create as M,fromMatrix as x,createPoints as I,intersectsSphere as C}from"../../../../geometry/support/frustum.js";import{getNormal as E,signedDistance as D}from"../../../../geometry/support/plane.js";import{isPlateCarree as P}from"../../../../geometry/support/spatialReferenceUtils.js";import{Sphere as A}from"../../../../geometry/support/sphere.js";import{evaluateElevationAlignmentAtPoint as F}from"../graphics/elevationAlignmentUtils.js";import{ElevationContext as O}from"../graphics/ElevationContext.js";import{createContextWithoutExpressionSupport as V,extractExpressionInfo as j}from"../graphics/featureExpressionInfoUtils.js";import{intersectBoundingRectWithMbs as B}from"./I3SUtil.js";import{SphereCylinderLocal as L,SphereConeGlobal as w}from"./SphereCone.js";import{Obb as y,computeOffsetObb as U}from"../../support/orientedBoundingBox.js";const G=1e5;class q{get _frustumMbsCenter(){return this._frustumMbs.center}get _frustumMbsRadius(){return this._frustumMbs.radius}get _frustumPlanes(){return this._frustum}constructor(e,t,i,s,n,r,o,a,c={}){this._indexSR=e,this._renderCoordsHelper=t,this._clippingArea=n,this._elevationProvider=r,this._viewingMode=o,this._options=c,this._frustum=M(),this._frustumMbs=new A,this._viewDirection=v(),this._useFrustumCulling=!1,this._poi=v(),this._cameraPOIDirection=v(),this._elevationContext=null,this.minDistance=1/0,this.maxDistance=0,this.maxLodLevel=2,this._screenspaceErrorBias=c.screenspaceErrorBias||1,this._progressiveLoadFactor=c.progressiveLoadFactor||1,this.updateCamera(i,s);const u=this._renderCoordsHelper.spatialReference;this._renderSR=u,this._renderSRSphericalPCPF=S(u),this._isGlobalMode=u===this._renderSRSphericalPCPF,this.updateElevationInfo(a),this._isECEFOBBInLocalMode=this._indexSR.isWGS84&&(u.isWebMercator||P(u)),this._indexSREllipsoidRadius=R(this._indexSR).radius,this._indexSRSphericalPCPF=S(e),this._projectorIndexSRToIndexSRSphericalPCPF=g(this._indexSR,this._indexSRSphericalPCPF)}updateElevationInfo(e){null!=e?(this._elevationContext=O.fromElevationInfo(e),this._elevationContext.setFeatureExpressionInfoContext(V(j(e,!1)))):this._elevationContext=null}updateCamera(n,r){if(this._useFrustumCulling=r,e(this._viewDirection,n.viewForward),r){x(n.viewMatrix,n.projectionMatrix,this._frustum,T);{const e=n.eye,r=k;t(r,T[4],e);const o=.5*i(r,r)/i(this._viewDirection,r),a=this._frustumMbs,c=a.center;s(c,e,this._viewDirection,o);const u=1+o;a.radius=u}}this._screenSizeFactor=1/(n.perScreenPixelRatio/2),this._camPos=n.eye,this._updateCameraPOIDirection(),this.minDistance=1/0,this.maxDistance=0}setPointOfInterest(e){this._poi=e,this._updateCameraPOIDirection()}updateScreenSpaceErrorBias(e){const t=this._screenspaceErrorBias;return this._screenspaceErrorBias=e,t}updateClippingArea(e){this._clippingArea=e}expandElevationRange(e,t,i){if(null==this._elevationContext)return;const s=e.serviceMbsInIndexSR;if(!s)return;const n="relative-to-scene"===this._elevationContext.mode?"scene":"ground",r=this._elevationProvider;if(r.getSphereElevationRange){const e=r.getSphereElevationRange(s,this._indexSR,n);if(e)return void i.expandElevationRange(e)}const[o,a,c]=s.center,u=r.getElevation(o,a,c,this._indexSR,n);u&&i.expandElevationRangeValues(u,u);const l=t?null:r.getRootElevationRange?.();l&&i.expandElevationRange(l)}calculateServiceMbsInRenderSR(e){const{serviceMbsInRenderSR:t}=e;if(t.isValid)return t;const{serviceMbsInIndexSR:i}=e;if(!i?.isValid)return t;const s=ie;return b(i,this._indexSR,s,this._renderSR),e.updateServiceMbsInRenderSR(s)}calculateServiceMbsInRenderSRElevationAdjusted(e){const{serviceMbsInRenderSRElevationAdjusted:t}=e;if(t.isValid)return t;const{serviceMbsInIndexSR:i}=e,s=this.calculateServiceMbsInRenderSR(e);if(!s.isValid||!i?.isValid)return t;const n=ie;n.copyFrom(s);const{_elevationContext:r}=this;if(r){const{minElevation:t}=e,{_renderCoordsHelper:s}=this,o=i.center;let a=0;if(Number.isFinite(t)){let i=0,c=0;const{maxElevation:u}=e,l=o[2];switch(r.mode){case"relative-to-ground":case"relative-to-scene":i=r.geometryZWithOffset(l,s)+t-l,c=u-t;break;case"on-the-ground":i=t-l,c=u-t}a=i+.5*c,n.radius+=.5*c}else n.radius<G&&(a=F(o,this._elevationProvider,r,s)-o[2]);a&&ae(n,a,this._viewingMode)}return e.updateServiceMbsInRenderSRElevationAdjusted(n)}calculateMbsConeInRenderSR(e){const{mbsConeInRenderSR:t}=e;if(t)return t;if(!e.elevationRangeValid)return null;const{minElevation:i,maxElevation:s}=e;if(!(Number.isFinite(i)&&i<s))return null;const n=this.calculateServiceMbsInRenderSR(e);if(!n.isValid)return null;const r=this._renderCoordsHelper.referenceEllipsoid.radius,o=2===this._viewingMode?new L(n,i,s):new w(n,r+i,r+s);return e.updateMbsConeInRenderSR(o)}getAndUpdateVisibilityObbInRenderSR(e){{const t=e.visibilityObbInRenderSR;if(t)return t}const t=.01*this._indexSREllipsoidRadius,{serviceMbsInIndexSR:i,serviceObbInIndexSR:s}=e;if(null==s||!i||!s.isValid||this._isECEFOBBInLocalMode&&(s.halfSizeX>t||s.halfSizeY>t||s.halfSizeZ>t))return null;{let t=e.serviceObbInRenderSR;if(null==t)t=new y,e.serviceObbInRenderSR=t;else if(t.isValid)return t;const r=i.radius;let o=0,a=0;const c=s.centerZ,u=this._renderCoordsHelper,l=this._elevationContext;if(l&&e.elevationRangeValid){const{minElevation:t,maxElevation:i}=e;switch(l.mode){case"relative-to-ground":case"relative-to-scene":o=l.geometryZWithOffset(c,u)+t-c,a=i-t;break;case"on-the-ground":o=t-c,a=i-t}}else if(l&&r<G){const e=n(Y,s.centerX,s.centerY,c);o=F(e,this._elevationProvider,l,u)-c}const d=a>0,h=d?X:t;return s.transform(h,this._indexSR,this._renderSR,o,this._renderSRSphericalPCPF,this._indexSRSphericalPCPF,this._projectorIndexSRToIndexSRSphericalPCPF),d&&U(h,0,a,this._viewingMode,t),t}}getNodeObbInRenderSRIndependentOfElevationOffset(e){{const t=e.visibilityObbInRenderSR??e.serviceObbInRenderSR??null;if(t?.isValid)return t}const t=e.serviceObbInIndexSR;return t?(t.transform(X,this._indexSR,this._renderSR,void 0,this._renderSRSphericalPCPF,this._indexSRSphericalPCPF,this._projectorIndexSRToIndexSRSphericalPCPF),X):null}ensureElevationAgnosticBoundingVolume(e){return!e.elevationAgnosticBoundingVolume.valid&&e.level>0&&(1===this._viewingMode?this._updateElevationAgnosticBoundingVolumeGlobal(e):this._updateElevationAgnosticBoundingVolumeLocal(e)),e.elevationAgnosticBoundingVolume}_updateCameraPOIDirection(){r(this._poi,this._camPos)?this._cameraPOIDirection=this._viewDirection:(o(this._cameraPOIDirection,this._camPos,this._poi),e(this._cameraPOIDirection,this._cameraPOIDirection))}_updateElevationAgnosticBoundingVolumeGlobal(t){const s=this.getNodeObbInRenderSRIndependentOfElevationOffset(t),n=t.elevationAgnosticBoundingVolume;let r,o=-1;if(s){const t=Y;s.getCenter(t),e(t,t),r=t,s.getCorners(J);for(const s of J){e(s,s);const r=i(s,t);if(r<=0)return void n.invalidate();const a=Math.sqrt(1-r*r);o=Math.max(o,a)}}else{const i=t.serviceMbsInRenderSR;if(!i.isValid)return void n.invalidate();const{center:s,radius:c}=i,u=a(s);if(u<c)return void n.invalidate();o=c/u,r=e(te,s)}n.set(r,o+ce)}_updateElevationAgnosticBoundingVolumeLocal(e){const t=e.elevationAgnosticBoundingVolume,i=this.getNodeObbInRenderSRIndependentOfElevationOffset(e);if(i){const e=i.getCenter(Y);e[2]=0;let s=0;const n=K;i.getCorners(J);for(const t of J){t[2]=0;const e=c(n,t);s=Math.max(s,e)}t.set(e,Math.sqrt(s))}else{const i=e.serviceMbsInRenderSR;if(i.isValid){const e=u(Y,i.center);e[2]=0,t.set(e,i.radius)}}}isNodeVisible(e){if(!this._isMBSinClippingArea(this.calculateServiceMbsInRenderSR(e)))return!1;if(!this._useFrustumCulling)return!0;const t=this.getAndUpdateVisibilityObbInRenderSR(e);return t?t.intersectsFrustumConservativeApproximation(this._frustum):C(this._frustum,this.calculateServiceMbsInRenderSRElevationAdjusted(e))}isElevationAgnosticBoundingVolumeVisible(e){return!this._useFrustumCulling||(!e.valid||(1===this._viewingMode?this._isConeVisibleInFrustum(e):this._isCylinderVisibleInFrustum(e)))}_isConeVisibleInFrustum(n){if(!this._isConeVisibleInFrustumMbs(n)||!n.valid)return!1;const r=n.radius;if(r>.9)return!0;const o=this._frustumPlanes,a=this._frustumMbsCenter,c=n.getAxis(te),u=i(c,a),d=this._frustumMbsRadius,h=u-d,m=u+d;if(h<=0)return!0;const _=l(W,c,h),p=l(H,c,m),f=r/Math.sqrt(1-r*r);for(const v of o){const n=E(v),r=e(Z,n),o=i(r,c);if(Math.abs(1-o)<.01)continue;const a=Q;l(a,c,o),t(a,a,r),e(a,a);const u=$;s(u,_,a,h*f);if(D(v,u)<=0)continue;s(u,p,a,m*f);if(D(v,u)<=0)continue;return!1}return!0}_isConeVisibleInFrustumMbs(e){const t=e.radius;if(t>.9)return!0;const s=this._frustumMbsRadius,n=this._frustumMbsCenter,r=a(n);if(r<=s)return!0;const o=e.getAxis(te),c=i(o,n);{const e=l(z,o,c);if(d(e,n)<s)return!0}const u=c/r;if(c<=0){return-u<s}const h=Math.sqrt(1-u*u);if(h<t)return!0;const m=s/r;return h*Math.sqrt(1-m*m)-m*u<t}isObbVisibleIndependentOfElevation(e,t){if(!this._useFrustumCulling)return!0;if(!e.valid)return!0;const s=this._frustumMbsRadius,n=this._frustumMbsCenter,r=this._frustumPlanes,o=J;if(t.getCorners(o),1===this._viewingMode){const t=e.getAxis(te),a=i(t,n),c=a-s,u=a+s;if(c<=0)return!0;for(const e of r){let s=!0;for(const n of o){const r=i(n,t),o=ee;if(l(o,n,c/r),D(e,o)<=0){s=!1;break}const a=ee;if(l(a,n,u/r),D(e,a)<=0){s=!1;break}}if(s)return!1}}else{const e=n[2]-s,t=n[2]+s;for(const i of r){let s=!0;const n=E(i),r=n[0],a=n[1],c=n[2],u=i[3];for(const i of o){const n=r*i[0]+a*i[1]+u;if(n+c*e<=0||n+c*t<=0){s=!1;break}}if(s)return!1}}return!0}_isCylinderVisibleInFrustum(e){const t=this._frustumMbsCenter,i=this._frustumMbsRadius,s=u(z,t);s[2]=0;const n=e.radius,r=e.getAxis(te);return d(s,r)<=n+i}isGeometryVisible(e){if(!this._useFrustumCulling)return!0;const t=e.geometryObbInRenderSR;return t?.intersectsFrustumConservativeApproximation(this._frustum)??this.isNodeVisible(e)}_isMBSinClippingArea(e){return null==this._clippingArea||0!==B(this._clippingArea,e)}_screenSpaceDiameterMbs(e,t){const i=this.calcCameraDistanceAndUpdateMinmaxWithCone(e);return i<0?.5*Number.MAX_VALUE:t/i*this._screenSizeFactor}calcCameraDistanceAndUpdateMinmaxWithCone(e){const t=this.calculateMbsConeInRenderSR(e),i=t?.calculateSurfaceDistanceFromPoint(this._camPos)??this.calcCameraDistanceAndUpdateMinmax(e);return t&&this._updateMinMaxDistance(i),i}calcCameraDistanceAndUpdateMinmax(e){return this.calcCameraDistanceToCenterAndUpdateMinmax(e)-this.calculateServiceMbsInRenderSRElevationAdjusted(e).radius}calcCameraDistanceToCenterAndUpdateMinmax(e){const t=this.calculateServiceMbsInRenderSRElevationAdjusted(e),i=h(t.center,this._camPos);return this._updateMinMaxDistance(i),i}calcAngleDependentLoD(e){const{center:s,radius:n}=this.calculateServiceMbsInRenderSRElevationAdjusted(e),r=t(K,s,this._camPos),o=(Math.abs(i(s,r))/m(s)+n)/m(r);return Math.min(1,o)}hasLOD(e){return 0!==e.lodMetric}_getDistanceGlobeMode(e,t){const s=m(t.center),n=m(e)-s;l(se,e,i(e,t.center)/_(e));const r=p(t.center,se),a=t.radius;if(r<=a*a)return Math.abs(n);{const r=l(se,t.center,1/s),c=l(ne,r,s-a*a/2/s),u=e,d=o(re,u,c),_=o(re,d,l(oe,r,i(r,d))),p=f(re,c,l(re,_,a/m(_)));let v=h(u,p);if(n>=2e5){const e=o(ne,u,p);let t=i(e,r)/m(e);t<.08&&(t=1e-4),v/=t}return v}}_getDistance(e,t){return this._isGlobalMode?this._getDistanceGlobeMode(e,t):N(e,t)}_updateMinMaxDistance(e){e>0?(this.minDistance=Math.min(this.minDistance,e),this.maxDistance=Math.max(this.maxDistance,e)):(this.minDistance=0,this.maxDistance=Math.max(this.maxDistance,-e))}getLodLevel(e){if(0===e.lodMetric)return 0;if(0===e.childCount)return this.maxLodLevel;if(this._useFrustumCulling&&this._progressiveLoadFactor<1){const t=this._progressiveLoadFactor*this._screenspaceErrorBias,i=this._screenspaceErrorBias;return this.evaluateLODmetric(e,t)?this.evaluateLODmetric(e,i)?2:1:0}return this.evaluateLODmetric(e,this._screenspaceErrorBias)?this.maxLodLevel:0}evaluateLODmetric(e,t){switch(e.lodMetric){case 1:{let i=this._screenSpaceDiameterMbs(e,(e.serviceMbsInIndexSR?.radius??0)*t);return this._options.angleDependentLoD&&(i*=this.calcAngleDependentLoD(e)),i<e.maxError}case 2:{const i=this.calculateServiceMbsInRenderSRElevationAdjusted(e),s=this._getDistance(this._camPos,i),n=2*s/this._screenSizeFactor,r=s+i.radius;return this._updateMinMaxDistance(r),e.maxError*t<=n}case 3:return this._screenSpaceDiameterMbs(e,e.maxError)*t<10;case 4:return this.calcCameraDistanceAndUpdateMinmax(e)>e.maxError*t}return!1}distToCameraPOIRay(e){if(null==e)return 0;const t=this.calculateServiceMbsInRenderSRElevationAdjusted(e),s=t.center,n=i(s,this._cameraPOIDirection),r=n*n,o=_(s)-r;return Math.sqrt(o)-t.radius}distCameraToPOI(){return h(this._camPos,this._poi)}}function N(e,t){const i=e[0]-t.center[0],s=e[1]-t.center[1],n=e[2]-t.center[2],r=i*i+s*s,o=t.radius;if(r<=o*o)return Math.abs(n);const a=Math.sqrt(r)-o;return Math.sqrt(n*n+a*a)}const T=I(),k=v(),z=v(),W=v(),H=v(),Z=v(),X=new y,Y=v(),J=[v(),v(),v(),v(),v(),v(),v(),v()],K=v(),Q=v(),$=v(),ee=v(),te=v(),ie=new A,se=v(),ne=v(),re=v(),oe=v();function ae(e,t,i){if(2===i)e.center[2]+=t;else{const i=m(e.center);l(e.center,e.center,1+t/i)}}const ce=.001;export{q 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 e from"../../../../renderers/PointCloudClassBreaksRenderer.js";import r from"../../../../renderers/PointCloudStretchRenderer.js";import o from"../../../../renderers/PointCloudUniqueValueRenderer.js";import{createGeometryIndexFromSchema as t,createTypedView as n,readBinaryAttribute as l}from"./I3SBinaryReader.js";import{decodeXYZ as s}from"./LEPCC.js";function i(t,n,l,s){const{rendererJSON:i,isRGBRenderer:u}=t;let c=null,a=null;if(n&&u)c=n;else if(n&&"pointCloudUniqueValueRenderer"===i?.type){a=o.fromJSON(i);const e=a.colorUniqueValueInfos;c=new Uint8Array(3*s);const r=d(a.fieldTransformType);for(let o=0;o<s;o++){const t=(r?r(n[o]):n[o])+"";for(let r=0;r<e.length;r++)if(e[r].values.includes(t)){c[3*o]=e[r].color.r,c[3*o+1]=e[r].color.g,c[3*o+2]=e[r].color.b;break}}}else if(n&&"pointCloudStretchRenderer"===i?.type){a=r.fromJSON(i);const e=a.stops;c=new Uint8Array(3*s);const o=d(a.fieldTransformType);for(let r=0;r<s;r++){const t=o?o(n[r]):n[r],l=e.length-1;if(t<e[0].value)c[3*r]=e[0].color.r,c[3*r+1]=e[0].color.g,c[3*r+2]=e[0].color.b;else if(t>=e[l].value)c[3*r]=e[l].color.r,c[3*r+1]=e[l].color.g,c[3*r+2]=e[l].color.b;else for(let o=1;o<e.length;o++)if(t<e[o].value){const n=(t-e[o-1].value)/(e[o].value-e[o-1].value);c[3*r]=e[o].color.r*n+e[o-1].color.r*(1-n),c[3*r+1]=e[o].color.g*n+e[o-1].color.g*(1-n),c[3*r+2]=e[o].color.b*n+e[o-1].color.b*(1-n);break}}}else if(n&&"pointCloudClassBreaksRenderer"===i?.type){a=e.fromJSON(i);const r=a.colorClassBreakInfos;c=new Uint8Array(3*s);const o=d(a.fieldTransformType);for(let e=0;e<s;e++){const t=o?o(n[e]):n[e];for(let o=0;o<r.length;o++)if(t>=r[o].minValue&&t<=r[o].maxValue){c[3*e]=r[o].color.r,c[3*e+1]=r[o].color.g,c[3*e+2]=r[o].color.b;break}}}else c=new Uint8Array(3*s).fill(255);if(l&&a?.colorModulation){const e=a.colorModulation.minValue,r=a.colorModulation.maxValue,o=.3;for(let t=0;t<s;t++){const n=l[t],s=n>=r?1:n<=e?o:o+(1-o)*(n-e)/(r-e);c[3*t]=s*c[3*t],c[3*t+1]=s*c[3*t+1],c[3*t+2]=s*c[3*t+2]}}return c}function u(e,r){if(null==e.encoding||""===e.encoding){const o=t(r,e);if(null==o.vertexAttributes.position)return;const l=n(r,o.vertexAttributes.position),s=o.header.fields,i=[s.offsetX,s.offsetY,s.offsetZ],u=[s.scaleX,s.scaleY,s.scaleZ],c=l.length/3,a=new Float64Array(3*c);for(let e=0;e<c;e++)a[3*e]=l[3*e]*u[0]+i[0],a[3*e+1]=l[3*e+1]*u[1]+i[1],a[3*e+2]=l[3*e+2]*u[2]+i[2];return a}if("lepcc-xyz"===e.encoding)return s(r).result}function c(e,r,o){return e?.attributeInfo.useElevation?r?a(r,o):null:e?.attributeInfo.storageInfo?l(e.attributeInfo.storageInfo,e.buffer,o,!0):null}function a(e,r){const o=new Float64Array(r);for(let t=0;t<r;t++)o[t]=e[3*t+2];return o}function f(e,r,o,t,n){const l=e.length/3;let s=0;for(let i=0;i<l;i++){let l=!0;for(let e=0;e<t.length&&l;e++){const{filterJSON:r}=t[e],o=n[e].values[i];switch(r.type){case"pointCloudValueFilter":{const e="exclude"===r.mode;r.values.includes(o)===e&&(l=!1);break}case"pointCloudBitfieldFilter":{const e=b(r.requiredSetBits),t=b(r.requiredClearBits);(o&e)===e&&0===(o&t)||(l=!1);break}case"pointCloudReturnFilter":{const e=15&o,t=o>>>4&15,n=t>1,s=1===e,i=e===t;let u=!1;for(const o of r.includedReturns)if("last"===o&&i||"firstOfMany"===o&&s&&n||"lastOfMany"===o&&i&&n||"single"===o&&!n){u=!0;break}u||(l=!1);break}}}l&&(o[s]=i,e[3*s]=e[3*i],e[3*s+1]=e[3*i+1],e[3*s+2]=e[3*i+2],r[3*s]=r[3*i],r[3*s+1]=r[3*i+1],r[3*s+2]=r[3*i+2],s++)}return s}function d(e){switch(e){default:case null:case"none":return e=>e;case"low-four-bit":return e=>15&e;case"high-four-bit":return e=>(240&e)>>4;case"absolute-value":return e=>Math.abs(e);case"modulo-ten":return e=>e%10}}function b(e){let r=0;for(const o of e||[])r|=1<<o;return r}export{a as elevationFromPositions,i as evaluateRenderer,f as filterInPlace,c as getAttributeValues,u as readGeometry};
|
|
@@ -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
|
+
import{n as e,b as t,g as s,j as r,B as h}from"../../../../chunks/vec32.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";class i{constructor(e,t){if(this.h1=e,this.h2=t,!(e<t))throw new Error(`Invalid elevated sphere: ${e}..${t}`)}}class n extends i{constructor(t,s,r){if(super(s,r),this.baseSphere=t,s<=0)throw new Error(`Invalid elevated sphere: ${s}..${r}`);this.axis=e(a(),t.center)}clone(){return new n(this.baseSphere,this.h1,this.h2)}calculateSurfaceDistanceFromPoint(e){const i=t(this.baseSphere.center),{h2:n}=this,c=this.baseSphere.radius;if(i<=c){const s=t(e);return Math.max(0,s-(n+c))}const{axis:o,h1:u}=this,p=c*u/i,l=c*n/i,S=i**2-c**2,d=S/c,f=d*u/i,m=d*n/i,x=s(o,e);if(x<=f-p)return this._distanceSphere(e,u,p);if(x>=m)return this._distanceSphere(e,n,l);const b=Math.sqrt(S),M=c*b/i,v=r(a(),o,x),w=h(v,e),_=M*x/d;if(_<=w)return 0;const q=b*n/i,$=b*x/d;return $<=b*u/i?this._distanceSphere(e,u,p):$>=q?this._distanceSphere(e,n,l):(w-_)*x/$}_distanceSphere(e,t,s){const i=r(a(),this.axis,t),n=h(i,e);return n<s?0:n-s}}class c extends i{constructor(e,t,s){super(t,s),this.baseSphere=e}clone(){return new c(this.baseSphere,this.h1,this.h2)}calculateSurfaceDistanceFromPoint(e){const{center:t,radius:s}=this.baseSphere,r=e[2],h=(e[0]-t[0])**2+(e[1]-t[1])**2,{h1:a,h2:i}=this;return r<=a?Math.max(0,Math.sqrt(h+(r-a)**2)-s):r>=i?Math.max(0,Math.sqrt(h+(r-i)**2)-s):Math.max(0,Math.sqrt(h)-s)}}export{i as SphereCone,n as SphereConeGlobal,c as SphereCylinderLocal};
|
|
@@ -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"../../../../core/has.js";import{clamp as t}from"../../../../core/mathUtils.js";import{fromMat4 as o}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{identity as i,copy as s,set as r,multiply as n,scale as l,translate as a,rotateZ as u,rotateX as c,rotateY as f}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as m,d}from"../../../../chunks/vec32.js";import{ones as z,zeros as v,create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{f as y}from"../../../../chunks/vec42.js";import{ones as S}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{meterIn as b}from"../../../../renderers/support/lengthUtils.js";import{isString as x,isStringOrNull as g,isNumber as C}from"../../../../support/guards.js";import{debugFlags as k}from"../../support/debugFlags.js";import{olidEnabled as V}from"../../webgl-engine/effects/geometry/olidUtils.js";import{NoParameters as w}from"../../../webgl/NoParameters.js";class j{constructor(t){this.field=t}}class M extends j{constructor(t){super(t),this.minSize=[0,0,0],this.maxSize=[0,0,0],this.offset=[0,0,0],this.factor=[0,0,0],this.type=[0,0,0],this.fallback=[0,0,0]}}class I extends j{constructor(t){super(t),this.colors=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.values=[0,0,0,0,0,0,0,0],this.fallback=[0,0,0,0]}}class N extends j{constructor(t,o=0){super(t),this.fallback=o,this.values=[0,0,0,0,0,0,0,0],this.opacityValues=[0,0,0,0,0,0,0,0]}}class P extends j{constructor(t){super(t),this.offset=[0,0,0],this.factor=[1,1,1],this.type=[0,0,0]}}class T{}function U(t){return null!=t}function D(t,o){t&&t.push(o)}function F(t,o,e,i=p()){const s=t||0,r=o||0,n=e||0;return 0!==s&&u(i,i,-s/180*Math.PI),0!==r&&c(i,i,r/180*Math.PI),0!==n&&f(i,i,n/180*Math.PI),i}function A(t,o,e,i,s){const r=t.minSize,n=t.maxSize;if(t.useSymbolValue){const t=i.symbolSize[e];return o.minSize[e]=t,o.maxSize[e]=t,o.offset[e]=o.minSize[e],o.factor[e]=0,o.type[e]=1,!0}if(U(t.field))return U(t.stops)?2===t.stops.length&&C(t.stops[0].size)&&C(t.stops[1].size)?(R(t.stops[0].size,t.stops[1].size,t.stops[0].value,t.stops[1].value,o,e),o.type[e]=1,!0):(D(s,"Could not convert size info: stops only supported with 2 elements"),!1):C(r)&&C(n)&&U(t.minDataValue)&&U(t.maxDataValue)?(R(r,n,t.minDataValue,t.maxDataValue,o,e),o.type[e]=1,!0):"unknown"===t.valueUnit?(D(s,"Could not convert size info: proportional size not supported"),!1):null!=b[t.valueUnit]?(o.minSize[e]=-1/0,o.maxSize[e]=1/0,o.offset[e]=0,o.factor[e]=1/b[t.valueUnit],o.type[e]=1,!0):(D(s,"Could not convert size info: scale-dependent size not supported"),!1);if(!U(t.field)){if(t.stops?.[0]&&C(t.stops[0].size))return o.minSize[e]=t.stops[0].size,o.maxSize[e]=t.stops[0].size,o.offset[e]=o.minSize[e],o.factor[e]=0,o.type[e]=1,!0;if(C(r))return o.minSize[e]=r,o.maxSize[e]=r,o.offset[e]=r,o.factor[e]=0,o.type[e]=1,!0}return D(s,"Could not convert size info: unsupported variant of sizeInfo"),!1}function R(t,o,e,i,s,r){const n=Math.abs(i-e)>0?(o-t)/(i-e):0;s.minSize[r]=n>0?t:o,s.maxSize[r]=n>0?o:t,s.offset[r]=t-e*n,s.factor[r]=n}function E(t,o,e,i){if(t.normalizationField||t.valueRepresentation)return D(i,"Could not convert size info: unsupported property"),null;if(!g(t.field))return D(i,"Could not convert size info: field is not a string"),null;if(o.size){if(t.field)if(o.size.field){if(t.field!==o.size.field)return D(i,"Could not convert size info: multiple fields in use"),null}else o.size.field=t.field}else o.size=new M(t.field),d(o.size.fallback,e.fallbackSize);let s;switch(t.axis){case"width":return s=A(t,o.size,0,e,i),s?o:null;case"height":return s=A(t,o.size,2,e,i),s?o:null;case"depth":return s=A(t,o.size,1,e,i),s?o:null;case"width-and-depth":return s=A(t,o.size,0,e,i),s&&A(t,o.size,1,e,i),s?o:null;case null:case void 0:case"all":return s=A(t,o.size,0,e,i),s=s&&A(t,o.size,1,e,i),s=s&&A(t,o.size,2,e,i),s?o:null;default:return D(i,`Could not convert size info: unknown axis "${t.axis}""`),null}}function O(t,o,e){for(let s=0;s<3;++s){let e=o.unitInMeters;1===t.type[s]&&(e*=o.modelSize[s],t.type[s]=2),t.minSize[s]=t.minSize[s]/e,t.maxSize[s]=t.maxSize[s]/e,t.offset[s]=t.offset[s]/e,t.factor[s]=t.factor[s]/e}let i;if(0!==t.type[0])i=0;else if(0!==t.type[1])i=1;else{if(0===t.type[2])return D(e,"No size axis contains a valid size or scale"),!1;i=2}for(let s=0;s<3;++s)0===t.type[s]&&(t.minSize[s]=t.minSize[i],t.maxSize[s]=t.maxSize[i],t.offset[s]=t.offset[i],t.factor[s]=t.factor[i],t.type[s]=t.type[i]);return!0}function _(t,o,e){t[4*o]=e.r/255,t[4*o+1]=e.g/255,t[4*o+2]=e.b/255,t[4*o+3]=e.a}function q(t,o,e,i){if(t.normalizationField)return D(i,"Could not convert color info: unsupported property"),null;if(x(t.field)){if(!t.stops)return D(i,"Could not convert color info: missing stops or colors"),null;{if(t.stops.length>8)return D(i,"Could not convert color info: too many color stops"),null;o.color=new I(t.field);const s=t.stops;for(let t=0;t<8;++t){const e=s[Math.min(t,s.length-1)];o.color.values[t]=e.value,_(o.color.colors,t,e.color)}y(o.color.fallback,e.fallbackColor)}}else{if(!(t.stops&&t.stops.length>=0))return D(i,"Could not convert color info: no field and no colors/stops"),null;{const i=t.stops&&t.stops.length>=0&&t.stops[0].color;o.color=new I(null);for(let t=0;t<8;t++)o.color.values[t]=1/0,_(o.color.colors,t,i);y(o.color.fallback,e.fallbackColor)}}return o}function $(t,o,e,i){if(t.normalizationField)return D(i,"Could not convert opacity info: unsupported property"),null;if(x(t.field)){if(!t.stops)return D(i,"Could not convert opacity info: missing stops or opacities"),null;{if(t.stops.length>8)return D(i,"Could not convert opacity info: too many opacity stops"),null;o.opacity=new N(t.field,e.fallbackColor[3]);const s=t.stops;for(let t=0;t<8;++t){const e=s[Math.min(t,s.length-1)];o.opacity.values[t]=e.value,o.opacity.opacityValues[t]=e.opacity}}}else{if(!(t.stops&&t.stops.length>=0))return D(i,"Could not convert opacity info: no field and no opacities/stops"),null;{const i=t.stops&&t.stops.length>=0?t.stops[0].opacity:0;o.opacity={field:null,values:[0,0,0,0,0,0,0,0],opacityValues:[0,0,0,0,0,0,0,0],fallback:e.fallbackColor[3]};for(let t=0;t<8;t++)o.opacity.values[t]=1/0,o.opacity.opacityValues[t]=i}}return o}function B(t,o,e){const i=2===e&&"arithmetic"===t.rotationType;o.offset[e]=i?90:0,o.factor[e]=i?-1:1,o.type[e]=1}function L(t,o,e){if(!x(t.field))return D(e,"Could not convert rotation info: field is not a string"),null;if(o.rotation){if(t.field)if(o.rotation.field){if(t.field!==o.rotation.field)return D(e,"Could not convert rotation info: multiple fields in use"),null}else o.rotation.field=t.field}else o.rotation={field:t.field,offset:[0,0,0],factor:[1,1,1],type:[0,0,0]};switch(t.axis){case"tilt":return B(t,o.rotation,0),o;case"roll":return B(t,o.rotation,1),o;case null:case void 0:case"heading":return B(t,o.rotation,2),o;default:return D(e,`Could not convert rotation info: unknown axis "${t.axis}""`),null}}class G{constructor({supports:t,modelSize:o,symbolSize:e,unitInMeters:i,anchor:s,scale:r,rotation:n,fallbackColor:l,fallbackSize:a}){this.supports=t,this.modelSize=o??z(),this.symbolSize=e??z(),this.unitInMeters=i??1,this.anchor=s??v(),this.scale=r??z(),this.rotation=n??v(),this.fallbackColor=l??S(),this.fallbackSize=a??z()}}function H(t,o,e){if(!t)return null;const i=t.reduce((t,i)=>{if(!t)return t;if(i.valueExpression)return D(e,"Could not convert visual variables: arcade expressions not supported"),null;switch(i.type){case"size":return o.supports.size?E(i,t,o,e):t;case"color":return o.supports.color?q(i,t,o,e):t;case"opacity":return o.supports.opacity?$(i,t,o,e):null;case"rotation":return o.supports.rotation?L(i,t,e):t;default:return null}},new T);return!(t.length>0&&i)||i.size||i.color||i.opacity||i.rotation?i?.size&&!O(i.size,o,e)?null:i:null}class J{constructor(t,o,e){this.visualVariables=t,this.materialParameters=o,this.requiresShaderTransformation=e}}function K(t,o){if(!t)return null;if(V())return null;if(k.TESTS_DISABLE_FAST_UPDATES)return null;const e=H(t.visualVariables,o);return e?new J(e,Y(e,o),!!e.size):null}function Q(t,o,e){if(!o||!t)return!1;const i=t.visualVariables,s=H(o.visualVariables,e);return!!s&&(!!(W(i.size,s.size,"size")&&W(i.color,s.color,"color")&&W(i.rotation,s.rotation,"rotation")&&W(i.opacity,s.opacity,"opacity"))&&(t.visualVariables=s,t.materialParameters=Y(s,e),t.requiresShaderTransformation=!!s.size,!0))}function W(t,o,e){if(!!t!=!!o)return!1;if(t&&t.field!==o?.field)return!1;if(t&&"rotation"===e){const e=t,i=o;for(let t=0;t<3;t++)if(e.type[t]!==i.type[t]||e.offset[t]!==i.offset[t]||e.factor[t]!==i.factor[t])return!1}return!0}class X extends w{constructor(t){super(),this.vvSize=t?.size??null,this.vvColor=t?.color??null,this.vvOpacity=t?.opacity??null}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}function Y(t,s){const r=new X(t);return r.vvSize&&(r.vvSymbolAnchor=s.anchor,i(st),F(s.rotation[2],s.rotation[0],s.rotation[1],st),r.vvSymbolRotationMatrix=r.vvSymbolRotationMatrix||e(),o(r.vvSymbolRotationMatrix,st)),r}function Z(t,o,e){if(!t.vvSize)return e;s(et,e);const i=t.vvSymbolRotationMatrix;return r(st,i[0],i[1],i[2],0,i[3],i[4],i[5],0,i[6],i[7],i[8],0,0,0,0,1),n(et,et,st),tt(it,t,o),l(et,et,it),a(et,et,t.vvSymbolAnchor),et}function tt(o,e,i){if(!e.vvSize)return m(o,1,1,1),o;if(Number.isNaN(i[0]))return d(o,e.vvSize.fallback);for(let s=0;s<3;++s){const r=e.vvSize.offset[s]+i[0]*e.vvSize.factor[s];o[s]=t(r,e.vvSize.minSize[s],e.vvSize.maxSize[s])}return o}function ot(t,o){const e=null==t?0:o.attributes[t];return"number"==typeof e&&isFinite(e)?e:NaN}const et=p(),it=h(),st=p();export{G as ConvertOptions,I as FastColorInfo,N as FastOpacityInfo,P as FastRotationInfo,M as FastSizeInfo,J as FastSymbolUpdatesState,T as FastVisualVariables,X as VisualVariablesParameters,H as convertVisualVariables,Z as evaluateModelTransform,tt as evaluateModelTransformScale,ot as getAttributeValue,Y as getMaterialParameters,K as initFastSymbolUpdatesState,Q as updateFastSymbolUpdatesState};
|
|
5
|
+
import{clamp as t}from"../../../../core/mathUtils.js";import{fromMat4 as o}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{identity as i,copy as s,set as r,multiply as n,scale as l,translate as a,rotateZ as u,rotateX as c,rotateY as f}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as m,d}from"../../../../chunks/vec32.js";import{ones as z,zeros as v,create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{f as y}from"../../../../chunks/vec42.js";import{ones as S}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{meterIn as b}from"../../../../renderers/support/lengthUtils.js";import{isString as x,isStringOrNull as g,isNumber as C}from"../../../../support/guards.js";import{debugFlags as k}from"../../support/debugFlags.js";import{olidEnabled as V}from"../../webgl-engine/effects/geometry/olidUtils.js";import{NoParameters as w}from"../../../webgl/NoParameters.js";class j{constructor(t){this.field=t}}class M extends j{constructor(t){super(t),this.minSize=[0,0,0],this.maxSize=[0,0,0],this.offset=[0,0,0],this.factor=[0,0,0],this.type=[0,0,0],this.fallback=[0,0,0]}}class I extends j{constructor(t){super(t),this.colors=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.values=[0,0,0,0,0,0,0,0],this.fallback=[0,0,0,0]}}class N extends j{constructor(t,o=0){super(t),this.fallback=o,this.values=[0,0,0,0,0,0,0,0],this.opacityValues=[0,0,0,0,0,0,0,0]}}class P extends j{constructor(t){super(t),this.offset=[0,0,0],this.factor=[1,1,1],this.type=[0,0,0]}}class T{}function U(t){return null!=t}function D(t,o){t&&t.push(o)}function F(t,o,e,i=p()){const s=t||0,r=o||0,n=e||0;return 0!==s&&u(i,i,-s/180*Math.PI),0!==r&&c(i,i,r/180*Math.PI),0!==n&&f(i,i,n/180*Math.PI),i}function A(t,o,e,i,s){const r=t.minSize,n=t.maxSize;if(t.useSymbolValue){const t=i.symbolSize[e];return o.minSize[e]=t,o.maxSize[e]=t,o.offset[e]=o.minSize[e],o.factor[e]=0,o.type[e]=1,!0}if(U(t.field))return U(t.stops)?2===t.stops.length&&C(t.stops[0].size)&&C(t.stops[1].size)?(R(t.stops[0].size,t.stops[1].size,t.stops[0].value,t.stops[1].value,o,e),o.type[e]=1,!0):(D(s,"Could not convert size info: stops only supported with 2 elements"),!1):C(r)&&C(n)&&U(t.minDataValue)&&U(t.maxDataValue)?(R(r,n,t.minDataValue,t.maxDataValue,o,e),o.type[e]=1,!0):"unknown"===t.valueUnit?(D(s,"Could not convert size info: proportional size not supported"),!1):null!=b[t.valueUnit]?(o.minSize[e]=-1/0,o.maxSize[e]=1/0,o.offset[e]=0,o.factor[e]=1/b[t.valueUnit],o.type[e]=1,!0):(D(s,"Could not convert size info: scale-dependent size not supported"),!1);if(!U(t.field)){if(t.stops?.[0]&&C(t.stops[0].size))return o.minSize[e]=t.stops[0].size,o.maxSize[e]=t.stops[0].size,o.offset[e]=o.minSize[e],o.factor[e]=0,o.type[e]=1,!0;if(C(r))return o.minSize[e]=r,o.maxSize[e]=r,o.offset[e]=r,o.factor[e]=0,o.type[e]=1,!0}return D(s,"Could not convert size info: unsupported variant of sizeInfo"),!1}function R(t,o,e,i,s,r){const n=Math.abs(i-e)>0?(o-t)/(i-e):0;s.minSize[r]=n>0?t:o,s.maxSize[r]=n>0?o:t,s.offset[r]=t-e*n,s.factor[r]=n}function E(t,o,e,i){if(t.normalizationField||t.valueRepresentation)return D(i,"Could not convert size info: unsupported property"),null;if(!g(t.field))return D(i,"Could not convert size info: field is not a string"),null;if(o.size){if(t.field)if(o.size.field){if(t.field!==o.size.field)return D(i,"Could not convert size info: multiple fields in use"),null}else o.size.field=t.field}else o.size=new M(t.field),d(o.size.fallback,e.fallbackSize);let s;switch(t.axis){case"width":return s=A(t,o.size,0,e,i),s?o:null;case"height":return s=A(t,o.size,2,e,i),s?o:null;case"depth":return s=A(t,o.size,1,e,i),s?o:null;case"width-and-depth":return s=A(t,o.size,0,e,i),s&&A(t,o.size,1,e,i),s?o:null;case null:case void 0:case"all":return s=A(t,o.size,0,e,i),s=s&&A(t,o.size,1,e,i),s=s&&A(t,o.size,2,e,i),s?o:null;default:return D(i,`Could not convert size info: unknown axis "${t.axis}""`),null}}function O(t,o,e){for(let s=0;s<3;++s){let e=o.unitInMeters;1===t.type[s]&&(e*=o.modelSize[s],t.type[s]=2),t.minSize[s]=t.minSize[s]/e,t.maxSize[s]=t.maxSize[s]/e,t.offset[s]=t.offset[s]/e,t.factor[s]=t.factor[s]/e}let i;if(0!==t.type[0])i=0;else if(0!==t.type[1])i=1;else{if(0===t.type[2])return D(e,"No size axis contains a valid size or scale"),!1;i=2}for(let s=0;s<3;++s)0===t.type[s]&&(t.minSize[s]=t.minSize[i],t.maxSize[s]=t.maxSize[i],t.offset[s]=t.offset[i],t.factor[s]=t.factor[i],t.type[s]=t.type[i]);return!0}function _(t,o,e){t[4*o]=e.r/255,t[4*o+1]=e.g/255,t[4*o+2]=e.b/255,t[4*o+3]=e.a}function q(t,o,e,i){if(t.normalizationField)return D(i,"Could not convert color info: unsupported property"),null;if(x(t.field)){if(!t.stops)return D(i,"Could not convert color info: missing stops or colors"),null;{if(t.stops.length>8)return D(i,"Could not convert color info: too many color stops"),null;o.color=new I(t.field);const s=t.stops;for(let t=0;t<8;++t){const e=s[Math.min(t,s.length-1)];o.color.values[t]=e.value,_(o.color.colors,t,e.color)}y(o.color.fallback,e.fallbackColor)}}else{if(!(t.stops&&t.stops.length>=0))return D(i,"Could not convert color info: no field and no colors/stops"),null;{const i=t.stops&&t.stops.length>=0&&t.stops[0].color;o.color=new I(null);for(let t=0;t<8;t++)o.color.values[t]=1/0,_(o.color.colors,t,i);y(o.color.fallback,e.fallbackColor)}}return o}function $(t,o,e,i){if(t.normalizationField)return D(i,"Could not convert opacity info: unsupported property"),null;if(x(t.field)){if(!t.stops)return D(i,"Could not convert opacity info: missing stops or opacities"),null;{if(t.stops.length>8)return D(i,"Could not convert opacity info: too many opacity stops"),null;o.opacity=new N(t.field,e.fallbackColor[3]);const s=t.stops;for(let t=0;t<8;++t){const e=s[Math.min(t,s.length-1)];o.opacity.values[t]=e.value,o.opacity.opacityValues[t]=e.opacity}}}else{if(!(t.stops&&t.stops.length>=0))return D(i,"Could not convert opacity info: no field and no opacities/stops"),null;{const i=t.stops&&t.stops.length>=0?t.stops[0].opacity:0;o.opacity={field:null,values:[0,0,0,0,0,0,0,0],opacityValues:[0,0,0,0,0,0,0,0],fallback:e.fallbackColor[3]};for(let t=0;t<8;t++)o.opacity.values[t]=1/0,o.opacity.opacityValues[t]=i}}return o}function B(t,o,e){const i=2===e&&"arithmetic"===t.rotationType;o.offset[e]=i?90:0,o.factor[e]=i?-1:1,o.type[e]=1}function L(t,o,e){if(!x(t.field))return D(e,"Could not convert rotation info: field is not a string"),null;if(o.rotation){if(t.field)if(o.rotation.field){if(t.field!==o.rotation.field)return D(e,"Could not convert rotation info: multiple fields in use"),null}else o.rotation.field=t.field}else o.rotation={field:t.field,offset:[0,0,0],factor:[1,1,1],type:[0,0,0]};switch(t.axis){case"tilt":return B(t,o.rotation,0),o;case"roll":return B(t,o.rotation,1),o;case null:case void 0:case"heading":return B(t,o.rotation,2),o;default:return D(e,`Could not convert rotation info: unknown axis "${t.axis}""`),null}}class G{constructor({supports:t,modelSize:o,symbolSize:e,unitInMeters:i,anchor:s,scale:r,rotation:n,fallbackColor:l,fallbackSize:a}){this.supports=t,this.modelSize=o??z(),this.symbolSize=e??z(),this.unitInMeters=i??1,this.anchor=s??v(),this.scale=r??z(),this.rotation=n??v(),this.fallbackColor=l??S(),this.fallbackSize=a??z()}}function H(t,o,e){if(!t)return null;const i=t.reduce((t,i)=>{if(!t)return t;if(i.valueExpression)return D(e,"Could not convert visual variables: arcade expressions not supported"),null;switch(i.type){case"size":return o.supports.size?E(i,t,o,e):t;case"color":return o.supports.color?q(i,t,o,e):t;case"opacity":return o.supports.opacity?$(i,t,o,e):null;case"rotation":return o.supports.rotation?L(i,t,e):t;default:return null}},new T);return!(t.length>0&&i)||i.size||i.color||i.opacity||i.rotation?i?.size&&!O(i.size,o,e)?null:i:null}class J{constructor(t,o,e){this.visualVariables=t,this.materialParameters=o,this.requiresShaderTransformation=e}}function K(t,o){if(!t)return null;if(V())return null;if(k.TESTS_DISABLE_FAST_UPDATES)return null;const e=H(t.visualVariables,o);return e?new J(e,Y(e,o),!!e.size):null}function Q(t,o,e){if(!o||!t)return!1;const i=t.visualVariables,s=H(o.visualVariables,e);return!!s&&(!!(W(i.size,s.size,"size")&&W(i.color,s.color,"color")&&W(i.rotation,s.rotation,"rotation")&&W(i.opacity,s.opacity,"opacity"))&&(t.visualVariables=s,t.materialParameters=Y(s,e),t.requiresShaderTransformation=!!s.size,!0))}function W(t,o,e){if(!!t!=!!o)return!1;if(t&&t.field!==o?.field)return!1;if(t&&"rotation"===e){const e=t,i=o;for(let t=0;t<3;t++)if(e.type[t]!==i.type[t]||e.offset[t]!==i.offset[t]||e.factor[t]!==i.factor[t])return!1}return!0}class X extends w{constructor(t){super(),this.vvSize=t?.size??null,this.vvColor=t?.color??null,this.vvOpacity=t?.opacity??null}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}function Y(t,s){const r=new X(t);return r.vvSize&&(r.vvSymbolAnchor=s.anchor,i(st),F(s.rotation[2],s.rotation[0],s.rotation[1],st),r.vvSymbolRotationMatrix=r.vvSymbolRotationMatrix||e(),o(r.vvSymbolRotationMatrix,st)),r}function Z(t,o,e){if(!t.vvSize)return e;s(et,e);const i=t.vvSymbolRotationMatrix;return r(st,i[0],i[1],i[2],0,i[3],i[4],i[5],0,i[6],i[7],i[8],0,0,0,0,1),n(et,et,st),tt(it,t,o),l(et,et,it),a(et,et,t.vvSymbolAnchor),et}function tt(o,e,i){if(!e.vvSize)return m(o,1,1,1),o;if(Number.isNaN(i[0]))return d(o,e.vvSize.fallback);for(let s=0;s<3;++s){const r=e.vvSize.offset[s]+i[0]*e.vvSize.factor[s];o[s]=t(r,e.vvSize.minSize[s],e.vvSize.maxSize[s])}return o}function ot(t,o){const e=null==t?0:o.attributes[t];return"number"==typeof e&&isFinite(e)?e:NaN}const et=p(),it=h(),st=p();export{G as ConvertOptions,I as FastColorInfo,N as FastOpacityInfo,P as FastRotationInfo,M as FastSizeInfo,J as FastSymbolUpdatesState,T as FastVisualVariables,X as VisualVariablesParameters,H as convertVisualVariables,Z as evaluateModelTransform,tt as evaluateModelTransformScale,ot as getAttributeValue,Y as getMaterialParameters,K as initFastSymbolUpdatesState,Q as updateFastSymbolUpdatesState};
|
|
@@ -7,6 +7,10 @@ export interface MediaLayerInteractionOptionsProperties extends Partial<Pick<Med
|
|
|
7
7
|
reshapeOptions?: MediaLayerInteractionReshapeOptionsProperties;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Options for when the media layer view is interactive in 3D.
|
|
12
|
+
* Configure the interaction tool and reshape behavior for media elements.
|
|
13
|
+
*/
|
|
10
14
|
export default abstract class MediaLayerInteractionOptions extends Accessor {
|
|
11
15
|
/** Changes the behavior of the `reshape` tool. */
|
|
12
16
|
get reshapeOptions(): MediaLayerInteractionReshapeOptions;
|
|
@@ -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}from"../../../../core/screenUtils.js";import{fromValues as n,fromArray as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isExtrudeSymbol3DLayer as o,isFillSymbol3DLayer as r}from"./layerUtils.js";function i(e){return e&&e.enabled&&(o(e)||r(e))&&null!=e.edges}function c(e){return e&&e.enabled&&e.edges||null}function s(e,n){return l(c(e),n)}function l(o,r){if(null==o)return null;const i=null!=o.color?t(o.color.toUnitRGBA()):n(0,0,0,0),c=e(o.size),s=e(o.extensionLength);switch(o.type){case"solid":return u({color:i,size:c,extensionLength:s,...r});case"sketch":return a({color:i,size:c,extensionLength:s,...r});default:return}}function u(e){return{...f,...e,type:0}}function a(e){return{...p,...e,type:1}}const f={color:n(0,0,0,.2),size:1,extensionLength:0,opacity:1,objectTransparency:1,hasSlicePlane:!1},p={color:n(0,0,0,.2),size:1,extensionLength:0,opacity:1,objectTransparency:1,hasSlicePlane:!1};export{s as createMaterial,l as createMaterialFromEdges,u as createSolidEdgeMaterial,i as hasEdges};
|
|
@@ -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"../../../../core/Error.js";import"../../../../
|
|
5
|
+
import e from"../../../../core/Error.js";import"../../../../geometry/SpatialReference.js";import"../../../../geometry/support/aaBoundingBox.js";import"../../../../core/mathUtils.js";import"../../../../geometry/Extent.js";import"../../../../geometry/support/typeUtils.js";import"../../../../layers/support/Field.js";import"../../../../core/has.js";import{equals as t}from"../../../../layers/graphics/dehydratedFeatureComparison.js";class r{constructor(e,t){this.feature=e,this.resolution=t,this.refCount=1}}class s{get isReferenced(){return 0!==this.versions.length}get isSingle(){return 1===this.versions.length&&1===this.versions[0].refCount}constructor(e,t){this._highestResolutionVersion=null,this.versions=[],this.ref(e,t)}ref(e,s){const o=this.feature;n.oldVersion=o,o&&Object.defineProperty(e,"uid",{value:o.uid,configurable:!0});const i=this._highestResolutionVersion;for(const r of this.versions)if(r.resolution===s){r.refCount++;const s=i===r&&!t(e,r.feature);return(s||i!==r)&&(r.feature=e),n.newVersion=s?e:o,n}const u=new r(e,s);return this.versions.push(u),!i||s<i.resolution?(n.newVersion=e,this._highestResolutionVersion=u):n.newVersion=o,n}unref(t){const{versions:r}=this;for(let e=0;e<r.length;e++){const s=r[e];if(s.resolution===t)return s.refCount--,i.oldVersion=this.feature,0===s.refCount&&(r[e]=r[r.length-1],--r.length,this._highestResolutionVersion===s&&(this._recalculateHighestResolutionVersion(),i.oldVersion=s.feature)),i.newVersion=this.feature,i}const s=`Unref feature with no references: ${this.feature?.uid}`;throw new e(s,s,(new Error).stack?.slice(6))}get feature(){return this._highestResolutionVersion?.feature??null}_recalculateHighestResolutionVersion(){if(0===this.versions.length)return void(this._highestResolutionVersion=null);let e=this.versions[0];for(let t=1;t<this.versions.length;t++){const r=this.versions[t];r.resolution<e.resolution&&(e=r)}this._highestResolutionVersion=e}}class o{get isReferenced(){return 0!==this._refCount}get isSingle(){return 1===this._refCount}constructor(e){this._feature=e,this._refCount=1}ref(e){++this._refCount;const r=this._feature;return n.oldVersion=r,r&&Object.defineProperty(e,"uid",{value:r.uid,configurable:!0}),t(r,e)||(this._feature=e),n.newVersion=this._feature,n}unref(){i.oldVersion=this._feature;const t=this._refCount;if(!(t>0)){const t=`Unref feature with no references: ${this.feature?.uid}`;throw new e(t,t,(new Error).stack?.slice(6))}return this._refCount=t-1,1===t?(i.newVersion=null,i):(i.newVersion=this._feature,i)}get feature(){return this._feature}}const i={oldVersion:null,newVersion:null},n={oldVersion:null,newVersion:null};export{r as FeatureVersion,s as MultiFeatureReference,o as SingleFeatureReference};
|
|
@@ -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 e}from"tslib";import r from"../../../../core/Accessor.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import r from"../../../../core/Accessor.js";import t from"../../../../core/Error.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{throwIfAborted as o,createAbortError as i}from"../../../../core/promiseUtils.js";import{difference as a}from"../../../../core/SetUtils.js";import{property as u,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{fromFeatureSetJSON as n}from"../../../../layers/graphics/dehydratedFeatures.js";import{queueAutoPriority as c}from"../../../../request/queue.js";import{runQuery as y,executeQuery as p,executeQueryForCount as d}from"../../../../rest/query/operations/query.js";import{PBFDecoder as m}from"../../support/PBFDecoder.js";let h=class extends r{constructor(e){super(e)}get implicitFields(){const e=this.layer.outFields?.includes("*");if(!e)return new Set;const r=new Set(this.layerView.requiredFields),t=new Set(this.layerView.availableFields);return a(t,r)}async queryFeaturesDehydrated(e,r){const{layer:t}=this,s=t.capabilities,a=s?.query?.supportsFormatPBF,u=t.parsedUrl;if(a){null==this._decoder&&(this._decoder=new m(this.controller));const s={sourceSpatialReference:t.spatialReference?.toJSON()??null,applyTransform:!0,maxStringAttributeFields:this.implicitFields,maxStringAttributeLength:q};return y(u,e,"pbf",this._createRequestOptions(r)).then(e=>(o(r),null!=this._decoder?this._decoder.invoke({buffer:e,options:s},r.signal):Promise.reject(i())))}return p(u,e,t.spatialReference,this._createRequestOptions(r)).then(e=>n(e,{maxStringAttributeFields:this.implicitFields,maxStringAttributeLength:q}))}queryFeatureCount(e,r){return d(this.layer.parsedUrl,e,this._createRequestOptions(r))}destroy(){this._decoder=s(this._decoder)}_createRequestOptions(e){return{...c,...e,query:{...this.layer.customParameters,token:this.layer.apiKey,...e?.query}}}};e([u({constructOnly:!0})],h.prototype,"layer",void 0),e([u({constructOnly:!0})],h.prototype,"layerView",void 0),e([u({constructOnly:!0})],h.prototype,"controller",void 0),e([u({readOnly:!0})],h.prototype,"implicitFields",null),h=e([l("esri.views.3d.layers.support.featureTileQuery3D.FeatureTileServiceQuery3D")],h);let f=class extends r{constructor(e){super(e)}queryFeaturesDehydrated(e,r){return this.layer.queryFeatures(e,r)}};e([u({constructOnly:!0})],f.prototype,"layer",void 0),f=e([l("esri.views.3d.layers.support.featureTileQuery3D.FeatureTileOGCServiceQuery3D")],f);let F=class extends r{constructor(e){super(e)}queryFeaturesDehydrated(e,r){return this.layer.source.queryFeaturesJSON(e,r).then(n,t=>{if(t&&"query-features-json:unsupported"===t.name)return this.layer.queryFeatures(e,r);throw t})}queryFeatureCount(e,r){return this.layer.queryFeatureCount(e,r)}};function w(e,r){const{layer:s}=e;switch(s.type){case"feature":switch(s.source.type){case"feature-layer":return new h({layer:s,layerView:e,controller:r});case"memory":return new F({layer:s});case"csv":case"geojson":case"oriented-imagery":case"wfs":case"ogc-feature":case"parquet":break;default:s.source.type}break;case"catalog-footprint":return new h({layer:s,layerView:e,controller:r});case"csv":case"geojson":case"oriented-imagery":case"wfs":return new F({layer:s});case"ogc-feature":return new f({layer:s})}throw new t("feature-layer:unsupported",`Unsupported Feature layer type ${e.layer.type}:${e.layer.source.type}`)}e([u({constructOnly:!0})],F.prototype,"layer",void 0),F=e([l("esri.views.3d.layers.support.featureTileQuery3D.FeatureTileClientQuery3D")],F);const q=1024;export{w as createFeatureTileQuery3D};
|
|
@@ -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 t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{perVertexElevationAligner as e}from"../graphics/ElevationAligners.js";import{createMapSpaceUVCoords as r}from"./uvUtils.js";import{ColorMaterial as a}from"../../webgl-engine/materials/ColorMaterial.js";import{PatternMaterial as n}from"../../webgl-engine/materials/PatternMaterial.js";function o(e,r){const o=e?.pattern;return null==o?new a(r):"none"===o.style||"solid"===o.style?("none"===o.style&&(r.color=t(0,0,0,0),r.forceTransparentMode=!0),new a(r)):(r.style=i(o.style),new n(r))}function i(t){switch(t){case"horizontal":return 0;case"vertical":return 1;case"cross":return 2;case"forward-diagonal":return 3;case"backward-diagonal":return 4;case"diagonal-cross":return 5;default:return}}function s(t){return t.material instanceof n&&!t.material.parameters.draped}function l(t,e){if(s(t)){const a=t.attributes.get("position").data,n=t.getMutableAttribute("uvMapSpace").data,o=t.getMutableAttribute("boundingRect").data;r(n,o,a,e)}}function c(t,r,a,n,o){const i=e(t,r,a,n,o),s=t.stageObject.geometries;for(const e of s)l(e,o);return i}export{o as createMaterial,i as parsePatternStyle,s as requiresUVUpdates,l as updateMapSpaceUVCoords,c as uvElevationAligner};
|