@arcgis/core 6.0.0-next.54 → 6.0.0-next.56
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/WebScene.js +2 -2
- package/applications/Components/OrientedImageryViewer/shared/constants.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/validation/arcadeValidator.js +1 -1
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0329fa3aa3403f1c243b.js +1 -0
- package/assets/esri/core/workers/chunks/033b9fcd9833db3b6e7d.js +1 -0
- package/assets/esri/core/workers/chunks/{6602310c3fcd91fb6a2f.js → 07c8ac092e4b9e8d5b3c.js} +1 -1
- package/assets/esri/core/workers/chunks/0978e12dd6a1cbc50b80.js +1 -0
- package/assets/esri/core/workers/chunks/0a97b1974367382cfdf5.js +1 -0
- package/assets/esri/core/workers/chunks/{db0a7671ab5cbe8afd72.js → 123661019bb69c53f2d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{e956845255bce0910944.js → 1507297550c3cd1268e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{1b41ba050cde068d2860.js → 193a73a2c7f4f8482c21.js} +1 -1
- package/assets/esri/core/workers/chunks/1c0f5c42331fb6fc26cb.js +1 -0
- package/assets/esri/core/workers/chunks/20acb6f3ed5140b6c6c6.js +1 -0
- package/assets/esri/core/workers/chunks/2cd2fcf4a37d180d5d5c.js +1 -0
- package/assets/esri/core/workers/chunks/2f9adf0b809ce8797ebf.js +1 -0
- package/assets/esri/core/workers/chunks/{afb4dfb89fbc8a342cc5.js → 3354f1fa90f8ce4c8fde.js} +1 -1
- package/assets/esri/core/workers/chunks/3982409149571a827390.js +1 -0
- package/assets/esri/core/workers/chunks/{9b458b0d1627f22fdd93.js → 3b11e4d2e69b7aea1d65.js} +1 -1
- package/assets/esri/core/workers/chunks/3d851710f7fcc27c5b60.js +2 -0
- package/assets/esri/core/workers/chunks/3e8d70039800f2395d66.js +1 -0
- package/assets/esri/core/workers/chunks/41694ee8990e799da225.js +1 -0
- package/assets/esri/core/workers/chunks/4d8539674fc2e4fea03c.js +1 -0
- package/assets/esri/core/workers/chunks/{12add2003631fa314f25.js → 5060be52a380fc4920f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{2aa6be0b047a1b25a520.js → 53bbb9aa6e4e4a0a8121.js} +1 -1
- package/assets/esri/core/workers/chunks/{c6d82397044e403a1f61.js → 5954f02c3901b28d8e73.js} +1 -1
- package/assets/esri/core/workers/chunks/5ba6007c3c49a8153256.js +1 -0
- package/assets/esri/core/workers/chunks/5bdd95eeb8f34dbf26f2.js +2 -0
- package/assets/esri/core/workers/chunks/{4707aedcc1b3bdf5e987.js → 5c34d49a6c9cc34b7626.js} +1 -1
- package/assets/esri/core/workers/chunks/{ced5dfb2bf46fc5eac8c.js → 5e47026c681238038955.js} +2 -2
- package/assets/esri/core/workers/chunks/{2baf35b1b19482d603b5.js → 5f7505ada0991cfbdd84.js} +1 -1
- package/assets/esri/core/workers/chunks/{976303f47c342b9d1cc0.js → 62ddd3a82864e26f009a.js} +1 -1
- package/assets/esri/core/workers/chunks/69a09c6acb5ae03c67f6.js +1 -0
- package/assets/esri/core/workers/chunks/{542a9c414c99d84d52ab.js → 6a202ef9ba9b89e09153.js} +1 -1
- package/assets/esri/core/workers/chunks/{0826feebdca8a31eb630.js → 6ba6fece5c11fe2a6ace.js} +1 -1
- package/assets/esri/core/workers/chunks/{5eb69e2895e5aec81051.js → 6fd10891506925560443.js} +1 -1
- package/assets/esri/core/workers/chunks/7b156905d168bf973518.js +1 -0
- package/assets/esri/core/workers/chunks/7b6fd287e7043ad50f4e.js +1 -0
- package/assets/esri/core/workers/chunks/7baa49055bc31618b56e.js +1 -0
- package/assets/esri/core/workers/chunks/8570e3df90fb76a8741a.js +1 -0
- package/assets/esri/core/workers/chunks/{c3c0f24a9e0047232ae1.js → 8679dfc0c53355b6feb0.js} +1 -1
- package/assets/esri/core/workers/chunks/8a636dc51372e14c98f5.js +1 -0
- package/assets/esri/core/workers/chunks/{d14732a57c8e63948c60.js → 9117c9b720c9ba6e7a6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{f7e33d37dd11fb08f3f8.js → 97107e64407fa6825620.js} +1 -1
- package/assets/esri/core/workers/chunks/{5118c7269b706089c88e.js → a05a2c2aaf0c288f9681.js} +1 -1
- package/assets/esri/core/workers/chunks/{944f17e9c9f681b971fb.js → a12e2a345005189c64be.js} +1 -1
- package/assets/esri/core/workers/chunks/a22458e5272332d86cb9.js +1 -0
- package/assets/esri/core/workers/chunks/{15b3386ad92a0b4149b8.js → a24dc5350af001db417a.js} +1 -1
- package/assets/esri/core/workers/chunks/{10967a36c77c5188690d.js → a66d6298236d59a615db.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ea480cebf8ee56228a5.js → a7dfca326883384d2751.js} +1 -1
- package/assets/esri/core/workers/chunks/{723d8316f5d4b6ce2942.js → a9539393e2f1812a973a.js} +1 -1
- package/assets/esri/core/workers/chunks/{ac8d38016e4bee37a77c.js → ab784764ddf9d7f693a1.js} +1 -1
- package/assets/esri/core/workers/chunks/{255f5b45c4d32f97f86c.js → ac0861014b3d2f1a1de2.js} +1 -1
- package/assets/esri/core/workers/chunks/ace210d313ce53f3ae10.js +1 -0
- package/assets/esri/core/workers/chunks/ae48ee283cfa5b3c14b0.js +1 -0
- package/assets/esri/core/workers/chunks/b38b6fe08a367e9de4f5.js +1 -0
- package/assets/esri/core/workers/chunks/{4e651869e9a196494694.js → b6e628b5d2643af4c19b.js} +1 -1
- package/assets/esri/core/workers/chunks/{b37ab6b1cb4cfc85cd9d.js → b7828d7e2c5b75644057.js} +1 -1
- package/assets/esri/core/workers/chunks/bbd8fcb0bbba7bde3d9b.js +1 -0
- package/assets/esri/core/workers/chunks/{ec465abb0344ad719e9d.js → bd8e329ec74d921d311a.js} +1 -1
- package/assets/esri/core/workers/chunks/{56e6e70aa40e51827290.js → c3f94024c6c9eed9f273.js} +1 -1
- package/assets/esri/core/workers/chunks/{6d17b45022dfd2548098.js → c5ddf8b347c31fe772a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{ee9af58ae202b803bba7.js → c7a0c4ca37ebd1d98cf1.js} +1 -1
- package/assets/esri/core/workers/chunks/d0659f1b0495734be4b3.js +1 -0
- package/assets/esri/core/workers/chunks/d7763c42754152510e13.js +2 -0
- package/assets/esri/core/workers/chunks/{b9a2b05ede02c305e865.js → d8ffb1502def5c85740b.js} +1 -1
- package/assets/esri/core/workers/chunks/{7dfe1e78d2e66de6be22.js → d9ef244019954d5a8a27.js} +1 -1
- package/assets/esri/core/workers/chunks/{95403bb27a4ea0a4b7b1.js → ddbfa664e69612295785.js} +1 -1
- package/assets/esri/core/workers/chunks/dfa1b0308e5e82d1ddfe.js +1120 -0
- package/assets/esri/core/workers/chunks/e566102c7ed7a8ebf89e.js +1 -0
- package/assets/esri/core/workers/chunks/e74586b074d0fa6abb4b.js +1 -0
- package/assets/esri/core/workers/chunks/e7dff025780726d5feae.js +1 -0
- package/assets/esri/core/workers/chunks/e96fa029acba59c04e4e.js +2 -0
- package/assets/esri/core/workers/chunks/{55d28d3f5b8ced061e39.js → eaf73ce60f39a48ddd2a.js} +1 -1
- package/assets/esri/core/workers/chunks/ed2f2a5da830d058e339.js +1 -0
- package/assets/esri/core/workers/chunks/{e592f2483db71230e8e5.js → efd6ea0966f60ab19520.js} +1 -1
- package/assets/esri/core/workers/chunks/{944cb751c85d3a127f49.js → f52d081bbde5c95265cf.js} +1 -1
- package/assets/esri/core/workers/chunks/{1de9be7b65109c207bd5.js → fbd5f3b81cd9f061824d.js} +1 -1
- package/assets/esri/core/workers/chunks/fdfbd201be372d3796bf.js +2 -0
- package/assets/esri/core/workers/chunks/ff0a0819bba5e8264c47.js +1 -0
- package/assets/esri/layers/raster/formats/blosc-wasm.wasm +0 -0
- package/assets/esri/libs/librust-parquet/pkg/parquet_bg.wasm +0 -0
- package/basemapGallery/support/basemapCompatibilityUtils.js +1 -1
- package/chunks/BlendLayers.glsl.js +1 -1
- package/chunks/ColorMaterial.glsl.js +14 -14
- package/chunks/Component.glsl.js +37 -37
- package/chunks/CypherParser.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +15 -15
- package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
- package/chunks/HUDMaterial.glsl.js +3 -3
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/Path.glsl.js +15 -15
- package/chunks/Pattern.glsl.js +20 -20
- package/chunks/RasterColorizer.glsl.js +1 -1
- package/chunks/ShadowHighlight.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +24 -24
- package/chunks/UnitFactory.js +1 -1
- package/chunks/Water.glsl.js +29 -20
- package/chunks/blosc-wasm.js +2 -0
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/parquet.js +1 -1
- package/chunks/pdf.js +57 -0
- package/chunks/text.js +1 -1
- package/config.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/scheduling.js +1 -1
- package/core/sql/SqlInterval.js +1 -1
- package/core/urlUtils.js +1 -1
- package/geometry/geometryEngine.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/support/Ellipsoid.js +1 -1
- package/geometry/support/curves/ellipticArc7Utils.js +1 -1
- package/geometry/support/geodesicConstants.js +1 -1
- package/geometry/support/meshUtils/primitives.js +1 -1
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/effects/parser.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -56
- package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
- package/layers/geospatialPDF/parserUtils.js +2 -0
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/parquet.js +1 -1
- package/layers/raster/datasets/ZarrRaster.js +1 -1
- package/layers/raster/datasets/wcsCoverageParser.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/formats/blosc.js +2 -0
- package/layers/support/BuildingFilter.js +1 -1
- package/layers/support/ControlPoint.js +1 -1
- package/layers/support/ControlPointsGeoreference.js +1 -1
- package/layers/support/IntegratedMeshSemantics.js +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/layers/support/fieldUtils.d.ts +23 -87
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/geospatialPDFUtils.d.ts +63 -0
- package/layers/support/geospatialPDFUtils.js +2 -0
- package/layers/support/layersMapping.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/legend/ActiveLayerInfo.js +1 -1
- package/libs/ajv/ajv.bundle-wrapper.js +1 -1
- package/package.json +6 -6
- package/renderers/types.d.ts +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/smartMapping/statistics/support/attributeDensity.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/support/tests/serviceMockDependencies.js +1 -1
- package/symbols/CIMSymbol.d.ts +9 -9
- package/symbols/PathSymbol3DLayer.d.ts +1 -1
- package/symbols/WaterSymbol3DLayer.d.ts +13 -1
- package/symbols/WaterSymbol3DLayer.js +1 -1
- package/symbols/cim/CIMEffects.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
- package/symbols/cim/rasterizingUtils.js +1 -1
- package/views/2d/PaddedViewState.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/FillBucket.js +1 -1
- package/views/2d/engine/vectorTiles/constants.js +1 -1
- package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +1 -1
- package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/ParquetLayerView2D.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
- package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedObserverManipulatedObject3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementVisualization.js +1 -1
- package/views/3d/animation/pointToPoint/Camera.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/camera/constraintUtils.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/environment/EnvironmentView.js +1 -1
- package/views/3d/focusAreaUtils.js +1 -1
- package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/Manipulator3DBase.js +1 -1
- package/views/3d/interactive/editingTools/ManipulatedObject3DGraphic.js +1 -1
- package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/config.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementControllerControlPoints.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementControllerShape.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/TiledLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.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/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolFactory.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/LabelInfo.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/layers/support/Tiles3DBVH.js +1 -1
- package/views/3d/layers/support/Tiles3DLayerViewRegistration.js +1 -1
- package/views/3d/layers/support/createTileBVHForLayer.js +1 -1
- package/views/3d/layers/support/selectTiles3DSpatialReference.js +1 -1
- package/views/3d/layers/support/uvUtils.js +1 -1
- package/views/3d/state/Constraints.js +1 -1
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/RenderCoordsHelper.js +1 -1
- package/views/3d/support/SweptSphereVolume.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/elevationUpdateExtentUtils.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/engineContent/marker.js +1 -1
- package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/pointsOfInterest/SurfaceGeometryUpdates.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/terrain/BlendLayersTechniqueConfiguration.js +1 -1
- package/views/3d/terrain/ExtentHelper.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/RasterColorizerTechniqueConfiguration.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TilingSchemeLogic.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentGeometryBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/clampShadowPosition.glsl.js +2 -0
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +14 -14
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +2 -3
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/BufferGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/BufferObject3D.js +1 -1
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Program.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/Attribution.js +5 -5
- package/views/DOMContainer.d.ts +2 -1
- package/views/MapView.d.ts +1 -0
- package/views/SceneView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/ViewingMode.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileChartBoundsUtils.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/draw/DrawAction.js +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/helpMessageUtils.js +1 -1
- package/views/draw/support/managers/EditSessionManager.js +1 -1
- package/views/draw/support/surfaceCoordinateSystems.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
- package/views/interactive/editGeometry/operations/AddOrUpdatePart.js +1 -1
- package/views/layers/support/editableLayerViews.js +1 -1
- package/views/overlay/TextOverlayItem.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/support/spatialReferenceSupport.js +1 -1
- package/views/webgl/Program.js +3 -3
- package/views/webgl/ShaderBuilder.js +23 -23
- package/views/webgl/ShaderTranspiler.js +2 -2
- package/webscene/Slide.js +1 -1
- package/webscene/VirtualLighting.d.ts +2 -4
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +17 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.d.ts +7 -0
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Legend/styles/card/ColorRamp.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Measurement.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageMeasurementWidget.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/support/ContingentValuesManager.js +1 -1
- package/widgets/support/forms/types.d.ts +23 -1
- package/assets/esri/core/workers/chunks/021bd07b9a3e70598840.js +0 -1
- package/assets/esri/core/workers/chunks/032733b863426c5bde00.js +0 -1121
- package/assets/esri/core/workers/chunks/144f18a3dd2c8cf07cf7.js +0 -1
- package/assets/esri/core/workers/chunks/170e68624b71ac96de4a.js +0 -1
- package/assets/esri/core/workers/chunks/23fc1c1ed483ed3b2298.js +0 -1
- package/assets/esri/core/workers/chunks/2634927d26cb1139c6d0.js +0 -1
- package/assets/esri/core/workers/chunks/2d1b8154ee40afc9d40b.js +0 -1
- package/assets/esri/core/workers/chunks/2d3e977f3b75474d7ebc.js +0 -1
- package/assets/esri/core/workers/chunks/4a41bf3d1e2e9bb79771.js +0 -2
- package/assets/esri/core/workers/chunks/5f324d88785ffcb73ae0.js +0 -1
- package/assets/esri/core/workers/chunks/70695e0fb53018d48e7b.js +0 -2
- package/assets/esri/core/workers/chunks/723c9ad4c25be2b82476.js +0 -1
- package/assets/esri/core/workers/chunks/766a1357be2ed7f4e125.js +0 -1
- package/assets/esri/core/workers/chunks/817bf487df056da1e6ec.js +0 -1
- package/assets/esri/core/workers/chunks/89e55895683369b5277a.js +0 -1
- package/assets/esri/core/workers/chunks/8a820e303941b351de81.js +0 -1
- package/assets/esri/core/workers/chunks/8c94e987754b3919181e.js +0 -1
- package/assets/esri/core/workers/chunks/90d567e920b6982b402d.js +0 -1
- package/assets/esri/core/workers/chunks/919115788da38049aea7.js +0 -2
- package/assets/esri/core/workers/chunks/97cdcedfe853280f6258.js +0 -1
- package/assets/esri/core/workers/chunks/9ebc6026934400fc1e1f.js +0 -1
- package/assets/esri/core/workers/chunks/b33e7e74cf8fa3926617.js +0 -1
- package/assets/esri/core/workers/chunks/b4a325dcf50e276751d7.js +0 -1
- package/assets/esri/core/workers/chunks/bb2af16e55cb39163827.js +0 -1
- package/assets/esri/core/workers/chunks/be5857b0d1b00faf430b.js +0 -1
- package/assets/esri/core/workers/chunks/cd9100a7c8309dfa7569.js +0 -1
- package/assets/esri/core/workers/chunks/d5bb9f9b7b341c671525.js +0 -1
- package/assets/esri/core/workers/chunks/d96e63d66f7b1f4ea54a.js +0 -2
- package/assets/esri/core/workers/chunks/e3bcd2e356f75afc316a.js +0 -1
- package/assets/esri/core/workers/chunks/e507dfc4788295d9c244.js +0 -1
- package/assets/esri/core/workers/chunks/e58f51618251f74aaafd.js +0 -1
- package/assets/esri/core/workers/chunks/e80526571f1a34de3278.js +0 -1
- package/assets/esri/core/workers/chunks/e83806797979138fd22a.js +0 -1
- package/assets/esri/core/workers/chunks/ea71850ba87ae6038000.js +0 -1
- package/assets/esri/core/workers/chunks/f537a5e808dc546813c7.js +0 -1
- package/assets/esri/core/workers/chunks/fe811d651d201f698b8f.js +0 -2
- package/chunks/NativeLine.glsl.js +0 -8
- package/layers/geospatialPDF/geospatialPDFParserUtils.js +0 -2
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +0 -2
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +0 -2
- package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +0 -2
- /package/assets/esri/core/workers/chunks/{919115788da38049aea7.js.LICENSE.txt → 3d851710f7fcc27c5b60.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{fe811d651d201f698b8f.js.LICENSE.txt → 5bdd95eeb8f34dbf26f2.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{ced5dfb2bf46fc5eac8c.js.LICENSE.txt → 5e47026c681238038955.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{4a41bf3d1e2e9bb79771.js.LICENSE.txt → d7763c42754152510e13.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{d96e63d66f7b1f4ea54a.js.LICENSE.txt → e96fa029acba59c04e4e.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{70695e0fb53018d48e7b.js.LICENSE.txt → fdfbd201be372d3796bf.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import"../../../../../core/has.js";import{destroyMaybe as r}from"../../../../../core/maybe.js";import{memoize as i}from"../../../../../core/memoize.js";import{ignoreAbortErrors as a}from"../../../../../core/promiseUtils.js";import{syncAndInitial as o,when as s}from"../../../../../core/reactiveUtils.js";import{UpdatingHandles as c}from"../../../../../core/support/UpdatingHandles.js";import l from"../../../../../geometry/Point.js";import{clonePoint as u}from"../../../../../layers/graphics/hydratedFeatures.js";import{AnalysisToolBase as d}from"../../../../interactive/AnalysisToolBase.js";import{createCoordinateHelper as f}from"../../../../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as p}from"../../../../interactive/dragEventPipeline.js";import{EditGeometry as m}from"../../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as h}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{sketchKeys as g}from"../../../../interactive/keybindings.js";import{ManipulatorCollection as _}from"../../../../interactive/ManipulatorCollection.js";import{SnappingContext as v}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as y}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquireForFeaturePlacement as b}from"../../../../interactive/snapping/SnappingManagerPool.js";import{SnappingOperation as x}from"../../../../interactive/snapping/SnappingOperation.js";import{setupSnappingToggleHandles as S}from"../../../../interactive/snapping/snappingUtils.js";import{createScreenPointFromEvent as C}from"../../../../support/screenUtils.js";import{isPrimaryPointerAction as w}from"../../../analysis/support/measurementUtils.js";import{screenToMap3D as T,hideManipulatorWhileDragging as E}from"../../editingTools/dragEventPipeline3D.js";import{SnappingVisualizer3D as D}from"../../SnappingVisualizer3D.js";import{PickRequest as O}from"../support/PickRequest.js";import k from"./AreaMeasurement3DView.js";let A=class extends d{constructor(e){super(e),this._updatingHandles=new c,this._snappingManagerResult=null,this.polygonState=`initial`,this.removeIncompleteOnCancel=!1,this.manipulators=new _,this._getSnappingContext=i(e=>new v({elevationInfo:{mode:`absolute-height`,offset:0},pointer:e,editGeometryOperations:new h(new m(`point`,f(!0,!1,this.view.spatialReference)),this.view.state.
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import"../../../../../core/has.js";import{destroyMaybe as r}from"../../../../../core/maybe.js";import{memoize as i}from"../../../../../core/memoize.js";import{ignoreAbortErrors as a}from"../../../../../core/promiseUtils.js";import{syncAndInitial as o,when as s}from"../../../../../core/reactiveUtils.js";import{UpdatingHandles as c}from"../../../../../core/support/UpdatingHandles.js";import l from"../../../../../geometry/Point.js";import{clonePoint as u}from"../../../../../layers/graphics/hydratedFeatures.js";import{AnalysisToolBase as d}from"../../../../interactive/AnalysisToolBase.js";import{createCoordinateHelper as f}from"../../../../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as p}from"../../../../interactive/dragEventPipeline.js";import{EditGeometry as m}from"../../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as h}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{sketchKeys as g}from"../../../../interactive/keybindings.js";import{ManipulatorCollection as _}from"../../../../interactive/ManipulatorCollection.js";import{SnappingContext as v}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as y}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquireForFeaturePlacement as b}from"../../../../interactive/snapping/SnappingManagerPool.js";import{SnappingOperation as x}from"../../../../interactive/snapping/SnappingOperation.js";import{setupSnappingToggleHandles as S}from"../../../../interactive/snapping/snappingUtils.js";import{createScreenPointFromEvent as C}from"../../../../support/screenUtils.js";import{isPrimaryPointerAction as w}from"../../../analysis/support/measurementUtils.js";import{screenToMap3D as T,hideManipulatorWhileDragging as E}from"../../editingTools/dragEventPipeline3D.js";import{SnappingVisualizer3D as D}from"../../SnappingVisualizer3D.js";import{PickRequest as O}from"../support/PickRequest.js";import k from"./AreaMeasurement3DView.js";let A=class extends d{constructor(e){super(e),this._updatingHandles=new c,this._snappingManagerResult=null,this.polygonState=`initial`,this.removeIncompleteOnCancel=!1,this.manipulators=new _,this._getSnappingContext=i(e=>new v({elevationInfo:{mode:`absolute-height`,offset:0},pointer:e,editGeometryOperations:new h(new m(`point`,f(!0,!1,this.view.spatialReference)),this.view.state.isGlobal),visualizer:new D}))}initialize(){let{view:e,analysisViewData:t,manipulators:n,visible:r}=this;this.measurementView=new k({view:e,analysisViewData:t,toolState:this,manipulators:n,visible:r}),this._snappingOperation=new x({view:e}),this._updatingHandles.add(()=>this.stagedPoint,e=>{this.analysisViewData.stagedPoint=e==null?null:u(e,new l)},o),S(this,()=>{let e=this.view.inputManager.latestPointerInfo?.type??`mouse`,t=this._getSnappingContext(e);this._updatingHandles.consumePromise(a(this._snappingOperation.snapAgainNearPreviousMapPoint(this._ensureSnappingManager(),t)))}),this._setupManipulators(),this.addHandles([s(()=>this.state===`measured`,()=>this.finishToolCreation(),o),this.analysisViewData.path.on(`change`,()=>{let e=this.analysisViewData.path;this.polygonState===`initial`&&!e.isEmptyPolygon&&(this.polygonState=e.isValidPolygon?`measured`:`drawing`)})])}destroy(){this.measurementView.destroy(),this._set(`measurementView`,null),this._updatingHandles=r(this._updatingHandles)}get _snappingManager(){return this._snappingManagerResult?.snappingManager}_ensureSnappingManager(){if(this._snappingManagerResult==null){let e=b(this.view);this._snappingManagerResult=e,this.addHandles(e)}return this._snappingManagerResult.snappingManager}get state(){return this.analysisViewData.path.numVertices===0?`ready`:this.analysisViewData.path.isValidPolygon&&this.polygonState!==`editing`?`measured`:`measuring`}get cursor(){return this.active?`crosshair`:null}get updating(){return this._updatingHandles.updating||!!this._snappingManager?.updating}get stagedPoint(){return this._snappingOperation.stagedPoint}set stagedPoint(e){this._snappingOperation.stagedPoint=e}get snappingOptions(){return this._snappingManager?.options}finishMeasurement(){let{path:e}=this.analysisViewData;e.numVertices<=2||(e.close(),this.polygonState=`measured`,this._resetSnappingState(),this.active&&(this.view.activeTool=null))}resetCreated(){super.resetCreated(),this._resetSnappingState(),this.polygonState=`initial`,this.state===`measured`&&(this.polygonState=`measured`,this.finishToolCreation())}onShow(){this.measurementView.show()}onHide(){this.measurementView.hide()}onDeactivate(){this._resetSnappingState()}onInputEvent(e){switch(e.type){case`immediate-double-click`:this._handleImmediateDoubleClick(e);break;case`immediate-click`:this._handleImmediateClick(e);break;case`pointer-move`:this._handlePointerMove(e);break;case`drag`:this._handleDrag(e);break;case`key-down`:this._handleKeyDown(e)}}_setupManipulators(){let e=e=>e.events.on(`grab-changed`,()=>{if(this.analysisViewData.path.isValidPolygon){let e=this.manipulators.some(e=>e.manipulator.grabbing);this.polygonState=e?`editing`:`measured`}}),t=t=>{this.addHandles([p(t,(e,t,n,r)=>{let i=E(e),a=e.metadata,o=this._snappingManager,s=this._getSnappingContext(r),c=this._updatingHandles,{snappingStep:l,cancelSnapping:d}=y({snappingManager:o,snappingContext:s,updatingHandles:c});n.next(i).next(t=>(this.analysisViewData.lastDraggedVertex=null,this.analysisViewData.path.setVertexPosition(a,f),e.location=f,t)).next(d),t.next(i).next(T(this.view)).next(...l).next(t=>{e.location=t.mapEnd,this.analysisViewData.lastDraggedVertex=t.action===`end`?null:a,this.analysisViewData.path.setVertexPosition(a,u(t.mapEnd))});let f=u(this.analysisViewData.path.getVertexPositionAsPoint(a))}),e(t)],t)};this.manipulators.forEach(({manipulator:e})=>{t(e)}),this.addHandles([this.manipulators.on(`after-add`,({item:{manipulator:e}})=>{t(e)}),this.manipulators.on(`after-remove`,({item:{manipulator:e}})=>this.removeHandles(e))])}_handleImmediateDoubleClick(e){w(e)&&(this.polygonState===`drawing`&&this.finishMeasurement(),e.stopPropagation())}_handleDrag(e){this.polygonState===`editing`&&e.stopPropagation()}_handleImmediateClick(e){if(!w(e))return;let t=C(e),{pointerType:n}=e;if(this.active)switch(this.polygonState){case`initial`:case`measured`:if(this._addVertexAt(t,n)){this.stagedPoint=null,this.polygonState=`drawing`,e.stopPropagation();return}break;case`drawing`:{let r=this.measurementView.vertexHandleAt(t,n);if(r==null){if(this._addVertexAt(t,n)){this.stagedPoint=null,e.stopPropagation();return}}else r.index===0&&(this.finishMeasurement(),e.stopPropagation());break}}e.pointerType===`mouse`&&this._hoverAt(t)}_handlePointerMove(e){if(e.pointerType===`mouse`){let t=C(e);this._hoverAt(t)}}_handleKeyDown(e){let{path:t}=this.analysisViewData;(e.key===g.cancel||e.key===g.complete)&&this.polygonState===`drawing`&&t.numVertices>=3&&(this.stagedPoint=null,this.finishMeasurement(),e.stopPropagation())}_hoverAt(e){let{polygonState:t}=this;if(this.active&&j.has(t)){let t=this._pick(e);if(t?.mapPoint!=null){let e=this._getSnappingContext(`mouse`);this._updatingHandles.consumePromise(a(this._snappingOperation.snap({point:t.mapPoint},this._ensureSnappingManager(),e)))}}else this.stagedPoint=null}_addVertexAt(e,t){let n=this._pick(e)?.mapPoint;if(n==null)return!1;this.analysis.valid&&this.polygonState===`measured`&&(this.analysis.clear(),this._set(`created`,!1),this.polygonState=`initial`);let r=this._getSnappingContext(t),i=this._snappingOperation.update({point:n},this._ensureSnappingManager(),r),a=u(i,new l);return this.analysisViewData.path.add(a),!0}_pick(e){let t=new O(e);return this.measurementView.pick(t)}_resetSnappingState(){this._ensureSnappingManager().doneSnapping(),this._snappingOperation.abort(),this._snappingOperation.stagedPoint=null}get test(){}};e([t()],A.prototype,`_snappingManagerResult`,void 0),e([t()],A.prototype,`_snappingManager`,null),e([t({readOnly:!0})],A.prototype,`state`,null),e([t()],A.prototype,`polygonState`,void 0),e([t({readOnly:!0})],A.prototype,`cursor`,null),e([t()],A.prototype,`measurementView`,void 0),e([t()],A.prototype,`removeIncompleteOnCancel`,void 0),e([t({constructOnly:!0})],A.prototype,`view`,void 0),e([t({constructOnly:!0})],A.prototype,`analysis`,void 0),e([t({constructOnly:!0})],A.prototype,`analysisViewData`,void 0),e([t({readOnly:!0})],A.prototype,`manipulators`,void 0),e([t()],A.prototype,`updating`,null),e([t()],A.prototype,`stagedPoint`,null),e([t()],A.prototype,`snappingOptions`,null),A=e([n(`esri.views.3d.interactive.measurementTools.areaMeasurement3D.AreaMeasurement3DTool`)],A);const j=new Set([`initial`,`drawing`,`measured`]),M=A;export{M as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{multiplyOpacityToUnitRGBA as e,getContrast as t,colorEquals as n}from"../../../../../core/colorUtils.js";import r from"../../../../../core/Handles.js";import"../../../../../core/has.js";import{create as i}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{destroyMaybe as a}from"../../../../../core/maybe.js";import{watch as o,sync as s}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as c}from"../../../../../core/screenUtils.js";import l from"../../../../../geometry/Point.js";import{ManipulatorCollection as u}from"../../../../interactive/ManipulatorCollection.js";import{newToolIntersector as d}from"../../../../interactive/ToolIntersector.js";import{createSphereGeometry as f}from"../../../webgl-engine/lib/GeometryUtil.js";import{Manipulator3D as p}from"../../Manipulator3D.js";import{createManipulatorMaterial as m}from"../../manipulatorUtils.js";import{RenderObject as h}from"../../RenderObject.js";import{LaserlineVisualElement as g}from"../../visualElements/LaserlineVisualElement.js";import{PickResult as _}from"../support/PickRequest.js";class v{constructor(e){this.vertexManipulators=[],this._destroyed=!1,this._isManipulatorsOwner=!0,this._visible=!0,this._listenerHandles=null,this._tempHandlePosition=i();let{analysisViewData:t,manipulators:n,toolState:r,view:a,visible:o}=e;this._analysisViewData=t,this._toolState=r,n==null?this._manipulators=new u:(this._manipulators=n,this._isManipulatorsOwner=!1),this._view=a,this._intersector=d(a.state.
|
|
2
|
+
import{multiplyOpacityToUnitRGBA as e,getContrast as t,colorEquals as n}from"../../../../../core/colorUtils.js";import r from"../../../../../core/Handles.js";import"../../../../../core/has.js";import{create as i}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{destroyMaybe as a}from"../../../../../core/maybe.js";import{watch as o,sync as s}from"../../../../../core/reactiveUtils.js";import{screenPointObjectToArray as c}from"../../../../../core/screenUtils.js";import l from"../../../../../geometry/Point.js";import{ManipulatorCollection as u}from"../../../../interactive/ManipulatorCollection.js";import{newToolIntersector as d}from"../../../../interactive/ToolIntersector.js";import{createSphereGeometry as f}from"../../../webgl-engine/lib/GeometryUtil.js";import{Manipulator3D as p}from"../../Manipulator3D.js";import{createManipulatorMaterial as m}from"../../manipulatorUtils.js";import{RenderObject as h}from"../../RenderObject.js";import{LaserlineVisualElement as g}from"../../visualElements/LaserlineVisualElement.js";import{PickResult as _}from"../support/PickRequest.js";class v{constructor(e){this.vertexManipulators=[],this._destroyed=!1,this._isManipulatorsOwner=!0,this._visible=!0,this._listenerHandles=null,this._tempHandlePosition=i();let{analysisViewData:t,manipulators:n,toolState:r,view:a,visible:o}=e;this._analysisViewData=t,this._toolState=r,n==null?this._manipulators=new u:(this._manipulators=n,this._isManipulatorsOwner=!1),this._view=a,this._intersector=d(a.state.isGlobal);let s=m(a.state.isGlobal,this._handleColor);s.setParameters({testsTransparentRenderOrder:4});let c=[new h(f(s,1,32,32))],l=new p({view:a,renderObjects:c});l.available=!1,l.radius=C,l.interactive=!1,this._manipulators.add(l),this._cursorManipulator=l,this._manipulatorMaterial=s,this._laserLine=new g({view:a,attached:!0,style:{glowWidth:b,glowFalloff:x,innerWidth:S},isDecoration:!0}),this._updateVisibility(o??!0)}destroy(){this._listenerHandles=a(this._listenerHandles),this._manipulators=this._isManipulatorsOwner?a(this._manipulators):null,this._laserLine=a(this._laserLine),this._destroyed=!0}get destroyed(){return this._destroyed}get visible(){return this._visible}set visible(e){e?this.show():this.hide()}get testData(){}show(){this._setVisibility(!0)}hide(){this._setVisibility(!1)}_setVisibility(e){!this._destroyed&&this._visible!==e&&this._updateVisibility(e)}_updateVisibility(e){this._visible=e,this._laserLine.visible=e,e?(this._initializeListeners(),this._updateAll()):(this._destroyListeners(),this.vertexManipulators.forEach(e=>this._removeVertexManipulator(e)),this.vertexManipulators=[])}vertexHandleAt(e,t){return this._manipulators.intersect(e,t)?.metadata}pick(e){let t=this._view.spatialReference,n=c(e.screenPoint);this._view.sceneIntersectionHelper.intersectToolIntersectorScreen(n,this._intersector);let r=this._intersector.results.min,a=i();if(!r.getIntersectionPoint(a))return null;let o=this._view.renderCoordsHelper.fromRenderCoords(a,new l({spatialReference:t}));return o==null?null:new _(a,o)}_updateAll(){this._visible&&(this._updateVertexManipulators(),this._updateLaserLine())}_createVertexManipulator(){let e=[new h(f(this._manipulatorMaterial,1,32,32))],t=new p({view:this._view,renderObjects:e});return t.radius=C,this._manipulators.add(t),t}_removeVertexManipulator(e){this._manipulators.remove(e)}_updateVertexManipulators(){let{viewData:e}=this._analysisViewData,t=this._analysisViewData.path?this._analysisViewData.path.vertices:[],n=this.vertexManipulators;y(n,t.length,()=>this._createVertexManipulator(),e=>this._removeVertexManipulator(e)),n.forEach((n,r)=>{n.metadata=t[r],n.renderLocation=e.vertexData.positionsRender[r],n.cursor=r===0&&this._toolState.polygonState===`drawing`?`crosshair`:null}),this._toolState.polygonState===`drawing`&&this._analysisViewData.stagedPoint!=null?(this._cursorManipulator.available=!0,this._cursorManipulator.location=this._analysisViewData.stagedPoint):this._cursorManipulator.available=!1}get _handleColor(){return e(this._view.effectiveTheme.accentColor,.5)}_getFocusPoint(){let{lastDraggedVertex:e}=this._analysisViewData;switch(this._toolState.polygonState){case`drawing`:return this._analysisViewData.stagedPoint==null?e==null?this._analysisViewData.path.lastPoint:this._analysisViewData.path.getVertexPositionAsPoint(e):this._analysisViewData.stagedPoint;case`editing`:return e==null?null:this._analysisViewData.path.getVertexPositionAsPoint(e);default:return this._analysisViewData.stagedPoint}}_updateLaserLine(){let e=this._toolState.polygonState!==`measured`&&this._toolState.active,t=this._getFocusPoint();if(e&&t!=null){let e=this._tempHandlePosition;this._view.renderCoordsHelper.toRenderCoords(t,e),this._laserLine.heightManifoldTarget=e}else this._laserLine.heightManifoldTarget=null}_initializeListeners(){this._listenerHandles=new r,this._listenerHandles.add([o(()=>this._toolState.polygonState,()=>this._updateLaserLine()),o(()=>this._analysisViewData.viewData,()=>this._updateAll(),s),o(()=>({lastDraggedVertex:this._analysisViewData.lastDraggedVertex,cursorPoint:this._analysisViewData.stagedPoint}),()=>this._updateLaserLine()),o(()=>this._toolState.active,()=>this._updateAll()),o(()=>this._view.effectiveTheme.accentColor,n=>{let r=e(n,.5);this._manipulatorMaterial.setParameters({color:r});let i=n.toUnitRGB(),a=t(n).toUnitRGB(),o=n.a*.75,s=this._laserLine;s.style={...s.style,glowColor:i,innerColor:a,globalAlpha:o}},{initial:!0,equals:n})])}_destroyListeners(){this._listenerHandles=a(this._listenerHandles)}}function y(e,t,n,r){for(;e.length<t;)e.push(n());if(r)for(;e.length>t;)r(e.pop());else e.length=t}const b=8,x=8,S=1,C=5;export{v as default};
|
package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import"../../../../../core/has.js";import{destroyMaybe as r}from"../../../../../core/maybe.js";import{memoize as i}from"../../../../../core/memoize.js";import{when as a,syncAndInitial as o,watch as s}from"../../../../../core/reactiveUtils.js";import{UpdatingHandles as c}from"../../../../../core/support/UpdatingHandles.js";import l from"../../../../../geometry/Point.js";import{clonePoint as u}from"../../../../../layers/graphics/hydratedFeatures.js";import{AnalysisToolBase as d}from"../../../../interactive/AnalysisToolBase.js";import{createCoordinateHelper as f}from"../../../../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as p,resetProperties as m}from"../../../../interactive/dragEventPipeline.js";import{EditGeometry as h}from"../../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as g}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as _}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as v}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquireForFeaturePlacement as y}from"../../../../interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as b}from"../../../../interactive/snapping/snappingUtils.js";import{createScreenPointFromEvent as x}from"../../../../support/screenUtils.js";import{isPrimaryPointerAction as S}from"../../../analysis/support/measurementUtils.js";import{getElevationAtPoint as C}from"../../../support/ElevationProvider.js";import{screenToMap3D as w,hideManipulatorWhileDragging as T}from"../../editingTools/dragEventPipeline3D.js";import{SnappingVisualizer3D as E}from"../../SnappingVisualizer3D.js";import{DirectLineMeasurement3DView as D}from"./DirectLineMeasurement3DView.js";let O=class extends d{constructor(e){super(e),this._updatingHandles=new c,this._snappingManagerResult=null,this._emulatedDrag=null,this.lineState=`initial`,this.removeIncompleteOnCancel=!1,this.startPointSurfaceLocation=null,this.endPointSurfaceLocation=null,this.cursorPointSurfaceLocation=null,this.startManipulator=null,this.endManipulator=null,this.cursorManipulator=null,this._getSnappingContext=i(e=>new _({elevationInfo:{mode:`absolute-height`,offset:0},pointer:e,editGeometryOperations:new g(new h(`point`,f(!0,!1,this.view.spatialReference)),this.view.state.
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import"../../../../../core/has.js";import{destroyMaybe as r}from"../../../../../core/maybe.js";import{memoize as i}from"../../../../../core/memoize.js";import{when as a,syncAndInitial as o,watch as s}from"../../../../../core/reactiveUtils.js";import{UpdatingHandles as c}from"../../../../../core/support/UpdatingHandles.js";import l from"../../../../../geometry/Point.js";import{clonePoint as u}from"../../../../../layers/graphics/hydratedFeatures.js";import{AnalysisToolBase as d}from"../../../../interactive/AnalysisToolBase.js";import{createCoordinateHelper as f}from"../../../../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as p,resetProperties as m}from"../../../../interactive/dragEventPipeline.js";import{EditGeometry as h}from"../../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as g}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as _}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as v}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquireForFeaturePlacement as y}from"../../../../interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as b}from"../../../../interactive/snapping/snappingUtils.js";import{createScreenPointFromEvent as x}from"../../../../support/screenUtils.js";import{isPrimaryPointerAction as S}from"../../../analysis/support/measurementUtils.js";import{getElevationAtPoint as C}from"../../../support/ElevationProvider.js";import{screenToMap3D as w,hideManipulatorWhileDragging as T}from"../../editingTools/dragEventPipeline3D.js";import{SnappingVisualizer3D as E}from"../../SnappingVisualizer3D.js";import{DirectLineMeasurement3DView as D}from"./DirectLineMeasurement3DView.js";let O=class extends d{constructor(e){super(e),this._updatingHandles=new c,this._snappingManagerResult=null,this._emulatedDrag=null,this.lineState=`initial`,this.removeIncompleteOnCancel=!1,this.startPointSurfaceLocation=null,this.endPointSurfaceLocation=null,this.cursorPointSurfaceLocation=null,this.startManipulator=null,this.endManipulator=null,this.cursorManipulator=null,this._getSnappingContext=i(e=>new _({elevationInfo:{mode:`absolute-height`,offset:0},pointer:e,editGeometryOperations:new g(new h(`point`,f(!0,!1,this.view.spatialReference)),this.view.state.isGlobal),visualizer:new E}))}initialize(){let{view:e,analysis:t,analysisViewData:n,visible:r}=this;this.measurementView=new D({toolState:this,view:e,analysis:t,analysisViewData:n,visible:r});let{start:i,end:c,cursor:d}=this.measurementView.createManipulators(),f=(e,t,n)=>{let r=()=>t===`startPoint`?this.analysisViewData.elevationAlignedStartPoint:this.analysisViewData.elevationAlignedEndPoint,a=p(e,(e,i,a,o)=>{let s=T(e),c=this._ensureSnappingManager(),d=this._getSnappingContext(o),f=this._updatingHandles,{lineState:p}=this;a=a.next(s).next(m(this,[n,t])).next(n=>{if(t!==`cursorPoint`){let t=r();t!=null&&(e.location=t)}return n});let h=w(this.view),g=i.next(s).next(e=>{let r=h(e);return r||this.lineState!==`drawing`&&this.lineState!==`initial`||(this[t]=null,this[n]=null),r});if(o!==`touch`||p===`editing`){let{snappingStep:e,cancelSnapping:t}=v({snappingManager:c,snappingContext:d,updatingHandles:f});a.next(t),g=g.next(...e)}g.next(e=>e.action===`start`?null:e).next(r=>{let i=u(r.mapEnd,new l);this[t]=i,e.location=i,this[n]=this._surfaceLocation(i,r.surfaceType)})});return t===`cursorPoint`?[a]:[a,e.events.on(`grab-changed`,()=>{let e=i.grabbing||c.grabbing;this.lineState=e?`editing`:`measured`}),this._updatingHandles.add(r,t=>{t&&(e.location=t)})]};this.startManipulator=i,this.endManipulator=c,this.cursorManipulator=d,this.manipulators.add(i),this.manipulators.add(c),this.manipulators.add(d),this.addHandles([...f(i,`startPoint`,`startPointSurfaceLocation`),...f(c,`endPoint`,`endPointSurfaceLocation`),...f(d,`cursorPoint`,`cursorPointSurfaceLocation`),a(()=>this.state===`measured`,()=>{this.finishToolCreation(),this.active&&(this.view.activeTool=null)},o),s(()=>({startPointAvailable:this.analysisViewData.elevationAlignedStartPoint!=null,endPointAvailable:this.analysisViewData.elevationAlignedEndPoint!=null}),({startPointAvailable:e,endPointAvailable:t})=>{this.startManipulator.available=e,this.endManipulator.available=t},o)]),b(this)}destroy(){this._updatingHandles=r(this._updatingHandles),this.measurementView=r(this.measurementView)}get _snappingManager(){return this._snappingManagerResult?.snappingManager}_ensureSnappingManager(){if(this._snappingManagerResult==null){let e=y(this.view);this._snappingManagerResult=e,this.addHandles(e)}return this._snappingManagerResult.snappingManager}get state(){let{analysis:e}=this;if(e.startPoint==null&&e.endPoint==null)return`ready`;let{lineState:t}=this;return this.validMeasurement&&t!==`editing`&&t!==`drawing`?`measured`:`measuring`}get cursor(){return this.active&&(this.state===`ready`||this.lineState!==`measured`)?`crosshair`:null}get startPoint(){return this.analysis.startPoint}set startPoint(e){this.analysis.startPoint=e}get endPoint(){return this.analysis.endPoint}set endPoint(e){this.analysis.endPoint=e}get cursorPoint(){return this.measurementView.cursorPoint}set cursorPoint(e){this.measurementView.cursorPoint=e}get snappingOptions(){return this._snappingManager?.options}get validMeasurement(){return this.analysis.startPoint!=null&&this.analysis.endPoint!=null}get updating(){return this._updatingHandles.updating||!!this._snappingManager?.updating}resetCreated(){super.resetCreated(),this.lineState=`initial`,this.cursorPoint=null,this.state===`measured`&&this.finishToolCreation()}onShow(){this.measurementView.show()}onHide(){this.measurementView.hide()}onDeactivate(){this._emulatedDrag?.cancel(),this._emulatedDrag=null}onInputEvent(e){switch(e.type){case`immediate-click`:this._handleImmediateClick(e);break;case`pointer-move`:this._handlePointerMove(e)}}_handlePointerMove(e){if(!this.active||this.view.navigating)return;let{pointerType:t}=e;if(t!==`mouse`)return;let n=x(e),{lineState:r,cursorManipulator:i,endManipulator:a}=this,o=!1;this.cursorPoint??(this._emulatedDrag?.cancel(),this._emulatedDrag=k(i,t,n),o=!0),r===`initial`&&(this._emulatedDrag?.update(n),o=!0),r===`drawing`&&(a.events.emit(`drag`,{action:`update`,start:n,screenPoint:n}),o=!0),o&&e.stopPropagation()}_handleImmediateClick(e){if(!this.active||!S(e))return;let t=x(e),{pointerType:n}=e,{cursorManipulator:r,startManipulator:i,endManipulator:a,lineState:o}=this,s=!1;switch(this.cursorPoint??(this._emulatedDrag?.cancel(),this._emulatedDrag=k(r,n,t)),o){case`initial`:if(this._emulatedDrag?.update(t),this.cursorPoint!=null){this._emulatedDrag?.end(t),this._emulatedDrag=null,this.analysis.valid&&(this.analysis.clear(),this._set(`created`,!1));let{cursorPoint:e}=this;this.startPoint=e,this.startPointSurfaceLocation=this.cursorPointSurfaceLocation,i.location=e,i.interactive=!1,a.interactive=!1,this.lineState=`drawing`,this._emulatedDrag=k(a,n,t),s=!0}break;case`drawing`:this._emulatedDrag?.update(t),this.endPoint!=null&&(this._emulatedDrag?.end(t),this._emulatedDrag=null,i.interactive=!0,a.interactive=!0,this.lineState=`measured`,s=!0)}s&&e.stopPropagation()}_surfaceLocation(e,t){return t===0?`on-the-surface`:(e.z??0)>=this._getElevation(e)?`above-the-surface`:`below-the-surface`}_getElevation(e){return this.view.groundView?.ready?C(this.view.elevationProvider,e)??0:0}get test(){}};e([t()],O.prototype,`_snappingManagerResult`,void 0),e([t()],O.prototype,`_snappingManager`,null),e([t({readOnly:!0})],O.prototype,`state`,null),e([t()],O.prototype,`lineState`,void 0),e([t({readOnly:!0})],O.prototype,`cursor`,null),e([t()],O.prototype,`startPoint`,null),e([t()],O.prototype,`endPoint`,null),e([t()],O.prototype,`cursorPoint`,null),e([t({constructOnly:!0})],O.prototype,`analysis`,void 0),e([t({constructOnly:!0})],O.prototype,`analysisViewData`,void 0),e([t()],O.prototype,`measurementView`,void 0),e([t()],O.prototype,`removeIncompleteOnCancel`,void 0),e([t({constructOnly:!0})],O.prototype,`view`,void 0),e([t({readOnly:!0})],O.prototype,`validMeasurement`,null),e([t({value:null})],O.prototype,`startPointSurfaceLocation`,void 0),e([t({value:null})],O.prototype,`endPointSurfaceLocation`,void 0),e([t({value:null})],O.prototype,`cursorPointSurfaceLocation`,void 0),e([t()],O.prototype,`updating`,null),O=e([n(`esri.views.3d.interactive.measurementTools.directLineMeasurement3D.DirectLineMeasurement3DTool`)],O);function k(e,t,n){return e.events.emit(`drag`,{action:`start`,pointerType:t,start:n,screenPoint:n}),{update:t=>e.events.emit(`drag`,{action:`update`,start:t,screenPoint:t}),end:t=>e.events.emit(`drag`,{action:`end`,start:t,screenPoint:t}),cancel:()=>e.events.emit(`drag`,{action:`cancel`})}}const A=O;export{A as default};
|
package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{property as n,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{multiplyOpacityToUnitRGBA as i,getContrast as a,colorVectorToColorAndOpacity as o,colorVectorEquals as s}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{destroyMaybe as l}from"../../../../../core/maybe.js";import{watch as u,initial as d}from"../../../../../core/reactiveUtils.js";import{fromPoints as f}from"../../../../../geometry/support/lineSegment.js";import{createSphereGeometry as p}from"../../../webgl-engine/lib/GeometryUtil.js";import{Manipulator3D as m}from"../../Manipulator3D.js";import{createManipulatorMaterial as h}from"../../manipulatorUtils.js";import{RenderObject as g}from"../../RenderObject.js";import{LaserlineVisualElement as _}from"../../visualElements/LaserlineVisualElement.js";let v=class extends t{constructor(e){super(e),this.cursorPoint=null,this._visible=!1,this._laserLine=null,this.laserLineEnabled=!0,this._lastDraggedHandle=null}initialize(){this._laserLine=new _({view:this.view,attached:!0,isDecoration:!0}),this._updateVisibility(this._visible),this._connectToAnalysisView(),this.addHandles(u(()=>this._params,({laserLineGlowColor:e,laserLineInnerColor:t,laserLineGlobalAlpha:n})=>{let r=this._laserLine;r.style={...r.style,innerColor:t,glowColor:e,globalAlpha:n}}))}destroy(){this._laserLine=l(this._laserLine)}get _params(){let{accentColor:e}=this.view.effectiveTheme;return{laserLineGlowColor:e.toUnitRGB(),laserLineGlowWidth:8,laserLineGlowFalloff:8,laserLineInnerColor:a(e).toUnitRGB(),laserLineInnerWidth:.75,laserLineGlobalAlpha:e.a*.75,handleColor:i(e,.5),handleRadius:5}}get visible(){return this._visible}set visible(e){e?this.show():this.hide()}get testData(){}get _cursorPosition(){let e=c(),t=this.cursorPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _startPosition(){let e=c(),t=this.analysisViewData.elevationAlignedStartPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _endPosition(){let e=c(),t=this.analysisViewData.elevationAlignedEndPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _laserLineParams(){let e=this._focusPosition,{active:t,lineState:n}=this.toolState,r=this.analysisViewData,i=this.laserLineEnabled&&!!e&&n!==`measured`&&t;if(!i||!this.visible||r==null||r.destroyed)return{heightManifoldTarget:null,pointDistanceLine:null,lineVerticalPlaneSegment:null};let a=r.actualVisualizedMeasurement,o=this.view.
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{property as n,subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{multiplyOpacityToUnitRGBA as i,getContrast as a,colorVectorToColorAndOpacity as o,colorVectorEquals as s}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import{create as c}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{destroyMaybe as l}from"../../../../../core/maybe.js";import{watch as u,initial as d}from"../../../../../core/reactiveUtils.js";import{fromPoints as f}from"../../../../../geometry/support/lineSegment.js";import{createSphereGeometry as p}from"../../../webgl-engine/lib/GeometryUtil.js";import{Manipulator3D as m}from"../../Manipulator3D.js";import{createManipulatorMaterial as h}from"../../manipulatorUtils.js";import{RenderObject as g}from"../../RenderObject.js";import{LaserlineVisualElement as _}from"../../visualElements/LaserlineVisualElement.js";let v=class extends t{constructor(e){super(e),this.cursorPoint=null,this._visible=!1,this._laserLine=null,this.laserLineEnabled=!0,this._lastDraggedHandle=null}initialize(){this._laserLine=new _({view:this.view,attached:!0,isDecoration:!0}),this._updateVisibility(this._visible),this._connectToAnalysisView(),this.addHandles(u(()=>this._params,({laserLineGlowColor:e,laserLineInnerColor:t,laserLineGlobalAlpha:n})=>{let r=this._laserLine;r.style={...r.style,innerColor:t,glowColor:e,globalAlpha:n}}))}destroy(){this._laserLine=l(this._laserLine)}get _params(){let{accentColor:e}=this.view.effectiveTheme;return{laserLineGlowColor:e.toUnitRGB(),laserLineGlowWidth:8,laserLineGlowFalloff:8,laserLineInnerColor:a(e).toUnitRGB(),laserLineInnerWidth:.75,laserLineGlobalAlpha:e.a*.75,handleColor:i(e,.5),handleRadius:5}}get visible(){return this._visible}set visible(e){e?this.show():this.hide()}get testData(){}get _cursorPosition(){let e=c(),t=this.cursorPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _startPosition(){let e=c(),t=this.analysisViewData.elevationAlignedStartPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _endPosition(){let e=c(),t=this.analysisViewData.elevationAlignedEndPoint;return t&&this.view.renderCoordsHelper.toRenderCoords(t,e),e}get _laserLineParams(){let e=this._focusPosition,{active:t,lineState:n}=this.toolState,r=this.analysisViewData,i=this.laserLineEnabled&&!!e&&n!==`measured`&&t;if(!i||!this.visible||r==null||r.destroyed)return{heightManifoldTarget:null,pointDistanceLine:null,lineVerticalPlaneSegment:null};let a=r.actualVisualizedMeasurement,o=this.view.state.isGlobal&&i&&!!this.analysis.startPoint&&a===`geodesic`,s=i&&r.viewMode===2;return{heightManifoldTarget:a===`euclidean`?e:null,pointDistanceLine:o?this._pointDistanceLine:null,lineVerticalPlaneSegment:s?f(this._startPosition,this._endPosition):null}}get _focusPosition(){let{lineState:e}=this.toolState,t=this.analysisViewData,n=t!=null&&!t.destroyed&&t.measurementMode===1&&t.viewMode===1;switch(e){case`drawing`:return n?this._startPosition:this.analysis.endPoint?this._endPosition:this._startPosition;case`editing`:return n?this._lastDraggedHandle===`start`?this._endPosition:this._startPosition:this._lastDraggedHandle===`start`?this._startPosition:this._endPosition;default:return this.cursorPoint==null?null:this._cursorPosition}}get _pointDistanceLine(){return{origin:this.toolState.lineState===`drawing`||this._lastDraggedHandle===`end`?this._startPosition:this._endPosition,target:this._focusPosition}}createManipulators(){let e=this._params,{view:t}=this,n=()=>{let n=h(t.state.isGlobal,e.handleColor);n.setParameters({testsTransparentRenderOrder:5});let r=[new g(p(n,1,32,32))],i=new m({view:t,renderObjects:r});return i.available=!1,i.radius=e.handleRadius,[i,n]},[r,i]=n(),[a,c]=n(),l=new m({view:this.view,available:!1,interactive:!1}),{elevationAlignedStartPoint:d,elevationAlignedEndPoint:f}=this.analysisViewData;d!=null&&(r.location=d,r.available=!0),f!=null&&(a.location=f,a.available=!0);let _=()=>{let e=this._lastDraggedHandle;r.grabbing&&!a.grabbing&&(e=`start`),a.grabbing&&!r.grabbing&&(e=`end`),!r.grabbing&&!a.grabbing&&(e=null),this._lastDraggedHandle=e},v=r.events.on(`grab-changed`,_),y=a.events.on(`grab-changed`,_);return this.addHandles([v,y,u(()=>o(this._params.handleColor),e=>{i.setParameters({color:e}),c.setParameters({color:e})},{equals:s})],`manipulators`),{start:r,end:a,cursor:l}}show(){!this.destroyed&&!this._visible&&this._updateVisibility(!0)}hide(){!this.destroyed&&this._visible&&this._updateVisibility(!1)}_connectToAnalysisView(){this.removeHandles(`analysis-view`),this.addHandles([u(()=>this.analysisViewData?.destroyed,e=>{e&&this.removeHandles(`analysis-view`)},d),u(()=>[this.toolState.lineState===`measured`,this.analysisViewData],([e,t])=>{t!=null&&!t.destroyed&&(t.allowVisualElementsOrientationChange=!e)},d),u(()=>this._laserLineParams,e=>{let t=this._laserLine;t.heightManifoldTarget=e.heightManifoldTarget,t.pointDistanceLine=e.pointDistanceLine,t.lineVerticalPlaneSegment=e.lineVerticalPlaneSegment},d)],`analysis-view`)}_updateVisibility(e){this.initialized&&(this._visible=e,e&&(this._laserLine.style={innerColor:this._params.laserLineInnerColor,innerWidth:this._params.laserLineInnerWidth,glowColor:this._params.laserLineGlowColor,glowWidth:this._params.laserLineGlowWidth,glowFalloff:this._params.laserLineGlowFalloff,globalAlpha:this._params.laserLineGlobalAlpha}),this._laserLine.visible=e)}};e([n({constructOnly:!0})],v.prototype,`view`,void 0),e([n()],v.prototype,`_params`,null),e([n({constructOnly:!0})],v.prototype,`analysis`,void 0),e([n({constructOnly:!0})],v.prototype,`analysisViewData`,void 0),e([n()],v.prototype,`cursorPoint`,void 0),e([n()],v.prototype,`toolState`,void 0),e([n()],v.prototype,`visible`,null),e([n()],v.prototype,`testData`,null),e([n()],v.prototype,`_visible`,void 0),e([n()],v.prototype,`_laserLine`,void 0),e([n({constructOnly:!0})],v.prototype,`laserLineEnabled`,void 0),e([n()],v.prototype,`_cursorPosition`,null),e([n()],v.prototype,`_startPosition`,null),e([n()],v.prototype,`_endPosition`,null),e([n()],v.prototype,`_lastDraggedHandle`,void 0),e([n()],v.prototype,`_laserLineParams`,null),e([n()],v.prototype,`_focusPosition`,null),e([n()],v.prototype,`_pointDistanceLine`,null),v=e([r(`esri.views.3d.interactive.measurementTools.directLineMeasurement3D.DirectLineMeasurement3DView`)],v);export{v as DirectLineMeasurement3DView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{Object3D as e}from"../../webgl-engine/lib/Object3D.js";import{StageObjectVisualElement as t}from"./StageObjectVisualElement.js";class n extends t{createObject(){let t=new e({
|
|
2
|
+
import{Object3D as e}from"../../webgl-engine/lib/Object3D.js";import{StageObjectVisualElement as t}from"./StageObjectVisualElement.js";class n extends t{createObject(){let t=new e({castShadows:!1});return t.transformation=this._transform,t}updateObjectTransform(e){e.transformation=this._transform}}export{n as Object3DVisualElement};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{fromTranslation as e,scale as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{distance as r,normalize as i,subtract as a,copy as o,exactEquals as s,add as c}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l,ZEROS as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as d}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as f}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{watch as p}from"../../../../core/reactiveUtils.js";import{sv3d as m}from"../../../../geometry/support/vectorStacks.js";import{makeDehydratedPoint as h}from"../../../../layers/graphics/dehydratedPoint.js";import{drapedZ as g}from"../../terrain/DrapedZ.js";import{Attribute as _}from"../../webgl-engine/lib/Attribute.js";import{Geometry as v}from"../../webgl-engine/lib/Geometry.js";import{createPolylineGeometry as y}from"../../webgl-engine/lib/GeometryUtil.js";import{Object3D as b}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as x}from"../../webgl-engine/lib/RenderGeometry.js";import{ColorMaterial as S}from"../../webgl-engine/materials/ColorMaterial.js";import{RibbonLineMaterial as C}from"../../webgl-engine/materials/RibbonLineMaterial.js";import{EngineVisualElement as w}from"./EngineVisualElement.js";class T extends w{constructor(e){super(e),this._maxSize=0,this._position=l(),this._up=l(),this._right=l(),this._renderOccluded=4,this._color=f(1,0,0,1),this._outlineColor=f(0,0,0,1),this._outlineSize=0,this._size=32,this._outlineRenderOccluded=16,this.applyProperties(e)}createObject3DResourceFactory(e){return{view:e,createObject:()=>new b({
|
|
2
|
+
import{fromTranslation as e,scale as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{distance as r,normalize as i,subtract as a,copy as o,exactEquals as s,add as c}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l,ZEROS as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as d}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as f}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{watch as p}from"../../../../core/reactiveUtils.js";import{sv3d as m}from"../../../../geometry/support/vectorStacks.js";import{makeDehydratedPoint as h}from"../../../../layers/graphics/dehydratedPoint.js";import{drapedZ as g}from"../../terrain/DrapedZ.js";import{Attribute as _}from"../../webgl-engine/lib/Attribute.js";import{Geometry as v}from"../../webgl-engine/lib/Geometry.js";import{createPolylineGeometry as y}from"../../webgl-engine/lib/GeometryUtil.js";import{Object3D as b}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as x}from"../../webgl-engine/lib/RenderGeometry.js";import{ColorMaterial as S}from"../../webgl-engine/materials/ColorMaterial.js";import{RibbonLineMaterial as C}from"../../webgl-engine/materials/RibbonLineMaterial.js";import{EngineVisualElement as w}from"./EngineVisualElement.js";class T extends w{constructor(e){super(e),this._maxSize=0,this._position=l(),this._up=l(),this._right=l(),this._renderOccluded=4,this._color=f(1,0,0,1),this._outlineColor=f(0,0,0,1),this._outlineSize=0,this._size=32,this._outlineRenderOccluded=16,this.applyProperties(e)}createObject3DResourceFactory(e){return{view:e,createObject:()=>new b({castShadows:!1}),createResources:e=>this._createObject3DResources(e),destroyResources:()=>{},cameraChanged:()=>this._updateTransformObject3D(),forEachMaterial:(e,t)=>{t(e.outlineMaterial),t(e.quadMaterial)}}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:E,forEachMaterial:(e,t)=>{t(e.outlineMaterial),t(e.quadMaterial)}}}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateQuadMaterial())}get transparentRenderOrder(){return this._transparentRenderOrder}set transparentRenderOrder(e){this._transparentRenderOrder=e,this._updateOutlineMaterial(),this._updateQuadMaterial()}get isDecoration(){return this._isDecoration}set isDecoration(e){this._isDecoration=e,this._updateOutlineMaterial(),this._updateQuadMaterial()}get color(){return this._color}set color(e){d(this._color,e),this._updateQuadMaterial()}get outlineColor(){return this._outlineColor}set outlineColor(e){d(this._outlineColor,e),this._updateOutlineMaterial()}get outlineSize(){return this._outlineSize}set outlineSize(e){let t=this._outlineSize===0!=(e===0);this._outlineSize=e,t?this.recreateGeometry():this._updateOutlineMaterial()}get size(){return this._size}set size(e){e!==this._size&&(this._size=e,this._updateTransform())}get outlineRenderOccluded(){return this._outlineRenderOccluded}set outlineRenderOccluded(e){this._outlineRenderOccluded=e,this._updateOutlineMaterial()}set geometry({previous:e,center:t,next:n}){this._maxSize=Math.min(r(t,e),r(t,n))/3,i(this._up,a(this._up,e,t)),i(this._right,a(this._right,n,t)),o(this._position,t),this.recreateGeometry()}_createObject3DResources(e){let t=new S(this._quadMaterialParameters,this.view.state.isGlobal),n=this._outlineSize===0?void 0:new C(this._outlineMaterialParameters,this.view);return this._createObject3DGeometries(e,t,n),{quadMaterial:t,outlineMaterial:n}}_createObject3DGeometries(e,t,n){if(s(this._up,u)&&s(this._right,u))return;let r=this._createGeometries(t,n);for(let t of r)e.addGeometry(t);this._updateTransformObject3D(e)}_createDrapedResources(){let e=new S(this._quadMaterialParameters,this.view.state.isGlobal),t=this._outlineSize===0?void 0:new C(this._outlineMaterialParameters,this.view),n=this._createGeometries(e,t).map(e=>new x(e));return this._setTransformDraped(n),{quadMaterial:e,outlineMaterial:t,geometries:n,pixelRatioHandle:p(()=>this.view.state.contentPixelRatio,()=>this.drapedResources.recreateGeometry())}}_createGeometries(e,t){let{up:n,right:r,corner:i}=this._getVertices(),a=D(n,r,i,e);return t?[a,y(t,[n,i,r])]:[a]}_getVertices(){let e=this._up,t=this._right,n=c(m.get(),e,t);return this.isDraped&&(e=o(m.get(),e),t=o(m.get(),t),e[2]=0,t[2]=0,n[2]=0),{up:e,right:t,corner:n}}_updateTransform(){this.isDraped?this.drapedResources.recreateGeometry():this._updateTransformObject3D()}_updateTransformObject3D(n=this.object3dResources.object){if(!n)return;let r=this.view.state.camera,i=this._size*r.computeScreenPixelSizeAt(this._position),a=Math.min(this._maxSize,i);e(O,this._position),t(O,O,[a,a,a]),n.transformation=O}_setTransformDraped(n){if(n.length===0)return;let{view:{overlayManager:r,state:{contentPixelRatio:i}}}=this,{_position:a,_size:s}=this,c=o(m.get(),a);c[2]=g;let l=k;l.spatialReference=r.spatialReference,l.x=c[0],l.y=c[1];let u=s*(this.view.overlayPixelSizeInMapUnits(l)*i),d=Math.min(this._maxSize,u);e(O,c),t(O,O,[d,d,1]);for(let e of n)e.transformation=O}get _quadMaterialParameters(){return{color:this._color,forceTransparentMode:!0,writeDepth:!1,polygonOffset:1,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration,testsTransparentRenderOrder:this._transparentRenderOrder}}_updateQuadMaterial(){this.object3dResources.resources?.quadMaterial.setParameters(this._quadMaterialParameters),this.drapedResources.resources?.quadMaterial.setParameters(this._quadMaterialParameters)}get _outlineMaterialParameters(){return{color:this._outlineColor,width:this._outlineSize,renderOccluded:this._outlineRenderOccluded,testsTransparentRenderOrder:this._transparentRenderOrder,isDecoration:this.isDecoration}}_updateOutlineMaterial(){this.object3dResources.resources?.outlineMaterial?.setParameters(this._outlineMaterialParameters),this.drapedResources.resources?.outlineMaterial?.setParameters(this._outlineMaterialParameters)}}function E(e){e.pixelRatioHandle.remove(),e.geometries=[]}function D(e,t,n,r){return new v(r,[[`position`,new _([0,0,0,...t,...e,...n],[0,1,2,1,2,3],3,!0)]])}const O=n(),k=h(0,0,void 0,null);export{T as RightAngleQuadVisualElement};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{property as n,subclass as r}from"../../../core/accessorSupport/decorators.js";import{runUntracked as i}from"../../../core/accessorSupport/tracking.js";import a from"../../../core/Collection.js";import o from"../../../core/Error.js";import{handlesGroup as s}from"../../../core/handleUtils.js";import c from"../../../core/Logger.js";import{getOrCreateMapValue as l}from"../../../core/MapUtils.js";import{abortMaybe as u}from"../../../core/maybe.js";import{isAbortError as d,allSettledValues as f,throwIfAborted as p}from"../../../core/promiseUtils.js";import{watch as m,syncAndInitial as h}from"../../../core/reactiveUtils.js";import{isInEffectiveScaleRange as g}from"../../../geometry/support/scaleUtils.js";import{isBuildingGraphicOrigin as _}from"../../../graphic/isBuildingGraphicOrigin.js";import"../../../layers/buildingSublayers/BuildingGroupSublayer.js";import{I3SExtractChanges as v}from"../../../layers/support/I3SExtractChanges.js";import{isGraphic as y}from"../../../support/graphicInstanceUtils.js";import b from"../../layers/BuildingSceneLayerView.js";import{updatingProgress as x}from"../support/updatingProperties.js";import S from"./BuildingComponentSublayerView3D.js";import{BuildingSublayerView3DMixin as C}from"./BuildingSublayerView3D.js";import{parseFilterMode as w}from"./i3s/BuildingFilterUtil.js";import{checkSpatialReference as T}from"./i3s/I3SUtil.js";import{LayerView3D as E}from"./LayerView3D.js";import{normalizeHighlightTarget as D,emptyHighlightHandle as O}from"./support/highlightUtils.js";import{LayerViewPerformanceInfo as k}from"./support/LayerViewPerformanceInfo.js";const A=C(t);let j=class extends E(b){constructor(e){super(e),this.type=`building-scene-3d`,this.sublayerViews=new a,this._rejectedSublayerViews=new Map,this._abortController=new AbortController,this._loadingComponents=0,this._pendingWhenSublayerViews=new Map,this.ignoresMemoryFactor=!1}get extractChanges(){return this._extractChanges}get filterExpression(){let e=this.layer.activeFilterId,t=e==null?null:this.layer.filters.find(t=>t.id===e),n=t==null?null:t.filterBlocks?.find(e=>e.filterMode.type===`solid`);return n?n.filterExpression:null}get filterExpressions(){let e=this.layer.activeFilterId,t=e==null?null:this.layer.filters.find(t=>t.id===e);return t?.filterBlocks?t.filterBlocks.toArray().map(e=>[e.filterExpression??``,w(e)]):[]}get updatingProgressValue(){return i(()=>{let e=this.sublayerViews,t=this._loadingComponents+(e?e.length:0);return e.reduce((e,t)=>e+t.updatingProgress,0)/t})}get visibleAtCurrentScale(){return g(this.layer.effectiveScaleRange,this.view.scale)}isUpdating(){return this._loadingComponents>0||this.sublayerViews&&this.sublayerViews.some(e=>e.updating)}initialize(){T(this.layer.spatialReference,this.view.spatialReference,this.view.
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{property as n,subclass as r}from"../../../core/accessorSupport/decorators.js";import{runUntracked as i}from"../../../core/accessorSupport/tracking.js";import a from"../../../core/Collection.js";import o from"../../../core/Error.js";import{handlesGroup as s}from"../../../core/handleUtils.js";import c from"../../../core/Logger.js";import{getOrCreateMapValue as l}from"../../../core/MapUtils.js";import{abortMaybe as u}from"../../../core/maybe.js";import{isAbortError as d,allSettledValues as f,throwIfAborted as p}from"../../../core/promiseUtils.js";import{watch as m,syncAndInitial as h}from"../../../core/reactiveUtils.js";import{isInEffectiveScaleRange as g}from"../../../geometry/support/scaleUtils.js";import{isBuildingGraphicOrigin as _}from"../../../graphic/isBuildingGraphicOrigin.js";import"../../../layers/buildingSublayers/BuildingGroupSublayer.js";import{I3SExtractChanges as v}from"../../../layers/support/I3SExtractChanges.js";import{isGraphic as y}from"../../../support/graphicInstanceUtils.js";import b from"../../layers/BuildingSceneLayerView.js";import{updatingProgress as x}from"../support/updatingProperties.js";import S from"./BuildingComponentSublayerView3D.js";import{BuildingSublayerView3DMixin as C}from"./BuildingSublayerView3D.js";import{parseFilterMode as w}from"./i3s/BuildingFilterUtil.js";import{checkSpatialReference as T}from"./i3s/I3SUtil.js";import{LayerView3D as E}from"./LayerView3D.js";import{normalizeHighlightTarget as D,emptyHighlightHandle as O}from"./support/highlightUtils.js";import{LayerViewPerformanceInfo as k}from"./support/LayerViewPerformanceInfo.js";const A=C(t);let j=class extends E(b){constructor(e){super(e),this.type=`building-scene-3d`,this.sublayerViews=new a,this._rejectedSublayerViews=new Map,this._abortController=new AbortController,this._loadingComponents=0,this._pendingWhenSublayerViews=new Map,this.ignoresMemoryFactor=!1}get extractChanges(){return this._extractChanges}get filterExpression(){let e=this.layer.activeFilterId,t=e==null?null:this.layer.filters.find(t=>t.id===e),n=t==null?null:t.filterBlocks?.find(e=>e.filterMode.type===`solid`);return n?n.filterExpression:null}get filterExpressions(){let e=this.layer.activeFilterId,t=e==null?null:this.layer.filters.find(t=>t.id===e);return t?.filterBlocks?t.filterBlocks.toArray().map(e=>[e.filterExpression??``,w(e)]):[]}get updatingProgressValue(){return i(()=>{let e=this.sublayerViews,t=this._loadingComponents+(e?e.length:0);return e.reduce((e,t)=>e+t.updatingProgress,0)/t})}get visibleAtCurrentScale(){return g(this.layer.effectiveScaleRange,this.view.scale)}isUpdating(){return this._loadingComponents>0||this.sublayerViews&&this.sublayerViews.some(e=>e.updating)}initialize(){T(this.layer.spatialReference,this.view.spatialReference,this.view.state.isGlobal),this._extractChanges=new v({layer:this.layer,batchingEnabled:!0}),this._initializeSublayerViews(this.layer.sublayers,this)}destroy(){this.sublayerViews&&=(this.sublayerViews.forEach(e=>e.destroy()),null),this._extractChanges.destroy(),this._rejectedSublayerViews=null,this._abortController=u(this._abortController)}_initializeSublayerViews(e,t){let n=this,r=this.view;e.forEach(e=>{if(!e.isEmpty){if(e.type===`building-group`){let n=new A({sublayer:e,view:r,parent:t});this._initializeSublayerViews(e.sublayers,n)}else e.geometryType===`mesh`?(this._loadingComponents++,e.load({signal:this._abortController.signal}).then(()=>{let i=new S({sublayer:e,layerView:n,view:r,parent:t});this.sublayerViews.push(i);let a=this._pendingWhenSublayerViews.get(e);if(a){for(let e of a)e.resolve(i);this._pendingWhenSublayerViews.delete(e)}this.addHandles([m(()=>i.updating,()=>this.notifyChange(`updating`),h),m(()=>i.updatingProgress,()=>this.notifyChange(`updatingProgressValue`),h)])}).catch(t=>{d(t)||c.getLogger(this).error(`Error while creating view for sublayer ${e.id}\nLayer: ${this.layer.url}\n`,t),this._rejectWhenSublayerView(e,t)}).then(()=>{this._loadingComponents--,this.notifyChange(`updating`),this.notifyChange(`updatingProgressValue`)})):this._rejectWhenSublayerView(e,new o(`view:no-layerview-for-sublayer`,`No layerview created for sublayer ${e.id}`))}})}getGraphicFromIntersectorTarget(e,t){for(let n of this.sublayerViews.items)if(n.sublayer.id===e.sublayerId)return n.getGraphicFromIntersectorTarget(e,t);return null}async patchFeaturesForPopup(e,t){if(e.length===0)return[];let n=M(e,e=>_(e.origin)?e.origin.sublayer:e.sourceLayer),r=[];for(let[e,i]of n){let n=this._findComponent(e);n!=null&&r.push(n.patchFeaturesForPopup(i,t))}let i=await f(r);return p(t),i.flat()}whenGraphicBounds(e){let t=this._findComponent(_(e.origin)?e.origin.sublayer:e.sourceLayer);return t==null?Promise.reject():t.whenGraphicBounds(e)}getAABBFromIntersectorTarget(e){for(let t of this.sublayerViews.items)if(t.sublayer.id===e.sublayerId)return t.getAABBFromIntersectorTarget(e);return null}async whenSublayerView(e){let t=this._findComponent(e);if(t!=null)return t;let n=this._rejectedSublayerViews.get(e);if(n!=null)throw n;let r=this._pendingWhenSublayerViews.get(e),i=Promise.withResolvers();return r?r.push(i):this._pendingWhenSublayerViews.set(e,[i]),i.promise}_rejectWhenSublayerView(e,t){if(this.destroyed)return;this._rejectedSublayerViews.set(e,t);let n=this._pendingWhenSublayerViews.get(e);if(n){for(let e of n)e.reject(t);this._pendingWhenSublayerViews.delete(e)}}_findComponent(e){return this.sublayerViews.find(t=>e===t.sublayer)}highlight(e,t){let n=D(e);if(n.length===0)return O;if(y(n[0])){let e=n,r=new Map;for(let t of e)l(r,_(t.origin)?t.origin.sublayer:t.sourceLayer,()=>[]).push(t);let i=[];return this.sublayerViews.forEach(e=>{let n=r.get(e.sublayer);n&&i.push(e.highlight(n,t))}),s(i)}return O}get usedMemory(){return this.sublayerViews.reduce((e,t)=>e+t.usedMemory,0)}get unloadedMemory(){return this.sublayerViews.reduce((e,t)=>e+t.unloadedMemory,0)}get performanceInfo(){return new k(this.usedMemory)}};e([n()],j.prototype,`sublayerViews`,void 0),e([n()],j.prototype,`_rejectedSublayerViews`,void 0),e([n({readOnly:!0})],j.prototype,`filterExpression`,null),e([n({readOnly:!0})],j.prototype,`filterExpressions`,null),e([n(x)],j.prototype,`updatingProgress`,void 0),e([n({readOnly:!0})],j.prototype,`updatingProgressValue`,null),e([n({readOnly:!0})],j.prototype,`visibleAtCurrentScale`,null),j=e([r(`esri.views.3d.layers.BuildingSceneLayerView3D`)],j);function M(e,t){let n=new Map,r=e.length;for(let i=0;i<r;i++){let r=e[i],a=t(r,i,e),o=n.get(a);o?o.push(r):n.set(a,[r])}return n}const N=j;export{N as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../core/accessorSupport/decorators.js";import{forEach as r,result as i}from"../../../core/asyncUtils.js";import{makeHandle as a}from"../../../core/handleUtils.js";import o from"../../../core/Logger.js";import{abortMaybe as s}from"../../../core/maybe.js";import{isAbortError as c,onAbort as l,throwIfAborted as u,isAborted as d,createAbortError as f}from"../../../core/promiseUtils.js";import{whenOnce as p}from"../../../core/reactiveUtils.js";import m from"../../../geometry/Extent.js";import{create as h,equals as g,width as _,height as v,copy as y,intersection as b}from"../../../geometry/support/aaBoundingRect.js";import{debugFlags as x}from"../support/debugFlags.js";import{ManagedTexture as S}from"../webgl-engine/lib/ManagedTexture.js";import{RenderGeometry as C}from"../webgl-engine/lib/RenderGeometry.js";import{ImageMaterial as w,Parameters as T}from"../webgl-engine/materials/ImageMaterial.js";import E from"./SubView3D.js";import{computeImageExportSize as D,createGeometryForExtent as O,createOuterImageGeometry as k}from"./support/overlayImageUtils.js";let A=class extends E{constructor(e){super(e),this.drapeSourceType=0,this.updatePolicy=1,this.type=`draped`,this.maximumDataResolution=null,this._images=[],this._extents=[],this._overlays=[],this._drapeSourceRenderer=null}initialize(){this._drapeSourceRenderer=this.view.overlayManager.registerGeometryDrapeSource(this),this.addHandles(a(()=>this.view.overlayManager.unregisterDrapeSource(this)))}setDrapingExtent(e,t){this._spatialReference=t,e.forEach((e,t)=>{this._overlays[t]=e,this._updateImageExtent(e,t)})}destroy(){this.clear()}get spatialReference(){return this._spatialReference}_updateImageExtent(e,t){let n=this._clippedExtent(e.extent,M);if(n==null)return;let r=D(e.extent,n,e.resolution),i=e.pixelRatio*this.view.state.pixelRatio,{layer:a}=this;if(`imageMaxWidth`in a&&a.imageMaxWidth!=null||`imageMaxHeight`in a&&a.imageMaxHeight!=null){let e=a.imageMaxWidth,t=a.imageMaxHeight;if(r.width>e){let t=e/r.width;r.height=Math.floor(r.height*t),r.width=e,i*=t}if(r.height>t){let e=t/r.height;r.width=Math.floor(r.width*e),r.height=t,i*=e}}let s=this._extents[t];s&&g(s.extent,n)&&this._imageSizeEquals(n,s.imageSize,r)||(this._extents[t]={extent:h(n),imageSize:r,pixelRatio:i},this.suspended||this._fetch(t).catch(e=>{c(e)||o.getLogger(this).error(e)}))}clear(){for(let e=0;e<this._images.length;e++)this._clearImage(e)}async doRefresh(e){let t=[];for(let n=0;n<this._extents.length;n++)this._extents[n]&&t.push(this._fetch(n,e));await Promise.allSettled(t)}async processResult(e,t,n){(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement)&&(e.image=t)}findExtentInfoAt(e){for(let t of this._extents){let n=t.extent;if(new m({xmin:n[0],ymin:n[1],xmax:n[2],ymax:n[3],spatialReference:this._spatialReference}).contains(e))return t}return null}async redraw(e,t){await r(this._images,async(n,r)=>{n&&(await e(n,t),await this._createStageObjects(r,n.image,t))})}_imageSizeEquals(e,t,n){if(!this.maximumDataResolution)return!1;let r=_(e)/this.maximumDataResolution.x,i=v(e)/this.maximumDataResolution.y,a=r/t.width,o=i/t.height,s=r/n.width,c=i/n.height,l=Math.abs(a-s),u=Math.abs(o-c),d=x.ENABLE_OPTIMIZATIONS?1.5:0;return l<=d&&u<=d}async _fetch(e,t){if(this.suspended)return;let n=this._extents[e],r=n.extent;this._images[e]||(this._images[e]={texture:null,material:null,renderGeometry:null,loadingPromise:null,loadingAbortController:null,image:null,pixelData:null,renderExtent:h(r)});let i=this._images[e];i.loadingAbortController=s(i.loadingAbortController);let a=new m({xmin:r[0],ymin:r[1],xmax:r[2],ymax:r[3],spatialReference:this._spatialReference});if(a.width===0||a.height===0){this._clearImage(e);return}let p=new AbortController;i.loadingAbortController=p,l(t,()=>p.abort());let g=p.signal,_=this._waitFetchReady(g).then(async()=>{u(g);let t={requestAsImageElement:!0,pixelRatio:this._overlays[e].pixelRatio,...this.layerView.getFetchOptions(),signal:g},{height:r,width:i}=n.imageSize;return this.layer?this.layer.type===`imagery`?this.layer.internalFetchImage(a,i,r,t):this.layer.fetchImage(a,i,r,t):null}).then(e=>{if(d(g))throw o.getLogger(this).warnOnce(`A call to fetchImage resolved even though the request was aborted. fetchImage should not resolve if options.signal.aborted is true.`),f();return this.processResult(i,e)}).then(()=>{y(i.renderExtent,r)});i.loadingPromise=_,await this.updatingHandles.addPromise(_.then(async()=>{u(g),await this._createStageObjects(e,i.image,g)}).catch(e=>{throw e&&!c(e)&&o.getLogger(this).error(e),e}).finally(()=>{_===i.loadingPromise&&(i.loadingPromise=null,i.loadingAbortController=null)}))}_clearImage(e){let t=this._images[e];if(t){t.renderGeometry!=null&&(this._drapeSourceRenderer.removeGeometries([t.renderGeometry],1),t.renderGeometry=null);let e=this.view.stage,n=t.texture;n?.unload(),e.removeTexture(n),t.texture=null,t.material=null,t.loadingAbortController=s(t.loadingAbortController),t.loadingPromise=null,t.image=null,t.pixelData=null}}async _createStageObjects(e,t,n){let r=this.view.stage,a=this._images[e],o=()=>{a.texture?.unload(),r.removeTexture(a.texture),a.texture=null,a.renderGeometry&&=(this._drapeSourceRenderer.removeGeometries([a.renderGeometry],1),null)};if(t){let s=new S(t,{width:t.width,height:t.height,preMultiplyAlpha:!0,wrap:{s:33071,t:33071}});if(await i(this._images[+(e===0)].loadingPromise),u(n),o(),await r.schedule(()=>s.load(r.renderView.renderingContext),n),!s.loaded){o();return}r.addTexture(s),a.texture=s,a.material??=new w(new T(s,!0)),a.material.setParameters({managedTexture:s});let c;if(e===0)c=O(a.material,a.renderExtent);else{let e=this._images[0].renderExtent;if(!e){o();return}c=k(a.material,e,a.renderExtent)}a.renderGeometry=new C(c),a.renderGeometry.localOrigin=this._overlays[e].renderLocalOrigin,this._drapeSourceRenderer.addGeometries([a.renderGeometry],1)}else o(),a.material=null}_clippedExtent(e,t){if(this.view.
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../core/accessorSupport/decorators.js";import{forEach as r,result as i}from"../../../core/asyncUtils.js";import{makeHandle as a}from"../../../core/handleUtils.js";import o from"../../../core/Logger.js";import{abortMaybe as s}from"../../../core/maybe.js";import{isAbortError as c,onAbort as l,throwIfAborted as u,isAborted as d,createAbortError as f}from"../../../core/promiseUtils.js";import{whenOnce as p}from"../../../core/reactiveUtils.js";import m from"../../../geometry/Extent.js";import{create as h,equals as g,width as _,height as v,copy as y,intersection as b}from"../../../geometry/support/aaBoundingRect.js";import{debugFlags as x}from"../support/debugFlags.js";import{ManagedTexture as S}from"../webgl-engine/lib/ManagedTexture.js";import{RenderGeometry as C}from"../webgl-engine/lib/RenderGeometry.js";import{ImageMaterial as w,Parameters as T}from"../webgl-engine/materials/ImageMaterial.js";import E from"./SubView3D.js";import{computeImageExportSize as D,createGeometryForExtent as O,createOuterImageGeometry as k}from"./support/overlayImageUtils.js";let A=class extends E{constructor(e){super(e),this.drapeSourceType=0,this.updatePolicy=1,this.type=`draped`,this.maximumDataResolution=null,this._images=[],this._extents=[],this._overlays=[],this._drapeSourceRenderer=null}initialize(){this._drapeSourceRenderer=this.view.overlayManager.registerGeometryDrapeSource(this),this.addHandles(a(()=>this.view.overlayManager.unregisterDrapeSource(this)))}setDrapingExtent(e,t){this._spatialReference=t,e.forEach((e,t)=>{this._overlays[t]=e,this._updateImageExtent(e,t)})}destroy(){this.clear()}get spatialReference(){return this._spatialReference}_updateImageExtent(e,t){let n=this._clippedExtent(e.extent,M);if(n==null)return;let r=D(e.extent,n,e.resolution),i=e.pixelRatio*this.view.state.pixelRatio,{layer:a}=this;if(`imageMaxWidth`in a&&a.imageMaxWidth!=null||`imageMaxHeight`in a&&a.imageMaxHeight!=null){let e=a.imageMaxWidth,t=a.imageMaxHeight;if(r.width>e){let t=e/r.width;r.height=Math.floor(r.height*t),r.width=e,i*=t}if(r.height>t){let e=t/r.height;r.width=Math.floor(r.width*e),r.height=t,i*=e}}let s=this._extents[t];s&&g(s.extent,n)&&this._imageSizeEquals(n,s.imageSize,r)||(this._extents[t]={extent:h(n),imageSize:r,pixelRatio:i},this.suspended||this._fetch(t).catch(e=>{c(e)||o.getLogger(this).error(e)}))}clear(){for(let e=0;e<this._images.length;e++)this._clearImage(e)}async doRefresh(e){let t=[];for(let n=0;n<this._extents.length;n++)this._extents[n]&&t.push(this._fetch(n,e));await Promise.allSettled(t)}async processResult(e,t,n){(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement)&&(e.image=t)}findExtentInfoAt(e){for(let t of this._extents){let n=t.extent;if(new m({xmin:n[0],ymin:n[1],xmax:n[2],ymax:n[3],spatialReference:this._spatialReference}).contains(e))return t}return null}async redraw(e,t){await r(this._images,async(n,r)=>{n&&(await e(n,t),await this._createStageObjects(r,n.image,t))})}_imageSizeEquals(e,t,n){if(!this.maximumDataResolution)return!1;let r=_(e)/this.maximumDataResolution.x,i=v(e)/this.maximumDataResolution.y,a=r/t.width,o=i/t.height,s=r/n.width,c=i/n.height,l=Math.abs(a-s),u=Math.abs(o-c),d=x.ENABLE_OPTIMIZATIONS?1.5:0;return l<=d&&u<=d}async _fetch(e,t){if(this.suspended)return;let n=this._extents[e],r=n.extent;this._images[e]||(this._images[e]={texture:null,material:null,renderGeometry:null,loadingPromise:null,loadingAbortController:null,image:null,pixelData:null,renderExtent:h(r)});let i=this._images[e];i.loadingAbortController=s(i.loadingAbortController);let a=new m({xmin:r[0],ymin:r[1],xmax:r[2],ymax:r[3],spatialReference:this._spatialReference});if(a.width===0||a.height===0){this._clearImage(e);return}let p=new AbortController;i.loadingAbortController=p,l(t,()=>p.abort());let g=p.signal,_=this._waitFetchReady(g).then(async()=>{u(g);let t={requestAsImageElement:!0,pixelRatio:this._overlays[e].pixelRatio,...this.layerView.getFetchOptions(),signal:g},{height:r,width:i}=n.imageSize;return this.layer?this.layer.type===`imagery`?this.layer.internalFetchImage(a,i,r,t):this.layer.fetchImage(a,i,r,t):null}).then(e=>{if(d(g))throw o.getLogger(this).warnOnce(`A call to fetchImage resolved even though the request was aborted. fetchImage should not resolve if options.signal.aborted is true.`),f();return this.processResult(i,e)}).then(()=>{y(i.renderExtent,r)});i.loadingPromise=_,await this.updatingHandles.addPromise(_.then(async()=>{u(g),await this._createStageObjects(e,i.image,g)}).catch(e=>{throw e&&!c(e)&&o.getLogger(this).error(e),e}).finally(()=>{_===i.loadingPromise&&(i.loadingPromise=null,i.loadingAbortController=null)}))}_clearImage(e){let t=this._images[e];if(t){t.renderGeometry!=null&&(this._drapeSourceRenderer.removeGeometries([t.renderGeometry],1),t.renderGeometry=null);let e=this.view.stage,n=t.texture;n?.unload(),e.removeTexture(n),t.texture=null,t.material=null,t.loadingAbortController=s(t.loadingAbortController),t.loadingPromise=null,t.image=null,t.pixelData=null}}async _createStageObjects(e,t,n){let r=this.view.stage,a=this._images[e],o=()=>{a.texture?.unload(),r.removeTexture(a.texture),a.texture=null,a.renderGeometry&&=(this._drapeSourceRenderer.removeGeometries([a.renderGeometry],1),null)};if(t){let s=new S(t,{width:t.width,height:t.height,preMultiplyAlpha:!0,wrap:{s:33071,t:33071}});if(await i(this._images[+(e===0)].loadingPromise),u(n),o(),await r.schedule(()=>s.load(r.renderView.renderingContext),n),!s.loaded){o();return}r.addTexture(s),a.texture=s,a.material??=new w(new T(s,!0)),a.material.setParameters({managedTexture:s});let c;if(e===0)c=O(a.material,a.renderExtent);else{let e=this._images[0].renderExtent;if(!e){o();return}c=k(a.material,e,a.renderExtent)}a.renderGeometry=new C(c),a.renderGeometry.localOrigin=this._overlays[e].renderLocalOrigin,this._drapeSourceRenderer.addGeometries([a.renderGeometry],1)}else o(),a.material=null}_clippedExtent(e,t){if(this.view.state.isGlobal)return y(t,e);let{groundView:n}=this.view;return n.ready?b(e,n.groundExtent,t):y(t,e)}async _waitFetchReady(e){await p(()=>this.view.stationary,e),u(e)}get usedMemory(){return this._images.reduce((e,t)=>e+(t.texture?.usedMemory??0),0)}};e([t()],A.prototype,`type`,void 0),A=e([n(`esri.views.3d.layers.DrapedSubView3D`)],A);const j=A,M=h();export{j as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../core/accessorSupport/decorators.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{debounce as a,isAbortError as o}from"../../../core/promiseUtils.js";import{projectAsync as s}from"../../../geometry/projectionUtils.js";import{isInEffectiveScaleRange as c}from"../../../geometry/support/scaleUtils.js";import l from"../../layers/LayerView.js";import{RefreshableLayerView as u}from"../../layers/RefreshableLayerView.js";import{LayerView3D as d}from"./LayerView3D.js";import{LayerViewPerformanceInfo as f}from"./support/LayerViewPerformanceInfo.js";const p=l=>{let u=l,d=class extends u{constructor(){super(...arguments),this.fullExtentInLocalViewSpatialReference=null,this.refreshDebounced=a(async e=>{this.destroyed||await this._doRefresh(e).catch(e=>{o(e)||r.getLogger(this).error(e)})},2e3),this.ignoresMemoryFactor=!1,this.unloadedMemory=0}get visibleAtCurrentScale(){let e=this.layer,t=`effectiveScaleRange`in e?e.effectiveScaleRange:null;return c(t,this.view.scale)}isUpdating(){return super.isUpdating()||this.subView?.updating}initialize(){this._initSubView(),this.view.
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../core/accessorSupport/decorators.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{debounce as a,isAbortError as o}from"../../../core/promiseUtils.js";import{projectAsync as s}from"../../../geometry/projectionUtils.js";import{isInEffectiveScaleRange as c}from"../../../geometry/support/scaleUtils.js";import l from"../../layers/LayerView.js";import{RefreshableLayerView as u}from"../../layers/RefreshableLayerView.js";import{LayerView3D as d}from"./LayerView3D.js";import{LayerViewPerformanceInfo as f}from"./support/LayerViewPerformanceInfo.js";const p=l=>{let u=l,d=class extends u{constructor(){super(...arguments),this.fullExtentInLocalViewSpatialReference=null,this.refreshDebounced=a(async e=>{this.destroyed||await this._doRefresh(e).catch(e=>{o(e)||r.getLogger(this).error(e)})},2e3),this.ignoresMemoryFactor=!1,this.unloadedMemory=0}get visibleAtCurrentScale(){let e=this.layer,t=`effectiveScaleRange`in e?e.effectiveScaleRange:null;return c(t,this.view.scale)}isUpdating(){return super.isUpdating()||this.subView?.updating}initialize(){this._initSubView(),this.view.state.isLocal&&this.addResolvingPromise((async()=>this.fullExtentInLocalViewSpatialReference=await s(this.layer.fullExtent,this.view.spatialReference).catch(()=>null))()),this._updatingHandles.add(()=>this.suspended,()=>this._suspendedChangeHandler())}destroy(){this.subView=i(this.subView)}async doRefresh(){return this._doRefresh()}async _doRefresh(e){this.suspended||await this.subView.doRefresh(e)}getFetchOptions(){}_suspendedChangeHandler(){this.suspended?this.subView.clear():this.refreshDebounced()}get test(){}get usedMemory(){return this.subView.usedMemory}get performanceInfo(){return new f(this.usedMemory)}};return e([t()],d.prototype,`suspended`,void 0),e([t()],d.prototype,`fullExtentInLocalViewSpatialReference`,void 0),e([t({readOnly:!0})],d.prototype,`visibleAtCurrentScale`,null),e([t()],d.prototype,`updating`,void 0),e([t()],d.prototype,`subView`,void 0),d=e([n(`esri.views.3d.layers.DynamicLayerView3D`)],d),d};class m extends p(u(d(l))){}export{m as DynamicLayerView3D,p as DynamicLayerView3DMixin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../core/accessorSupport/decorators.js";import r from"../../../core/Error.js";import{makeHandle as i}from"../../../core/handleUtils.js";import{destroyMaybe as a}from"../../../core/maybe.js";import o from"../../../core/ReactiveMap.js";import{watch as s,sync as c}from"../../../core/reactiveUtils.js";import{projectAsync as l}from"../../../geometry/projectionUtils.js";import{isInEffectiveScaleRange as u}from"../../../geometry/support/scaleUtils.js";import{hydrateGraphic as d}from"../../../layers/graphics/hydratedFeatures.js";import{combineTimeExtent as f,hasTimeOptions as p}from"../../../layers/support/timeSupport.js";import m from"../../../rest/support/AttributeBinsQuery.js";import h from"../../../rest/support/Query.js";import{isGraphic as g}from"../../../support/graphicInstanceUtils.js";import{RefreshableLayerView as _}from"../../layers/RefreshableLayerView.js";import{getHighlightName as v}from"../../support/highlightOptionsUtils.js";import{hasLayerBasedScaleVisibility as y}from"../../support/layerViewUtils.js";import{LayerView3D as b}from"./LayerView3D.js";import{attributeLookup as x}from"./support/attributeUtils.js";import{isFeatureFilter as S,normalizeHighlightTarget as C,emptyHighlightHandle as w,isObjectId as T}from"./support/highlightUtils.js";const E=E=>{let D=_(b(E)),O=class extends D{constructor(){super(...arguments),this.updatePolicy=1,this.slicePlaneEnabled=!1,this._highlightCounter=new o,this._highlightFilters=new o,this.fullExtentInLocalViewSpatialReference=null,this.supportsHeightUnitConversion=!0}initialize(){let e=this.layer;`isTable`in e&&e.isTable?this.addResolvingPromise(Promise.reject(new r(`featurelayerview:table-not-supported`,`table feature layer can't be displayed`,{layer:e}))):(this.addResolvingPromise(this._validateGeometryType()),this.addResolvingPromise((async()=>{if(this.destroyed)return;this.fullExtentInLocalViewSpatialReference=this.view.
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../core/accessorSupport/decorators.js";import r from"../../../core/Error.js";import{makeHandle as i}from"../../../core/handleUtils.js";import{destroyMaybe as a}from"../../../core/maybe.js";import o from"../../../core/ReactiveMap.js";import{watch as s,sync as c}from"../../../core/reactiveUtils.js";import{projectAsync as l}from"../../../geometry/projectionUtils.js";import{isInEffectiveScaleRange as u}from"../../../geometry/support/scaleUtils.js";import{hydrateGraphic as d}from"../../../layers/graphics/hydratedFeatures.js";import{combineTimeExtent as f,hasTimeOptions as p}from"../../../layers/support/timeSupport.js";import m from"../../../rest/support/AttributeBinsQuery.js";import h from"../../../rest/support/Query.js";import{isGraphic as g}from"../../../support/graphicInstanceUtils.js";import{RefreshableLayerView as _}from"../../layers/RefreshableLayerView.js";import{getHighlightName as v}from"../../support/highlightOptionsUtils.js";import{hasLayerBasedScaleVisibility as y}from"../../support/layerViewUtils.js";import{LayerView3D as b}from"./LayerView3D.js";import{attributeLookup as x}from"./support/attributeUtils.js";import{isFeatureFilter as S,normalizeHighlightTarget as C,emptyHighlightHandle as w,isObjectId as T}from"./support/highlightUtils.js";const E=E=>{let D=_(b(E)),O=class extends D{constructor(){super(...arguments),this.updatePolicy=1,this.slicePlaneEnabled=!1,this._highlightCounter=new o,this._highlightFilters=new o,this.fullExtentInLocalViewSpatialReference=null,this.supportsHeightUnitConversion=!0}initialize(){let e=this.layer;`isTable`in e&&e.isTable?this.addResolvingPromise(Promise.reject(new r(`featurelayerview:table-not-supported`,`table feature layer can't be displayed`,{layer:e}))):(this.addResolvingPromise(this._validateGeometryType()),this.addResolvingPromise((async()=>{if(this.destroyed)return;this.fullExtentInLocalViewSpatialReference=this.view.state.isGlobal?null:await l(this.layer.fullExtent,this.view.spatialReference).catch(()=>null),await this._updatingRequiredPromise;let e=await this.createGraphicsPipeline();this.destroyed?e.destroy():(this.graphicsPipeline=e,await e.when())})()),this.notifyChange(`updating`))}destroy(){this.graphicsPipeline=a(this.graphicsPipeline)}get dataUpdating(){return!!this.graphicsPipeline?.dataUpdating}get legendEnabled(){return this.canResume()&&this.graphicsPipeline?.legendEnabled}get visibleAtCurrentScale(){return y()?u(this.layer.effectiveScaleRange,this.view.scale):!this.graphicsPipeline?.scaleVisibilitySuspended}get symbologySnappingSupported(){return this.graphicsPipeline.symbologySnappingSupported}get hasAllFeatures(){return this.graphicsPipeline.hasAllFeatures}get hasAllFeaturesInView(){return this.graphicsPipeline.hasAllFeaturesInView}get hasFullGeometries(){return this.graphicsPipeline.hasFullGeometries}get timeExtent(){return f(p(this.layer)?this.layer:null,this.view?.timeExtent,this._get(`timeExtent`))}get highlightIds(){return Array.from(new Set([...this._highlightCounter.keys(),...Array.from(this._highlightFilters.values()).flatMap(e=>e.objectIds??[])]))}get hasHighlight(){return this._highlightCounter.size>0||this._highlightFilters.size>0}getHit(e,t){let n=this.graphicsPipeline.findGraphic(t=>t.uid===e);if(n==null)return null;let r=d(n,this.layer,this.layer.graphicOrigin);return{type:`graphic`,graphic:r,layer:r.layer}}whenGraphicBounds(e,t){return this.graphicsPipeline?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsPipeline?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,t){return this.graphicsPipeline.elevationAlignPointsInFeatures(e,t)}async queryForSymbologySnapping(e,t){return this.graphicsPipeline.graphicsQuery.queryForSymbologySnapping(e,t)}queryAggregates(e,t){throw Error(`missing implementation`)}queryFeatures(e,t){return this.graphicsPipeline.graphicsQuery.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryAttributeBins(e,t){return this.graphicsPipeline.graphicsQuery.executeAttributeBinsQuery(this._ensureAttributeBinsQuery(e),t?.signal)}queryExtent(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return e==null?this.createQuery():h.from(e)}_ensureAttributeBinsQuery(e){let t=m.from(e);return t.outSpatialReference||=this.view.spatialReference,t}_addHighlightIds(e){this._highlightCounter.batch(()=>{for(let t of e){let e=this._highlightCounter.get(t)??0;this._highlightCounter.set(t,e+1)}})}_removeHighlightIds(e){this._highlightCounter.batch(()=>{for(let t of e){let e=this._highlightCounter.get(t);e!=null&&(e--,e>0?this._highlightCounter.set(t,e):this._highlightCounter.delete(t))}})}highlight(e,t){let n=v(t),r=this.layer.objectIdField;if(S(e)){let t=Symbol();this._highlightFilters.set(t,e),this.addHandles(s(()=>e.toJSON(),()=>this._updateDataRequirements(),c),t);let r=this.graphicsPipeline.highlightByFilter(e,n);return i(()=>{r.remove(),this.removeHandles(t),this._highlightFilters.delete(t)})}let a=C(e);if(a.length===0)return w;if(g(a[0])){let e=a;if(x(this.layer.fieldsIndex,e[0].attributes,r)!=null){let t=e.map(e=>x(this.layer.fieldsIndex,e.attributes,r)),a=this.graphicsPipeline.highlightByObjectIds(t,n);return this._addHighlightIds(t),i(()=>{this._removeHighlightIds(t),a.remove()})}return this.graphicsPipeline.highlightByGraphics(e,n)}if(T(a[0])){let e=a;this._addHighlightIds(e);let t=this.graphicsPipeline.highlightByObjectIds(e,n);return i(()=>{t.remove(),this._removeHighlightIds(e)})}return w}_getHighlightFilterGroups(){return[{order:0,filters:Array.from(this._highlightFilters.values())}]}maskOccludee(e){return this.graphicsPipeline.maskOccludee(e)}getSuspendInfo(){return{...super.getSuspendInfo(),...this.graphicsPipeline.suspendInfo}}isUpdating(){return!this.graphicsPipeline||this.graphicsPipeline.destroyed?!1:!(!this.graphicsPipeline?.updating&&this.view?.groundView?.ready)}async _validateGeometryType(){switch(this.layer.geometryType){case`multipatch`:case`multipoint`:throw new r(`featurelayerview3d:unsupported-geometry-type`,"Unsupported geometry type ${geometryType}",{geometryType:this.layer.geometryType})}}get performanceInfo(){return this.graphicsPipeline.performanceInfo}};return e([t()],O.prototype,`graphicsPipeline`,void 0),e([t({readOnly:!0})],O.prototype,`dataUpdating`,null),e([t()],O.prototype,`suspended`,void 0),e([t({readOnly:!0})],O.prototype,`legendEnabled`,null),e([t({readOnly:!0})],O.prototype,`visibleAtCurrentScale`,null),e([t()],O.prototype,`updating`,void 0),e([t({readOnly:!0})],O.prototype,`updatePolicy`,void 0),e([t({type:Boolean})],O.prototype,`slicePlaneEnabled`,void 0),e([t({readOnly:!0})],O.prototype,`suspendInfo`,void 0),e([t()],O.prototype,`symbologySnappingSupported`,null),e([t({readOnly:!0})],O.prototype,`hasAllFeatures`,null),e([t({readOnly:!0})],O.prototype,`hasAllFeaturesInView`,null),e([t({readOnly:!0})],O.prototype,`hasFullGeometries`,null),e([t({readOnly:!0})],O.prototype,`timeExtent`,null),e([t()],O.prototype,`highlightIds`,null),e([t()],O.prototype,`hasHighlight`,null),O=e([n(`esri.views.3d.layers.FeatureLikeLayerViewBase3D`)],O),O};export{E as FeatureLikeLayerViewBase3D};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../core/accessorSupport/decorators.js";import{equals as r}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{removeMaybe as i,abortMaybe as a}from"../../../core/maybe.js";import{debounce as o,throwIfAborted as s,ignoreAbortErrors as c}from"../../../core/promiseUtils.js";import{watch as l,sync as u,when as d,whenOnce as ee}from"../../../core/reactiveUtils.js";import{addFrameTask as f}from"../../../core/scheduling.js";import{signal as te}from"../../../core/signal.js";import{Seconds as p,secondsFromMilliseconds as m}from"../../../core/time.js";import{projectOrLoad as h}from"../../../geometry/projectionUtils.js";import ne from"../../../geometry/SpatialReference.js";import{toExtent as g,fromExtent as _,intersection as re,create as ie,intersects as ae}from"../../../geometry/support/aaBoundingRect.js";import{isInEffectiveScaleRange as v}from"../../../geometry/support/scaleUtils.js";import{getInfo as y}from"../../../geometry/support/spatialReferenceUtils.js";import b from"../../../symbols/support/ElevationInfo.js";import{getPositions as x,getFlowSimulationSettings as S,simulationSettingsEqual as C}from"../../support/flow/utils.js";import{hasLayerBasedScaleVisibility as w}from"../../support/layerViewUtils.js";import{TaskPriority as T}from"../../support/Scheduler.js";import{debugFlags as E}from"../support/debugFlags.js";import{tileFilterDistance as D,scaleThresholdForLoadingAllTiles as O,defaultTransitionDuration as k,transitionDurationFactor as A,seamlessTransitionEnabled as j,densityFactor as M,loadAllTilesDensityFactor as N,averageLoadingTimeSmoothingFactor as P,fadeOutTime as F,fadeInTime as I,minimumTracingResolution as L}from"../support/flow/constants.js";import{isFullExtent as R,wrappedWidth as z,FlowQuery3D as B}from"../support/flow/FlowQuery3D.js";import{FlowWorkerHandle as V}from"../support/flow/FlowWorkerHandle.js";import{materialParametersFromRenderer as H,createStreamlineGeometry as U}from"../support/flow/geometryUtils.js";import{boundingRectOfTiles as W}from"../support/flow/loadUtils.js";import{StreamlineResources3DOverlay as G}from"../support/flow/StreamlineResources3DOverlay.js";import{StreamlineResources3DShape as K}from"../support/flow/StreamlineResources3DShape.js";import{webMercatorWorldExtent as q}from"../terrain/TerrainConst.js";import{descendantsAtLevel as J,tilesAreRelated as oe}from"../terrain/tileUtils.js";import{isScreenSizePerspectiveEnabled as se}from"../webgl-engine/lib/screenSizePerspectiveUtils.js";import{RibbonLineMaterial as ce}from"../webgl-engine/materials/RibbonLineMaterial.js";import le from"./SubView3D.js";import{getFeatureTileId as ue}from"./support/FeatureTileDescriptor.js";import{makeScheduleFunction as Y}from"./support/makeScheduleFunction.js";let X=class extends le{constructor(e){super(e),this.type=`flow`,this.renderedTiles=null,this.tilesIntersectDataBounds=!0,this.requireLoad=!1,this.workerHandle=null,this.frameTask=null,this._averageLoadingTime=p(0),this._abortController=null,this._loadingState=`ready-to-load`,this._tilesUpdateIsWaiting=!1,this._debugAllowAutoLoading=te(!0),this.emissiveStrength=0,this._materialParametersOverridde=null,this._suspendedOverride=null,this._simulationSettingsOverride=null,this._seamlessTransitionEnabledOverride=null,this._updateTask=null,this._debouncedTileUpdate=o(async e=>{let{allTiles:t}=this.surface,n=this._getTileFilterFunction(),{_dataBounds:r}=this,i=new Set,a=!1;function*o(e){for(let o=0;o<t.length;++o){let s=t.at(o),c=Z(r,s.extent);n(s)&&c&&(i.add(s),a=!0),e.madeProgress(),e.done&&(e=yield)}}await this.frameTask.scheduleGenerator(o,e.signal),s(e.signal),this.tilesIntersectDataBounds=t.length===0||this.loadAllTiles?!0:a,this.renderedTiles=i})}initialize(){let{surface:e,view:t}=this,{resourceController:n}=t;this.workerHandle=new V(Y(n)),this.frameTask=n.scheduler.registerTask(T.FLOW_GENERATOR),this._updateTask=f({update:()=>this._update()}),this.addHandles([l(()=>this._simulationSettings,()=>this.triggerLoad(),{sync:!0,equals:(e,t)=>e==null&&t==null||e!=null&&t!=null&&C(e,t)}),this.updatingHandles.add(()=>this.suspended,e=>{e?this._suspend():this._resume()},u),l(()=>{let{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),d(()=>!this._animationsEnabled,()=>{let{_resources:e,_lastResources:t}=this;e!=null&&(e.startTime=Q),t!=null&&(t.startTime=Q)},u),l(()=>this._materialParameters,e=>{this._resources?.setMaterialParameters(e),this._lastResources?.setMaterialParameters(e)}),d(()=>e.allTilesCreated,()=>this._triggerTilesUpdate(),u),t.enableFeatureTiles(),l(()=>[this._dataBounds,this._featureTilesBounds,this.loadAllTiles],()=>this._triggerTilesUpdate()),l(()=>this._flowRenderer,(e,t)=>{let n=t?.visualVariables??[],r=e?.visualVariables??[];r.length===n.length&&r.every((e,t)=>e.type===n[t].type)||this.clear()}),d(()=>!t.featureTiles?.updating,()=>{this._triggerTilesUpdate()})]),this.suspended&&this._suspend(),this._triggerTilesUpdate()}destroy(){this._updateTask=i(this._updateTask),this.abort(),this.clear(),this.notifyChange(`updating`)}abort(){this._abortController=a(this._abortController),this._tilesUpdateIsWaiting=!1,this.requireLoad=!1}_ensureAbortController(){return this._abortController??=new AbortController,this._abortController}_resume(){this._updateTask.resume(),this._triggerTilesUpdate(),this.triggerLoad()}_suspend(){this._updateTask.pause(),this.abort(),this.clear()}get _animationsEnabled(){return this.view.state.animationsEnabled}get _clippingArea(){let e=h(this.view.clippingArea,this.surface.spatialReference).geometry;return e==null?null:_(e)}get _dataBounds(){let e=this._fullExtentSurfaceSpatialReference;return e==null?null:_(e)}get suspended(){return this._suspendedOverride==null?this.layerView.suspended||this.view.groundView.hasTerrainReplacement:this._suspendedOverride}get _fullExtentSurfaceSpatialReference(){return h(this.layer.fullExtent,this.surface.spatialReference).geometry}get _draped(){return this.elevationInfo.mode===`on-the-ground`}get extent(){if(this.loadAllTiles)return $(this._fullExtentSurfaceSpatialReference);let{spatialReference:e}=this.surface,t=this.renderedTiles;if(e==null||t==null)return null;let n=this.view.terrainLevel;if(n!=null){let e=new Set;t.forEach(t=>{Math.abs(n-t.level)<D&&e.add(t)}),t=e}let r=W(t,this.spatialReferenceInfo);return r==null?null:(re(r,this._clippingArea,r),$(g(r,e)))}get loadAllTiles(){return this.view.scale>(E.FLOW_GLOBAL_SCALE_THRESHOLD??O)}get isDataGlobal(){let{extent:e,spatialReferenceInfo:t}=this;return e!=null&&R(e.xmin,e.xmax,t)}get loadAllTilesLevel(){let{tilingScheme:e}=this.surface;return Math.min(Math.ceil(e.levelAtScale(E.FLOW_GLOBAL_SCALE_THRESHOLD??O)),e.getMaxLod())}get targetTiles(){let e=new Map;if(this.loadAllTiles){let{_dataBounds:t}=this;if(t==null)return e;let n=ie(),r=this.loadAllTilesLevel,i=this.surface.tilingScheme,a=i.rootTilesInExtent(t).values().flatMap(e=>J(e,r));for(let o of a){let[a,s,c]=o;i.getExtent(r,s,c,n),Z(t,n)&&e.set(ue(r,s,c),o)}return e}let{renderedTiles:t}=this;for(let n of t??[])e.set(n.key,n.lij);return e}get _featureTilesBounds(){let e=this.view.featureTiles?.filterExtent,t=h(e,this.surface.spatialReference).geometry;return t==null?null:_(t)}get _flowRenderer(){let e=this.layer.renderer;return e?.type===`flow`?e:null}get _materialParameters(){return{...H(this._flowRenderer,this.layerView.fullOpacity,this.emissiveStrength),...this._materialParametersOverridde,hasSlicePlane:this.layerView.slicePlaneEnabled,screenSizePerspective:!this._draped&&`screenSizePerspectiveEnabled`in this.layer&&se(this.layer.screenSizePerspectiveEnabled)?this.view.screenSizePerspective.parameters:null}}get _opacity(){return this.layerView.fullOpacity}get _seamlessTransitionWaitingTime(){let{_averageLoadingTime:e}=this;return p(e===0?k:this._averageLoadingTime*A)}get _transitionEnabled(){return this.view.qualitySettings.flow.transitionEnabled}get _seamlessTransitionEnabled(){return this._transitionEnabled?this._seamlessTransitionEnabledOverride==null?j:this._seamlessTransitionEnabledOverride:!1}get _tracingResolution(){let{extent:e}=this;if(!e)return[0,0];let t=z(e.xmin,e.xmax,this.spatialReferenceInfo?.valid)/(e.ymax-e.ymin),[n,r]=this.view.size,i,a;n<r?(i=n,a=n/t):(i=r*t,a=r);let o=L,s=this.view.qualitySettings.flow.maxTracingResolution,c=Math.max(1,o/Math.min(i,a)),l=c*Math.min(1,s/Math.max(i*c,a*c));return[Math.round(i*l),Math.round(a*l)]}get visible(){let e=this._flowRenderer?.color;return this.visibleAtCurrentScale&&this.layer.effectiveVisible&&this._opacity>0&&(e==null||e.a>0)}get _effectiveDensity(){let{_simulationSettings:e}=this;if(e==null)return 0;let t=e.density*this.view.quality;return e.lineSpacing/Math.sqrt(t)<e.lineCollisionWidth?(e.lineSpacing/e.lineCollisionWidth)**2:t}get elevationInfo(){return(`elevationInfo`in this.layer?this.layer.elevationInfo:void 0)??fe}startPositions(e){if(!this._seamlessTransitionEnabled)return[];let{_flowRenderer:t,_resources:n}=this;return t==null||n==null?[]:x(n.streamlines,n.query,e,t.flowSpeed)}get needsMagnitude(){return this._flowRenderer?.hasVisualVariables()??!1}get spatialReferenceInfo(){return y(this.surface.spatialReference)}get loadingState(){return this._loadingState}get loadRequirementsMet(){return this.renderedTiles!=null&&(this.renderedTiles.size>0||this.loadAllTiles)&&this.extent!=null}hasWork(){return this.updatingHandles.updating||this.requireLoad||this._loadingState===`before-transition`}get updating(){return this._debugAllowAutoLoading.value&&this.visible&&!(this.destroyed||this.destroying)&&this.hasWork()}get visibleAtCurrentScale(){return!w()||v(this.layer.effectiveScaleRange,this.view.scale)}get _simulationSettings(){let{_flowRenderer:e,_simulationSettingsOverride:t}=this;if(e==null)return null;let n=S(e);return n.segmentLength=n.lineCollisionWidth/2,n.onlyForwardTracing=!1,n.maxNumberOfStreamlines=this.view.qualitySettings.flow.maxTotalNumberOfStreamlines,n.density*=M,this.loadAllTiles&&this.isDataGlobal&&(n.density*=N),t!=null&&(n={...n,...t}),n}getSimulationSettings(e){let{_simulationSettings:t,spatialReferenceInfo:n}=this;if(t==null)return null;let r=this.view.viewingMode===`global`&&n!=null&&R(e.extent.xmin,e.extent.xmax,n);return{...t,wrapAround:r,density:this._effectiveDensity}}get surface(){return this.view.basemapTerrain}doRefresh(){}clear(){this._resources?.detach(),this._resources=null,this._lastResources?.detach(),this._lastResources=null,this.tilesIntersectDataBounds=!0,this._loadingState=`ready-to-load`}_update(){let e=this._time;this._lastResources?.hasFadedOut(e)&&this._lastResources.detach();let t=this._nextStateForTransition(e);!this.requireLoad||this.updatingHandles.updating||t!==`ready-to-load`||!this.loadRequirementsMet?(this._loadingState=t,this.tilesIntersectDataBounds||(this.requireLoad=!1)):(this._loadingState=`loading`,this.updatingHandles.consumePromise(c((async()=>{let t=this._time,n=this._seamlessTransitionEnabled&&this._resources!=null?p(e+this._seamlessTransitionWaitingTime):e;await this._load(n);let r=p((this._time-t)/1e3);this._updateAverageLoadingTime(r)})())),this.requireLoad=!1)}_updateAverageLoadingTime(e){let t=P;this._averageLoadingTime=p(t*e+(1-t)*this._averageLoadingTime)}triggerLoad(){!this.suspended&&this._debugAllowAutoLoading.value&&(this.visible?this.requireLoad=!0:this.clear())}get _time(){return m(this.layerView.view.stage.renderer.renderContext.time)}async _load(e){let{extent:t,view:n}=this;if(!this.visible){this.clear();return}if(t==null){this._loadingState=`ready-to-load`;return}this._transitionEnabled||(this._lastResources?.detach(),this._lastResources=null,this._resources?.detach(),this._resources=null);let r=new B(t,this.layerView.timeExtent,this._tracingResolution,n.state.contentPixelRatio,e),i=this._ensureAbortController();try{let t=await this._loadStreamlines(r,i.signal);if(s(i.signal),t!=null){this._lastResources?.detach(),this._lastResources=this._resources,this._resources=t;let n=this._getStartTime(e);this._lastResources!=null&&(this._lastResources.endTime=n),this._resources.startTime=n,this._animationsEnabled||(this._lastResources?.detach(),this._lastResources=null),await t.attach(),this.suspended&&this.clear(),s(i.signal),this._loadingState=this._seamlessTransitionEnabled?`before-transition`:`transitioning`}else this._loadingState=`ready-to-load`}catch{this._loadingState=`ready-to-load`}}async _loadStreamlines(e,t){let n=await this.fetchDataAndGenerateStreamlines(e,t);if(n==null)return null;let{geometries:r,material:i}=await this._createGeometry(e,n,t);return this._draped?new G(e,n,i,r,this.layerView):new K(e,n,i,r,this.view)}async fetchDataAndGenerateStreamlines(e,t){return null}async _createGeometry(e,t,n){let r=new ce(this._materialParameters,this.view),i=[],{elevationInfo:a,_draped:o,view:c}=this;function*l(n){for(let s=0;s<t.length;++s)i.push(U(c,e,t[s],a,r,o)),n.madeProgress(),n.done&&(n=yield)}return await this.frameTask.scheduleGenerator(l,n),s(n),{geometries:i,material:r}}_triggerTilesUpdate(){if(this.suspended||this._tilesUpdateIsWaiting)return;this._tilesUpdateIsWaiting=!0;let e=this._ensureAbortController();this.updatingHandles.consumePromise(c((async()=>{try{await ee(()=>this.view.stationary),s(e.signal),await this._debouncedTileUpdate(e)}finally{this._tilesUpdateIsWaiting=!1}})()))}_getTileFilterFunction(){let{view:e,_featureTilesBounds:t,loadAllTiles:n}=this;if(n){let{loadAllTilesLevel:e}=this;return t=>t.level===e}let i=e=>e.rendered&&e.visible,{featureTiles:a}=e;if(!a)return i;let o=a.tiles.filter(e=>e.measures.visible);return e=>i(e)&&Z(t,e.extent)&&o.some(({lij:t})=>r(t,e.lij)||oe(t,e.lij))}_nextStateForTransition(e){let{_resources:t}=this;if(this._flowRenderer==null||t==null||this._loadingState===`ready-to-load`||this._loadingState===`loading`)return this._loadingState;let n=t.startTime,r=n+F;return e<n?`before-transition`:e<r?`transitioning`:`ready-to-load`}_getStartTime(e){if(!this._animationsEnabled)return Q;let t=this._time;return p(t>e?t:e)}get usedMemory(){return(this._lastResources?.usedMemory??0)+(this._resources?.usedMemory??0)}get test(){}};e([t()],X.prototype,`type`,void 0),e([t()],X.prototype,`renderedTiles`,void 0),e([t()],X.prototype,`_resources`,void 0),e([t()],X.prototype,`_lastResources`,void 0),e([t()],X.prototype,`tilesIntersectDataBounds`,void 0),e([t()],X.prototype,`requireLoad`,void 0),e([t()],X.prototype,`_averageLoadingTime`,void 0),e([t()],X.prototype,`_loadingState`,void 0),e([t()],X.prototype,`emissiveStrength`,void 0),e([t()],X.prototype,`_animationsEnabled`,null),e([t()],X.prototype,`_clippingArea`,null),e([t()],X.prototype,`_dataBounds`,null),e([t()],X.prototype,`suspended`,null),e([t()],X.prototype,`_fullExtentSurfaceSpatialReference`,null),e([t()],X.prototype,`_draped`,null),e([t()],X.prototype,`extent`,null),e([t()],X.prototype,`loadAllTiles`,null),e([t()],X.prototype,`isDataGlobal`,null),e([t()],X.prototype,`loadAllTilesLevel`,null),e([t()],X.prototype,`targetTiles`,null),e([t()],X.prototype,`_featureTilesBounds`,null),e([t()],X.prototype,`_flowRenderer`,null),e([t()],X.prototype,`_materialParameters`,null),e([t()],X.prototype,`_opacity`,null),e([t()],X.prototype,`_seamlessTransitionWaitingTime`,null),e([t()],X.prototype,`_transitionEnabled`,null),e([t()],X.prototype,`_seamlessTransitionEnabled`,null),e([t()],X.prototype,`_tracingResolution`,null),e([t()],X.prototype,`visible`,null),e([t()],X.prototype,`_effectiveDensity`,null),e([t()],X.prototype,`elevationInfo`,null),e([t()],X.prototype,`needsMagnitude`,null),e([t()],X.prototype,`spatialReferenceInfo`,null),e([t()],X.prototype,`loadingState`,null),e([t()],X.prototype,`updating`,null),e([t()],X.prototype,`visibleAtCurrentScale`,null),e([t()],X.prototype,`_materialParametersOverridde`,void 0),e([t()],X.prototype,`_suspendedOverride`,void 0),e([t()],X.prototype,`_simulationSettingsOverride`,void 0),e([t()],X.prototype,`_seamlessTransitionEnabledOverride`,void 0),e([t()],X.prototype,`_simulationSettings`,null),e([t()],X.prototype,`surface`,null),X=e([n(`esri.views.3d.layers.FlowSubView3D`)],X);const de=X,fe=new b({mode:`on-the-ground`});function Z(e,t){return e==null||t==null||ae(e,t)}const pe=g(q,ne.WebMercator),Q=p(-I);function $(e){return e!=null&&e.spatialReference.isWebMercator?e?.intersection(pe):e}export{de as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../core/accessorSupport/decorators.js";import{equals as r}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{removeMaybe as i,abortMaybe as a}from"../../../core/maybe.js";import{debounce as o,throwIfAborted as s,ignoreAbortErrors as c}from"../../../core/promiseUtils.js";import{watch as l,sync as u,when as d,whenOnce as ee}from"../../../core/reactiveUtils.js";import{addFrameTask as f}from"../../../core/scheduling.js";import{signal as te}from"../../../core/signal.js";import{Seconds as p,secondsFromMilliseconds as m}from"../../../core/time.js";import{projectOrLoad as h}from"../../../geometry/projectionUtils.js";import ne from"../../../geometry/SpatialReference.js";import{toExtent as g,fromExtent as _,intersection as re,create as ie,intersects as ae}from"../../../geometry/support/aaBoundingRect.js";import{isInEffectiveScaleRange as v}from"../../../geometry/support/scaleUtils.js";import{getInfo as y}from"../../../geometry/support/spatialReferenceUtils.js";import b from"../../../symbols/support/ElevationInfo.js";import{getPositions as x,getFlowSimulationSettings as S,simulationSettingsEqual as C}from"../../support/flow/utils.js";import{hasLayerBasedScaleVisibility as w}from"../../support/layerViewUtils.js";import{TaskPriority as T}from"../../support/Scheduler.js";import{debugFlags as E}from"../support/debugFlags.js";import{tileFilterDistance as D,scaleThresholdForLoadingAllTiles as O,defaultTransitionDuration as k,transitionDurationFactor as A,seamlessTransitionEnabled as j,densityFactor as M,loadAllTilesDensityFactor as N,averageLoadingTimeSmoothingFactor as P,fadeOutTime as F,fadeInTime as I,minimumTracingResolution as L}from"../support/flow/constants.js";import{isFullExtent as R,wrappedWidth as z,FlowQuery3D as B}from"../support/flow/FlowQuery3D.js";import{FlowWorkerHandle as V}from"../support/flow/FlowWorkerHandle.js";import{materialParametersFromRenderer as H,createStreamlineGeometry as U}from"../support/flow/geometryUtils.js";import{boundingRectOfTiles as W}from"../support/flow/loadUtils.js";import{StreamlineResources3DOverlay as G}from"../support/flow/StreamlineResources3DOverlay.js";import{StreamlineResources3DShape as K}from"../support/flow/StreamlineResources3DShape.js";import{webMercatorWorldExtent as q}from"../terrain/TerrainConst.js";import{descendantsAtLevel as J,tilesAreRelated as oe}from"../terrain/tileUtils.js";import{isScreenSizePerspectiveEnabled as se}from"../webgl-engine/lib/screenSizePerspectiveUtils.js";import{RibbonLineMaterial as ce}from"../webgl-engine/materials/RibbonLineMaterial.js";import le from"./SubView3D.js";import{getFeatureTileId as ue}from"./support/FeatureTileDescriptor.js";import{makeScheduleFunction as Y}from"./support/makeScheduleFunction.js";let X=class extends le{constructor(e){super(e),this.type=`flow`,this.renderedTiles=null,this.tilesIntersectDataBounds=!0,this.requireLoad=!1,this.workerHandle=null,this.frameTask=null,this._averageLoadingTime=p(0),this._abortController=null,this._loadingState=`ready-to-load`,this._tilesUpdateIsWaiting=!1,this._debugAllowAutoLoading=te(!0),this.emissiveStrength=0,this._materialParametersOverridde=null,this._suspendedOverride=null,this._simulationSettingsOverride=null,this._seamlessTransitionEnabledOverride=null,this._updateTask=null,this._debouncedTileUpdate=o(async e=>{let{allTiles:t}=this.surface,n=this._getTileFilterFunction(),{_dataBounds:r}=this,i=new Set,a=!1;function*o(e){for(let o=0;o<t.length;++o){let s=t.at(o),c=Z(r,s.extent);n(s)&&c&&(i.add(s),a=!0),e.madeProgress(),e.done&&(e=yield)}}await this.frameTask.scheduleGenerator(o,e.signal),s(e.signal),this.tilesIntersectDataBounds=t.length===0||this.loadAllTiles?!0:a,this.renderedTiles=i})}initialize(){let{surface:e,view:t}=this,{resourceController:n}=t;this.workerHandle=new V(Y(n)),this.frameTask=n.scheduler.registerTask(T.FLOW_GENERATOR),this._updateTask=f({update:()=>this._update()}),this.addHandles([l(()=>this._simulationSettings,()=>this.triggerLoad(),{sync:!0,equals:(e,t)=>e==null&&t==null||e!=null&&t!=null&&C(e,t)}),this.updatingHandles.add(()=>this.suspended,e=>{e?this._suspend():this._resume()},u),l(()=>{let{elevationInfo:e}=this;return[this._clippingArea,this.visible,this._draped,this.view.state.contentPixelRatio,this.view.state.isGlobal,e?.mode,e?.offset,e?.unit,this._effectiveDensity]},()=>this.triggerLoad(),u),d(()=>!this._animationsEnabled,()=>{let{_resources:e,_lastResources:t}=this;e!=null&&(e.startTime=Q),t!=null&&(t.startTime=Q)},u),l(()=>this._materialParameters,e=>{this._resources?.setMaterialParameters(e),this._lastResources?.setMaterialParameters(e)}),d(()=>e.allTilesCreated,()=>this._triggerTilesUpdate(),u),t.enableFeatureTiles(),l(()=>[this._dataBounds,this._featureTilesBounds,this.loadAllTiles],()=>this._triggerTilesUpdate()),l(()=>this._flowRenderer,(e,t)=>{let n=t?.visualVariables??[],r=e?.visualVariables??[];r.length===n.length&&r.every((e,t)=>e.type===n[t].type)||this.clear()}),d(()=>!t.featureTiles?.updating,()=>{this._triggerTilesUpdate()})]),this.suspended&&this._suspend(),this._triggerTilesUpdate()}destroy(){this._updateTask=i(this._updateTask),this.abort(),this.clear(),this.notifyChange(`updating`)}abort(){this._abortController=a(this._abortController),this._tilesUpdateIsWaiting=!1,this.requireLoad=!1}_ensureAbortController(){return this._abortController??=new AbortController,this._abortController}_resume(){this._updateTask.resume(),this._triggerTilesUpdate(),this.triggerLoad()}_suspend(){this._updateTask.pause(),this.abort(),this.clear()}get _animationsEnabled(){return this.view.state.animationsEnabled}get _clippingArea(){let e=h(this.view.clippingArea,this.surface.spatialReference).geometry;return e==null?null:_(e)}get _dataBounds(){let e=this._fullExtentSurfaceSpatialReference;return e==null?null:_(e)}get suspended(){return this._suspendedOverride==null?this.layerView.suspended||this.view.groundView.hasTerrainReplacement:this._suspendedOverride}get _fullExtentSurfaceSpatialReference(){return h(this.layer.fullExtent,this.surface.spatialReference).geometry}get _draped(){return this.elevationInfo.mode===`on-the-ground`}get extent(){if(this.loadAllTiles)return $(this._fullExtentSurfaceSpatialReference);let{spatialReference:e}=this.surface,t=this.renderedTiles;if(e==null||t==null)return null;let n=this.view.terrainLevel;if(n!=null){let e=new Set;t.forEach(t=>{Math.abs(n-t.level)<D&&e.add(t)}),t=e}let r=W(t,this.spatialReferenceInfo);return r==null?null:(re(r,this._clippingArea,r),$(g(r,e)))}get loadAllTiles(){return this.view.scale>(E.FLOW_GLOBAL_SCALE_THRESHOLD??O)}get isDataGlobal(){let{extent:e,spatialReferenceInfo:t}=this;return e!=null&&R(e.xmin,e.xmax,t)}get loadAllTilesLevel(){let{tilingScheme:e}=this.surface;return Math.min(Math.ceil(e.levelAtScale(E.FLOW_GLOBAL_SCALE_THRESHOLD??O)),e.getMaxLod())}get targetTiles(){let e=new Map;if(this.loadAllTiles){let{_dataBounds:t}=this;if(t==null)return e;let n=ie(),r=this.loadAllTilesLevel,i=this.surface.tilingScheme,a=i.rootTilesInExtent(t).values().flatMap(e=>J(e,r));for(let o of a){let[a,s,c]=o;i.getExtent(r,s,c,n),Z(t,n)&&e.set(ue(r,s,c),o)}return e}let{renderedTiles:t}=this;for(let n of t??[])e.set(n.key,n.lij);return e}get _featureTilesBounds(){let e=this.view.featureTiles?.filterExtent,t=h(e,this.surface.spatialReference).geometry;return t==null?null:_(t)}get _flowRenderer(){let e=this.layer.renderer;return e?.type===`flow`?e:null}get _materialParameters(){return{...H(this._flowRenderer,this.layerView.fullOpacity,this.emissiveStrength),...this._materialParametersOverridde,hasSlicePlane:this.layerView.slicePlaneEnabled,screenSizePerspective:!this._draped&&`screenSizePerspectiveEnabled`in this.layer&&se(this.layer.screenSizePerspectiveEnabled)?this.view.screenSizePerspective.parameters:null}}get _opacity(){return this.layerView.fullOpacity}get _seamlessTransitionWaitingTime(){let{_averageLoadingTime:e}=this;return p(e===0?k:this._averageLoadingTime*A)}get _transitionEnabled(){return this.view.qualitySettings.flow.transitionEnabled}get _seamlessTransitionEnabled(){return this._transitionEnabled?this._seamlessTransitionEnabledOverride==null?j:this._seamlessTransitionEnabledOverride:!1}get _tracingResolution(){let{extent:e}=this;if(!e)return[0,0];let t=z(e.xmin,e.xmax,this.spatialReferenceInfo?.valid)/(e.ymax-e.ymin),[n,r]=this.view.size,i,a;n<r?(i=n,a=n/t):(i=r*t,a=r);let o=L,s=this.view.qualitySettings.flow.maxTracingResolution,c=Math.max(1,o/Math.min(i,a)),l=c*Math.min(1,s/Math.max(i*c,a*c));return[Math.round(i*l),Math.round(a*l)]}get visible(){let e=this._flowRenderer?.color;return this.visibleAtCurrentScale&&this.layer.effectiveVisible&&this._opacity>0&&(e==null||e.a>0)}get _effectiveDensity(){let{_simulationSettings:e}=this;if(e==null)return 0;let t=e.density*this.view.quality;return e.lineSpacing/Math.sqrt(t)<e.lineCollisionWidth?(e.lineSpacing/e.lineCollisionWidth)**2:t}get elevationInfo(){return(`elevationInfo`in this.layer?this.layer.elevationInfo:void 0)??fe}startPositions(e){if(!this._seamlessTransitionEnabled)return[];let{_flowRenderer:t,_resources:n}=this;return t==null||n==null?[]:x(n.streamlines,n.query,e,t.flowSpeed)}get needsMagnitude(){return this._flowRenderer?.hasVisualVariables()??!1}get spatialReferenceInfo(){return y(this.surface.spatialReference)}get loadingState(){return this._loadingState}get loadRequirementsMet(){return this.renderedTiles!=null&&(this.renderedTiles.size>0||this.loadAllTiles)&&this.extent!=null}hasWork(){return this.updatingHandles.updating||this.requireLoad||this._loadingState===`before-transition`}get updating(){return this._debugAllowAutoLoading.value&&this.visible&&!(this.destroyed||this.destroying)&&this.hasWork()}get visibleAtCurrentScale(){return!w()||v(this.layer.effectiveScaleRange,this.view.scale)}get _simulationSettings(){let{_flowRenderer:e,_simulationSettingsOverride:t}=this;if(e==null)return null;let n=S(e);return n.segmentLength=n.lineCollisionWidth/2,n.onlyForwardTracing=!1,n.maxNumberOfStreamlines=this.view.qualitySettings.flow.maxTotalNumberOfStreamlines,n.density*=M,this.loadAllTiles&&this.isDataGlobal&&(n.density*=N),t!=null&&(n={...n,...t}),n}getSimulationSettings(e){let{_simulationSettings:t,spatialReferenceInfo:n}=this;if(t==null)return null;let r=this.view.state.isGlobal&&n!=null&&R(e.extent.xmin,e.extent.xmax,n);return{...t,wrapAround:r,density:this._effectiveDensity}}get surface(){return this.view.basemapTerrain}doRefresh(){}clear(){this._resources?.detach(),this._resources=null,this._lastResources?.detach(),this._lastResources=null,this.tilesIntersectDataBounds=!0,this._loadingState=`ready-to-load`}_update(){let e=this._time;this._lastResources?.hasFadedOut(e)&&this._lastResources.detach();let t=this._nextStateForTransition(e);!this.requireLoad||this.updatingHandles.updating||t!==`ready-to-load`||!this.loadRequirementsMet?(this._loadingState=t,this.tilesIntersectDataBounds||(this.requireLoad=!1)):(this._loadingState=`loading`,this.updatingHandles.consumePromise(c((async()=>{let t=this._time,n=this._seamlessTransitionEnabled&&this._resources!=null?p(e+this._seamlessTransitionWaitingTime):e;await this._load(n);let r=p((this._time-t)/1e3);this._updateAverageLoadingTime(r)})())),this.requireLoad=!1)}_updateAverageLoadingTime(e){let t=P;this._averageLoadingTime=p(t*e+(1-t)*this._averageLoadingTime)}triggerLoad(){!this.suspended&&this._debugAllowAutoLoading.value&&(this.visible?this.requireLoad=!0:this.clear())}get _time(){return m(this.layerView.view.stage.renderer.renderContext.time)}async _load(e){let{extent:t,view:n}=this;if(!this.visible){this.clear();return}if(t==null){this._loadingState=`ready-to-load`;return}this._transitionEnabled||(this._lastResources?.detach(),this._lastResources=null,this._resources?.detach(),this._resources=null);let r=new B(t,this.layerView.timeExtent,this._tracingResolution,n.state.contentPixelRatio,e),i=this._ensureAbortController();try{let t=await this._loadStreamlines(r,i.signal);if(s(i.signal),t!=null){this._lastResources?.detach(),this._lastResources=this._resources,this._resources=t;let n=this._getStartTime(e);this._lastResources!=null&&(this._lastResources.endTime=n),this._resources.startTime=n,this._animationsEnabled||(this._lastResources?.detach(),this._lastResources=null),await t.attach(),this.suspended&&this.clear(),s(i.signal),this._loadingState=this._seamlessTransitionEnabled?`before-transition`:`transitioning`}else this._loadingState=`ready-to-load`}catch{this._loadingState=`ready-to-load`}}async _loadStreamlines(e,t){let n=await this.fetchDataAndGenerateStreamlines(e,t);if(n==null)return null;let{geometries:r,material:i}=await this._createGeometry(e,n,t);return this._draped?new G(e,n,i,r,this.layerView):new K(e,n,i,r,this.view)}async fetchDataAndGenerateStreamlines(e,t){return null}async _createGeometry(e,t,n){let r=new ce(this._materialParameters,this.view),i=[],{elevationInfo:a,_draped:o,view:c}=this;function*l(n){for(let s=0;s<t.length;++s)i.push(U(c,e,t[s],a,r,o)),n.madeProgress(),n.done&&(n=yield)}return await this.frameTask.scheduleGenerator(l,n),s(n),{geometries:i,material:r}}_triggerTilesUpdate(){if(this.suspended||this._tilesUpdateIsWaiting)return;this._tilesUpdateIsWaiting=!0;let e=this._ensureAbortController();this.updatingHandles.consumePromise(c((async()=>{try{await ee(()=>this.view.stationary),s(e.signal),await this._debouncedTileUpdate(e)}finally{this._tilesUpdateIsWaiting=!1}})()))}_getTileFilterFunction(){let{view:e,_featureTilesBounds:t,loadAllTiles:n}=this;if(n){let{loadAllTilesLevel:e}=this;return t=>t.level===e}let i=e=>e.rendered&&e.visible,{featureTiles:a}=e;if(!a)return i;let o=a.tiles.filter(e=>e.measures.visible);return e=>i(e)&&Z(t,e.extent)&&o.some(({lij:t})=>r(t,e.lij)||oe(t,e.lij))}_nextStateForTransition(e){let{_resources:t}=this;if(this._flowRenderer==null||t==null||this._loadingState===`ready-to-load`||this._loadingState===`loading`)return this._loadingState;let n=t.startTime,r=n+F;return e<n?`before-transition`:e<r?`transitioning`:`ready-to-load`}_getStartTime(e){if(!this._animationsEnabled)return Q;let t=this._time;return p(t>e?t:e)}get usedMemory(){return(this._lastResources?.usedMemory??0)+(this._resources?.usedMemory??0)}get test(){}};e([t()],X.prototype,`type`,void 0),e([t()],X.prototype,`renderedTiles`,void 0),e([t()],X.prototype,`_resources`,void 0),e([t()],X.prototype,`_lastResources`,void 0),e([t()],X.prototype,`tilesIntersectDataBounds`,void 0),e([t()],X.prototype,`requireLoad`,void 0),e([t()],X.prototype,`_averageLoadingTime`,void 0),e([t()],X.prototype,`_loadingState`,void 0),e([t()],X.prototype,`emissiveStrength`,void 0),e([t()],X.prototype,`_animationsEnabled`,null),e([t()],X.prototype,`_clippingArea`,null),e([t()],X.prototype,`_dataBounds`,null),e([t()],X.prototype,`suspended`,null),e([t()],X.prototype,`_fullExtentSurfaceSpatialReference`,null),e([t()],X.prototype,`_draped`,null),e([t()],X.prototype,`extent`,null),e([t()],X.prototype,`loadAllTiles`,null),e([t()],X.prototype,`isDataGlobal`,null),e([t()],X.prototype,`loadAllTilesLevel`,null),e([t()],X.prototype,`targetTiles`,null),e([t()],X.prototype,`_featureTilesBounds`,null),e([t()],X.prototype,`_flowRenderer`,null),e([t()],X.prototype,`_materialParameters`,null),e([t()],X.prototype,`_opacity`,null),e([t()],X.prototype,`_seamlessTransitionWaitingTime`,null),e([t()],X.prototype,`_transitionEnabled`,null),e([t()],X.prototype,`_seamlessTransitionEnabled`,null),e([t()],X.prototype,`_tracingResolution`,null),e([t()],X.prototype,`visible`,null),e([t()],X.prototype,`_effectiveDensity`,null),e([t()],X.prototype,`elevationInfo`,null),e([t()],X.prototype,`needsMagnitude`,null),e([t()],X.prototype,`spatialReferenceInfo`,null),e([t()],X.prototype,`loadingState`,null),e([t()],X.prototype,`updating`,null),e([t()],X.prototype,`visibleAtCurrentScale`,null),e([t()],X.prototype,`_materialParametersOverridde`,void 0),e([t()],X.prototype,`_suspendedOverride`,void 0),e([t()],X.prototype,`_simulationSettingsOverride`,void 0),e([t()],X.prototype,`_seamlessTransitionEnabledOverride`,void 0),e([t()],X.prototype,`_simulationSettings`,null),e([t()],X.prototype,`surface`,null),X=e([n(`esri.views.3d.layers.FlowSubView3D`)],X);const de=X,fe=new b({mode:`on-the-ground`});function Z(e,t){return e==null||t==null||ae(e,t)}const pe=g(q,ne.WebMercator),Q=p(-I);function $(e){return e!=null&&e.spatialReference.isWebMercator?e?.intersection(pe):e}export{de as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../core/accessorSupport/decorators.js";import r from"../../../core/Error.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{projectAsync as a}from"../../../geometry/projectionUtils.js";import o from"../../layers/GraphicsLayerView.js";import{elevationAlignPointsInFeatures as s}from"./graphics/elevationAlignPointsInFeatures.js";import{GraphicsProcessor as c}from"./graphics/GraphicsProcessor.js";import{queryForSymbologySnapping as l}from"./graphics/queryForSymbologySnapping.js";import{LayerView3D as u}from"./LayerView3D.js";import{GraphicsProcessorLayerView3D as d}from"./support/GraphicsProcessorLayerView3D.js";let f=class extends d(u(o)){constructor(){super(...arguments),this.type=`graphics-3d`,this._slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null}initialize(){this._set(`processor`,new c({owner:this,scaleVisibilityEnabled:!0,frustumVisibilityEnabled:!0})),this.addResolvingPromise(this.processor.initializePromise),this.addHandles(this.layer.on(`graphic-update`,e=>this.processor.graphicsCore.graphicUpdateHandler(e))),!this.layer.internal&&this.view.
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../core/accessorSupport/decorators.js";import r from"../../../core/Error.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{projectAsync as a}from"../../../geometry/projectionUtils.js";import o from"../../layers/GraphicsLayerView.js";import{elevationAlignPointsInFeatures as s}from"./graphics/elevationAlignPointsInFeatures.js";import{GraphicsProcessor as c}from"./graphics/GraphicsProcessor.js";import{queryForSymbologySnapping as l}from"./graphics/queryForSymbologySnapping.js";import{LayerView3D as u}from"./LayerView3D.js";import{GraphicsProcessorLayerView3D as d}from"./support/GraphicsProcessorLayerView3D.js";let f=class extends d(u(o)){constructor(){super(...arguments),this.type=`graphics-3d`,this._slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null}initialize(){this._set(`processor`,new c({owner:this,scaleVisibilityEnabled:!0,frustumVisibilityEnabled:!0})),this.addResolvingPromise(this.processor.initializePromise),this.addHandles(this.layer.on(`graphic-update`,e=>this.processor.graphicsCore.graphicUpdateHandler(e))),!this.layer.internal&&this.view.state.isLocal&&this.addResolvingPromise((async()=>this.fullExtentInLocalViewSpatialReference=await a(this.layer.fullExtent,this.view.spatialReference).catch(()=>null))())}destroy(){this._set(`processor`,i(this.processor))}get loadedGraphics(){return this.layer.graphics}get legendEnabled(){return this.canResume()&&!this.processor?.frustumVisibilitySuspended}get slicePlaneEnabled(){let e=this.layer.internal;return this._slicePlaneEnabled&&!e}set slicePlaneEnabled(e){this._slicePlaneEnabled=e}getHit(e){return this.processor.getHit(e,null)}computeAttachmentOrigin(e,t){return this.processor?.computeAttachmentOrigin(e,t)}queryGraphics(){return Promise.resolve(this.loadedGraphics)}async elevationAlignPointsInFeatures(e,t){let{processor:n}=this;if(n?.graphics3DGraphics==null)throw new r(`graphicslayerview3d:missing-processor`,`A Graphics3D processor is needed to resolve graphics elevation.`);let{graphics3DGraphics:i}=n;return s(this.view,this.layer,e=>typeof e==`number`?i.get(e):void 0,e,t)}async queryForSymbologySnapping(e,t){return l(this.processor,e,t)}get updatePolicy(){return this.processor?.graphicsCore.effectiveUpdatePolicy??1}isUpdating(){return this.view&&this.layer&&!!(this.processor?.updating||!this.layer.internal&&!this.view.groundView?.ready)}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return this.processor?.graphicsCore?.unprocessedMemoryEstimate??0}get test(){return{graphics3DProcessor:this.processor,loadedGraphics:this.loadedGraphics}}};e([t()],f.prototype,`loadedGraphics`,null),e([t({readOnly:!0})],f.prototype,`legendEnabled`,null),e([t()],f.prototype,`_slicePlaneEnabled`,void 0),e([t({type:Boolean})],f.prototype,`slicePlaneEnabled`,null),f=e([n(`esri.views.3d.layers.GraphicsLayerView3D`)],f);const p=f;export{p as default};
|