@arcgis/core 5.0.0-next.86 → 5.0.0-next.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Ground.js +1 -1
- package/WebScene.js +1 -1
- package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +14 -2
- package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.js +1 -1
- package/applications/Components/OrientedImageryViewer/galleryUtils.d.ts +80 -0
- package/applications/Components/OrientedImageryViewer/galleryUtils.js +5 -0
- package/applications/Components/clipboard.d.ts +106 -0
- package/applications/Components/clipboard.js +5 -0
- 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/t9n/Units.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{6298e71e6c480d6f46e3.js → 0276e689e1371b40cff3.js} +1 -1
- package/assets/esri/core/workers/chunks/045a9cc900bb4ac8afde.js +1 -0
- package/assets/esri/core/workers/chunks/048173088bbeb1f6b8b6.js +1 -0
- package/assets/esri/core/workers/chunks/0be8b9d9ef56c37e74c3.js +1 -0
- package/assets/esri/core/workers/chunks/0bef671165e64f90ac86.js +1 -0
- package/assets/esri/core/workers/chunks/0c025d2b0d3162b07feb.js +1 -0
- package/assets/esri/core/workers/chunks/0c4ed18d67dea0c99f01.js +1 -0
- package/assets/esri/core/workers/chunks/0e0208b87566f4470f1d.js +1 -0
- package/assets/esri/core/workers/chunks/{981f05b5ef6f9c3f7e8a.js → 0fc0fd7618ef25dd6b67.js} +1 -1
- package/assets/esri/core/workers/chunks/{f1e1666bede364c069fc.js → 15c180deb8d09127ad31.js} +1 -1
- package/assets/esri/core/workers/chunks/1616ee2f6dce0203f1d5.js +1 -0
- package/assets/esri/core/workers/chunks/21bb414cb0623ffad577.js +1 -0
- package/assets/esri/core/workers/chunks/21c84e014c73bd85f4a3.js +1 -0
- package/assets/esri/core/workers/chunks/262677294d8c653e2b0b.js +1 -0
- package/assets/esri/core/workers/chunks/{5139bbe8f94df01467c7.js → 28a6a59033baa44bafab.js} +1 -1
- package/assets/esri/core/workers/chunks/{c5d56b85d34026507902.js → 28c273f34ffde25cebc6.js} +1 -1
- package/assets/esri/core/workers/chunks/{b7e40118b4d645e9f8e1.js → 2a12026f1ca9e8900a8b.js} +1 -1
- package/assets/esri/core/workers/chunks/2bc9f407f89d554a43ce.js +1 -0
- package/assets/esri/core/workers/chunks/2f21c5ae4fbe85c2792b.js +1 -0
- package/assets/esri/core/workers/chunks/3332ee9727874953523c.js +1 -0
- package/assets/esri/core/workers/chunks/{c477b0ce55211339c4cb.js → 33f44cc192c72064b5b6.js} +1 -1
- package/assets/esri/core/workers/chunks/{1cf27708d17a4de75b68.js → 3672125daca3df24c8ab.js} +1 -1
- package/assets/esri/core/workers/chunks/37a607f3835ec6f60834.js +1 -0
- package/assets/esri/core/workers/chunks/{3ebd4cdafa7682062447.js → 39dd80c184ac48f877f1.js} +1 -1
- package/assets/esri/core/workers/chunks/3a3adf9b6502ad698aea.js +1 -0
- package/assets/esri/core/workers/chunks/3b5f24bb824c95996308.js +1 -0
- package/assets/esri/core/workers/chunks/{4a857a7f5e00dfab2b44.js → 3c663035cf872b66cb98.js} +1 -1
- package/assets/esri/core/workers/chunks/{32b09ca094377a305881.js → 3d924488471601a17915.js} +1 -1
- package/assets/esri/core/workers/chunks/{743165f9bc4d85748a0d.js → 42b56932340b6d0bc712.js} +1 -1
- package/assets/esri/core/workers/chunks/4de93e9f91fd891ed96f.js +1 -0
- package/assets/esri/core/workers/chunks/4eb02a03956d1c9c77ee.js +1 -0
- package/assets/esri/core/workers/chunks/{15132d36e7ccbb3c009e.js → 555a252bdb87e340bd02.js} +1 -1
- package/assets/esri/core/workers/chunks/{5d791bfca20791d8e0af.js → 5670e430584f020a3530.js} +1 -1
- package/assets/esri/core/workers/chunks/{70df4331ed29d823bf38.js → 5b297353b058323f8080.js} +1 -1
- package/assets/esri/core/workers/chunks/5ef5dcca7c9b376f7f77.js +1 -0
- package/assets/esri/core/workers/chunks/{c12c095937b21e39ad3c.js → 614c63dae0158da0ed3d.js} +1 -1
- package/assets/esri/core/workers/chunks/{8f3abaabc61858e929a5.js → 641450da2680ae09b8e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{8b575ac55bc396c0c477.js → 687677acc05b5e87effe.js} +1 -1
- package/assets/esri/core/workers/chunks/{1aee859eaffa54ef2515.js → 727321c615f35d708d46.js} +1 -1
- package/assets/esri/core/workers/chunks/782c24211daacb47b0b2.js +1 -0
- package/assets/esri/core/workers/chunks/79067e7d1ebc46afd775.js +1 -0
- package/assets/esri/core/workers/chunks/7a454e4d6df3360e0ab9.js +1 -0
- package/assets/esri/core/workers/chunks/7da56ba34c81d2bbaf25.js +1 -0
- package/assets/esri/core/workers/chunks/{d8b72c6f5f9b2d013b7f.js → 824b45b04b4f4f91dbce.js} +1 -1
- package/assets/esri/core/workers/chunks/836d10ceb93ed19f0aa6.js +1 -0
- package/assets/esri/core/workers/chunks/{68d0bae1816061d96307.js → 837d39e70880e4310bda.js} +1 -1
- package/assets/esri/core/workers/chunks/8bcb2180ecc88a39b317.js +1 -0
- package/assets/esri/core/workers/chunks/{e95f90d59041640727da.js → 8c5d827cbf8869defb87.js} +1 -1
- package/assets/esri/core/workers/chunks/{7449af8f3637c1694660.js → 97155c8ac832d7c46f24.js} +1 -1
- package/assets/esri/core/workers/chunks/{fbf21fda283836e8633c.js → 98cb131b62e30aee35e1.js} +1 -1
- package/assets/esri/core/workers/chunks/{e067bbf12f711fd5b9a6.js → 9b3b9df0aa0fdcc77aa2.js} +1 -1
- package/assets/esri/core/workers/chunks/{5852d291ef41201030d5.js → 9fa1512baa6e95d3f878.js} +21 -21
- package/assets/esri/core/workers/chunks/{96616126aaf319cd1c6f.js → a5ed35f53769feb751db.js} +1 -1
- package/assets/esri/core/workers/chunks/{b6530c66804bede649d7.js → aa09e261d1f7dffaad8c.js} +1 -1
- package/assets/esri/core/workers/chunks/b268b4cbf5b0c856f88e.js +1 -0
- package/assets/esri/core/workers/chunks/b2f6cee006788ce3bd16.js +1 -0
- package/assets/esri/core/workers/chunks/{198ae9e02366870d3ec8.js → b46e772e415e2cfca896.js} +1 -1
- package/assets/esri/core/workers/chunks/{cee29c3a94376f6740d7.js → b4ab715a3c506e122f35.js} +1 -1
- package/assets/esri/core/workers/chunks/{b5ca894a6cb1a19676d5.js → b9756dce0b3af1a9dc54.js} +1 -1
- package/assets/esri/core/workers/chunks/baa7e90ec5259057d86b.js +1 -0
- package/assets/esri/core/workers/chunks/{52ae2073604deef63ea2.js → c083045d21636b95f26f.js} +1 -1
- package/assets/esri/core/workers/chunks/{5a0c5271304189a2401d.js → c38098f7073a10efdb1e.js} +1 -1
- package/assets/esri/core/workers/chunks/{adecd31fd64d6753682d.js → c7c865dc1a93e781a3e3.js} +1 -1
- package/assets/esri/core/workers/chunks/c8e56dc1239118ac2a60.js +1 -0
- package/assets/esri/core/workers/chunks/{e7e508258ad27468a6a5.js → cc6d9b2062b9de629111.js} +1 -1
- package/assets/esri/core/workers/chunks/d5386c0e77063c87fddd.js +1 -0
- package/assets/esri/core/workers/chunks/d782671235af2db1c458.js +1 -0
- package/assets/esri/core/workers/chunks/de33ce9b6f4e6c0e1389.js +1 -0
- package/assets/esri/core/workers/chunks/{0abb084b8a137f4fcdfc.js → e1c5773c12d9947bdc5f.js} +1 -1
- package/assets/esri/core/workers/chunks/e55ce8466aa979ac1e6b.js +1 -0
- package/assets/esri/core/workers/chunks/{21739c37160061f229ef.js → e585883d0036aa866420.js} +1 -1
- package/assets/esri/core/workers/chunks/e6d6d664fc9f2cd6a042.js +1 -0
- package/assets/esri/core/workers/chunks/e7cdc2a21104d84aec4a.js +1 -0
- package/assets/esri/core/workers/chunks/e9edf3987039def65859.js +1 -0
- package/assets/esri/core/workers/chunks/{3b434f318fdbbe4111e3.js → edbe52c2848486d64b16.js} +1 -1
- package/assets/esri/core/workers/chunks/{4f8895eb57ec6ab4b318.js → f5a61fa75ac877b5bb74.js} +1 -1
- package/assets/esri/core/workers/chunks/f9bc4edfdb1590be2d92.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +9 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/bundle.js +1 -1
- package/chunks/libtess-f32.js +1 -1
- package/chunks/libtess-f64.js +1 -1
- package/config.js +1 -1
- package/copyright.txt +84 -0
- package/core/Promise.d.ts +1 -1
- package/core/quantity.js +1 -1
- package/core/quantityFormatUtils.js +1 -1
- package/core/units.d.ts +1 -1
- package/core/units.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/editing/Clipboard.js +5 -0
- package/geometry/ellipsoidUtils.js +1 -1
- package/geometry/libtess.js +1 -1
- package/geometry/projection/projectors.js +1 -1
- package/geometry/projectionUtils.js +1 -1
- package/geometry/support/meshUtils/projection.js +1 -1
- package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
- package/geometry/support/planetGCSUtils.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/identity/IdentityModal.js +1 -1
- package/kernel.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/ArcGISImageService.d.ts +30 -16
- package/layers/mixins/ImageryTileMixin.d.ts +2 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/raster/functions/SpectralConversionFunction.js +5 -0
- package/layers/raster/functions/SpectralConversionFunctionArguments.js +5 -0
- package/layers/raster/functions/conversionUtils.js +1 -1
- package/layers/raster/functions/rasterFunctionHelper.js +1 -1
- package/layers/raster/functions/vectorFieldUtils.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +0 -4
- package/package.json +1 -1
- package/rest/imageService.d.ts +36 -19
- package/rest/imageService.js +1 -1
- package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/imagery/RasterVFContainer.js +1 -1
- package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
- package/views/2d/engine/imagery/RasterVFTileContainer.js +1 -1
- package/views/2d/engine/rasterBrushes.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/AspectTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BandArithmeticTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ColormapToRGBTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CompositeBandTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ComputeChangeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ContrastBrightnessTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ConvolutionTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CurvatureTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ExtractBandTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/FocalStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/GrayscaleTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/HillshadeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/LocalTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/MaskTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/NDVITechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/RemapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ShadedReliefTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/SlopeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/StretchTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/MagDirShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/ScalarShader.js +5 -0
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryVFStrategy.js +1 -1
- package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementRawResult.js +5 -0
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.d.ts +5 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/emissiveUtils.js +5 -0
- package/views/3d/layers/support/layerUtils.js +1 -1
- package/views/3d/support/mathUtils.js +1 -1
- package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
- package/views/3d/support/supportedSpatialReference.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/EllipsoidMode.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +31 -23
- package/views/VideoView.js +1 -1
- package/views/input/ViewEvents.js +1 -1
- package/views/input/recognizers/VerticalTwoFingerDrag.js +1 -1
- package/views/input/types.d.ts +94 -0
- package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
- package/views/support/MeasurementWorker.js +1 -1
- package/views/support/MeasurementWorkerHandle.js +1 -1
- package/views/support/measurementUtils.js +1 -1
- package/views/support/screenUtils.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/AreaMeasurement2D.d.ts +1 -0
- package/widgets/AreaMeasurement2D.js +1 -1
- package/widgets/BasemapLayerList.d.ts +1 -0
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/CatalogLayerList.d.ts +1 -0
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Directions.d.ts +1 -0
- package/widgets/Directions.js +1 -1
- package/widgets/DistanceMeasurement2D.d.ts +1 -0
- package/widgets/DistanceMeasurement2D.js +1 -1
- package/widgets/Editor.d.ts +1 -0
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm.d.ts +1 -0
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable.d.ts +1 -0
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FloorFilter.d.ts +1 -0
- package/widgets/FloorFilter.js +1 -1
- package/widgets/LayerList.d.ts +1 -0
- package/widgets/LayerList.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
- package/widgets/OrientedImageryViewer/components/OverlayLayersListViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/services/TransformationService.js +5 -0
- package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +5 -0
- package/widgets/OrientedImageryViewer/support/geometryUtils.js +5 -0
- package/widgets/OrientedImageryViewer/support/typeUtils.js +5 -0
- package/widgets/ScaleRangeSlider.d.ts +1 -0
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Sketch.d.ts +1 -0
- package/widgets/Sketch.js +1 -1
- package/widgets/TableList.d.ts +1 -0
- package/widgets/TableList.js +1 -1
- package/widgets/TimeSlider.d.ts +1 -0
- package/widgets/TimeSlider.js +1 -1
- package/widgets/UtilityNetworkAssociations.d.ts +1 -0
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/UtilityNetworkTrace.d.ts +1 -0
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.d.ts +1 -0
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/ValuePicker.d.ts +1 -0
- package/widgets/ValuePicker.js +1 -1
- package/assets/esri/core/workers/chunks/00e135dc1b4cb024973d.js +0 -1
- package/assets/esri/core/workers/chunks/03d037f9f04f165aac63.js +0 -1
- package/assets/esri/core/workers/chunks/03da31c7635d077e8d99.js +0 -1
- package/assets/esri/core/workers/chunks/0dcf1f3b6aa84cbe03a9.js +0 -1
- package/assets/esri/core/workers/chunks/185c97bc63ce546995ce.js +0 -1
- package/assets/esri/core/workers/chunks/1a62c456e791c82050fe.js +0 -1
- package/assets/esri/core/workers/chunks/21163137e345badb1aaf.js +0 -1
- package/assets/esri/core/workers/chunks/25dead73dfc5a4c19285.js +0 -1
- package/assets/esri/core/workers/chunks/2767b69085c9f7a1e1af.js +0 -1
- package/assets/esri/core/workers/chunks/43e9eaedf65921b58eb2.js +0 -1
- package/assets/esri/core/workers/chunks/4caec60ac0a5851730c6.js +0 -1
- package/assets/esri/core/workers/chunks/5119e3159617b8e1ea13.js +0 -1
- package/assets/esri/core/workers/chunks/59d3f3fbae775fd7686e.js +0 -1
- package/assets/esri/core/workers/chunks/5a706eecd8a988fae6b7.js +0 -1
- package/assets/esri/core/workers/chunks/5ba2bbbb42ef1920579d.js +0 -1
- package/assets/esri/core/workers/chunks/5cc731f161012b63c77a.js +0 -1
- package/assets/esri/core/workers/chunks/5fa8fe6353dbdda0b06a.js +0 -1
- package/assets/esri/core/workers/chunks/6107b58457a70c8de9da.js +0 -1
- package/assets/esri/core/workers/chunks/654eef3ad30f34c42e12.js +0 -1
- package/assets/esri/core/workers/chunks/6d9e92d9c2503d5dc8dd.js +0 -1
- package/assets/esri/core/workers/chunks/7130b09300032d3a5925.js +0 -1
- package/assets/esri/core/workers/chunks/7f7c4ffbdf7b20dc7a54.js +0 -1
- package/assets/esri/core/workers/chunks/804c9666d0dc548b9f79.js +0 -1
- package/assets/esri/core/workers/chunks/8258b1c8ba6d44ba19c3.js +0 -1
- package/assets/esri/core/workers/chunks/8f2fc50eb988c0228b05.js +0 -1
- package/assets/esri/core/workers/chunks/97ad3eb25ad003c16148.js +0 -1
- package/assets/esri/core/workers/chunks/a270e34bb248114ec280.js +0 -1
- package/assets/esri/core/workers/chunks/a56a5e00964d4cd59a66.js +0 -1
- package/assets/esri/core/workers/chunks/a774b4fc7df801503bea.js +0 -1
- package/assets/esri/core/workers/chunks/b1015e1f25b60c08d2cf.js +0 -1
- package/assets/esri/core/workers/chunks/c18a2948ae3cb527d8bb.js +0 -1
- package/assets/esri/core/workers/chunks/d4f4c0201d8b641709c0.js +0 -1
- package/assets/esri/core/workers/chunks/d6d9d56b3733622deab6.js +0 -1
- package/assets/esri/core/workers/chunks/dedd9d47ccc019ffc484.js +0 -1
- package/assets/esri/core/workers/chunks/e271065410ba5c872f53.js +0 -1
- package/assets/esri/core/workers/chunks/e8a0654cebafa22b5b56.js +0 -1
- package/assets/esri/core/workers/chunks/ecf7d34b37ce6f0877af.js +0 -1
- package/assets/esri/core/workers/chunks/f25eb512592a84a508c1.js +0 -1
- package/assets/esri/core/workers/chunks/f64ec13167eb51da2f9b.js +0 -1
- package/views/2d/engine/imagery/BrushVectorField.js +0 -5
- package/views/3d/analysis/AreaMeasurement/support/utils.js +0 -5
- package/views/3d/analysis/VolumeMeasurement/volumeMeasurementUtils.js +0 -5
- package/widgets/OrientedImageryViewer/dataCaptureUtils.js +0 -5
|
@@ -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{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o,subclass as l}from"../../../core/accessorSupport/decorators.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/RandomLCG.js";import"../../../core/has.js";import"../../../core/scheduling.js";import"../../../Color.js";import"../../../core/mathUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtMeasuredUnits.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../symbols/cim/constants.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../../../geometry/Polygon.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Accessor.js";import"../engine/transitions/FadeTransition.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/enums.js";import"../../webgl/Program.js";import"../../webgl/Util.js";import"../../webgl/VertexAttributeLayouts.js";import"../../webgl/BufferObject.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlitShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BloomShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlurShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/Renderbuffer.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../engine/webgl/shaderGraph/techniques/animated/attributes.js";import"../engine/webgl/mesh/templates/templateUtils.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../core/sql/UnknownTimeZone.js";import"luxon";import"../../../intl/locale.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polyline.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/animations/instructions.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/checkWebGLError.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../../../chunks/pe.js";import"../../../core/units.js";import"../../../geometry/ellipsoidUtils.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import p from"./graphics/GraphicsView2D.js";import"../engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/operators/support/GeographicTransformation.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../../../geometry/support/Ellipsoid.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as m}from"./LayerView2D.js";import c from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as g,resampleImage as f}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import d from"../tiling/TileKey.js";import j from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import w from"../../layers/LayerView.js";import{RefreshableLayerView as b}from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as _}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as G,MapServiceLayerViewHelper as T}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as q}from"../../support/drapedUtils.js";import{getHighlightName as V}from"../../support/highlightOptionsUtils.js";import{TaskPriority as S}from"../../support/Scheduler.js";const P=[0,0];let v=class extends(b(n(m(w)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new j({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:S.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),G(this,this.layer)){const e=this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new c(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new T({createFetchPopupFeaturesQueryGeometry:(e,i)=>q(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add(()=>this.resampling,()=>{this.doRefresh()})),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=_(e);if(0===s.length)return i();const r=V(t);return this._addHighlightGraphics(s,r),i(()=>!this.destroyed&&this._removeHighlightGraphics(s,r))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map(e=>e.uid),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map(e=>e.uid),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh(e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e)))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(P,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",()=>e.destroy()),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return g(this._tileInfoView.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new d(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return f(this._tileInfoView,o,s,e)}}return g(this._tileInfoView.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new d(0,0,0,0);let a,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),g(this._tileInfoView.size);a=await this._fetchImage(h,o)}catch(n){if(s(n))throw n;if(this.resampling&&"unknown"===p&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?f(this._tileInfoView,a,h,e):a:g(this._tileInfoView.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.size[0],e.bitmap.height=this._tileInfoView.size[1],e.once("attach",()=>this.requestUpdate())}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],v.prototype,"resampling",null),e([o()],v.prototype,"tilemapCache",null),v=e([l("esri.views.2d.layers.TileLayerView2D")],v);const C=v;export{C as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o,subclass as l}from"../../../core/accessorSupport/decorators.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/RandomLCG.js";import"../../../core/has.js";import"../../../core/scheduling.js";import"../../../Color.js";import"../../../core/mathUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtMeasuredUnits.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../symbols/cim/constants.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../../../geometry/Polygon.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Accessor.js";import"../engine/transitions/FadeTransition.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/enums.js";import"../../webgl/Program.js";import"../../webgl/Util.js";import"../../webgl/VertexAttributeLayouts.js";import"../../webgl/BufferObject.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlitShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BloomShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlurShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/Renderbuffer.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../engine/webgl/shaderGraph/techniques/animated/attributes.js";import"../engine/webgl/mesh/templates/templateUtils.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../core/sql/UnknownTimeZone.js";import"luxon";import"../../../intl/locale.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polyline.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/animations/instructions.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/checkWebGLError.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../../../chunks/pe.js";import"../../../core/units.js";import"../../../geometry/ellipsoidUtils.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import p from"./graphics/GraphicsView2D.js";import"../engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/spatialReferenceEllipsoidUtils.js";import"../../../geometry/operators/support/GeographicTransformation.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../../../geometry/support/Ellipsoid.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as m}from"./LayerView2D.js";import c from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as g,resampleImage as f}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import d from"../tiling/TileKey.js";import j from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import w from"../../layers/LayerView.js";import{RefreshableLayerView as b}from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as _}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as G,MapServiceLayerViewHelper as T}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as q}from"../../support/drapedUtils.js";import{getHighlightName as V}from"../../support/highlightOptionsUtils.js";import{TaskPriority as S}from"../../support/Scheduler.js";const P=[0,0];let v=class extends(b(n(m(w)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new j({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:S.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),G(this,this.layer)){const e=this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new c(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new T({createFetchPopupFeaturesQueryGeometry:(e,i)=>q(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add(()=>this.resampling,()=>{this.doRefresh()})),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=_(e);if(0===s.length)return i();const r=V(t);return this._addHighlightGraphics(s,r),i(()=>!this.destroyed&&this._removeHighlightGraphics(s,r))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map(e=>e.uid),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map(e=>e.uid),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh(e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e)))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(P,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",()=>e.destroy()),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return g(this._tileInfoView.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new d(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return f(this._tileInfoView,o,s,e)}}return g(this._tileInfoView.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new d(0,0,0,0);let a,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),g(this._tileInfoView.size);a=await this._fetchImage(h,o)}catch(n){if(s(n))throw n;if(this.resampling&&"unknown"===p&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?f(this._tileInfoView,a,h,e):a:g(this._tileInfoView.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.size[0],e.bitmap.height=this._tileInfoView.size[1],e.once("attach",()=>this.requestUpdate())}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],v.prototype,"resampling",null),e([o()],v.prototype,"tilemapCache",null),v=e([l("esri.views.2d.layers.TileLayerView2D")],v);const C=v;export{C 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{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import i from"../../../../core/Logger.js";import{debounce as r,isAbortError as
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import i from"../../../../core/Logger.js";import{debounce as r,isAbortError as s}from"../../../../core/promiseUtils.js";import{property as o,subclass as a}from"../../../../core/accessorSupport/decorators.js";import n from"../../../../geometry/Extent.js";import{RasterVFDisplayObject as l}from"../../engine/imagery/RasterVFDisplayObject.js";let c=class extends t{constructor(e){super(e),this._loading=null,this.update=r((e,t)=>this._update(e,t).catch(e=>{s(e)||i.getLogger(this).error(e)}))}get updating(){return!!this._loading}redraw(e){if(!this.container.children.length)return;const t=this.container.children[0];t.symbolizerParameters=e,t.invalidateMeshes(),this.container.symbolTypes="wind_speed"===e.style?["scalar","triangle"]:"simple_scalar"===e.style?["scalar"]:["triangle"],this.container.requestRender()}async _update(e,t,i){if(!e.stationary)return;const{extent:r,spatialReference:s}=e.state,o=new n({xmin:r.xmin,ymin:r.ymin,xmax:r.xmax,ymax:r.ymax,spatialReference:s}),[a,l]=e.state.size;this._loading=this.fetchPixels(o,a,l,i);const c=await this._loading;this._addToDisplay(c,t,e.state),this._loading=null}_addToDisplay(e,t,i){if(null==e.pixelBlock)return this.container.children.forEach(e=>e.destroy()),void this.container.removeAllChildren();const{extent:r,pixelBlock:s}=e,o=new l(s);o.offset=[0,0],o.symbolizerParameters=t,o.rawPixelData=e,o.invalidateMeshes(),o.x=r.xmin,o.y=r.ymax,o.pixelRatio=i.pixelRatio,o.rotation=i.rotation,o.resolution=i.resolution,o.width=s.width*t.symbolTileSize,o.height=s.height*t.symbolTileSize,this.container.children.forEach(e=>e.destroy()),this.container.removeAllChildren(),this.container.symbolTypes="wind_speed"===t.style?["scalar","triangle"]:"simple_scalar"===t.style?["scalar"]:["triangle"],this.container.addChild(o)}};e([o()],c.prototype,"fetchPixels",void 0),e([o()],c.prototype,"container",void 0),e([o()],c.prototype,"_loading",void 0),e([o()],c.prototype,"updating",null),c=e([a("esri.views.2d.layers.imagery.ImageryVFStrategy")],c);export{c 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{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{property as i,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{sampleVectorField as s}from"../../../../layers/raster/functions/vectorFieldUtils.js";import{RasterVFTileContainer as l}from"../../engine/imagery/RasterVFTileContainer.js";import{BaseImageryTileSubView2D as o}from"./BaseImageryTileSubView2D.js";let a=class extends o{constructor(){super(...arguments),this._handle=null,this.type="rasterVF"}async fetchTile(e,t){t={...t,interpolation:"nearest",requestProjectedLocalDirections:!0};const i=await this.layer.fetchTile(e.level,e.row,e.col,t);return"vector-magdir"===this.layer.serviceRasterInfo?.dataType&&i?.pixelBlock&&(i.pixelBlock=await this.layer.convertVectorFieldData(i.pixelBlock,"vector-magdir",t)),i}updateTileSource(e,t){const i=t.symbolizerParams,{tileData:r}=e;r.key=e.key,r.width=this._tileInfoView.size[0],r.height=this._tileInfoView.size[1];const{symbolTileSize:s}=i,{source:l}=t;if(r.offset=this._getTileSymbolOffset(r.key,s),null!=l?.pixelBlock){const e={extent:l.extent,pixelBlock:l.pixelBlock};r.rawPixelData=e,r.symbolizerParameters=i,r.source=this._sampleVectorFieldData(l.pixelBlock,i,r.offset)}else{const e=[Math.round((this._tileInfoView.size[0]-r.offset[0])/s),Math.round((this._tileInfoView.size[1]-r.offset[1])/s)],t=this.createEmptyTilePixelBlock(e);r.source=t,r.symbolizerParameters=i}return r.
|
|
5
|
+
import{__decorate as e}from"tslib";import{watch as t}from"../../../../core/reactiveUtils.js";import{property as i,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{sampleVectorField as s}from"../../../../layers/raster/functions/vectorFieldUtils.js";import{RasterVFTileContainer as l}from"../../engine/imagery/RasterVFTileContainer.js";import{BaseImageryTileSubView2D as o}from"./BaseImageryTileSubView2D.js";let a=class extends o{constructor(){super(...arguments),this._handle=null,this.type="rasterVF"}async fetchTile(e,t){t={...t,interpolation:"nearest",requestProjectedLocalDirections:!0};const i=await this.layer.fetchTile(e.level,e.row,e.col,t);return"vector-magdir"===this.layer.serviceRasterInfo?.dataType&&i?.pixelBlock&&(i.pixelBlock=await this.layer.convertVectorFieldData(i.pixelBlock,"vector-magdir",t)),i}updateTileSource(e,t){const i=t.symbolizerParams,{tileData:r}=e;r.key=e.key,r.width=this._tileInfoView.size[0],r.height=this._tileInfoView.size[1];const{symbolTileSize:s}=i,{source:l}=t;if(r.offset=this._getTileSymbolOffset(r.key,s),null!=l?.pixelBlock){const e={extent:l.extent,pixelBlock:l.pixelBlock};r.rawPixelData=e,r.symbolizerParameters=i,r.source=this._sampleVectorFieldData(l.pixelBlock,i,r.offset)}else{const e=[Math.round((this._tileInfoView.size[0]-r.offset[0])/s),Math.round((this._tileInfoView.size[1]-r.offset[1])/s)],t=this.createEmptyTilePixelBlock(e);r.source=t,r.symbolizerParameters=i}return r.invalidateMeshes(),Promise.resolve()}updateTileSymbolizerParameters(e,t){const i=t.local,{symbolTileSize:r}=i,{tileData:s}=e;s.offset=this._getTileSymbolOffset(s.key,r);const l=s.symbolizerParameters.symbolTileSize;s.symbolizerParameters=i;const o=s.rawPixelData?.pixelBlock;return null!=o&&l!==r&&(s.source=this._sampleVectorFieldData(o,s.symbolizerParameters,s.offset)),Promise.resolve()}attach(){super.attach(),this.container=new l(this._tileInfoView),this.container.isCustomTilingScheme=this._isCustomTilingScheme,this._updateSymbolType(this.layer.renderer),this._handle=t(()=>this.layer.renderer,e=>this._updateSymbolType(e))}detach(){super.detach(),this.container.removeAllChildren(),this._handle?.remove(),this._handle=null,this.container=null}_getTileSymbolOffset(e,t){const i=e.col*this._tileInfoView.size[0]%t,r=e.row*this._tileInfoView.size[1]%t;return[i>t/2?t-i:-i,r>t/2?t-r:-r]}_sampleVectorFieldData(e,t,i){const{symbolTileSize:r}=t;return s(e,"vector-uv",r,i)}_updateSymbolType(e){"vector-field"===e?.type&&(this.container.symbolTypes="wind-barb"===e.style?["scalar","triangle"]:"simple-scalar"===e.style?["scalar"]:["triangle"])}};e([i()],a.prototype,"container",void 0),e([i()],a.prototype,"layer",void 0),e([i()],a.prototype,"type",void 0),a=e([r("esri.views.2d.layers.imagery.VectorFieldTileView2D")],a);export{a 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{__decorate as e}from"tslib";import{onLocaleChange as t,fetchMessageBundle as i}from"../../../../../intl.js";import s from"../../../../../core/Accessor.js";import{multiplyOpacityToUnitRGBA as r,getContrast as a,multiplyOpacity as n}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import{nextHighestPowerOfTen as o,floatEqualUlp as l}from"../../../../../core/mathUtils.js";import{destroyMaybe as m}from"../../../../../core/maybe.js";import{formatDecimal as h}from"../../../../../core/quantityFormatUtils.js";import{watch as c,syncAndInitial as p,initial as d}from"../../../../../core/reactiveUtils.js";import{lengthUnitFromSpatialReference as u,convertUnit as _,adaptiveAreaUnit as v}from"../../../../../core/units.js";import{property as g,subclass as b}from"../../../../../core/accessorSupport/decorators.js";import{fromTranslation as w}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{subtract as D,squaredDistance as L}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as y}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{toPreferredAreaUnit as S,preferredLengthUnit as C}from"./utils.js";import{LabelVisualElement as j}from"../../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as x}from"../../../interactive/visualElements/LineVisualElement.js";import{MeasurementAreaVisualElement as V}from"../../../interactive/visualElements/MeasurementAreaVisualElement.js";import{GeodesicSegment as A,EuclideanSegment as M}from"../../../interactive/visualElements/support/Segment.js";import{midpoint3d as R}from"../../../support/mathUtils.js";import{createStipplePatternSimple as k}from"../../../webgl-engine/materials/lineStippleUtils.js";let z=class extends s{get _parameters(){const{accentColor:e,textColor:t}=this.view.effectiveTheme,i=e.toUnitRGBA(),s=r(e,.5),o=r(a(e),.5),l=a(t,160);return{accentColor:i,transparentAccentColor:s,transparentContrastColor:o,textColor:t,textBackgroundColor:n(l,.6),textCalloutColor:n(l,.5),pathLineWidth:3,perimeterLineWidth:2,projectionLineWidth:2,projectionLineStippleSize:5,labelDistance:25}}get viewData(){return this._viewData}get visible(){return this.analysisViewData.visible}get _renderUnits(){const e=this.view.renderCoordsHelper.spatialReference;return u(e)??"meters"}get testData(){}constructor(e){super(e),this._path=null,this._perimeter=null,this._projectionLines=null,this._measurementArea=null,this._areaLabel=null,this._perimeterLabel=null,this._pathSegments=[],this._perimeterSegments=[],this._origin=y(),this._originTransform=f(),this.messages=null,this._viewData=new U,this.areaLabel=null,this.perimeterLabel=null,this.loadingMessages=!0}initialize(){const{analysisViewData:e,_parameters:i,view:s}=this;this._path=new x({view:s,attached:!0,width:i.pathLineWidth,polygonOffset:!0,renderOccluded:4,tansparentRenderOrder:1,isDecoration:!0}),this._perimeter=new x({view:s,attached:!0,width:i.perimeterLineWidth,polygonOffset:!0,renderOccluded:4,tansparentRenderOrder:2,isDecoration:!0}),this._projectionLines=new x({view:s,attached:!0,width:i.projectionLineWidth,stipplePattern:k(i.projectionLineStippleSize),polygonOffset:!0,renderOccluded:4,tansparentRenderOrder:3,isDecoration:!0}),this._measurementArea=new V({view:s,attached:!0,isDecoration:!0,renderOccluded:4,testsTransparentRenderOrder:5});const r={attached:!0,view:s,isDecoration:!0};this._areaLabel=new j({...r,fontSize:16,distance:0}),this._perimeterLabel=new j({...r,fontSize:12}),this.addHandles([c(()=>[e.mode,this.visible,e.unit,e.measurementData?.updateId,null!=e.measurementData?.measurements,E(e.measurementData?.measurements?.mode)],()=>this._update(),p),c(()=>e.measurementData?.measurements,e=>this._updateMeasurements(e)),c(()=>s.state?.camera,()=>this._updateLabels(),p),t(()=>this._updateMessageBundle()),c(()=>this._parameters,({accentColor:e,transparentAccentColor:t,transparentContrastColor:i,textColor:s,textBackgroundColor:r,textCalloutColor:a})=>{const{_path:n,_perimeter:o,_projectionLines:l,_measurementArea:m,_areaLabel:h,_perimeterLabel:c}=this;n.color=e,o.color=e,l.color=e,m.color1=t,m.color2=i,h.textColor=s,h.backgroundColor=r,h.calloutColor=a,c.textColor=s,c.backgroundColor=r,c.calloutColor=a},d)]),this._updateMessageBundle()}destroy(){this._measurementArea=m(this._measurementArea),this._path=m(this._path),this._perimeter=m(this._perimeter),this._areaLabel=m(this._areaLabel),this._perimeterLabel=m(this._perimeterLabel),this._projectionLines=m(this._projectionLines),this.set("view",null)}_update(){if(this.destroyed||!this.view.ready||!this.view.renderCoordsHelper)return;const{analysisViewData:{measurementData:e},analysisViewData:t}=this;null!=e&&(this._updateViewData(e,t.path),this._updateOrigin(),this._updatePathSegments(),this._updatePerimeterSegments(),this._updateArea(),this._updateProjectionLines(),this._updateLabels())}_calculateCheckerSize(e){const t=F(e?.mode)?e?.geodesicArea:e?.area;if(null==t)return 1;const i=S(t,this.analysisViewData.unit),s=Math.sqrt(_(1,i.unit,"square-meters"));return _(o(Math.sqrt(i.value)/Math.sqrt(300))*s,"meters",this._renderUnits)}_updateMeasurements(e){Object.assign(this.viewData,this._getMeasurementsViewData(e)),this._updateCheckerSize(),this._updateLabels()}_updateCheckerSize(){this._measurementArea.size=[this.viewData.checkerSize,this.viewData.checkerSize]}_updateViewData(e,t){const i=e.measurements,s=new U({validMeasurement:!!i,numVertices:e.numVertices,hasStagedVertex:e.hasStagedVertex,path:t,mode:i?.mode,vertexData:e.vertexData,perimeterLabelSegmentIndex:0,...this._getMeasurementsViewData(i)});this._viewData=s}_getMeasurementsViewData(e){const t=F(e?.mode),i=this._calculateCheckerSize(e);return{areaCentroid:t?e?.geodesicAreaCentroidRenderCoords:e?.areaCentroidRenderCoords,area:t?e?.geodesicArea:e?.area,perimeter:t?e?.geodesicPerimeter:e?.perimeter,checkerSize:i}}_updateOrigin(){const e=this.viewData;R(e.vertexData.positionsRender,this._origin),w(this._originTransform,this._origin),this._measurementArea.transform=this._originTransform,this._projectionLines.transform=this._originTransform}_createSegments(e,t){const i=this.viewData,s=this.view.renderCoordsHelper.spatialReference,r=E(i.mode),a=[],n=i.numVertices,o=i.validMeasurement?n:n-1;for(let m=0;m<o;++m){const o=i.vertexData[e][m],h=i.vertexData[e][(m+1)%n];let c=!0;if(t){const e=i.vertexData.positionsRender[m],t=i.vertexData.positionsRender[(m+1)%n];let s=!0;for(let i=0;i<3;++i)s&&=l(e[i],o[i])&&l(t[i],h[i]);s&&(c=!1)}let p=null;switch(r){case"geodesic":p=new A(o,h,s,c);break;case"euclidean":p=new M(o,h,c)}a.push(p)}return a}_updatePathSegments(){const{visible:e}=this,t=this._createSegments("positionsRender");this._path.setGeometryFromSegments(t,this._origin),this._path.visible=e,this._pathSegments=t}_updatePerimeterSegments(){const e=this.visible&&"euclidean"===this.viewData.mode&&!!this.viewData.path&&this.viewData.path.numVertices>2,t=!0,i=this._createSegments("positionsFittedRender",t);this._perimeter.setGeometryFromSegments(i,this._origin),this._perimeter.visible=e,this._perimeterSegments=i}_updateArea(){const e=this.viewData;switch(E(e.mode)){case"euclidean":this._updateAreaEuclidean(e);break;case"geodesic":this._updateAreaGeodesic()}}_updateAreaEuclidean(e){const t=this.visible;e.validMeasurement&&e.vertexData.triangleIndices?(this._measurementArea.geometry={uv:e.vertexData.positionsFittedWorldPlaneProjected,position:e.vertexData.positionsFittedRender,triangleIndices:e.vertexData.triangleIndices},this._updateCheckerSize(),this._measurementArea.visible=t):this._measurementArea.visible=!1}_updateAreaGeodesic(){this._measurementArea.visible=!1}_updateProjectionLines(){const e=this.viewData,t=this.visible,i=e.mode,s=e.numVertices;if(s>0&&e.validMeasurement&&"euclidean"===i){const i=[];for(let t=0;t<s;++t){const s=y();D(s,e.vertexData.positionsRender[t],this._origin);const r=y();D(r,e.vertexData.positionsFittedRender[t],this._origin),l(L(s,r),0)||i.push([s,r])}this._projectionLines.geometry=i,this._projectionLines.visible=t}else this._projectionLines.geometry=null,this._projectionLines.visible=!1}_updateLabels(){if(this.destroyed)return;const{viewData:e}=this,{area:t,path:i}=e;if(!i)return;const s=this.visible,r=this._areaLabel,a=this._perimeterLabel,n=e.validMeasurement;r.visible=!0,a.visible=!0;let o=!1;const l=O(this.messages,t,this.analysisViewData.unit);if(null!=l&&e.areaCentroid&&s&&(r.geometry={type:"point",point:e.areaCentroid},r.text=l,o=e.validMeasurement),this._set("areaLabel",l),s&&n){const t=F(e.mode),i=e.perimeter,s=P(this.messages,i,this.analysisViewData.unit);this._set("perimeterLabel",s),a.distance=this._parameters.labelDistance,a.anchor="top",a.text=s;let r=!0;for(let n=0;n<e.numVertices;++n){const i=(e.perimeterLabelSegmentIndex+n)%e.numVertices,s=t?this._pathSegments[i]:this._perimeterSegments[i];if(r=!0,a.geometry={type:"segment",segment:s,sampleLocation:"center"},!a.overlaps(this._areaLabel))break;r=!1}a.visible=r}else a.visible=!1;r.visible=o}_updateMessageBundle(){this.loadingMessages=!0,i("esri/core/t9n/Units").then(e=>{this.messages=e,this.view&&this._update()}).finally(()=>{this.loadingMessages=!1})}};function O(e,t,i){return e&&t&&h(e,t,v(t.value,t.unit,i))}function P(e,t,i){return e&&t&&h(e,t,C(t,i))}e([g()],z.prototype,"_parameters",null),e([g()],z.prototype,"view",void 0),e([g()],z.prototype,"messages",void 0),e([g()],z.prototype,"analysis",void 0),e([g()],z.prototype,"_viewData",void 0),e([g()],z.prototype,"analysisViewData",void 0),e([g({readOnly:!0})],z.prototype,"areaLabel",void 0),e([g({readOnly:!0})],z.prototype,"perimeterLabel",void 0),e([g()],z.prototype,"loadingMessages",void 0),e([g()],z.prototype,"visible",null),e([g()],z.prototype,"_renderUnits",null),z=e([b("esri.views.3d.analysis.AreaMeasurement.support.AreaMeasurementVisualization")],z);class U{constructor(e){this.validMeasurement=e?.validMeasurement??!1,this.numVertices=e?.numVertices??0,this.hasStagedVertex=e?.hasStagedVertex??!1,this.path=e?.path,this.vertexData=e?.vertexData??{positionsRender:[],positionsFittedWorldPlaneProjected:[],positionsFittedRender:[],triangleIndices:null},this.mode=e?.mode,this.areaCentroid=e?.areaCentroid,this.perimeterLabelSegmentIndex=e?.perimeterLabelSegmentIndex??0,this.checkerSize=e?.checkerSize??1,this.area=e?.area,this.perimeter=e?.perimeter}}function E(e){switch(e){case"euclidean":case void 0:case null:return"euclidean";case"geodesic":return"geodesic"}}function F(e){return"geodesic"===E(e)}export{z as AreaMeasurementVisualization,U as ViewData};
|
|
5
|
+
import{__decorate as e}from"tslib";import{onLocaleChange as t,fetchMessageBundle as i}from"../../../../../intl.js";import s from"../../../../../core/Accessor.js";import{multiplyOpacityToUnitRGBA as r,getContrast as a,multiplyOpacity as n}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import{nextHighestPowerOfTen as o,floatEqualUlp as l}from"../../../../../core/mathUtils.js";import{destroyMaybe as m}from"../../../../../core/maybe.js";import{toAdaptiveAreaUnit as h,adaptiveLengthUnitForArea as c}from"../../../../../core/quantity.js";import{formatDecimal as p}from"../../../../../core/quantityFormatUtils.js";import{watch as d,syncAndInitial as u,initial as _}from"../../../../../core/reactiveUtils.js";import{lengthUnitFromSpatialReference as v,convertUnit as g,adaptiveAreaUnit as b}from"../../../../../core/units.js";import{property as w,subclass as f}from"../../../../../core/accessorSupport/decorators.js";import{fromTranslation as D}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as L}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{subtract as y,squaredDistance as S}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as C}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{LabelVisualElement as j}from"../../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as x}from"../../../interactive/visualElements/LineVisualElement.js";import{MeasurementAreaVisualElement as V}from"../../../interactive/visualElements/MeasurementAreaVisualElement.js";import{GeodesicSegment as A,EuclideanSegment as M}from"../../../interactive/visualElements/support/Segment.js";import{midpoint3d as R}from"../../../support/mathUtils.js";import{createStipplePatternSimple as k}from"../../../webgl-engine/materials/lineStippleUtils.js";let z=class extends s{get _parameters(){const{accentColor:e,textColor:t}=this.view.effectiveTheme,i=e.toUnitRGBA(),s=r(e,.5),o=r(a(e),.5),l=a(t,160);return{accentColor:i,transparentAccentColor:s,transparentContrastColor:o,textColor:t,textBackgroundColor:n(l,.6),textCalloutColor:n(l,.5),pathLineWidth:3,perimeterLineWidth:2,projectionLineWidth:2,projectionLineStippleSize:5,labelDistance:25}}get viewData(){return this._viewData}get visible(){return this.analysisViewData.visible}get _renderUnits(){const e=this.view.renderCoordsHelper.spatialReference;return v(e)??"meters"}get testData(){}constructor(e){super(e),this._path=null,this._perimeter=null,this._projectionLines=null,this._measurementArea=null,this._areaLabel=null,this._perimeterLabel=null,this._pathSegments=[],this._perimeterSegments=[],this._origin=C(),this._originTransform=L(),this.messages=null,this._viewData=new U,this.areaLabel=null,this.perimeterLabel=null,this.loadingMessages=!0}initialize(){const{analysisViewData:e,_parameters:i,view:s}=this;this._path=new x({view:s,attached:!0,width:i.pathLineWidth,polygonOffset:!0,renderOccluded:4,tansparentRenderOrder:1,isDecoration:!0}),this._perimeter=new x({view:s,attached:!0,width:i.perimeterLineWidth,polygonOffset:!0,renderOccluded:4,tansparentRenderOrder:2,isDecoration:!0}),this._projectionLines=new x({view:s,attached:!0,width:i.projectionLineWidth,stipplePattern:k(i.projectionLineStippleSize),polygonOffset:!0,renderOccluded:4,tansparentRenderOrder:3,isDecoration:!0}),this._measurementArea=new V({view:s,attached:!0,isDecoration:!0,renderOccluded:4,testsTransparentRenderOrder:5});const r={attached:!0,view:s,isDecoration:!0};this._areaLabel=new j({...r,fontSize:16,distance:0}),this._perimeterLabel=new j({...r,fontSize:12}),this.addHandles([d(()=>[e.mode,this.visible,e.unit,e.measurementData?.updateId,null!=e.measurementData?.measurements,E(e.measurementData?.measurements?.mode)],()=>this._update(),u),d(()=>e.measurementData?.measurements,e=>this._updateMeasurements(e)),d(()=>s.state?.camera,()=>this._updateLabels(),u),t(()=>this._updateMessageBundle()),d(()=>this._parameters,({accentColor:e,transparentAccentColor:t,transparentContrastColor:i,textColor:s,textBackgroundColor:r,textCalloutColor:a})=>{const{_path:n,_perimeter:o,_projectionLines:l,_measurementArea:m,_areaLabel:h,_perimeterLabel:c}=this;n.color=e,o.color=e,l.color=e,m.color1=t,m.color2=i,h.textColor=s,h.backgroundColor=r,h.calloutColor=a,c.textColor=s,c.backgroundColor=r,c.calloutColor=a},_)]),this._updateMessageBundle()}destroy(){this._measurementArea=m(this._measurementArea),this._path=m(this._path),this._perimeter=m(this._perimeter),this._areaLabel=m(this._areaLabel),this._perimeterLabel=m(this._perimeterLabel),this._projectionLines=m(this._projectionLines),this.set("view",null)}_update(){if(this.destroyed||!this.view.ready||!this.view.renderCoordsHelper)return;const{analysisViewData:{measurementData:e},analysisViewData:t}=this;null!=e&&(this._updateViewData(e,t.path),this._updateOrigin(),this._updatePathSegments(),this._updatePerimeterSegments(),this._updateArea(),this._updateProjectionLines(),this._updateLabels())}_calculateCheckerSize(e){const t=F(e?.mode)?e?.geodesicArea:e?.area;if(null==t)return 1;const i=h(t,this.analysisViewData.unit),s=Math.sqrt(g(1,i.unit,"square-meters"));return g(o(Math.sqrt(i.value)/Math.sqrt(300))*s,"meters",this._renderUnits)}_updateMeasurements(e){Object.assign(this.viewData,this._getMeasurementsViewData(e)),this._updateCheckerSize(),this._updateLabels()}_updateCheckerSize(){this._measurementArea.size=[this.viewData.checkerSize,this.viewData.checkerSize]}_updateViewData(e,t){const i=e.measurements,s=new U({validMeasurement:!!i,numVertices:e.numVertices,hasStagedVertex:e.hasStagedVertex,path:t,mode:i?.mode,vertexData:e.vertexData,perimeterLabelSegmentIndex:0,...this._getMeasurementsViewData(i)});this._viewData=s}_getMeasurementsViewData(e){const t=F(e?.mode),i=this._calculateCheckerSize(e);return{areaCentroid:t?e?.geodesicAreaCentroidRenderCoords:e?.areaCentroidRenderCoords,area:t?e?.geodesicArea:e?.area,perimeter:t?e?.geodesicPerimeter:e?.perimeter,checkerSize:i}}_updateOrigin(){const e=this.viewData;R(e.vertexData.positionsRender,this._origin),D(this._originTransform,this._origin),this._measurementArea.transform=this._originTransform,this._projectionLines.transform=this._originTransform}_createSegments(e,t){const i=this.viewData,s=this.view.renderCoordsHelper.spatialReference,r=E(i.mode),a=[],n=i.numVertices,o=i.validMeasurement?n:n-1;for(let m=0;m<o;++m){const o=i.vertexData[e][m],h=i.vertexData[e][(m+1)%n];let c=!0;if(t){const e=i.vertexData.positionsRender[m],t=i.vertexData.positionsRender[(m+1)%n];let s=!0;for(let i=0;i<3;++i)s&&=l(e[i],o[i])&&l(t[i],h[i]);s&&(c=!1)}let p=null;switch(r){case"geodesic":p=new A(o,h,s,c);break;case"euclidean":p=new M(o,h,c)}a.push(p)}return a}_updatePathSegments(){const{visible:e}=this,t=this._createSegments("positionsRender");this._path.setGeometryFromSegments(t,this._origin),this._path.visible=e,this._pathSegments=t}_updatePerimeterSegments(){const e=this.visible&&"euclidean"===this.viewData.mode&&!!this.viewData.path&&this.viewData.path.numVertices>2,t=!0,i=this._createSegments("positionsFittedRender",t);this._perimeter.setGeometryFromSegments(i,this._origin),this._perimeter.visible=e,this._perimeterSegments=i}_updateArea(){const e=this.viewData;switch(E(e.mode)){case"euclidean":this._updateAreaEuclidean(e);break;case"geodesic":this._updateAreaGeodesic()}}_updateAreaEuclidean(e){const t=this.visible;e.validMeasurement&&e.vertexData.triangleIndices?(this._measurementArea.geometry={uv:e.vertexData.positionsFittedWorldPlaneProjected,position:e.vertexData.positionsFittedRender,triangleIndices:e.vertexData.triangleIndices},this._updateCheckerSize(),this._measurementArea.visible=t):this._measurementArea.visible=!1}_updateAreaGeodesic(){this._measurementArea.visible=!1}_updateProjectionLines(){const e=this.viewData,t=this.visible,i=e.mode,s=e.numVertices;if(s>0&&e.validMeasurement&&"euclidean"===i){const i=[];for(let t=0;t<s;++t){const s=C();y(s,e.vertexData.positionsRender[t],this._origin);const r=C();y(r,e.vertexData.positionsFittedRender[t],this._origin),l(S(s,r),0)||i.push([s,r])}this._projectionLines.geometry=i,this._projectionLines.visible=t}else this._projectionLines.geometry=null,this._projectionLines.visible=!1}_updateLabels(){if(this.destroyed)return;const{viewData:e}=this,{area:t,path:i}=e;if(!i)return;const s=this.visible,r=this._areaLabel,a=this._perimeterLabel,n=e.validMeasurement;r.visible=!0,a.visible=!0;let o=!1;const l=O(this.messages,t,this.analysisViewData.unit);if(null!=l&&e.areaCentroid&&s&&(r.geometry={type:"point",point:e.areaCentroid},r.text=l,o=e.validMeasurement),this._set("areaLabel",l),s&&n){const t=F(e.mode),i=e.perimeter,s=P(this.messages,i,this.analysisViewData.unit);this._set("perimeterLabel",s),a.distance=this._parameters.labelDistance,a.anchor="top",a.text=s;let r=!0;for(let n=0;n<e.numVertices;++n){const i=(e.perimeterLabelSegmentIndex+n)%e.numVertices,s=t?this._pathSegments[i]:this._perimeterSegments[i];if(r=!0,a.geometry={type:"segment",segment:s,sampleLocation:"center"},!a.overlaps(this._areaLabel))break;r=!1}a.visible=r}else a.visible=!1;r.visible=o}_updateMessageBundle(){this.loadingMessages=!0,i("esri/core/t9n/Units").then(e=>{this.messages=e,this.view&&this._update()}).finally(()=>{this.loadingMessages=!1})}};function O(e,t,i){return e&&t&&p(e,t,b(t.value,t.unit,i))}function P(e,t,i){return e&&t&&p(e,t,c(t,i))}e([w()],z.prototype,"_parameters",null),e([w()],z.prototype,"view",void 0),e([w()],z.prototype,"messages",void 0),e([w()],z.prototype,"analysis",void 0),e([w()],z.prototype,"_viewData",void 0),e([w()],z.prototype,"analysisViewData",void 0),e([w({readOnly:!0})],z.prototype,"areaLabel",void 0),e([w({readOnly:!0})],z.prototype,"perimeterLabel",void 0),e([w()],z.prototype,"loadingMessages",void 0),e([w()],z.prototype,"visible",null),e([w()],z.prototype,"_renderUnits",null),z=e([f("esri.views.3d.analysis.AreaMeasurement.support.AreaMeasurementVisualization")],z);class U{constructor(e){this.validMeasurement=e?.validMeasurement??!1,this.numVertices=e?.numVertices??0,this.hasStagedVertex=e?.hasStagedVertex??!1,this.path=e?.path,this.vertexData=e?.vertexData??{positionsRender:[],positionsFittedWorldPlaneProjected:[],positionsFittedRender:[],triangleIndices:null},this.mode=e?.mode,this.areaCentroid=e?.areaCentroid,this.perimeterLabelSegmentIndex=e?.perimeterLabelSegmentIndex??0,this.checkerSize=e?.checkerSize??1,this.area=e?.area,this.perimeter=e?.perimeter}}function E(e){switch(e){case"euclidean":case void 0:case null:return"euclidean";case"geodesic":return"geodesic"}}function F(e){return"geodesic"===E(e)}export{z as AreaMeasurementVisualization,U as ViewData};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import{deg2rad as r}from"../../../../../core/mathUtils.js";import{abortMaybe as s}from"../../../../../core/maybe.js";import{debounce as i,throwIfAborted as o}from"../../../../../core/promiseUtils.js";import{valueInUnit as n}from"../../../../../core/quantity.js";import{lengthUnitFromSpatialReference as a,areaUnitFromSpatialReference as l}from"../../../../../core/units.js";import{property as h}from"../../../../../core/accessorSupport/decorators/property.js";import{subclass as d}from"../../../../../core/accessorSupport/decorators/subclass.js";import{set as p}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as m}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as u,set as c,cross as _,negate as g,subtract as f,dot as j,scale as v,add as P}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as x}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as w}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import C from"../../../../../geometry/Polygon.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import{deg2rad as r}from"../../../../../core/mathUtils.js";import{abortMaybe as s}from"../../../../../core/maybe.js";import{debounce as i,throwIfAborted as o}from"../../../../../core/promiseUtils.js";import{valueInUnit as n}from"../../../../../core/quantity.js";import{lengthUnitFromSpatialReference as a,areaUnitFromSpatialReference as l}from"../../../../../core/units.js";import{property as h}from"../../../../../core/accessorSupport/decorators/property.js";import{subclass as d}from"../../../../../core/accessorSupport/decorators/subclass.js";import{set as p}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as m}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as u,set as c,cross as _,negate as g,subtract as f,dot as j,scale as v,add as P}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as x}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as w}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import C from"../../../../../geometry/Polygon.js";import R from"../../../../../geometry/SpatialReference.js";import{isPCPF as y}from"../../../../../geometry/spatialReferenceEllipsoidUtils.js";import{projectDirection as M}from"../../../../../geometry/projection/projectDirection.js";import{projectPointToVector as U}from"../../../../../geometry/projection/projectPointToVector.js";import{projectVectorToVector as A}from"../../../../../geometry/projection/projectVectorToVector.js";import{compactIndices as W}from"../../../../../geometry/support/Indices.js";import{Sphere as D}from"../../../../../geometry/support/sphere.js";import{bestFitPlane as V,planePointDistance as b,boundingSphere as F}from"../../support/measurementUtils.js";import{getElevationAtPoint as I}from"../../../support/ElevationProvider.js";import{midpoint3d as S,makeOrthonormal as T}from"../../../support/mathUtils.js";import{useGeodesicAreaMeasurement as z}from"../../../../support/automaticAreaMeasurementUtils.js";import{triangulate as O}from"../../../../support/euclideanAreaMeasurementUtils.js";import{computeEuclideanMeasurementSR as k}from"../../../../support/measurementUtils.js";import{MeasurementWorkerHandle as q}from"../../../../support/MeasurementWorkerHandle.js";class E{constructor(t){this.positionsWorld=[],this.positionsRender=[],this.positionsFittedRender=[],this.triangleIndices=null,this.areaPolygon=new C({rings:[[]],spatialReference:t}),this.positionsFittedWorldPlaneProjected=this.areaPolygon.rings[0]}}class H{constructor(t,e=null,r=null,s=null,i=null,o=null,n=null){this.mode=t,this.area=e,this.geodesicArea=r,this.perimeter=s,this.geodesicPerimeter=i,this.areaCentroidRenderCoords=o,this.geodesicAreaCentroidRenderCoords=n}}let L=class extends e{get numVertices(){return this._length}get hasStagedVertex(){return null!=this._lastCursorPoint}get fittingMode(){return this._fittingMode}get measurements(){return this._measurements}get updateId(){return this._updateId}constructor(t){super(t),this._length=0,this._lastCursorPoint=null,this._fittingMode=null,this._measurements=null,this._updateId=0,this._centroidRenderCoords=x(),this._planeWorldCoords=w(),this._worldUp=x(),this._worldTangent=x(),this._frame=[x(),x(),x()],this._worldOrigin=x(),this._updateAxisU=x(),this._updateAxisV=x(),this._updateWorldOrigin=x(),this._lastPathVersion=-1,this._mode=null,this._tempU=x(),this._tempV=x(),this._tempVec3=x(),this._tempSphere=new D,this._measurementWorker=new q,this._updateAbortController=null,this._updateMeasurements=i(async(t,e,r,s,i,n)=>{const a=t.spatialReference,l=z(a);u(this._updateAxisU,this._frame[0]),u(this._updateAxisV,this._frame[1]),u(this._updateWorldOrigin,this._worldOrigin);const h=(e,r)=>(e&&t.renderCoordsHelper.toRenderCoords(e,r)||c(r,0,0,0),r),d=e.areaMeasurement?.geometry,p=l&&1!==r&&d?await this._measurementWorker.geodesicLength(d,{stagedPoint:s?i:null}):null;o(n);const m=this._calculateMode(r,p),_="geodesic"===m,[g,f]=await Promise.all([_?null:this._measurementWorker.area2D(this.vertexData.areaPolygon,{unit:this._areaMeasurementUnit,lengthUnit:this._lengthMeasurementUnit,returnCentroid:!0,returnLength:!0}),_&&d?await this._measurementWorker.geodesicArea(d,{stagedPoint:s?i:null,returnCentroid:!0}):null]);o(n);const j=_?null:x();j&&g?.centroid&&this._projectPointToFittedRender(j,this._updateWorldOrigin,[g.centroid?.x??0,g.centroid?.y??0],this._updateAxisU,this._updateAxisV,this.view.renderSpatialReference,this._measurementSR);const v=f?.centroid?h(f.centroid,x()):null;this._measurements=new H(m,_?null:g?.area,_?f?.area:null,_?null:g?.length,_?p:null,_?null:j,_?v:null)});const e=k(t.view.spatialReference);this._measurementSR=e,this._lengthMeasurementUnit=a(e)??"meters",this._areaMeasurementUnit=l(e)??"square-meters";const r=y(e)?R.WebMercator:e;this.vertexData=new E(r)}destroy(){this._measurementWorker.destroy()}update(t,e,r,s,i,o,n){const a=this._lastPathVersion===t.version,l=e?e.equals(this._lastCursorPoint):null==this._lastCursorPoint,h=this._mode===i;return!(a&&!o&&h&&l)&&(this._lastPathVersion=t.version,this._lastCursorPoint=e,this._update(t,e,r,s,i,n),!0)}_update(t,e,r,i,o,n){const a=this.view.renderSpatialReference,l=this._measurementSR;let h=t.numVertices;const d=!(null==e||e.equals(t.lastPoint)||h>2&&e.equals(t.firstPoint)||t.polygonIsClosed);d&&(h+=1);const p=!t.polygonIsClosed&&h>2,m=t.polygonIsClosed||p;this._resize(h);const{positionsWorld:u,positionsRender:c}=this.vertexData,_=(t,e)=>{B(r.elevationProvider,t),U(t,u[e],l),U(t,c[e],a)};if(t.forEachVertexPosition((t,e)=>_(t,e)),d&&_(e,h-1),this.vertexData.areaPolygon.clearCache(),!m)return this._measurements=null,this.vertexData.triangleIndices=null,this._updateId++,void(this._updateAbortController=s(this._updateAbortController));this._updateVertexData(r,a,l,i),this._updateId++,this._updateAbortController??=new AbortController,n.addPromise(this._updateMeasurements(r,t,o,d,e,this._updateAbortController.signal))}_resize(t){for(t<this._length&&(this.vertexData.positionsWorld.length=t,this.vertexData.positionsRender.length=t,this.vertexData.positionsFittedWorldPlaneProjected.length=t,this.vertexData.positionsFittedRender.length=t,this._length=t);this._length<t;)this.vertexData.positionsWorld.push(x()),this.vertexData.positionsRender.push(x()),this.vertexData.positionsFittedWorldPlaneProjected.push(m()),this.vertexData.positionsFittedRender.push(x()),++this._length}_updateVertexData(t,e,r,s){const i=t.renderCoordsHelper,{positionsWorld:o,positionsRender:n,positionsFittedWorldPlaneProjected:a,positionsFittedRender:l}=this.vertexData,h=this._planeWorldCoords,d=this._centroidRenderCoords;S(n,d),i.worldUpAtPosition(d,this._worldUp),i.worldBasisAtPosition(d,0,this._worldTangent),M(d,this._worldUp,e,this._worldUp,r),M(d,this._worldTangent,e,this._worldTangent,r),o.length>2&&V(o,h),this._fittingMode=this._selectFittingMode(h,o,this._worldUp,s);let m=0;if("horizontal"===this._fittingMode){let t=-1/0;n.forEach((e,r)=>{const s=i.getAltitude(n[r]);s>t&&(t=s,m=r)})}const{_worldOrigin:c}=this;u(this._worldOrigin,o[m]);let v=h,P=this._worldTangent;"horizontal"===this._fittingMode?v=this._worldUp:"vertical"===this._fittingMode&&(v=this._tempVec3,P=this._worldUp,T(h,this._worldUp,v));const x=this._frame[0],w=this._frame[1];u(this._frame[2],v),T(P,v,x),_(w,x,this._frame[2]),g(w,w);const C=this._tempVec3;for(let u=0;u<this._length;++u){const t=a[u],s=l[u];f(C,o[u],c),p(t,j(x,C),j(w,C)),this._projectPointToFittedRender(s,c,t,x,w,e,r)}this.vertexData.triangleIndices=W(O(a))}_projectPointToFittedRender(t,e,r,s,i,o,n){const a=this._tempU,l=this._tempV;v(a,s,r[0]),v(l,i,r[1]),P(t,a,l),P(t,t,e),A(t,n,t,o)}_selectFittingMode(t,e,s,i){const o=e.map(e=>Math.abs(b(t,e))).reduce((t,e)=>Math.max(t,e),0);F(e,this._tempSphere);const n=o/(2*this._tempSphere.radius),a=n<i.maxRelativeErrorCoplanar,l=n<i.maxRelativeErrorAlmostCoplanar;let h="horizontal";if(a)h="oblique";else if(l){h=Math.abs(j(s,t))>Math.cos(r(i.verticalAngleThreshold))?"horizontal":"vertical"}return h}_calculateMode(t,e){return null!=e&&0===t?n(e,"meters")>Z?"geodesic":"euclidean":null==e||1===t?"euclidean":"geodesic"}};function B(t,e){e.hasZ||(e.z=I(t,e,"ground")??0)}t([h()],L.prototype,"_measurements",void 0),t([h()],L.prototype,"_updateId",void 0),t([h()],L.prototype,"view",void 0),L=t([d("esri.views.3d.analysis.AreaMeasurement.support.MeasurementData")],L);const Z=1e5;export{H as AreaMeasurementQuantities,L as MeasurementData};
|
|
@@ -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"../../../core/has.js";import{abortMaybe as t,destroyMaybe as
|
|
5
|
+
import{__decorate as e}from"tslib";import"../../../core/has.js";import{abortMaybe as t,destroyMaybe as i}from"../../../core/maybe.js";import{toAdaptiveLengthUnitForArea as s,toAdaptiveAreaUnit as a}from"../../../core/quantity.js";import{property as r,subclass as o}from"../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as n}from"../../../support/getDefaultUnitForView.js";import l from"./AnalysisView3D.js";import{AreaMeasurementController as p}from"./AreaMeasurement/support/AreaMeasurementController.js";import{AreaMeasurement3DPathHelper as u}from"./AreaMeasurement/support/AreaMeasurementPathHelper.js";import{AreaMeasurementVisualization as m}from"./AreaMeasurement/support/AreaMeasurementVisualization.js";import y from"../interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js";import{connectAnalysisViewToTool as h,removeAnalysisViewTool as d,startPlaceOperation as v}from"../../analysis/analysisViewUtils.js";let c=class extends l{constructor(e){super(e),this.type="area-measurement-view-3d",this.analysis=null,this.measurementData=null,this.lastDraggedVertex=null,this.stagedPoint=null,this.mode=0,this.tool=null,this.userOperation=null}initialize(){const{analysis:e,view:t}=this;this.path=new u({view:t,areaMeasurement:e}),this._analysisVisualization=new m({view:t,analysis:e,analysisViewData:this}),this._analysisController=new p({view:t,analysis:e,analysisViewData:this}),this.addHandles(h(this,y))}destroy(){d(this),this.userOperation=t(this.userOperation),this._analysisController=i(this._analysisController),this._analysisVisualization=i(this._analysisVisualization),this.path.destroy()}get visible(){return super.visible}set visible(e){super.visible=e}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get updating(){return!!this._analysisVisualization?.loadingMessages||!!this._analysisController?.updating}get result(){const e=this.measurementData?.measurements;if(!e)return null;const{unit:t}=this,{mode:i}=e,r="geodesic"===i,o=r?e.geodesicArea:e.area,n=r?e.geodesicPerimeter:e.perimeter;return{mode:i,area:o?a(o,t):null,perimeter:n?s(n,t):null}}get viewData(){return this._analysisVisualization.viewData}get areaLabel(){return this._analysisVisualization.areaLabel}get perimeterLabel(){return this._analysisVisualization.perimeterLabel}get validMeasurement(){return this.path.isValidPolygon}get unit(){return this.analysis.unit??n(this.view)}get testData(){}place(e){return v(this,{placementOptions:e})}};e([r()],c.prototype,"_analysisVisualization",void 0),e([r()],c.prototype,"_analysisController",void 0),e([r({readOnly:!0})],c.prototype,"type",void 0),e([r({constructOnly:!0,nonNullable:!0})],c.prototype,"analysis",void 0),e([r()],c.prototype,"updating",null),e([r()],c.prototype,"result",null),e([r()],c.prototype,"measurementData",void 0),e([r()],c.prototype,"viewData",null),e([r()],c.prototype,"areaLabel",null),e([r()],c.prototype,"perimeterLabel",null),e([r()],c.prototype,"validMeasurement",null),e([r()],c.prototype,"path",void 0),e([r()],c.prototype,"lastDraggedVertex",void 0),e([r()],c.prototype,"stagedPoint",void 0),e([r()],c.prototype,"mode",void 0),e([r()],c.prototype,"unit",null),e([r()],c.prototype,"tool",void 0),e([r()],c.prototype,"userOperation",void 0),c=e([o("esri.views.3d.analysis.AreaMeasurementAnalysisView3D")],c);const g=c;export{g 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{__decorate as e}from"tslib";import{volumeMeasurementConfiguration as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{debounce as n}from"../../../../core/promiseUtils.js";import{whenOnce as
|
|
5
|
+
import{__decorate as e}from"tslib";import{volumeMeasurementConfiguration as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{debounce as n}from"../../../../core/promiseUtils.js";import{createVolume as i}from"../../../../core/quantity.js";import{whenOnce as s,watch as l,syncAndInitial as a}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as p}from"../../../../core/screenUtils.js";import{property as u,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{e as c}from"../../../../chunks/earcut.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as h,scaleAndAdd as g,sqrDist as y}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as f,create as _,clone as v}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as w}from"../../../../core/support/UpdatingHandles.js";import{projectOrLoad as j}from"../../../../geometry/projectionUtils.js";import{computeTranslationToOriginAndRotation as b}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as E}from"../../../../geometry/projection/projectBoundingRect.js";import{empty as R,create as G,expand as x,width as L,height as H,fromExtent as T,intersects as P}from"../../../../geometry/support/aaBoundingRect.js";import{newDoubleArray as V}from"../../../../geometry/support/DoubleArray.js";import{t as C}from"../../../../chunks/vec3.js";import M from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as U}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as A}from"./VolumeMeasurementCutFillComputation.js";import{VolumeMeasurementDistanceTooCloseError as I,VolumeMeasurementDistanceTooFarError as O,VolumeMeasurementPerimeterTooLargeError as D,VolumeMeasurementUnsupportedCoordinateSystemError as S,VolumeMeasurementUnsupportedLayerTransparencyError as F}from"./volumeMeasurementErrors.js";import{VolumeMeasurementRawResult as k}from"./VolumeMeasurementRawResult.js";import W from"./VolumeMeasurementResult.js";import{ElevationContext as N}from"../../layers/graphics/ElevationContext.js";import{getElevationAtPoint as z}from"../../support/ElevationProvider.js";import{polygonToRenderInfo as q}from"../../support/renderInfoUtils/polygon.js";import{CutFillDepth as B,TargetGeometryRenderInfo as J}from"../../webgl-engine/lib/CutFillDepth.js";import{MeasurementWorkerHandle as K}from"../../../support/MeasurementWorkerHandle.js";let Q=class extends r{constructor(e){super(e),this._measurementWorkerHandle=new K,this._getElevationProvider=()=>this.view.elevationProvider,this.labelAnchors=null,this._updatingHandles=new w,this._rawResult=null,this._debouncedUpdate=n(async(e,t,r,o)=>{if(!this._renderer.done)return;const{renderCoordsHelper:n}=this.view,i=new A({extent:t,localOrigin:r,renderCoordsHelper:n});this._renderer.setup(i,o),this._renderer.start();const[l]=await Promise.allSettled([this._measurementWorkerHandle.areaHorizontal(e,{returnLength:!0}),s(()=>this._renderer.done).then(()=>{this._updateLabelAnchors(i,this._renderer.getResults())})]);if(!this._enabled)return;const a=this._renderer.getResults();this._updateResult(i,a,"fulfilled"===l.status?l.value:null)})}initialize(){const e=this.view;this._renderer=new B({view:e}),this.addHandles([this._createElevationUpdateHandle(),l(()=>({projectedGeometry:this._projectedGeometry,localOrigin:this._localOrigin,targetGeometryRenderInfo:this._targetGeometryRenderInfo,enabled:this._enabled}),({projectedGeometry:e,localOrigin:t,targetGeometryRenderInfo:r,enabled:o})=>{const n=e?.extent;e&&n&&t&&r&&o?this._updatingHandles.addPromise(this._debouncedUpdate(e,n,t,r)):this._rawResult=null},a)])}destroy(){this._updatingHandles.destroy(),this._renderer.destroy(),this._measurementWorkerHandle.destroy()}get _projectedGeometry(){if(!this.analysis.valid)return null;const e=this.analysis.geometry,t=j(e,this.view.spatialReference);return t.pending?(this._updatingHandles.addPromise(t.pending),null):(e&&!t.geometry&&U(this.analysis,e.spatialReference,o.getLogger(this)),t.geometry)}get _localOrigin(){const e=this._projectedGeometry?.extent;return e?f(e.center.x,e.center.y,0):null}get elevationAlignedGeometry(){const e=this._projectedGeometry;if(!e)return null;const t=e.clone();return X(this._getElevationProvider(),t),t}get targetGeometry(){const{elevationAlignedGeometry:e}=this;if(!e)return null;const t=this.analysis.measureType,{effectiveTargetElevation:r}=this.analysisViewData;if("stockpile"===t||null==r)return e;const o=e.clone();return o.rings[0].forEach(e=>e[2]=r),o}get _targetGeometryRenderInfo(){const e=this.targetGeometry,t=this._projectedGeometry?.extent,r=this._localOrigin;if(!e||!t||!r)return null;const{elevationProvider:o,renderCoordsHelper:n}=this.view,i=q(e,o,n,N.fromElevationInfo(new M({mode:"absolute-height"}))),{polygons:s}=i,l=s[0],a=c(l.position,l.holeIndices,3),p=V(3*l.count),u=d(),m=d();return b(t.spatialReference,r,u,n.spatialReference),m[12]=-u[12],m[13]=-u[13],m[14]=-u[14],C(p,l.position,m),new J(p,a)}get updating(){return this._renderer.updating||this._updatingHandles.updating}get result(){const e=this._rawResult,{volume:t,area:r,length:o}=this.analysisViewData.effectiveDisplayUnits;return e?new W({measureType:this.analysis.measureType,rawResult:e,volumeUnit:t,areaUnit:r,lengthUnit:o}):null}get error(){return this._unsupportedCoordinateSystemError??this._unsupportedLayerTransparencyError??this._perimeterTooLargeError??this._tooNearFarError}get _tooNearFarError(){const e=this.elevationAlignedGeometry;if(!e)return null;const{view:r}=this,{elevationProvider:o,renderCoordsHelper:n}=r,{camera:i}=r.state,s=q(e,o,n,N.fromElevationInfo(new M({mode:"absolute-height"}))),{polygons:l}=s,a=l[0].position;R(oe);for(let t=0;t<a.length;t+=3)i.projectToScreen(h(re,a[t],a[t+1],a[t+2]),ne),x(oe,ne,oe);const p=L(oe),u=H(oe),{maxVolumeExtentSizeVw:m,minVolumeExtentSizePixels:c}=t;return p>i.width/i.pixelRatio*m||u>i.height/i.pixelRatio*m?new I:Math.max(p,u)<c?new O:null}get _perimeterTooLargeError(){return this._perimeterTooLargeLocalError??this._perimeterTooLargeGlobalError}get _perimeterTooLargeLocalError(){const{spatialReference:e,state:{isLocal:r}}=this.view;if(!r||!e.isWebMercator)return null;const o=this._perimeter,{maxPerimeterLocalWebMercator:n}=t;return null!=o&&o>n?new D:null}get _perimeterTooLargeGlobalError(){if(!this.view.state.isGlobal)return null;const e=this._perimeter,{maxPerimeterGlobal:r}=t;return null!=e&&e>r?new D:null}get _unsupportedCoordinateSystemError(){return this.view.state.isLocal&&this.view.spatialReference.isGeographic?new S:null}get _unsupportedLayerTransparencyError(){return(this.view.map?.ground.opacity??1)<1?new F:null}get _perimeter(){const e=this._targetGeometryRenderInfo?.positions,t=e?Z($(e)):null;return null!=t?t/this.view.renderCoordsHelper.unitInMeters:null}get _enabled(){return!this.error}_createElevationUpdateHandle(){const e=e=>{const t=this._projectedGeometry?.extent;"ground"===e.context&&t&&(E(e.extent,e.spatialReference,ee,this.view.spatialReference),T(t,te),P(ee,te)&&(this._getElevationProvider=()=>this.view.elevationProvider))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_updateResult(e,t,r){const{dimensions:{width:o,height:n},cameraNearFar:{near:s,far:l}}=e,a=o/t.width*(n/t.height),p=Y(t.cut.totalDepth,s,l)*a,u=Y(t.fill.totalDepth,s,l)*a;this._rawResult=new k({cutVolume:i(Math.abs(p),"cubic-meters"),fillVolume:i(u,"cubic-meters"),area:r?.area,perimeter:r?.length})}_updateLabelAnchors(e,t){const{dimensions:{width:r,height:o},cameraNearFar:{near:n,far:i},cameraPositionRenderSpace:s,northVector:l,eastVector:a,upVector:p}=e,u=e=>{const{labelDepth:u,labelCoords:m,totalDepth:c}=e,d=v(s);return 0!==c&&(g(d,d,a,r*(m[0]/t.width-.5)),g(d,d,l,o*(m[1]/t.height-.5))),g(d,d,p,-Y(u,n,i)),d};this.labelAnchors={cut:u(t.cut),fill:u(t.fill)}}};function X(e,t){t.rings[0].forEach(t=>{t[2]=z(e,t,"ground")??0})}function Y(e,t,r){return e*(r-t)+t}function Z(e){if(!e)return null;let t=null,r=null,o=0;for(const n of e)t||(t=[n[0],n[1],n[2]??0]),r?o+=y(r,n):r=[0,0,0],r[0]=n[0],r[1]=n[1],r[2]=n[2];return t&&r&&(o+=y(r,t)),Math.sqrt(o)}function*$(e){const t=_();for(let r=0;r<e.length;r+=3)t[0]=e[r],t[1]=e[r+1],t[2]=e[r+2],yield t}e([u()],Q.prototype,"_projectedGeometry",null),e([u()],Q.prototype,"_localOrigin",null),e([u()],Q.prototype,"_getElevationProvider",void 0),e([u()],Q.prototype,"elevationAlignedGeometry",null),e([u()],Q.prototype,"targetGeometry",null),e([u()],Q.prototype,"_targetGeometryRenderInfo",null),e([u({constructOnly:!0})],Q.prototype,"analysis",void 0),e([u({constructOnly:!0})],Q.prototype,"analysisViewData",void 0),e([u({constructOnly:!0})],Q.prototype,"view",void 0),e([u()],Q.prototype,"updating",null),e([u()],Q.prototype,"result",null),e([u()],Q.prototype,"labelAnchors",void 0),e([u()],Q.prototype,"error",null),e([u()],Q.prototype,"_tooNearFarError",null),e([u()],Q.prototype,"_perimeterTooLargeError",null),e([u()],Q.prototype,"_perimeterTooLargeLocalError",null),e([u()],Q.prototype,"_perimeterTooLargeGlobalError",null),e([u()],Q.prototype,"_unsupportedCoordinateSystemError",null),e([u()],Q.prototype,"_unsupportedLayerTransparencyError",null),e([u()],Q.prototype,"_perimeter",null),e([u()],Q.prototype,"_enabled",null),e([u()],Q.prototype,"_renderer",void 0),e([u({readOnly:!0})],Q.prototype,"_updatingHandles",void 0),e([u()],Q.prototype,"_rawResult",void 0),Q=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],Q);const ee=R(),te=R(),re=_(),oe=G(),ne=p();export{Q as VolumeMeasurementCutFillController};
|
|
@@ -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{valueInUnit as t,createVolume as e}from"../../../../core/quantity.js";class l{constructor({cutVolume:l,fillVolume:o,area:i,perimeter:u}){this.cutVolume=l,this.fillVolume=o;const r=l.unit,s=t(o,r);this.netVolume=e(l.value-s,r),this.totalVolume=e(l.value+s,r),this.area=i,this.perimeter=u}}export{l as VolumeMeasurementRawResult};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type Accessor from "../../../../core/Accessor.js";
|
|
2
2
|
import type { VolumeMeasureType } from "../../../../analysis/VolumeMeasurement/types.js";
|
|
3
|
-
import type { Volume } from "../../../../core/quantity.js";
|
|
3
|
+
import type { Area, Length, Volume } from "../../../../core/quantity.js";
|
|
4
4
|
|
|
5
5
|
export interface VolumeMeasurementResultProperties {
|
|
6
6
|
/** Volume measure type. */
|
|
@@ -20,6 +20,8 @@ export interface VolumeMeasurementResultProperties {
|
|
|
20
20
|
*/
|
|
21
21
|
export default class VolumeMeasurementResult extends Accessor {
|
|
22
22
|
constructor(properties?: VolumeMeasurementResultProperties);
|
|
23
|
+
/** The area of the measured volume. */
|
|
24
|
+
get area(): Area | null | undefined;
|
|
23
25
|
/** Volume that needs to be removed to reach the target surface defined by the polygon. */
|
|
24
26
|
get cutVolume(): Volume | null | undefined;
|
|
25
27
|
/** Volume that needs to be added to reach the target surface defined by the polygon. */
|
|
@@ -31,6 +33,8 @@ export default class VolumeMeasurementResult extends Accessor {
|
|
|
31
33
|
* A positive value indicates a surplus volume that needs to be removed.
|
|
32
34
|
*/
|
|
33
35
|
get netVolume(): Volume | null | undefined;
|
|
36
|
+
/** The perimeter of the measured volume. */
|
|
37
|
+
get perimeter(): Length | null | undefined;
|
|
34
38
|
/** Sum of the cut volume and fill volume. */
|
|
35
39
|
get totalVolume(): Volume | null | undefined;
|
|
36
40
|
}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import{
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import{toAdaptiveAreaUnit as o,toAdaptiveVolumeUnit as r,toAdaptiveLengthUnit as l}from"../../../../core/quantity.js";import{property as u,subclass as s}from"../../../../core/accessorSupport/decorators.js";let n=class extends e{constructor(t){super(t)}get area(){const{area:t}=this.rawResult;return t?o(t,this.areaUnit):null}get cutVolume(){const{cutVolume:t}=this.rawResult;return r(t,this.volumeUnit)}get fillVolume(){const{fillVolume:t}=this.rawResult;return r(t,this.volumeUnit)}get netVolume(){const{netVolume:t}=this.rawResult;return r(t,this.volumeUnit)}get perimeter(){const{perimeter:t}=this.rawResult;return t?l(t,this.lengthUnit):null}get totalVolume(){const{totalVolume:t}=this.rawResult;return r(t,this.volumeUnit)}};t([u({constructOnly:!0})],n.prototype,"measureType",void 0),t([u()],n.prototype,"cutVolume",null),t([u()],n.prototype,"fillVolume",null),t([u()],n.prototype,"netVolume",null),t([u()],n.prototype,"totalVolume",null),t([u({constructOnly:!0})],n.prototype,"rawResult",void 0),t([u({constructOnly:!0})],n.prototype,"volumeUnit",void 0),t([u({constructOnly:!0})],n.prototype,"areaUnit",void 0),t([u({constructOnly:!0})],n.prototype,"lengthUnit",void 0),n=t([s("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementResult")],n);export{n 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{__decorate as e}from"tslib";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{verticalLengthUnitFromSpatialReference as i,convertUnit as s}from"../../../core/units.js";import{property as l,subclass as r}from"../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as n}from"../../../support/getDefaultUnitForView.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{verticalLengthUnitFromSpatialReference as i,convertUnit as s}from"../../../core/units.js";import{property as l,subclass as r}from"../../../core/accessorSupport/decorators.js";import{getDefaultUnitForView as n}from"../../../support/getDefaultUnitForView.js";import a from"./AnalysisView3D.js";import{VolumeMeasurementCutFillController as o}from"./VolumeMeasurement/VolumeMeasurementCutFillController.js";import{VolumeMeasurementCutFillVisualization as u}from"./VolumeMeasurement/VolumeMeasurementCutFillVisualization.js";import y from"./VolumeMeasurement/VolumeMeasurementTool.js";let p=class extends a{constructor(e){super(e),this.type="volume-measurement-view-3d",this.analysis=null}initialize(){const{analysis:e,view:t}=this;this._analysisController=new o({view:t,analysis:e,analysisViewData:this}),this._analysisTool=new y({analysis:e,view:t,analysisViewData:this}),this._analysisVisualization=new u({view:t,analysis:e,analysisViewData:this})}destroy(){this._analysisController=t(this._analysisController),this._analysisVisualization=t(this._analysisVisualization),this._analysisTool.destroy()}get error(){return this._analysisController?.error??null}get result(){return this._analysisController?.result}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get visible(){return super.visible}set visible(e){super.visible=e}get elevationAlignedGeometry(){return this._analysisController?.elevationAlignedGeometry}get effectiveTargetElevation(){const{cutFillOptions:e,inputUnits:t}=this.analysis,{targetElevation:l}=e,r=t?.elevation??"meters",n=i(this.view.spatialReference);if(null!=l&&null!=n)return s(l,r,n);const a=this.elevationAlignedGeometry?.extent;return null==a?.zmin||null==a?.zmax?null:(a.zmax+a.zmin)/2}get targetGeometry(){return this._analysisController?.targetGeometry}get effectiveDisplayUnits(){const{displayUnits:e}=this.analysis,t=n(this.view);return{elevation:e.elevation??t,volume:e.volume??t,area:e.area??t,length:e.length??t}}get labelAnchors(){return this._analysisController?.labelAnchors}get updating(){return this._analysisController?.updating||this._analysisTool?.updating||this._analysisVisualization?.updating}place(e){return this._analysisTool.place(e)}get test(){}};e([l()],p.prototype,"error",null),e([l({readOnly:!0})],p.prototype,"type",void 0),e([l({constructOnly:!0,nonNullable:!0})],p.prototype,"analysis",void 0),e([l({readOnly:!0})],p.prototype,"result",null),e([l()],p.prototype,"elevationAlignedGeometry",null),e([l({type:Number})],p.prototype,"effectiveTargetElevation",null),e([l()],p.prototype,"targetGeometry",null),e([l()],p.prototype,"effectiveDisplayUnits",null),e([l()],p.prototype,"labelAnchors",null),e([l()],p.prototype,"updating",null),e([l()],p.prototype,"_analysisController",void 0),p=e([r("esri.views.3d.analysis.VolumeMeasurementAnalysisView3D")],p);const m=p;export{m 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{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../core/Evented.js";import"../../../core/has.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{watch as n,when as r,sync as o,syncAndInitial as
|
|
5
|
+
import{__decorate as e}from"tslib";import{EventedAccessor as t}from"../../../core/Evented.js";import"../../../core/has.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{watch as n,when as r,sync as o,syncAndInitial as s}from"../../../core/reactiveUtils.js";import{property as a,subclass as h}from"../../../core/accessorSupport/decorators.js";import{equals as l,copy as c,scale as g,lerp as d}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p,clone as m,fromValues as _}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isEarth as u}from"../../../geometry/ellipsoidUtils.js";import{isLoadedOrLoadFor as v}from"../../../geometry/projectionUtils.js";import f from"../../../geometry/SpatialReference.js";import{projectPointToVector as w}from"../../../geometry/projection/projectPointToVector.js";import{getGCSForPlanet as P}from"../../../geometry/support/planetGCSUtils.js";import{EnvironmentRenderer as y}from"./EnvironmentRenderer.js";import{positionToTimezoneInfo as b}from"../support/earthUtils.js";import{ColorAndIntensity as T,computeColorAndIntensity as L,computeVirtualLightDirection as j,computeShadowsEnabled as G}from"../support/sunUtils.js";import{MainLight as U,AmbientLight as C,FillLight as H}from"../webgl-engine/lighting/Lightsources.js";let E=class extends t{constructor(e){super(e),this._tmpLightParameters=new T,this._defaultLightParameters=new T,this._tmpDate=new Date,this._tmpTz={hours:0,minutes:0,seconds:0},this._viewHandlesKey="viewHandles",this._trackingEnabled=!1,this._mainLight=new U,this._ambientLight=new C,this._moonLight=new H,this._disableWeather=!1,this._renderer=null,this._resetReferencePosition()}destroy(){this.disconnectView()}get _view(){return this._renderer?.view}get updating(){return!!this._renderer?.updating||!this._canProjectCameraPosition}get weatherEnabled(){return this._view?.environment.atmosphereEnabled&&!this._disableWeather&&1===this._view?.state?.viewingMode&&u(this._view.spatialReference)}get _weatherAvailable(){return this.weatherEnabled&&this._renderer?.weatherAvailable}get referencePositionGeographic(){return this._referencePositionGeographic}get _canProjectCameraPosition(){const e=this._view?.stateManager?.camera?.position?.spatialReference??f.WGS84,t=P(e);return v(e,t)}connectView(e){if(this._renderer)return;this._renderer=new y({view:e});const t=()=>this._updateRenderParameters(),i=()=>this._cameraHandler();this.addHandles([n(()=>e.environment.lighting,e=>this._updateLightingHandler(e),o),n(()=>"virtual"!==e.environment.lighting.type?e.environment.lighting.date:null,e=>this._lightingDateHandler(e),o),n(()=>e.environment.lighting.directShadowsEnabled,t,o),n(()=>e.spatialReference,()=>this._resetReferencePosition(!0),o),n(()=>[e.environment.weather.type,this.weatherEnabled],()=>this._updateLighting(null,1),o),n(()=>"snowy"===e.environment.weather.type&&e.environment.weather.snowCover,t,o),n(()=>e.environment,e=>e.setComputeWeatherAvailable(()=>this._weatherAvailable),s),n(()=>e.viewingMode,()=>this._resetReferencePosition(!0),s),n(()=>"virtual"!==e.environment.lighting.type&&e.environment.lighting.cameraTrackingEnabled,e=>this._updateCameraTracking(e),s),n(()=>e.state.camera,i,s),r(()=>this._canProjectCameraPosition,()=>this._resetReferencePosition(!0),o)],this._viewHandlesKey),this._updateRenderParameters(),this._updateLighting(),this._cameraHandler(),this.notifyChange("updating")}disconnectView(){this.removeHandles(this._viewHandlesKey),this._resetReferencePosition(),this._renderer=i(this._renderer)}_updateLightingHandler(e){this._updateCameraTracking("virtual"!==e.type&&e.cameraTrackingEnabled),this._lightingDateHandler("virtual"!==e.type?e.date:null),this._updateRenderParameters()}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;"virtual"!==e?.type&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){const t=this._view.environment.lighting;if("virtual"!==t?.type){if(e){if(!t.positionTimezoneInfo.autoUpdated&&(this._preupdateTracking(e),null!=this._referencePositionGeographic)){const e=b(this._referencePositionGeographic,this._tmpTz);null!=e&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}this._updateLighting(e)}}else this._updateLighting()}_preupdateTracking(e){!this._trackingEnabled&&"virtual"!==this._view.environment.lighting.type&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const i=t.stateManager.camera;if(!i)return;const n=i.position,r=n.spatialReference??f.WGS84,o=P(r);if(!w(n,k,o,M)){if(null==this._referencePositionGeographic)return;return this._referencePositionGeographic=null,void this._updateLighting()}this._referencePositionGeographic?l(this._referencePositionGeographic,k)||(c(this._referencePositionGeographic,k),this.notifyChange("referencePositionGeographic")):this._referencePositionGeographic=m(k),this._autoUpdateTimezone(this._referencePositionGeographic,e)||this._updateLighting(e)}_updateLighting(e,t=0){const i=this._view,{lighting:n}=i.environment,r="virtual"===n.type,o=this._referencePositionGeographic,s=null!=o?this._tmpLightParameters:this._defaultLightParameters;if(o){e??=r?null:n.date;const t=this._weatherAvailable?i.environment.weather.type:"disabled";L(e,o,i.state.viewingMode,t,i.state.camera,s)}else r&&j(i.state.camera,i.state.viewingMode,s.direct.directionToLightSource);const a=this._mainLight,h=s.direct;g(a.intensity,h.color,h.intensity*Math.PI),c(a.direction,h.directionToLightSource),a.specularStrength=s.specularStrength,a.environmentStrength=s.environmentStrength;const l=this._ambientLight;g(l.intensity,s.ambient.color,s.ambient.intensity);const p=this._moonLight;d(p.intensity,R,S,s.globalFactor);const m=(1-.5*s.globalFactor)*(1-.4*s.noonFactor*(1-s.globalFactor));g(p.intensity,p.intensity,m),c(p.direction,h.directionToLightSource),this._view.stage?.renderer.updateLighting([a,l,p],s.noonFactor,s.globalFactor,this._weatherAvailable?t:0),this._updateRenderParameters()}_autoUpdateTimezone(e,t=null){if("virtual"===this._view.environment.lighting.type||!this._view.environment.lighting.cameraTrackingEnabled||null==e)return!1;const i=this._tmpDate;i.setTime((t||this._view.environment.lighting.date).getTime());const n=b(e,this._tmpTz);if(null==n)return!1;let r=this._view.environment.lighting.positionTimezoneInfo;if(r.autoUpdated){if(r.hours===n.hours&&r.minutes===n.minutes&&r.seconds===n.seconds)return!1}else r=n;const o=i.getUTCHours()-(n.hours-r.hours),s=i.getUTCMinutes()-(n.minutes-r.minutes),a=i.getUTCSeconds()-(n.seconds-r.seconds);return i.setUTCHours(o),i.setUTCMinutes(s),i.setUTCSeconds(a),!t&&this._view.environment.lighting.autoUpdate(i,n)}_updateRenderParameters(){const e=this._view.stage;if(!e)return;const t=null==this._referencePositionGeographic||G(this._referencePositionGeographic[2],this._view.state.viewingMode);e.renderer.setParameters({shadowMap:this._view.environment.lighting.directShadowsEnabled&&t,environment:this._view.environment,weatherVisible:this._weatherAvailable})}_resetReferencePosition(e=!1){this._referencePositionGeographic=null,e&&this._cameraHandler()}get test(){}};e([a({type:Boolean,readOnly:!0})],E.prototype,"updating",null),e([a()],E.prototype,"_disableWeather",void 0),e([a()],E.prototype,"weatherEnabled",null),e([a()],E.prototype,"_weatherAvailable",null),e([a()],E.prototype,"referencePositionGeographic",null),e([a()],E.prototype,"_referencePositionGeographic",void 0),e([a()],E.prototype,"_renderer",void 0),e([a()],E.prototype,"_canProjectCameraPosition",null),E=e([h("esri.views.3d.environment.EnvironmentManager")],E);const R=_(.22,.22,.33),S=_(.22,.22,.22),k=p(),M={zConversionDisabled:!0};export{E as EnvironmentManager};
|
|
@@ -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{equals as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{removeMaybe as i,abortMaybe as s}from"../../../core/maybe.js";import{debounce as r,ignoreAbortErrors as l,throwIfAborted as n}from"../../../core/promiseUtils.js";import{watch as a,when as o,sync as u,whenOnce as d}from"../../../core/reactiveUtils.js";import{addFrameTask as h}from"../../../core/scheduling.js";import{Seconds as c,secondsFromMilliseconds as p}from"../../../core/time.js";import{property as m,subclass as g}from"../../../core/accessorSupport/decorators.js";import{projectOrLoad as f}from"../../../geometry/projectionUtils.js";import _ from"../../../geometry/SpatialReference.js";import{fromExtent as y,intersection as v,toExtent as T,create as w,contains as S,area as b,intersects as R}from"../../../geometry/support/aaBoundingRect.js";import{getInfo as x}from"../../../geometry/support/spatialReferenceUtils.js";import A from"../../../symbols/support/ElevationInfo.js";import{simulationSettingsEqual as L,getPositions as j,getFlowSimulationSettings as E}from"../../2d/engine/flow/utils.js";import M from"./SubView3D.js";import{getFeatureTileId as P}from"./support/FeatureTileDescriptor.js";import{makeScheduleFunction as U}from"./support/makeScheduleFunction.js";import{debugFlags as C}from"../support/debugFlags.js";import{tileFilterDistance as W,scaleThresholdForLoadingAllTiles as F,defaultTransitionDuration as I,transitionDurationFactor as D,seamlessTransitionEnabled as k,densityFactor as q,loadAllTilesDensityFactor as V,averageLoadingTimeSmoothingFactor as G,fadeOutTime as O,fadeInTime as B,minimumTracingResolution as H}from"../support/flow/constants.js";import{isFullExtent as z,wrappedWidth as N,FlowQuery3D as Q}from"../support/flow/FlowQuery3D.js";import{FlowWorkerHandle as J}from"../support/flow/FlowWorkerHandle.js";import{materialParametersFromRenderer as K,createStreamlineGeometry as X}from"../support/flow/geometryUtils.js";import{boundingRectOfTiles as Y}from"../support/flow/loadUtils.js";import{StreamlineResources3DOverlay as Z}from"../support/flow/StreamlineResources3DOverlay.js";import{StreamlineResources3DShape as $}from"../support/flow/StreamlineResources3DShape.js";import{webMercatorWorldExtent as ee}from"../terrain/TerrainConst.js";import{descendantsAtLevel as te,tilesAreRelated as ie}from"../terrain/tileUtils.js";import{isScreenSizePerspectiveEnabled as se}from"../webgl-engine/lib/screenSizePerspectiveUtils.js";import{RibbonLineMaterial as re}from"../webgl-engine/materials/RibbonLineMaterial.js";import{isInEffectiveScaleRange as le,hasLayerBasedScaleVisibility as ne}from"../../support/layerViewUtils.js";import{TaskPriority as ae}from"../../support/Scheduler.js";let oe=class extends M{constructor(e){super(e),this.type="flow",this.renderedTiles=null,this.requireLoad=!1,this.workerHandle=null,this.frameTask=null,this._averageLoadingTime=c(0),this._abortController=null,this._loadingState="ready-to-load",this._tilesUpdateIsWaiting=!1,this._debugAllowAutoLoading=!0,this.emissiveStrength=0,this._overrideMaterialParameters=null,this._overrideSimulationSettings=null,this._overrideTransitionEnabled=null,this._updateTask=null,this._debouncedTileUpdate=r(async()=>{const{allTiles:e}=this.surface,t=this._getTileFilterFunction(),i=new Set;function*s(s){for(let r=0;r<e.length;++r){const l=e.at(r);t(l)&&i.add(l),s.madeProgress(),s.done&&(s=yield)}}await this.frameTask.scheduleGenerator(s),this.renderedTiles=i})}initialize(){const{surface:e,view:t}=this,{resourceController:i}=t;this.workerHandle=new J(U(i)),this.frameTask=i.scheduler.registerTask(ae.FLOW_GENERATOR),this._updateTask=h({update:()=>this._update()}),this.addHandles([a(()=>this._simulationSettings,()=>this.triggerLoad(),{sync:!0,equals:(e,t)=>null==e&&null==t||null!=e&&null!=t&&L(e,t)}),a(()=>{const{elevationInfo:e}=this;return[this._clippingArea,this.visible,this._draped,this.view.state.contentPixelRatio,this.view.viewingMode,e?.mode,e?.offset,e?.unit,this._effectiveDensity]},()=>this.triggerLoad(),u),o(()=>!this.view.animationsEnabled,()=>{const{_resources:e,_lastResources:t}=this;null!=e&&(e.startTime=ce),null!=t&&(t.startTime=ce)},u),a(()=>this._materialParameters,e=>{this._resources?.setMaterialParameters(e),this._lastResources?.setMaterialParameters(e)}),o(()=>e.allTilesCreated,()=>this._triggerTilesUpdate,u),t.enableFeatureTiles(),a(()=>[this._dataBounds,this._featureTilesBounds,this.loadAllTiles],()=>this._triggerTilesUpdate()),a(()=>this._flowRenderer,(e,t)=>{const i=t?.visualVariables??[],s=e?.visualVariables??[];s.length===i.length&&s.every((e,t)=>e.type===i[t].type)||this.clear()}),o(()=>!t.featureTiles?.updating,()=>{this._triggerTilesUpdate()})]),this._triggerTilesUpdate()}destroy(){this._updateTask=i(this._updateTask),this.abort(),this.clear()}abort(){this._abortController=s(this._abortController),this.requireLoad=!1}get _clippingArea(){const e=f(this.view.clippingArea,this.surface.spatialReference).geometry;return null==e?null:y(e)}get _dataBounds(){const e=this._fullExtentSurfaceSpatialReference;return null==e?null:y(e)}get _fullExtentSurfaceSpatialReference(){return f(this.layer.fullExtent,this.surface.spatialReference).geometry}get _draped(){return"on-the-ground"===this.elevationInfo.mode}get extent(){if(this.loadAllTiles)return pe(this._fullExtentSurfaceSpatialReference);const{spatialReference:e}=this.surface;let t=this.renderedTiles;if(null==e||null==t)return null;const i=this.view.terrainLevel;if(null!=i){const e=new Set;t.forEach(t=>{Math.abs(i-t.level)<W&&e.add(t)}),t=e}const s=Y(t,this.spatialReferenceInfo);return null==s?null:(v(s,this._clippingArea,s),pe(T(s,e)))}get loadAllTiles(){return this.view.scale>(C.FLOW_GLOBAL_SCALE_THRESHOLD??F)}get isDataGlobal(){const{extent:e,spatialReferenceInfo:t}=this;return null!=e&&z(e.xmin,e.xmax,t)}get loadAllTilesLevel(){const{tilingScheme:e}=this.surface;return Math.min(Math.ceil(e.levelAtScale(C.FLOW_GLOBAL_SCALE_THRESHOLD??F)),e.getMaxLod())}get targetTiles(){const e=new Map;if(this.loadAllTiles){const{_dataBounds:t}=this;if(null==t)return e;const i=w(),s=this.loadAllTilesLevel,r=this.surface.tilingScheme,l=r.rootTilesInExtent(t).flatMap(e=>te(e,s));for(const n of l){const[l,a,o]=n;r.getExtent(s,a,o,i),de(t,i)&&e.set(P(s,a,o),n)}return e}const{renderedTiles:t}=this;for(const i of t??[])e.set(i.key,i.lij);return e}get _featureTilesBounds(){const e=this.view.featureTiles?.filterExtent,t=f(e,this.surface.spatialReference).geometry;return null==t?null:y(t)}get _flowRenderer(){const e=this.layer.renderer;return"flow"!==e?.type?null:e}get _materialParameters(){return{...K(this._flowRenderer,this.layerView.fullOpacity,this.emissiveStrength),...this._overrideMaterialParameters,hasSlicePlane:this.layerView.slicePlaneEnabled,screenSizePerspective:!this._draped&&se(this.layer.screenSizePerspectiveEnabled)?this.view.screenSizePerspective.parameters:null}}get _opacity(){return this.layerView.fullOpacity}get _seamlessTransitionWaitingTime(){const{_averageLoadingTime:e}=this;return c(0===e?I:this._averageLoadingTime*D)}get _seamlessTransitionEnabled(){return null!=this._overrideTransitionEnabled?this._overrideTransitionEnabled:k}get _tracingResolution(){const{extent:e}=this;if(!e)return[0,0];const t=N(e.xmin,e.xmax,this.spatialReferenceInfo?.valid)/(e.ymax-e.ymin),[i,s]=this.view.size;let r,l;i<s?(r=i,l=i/t):(r=s*t,l=s);const n=H,a=this.view.qualitySettings.flow.maxTracingResolution,o=Math.max(1,n/Math.min(r,l)),u=o*Math.min(1,a/Math.max(r*o,l*o));return[Math.round(r*u),Math.round(l*u)]}get visible(){const e=this._flowRenderer?.color;return this.visibleAtCurrentScale&&this.layer.effectiveVisible&&this._opacity>0&&(null==e||e.a>0)}get _estimatedStreamlines(){const{extent:e,_simulationSettings:t,renderedTiles:i,loadAllTiles:s}=this;if(null==t||null==i)return 0;const r=this._tracingResolution[0]*this._tracingResolution[1]/t.lineSpacing**2*t.density;if(s)return 2*r;const l=null==e?null:y(e);if(null==l)return 0;let n=0;for(const u of i)S(l,u.extent)&&(n+=b(u.extent));const a=b(l),o=0===a?0:n/a;return 2*Math.round(r*o)}get _effectiveDensity(){const{_estimatedStreamlines:e,_simulationSettings:t}=this,{qualitySettings:i,quality:s}=this.view;if(null==t)return 0;const r=i.flow.maxTotalNumberOfStreamlines,l=e>=r?r/e:1,n=t.density*l*s;return t.lineSpacing/Math.sqrt(n)<t.lineCollisionWidth?(t.lineSpacing/t.lineCollisionWidth)**2:n}get elevationInfo(){return this.layer.elevationInfo??ue}startPositions(e){if(!this._seamlessTransitionEnabled)return[];const{_flowRenderer:t,_resources:i}=this;return null==t||null==i?[]:j(i.streamlines,i.query,e,t.flowSpeed)}get needsMagnitude(){return this._flowRenderer?.hasVisualVariables()??!1}get spatialReferenceInfo(){return x(this.surface.spatialReference)}get layer(){return this.layerView.layer}get loadingState(){return this._loadingState}get loadRequirementsMet(){return null!=this.renderedTiles&&(this.renderedTiles.size>0||this.loadAllTiles)&&null!=this.extent}hasWork(){return null==this.extent||this.updatingHandles.updating||this.requireLoad||"before-transition"===this._loadingState}get updating(){return this._debugAllowAutoLoading&&this.visible&&!(this.destroyed||this.destroying)&&this.hasWork()}get visibleAtCurrentScale(){return!ne()||le(this.layer.effectiveScaleRange,this.view.scale)}get _simulationSettings(){const{_flowRenderer:e,_overrideSimulationSettings:t}=this;if(null==e)return null;let i=E(e);return i.segmentLength=i.lineCollisionWidth/2,i.onlyForwardTracing=!1,i.density*=q,this.loadAllTiles&&this.isDataGlobal&&(i.density*=V),null!=t&&(i={...i,...t}),i}getSimulationSettings(e){const{_simulationSettings:t,spatialReferenceInfo:i}=this;if(null==t)return null;const s="global"===this.view.viewingMode&&null!=i&&z(e.extent.xmin,e.extent.xmax,i);return{...t,wrapAround:s,density:this._effectiveDensity}}get surface(){return this.view.basemapTerrain}doRefresh(){}clear(){this._resources?.detach(),this._resources=null,this._lastResources?.detach(),this._lastResources=null,this._loadingState="ready-to-load"}_update(){const e=this._time;this._lastResources?.hasFadedOut(e)&&this._lastResources.detach();const t=this._nextStateForTransition(e);if(!this.requireLoad||this.updatingHandles.updating||"ready-to-load"!==t||!this.loadRequirementsMet)return void(this._loadingState=t);this._loadingState="loading";const i=async()=>{const t=this._time,i=this._seamlessTransitionEnabled&&null!=this._resources?c(e+this._seamlessTransitionWaitingTime):e;await this._load(i);const s=c((this._time-t)/1e3);this._updateAverageLoadingTime(s)};this.updatingHandles.addPromise(l(i())),this.requireLoad=!1}_updateAverageLoadingTime(e){const t=G;this._averageLoadingTime=c(t*e+(1-t)*this._averageLoadingTime)}triggerLoad(){this._debugAllowAutoLoading&&(this.visible?this.requireLoad=!0:this.clear())}get _time(){return p(this.layerView.view.stage.renderer.renderContext.time)}async _load(e){const{extent:t,view:i}=this;if(!this.visible)return void this.clear();if(null==t)return void(this._loadingState="ready-to-load");const s=new Q(t,this.layerView.timeExtent,this._tracingResolution,i.state.contentPixelRatio,e);null==this._abortController&&(this._abortController=new AbortController);const r=this._abortController,l=await this._loadStreamlines(s,r.signal);if(n(r.signal),null!=l){this._lastResources?.detach(),this._lastResources=this._resources,this._resources=l;const t=this._getStartTime(e);null!=this._lastResources&&(this._lastResources.endTime=t),this._resources.startTime=t,this.view.animationsEnabled||(this._lastResources?.detach(),this._lastResources=null),await l.attach(),this._loadingState=this._seamlessTransitionEnabled?"before-transition":"transitioning"}else this._loadingState="ready-to-load"}async _loadStreamlines(e,t){const i=await this.fetchDataAndGenerateStreamlines(e,t);if(null==i)return null;const{geometries:s,material:r}=await this._createGeometry(e,i);return this._draped?new Z(e,i,r,s,this.layerView):new $(e,i,r,s,this.view)}async fetchDataAndGenerateStreamlines(e,t){return null}async _createGeometry(e,t){const i=new re(this._materialParameters,this.view.state.isGlobal),s=new Array,{elevationInfo:r,_draped:l,view:n}=this;function*a(a){for(let o=0;o<t.length;++o)s.push(X(n,e,t[o],r,i,l)),a.madeProgress(),a.done&&(a=yield)}return await this.frameTask.scheduleGenerator(a),{geometries:s,material:i}}_triggerTilesUpdate(){if(this._tilesUpdateIsWaiting)return;this._tilesUpdateIsWaiting=!0;const e=async()=>{await d(()=>this.view.stationary),this._tilesUpdateIsWaiting=!1,await this._debouncedTileUpdate()};this.updatingHandles.addPromise(l(e()))}_getTileFilterFunction(){const{_dataBounds:e,view:i,_featureTilesBounds:s,loadAllTiles:r}=this;if(r){const{loadAllTilesLevel:t}=this;return i=>i.level===t&&de(e,i.extent)}const l=t=>t.rendered&&t.visible&&de(e,t.extent),{featureTiles:n}=i;if(!n)return l;const a=n.tiles.filter(e=>e.measures.visible);return e=>l(e)&&de(s,e.extent)&&a.some(({lij:i})=>t(i,e.lij)||ie(i,e.lij))}_nextStateForTransition(e){const{_resources:t}=this;if(null==this._flowRenderer||null==t||"ready-to-load"===this._loadingState||"loading"===this._loadingState)return this._loadingState;const i=t.startTime;return e<i?"before-transition":e<i+O?"transitioning":"ready-to-load"}_getStartTime(e){if(!this.view.animationsEnabled)return ce;const t=this._time;return c(t>e?t:e)}get usedMemory(){return(this._lastResources?.usedMemory??0)+(this._resources?.usedMemory??0)}get test(){}};e([m()],oe.prototype,"type",void 0),e([m()],oe.prototype,"renderedTiles",void 0),e([m()],oe.prototype,"_resources",void 0),e([m()],oe.prototype,"_lastResources",void 0),e([m()],oe.prototype,"requireLoad",void 0),e([m()],oe.prototype,"_averageLoadingTime",void 0),e([m()],oe.prototype,"_loadingState",void 0),e([m()],oe.prototype,"emissiveStrength",void 0),e([m()],oe.prototype,"_clippingArea",null),e([m()],oe.prototype,"_dataBounds",null),e([m()],oe.prototype,"_fullExtentSurfaceSpatialReference",null),e([m()],oe.prototype,"_draped",null),e([m()],oe.prototype,"extent",null),e([m()],oe.prototype,"loadAllTiles",null),e([m()],oe.prototype,"isDataGlobal",null),e([m()],oe.prototype,"loadAllTilesLevel",null),e([m()],oe.prototype,"targetTiles",null),e([m()],oe.prototype,"_featureTilesBounds",null),e([m()],oe.prototype,"_flowRenderer",null),e([m()],oe.prototype,"_materialParameters",null),e([m()],oe.prototype,"_opacity",null),e([m()],oe.prototype,"_seamlessTransitionWaitingTime",null),e([m()],oe.prototype,"_seamlessTransitionEnabled",null),e([m()],oe.prototype,"_tracingResolution",null),e([m()],oe.prototype,"visible",null),e([m()],oe.prototype,"_estimatedStreamlines",null),e([m()],oe.prototype,"_effectiveDensity",null),e([m()],oe.prototype,"elevationInfo",null),e([m()],oe.prototype,"needsMagnitude",null),e([m()],oe.prototype,"spatialReferenceInfo",null),e([m()],oe.prototype,"layer",null),e([m()],oe.prototype,"loadingState",null),e([m()],oe.prototype,"updating",null),e([m()],oe.prototype,"visibleAtCurrentScale",null),e([m()],oe.prototype,"_overrideMaterialParameters",void 0),e([m()],oe.prototype,"_overrideSimulationSettings",void 0),e([m()],oe.prototype,"_overrideTransitionEnabled",void 0),e([m()],oe.prototype,"_simulationSettings",null),e([m()],oe.prototype,"surface",null),oe=e([g("esri.views.3d.layers.FlowSubView3D")],oe);const ue=new A({mode:"on-the-ground"});function de(e,t){return null==e||null==t||R(e,t)}const he=T(ee,_.WebMercator),ce=c(-B);function pe(e){return null!=e&&e.spatialReference.isWebMercator?e?.intersection(he):e}export{oe as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import{equals as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{removeMaybe as i,abortMaybe as s}from"../../../core/maybe.js";import{debounce as r,ignoreAbortErrors as l,throwIfAborted as n}from"../../../core/promiseUtils.js";import{watch as a,when as o,sync as u,whenOnce as d}from"../../../core/reactiveUtils.js";import{addFrameTask as h}from"../../../core/scheduling.js";import{Seconds as c,secondsFromMilliseconds as p}from"../../../core/time.js";import{property as m,subclass as g}from"../../../core/accessorSupport/decorators.js";import{projectOrLoad as f}from"../../../geometry/projectionUtils.js";import _ from"../../../geometry/SpatialReference.js";import{fromExtent as y,intersection as v,toExtent as T,create as w,contains as S,area as b,intersects as R}from"../../../geometry/support/aaBoundingRect.js";import{getInfo as x}from"../../../geometry/support/spatialReferenceUtils.js";import A from"../../../symbols/support/ElevationInfo.js";import{simulationSettingsEqual as L,getPositions as j,getFlowSimulationSettings as E}from"../../2d/engine/flow/utils.js";import M from"./SubView3D.js";import{getFeatureTileId as P}from"./support/FeatureTileDescriptor.js";import{makeScheduleFunction as U}from"./support/makeScheduleFunction.js";import{debugFlags as C}from"../support/debugFlags.js";import{tileFilterDistance as W,scaleThresholdForLoadingAllTiles as F,defaultTransitionDuration as I,transitionDurationFactor as D,seamlessTransitionEnabled as k,densityFactor as q,loadAllTilesDensityFactor as V,averageLoadingTimeSmoothingFactor as G,fadeOutTime as O,fadeInTime as B,minimumTracingResolution as H}from"../support/flow/constants.js";import{isFullExtent as z,wrappedWidth as N,FlowQuery3D as Q}from"../support/flow/FlowQuery3D.js";import{FlowWorkerHandle as J}from"../support/flow/FlowWorkerHandle.js";import{materialParametersFromRenderer as K,createStreamlineGeometry as X}from"../support/flow/geometryUtils.js";import{boundingRectOfTiles as Y}from"../support/flow/loadUtils.js";import{StreamlineResources3DOverlay as Z}from"../support/flow/StreamlineResources3DOverlay.js";import{StreamlineResources3DShape as $}from"../support/flow/StreamlineResources3DShape.js";import{webMercatorWorldExtent as ee}from"../terrain/TerrainConst.js";import{descendantsAtLevel as te,tilesAreRelated as ie}from"../terrain/tileUtils.js";import{isScreenSizePerspectiveEnabled as se}from"../webgl-engine/lib/screenSizePerspectiveUtils.js";import{RibbonLineMaterial as re}from"../webgl-engine/materials/RibbonLineMaterial.js";import{isInEffectiveScaleRange as le,hasLayerBasedScaleVisibility as ne}from"../../support/layerViewUtils.js";import{TaskPriority as ae}from"../../support/Scheduler.js";let oe=class extends M{constructor(e){super(e),this.type="flow",this.renderedTiles=null,this.requireLoad=!1,this.workerHandle=null,this.frameTask=null,this._averageLoadingTime=c(0),this._abortController=null,this._loadingState="ready-to-load",this._tilesUpdateIsWaiting=!1,this._debugAllowAutoLoading=!0,this.emissiveStrength=0,this._overrideMaterialParameters=null,this._overrideSimulationSettings=null,this._overrideTransitionEnabled=null,this._updateTask=null,this._debouncedTileUpdate=r(async()=>{const{allTiles:e}=this.surface,t=this._getTileFilterFunction(),i=new Set;function*s(s){for(let r=0;r<e.length;++r){const l=e.at(r);t(l)&&i.add(l),s.madeProgress(),s.done&&(s=yield)}}await this.frameTask.scheduleGenerator(s),this.renderedTiles=i})}initialize(){const{surface:e,view:t}=this,{resourceController:i}=t;this.workerHandle=new J(U(i)),this.frameTask=i.scheduler.registerTask(ae.FLOW_GENERATOR),this._updateTask=h({update:()=>this._update()}),this.addHandles([a(()=>this._simulationSettings,()=>this.triggerLoad(),{sync:!0,equals:(e,t)=>null==e&&null==t||null!=e&&null!=t&&L(e,t)}),a(()=>{const{elevationInfo:e}=this;return[this._clippingArea,this.visible,this._draped,this.view.state.contentPixelRatio,this.view.viewingMode,e?.mode,e?.offset,e?.unit,this._effectiveDensity]},()=>this.triggerLoad(),u),o(()=>!this.view.animationsEnabled,()=>{const{_resources:e,_lastResources:t}=this;null!=e&&(e.startTime=ce),null!=t&&(t.startTime=ce)},u),a(()=>this._materialParameters,e=>{this._resources?.setMaterialParameters(e),this._lastResources?.setMaterialParameters(e)}),o(()=>e.allTilesCreated,()=>this._triggerTilesUpdate,u),t.enableFeatureTiles(),a(()=>[this._dataBounds,this._featureTilesBounds,this.loadAllTiles],()=>this._triggerTilesUpdate()),a(()=>this._flowRenderer,(e,t)=>{const i=t?.visualVariables??[],s=e?.visualVariables??[];s.length===i.length&&s.every((e,t)=>e.type===i[t].type)||this.clear()}),o(()=>!t.featureTiles?.updating,()=>{this._triggerTilesUpdate()})]),this._triggerTilesUpdate()}destroy(){this._updateTask=i(this._updateTask),this.abort(),this.clear(),this.notifyChange("updating")}abort(){this._abortController=s(this._abortController),this.requireLoad=!1}get _clippingArea(){const e=f(this.view.clippingArea,this.surface.spatialReference).geometry;return null==e?null:y(e)}get _dataBounds(){const e=this._fullExtentSurfaceSpatialReference;return null==e?null:y(e)}get _fullExtentSurfaceSpatialReference(){return f(this.layer.fullExtent,this.surface.spatialReference).geometry}get _draped(){return"on-the-ground"===this.elevationInfo.mode}get extent(){if(this.loadAllTiles)return pe(this._fullExtentSurfaceSpatialReference);const{spatialReference:e}=this.surface;let t=this.renderedTiles;if(null==e||null==t)return null;const i=this.view.terrainLevel;if(null!=i){const e=new Set;t.forEach(t=>{Math.abs(i-t.level)<W&&e.add(t)}),t=e}const s=Y(t,this.spatialReferenceInfo);return null==s?null:(v(s,this._clippingArea,s),pe(T(s,e)))}get loadAllTiles(){return this.view.scale>(C.FLOW_GLOBAL_SCALE_THRESHOLD??F)}get isDataGlobal(){const{extent:e,spatialReferenceInfo:t}=this;return null!=e&&z(e.xmin,e.xmax,t)}get loadAllTilesLevel(){const{tilingScheme:e}=this.surface;return Math.min(Math.ceil(e.levelAtScale(C.FLOW_GLOBAL_SCALE_THRESHOLD??F)),e.getMaxLod())}get targetTiles(){const e=new Map;if(this.loadAllTiles){const{_dataBounds:t}=this;if(null==t)return e;const i=w(),s=this.loadAllTilesLevel,r=this.surface.tilingScheme,l=r.rootTilesInExtent(t).flatMap(e=>te(e,s));for(const n of l){const[l,a,o]=n;r.getExtent(s,a,o,i),de(t,i)&&e.set(P(s,a,o),n)}return e}const{renderedTiles:t}=this;for(const i of t??[])e.set(i.key,i.lij);return e}get _featureTilesBounds(){const e=this.view.featureTiles?.filterExtent,t=f(e,this.surface.spatialReference).geometry;return null==t?null:y(t)}get _flowRenderer(){const e=this.layer.renderer;return"flow"!==e?.type?null:e}get _materialParameters(){return{...K(this._flowRenderer,this.layerView.fullOpacity,this.emissiveStrength),...this._overrideMaterialParameters,hasSlicePlane:this.layerView.slicePlaneEnabled,screenSizePerspective:!this._draped&&se(this.layer.screenSizePerspectiveEnabled)?this.view.screenSizePerspective.parameters:null}}get _opacity(){return this.layerView.fullOpacity}get _seamlessTransitionWaitingTime(){const{_averageLoadingTime:e}=this;return c(0===e?I:this._averageLoadingTime*D)}get _seamlessTransitionEnabled(){return null!=this._overrideTransitionEnabled?this._overrideTransitionEnabled:k}get _tracingResolution(){const{extent:e}=this;if(!e)return[0,0];const t=N(e.xmin,e.xmax,this.spatialReferenceInfo?.valid)/(e.ymax-e.ymin),[i,s]=this.view.size;let r,l;i<s?(r=i,l=i/t):(r=s*t,l=s);const n=H,a=this.view.qualitySettings.flow.maxTracingResolution,o=Math.max(1,n/Math.min(r,l)),u=o*Math.min(1,a/Math.max(r*o,l*o));return[Math.round(r*u),Math.round(l*u)]}get visible(){const e=this._flowRenderer?.color;return this.visibleAtCurrentScale&&this.layer.effectiveVisible&&this._opacity>0&&(null==e||e.a>0)}get _estimatedStreamlines(){const{extent:e,_simulationSettings:t,renderedTiles:i,loadAllTiles:s}=this;if(null==t||null==i)return 0;const r=this._tracingResolution[0]*this._tracingResolution[1]/t.lineSpacing**2*t.density;if(s)return 2*r;const l=null==e?null:y(e);if(null==l)return 0;let n=0;for(const u of i)S(l,u.extent)&&(n+=b(u.extent));const a=b(l),o=0===a?0:n/a;return 2*Math.round(r*o)}get _effectiveDensity(){const{_estimatedStreamlines:e,_simulationSettings:t}=this,{qualitySettings:i,quality:s}=this.view;if(null==t)return 0;const r=i.flow.maxTotalNumberOfStreamlines,l=e>=r?r/e:1,n=t.density*l*s;return t.lineSpacing/Math.sqrt(n)<t.lineCollisionWidth?(t.lineSpacing/t.lineCollisionWidth)**2:n}get elevationInfo(){return this.layer.elevationInfo??ue}startPositions(e){if(!this._seamlessTransitionEnabled)return[];const{_flowRenderer:t,_resources:i}=this;return null==t||null==i?[]:j(i.streamlines,i.query,e,t.flowSpeed)}get needsMagnitude(){return this._flowRenderer?.hasVisualVariables()??!1}get spatialReferenceInfo(){return x(this.surface.spatialReference)}get layer(){return this.layerView.layer}get loadingState(){return this._loadingState}get loadRequirementsMet(){return null!=this.renderedTiles&&(this.renderedTiles.size>0||this.loadAllTiles)&&null!=this.extent}hasWork(){return null==this.extent||this.updatingHandles.updating||this.requireLoad||"before-transition"===this._loadingState}get updating(){return this._debugAllowAutoLoading&&this.visible&&!(this.destroyed||this.destroying)&&this.hasWork()}get visibleAtCurrentScale(){return!ne()||le(this.layer.effectiveScaleRange,this.view.scale)}get _simulationSettings(){const{_flowRenderer:e,_overrideSimulationSettings:t}=this;if(null==e)return null;let i=E(e);return i.segmentLength=i.lineCollisionWidth/2,i.onlyForwardTracing=!1,i.density*=q,this.loadAllTiles&&this.isDataGlobal&&(i.density*=V),null!=t&&(i={...i,...t}),i}getSimulationSettings(e){const{_simulationSettings:t,spatialReferenceInfo:i}=this;if(null==t)return null;const s="global"===this.view.viewingMode&&null!=i&&z(e.extent.xmin,e.extent.xmax,i);return{...t,wrapAround:s,density:this._effectiveDensity}}get surface(){return this.view.basemapTerrain}doRefresh(){}clear(){this._resources?.detach(),this._resources=null,this._lastResources?.detach(),this._lastResources=null,this._loadingState="ready-to-load"}_update(){const e=this._time;this._lastResources?.hasFadedOut(e)&&this._lastResources.detach();const t=this._nextStateForTransition(e);if(!this.requireLoad||this.updatingHandles.updating||"ready-to-load"!==t||!this.loadRequirementsMet)return void(this._loadingState=t);this._loadingState="loading";const i=async()=>{const t=this._time,i=this._seamlessTransitionEnabled&&null!=this._resources?c(e+this._seamlessTransitionWaitingTime):e;await this._load(i);const s=c((this._time-t)/1e3);this._updateAverageLoadingTime(s)};this.updatingHandles.addPromise(l(i())),this.requireLoad=!1}_updateAverageLoadingTime(e){const t=G;this._averageLoadingTime=c(t*e+(1-t)*this._averageLoadingTime)}triggerLoad(){this._debugAllowAutoLoading&&(this.visible?this.requireLoad=!0:this.clear())}get _time(){return p(this.layerView.view.stage.renderer.renderContext.time)}async _load(e){const{extent:t,view:i}=this;if(!this.visible)return void this.clear();if(null==t)return void(this._loadingState="ready-to-load");const s=new Q(t,this.layerView.timeExtent,this._tracingResolution,i.state.contentPixelRatio,e);null==this._abortController&&(this._abortController=new AbortController);const r=this._abortController,l=await this._loadStreamlines(s,r.signal);if(n(r.signal),null!=l){this._lastResources?.detach(),this._lastResources=this._resources,this._resources=l;const t=this._getStartTime(e);null!=this._lastResources&&(this._lastResources.endTime=t),this._resources.startTime=t,this.view.animationsEnabled||(this._lastResources?.detach(),this._lastResources=null),await l.attach(),this._loadingState=this._seamlessTransitionEnabled?"before-transition":"transitioning"}else this._loadingState="ready-to-load"}async _loadStreamlines(e,t){const i=await this.fetchDataAndGenerateStreamlines(e,t);if(null==i)return null;const{geometries:s,material:r}=await this._createGeometry(e,i);return this._draped?new Z(e,i,r,s,this.layerView):new $(e,i,r,s,this.view)}async fetchDataAndGenerateStreamlines(e,t){return null}async _createGeometry(e,t){const i=new re(this._materialParameters,this.view.state.isGlobal),s=new Array,{elevationInfo:r,_draped:l,view:n}=this;function*a(a){for(let o=0;o<t.length;++o)s.push(X(n,e,t[o],r,i,l)),a.madeProgress(),a.done&&(a=yield)}return await this.frameTask.scheduleGenerator(a),{geometries:s,material:i}}_triggerTilesUpdate(){if(this._tilesUpdateIsWaiting)return;this._tilesUpdateIsWaiting=!0;const e=async()=>{await d(()=>this.view.stationary),this._tilesUpdateIsWaiting=!1,await this._debouncedTileUpdate()};this.updatingHandles.addPromise(l(e()))}_getTileFilterFunction(){const{_dataBounds:e,view:i,_featureTilesBounds:s,loadAllTiles:r}=this;if(r){const{loadAllTilesLevel:t}=this;return i=>i.level===t&&de(e,i.extent)}const l=t=>t.rendered&&t.visible&&de(e,t.extent),{featureTiles:n}=i;if(!n)return l;const a=n.tiles.filter(e=>e.measures.visible);return e=>l(e)&&de(s,e.extent)&&a.some(({lij:i})=>t(i,e.lij)||ie(i,e.lij))}_nextStateForTransition(e){const{_resources:t}=this;if(null==this._flowRenderer||null==t||"ready-to-load"===this._loadingState||"loading"===this._loadingState)return this._loadingState;const i=t.startTime;return e<i?"before-transition":e<i+O?"transitioning":"ready-to-load"}_getStartTime(e){if(!this.view.animationsEnabled)return ce;const t=this._time;return c(t>e?t:e)}get usedMemory(){return(this._lastResources?.usedMemory??0)+(this._resources?.usedMemory??0)}get test(){}};e([m()],oe.prototype,"type",void 0),e([m()],oe.prototype,"renderedTiles",void 0),e([m()],oe.prototype,"_resources",void 0),e([m()],oe.prototype,"_lastResources",void 0),e([m()],oe.prototype,"requireLoad",void 0),e([m()],oe.prototype,"_averageLoadingTime",void 0),e([m()],oe.prototype,"_loadingState",void 0),e([m()],oe.prototype,"emissiveStrength",void 0),e([m()],oe.prototype,"_clippingArea",null),e([m()],oe.prototype,"_dataBounds",null),e([m()],oe.prototype,"_fullExtentSurfaceSpatialReference",null),e([m()],oe.prototype,"_draped",null),e([m()],oe.prototype,"extent",null),e([m()],oe.prototype,"loadAllTiles",null),e([m()],oe.prototype,"isDataGlobal",null),e([m()],oe.prototype,"loadAllTilesLevel",null),e([m()],oe.prototype,"targetTiles",null),e([m()],oe.prototype,"_featureTilesBounds",null),e([m()],oe.prototype,"_flowRenderer",null),e([m()],oe.prototype,"_materialParameters",null),e([m()],oe.prototype,"_opacity",null),e([m()],oe.prototype,"_seamlessTransitionWaitingTime",null),e([m()],oe.prototype,"_seamlessTransitionEnabled",null),e([m()],oe.prototype,"_tracingResolution",null),e([m()],oe.prototype,"visible",null),e([m()],oe.prototype,"_estimatedStreamlines",null),e([m()],oe.prototype,"_effectiveDensity",null),e([m()],oe.prototype,"elevationInfo",null),e([m()],oe.prototype,"needsMagnitude",null),e([m()],oe.prototype,"spatialReferenceInfo",null),e([m()],oe.prototype,"layer",null),e([m()],oe.prototype,"loadingState",null),e([m()],oe.prototype,"updating",null),e([m()],oe.prototype,"visibleAtCurrentScale",null),e([m()],oe.prototype,"_overrideMaterialParameters",void 0),e([m()],oe.prototype,"_overrideSimulationSettings",void 0),e([m()],oe.prototype,"_overrideTransitionEnabled",void 0),e([m()],oe.prototype,"_simulationSettings",null),e([m()],oe.prototype,"surface",null),oe=e([g("esri.views.3d.layers.FlowSubView3D")],oe);const ue=new A({mode:"on-the-ground"});function de(e,t){return null==e||null==t||R(e,t)}const he=T(ee,_.WebMercator),ce=c(-B);function pe(e){return null!=e&&e.spatialReference.isWebMercator?e?.intersection(he):e}export{oe as default};
|