@arcgis/core 5.1.0-next.63 → 5.1.0-next.65
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/Camera.d.ts +1 -1
- package/Ground.d.ts +7 -7
- package/PopupTemplate.d.ts +8 -8
- package/WebDocument2D.js +1 -1
- package/WebScene.d.ts +1 -1
- package/WebScene.js +1 -1
- package/analysis/AreaMeasurementAnalysis.d.ts +1 -1
- package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
- package/analysis/LengthDimension.d.ts +4 -4
- package/analysis/ShadowCastAnalysis.d.ts +3 -3
- package/analysis/SliceAnalysis.d.ts +1 -1
- package/analysis/SlicePlane.d.ts +1 -1
- package/applications/Components/featureUtils.d.ts +24 -0
- package/applications/Components/featureUtils.js +1 -1
- package/arcade/geometry/wkt.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{8166ad6bbd7d7a8f91cf.js → 0f3b8a08f843a080af0d.js} +1 -1
- package/assets/esri/core/workers/chunks/{354351ab3fc79dedf9a8.js → 4eca871ca51a59f6540a.js} +1 -1
- package/assets/esri/core/workers/chunks/7e97684e851274efd11f.js +1 -0
- package/assets/esri/core/workers/chunks/86f1aa2c108f5224d8b5.js +1 -0
- package/assets/esri/core/workers/chunks/b8acb6c2538053c01cc6.js +1 -0
- package/assets/esri/core/workers/chunks/d9d69cf2496ebe76eade.js +1 -0
- package/assets/esri/core/workers/chunks/{6c72dbd5275bffde1583.js → e622a23034f055de8b55.js} +1 -1
- package/assets/esri/core/workers/chunks/ec9d5dcf2a0a11c85341.js +1 -0
- package/config.js +1 -1
- package/effects/FocusAreas.d.ts +1 -1
- package/form/elements/FieldElement.d.ts +1 -1
- package/form/elements/GroupElement.d.ts +1 -1
- package/form/elements/TextElement.d.ts +1 -1
- package/form/elements/inputs/ComboBoxInput.d.ts +1 -1
- package/form/elements/inputs/RadioButtonsInput.d.ts +1 -1
- package/form/elements/inputs/SwitchInput.d.ts +1 -1
- package/geometry/Mesh.d.ts +7 -7
- package/geometry/operators/alphaShapeOperator.d.ts +1 -1
- package/geometry/operators/areaOperator.d.ts +1 -1
- package/geometry/operators/bufferOperator.d.ts +1 -1
- package/geometry/operators/centroidOperator.d.ts +1 -1
- package/geometry/operators/clipOperator.d.ts +1 -1
- package/geometry/operators/containsOperator.d.ts +1 -1
- package/geometry/operators/convexHullOperator.d.ts +1 -1
- package/geometry/operators/crossesOperator.d.ts +1 -1
- package/geometry/operators/cutOperator.d.ts +1 -1
- package/geometry/operators/densifyOperator.d.ts +1 -1
- package/geometry/operators/differenceOperator.d.ts +1 -1
- package/geometry/operators/disjointOperator.d.ts +1 -1
- package/geometry/operators/distanceOperator.d.ts +1 -1
- package/geometry/operators/generalizeOperator.d.ts +1 -1
- package/geometry/operators/geodesicProximityOperator.d.ts +1 -1
- package/geometry/operators/geodeticDistanceOperator.d.ts +1 -1
- package/geometry/operators/geodeticUtilsOperator.d.ts +2 -2
- package/geometry/operators/graphicBufferOperator.d.ts +1 -1
- package/geometry/operators/intersectionOperator.d.ts +1 -1
- package/geometry/operators/intersectsOperator.d.ts +1 -1
- package/geometry/operators/isNearOperator.d.ts +1 -1
- package/geometry/operators/lengthOperator.d.ts +1 -1
- package/geometry/operators/locateBetweenOperator.d.ts +1 -1
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +1 -1
- package/geometry/operators/offsetOperator.d.ts +5 -5
- package/geometry/operators/overlapsOperator.d.ts +1 -1
- package/geometry/operators/proximityOperator.d.ts +1 -1
- package/geometry/operators/simplifyOGCOperator.d.ts +1 -1
- package/geometry/operators/simplifyOperator.d.ts +1 -1
- package/geometry/operators/support/Transformation.d.ts +6 -6
- package/geometry/operators/symmetricDifferenceOperator.d.ts +1 -1
- package/geometry/operators/touchesOperator.d.ts +1 -1
- package/geometry/operators/unionOperator.d.ts +1 -1
- package/geometry/operators/withinOperator.d.ts +1 -1
- package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
- package/geometry/support/vcsData.js +2 -0
- package/geometry/support/vcsLookup.js +2 -0
- package/kernel.js +1 -1
- package/layers/BuildingSceneLayer.d.ts +4 -4
- package/layers/CSVLayer.d.ts +2 -2
- package/layers/CatalogLayer.d.ts +2 -2
- package/layers/ElevationLayer.d.ts +1 -1
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/GeoJSONLayer.d.ts +2 -2
- package/layers/GeoRSSLayer.d.ts +1 -1
- package/layers/GraphicsLayer.d.ts +2 -2
- package/layers/ImageryLayer.d.ts +3 -3
- package/layers/ImageryTileLayer.d.ts +2 -2
- package/layers/IntegratedMesh3DTilesLayer.d.ts +6 -6
- package/layers/IntegratedMeshLayer.d.ts +7 -7
- package/layers/MapImageLayer.d.ts +1 -1
- package/layers/MediaLayer.d.ts +1 -1
- package/layers/OGCFeatureLayer.d.ts +2 -2
- package/layers/PointCloudLayer.d.ts +1 -1
- package/layers/SceneLayer.d.ts +9 -9
- package/layers/StreamLayer.d.ts +2 -2
- package/layers/VectorTileLayer.d.ts +2 -2
- package/layers/VideoLayer.d.ts +1 -1
- package/layers/VoxelLayer.d.ts +8 -8
- package/layers/WFSLayer.d.ts +6 -6
- package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/BlendLayer.d.ts +6 -6
- package/layers/pointCloudFilters/PointCloudReturnFilter.d.ts +1 -1
- package/layers/pointCloudFilters/PointCloudValueFilter.d.ts +1 -1
- package/layers/support/DimensionalDefinition.d.ts +2 -2
- package/layers/support/FeatureEffect.d.ts +4 -4
- package/layers/support/FeatureFilter.d.ts +17 -17
- package/layers/support/FeatureReductionBinning.d.ts +1 -1
- package/layers/support/FeatureReductionCluster.d.ts +9 -9
- package/layers/support/FeatureReductionSelection.d.ts +1 -1
- package/layers/support/LabelClass.d.ts +2 -2
- package/layers/support/RasterFunction.d.ts +1 -1
- package/layers/support/SceneFilter.d.ts +2 -2
- package/layers/support/SceneModification.d.ts +3 -3
- package/layers/support/capabilities.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/types.d.ts +6 -0
- package/package.json +1 -1
- package/popup/Feature.d.ts +6 -6
- package/popup/Feature.js +1 -1
- package/popup/Features.d.ts +3 -14
- package/popup/Features.js +1 -1
- package/popup/content/AttachmentsContent.d.ts +1 -1
- package/popup/content/BarChartMediaInfo.d.ts +1 -1
- package/popup/content/ColumnChartMediaInfo.d.ts +1 -1
- package/popup/content/FieldsContent.d.ts +1 -1
- package/popup/content/ImageMediaInfo.d.ts +1 -1
- package/popup/content/LineChartMediaInfo.d.ts +1 -1
- package/popup/content/MediaContent.d.ts +1 -1
- package/popup/content/PieChartMediaInfo.d.ts +1 -1
- package/popup/content/RelationshipContent.d.ts +1 -1
- package/popup/content/TextContent.d.ts +1 -1
- package/popup/support/featureUtils.js +1 -1
- package/popup/types.d.ts +193 -8
- package/portal/schemas/definitions.js +1 -1
- package/renderers/ClassBreaksRenderer.d.ts +1 -1
- package/renderers/DictionaryRenderer.d.ts +1 -1
- package/renderers/DotDensityRenderer.d.ts +3 -3
- package/renderers/FlowRenderer.d.ts +5 -5
- package/renderers/HeatmapRenderer.d.ts +3 -3
- package/renderers/PieChartRenderer.d.ts +1 -1
- package/renderers/RasterShadedReliefRenderer.d.ts +1 -1
- package/renderers/Renderer.d.ts +4 -4
- package/renderers/SimpleRenderer.d.ts +2 -2
- package/renderers/UniqueValueRenderer.d.ts +2 -2
- package/renderers/VectorFieldRenderer.d.ts +1 -1
- package/renderers/mixins/VisualVariablesMixin.d.ts +12 -12
- package/renderers/visualVariables/ColorVariable.d.ts +1 -1
- package/renderers/visualVariables/OpacityVariable.d.ts +1 -1
- package/renderers/visualVariables/RotationVariable.d.ts +1 -1
- package/renderers/visualVariables/SizeVariable.d.ts +1 -1
- package/renderers/visualVariables/VisualVariable.d.ts +1 -1
- package/rest/query/support/AttachmentInfo.d.ts +1 -1
- package/rest/support/AttributeBinsQuery.d.ts +8 -8
- package/rest/support/AutoIntervalBinParameters.d.ts +1 -1
- package/rest/support/DateBinParameters.d.ts +1 -1
- package/rest/support/FixedBoundariesBinParameters.d.ts +1 -1
- package/rest/support/FixedIntervalBinParameters.d.ts +1 -1
- package/rest/support/Query.d.ts +8 -8
- package/rest/support/TopFeaturesQuery.d.ts +8 -8
- package/smartMapping/labels/clusters.d.ts +1 -1
- package/smartMapping/popup/clusters.d.ts +2 -2
- package/smartMapping/popup/templates.d.ts +1 -1
- package/smartMapping/raster/renderers/flow.d.ts +2 -2
- package/smartMapping/renderers/color.d.ts +12 -12
- package/smartMapping/renderers/predominance.d.ts +3 -3
- package/smartMapping/renderers/relationship.d.ts +15 -15
- package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
- package/smartMapping/symbology/color.d.ts +4 -4
- package/smartMapping/symbology/flow.d.ts +2 -2
- package/smartMapping/symbology/types.d.ts +18 -18
- package/support/actions/ActionButton.d.ts +1 -1
- package/support/revision.js +1 -1
- package/symbols/CIMSymbol.d.ts +1 -1
- package/symbols/ExtrudeSymbol3DLayer.d.ts +1 -1
- package/symbols/FillSymbol3DLayer.d.ts +3 -3
- package/symbols/IconSymbol3DLayer.d.ts +1 -1
- package/symbols/LabelSymbol3D.d.ts +2 -2
- package/symbols/LineStyleMarker3D.d.ts +7 -7
- package/symbols/LineSymbol3D.d.ts +2 -2
- package/symbols/LineSymbol3DLayer.d.ts +7 -7
- package/symbols/LineSymbolMarker.d.ts +6 -6
- package/symbols/MarkerSymbol.d.ts +1 -1
- package/symbols/MeshSymbol3D.d.ts +2 -2
- package/symbols/ObjectSymbol3DLayer.d.ts +1 -1
- package/symbols/PathSymbol3DLayer.d.ts +14 -14
- package/symbols/PictureFillSymbol.d.ts +1 -1
- package/symbols/PictureMarkerSymbol.d.ts +1 -1
- package/symbols/PointSymbol3D.d.ts +3 -3
- package/symbols/PolygonSymbol3D.d.ts +5 -5
- package/symbols/SimpleFillSymbol.d.ts +8 -8
- package/symbols/SimpleLineSymbol.d.ts +20 -20
- package/symbols/SimpleMarkerSymbol.d.ts +7 -7
- package/symbols/Symbol3DLayer.d.ts +16 -16
- package/symbols/TextSymbol.d.ts +1 -1
- package/symbols/TextSymbol3DLayer.d.ts +1 -1
- package/symbols/WaterSymbol3DLayer.d.ts +3 -3
- package/symbols/WebStyleSymbol.d.ts +12 -12
- package/symbols/callouts/Callout3D.d.ts +1 -1
- package/symbols/callouts/LineCallout3D.d.ts +3 -3
- package/symbols/cim/types.d.ts +23 -23
- package/symbols/edges/Edges3D.d.ts +1 -1
- package/symbols/edges/SolidEdges3D.d.ts +1 -1
- package/symbols/patterns/LineStylePattern3D.d.ts +11 -11
- package/symbols/patterns/StylePattern3D.d.ts +8 -8
- package/symbols/support/ElevationInfo.d.ts +2 -2
- package/symbols/support/IconSymbol3DLayerResource.d.ts +6 -6
- package/symbols/support/ObjectSymbol3DLayerResource.d.ts +7 -7
- package/symbols/support/Symbol3DEmissive.d.ts +2 -2
- package/symbols/support/Symbol3DVerticalOffset.d.ts +2 -2
- package/views/2d/engine/flow/FlowStrategy.js +1 -1
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/flow/styles/Particles.js +1 -1
- package/views/2d/engine/flow/styles/Stack.js +1 -1
- package/views/2d/engine/flow/styles/Streamlines.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.d.ts +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/types.d.ts +3 -3
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/environment/CloudyWeather.d.ts +1 -1
- package/views/3d/environment/Environment.d.ts +4 -4
- package/views/3d/environment/FoggyWeather.d.ts +1 -1
- package/views/3d/environment/RainyWeather.d.ts +1 -1
- package/views/3d/environment/SnowyWeather.d.ts +1 -1
- package/views/3d/environment/SunLighting.d.ts +1 -1
- package/views/3d/environment/SunnyWeather.d.ts +1 -1
- package/views/3d/environment/VirtualLighting.d.ts +1 -1
- package/views/3d/layers/graphics/extrudeUtils.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/webgl/RenderNode.d.ts +2 -2
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl.d.ts +1 -1
- package/views/Magnifier.d.ts +3 -3
- package/views/MapView.d.ts +7 -7
- package/views/SceneView.d.ts +16 -16
- package/views/View.d.ts +17 -3
- package/views/View.js +1 -1
- package/views/interactive/sketch/SketchLabelOptions.d.ts +1 -1
- package/views/interactive/sketch/SketchTooltipOptions.d.ts +1 -1
- package/views/interactive/snapping/SnappingOptions.d.ts +7 -7
- package/views/layers/LineOfSightLayerView.d.ts +3 -2
- package/views/support/HighlightOptions.d.ts +1 -1
- package/views/types.d.ts +59 -2
- package/views/ui/DefaultUI.d.ts +2 -2
- package/webscene/Environment.d.ts +10 -10
- package/webscene/Glow.d.ts +1 -1
- package/webscene/background/ColorBackground.d.ts +1 -1
- package/widgets/AreaMeasurement2D.d.ts +1 -1
- package/widgets/AreaMeasurement3D.d.ts +2 -2
- package/widgets/Attachments.d.ts +1 -1
- package/widgets/Attribution.d.ts +1 -1
- package/widgets/BasemapGallery.d.ts +1 -1
- package/widgets/BasemapLayerList.d.ts +3 -3
- package/widgets/BasemapToggle.d.ts +1 -1
- package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +1 -1
- package/widgets/Bookmarks.d.ts +2 -2
- package/widgets/BuildingExplorer.d.ts +1 -1
- package/widgets/CatalogLayerList.d.ts +3 -3
- package/widgets/Compass.d.ts +2 -2
- package/widgets/CoordinateConversion.d.ts +1 -1
- package/widgets/Daylight.d.ts +5 -5
- package/widgets/DirectLineMeasurement3D.d.ts +2 -2
- package/widgets/Directions.d.ts +4 -4
- package/widgets/DistanceMeasurement2D.d.ts +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.d.ts +1 -1
- package/widgets/Editor.d.ts +8 -8
- package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +1 -1
- package/widgets/ElevationProfile.d.ts +3 -3
- package/widgets/Expand.d.ts +1 -1
- package/widgets/FeatureForm.d.ts +1 -1
- package/widgets/FeatureTable/ActionColumn.d.ts +2 -2
- package/widgets/FeatureTable/AttachmentsColumn.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +3 -3
- package/widgets/FeatureTable/Grid/GroupColumn.d.ts +1 -1
- package/widgets/FeatureTable/RelationshipColumn.d.ts +1 -1
- package/widgets/FeatureTable/VisibleElements.d.ts +1 -1
- package/widgets/FeatureTable.d.ts +10 -10
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +5 -5
- package/widgets/FeatureTemplates.d.ts +8 -8
- package/widgets/Features/FeaturesViewModel.d.ts +2 -2
- package/widgets/Features/FeaturesVisibleElements.d.ts +2 -2
- package/widgets/Features.d.ts +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/FloorFilter.d.ts +2 -2
- package/widgets/Histogram.d.ts +2 -2
- package/widgets/HistogramRangeSlider.d.ts +1 -1
- package/widgets/Home.d.ts +1 -1
- package/widgets/LayerList/ListItemPanel.d.ts +1 -1
- package/widgets/LayerList.d.ts +4 -4
- package/widgets/Legend.d.ts +8 -8
- package/widgets/LineOfSight.d.ts +1 -1
- package/widgets/Locate.d.ts +2 -2
- package/widgets/Measurement.d.ts +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
- package/widgets/NavigationToggle.d.ts +3 -3
- package/widgets/Popup/PopupVisibleElements.d.ts +2 -2
- package/widgets/Popup.d.ts +5 -5
- package/widgets/Print/CustomTemplate.d.ts +1 -1
- package/widgets/Print/TemplateOptions.d.ts +4 -4
- package/widgets/ScaleRangeSlider.d.ts +1 -1
- package/widgets/Search/SearchViewModel.d.ts +4 -4
- package/widgets/Search.d.ts +5 -5
- package/widgets/ShadowCast.d.ts +3 -3
- package/widgets/Sketch/SketchViewModel.d.ts +39 -39
- package/widgets/Sketch.d.ts +43 -43
- package/widgets/Slice.d.ts +2 -2
- package/widgets/Slider/SliderViewModel.d.ts +2 -2
- package/widgets/Slider.d.ts +9 -9
- package/widgets/Swipe/SwipeViewModel.d.ts +1 -1
- package/widgets/Swipe.d.ts +2 -2
- package/widgets/TableList/ListItemPanel.d.ts +1 -1
- package/widgets/TableList.d.ts +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +10 -10
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/TimeSlider/types.d.ts +1 -1
- package/widgets/TimeSlider.d.ts +13 -13
- package/widgets/Track.d.ts +2 -2
- package/widgets/UtilityNetworkAssociations.d.ts +3 -3
- package/widgets/UtilityNetworkTrace.d.ts +4 -4
- package/widgets/UtilityNetworkValidateTopology.d.ts +1 -1
- package/widgets/ValuePicker.d.ts +5 -5
- package/widgets/VideoPlayer.d.ts +1 -1
- package/widgets/smartMapping/ClassedColorSlider.d.ts +1 -1
- package/widgets/smartMapping/ClassedSizeSlider.d.ts +1 -1
- package/widgets/smartMapping/ColorSizeSlider.d.ts +2 -2
- package/widgets/smartMapping/ColorSlider.d.ts +1 -1
- package/widgets/smartMapping/HeatmapSlider.d.ts +1 -1
- package/widgets/smartMapping/OpacitySlider.d.ts +1 -1
- package/widgets/smartMapping/SizeSlider.d.ts +1 -1
- package/widgets/smartMapping/SmartMappingSliderBase.d.ts +4 -4
- package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +6 -6
- package/widgets/support/GridControls.d.ts +1 -1
- package/widgets/support/SnappingControls/VisibleElements.d.ts +1 -1
- package/widgets/support/SnappingControls.d.ts +6 -6
- package/assets/esri/core/workers/chunks/2aaeaf022af8493281dc.js +0 -1
- package/assets/esri/core/workers/chunks/2d92ba11781a3cfc3a78.js +0 -1
- package/assets/esri/core/workers/chunks/5c6e5f22450dd0583074.js +0 -1
- package/assets/esri/core/workers/chunks/75f7c1f600c4051bc905.js +0 -1
- package/assets/esri/core/workers/chunks/ee8cd91c27e9cdfc3b2e.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{equals as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{equals as r}from"../../core/arrayUtils.js";import o from"../../core/Collection.js";import s from"../../core/Error.js";import i from"../../core/Logger.js";import{mapCollection as n}from"../../core/mapCollectionUtils.js";import{watch as a,initial as l}from"../../core/reactiveUtils.js";import{convertToSpatialReferenceUnit as c,convertFromSpatialReferenceUnit as m}from"../../core/units.js";import{property as p,subclass as u}from"../../core/accessorSupport/decorators.js";import{create as d}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as h}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as f}from"../../core/support/UpdatingHandles.js";import{getReferenceEllipsoid as g}from"../../geometry/ellipsoidUtils.js";import y from"../../geometry/Point.js";import{project as w}from"../../geometry/projectionUtils.js";import{execute as v}from"../../geometry/operators/gx/operatorDensify.js";import{fromPolygon as j,toPolygon as _}from"../../geometry/operators/support/apiConverter.js";import{computeTranslationToOriginAndRotation as A}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{earth as x}from"../../geometry/support/Ellipsoid.js";import{t as R}from"../../chunks/vec3.js";import{ElevationContext as M}from"./layers/graphics/ElevationContext.js";import{extrudePolygon as N}from"./layers/graphics/extrudeUtils.js";import{computeCentroid as b}from"./layers/graphics/graphicUtils.js";import{polygonToRenderInfoElevationAligned as U}from"./support/renderInfoUtils/polygon.js";import{FocusAreaColorNode as C}from"./webgl-engine/effects/focusArea/FocusAreaColorNode.js";import{FocusAreaMaskNode as H}from"./webgl-engine/effects/focusArea/FocusAreaMaskNode.js";import{FocusAreaOutlineItem as V}from"./webgl-engine/effects/focusArea/FocusAreaOutlineItem.js";const k=2e4;let O=class extends t{get updating(){return this._updatingHandles.updating||!!this._outlineMap?.some(e=>e.updating)}constructor(e){super(e),this._updatingHandles=new f,this._elevationContext=new M,this._previousVolumes=new Map,this._outlineMap=new o}initialize(){this.addHandles([a(()=>({volumes:this.volumes,ready:this.view.groundView?.ready}),({volumes:e,ready:t})=>{this._previousVolumes=e,t&&(0!==e.size&&this._maskRenderNode?.updateGeometries(),this._ensureRenderNodes())},l)]),this._outlineMap=n(()=>this.areas?.areas,e=>new V({area:e,view:this.view}),{recycleItems:!0})}destroy(){this.removeAllHandles(),this._outlineMap.destroy(),this._updatingHandles.destroy()}get areas(){return this.view.map?.focusAreas}get enabledAreas(){return this.areas?.areas.toArray().filter(({enabled:e})=>e)??[]}get style(){return this.areas?.style??"bright"}get polygons(){return this.enabledAreas.reduce((e,t)=>e.concat(t.geometries.toArray()),new Array)}containsGeometry(e){if(0===this.polygons.length)return!0;const t=new y(e);return this.polygons.some(e=>e.contains(t))}get volumes(){const e=this.polygons,t=this._previousVolumes;if(!this.view.renderCoordsHelper||r(Array.from(t?.keys()??[]),e))return t??new Map;const o=this.view.renderCoordsHelper,n=h(),a=1===o.viewingMode,l=d(),p=d(),u=this.view.spatialReference,f=g(u).radius/x.radius,y=c(5e5*f,"meters",u,!0);a||o.worldUpAtPosition([0,0,0],n);const M=new Map;for(const r of e){const e=t?.get(r);if(e)M.set(r,e);else try{const e=u.equals(r.spatialReference)?r:w(r,u),t=Math.max(e.extent.width,e.extent.height),s=m(t,u,"meters",!0),i=Math.max(5*s,k*f),c=a?f/10:f,d=this._reduceGeometryHeight(e,i,c),h=b(d);if(null==h)continue;const g=j(d),x=v(g,y,0,0),C=_(x,u);if(null==C)continue;const H=U(C,this.view.elevationProvider,o,this._elevationContext,{outlineOutput:"tessellated-indices"});if(null==H||0===H.polygonIndexCount)continue;A(u,[h.x,h.y,0],l,o.spatialReference),p[12]=-l[12],p[13]=-l[13],p[14]=-l[14];const V=N(H,{height:i,worldUp:n,spherical:a,requireElevation:!1,requireNormals:!1,requireSizes:!1});if(null==V)continue;R(V.vertices,V.vertices,p);const O=new E(V.vertices,V.bottomIndices,V.indices,i),F=new q(O,[l[12],l[13],l[14]]);M.set(r,F)}catch(C){i.getLogger(this).error(new s("focusareasview:projection-failed","Failed to project focus area geometry to view spatial reference",{geometry:r,error:C}))}}return M}_ensureRenderNodes(){if(this.view.stage)if(0===this.volumes.size){const{_maskRenderNode:e,_colorRenderNode:t}=this;this._maskRenderNode=this._colorRenderNode=null,t?.fadeOut(()=>{e?.destroy(),t?.destroy()})}else this._maskRenderNode??=new H({focusAreasView:this}),this._colorRenderNode??=new C({focusAreasView:this}),this.view.stage.renderView.requestRender()}_reduceGeometryHeight(e,t,r){const o=-12e5*r,s=Math.max(-t/2,o),i=e.rings.map(e=>e.map(e=>[e[0],e[1],s])),n=e.clone();return n.rings=i,n.hasZ=!0,n}};e([p()],O.prototype,"updating",null),e([p({readOnly:!0})],O.prototype,"volumes",null),e([p({constructOnly:!0})],O.prototype,"view",void 0),O=e([u("esri.views.3d.FocusAreasView")],O);class q{constructor(e,t){this.geometryVolume=e,this.origin=t}}class E{constructor(e,t,r,o){this.positions=e,this.indicesBottom=t,this.indicesExtruded=r,this.height=o}}export{O as FocusAreasView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import i from"../../../../analysis/SlicePlane.js";import e from"../../../../core/Logger.js";import{rad2deg as t,deg2rad as n}from"../../../../core/mathUtils.js";import{castRenderScreenPointArray3 as o}from"../../../../core/screenUtils.js";import{fromZRotation as r,scale as s,multiply as a,rotateZ as c,rotateX as l}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{length as u,set as d,add as g,scale as m,copy as p,subtract as f,dot as b,normalize as h,cross as j,squaredLength as w,sub as
|
|
2
|
+
import i from"../../../../analysis/SlicePlane.js";import e from"../../../../core/Logger.js";import{rad2deg as t,deg2rad as n}from"../../../../core/mathUtils.js";import{castRenderScreenPointArray3 as o}from"../../../../core/screenUtils.js";import{fromZRotation as r,scale as s,multiply as a,rotateZ as c,rotateX as l}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{length as u,set as d,add as g,scale as m,copy as p,subtract as f,dot as b,normalize as h,cross as j,squaredLength as w,negate as v,sub as P}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{clone as M,create as U}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import y from"../../../../geometry/Extent.js";import R from"../../../../geometry/Point.js";import{tryProject as x}from"../../../../geometry/projectionUtils.js";import{d as S,r as T,n as A,u as C,f as k,i as L}from"../../../../chunks/boundedPlane.js";import{fromPositionAndNormal as E,fromVectorsAndPoint as H}from"../../../../geometry/support/plane.js";import{create as I}from"../../../../geometry/support/ray.js";import{angleAroundAxis as z}from"../../../../geometry/support/vector.js";import{sv3d as F,sm4d as W}from"../../../../geometry/support/vectorStacks.js";import{planeColor as B,getGridColor as D,getOutlineColor as O}from"./settings.js";import{resizeHandleEdgePaddingFrac as V,planeOutlineWidth as $,planeMinBasisScreenLen2 as q,initialPlaneHalfSizeViewProportion as G,shiftRestartOffsetDistance as J,smallAngleDotThreshold as K,verticalDotThreshold as N}from"./sliceToolConfig.js";import{applyProjectionAndElevationAlignment as Q}from"../support/projectionUtils.js";import{calculateTranslateRotateFromBases as X}from"../../interactive/manipulatorUtils.js";import{LineVisualElement as Y}from"../../interactive/visualElements/LineVisualElement.js";import{SlicePlaneVisualElement as Z}from"../../interactive/visualElements/SlicePlaneVisualElement.js";import{RenderCoordsHelper as _}from"../../support/RenderCoordsHelper.js";import{fromRender as ii}from"../../support/geometryUtils/ray.js";function ei(i,e,t,n,o,r,s,a){return ni(e,s.worldUpAtPosition(i,F.get()),o,r,a.basis1,a.basis2),m(a.basis1,a.basis1,t),m(a.basis2,a.basis2,n),p(a.origin,i),H(a.basis2,a.basis1,a.origin,a.plane),a}const ti=U();function ni(i,e,t,n,o,r){const s=b(i,e),a=F.get(),c=F.get();switch(0===n?Math.abs(s)>N?1:2:n){case 2:{const n=Math.abs(s)<=K?i:v(ti,t.viewUp);j(a,e,n),p(c,e);break}case 1:j(a,t.viewUp,e),j(c,e,a);break;case 3:{const n=Math.abs(s)<=K?e:t.viewUp;j(a,n,i),j(c,i,a);break}}const l=j(F.get(),a,c);b(l,t.viewForward)>0&&m(c,c,-1),h(o,a),h(r,c)}function oi(i,e,t){const n=e.worldUpAtPosition(i.origin,F.get()),o=i.basis1,r=yi(i,n),s=Math.round(r/Li)*Li;return T(i,s-r,o,t)}function ri(i,e,t,n,o,r){const s=p(F.get(),o.origin);g(s,s,m(F.get(),o.basis1,i.direction[0]<0?1:-1)),g(s,s,m(F.get(),o.basis2,i.direction[1]<0?1:-1));const a=u(o.basis1),c=u(o.basis2),l=f(F.get(),t,s),d=f(F.get(),e,s);let h=0,j=0;if(wi(i)){const e=ji(o),t=ji(r);h=a-.5*i.direction[0]*b(o.basis1,d)/a,j=c-.5*i.direction[1]*b(o.basis2,d)/c;const n=t/e;h*=n,j*=n}const w=h+.5*i.direction[0]*b(o.basis1,l)/a,v=j+.5*i.direction[1]*b(o.basis2,l)/c,P=m(F.get(),o.basis1,w/a),M=m(F.get(),o.basis2,v/c);(w<=0||bi(r.origin,P,n)<=q)&&p(P,r.basis1),(v<=0||bi(r.origin,M,n)<=q)&&p(M,r.basis2);const U=p(F.get(),s);return g(U,U,m(F.get(),P,i.direction[0]<0?-1:1)),g(U,U,m(F.get(),M,i.direction[1]<0?-1:1)),k(U,P,M,r)}function si(i,e){return G*Math.min(e.width,e.height)*e.computeRenderPixelSizeAt(i)}function ai(i,e,t,n){const o=j(F.get(),e,t);return j(o,o,e),E(i,o,n)}function ci(i,e){return X(i.basis1,i.basis2,i.origin,e)}function li(i,e,t,n){const o=e.worldUpAtPosition(i.origin,F.get()),r=F.get();switch(t){case 1:p(r,o);break;case 2:p(r,i.basis1)}return E(i.origin,r,n)}function ui(i,e,t,n){const r=fi(t,2),s=W.get();c(s,e,r.edge*Math.PI/2);const a=h(F.get(),r.basis);let l=m(F.get(),a,r.direction*n.computeScreenPixelSizeAt(r.position)*J);g(l,l,r.position);const u=n.projectToRenderScreen(l,o(F.get())),d=di(n,u);ii(n,u,ki),h(ki.direction,ki.direction);const p=F.get();!d&&L(t,ki,p)&&(l=p),s[12]=0,s[13]=0,s[14]=0,i.modelTransform=s,i.renderLocation=M(l),d?i.state|=Ci:i.state&=~Ci}function di(i,e){if(null==e)return!1;const[t,n,o,r]=i.viewport,s=Math.min(o,r)/16;let a=!0;return e[0]<t+s?(e[0]=t+s,a=!1):e[0]>t+o-s&&(e[0]=t+o-s,a=!1),e[1]<n+s?(e[1]=n+s,a=!1):e[1]>n+r-s&&(e[1]=n+r-s,a=!1),a}function gi(i,e,t,n){const o=u(n.basis1),c=u(n.basis2),l=hi(n),p=ji(n),f=d(F.get(),0,0,0);g(f,m(F.get(),n.basis1,e.direction[0]),m(F.get(),n.basis2,e.direction[1])),g(f,n.origin,f);let b=0,h=1;if(wi(e))1===e.direction[0]&&-1===e.direction[1]?b=Li:1===e.direction[0]&&1===e.direction[1]?b=Math.PI:-1===e.direction[0]&&1===e.direction[1]&&(b=3*Math.PI/2),h=p;else{const i=0!==e.direction[0]?1:2;b=1===i?Li:0,h=(1===i?c:o)-l}const j=r(W.get(),b);s(j,j,d(F.get(),h,h,h)),a(j,t,j),j[12]=0,j[13]=0,j[14]=0,i.modelTransform=j,i.renderLocation=f}function mi(i,e,t,n){const o=n.worldUpAtPosition(t.origin,F.get()),s=fi(t,0),c=r(W.get(),s.edge*Math.PI/2);l(c,c,-yi(t,o)),a(c,e,c),c[12]=0,c[13]=0,c[14]=0,i.modelTransform=c,i.renderLocation=s.position}function pi(i,e,t){const n=fi(t,1),o=r(W.get(),n.edge*Math.PI/2);l(o,o,Li),a(o,e,o),o[12]=0,o[13]=0,o[14]=0,i.modelTransform=o,i.renderLocation=n.position}function fi(i,e){switch(e){case 0:return{basis:i.basis1,direction:1,position:g(F.get(),i.origin,i.basis1),edge:e};case 1:return{basis:i.basis2,direction:1,position:g(F.get(),i.origin,i.basis2),edge:e};case 2:return{basis:i.basis1,direction:-1,position:f(F.get(),i.origin,i.basis1),edge:e};case 3:return{basis:i.basis2,direction:-1,position:f(F.get(),i.origin,i.basis2),edge:e}}}function bi(i,e,t){const n=t.projectToRenderScreen(g(F.get(),i,e),o(F.get())),r=t.projectToRenderScreen(f(F.get(),i,e),o(F.get()));return n&&r?w(f(n,n,r)):0}function hi(i){const e=u(i.basis1),t=u(i.basis2);return V*Math.min(e,t)}function ji(i){return hi(i)}function wi(i){return 0!==i.direction[0]&&0!==i.direction[1]}function vi(i){const e=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0],[-1,-1,0]];return new Y({view:i,attached:!1,color:O(i.effectiveTheme),width:$,renderOccluded:4,geometry:[e],isDecoration:!0})}function Pi(i){return new Z({view:i,attached:!1,backgroundColor:B,gridColor:D(i.effectiveTheme),gridWidth:4,renderOccluded:4,isDecoration:!0})}function Mi(e,n,o,r=new i){if(null==e)return null;const{renderCoordsHelper:s}=n,a=s.fromRenderCoords(e.origin,new R({spatialReference:n.spatialReference}));if(null==a)return null;const c=x(a,o);if(null==c)return null;r.position=c;const l=2*u(e.basis1),d=2*u(e.basis2),g=_.renderUnitScaleFactor(n.spatialReference,o);r.width=l*g,r.height=d*g;const m=s.worldUpAtPosition(e.origin,F.get());return r.tilt=t(yi(e,m)),r.heading=s.headingAtPosition(e.origin,e.basis1)-90,r}function Ui(i,e,t){if(null==i)return null;const n=i.origin,o=F.get(),r=F.get(),s=F.get(),a=F.get();let c,l,u,d,m,p;g(o,n,i.basis1),g(o,o,i.basis2),g(r,n,i.basis1),P(r,r,i.basis2),P(s,n,i.basis1),P(s,s,i.basis2),P(a,n,i.basis1),g(a,a,i.basis2);for(const g of[o,r,s,a]){const i=e.fromRenderCoords(g,g,t);if(null==i)return null;c=null==c?i[0]:Math.min(c,i[0]),l=null==l?i[0]:Math.max(l,i[0]),u=null==u?i[1]:Math.min(u,i[1]),d=null==d?i[1]:Math.max(d,i[1]),m=null==m?i[2]:Math.min(m,i[2]),p=null==p?i[2]:Math.max(p,i[2])}return new y({xmin:c,xmax:l,ymin:u,ymax:d,zmin:m,zmax:p,spatialReference:t})}function yi(i,e){return z(e,i.basis2,i.basis1)+Li}function Ri(i,t,o,r,s,a,c=S()){return a.toRenderCoords(i,c.origin)?(a.worldBasisAtPosition(c.origin,0,c.basis1),a.worldBasisAtPosition(c.origin,1,c.basis2),H(c.basis2,c.basis1,c.origin,c.plane),T(c,-n(t),A(c),c),T(c,n(o),c.basis1,c),m(c.basis1,c.basis1,r/2),m(c.basis2,c.basis2,s/2),C(c),c):(e.getLogger("esri.views.3d.analysis.Slice.sliceToolUtils").error(`Failed to project slice plane position, projection from ${i.spatialReference.wkid} is not supported`),null)}function xi(i,e){if(null==i?.position)return null;const t=Q(i.position,e.spatialReference,e.elevationProvider);if(null==t)return null;const n=_.renderUnitScaleFactor(i.position.spatialReference,e.spatialReference),o=i.width*n,r=i.height*n;return{position:t,heading:i.heading,tilt:i.tilt,renderWidth:o,renderHeight:r}}function Si(i,e,t,n=S()){const o=xi(i,e);return null==o?null:Ti(o,e,t,n)}function Ti(i,e,t,n=S()){if(null==i)return null;const o=Ri(i.position,i.heading,i.tilt,i.renderWidth,i.renderHeight,e.renderCoordsHelper,n);return t.tiltEnabled||null==o||oi(o,e.renderCoordsHelper,o),o}const Ai=16,Ci=32,ki=I(),Li=Math.PI/2,Ei=16,Hi=32;function Ii(i){return null!=("building-scene-3d"===i.type?i:null)}export{Ai as DidPointerMoveRecentlyFlag,Ci as IsShiftEdgeOnScreenFlag,ci as calculateBoundedPlaneTranslateRotate,ji as calculateDiagonalResizeHandleScale,si as calculatePlaneHalfSize,Pi as createGridVisualElement,vi as createOutlineVisualElement,ei as createPlane,li as createRotatePlane,ai as createShiftPlane,oi as forceHorizontalOrVertical,Ii as isBuildingSceneLayerView3D,wi as isDiagonalResizeHandle,ni as normalToBases,Ui as planeToExtent,Mi as planeToShape,xi as projectAndElevationAlignShape,Ti as projectedShapeToPlane,Ei as resizeNormal,Hi as resizeOutlineOnly,ri as resizePlane,Si as shapeToPlane,gi as updateResizeHandle,mi as updateRotateHeadingHandle,pi as updateRotateTiltHandle,ui as updateShiftRestartHandle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{volumeMeasurementConfiguration as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{debounce as i}from"../../../../core/promiseUtils.js";import{createVolume as n}from"../../../../core/quantity.js";import{whenOnce as s,watch as a,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as u,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{e as m}from"../../../../chunks/earcut.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{scaleAndAdd as d,sqrDist as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as g,clone as f,create as y}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as _}from"../../../../core/support/UpdatingHandles.js";import v from"../../../../geometry/Multipoint.js";import{projectOrLoad as w}from"../../../../geometry/projectionUtils.js";import{e as j}from"../../../../chunks/containsOperator.js";import{e as R}from"../../../../chunks/convexHullOperator.js";import{e as b}from"../../../../chunks/simplifyOperator.js";import{e as E}from"../../../../chunks/unionOperator.js";import{computeTranslationToOriginAndRotation as C}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as x}from"../../../../geometry/projection/projectBoundingRect.js";import{fromExtent as T,intersects as G,create as L,empty as O}from"../../../../geometry/support/aaBoundingRect.js";import{newDoubleArray as D}from"../../../../geometry/support/DoubleArray.js";import{t as I}from"../../../../chunks/vec3.js";import H from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as M}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as P}from"./VolumeMeasurementCutFillComputation.js";import{VolumeMeasurementInsufficientDataError as V,VolumeMeasurementPerimeterTooLargeError as U,VolumeMeasurementUnsupportedCoordinateSystemError as N,VolumeMeasurementUnsupportedLayerTransparencyError as k}from"./volumeMeasurementErrors.js";import{VolumeMeasurementRawResult as A}from"./VolumeMeasurementRawResult.js";import S from"./VolumeMeasurementResult.js";import{ElevationContext as F}from"../../layers/graphics/ElevationContext.js";import{getElevationAtPoint as W}from"../../support/ElevationProvider.js";import{polygonToRenderInfo as z}from"../../support/renderInfoUtils/polygonDeprecated.js";import{IteratorPreorder as q}from"../../terrain/tileUtils.js";import{CutFillComputationRenderNode as B,TargetGeometryRenderInfo as Z}from"../../webgl-engine/lib/CutFillComputationRenderNode.js";import{isIntegratedMeshLayerView as J}from"../../../support/layerViewUtils.js";import{MeasurementWorkerHandle as K}from"../../../support/MeasurementWorkerHandle.js";let Q=class extends r{constructor(e){super(e),this._measurementWorkerHandle=new K,this._getElevationProvider=()=>this.view.elevationProvider,this.depthExtremaPositions=null,this._updatingHandles=new _,this._rawResult=null,this._sufficientDataCoverage=!0,this._tileIterator=new q,this._intersectingObbs=[],this._intersectingTiles=[],this._debouncedUpdate=i(async(e,t,r,o)=>{if(!this._computationRenderNode.done)return;const{renderCoordsHelper:i}=this.view,n=new P({extent:t,localOrigin:r,renderCoordsHelper:i});this._computationRenderNode.update(n,o),this._determineDataCoverage(n);const[a]=await Promise.allSettled([this._measurementWorkerHandle.areaHorizontal(e,{returnLength:!0}),s(()=>this._computationRenderNode.done).then(()=>{this._updateDepthExtremaPositions(n,this._computationRenderNode.getResult())})]);if(this.error)return void(this._rawResult=null);const l=this._computationRenderNode.getResult();this._updateResult(n,l,"fulfilled"===a.status?a.value:null)}),this._determineDataCoverage=e=>{const{elevationAlignedGeometry:t}=this,{frustum:r}=this._computationRenderNode,{cameraDimensions:o}=e;t&&r&&(this._intersectingObbs.length=0,this._imLayerViewsAffectingMeasurement.forEach(e=>{this._findIntersectingObbs(e,r)}),this._intersectingObbs.length?this._sufficientDataCoverage=this._sufficientIntegratedMeshCoverage(t,o):(this._findIntersectingTerrainTiles(t),this._sufficientDataCoverage=this._sufficientTerrainCoverage(o)))}}initialize(){const e=this.view;this._computationRenderNode=new B({view:e}),this.addHandles([this._createElevationUpdateHandle(),a(()=>({projectedGeometry:this._projectedGeometry,localOrigin:this._localOrigin,targetGeometryRenderInfos:this._targetGeometryRenderInfos}),({projectedGeometry:e,localOrigin:t,targetGeometryRenderInfos:r})=>{const o=e?.extent;if(!(e&&o&&t&&r))return this._rawResult=null,void(this._sufficientDataCoverage=!0);this._updatingHandles.consumePromise(this._debouncedUpdate(e,o,t,r))},l)])}destroy(){this._updatingHandles.destroy(),this._computationRenderNode.destroy(),this._measurementWorkerHandle.destroy()}get _projectedGeometry(){const e=this.analysis.geometry;if(!e||!this.analysis.valid)return null;const t=b(e),r=w(t,this.view.spatialReference);return r.pending?(this._updatingHandles.consumePromise(r.pending),null):(t&&!r.geometry&&M(this.analysis,e.spatialReference,o.getLogger(this)),r.geometry)}get _localOrigin(){const e=this._projectedGeometry?.extent;return e?g(e.center.x,e.center.y,0):null}get elevationAlignedGeometry(){const e=this._projectedGeometry;if(!e)return null;const t=e.clone();return X(this._getElevationProvider(),t),t}get targetGeometry(){const{elevationAlignedGeometry:e}=this;if(!e)return null;const t=this.analysis.measureType,{effectiveTargetElevation:r}=this.analysisViewData;if("stockpile"===t||null==r)return e;const o=e.clone();return o.rings.forEach(e=>e.forEach(e=>e[2]=r)),o}get _targetGeometryRenderInfos(){const e=this.targetGeometry,t=this._projectedGeometry?.extent,r=this._localOrigin;if(!e||!t||!r)return null;const{elevationProvider:o,renderCoordsHelper:i}=this.view,n=z(e,o,i,F.fromElevationInfo(new H({mode:"absolute-height"}))),{polygons:s}=n;return s.map(e=>{const o=m(e.position,e.holeIndices,3),n=D(3*e.count),s=c(),a=c();return C(t.spatialReference,r,s,i.spatialReference),a[12]=-s[12],a[13]=-s[13],a[14]=-s[14],I(n,e.position,a),new Z(n,o)})}get updating(){return this._computationRenderNode.updating||this._updatingHandles.updating}get result(){const e=this._rawResult,{volume:t,area:r,length:o}=this.analysisViewData.effectiveDisplayUnits;return e?new S({measureType:this.analysis.measureType,rawResult:e,volumeUnit:t,areaUnit:r,lengthUnit:o}):null}get error(){return this._unsupportedCoordinateSystemError??this._unsupportedLayerTransparencyError??this._perimeterTooLargeError??this._insufficientDataError}get _imLayerViewsAffectingMeasurement(){return this.view.allLayerViews.filter(e=>J(e)).filter(e=>e.visible&&!e.suspended)}get _insufficientDataError(){return this._sufficientDataCoverage?null:new V}get _perimeterTooLargeError(){return this._perimeterTooLargeLocalError??this._perimeterTooLargeGlobalError}get _perimeterTooLargeLocalError(){const{spatialReference:e,state:{isLocal:r}}=this.view;if(!r||!e.isWebMercator)return null;const o=this._perimeter,{maxPerimeterLocalWebMercator:i}=t;return null!=o&&o>i?new U:null}get _perimeterTooLargeGlobalError(){if(!this.view.state.isGlobal)return null;const e=this._perimeter,{maxPerimeterGlobal:r}=t;return null!=e&&e>r?new U:null}get _unsupportedCoordinateSystemError(){return this.view.state.isLocal&&this.view.spatialReference.isGeographic?new N:null}get _unsupportedLayerTransparencyError(){return this.view.map.ground&&this.view.map.ground.opacity<1?new k:null}get _perimeter(){if(!this._targetGeometryRenderInfos)return null;let e=null;for(const t of this._targetGeometryRenderInfos){const r=$(ee(t.positions));e=r?Math.max(e??0,r):e}return null!=e?e/this.view.renderCoordsHelper.unitInMeters:null}_createElevationUpdateHandle(){const e=e=>{const t=this._projectedGeometry?.extent;"ground"===e.context&&t&&(x(e.extent,e.spatialReference,re,this.view.spatialReference),T(t,oe),G(re,oe)&&(this._getElevationProvider=()=>this.view.elevationProvider))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_updateResult(e,t,r){const{unitInMeters:o}=this.view.renderCoordsHelper,{dimensions:{width:i,height:s},cameraNearFar:{near:a,far:l}}=e,u=i/t.width*(s/t.height),p=Y(t.cut.totalDepth,a,l)*u,m=Y(t.fill.totalDepth,a,l)*u,c=o**3;this._rawResult=new A({cutVolume:n(Math.abs(p*c),"cubic-meters"),fillVolume:n(m*c,"cubic-meters"),area:r?.area,perimeter:r?.length})}_updateDepthExtremaPositions(e,t){const{dimensions:{width:r,height:o},cameraNearFar:{near:i,far:n},cameraPositionRenderSpace:s,northVector:a,eastVector:l,upVector:u}=e,p=e=>{const{depthExtremum:p,depthExtremumCoords:[m,c],totalDepth:h}=e,g=f(s);return 0!==h&&(d(g,g,l,r*(m/t.width-.5)),d(g,g,a,o*(c/t.height-.5))),d(g,g,u,-Y(p,i,n)),g};this.depthExtremaPositions={cut:p(t.cut),fill:p(t.fill)}}_findIntersectingObbs(e,t){const r=this._intersectingObbs;"integrated-mesh-3d"===e.type&&e.getVisibleNodes().forEach(o=>{e.isNodeLoaded(o.index)&&o.geometryObbInRenderSR?.intersectsFrustum(t)&&r.push(o.geometryObbInRenderSR)}),"integrated-mesh-3dtiles"===e.type&&e.forEachVisibleComponentObject(({obb:e})=>{e.intersectsFrustum(t)&&r.push(e)})}_sufficientIntegratedMeshCoverage(e,t){const{renderCoordsHelper:r,spatialReference:o}=this.view,i=[],n=new v({spatialReference:o});if(this._intersectingObbs.forEach(e=>{if(te(e.radius,t)&&(e.getCorners(ne),n.points.length=0,ne.forEach(e=>{const t=r.fromRenderCoords(e,se,o);t&&n.addPoint([t[0],t[1]])}),n.points.length)){const e=R(n);"polygon"===e?.type&&i.push(e)}}),!i.length)return!1;const s=E(i);return!!s&&j(s,e)}_findIntersectingTerrainTiles(e){const{basemapTerrain:t}=this.view;if(this._intersectingTiles.length=0,!e.extent)return;T(e.extent,ie);const r=this._tileIterator;r.reset(t.rootTiles);for(let o=r.next();o;o=r.next())o.intersectsExtent(ie)?o.rendered&&this._intersectingTiles.push(o):r.skipSubtree()}_sufficientTerrainCoverage(e){const{basemapTerrain:{tilingScheme:t}}=this.view;if(!this._intersectingTiles.length)return!1;const r=256/t.pixelSize;return this._intersectingTiles.every(t=>te(t.radius*r,e))}};function X(e,t){t.hasZ=!0,t.rings.forEach(t=>t.forEach(t=>t[2]=W(e,t,"ground")??0))}function Y(e,t,r){return e*(r-t)+t}function $(e){if(!e)return null;let t=null,r=null,o=0;for(const i of e)t||(t=[i[0],i[1],i[2]??0]),r?o+=h(r,i):r=[0,0,0],r[0]=i[0],r[1]=i[1],r[2]=i[2];return t&&r&&(o+=h(r,t)),Math.sqrt(o)}function*ee(e){const t=y();for(let r=0;r<e.length;r+=3)t[0]=e[r],t[1]=e[r+1],t[2]=e[r+2],yield t}e([u()],Q.prototype,"_projectedGeometry",null),e([u()],Q.prototype,"_localOrigin",null),e([u()],Q.prototype,"_getElevationProvider",void 0),e([u()],Q.prototype,"elevationAlignedGeometry",null),e([u()],Q.prototype,"targetGeometry",null),e([u()],Q.prototype,"_targetGeometryRenderInfos",null),e([u({constructOnly:!0})],Q.prototype,"analysis",void 0),e([u({constructOnly:!0})],Q.prototype,"analysisViewData",void 0),e([u({constructOnly:!0})],Q.prototype,"view",void 0),e([u()],Q.prototype,"updating",null),e([u()],Q.prototype,"result",null),e([u()],Q.prototype,"depthExtremaPositions",void 0),e([u()],Q.prototype,"error",null),e([u()],Q.prototype,"_imLayerViewsAffectingMeasurement",null),e([u()],Q.prototype,"_insufficientDataError",null),e([u()],Q.prototype,"_perimeterTooLargeError",null),e([u()],Q.prototype,"_perimeterTooLargeLocalError",null),e([u()],Q.prototype,"_perimeterTooLargeGlobalError",null),e([u()],Q.prototype,"_unsupportedCoordinateSystemError",null),e([u()],Q.prototype,"_unsupportedLayerTransparencyError",null),e([u()],Q.prototype,"_perimeter",null),e([u()],Q.prototype,"_computationRenderNode",void 0),e([u({readOnly:!0})],Q.prototype,"_updatingHandles",void 0),e([u()],Q.prototype,"_rawResult",void 0),e([u()],Q.prototype,"_sufficientDataCoverage",void 0),Q=e([p("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],Q);const te=(e,t)=>e<(t.width+t.height)/2,re=O(),oe=O(),ie=L(),ne=new Array(8).fill(0).map(()=>y()),se=y();export{Q as VolumeMeasurementCutFillController};
|
|
2
|
+
import{__decorate as e}from"tslib";import{volumeMeasurementConfiguration as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{debounce as i}from"../../../../core/promiseUtils.js";import{createVolume as n}from"../../../../core/quantity.js";import{whenOnce as s,watch as a,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as u,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{sqrDist as c}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scaleAndAdd as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as g,clone as f,create as y}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as _}from"../../../../core/support/UpdatingHandles.js";import v from"../../../../geometry/Multipoint.js";import{projectOrLoad as w}from"../../../../geometry/projectionUtils.js";import{e as j}from"../../../../chunks/containsOperator.js";import{e as E}from"../../../../chunks/convexHullOperator.js";import{e as b}from"../../../../chunks/simplifyOperator.js";import{e as R}from"../../../../chunks/unionOperator.js";import{computeTranslationToOriginAndRotation as x}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as C}from"../../../../geometry/projection/projectBoundingRect.js";import{fromExtent as T,intersects as G,create as L,empty as O}from"../../../../geometry/support/aaBoundingRect.js";import{isClockwise as D}from"../../../../geometry/support/coordsUtils.js";import{newDoubleArray as P}from"../../../../geometry/support/DoubleArray.js";import{t as H}from"../../../../chunks/vec3.js";import M from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as V}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as I}from"./VolumeMeasurementCutFillComputation.js";import{VolumeMeasurementInsufficientDataError as U,VolumeMeasurementPerimeterTooLargeError as N,VolumeMeasurementUnsupportedCoordinateSystemError as k,VolumeMeasurementUnsupportedLayerTransparencyError as A}from"./volumeMeasurementErrors.js";import{VolumeMeasurementRawResult as F}from"./VolumeMeasurementRawResult.js";import S from"./VolumeMeasurementResult.js";import{ElevationContext as W}from"../../layers/graphics/ElevationContext.js";import{getElevationAtPoint as z}from"../../support/ElevationProvider.js";import{polygonToRenderInfoElevationAligned as q}from"../../support/renderInfoUtils/polygon.js";import{IteratorPreorder as B}from"../../terrain/tileUtils.js";import{CutFillComputationRenderNode as Z,TargetGeometryRenderInfo as J}from"../../webgl-engine/lib/CutFillComputationRenderNode.js";import{isIntegratedMeshLayerView as K}from"../../../support/layerViewUtils.js";import{MeasurementWorkerHandle as Q}from"../../../support/MeasurementWorkerHandle.js";let X=class extends r{constructor(e){super(e),this._measurementWorkerHandle=new Q,this._getElevationProvider=()=>this.view.elevationProvider,this.depthExtremaPositions=null,this._updatingHandles=new _,this._rawResult=null,this._sufficientDataCoverage=!0,this._tileIterator=new B,this._intersectingObbs=[],this._intersectingTiles=[],this._debouncedUpdate=i(async(e,t,r,o)=>{if(!this._computationRenderNode.done)return;const{renderCoordsHelper:i}=this.view,n=new I({extent:t,localOrigin:r,renderCoordsHelper:i});this._computationRenderNode.update(n,o),this._determineDataCoverage(n);const[a]=await Promise.allSettled([this._measurementWorkerHandle.areaHorizontal(e,{returnLength:!0}),s(()=>this._computationRenderNode.done).then(()=>{this._updateDepthExtremaPositions(n,this._computationRenderNode.getResult())})]);if(this.error)return void(this._rawResult=null);const l=this._computationRenderNode.getResult();this._updateResult(n,l,"fulfilled"===a.status?a.value:null)}),this._determineDataCoverage=e=>{const{elevationAlignedGeometry:t}=this,{frustum:r}=this._computationRenderNode,{cameraDimensions:o}=e;t&&r&&(this._intersectingObbs.length=0,this._imLayerViewsAffectingMeasurement.forEach(e=>{this._findIntersectingObbs(e,r)}),this._intersectingObbs.length?this._sufficientDataCoverage=this._sufficientIntegratedMeshCoverage(t,o):(this._findIntersectingTerrainTiles(t),this._sufficientDataCoverage=this._sufficientTerrainCoverage(o)))}}initialize(){const e=this.view;this._computationRenderNode=new Z({view:e}),this.addHandles([this._createElevationUpdateHandle(),a(()=>({projectedGeometry:this._projectedGeometry,localOrigin:this._localOrigin,targetGeometryRenderInfo:this._targetGeometryRenderInfo}),({projectedGeometry:e,localOrigin:t,targetGeometryRenderInfo:r})=>{const o=e?.extent;if(!(e&&o&&t&&r))return this._rawResult=null,void(this._sufficientDataCoverage=!0);this._updatingHandles.consumePromise(this._debouncedUpdate(e,o,t,r))},l)])}destroy(){this._updatingHandles.destroy(),this._computationRenderNode.destroy(),this._measurementWorkerHandle.destroy()}get _projectedGeometry(){const e=this.analysis.geometry;if(!e||!this.analysis.valid)return null;const t=b(e),r=w(t,this.view.spatialReference);return r.pending?(this._updatingHandles.consumePromise(r.pending),null):(t&&!r.geometry&&V(this.analysis,e.spatialReference,o.getLogger(this)),r.geometry)}get _localOrigin(){const e=this._projectedGeometry?.extent;return e?g(e.center.x,e.center.y,0):null}get elevationAlignedGeometry(){const e=this._projectedGeometry;if(!e)return null;const t=e.clone();return Y(this._getElevationProvider(),t),t}get targetGeometry(){const{elevationAlignedGeometry:e}=this;if(!e)return null;const t=this.analysis.measureType,{effectiveTargetElevation:r}=this.analysisViewData;if("stockpile"===t||null==r)return e;const o=e.clone();return o.rings.forEach(e=>e.forEach(e=>e[2]=r)),o}get _targetGeometryRenderInfo(){const e=this.targetGeometry,t=this._projectedGeometry?.extent,r=this._localOrigin;if(!e||!t||!r)return null;const{elevationProvider:o,renderCoordsHelper:i}=this.view,n=q(e,o,i,W.fromElevationInfo(new M({mode:"absolute-height"})));if(null==n)return null;const{positions:s,polygonIndices:a,vertexCount:l}=n,u=P(3*l),p=m(),c=m();return x(t.spatialReference,r,p,i.spatialReference),c[12]=-p[12],c[13]=-p[13],c[14]=-p[14],H(u,s,c),new J(u,a)}get updating(){return this._computationRenderNode.updating||this._updatingHandles.updating}get result(){const e=this._rawResult,{volume:t,area:r,length:o}=this.analysisViewData.effectiveDisplayUnits;return e?new S({measureType:this.analysis.measureType,rawResult:e,volumeUnit:t,areaUnit:r,lengthUnit:o}):null}get error(){return this._unsupportedCoordinateSystemError??this._unsupportedLayerTransparencyError??this._perimeterTooLargeError??this._insufficientDataError}get _imLayerViewsAffectingMeasurement(){return this.view.allLayerViews.filter(e=>K(e)).filter(e=>e.visible&&!e.suspended)}get _insufficientDataError(){return this._sufficientDataCoverage?null:new U}get _perimeterTooLargeError(){return this._perimeterTooLargeLocalError??this._perimeterTooLargeGlobalError}get _perimeterTooLargeLocalError(){const{spatialReference:e,state:{isLocal:r}}=this.view;if(!r||!e.isWebMercator)return null;const o=this._perimeterForError,{maxPerimeterLocalWebMercator:i}=t;return null!=o&&o>i?new N:null}get _perimeterTooLargeGlobalError(){if(!this.view.state.isGlobal)return null;const e=this._perimeterForError,{maxPerimeterGlobal:r}=t;return null!=e&&e>r?new N:null}get _unsupportedCoordinateSystemError(){return this.view.state.isLocal&&this.view.spatialReference.isGeographic?new k:null}get _unsupportedLayerTransparencyError(){return this.view.map.ground&&this.view.map.ground.opacity<1?new A:null}get _perimeterForError(){const{targetGeometry:e}=this;if(null==e)return null;let t=null;for(const r of e.rings){if(!D(r))continue;const e=ee(te(r));t=e?Math.max(t??0,e):t}return null!=t?t*e.spatialReference.metersPerUnit:null}_createElevationUpdateHandle(){const e=e=>{const t=this._projectedGeometry?.extent;"ground"===e.context&&t&&(C(e.extent,e.spatialReference,oe,this.view.spatialReference),T(t,ie),G(oe,ie)&&(this._getElevationProvider=()=>this.view.elevationProvider))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_updateResult(e,t,r){const{unitInMeters:o}=this.view.renderCoordsHelper,{dimensions:{width:i,height:s},cameraNearFar:{near:a,far:l}}=e,u=i/t.width*(s/t.height),p=$(t.cut.totalDepth,a,l)*u,m=$(t.fill.totalDepth,a,l)*u,c=o**3;this._rawResult=new F({cutVolume:n(Math.abs(p*c),"cubic-meters"),fillVolume:n(m*c,"cubic-meters"),area:r?.area,perimeter:r?.length})}_updateDepthExtremaPositions(e,t){const{dimensions:{width:r,height:o},cameraNearFar:{near:i,far:n},cameraPositionRenderSpace:s,northVector:a,eastVector:l,upVector:u}=e,p=e=>{const{depthExtremum:p,depthExtremumCoords:[m,c],totalDepth:d}=e,g=f(s);return 0!==d&&(h(g,g,l,r*(m/t.width-.5)),h(g,g,a,o*(c/t.height-.5))),h(g,g,u,-$(p,i,n)),g};this.depthExtremaPositions={cut:p(t.cut),fill:p(t.fill)}}_findIntersectingObbs(e,t){const r=this._intersectingObbs;"integrated-mesh-3d"===e.type&&e.getVisibleNodes().forEach(o=>{e.isNodeLoaded(o.index)&&o.geometryObbInRenderSR?.intersectsFrustum(t)&&r.push(o.geometryObbInRenderSR)}),"integrated-mesh-3dtiles"===e.type&&e.forEachVisibleComponentObject(({obb:e})=>{e.intersectsFrustum(t)&&r.push(e)})}_sufficientIntegratedMeshCoverage(e,t){const{renderCoordsHelper:r,spatialReference:o}=this.view,i=[],n=new v({spatialReference:o});if(this._intersectingObbs.forEach(e=>{if(re(e.radius,t)&&(e.getCorners(se),n.points.length=0,se.forEach(e=>{const t=r.fromRenderCoords(e,ae,o);t&&n.addPoint([t[0],t[1]])}),n.points.length)){const e=E(n);"polygon"===e?.type&&i.push(e)}}),!i.length)return!1;const s=R(i);return!!s&&j(s,e)}_findIntersectingTerrainTiles(e){const{basemapTerrain:t}=this.view;if(this._intersectingTiles.length=0,!e.extent)return;T(e.extent,ne);const r=this._tileIterator;r.reset(t.rootTiles);for(let o=r.next();o;o=r.next())o.intersectsExtent(ne)?o.rendered&&this._intersectingTiles.push(o):r.skipSubtree()}_sufficientTerrainCoverage(e){const{basemapTerrain:{tilingScheme:t}}=this.view;if(!this._intersectingTiles.length)return!1;const r=256/t.pixelSize;return this._intersectingTiles.every(t=>re(t.radius*r,e))}};function Y(e,t){t.hasZ=!0,t.rings.forEach(t=>t.forEach(t=>t[2]=z(e,t,"ground")??0))}function $(e,t,r){return e*(r-t)+t}function ee(e){if(!e)return null;let t=null,r=null,o=0;for(const i of e)t||(t=[i[0],i[1]]),r?o+=c(r,i):r=[0,0],r[0]=i[0],r[1]=i[1];return t&&r&&(o+=c(r,t)),Math.sqrt(o)}function*te(e){const t=d();for(let r=0;r<e.length;r++)t[0]=e[r][0],t[1]=e[r][1],yield t}e([u()],X.prototype,"_projectedGeometry",null),e([u()],X.prototype,"_localOrigin",null),e([u()],X.prototype,"_getElevationProvider",void 0),e([u()],X.prototype,"elevationAlignedGeometry",null),e([u()],X.prototype,"targetGeometry",null),e([u()],X.prototype,"_targetGeometryRenderInfo",null),e([u({constructOnly:!0})],X.prototype,"analysis",void 0),e([u({constructOnly:!0})],X.prototype,"analysisViewData",void 0),e([u({constructOnly:!0})],X.prototype,"view",void 0),e([u()],X.prototype,"updating",null),e([u()],X.prototype,"result",null),e([u()],X.prototype,"depthExtremaPositions",void 0),e([u()],X.prototype,"error",null),e([u()],X.prototype,"_imLayerViewsAffectingMeasurement",null),e([u()],X.prototype,"_insufficientDataError",null),e([u()],X.prototype,"_perimeterTooLargeError",null),e([u()],X.prototype,"_perimeterTooLargeLocalError",null),e([u()],X.prototype,"_perimeterTooLargeGlobalError",null),e([u()],X.prototype,"_unsupportedCoordinateSystemError",null),e([u()],X.prototype,"_unsupportedLayerTransparencyError",null),e([u()],X.prototype,"_perimeterForError",null),e([u()],X.prototype,"_computationRenderNode",void 0),e([u({readOnly:!0})],X.prototype,"_updatingHandles",void 0),e([u()],X.prototype,"_rawResult",void 0),e([u()],X.prototype,"_sufficientDataCoverage",void 0),X=e([p("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],X);const re=(e,t)=>e<(t.width+t.height)/2,oe=O(),ie=O(),ne=L(),se=new Array(8).fill(0).map(()=>y()),ae=y();export{X as VolumeMeasurementCutFillController};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../../../intl.js";import{volumeMeasurementConfiguration as o}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import{equals as n}from"../../../../core/arrayUtils.js";import{cyclicalPI as l}from"../../../../core/Cyclical.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{formatDecimal as c,preferredVolumePrecision as u}from"../../../../core/quantityFormatUtils.js";import{watch as m,initial as d}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as h}from"../../../../core/units.js";import{property as p,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{e as y}from"../../../../chunks/earcut.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as f,normalize as v,subtract as j,cross as L,dot as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as C,fromValues as w}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as P}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{newDoubleArray as G}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as V}from"../../../../geometry/support/Indices.js";import{angleAroundAxis as x}from"../../../../geometry/support/vector.js";import{t as D}from"../../../../chunks/vec3.js";import O from"../../../../symbols/support/ElevationInfo.js";import{LabelVisualElement as R}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as A}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as M}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as F}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as E}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as U}from"../../layers/graphics/extrudeUtilsDeprecated.js";import{polygonToRenderInfo as S}from"../../support/renderInfoUtils/polygonDeprecated.js";import{CutFillVisualizationRenderNode as N,VolumeGeometry as B}from"../../webgl-engine/lib/CutFillVisualizationRenderNode.js";import{createStipplePatternSimple as H}from"../../webgl-engine/materials/lineStippleUtils.js";let T=class extends r{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get updating(){return this.loadingMessages}get hasUnsupportedError(){const{error:e}=this.analysisViewData;return!!e&&["unsupported-coordinate-system","unsupported-layer-transparency"].includes(e.name)}get _extrusionHeights(){const{renderCoordsHelper:e}=this.view,{depthExtremaPositions:t,targetGeometry:i}=this.analysisViewData,{targetElevationRange:s}=o;if(!i||!t)return{cut:s,fill:-s};let r=-1/0;for(const o of i.rings)for(const e of o)r=Math.max(r,e[2]);const n=1,l=e.getAltitude(t.fill);return{cut:s,fill:Math.min(l-r,0)-n}}constructor(e){super(e),this.unitsMessages=null,this.messages=null,this.loadingMessages=!0,this._elevationContext=E.fromElevationInfo(new O({mode:"absolute-height"})),this._projectionLines=[]}initialize(){const{view:e}=this,i={view:e,isDecoration:!0},s=o,r={...i,width:s.geometryOutlineWidth};this._elevationAlignedGeometry=new M({...r,isDraped:!0,color:s.geometryOutlineColor.toUnitRGBA()}),this._targetGeometry=new M(r);const n={...i,attached:!0,width:s.projectionLineWidth,renderOccluded:4,polygonOffset:3},l={...n,stipplePattern:H(s.projectionLineStippleSize)},a=s.cutProjectionLineColor.toUnitRGBA(),c=s.fillProjectionLineColor.toUnitRGBA();this._cutProjectionLines=new A({...n,color:a}),this._occludedCutProjectionLines=new A({...l,color:a}),this._fillProjectionLines=new A({...n,color:c,renderOccluded:8}),this._occludedFillProjectionLines=new A({...l,color:c});const u={...i,attached:!0};this._cutVolumeLabel=new R({...u,distance:s.labelDistance}),this._fillVolumeLabel=new R({...u,distance:-s.labelDistance}),this._renderNode=new N({view:e,cutColor:s.cutColor,fillColor:s.fillColor,borderColor:s.geometryOutlineColor}),this.addHandles([m(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},d),m(()=>({interactive:this.analysisViewData.interactive,measureType:this.analysis.measureType,visible:this.visible}),({visible:e,interactive:t,measureType:i})=>{this._elevationAlignedGeometry.visible=e&&!t,this._targetGeometry.visible=e&&"cut-fill"===i,this._renderNode.measureType=i},d),m(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i),d),m(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor,hasResult:!!this.analysisViewData.result}),({interactive:e,accentColor:t,hasResult:i})=>{this._updateColors(e,t,i)},d),m(()=>[this.analysisViewData.targetGeometry,this._extrusionHeights],()=>this._updateCutFillGeometry(),d),m(()=>this.visible&&this.view.state.camera.aboveGround&&!this.hasUnsupportedError,e=>this._updateCutFillVisibility(e),d),m(()=>{const{messages:e,unitsMessages:t,visible:i,analysisViewData:s}=this;return{depthExtremaPositions:s.depthExtremaPositions,effectiveDisplayUnits:s.effectiveDisplayUnits,messages:e,unitsMessages:t,result:s.result,visible:i&&!!s.result}},e=>this._updateLabels(e)),m(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e),d),t(()=>this._updateMessageBundle())]),this._updateMessageBundle()}destroy(){this._elevationAlignedGeometry=a(this._elevationAlignedGeometry),this._targetGeometry=a(this._targetGeometry),this._cutProjectionLines=a(this._cutProjectionLines),this._occludedCutProjectionLines=a(this._occludedCutProjectionLines),this._fillProjectionLines=a(this._fillProjectionLines),this._occludedFillProjectionLines=a(this._occludedFillProjectionLines),this._cutVolumeLabel=a(this._cutVolumeLabel),this._fillVolumeLabel=a(this._fillVolumeLabel),this._renderNode.destroy()}_updateProjectionLines(e,t,i){if(this._cutProjectionLines.visible=i,this._occludedCutProjectionLines.visible=i,this._fillProjectionLines.visible=i,this._occludedFillProjectionLines.visible=i,!e||!t)return;const{renderCoordsHelper:s}=this.view,o=[],r=[],l=[],a=[],c=[],u=e.spatialReference;for(let m=0;m<e.rings.length;m++){const i=e.rings[m],d=i.length>1&&n(i[0],i[i.length-1]),h=i.length-(d?1:0),p=[];for(let e=0;e<h;++e){const o=i[e],r=f(C(),o[0],o[1],o[2]);s.toRenderCoords(r,u,r);const n=t.rings[m][e],l=f(C(),n[0],n[1],n[2]);s.toRenderCoords(l,u,l);const a=new F(r,l);p.push(a)}const g=this.view.state.camera;for(let s=0;s<p.length;++s){const i=p[s],n=p[0===s?p.length-1:s-1],u=p[s===p.length-1?0:s+1],d=e.rings[m][s],h=t.rings[m][s],y=d[2]>h[2],_=new I(i,n,u,y);o.push(_),_.updateOccluded(g);const f=_.isOccluded;y?(f?l:r).push(i):(f?c:a).push(i)}}this._projectionLines=o,this._cutProjectionLines.setGeometryFromSegments(r),this._occludedCutProjectionLines.setGeometryFromSegments(l),this._fillProjectionLines.setGeometryFromSegments(a),this._occludedFillProjectionLines.setGeometryFromSegments(c)}_updateProjectionLineOcclusion(e){const t=[],i=[],s=[],o=[];let r=!1,n=!1;for(const l of this._projectionLines){l.updateOccluded(e)&&(r||=l.isCut,n||=!l.isCut);const a=l.isOccluded;(l.isCut?a?i:t:a?o:s).push(l.segment)}n&&(this._fillProjectionLines.setGeometryFromSegments(s),this._occludedFillProjectionLines.setGeometryFromSegments(o)),r&&(this._cutProjectionLines.setGeometryFromSegments(t),this._occludedCutProjectionLines.setGeometryFromSegments(i))}_updateColors(e,t,i){const{geometryOutlineColor:s,cutColor:r,fillColor:n,cutColorMuted:l,fillColorMuted:a,cutProjectionLineColor:c,fillProjectionLineColor:u}=o;if(this._renderNode.cutColor=i?r:l,this._renderNode.fillColor=i?n:a,e){const e=t.toUnitRGBA();this._targetGeometry.color=e,this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e,this._fillProjectionLines.color=e,this._occludedFillProjectionLines.color=e,this._renderNode.borderColor=t}else{this._targetGeometry.color=s.toUnitRGBA();const e=(i?c:l).toUnitRGBA();this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e;const t=(i?u:a).toUnitRGBA();this._fillProjectionLines.color=t,this._occludedFillProjectionLines.color=t,this._renderNode.borderColor=s}}_updateLabels(e){const{effectiveDisplayUnits:t,depthExtremaPositions:s,messages:o,unitsMessages:r,result:n,visible:l}=e;if(this._cutVolumeLabel.visible=l,this._fillVolumeLabel.visible=l,this._cutVolumeLabel.geometry=s?{type:"point",point:s.cut}:null,this._fillVolumeLabel.geometry=s?{type:"point",point:s.fill}:null,null==n||null==o||null==r)return this._cutVolumeLabel.text="-",void(this._fillVolumeLabel.text="-");const a=t.volume,c=i(o.labels.cut,{volume:z(r,n.cutVolume,a)}),u=i(o.labels.fill,{volume:z(r,n.fillVolume,a)});this._cutVolumeLabel.text=c,this._fillVolumeLabel.text=u}_updateCutFillVisibility(e){e?this._renderNode.enable():this._renderNode.disable()}_updateCutFillGeometry(){const{renderCoordsHelper:e}=this.view,{targetGeometry:t}=this.analysisViewData,{cut:i,fill:s}=this._extrusionHeights;if(!t?.extent)return;const{center:o}=t.extent,r=w(o.x,o.y,0),n=C();e.toRenderCoords(r,t.spatialReference,n);const l=this._getExtrudedVolumes(t,i,r,n),a=this._getExtrudedVolumes(t,s,r,n);this._renderNode.updateGeometries(l,a,n)}_getExtrudedVolumes(e,t,i,s){const{renderCoordsHelper:o,spatialReference:r,elevationProvider:n}=this.view,l=C(),a=1===o.viewingMode;o.worldUpAtPosition(s,l);const c=S(e,n,o,this._elevationContext),{polygons:u,mapPositions:m,position:d}=c;return u.map(e=>{const s=e.count,n=y(e.mapPositions,e.holeIndices,3),c=n.length,u=6*s,h=V(u+c),p=V(c),g=G(3*u),f=G(3*u);U(d,m,n,e,g,null,f,null,h,p,t,l,a);const v=_(),j=_();if(P(r,i,v,o.spatialReference),j[12]=-v[12],j[13]=-v[13],j[14]=-v[14],D(g,g,j),"stockpile"===this.analysis.measureType)for(let t=0;t<f.length;t+=3)f[t]=l[0],f[t+1]=l[1],f[t+2]=l[2];return new B(g,p,h,f)})}async _updateMessageBundle(){this.loadingMessages=!0;try{this.unitsMessages=await s("esri/core/t9n/Units"),this.messages=await s("esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis")}finally{this.loadingMessages=!1}}};function z(e,t,i){if(!t||!e)return null;const s=h(t.value,t.unit,i),o=u(s);return c(e,t,s,o)}e([p({constructOnly:!0})],T.prototype,"view",void 0),e([p({constructOnly:!0})],T.prototype,"analysis",void 0),e([p({constructOnly:!0})],T.prototype,"analysisViewData",void 0),e([p()],T.prototype,"unitsMessages",void 0),e([p()],T.prototype,"messages",void 0),e([p()],T.prototype,"loadingMessages",void 0),e([p({readOnly:!0})],T.prototype,"visible",null),e([p()],T.prototype,"updating",null),e([p()],T.prototype,"hasUnsupportedError",null),e([p()],T.prototype,"_extrusionHeights",null),T=e([g("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],T);class I{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=C(),this._n2=C();const o=v(k,j(k,e.endRenderSpace,e.startRenderSpace));v(this._n1,L(this._n1,o,v(W,j(W,t.startRenderSpace,e.startRenderSpace)))),v(this._n2,L(this._n2,o,v(W,j(W,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=l.normalize(x(this._n1,this._n2,o))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){j(k,this.segment.startRenderSpace,e.eye);const t=b(this._n1,k)<0,i=b(this._n2,k)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const k=C(),W=C();export{T as VolumeMeasurementCutFillVisualization};
|
|
2
|
+
import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../../../intl.js";import{volumeMeasurementConfiguration as o}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import{equals as n}from"../../../../core/arrayUtils.js";import{cyclicalPI as l}from"../../../../core/Cyclical.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{formatDecimal as c,preferredVolumePrecision as u}from"../../../../core/quantityFormatUtils.js";import{watch as d,initial as m}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as h}from"../../../../core/units.js";import{property as p,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{create as y}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as _,normalize as f,subtract as v,cross as j,dot as L}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b,fromValues as C}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as w}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{angleAroundAxis as G}from"../../../../geometry/support/vector.js";import{t as V}from"../../../../chunks/vec3.js";import P from"../../../../symbols/support/ElevationInfo.js";import{LabelVisualElement as x}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as R}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as O}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as M}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as A}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as D}from"../../layers/graphics/extrudeUtils.js";import{polygonToRenderInfoElevationAligned as F}from"../../support/renderInfoUtils/polygon.js";import{CutFillVisualizationRenderNode as E,VolumeGeometry as U}from"../../webgl-engine/lib/CutFillVisualizationRenderNode.js";import{createStipplePatternSimple as S}from"../../webgl-engine/materials/lineStippleUtils.js";let N=class extends r{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get updating(){return this.loadingMessages}get hasUnsupportedError(){const{error:e}=this.analysisViewData;return!!e&&["unsupported-coordinate-system","unsupported-layer-transparency"].includes(e.name)}get _extrusionHeights(){const{renderCoordsHelper:e}=this.view,{depthExtremaPositions:t,targetGeometry:i}=this.analysisViewData,{targetElevationRange:s}=o;if(!i||!t)return{cut:s,fill:-s};let r=-1/0;for(const o of i.rings)for(const e of o)r=Math.max(r,e[2]);const n=1,l=e.getAltitude(t.fill);return{cut:s,fill:Math.min(l-r,0)-n}}constructor(e){super(e),this.unitsMessages=null,this.messages=null,this.loadingMessages=!0,this._elevationContext=A.fromElevationInfo(new P({mode:"absolute-height"})),this._projectionLines=[]}initialize(){const{view:e}=this,i={view:e,isDecoration:!0},s=o,r={...i,width:s.geometryOutlineWidth};this._elevationAlignedGeometry=new O({...r,isDraped:!0,color:s.geometryOutlineColor.toUnitRGBA()}),this._targetGeometry=new O(r);const n={...i,attached:!0,width:s.projectionLineWidth,renderOccluded:4,polygonOffset:3},l={...n,stipplePattern:S(s.projectionLineStippleSize)},a=s.cutProjectionLineColor.toUnitRGBA(),c=s.fillProjectionLineColor.toUnitRGBA();this._cutProjectionLines=new R({...n,color:a}),this._occludedCutProjectionLines=new R({...l,color:a}),this._fillProjectionLines=new R({...n,color:c,renderOccluded:8}),this._occludedFillProjectionLines=new R({...l,color:c});const u={...i,attached:!0};this._cutVolumeLabel=new x({...u,distance:s.labelDistance}),this._fillVolumeLabel=new x({...u,distance:-s.labelDistance}),this._renderNode=new E({view:e,cutColor:s.cutColor,fillColor:s.fillColor,borderColor:s.geometryOutlineColor}),this.addHandles([d(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},m),d(()=>({interactive:this.analysisViewData.interactive,measureType:this.analysis.measureType,visible:this.visible}),({visible:e,interactive:t,measureType:i})=>{this._elevationAlignedGeometry.visible=e&&!t,this._targetGeometry.visible=e&&"cut-fill"===i,this._renderNode.measureType=i},m),d(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i),m),d(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor,hasResult:!!this.analysisViewData.result}),({interactive:e,accentColor:t,hasResult:i})=>{this._updateColors(e,t,i)},m),d(()=>[this.analysisViewData.targetGeometry,this._extrusionHeights,this._polygonRenderInfo],()=>this._updateCutFillGeometry(),m),d(()=>this.visible&&this.view.state.camera.aboveGround&&!this.hasUnsupportedError,e=>this._updateCutFillVisibility(e),m),d(()=>{const{messages:e,unitsMessages:t,visible:i,analysisViewData:s}=this;return{depthExtremaPositions:s.depthExtremaPositions,effectiveDisplayUnits:s.effectiveDisplayUnits,messages:e,unitsMessages:t,result:s.result,visible:i&&!!s.result}},e=>this._updateLabels(e)),d(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e),m),t(()=>this._updateMessageBundle())]),this._updateMessageBundle()}destroy(){this._elevationAlignedGeometry=a(this._elevationAlignedGeometry),this._targetGeometry=a(this._targetGeometry),this._cutProjectionLines=a(this._cutProjectionLines),this._occludedCutProjectionLines=a(this._occludedCutProjectionLines),this._fillProjectionLines=a(this._fillProjectionLines),this._occludedFillProjectionLines=a(this._occludedFillProjectionLines),this._cutVolumeLabel=a(this._cutVolumeLabel),this._fillVolumeLabel=a(this._fillVolumeLabel),this._renderNode.destroy()}_updateProjectionLines(e,t,i){if(this._cutProjectionLines.visible=i,this._occludedCutProjectionLines.visible=i,this._fillProjectionLines.visible=i,this._occludedFillProjectionLines.visible=i,!e||!t)return;const{renderCoordsHelper:s}=this.view,o=[],r=[],l=[],a=[],c=[],u=e.spatialReference;for(let d=0;d<e.rings.length;d++){const i=e.rings[d],m=i.length>1&&n(i[0],i[i.length-1]),h=i.length-(m?1:0),p=[];for(let e=0;e<h;++e){const o=i[e],r=_(b(),o[0],o[1],o[2]);s.toRenderCoords(r,u,r);const n=t.rings[d][e],l=_(b(),n[0],n[1],n[2]);s.toRenderCoords(l,u,l);const a=new M(r,l);p.push(a)}const g=this.view.state.camera;for(let e=0;e<p.length;++e){const s=p[e],n=p[0===e?p.length-1:e-1],u=p[e===p.length-1?0:e+1],m=i[e],h=t.rings[d][e],y=m[2]>h[2],_=new H(s,n,u,y);o.push(_),_.updateOccluded(g);const f=_.isOccluded;y?(f?l:r).push(s):(f?c:a).push(s)}}this._projectionLines=o,this._cutProjectionLines.setGeometryFromSegments(r),this._occludedCutProjectionLines.setGeometryFromSegments(l),this._fillProjectionLines.setGeometryFromSegments(a),this._occludedFillProjectionLines.setGeometryFromSegments(c)}_updateProjectionLineOcclusion(e){const t=[],i=[],s=[],o=[];let r=!1,n=!1;for(const l of this._projectionLines){l.updateOccluded(e)&&(r||=l.isCut,n||=!l.isCut);const a=l.isOccluded;(l.isCut?a?i:t:a?o:s).push(l.segment)}n&&(this._fillProjectionLines.setGeometryFromSegments(s),this._occludedFillProjectionLines.setGeometryFromSegments(o)),r&&(this._cutProjectionLines.setGeometryFromSegments(t),this._occludedCutProjectionLines.setGeometryFromSegments(i))}_updateColors(e,t,i){const{geometryOutlineColor:s,cutColor:r,fillColor:n,cutColorMuted:l,fillColorMuted:a,cutProjectionLineColor:c,fillProjectionLineColor:u}=o;if(this._renderNode.cutColor=i?r:l,this._renderNode.fillColor=i?n:a,e){const e=t.toUnitRGBA();this._targetGeometry.color=e,this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e,this._fillProjectionLines.color=e,this._occludedFillProjectionLines.color=e,this._renderNode.borderColor=t}else{this._targetGeometry.color=s.toUnitRGBA();const e=(i?c:l).toUnitRGBA();this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e;const t=(i?u:a).toUnitRGBA();this._fillProjectionLines.color=t,this._occludedFillProjectionLines.color=t,this._renderNode.borderColor=s}}_updateLabels(e){const{effectiveDisplayUnits:t,depthExtremaPositions:s,messages:o,unitsMessages:r,result:n,visible:l}=e;if(this._cutVolumeLabel.visible=l,this._fillVolumeLabel.visible=l,this._cutVolumeLabel.geometry=s?{type:"point",point:s.cut}:null,this._fillVolumeLabel.geometry=s?{type:"point",point:s.fill}:null,null==n||null==o||null==r)return this._cutVolumeLabel.text="-",void(this._fillVolumeLabel.text="-");const a=t.volume,c=i(o.labels.cut,{volume:B(r,n.cutVolume,a)}),u=i(o.labels.fill,{volume:B(r,n.fillVolume,a)});this._cutVolumeLabel.text=c,this._fillVolumeLabel.text=u}_updateCutFillVisibility(e){e?this._renderNode.enable():this._renderNode.disable()}get _polygonRenderInfo(){const{renderCoordsHelper:e,elevationProvider:t}=this.view,{targetGeometry:i}=this.analysisViewData;return null==i?null:F(i,t,e,this._elevationContext,{outlineOutput:"tessellated-indices"})}_updateCutFillGeometry(){const{renderCoordsHelper:e}=this.view,{targetGeometry:t}=this.analysisViewData,{cut:i,fill:s}=this._extrusionHeights;if(!t?.extent)return;const{center:o}=t.extent,r=C(o.x,o.y,0),n=b();e.toRenderCoords(r,t.spatialReference,n);const l=this._getExtrudedVolume(i,r,n),a=this._getExtrudedVolume(s,r,n);null!=l&&null!=a&&this._renderNode.updateGeometries(l,a,n)}_getExtrudedVolume(e,t,i){const{renderCoordsHelper:s,spatialReference:o}=this.view,r=b(),n=1===s.viewingMode;s.worldUpAtPosition(i,r);const{_polygonRenderInfo:l}=this;if(null==l)return null;const a=D(l,{height:e,worldUp:r,spherical:n,requireElevation:!1,requireNormals:!0,requireSizes:!1});if(null==a)return null;const c=y(),u=y();if(w(o,t,c,s.spatialReference),u[12]=-c[12],u[13]=-c[13],u[14]=-c[14],V(a.vertices,a.vertices,u),"stockpile"===this.analysis.measureType)for(let d=0;d<a.normals.length;d+=3)a.normals[d]=r[0],a.normals[d+1]=r[1],a.normals[d+2]=r[2];return new U(a.vertices,a.bottomIndices,a.indices,a.normals)}async _updateMessageBundle(){this.loadingMessages=!0;try{this.unitsMessages=await s("esri/core/t9n/Units"),this.messages=await s("esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis")}finally{this.loadingMessages=!1}}};function B(e,t,i){if(!t||!e)return null;const s=h(t.value,t.unit,i),o=u(s);return c(e,t,s,o)}e([p({constructOnly:!0})],N.prototype,"view",void 0),e([p({constructOnly:!0})],N.prototype,"analysis",void 0),e([p({constructOnly:!0})],N.prototype,"analysisViewData",void 0),e([p()],N.prototype,"unitsMessages",void 0),e([p()],N.prototype,"messages",void 0),e([p()],N.prototype,"loadingMessages",void 0),e([p({readOnly:!0})],N.prototype,"visible",null),e([p()],N.prototype,"updating",null),e([p()],N.prototype,"hasUnsupportedError",null),e([p()],N.prototype,"_extrusionHeights",null),e([p()],N.prototype,"_polygonRenderInfo",null),N=e([g("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],N);class H{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=b(),this._n2=b();const o=f(I,v(I,e.endRenderSpace,e.startRenderSpace));f(this._n1,j(this._n1,o,f(T,v(T,t.startRenderSpace,e.startRenderSpace)))),f(this._n2,j(this._n2,o,f(T,v(T,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=l.normalize(G(this._n1,this._n2,o))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){v(I,this.segment.startRenderSpace,e.eye);const t=L(this._n1,I)<0,i=L(this._n2,I)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const I=b(),T=b();export{N as VolumeMeasurementCutFillVisualization};
|
|
@@ -5,7 +5,7 @@ export interface CloudyWeatherProperties extends Partial<Pick<CloudyWeather, "cl
|
|
|
5
5
|
/**
|
|
6
6
|
* The CloudyWeather class allows you to change the weather conditions in the scene to cloudy weather.
|
|
7
7
|
*
|
|
8
|
-
* 
|
|
9
9
|
*
|
|
10
10
|
* Example:
|
|
11
11
|
* ```js
|
|
@@ -11,8 +11,8 @@ export interface EnvironmentProperties extends WebSceneEnvironmentProperties {
|
|
|
11
11
|
*
|
|
12
12
|
* Known Value | Example
|
|
13
13
|
* ------------|---------
|
|
14
|
-
* [SunLighting](https://developers.arcgis.com/javascript/latest/references/core/views/3d/environment/SunLighting/) |  |  | 
|
|
15
|
+
* [VirtualLighting](https://developers.arcgis.com/javascript/latest/references/core/views/3d/environment/VirtualLighting/) | 
|
|
16
16
|
*
|
|
17
17
|
* @since 5.0
|
|
18
18
|
*/
|
|
@@ -28,8 +28,8 @@ export default class Environment extends WebSceneEnvironment {
|
|
|
28
28
|
*
|
|
29
29
|
* Known Value | Example
|
|
30
30
|
* ------------|---------
|
|
31
|
-
* [SunLighting](https://developers.arcgis.com/javascript/latest/references/core/views/3d/environment/SunLighting/) |  |  | 
|
|
32
|
+
* [VirtualLighting](https://developers.arcgis.com/javascript/latest/references/core/views/3d/environment/VirtualLighting/) | 
|
|
33
33
|
*
|
|
34
34
|
* @since 5.0
|
|
35
35
|
*/
|
|
@@ -5,7 +5,7 @@ export interface FoggyWeatherProperties extends Partial<Pick<FoggyWeather, "fogS
|
|
|
5
5
|
/**
|
|
6
6
|
* The FoggyWeather class allows you to change the weather conditions in the scene to foggy weather.
|
|
7
7
|
*
|
|
8
|
-
* 
|
|
9
9
|
*
|
|
10
10
|
* Example:
|
|
11
11
|
* ```js
|
|
@@ -5,7 +5,7 @@ export interface RainyWeatherProperties extends Partial<Pick<RainyWeather, "clou
|
|
|
5
5
|
/**
|
|
6
6
|
* The RainyWeather class allows you to change the weather conditions in the scene to rainy weather.
|
|
7
7
|
*
|
|
8
|
-
* 
|
|
9
9
|
*
|
|
10
10
|
* Example:
|
|
11
11
|
* ```js
|
|
@@ -5,7 +5,7 @@ export interface SnowyWeatherProperties extends Partial<Pick<SnowyWeather, "clou
|
|
|
5
5
|
/**
|
|
6
6
|
* The SnowyWeather class allows you to change the weather conditions in the scene to snowy weather.
|
|
7
7
|
*
|
|
8
|
-
* 
|
|
9
9
|
*
|
|
10
10
|
* Example:
|
|
11
11
|
* ```js
|
|
@@ -16,7 +16,7 @@ export interface SunLightingProperties extends WebSceneSunLightingProperties, Pa
|
|
|
16
16
|
/**
|
|
17
17
|
* The SunLighting class allows you to change the lighting in the scene to sunlight. The position of the light is set to the sun's location.
|
|
18
18
|
*
|
|
19
|
-
* 
|
|
20
20
|
*
|
|
21
21
|
* Example:
|
|
22
22
|
* ```js
|
|
@@ -5,7 +5,7 @@ export interface SunnyWeatherProperties extends Partial<Pick<SunnyWeather, "clou
|
|
|
5
5
|
/**
|
|
6
6
|
* The SunnyWeather class allows you to change the weather conditions in the scene to sunny weather.
|
|
7
7
|
*
|
|
8
|
-
* 
|
|
9
9
|
*
|
|
10
10
|
* Example:
|
|
11
11
|
* ```js
|
|
@@ -8,7 +8,7 @@ export interface VirtualLightingProperties extends WebSceneVirtualLightingProper
|
|
|
8
8
|
* The VirtualLighting class allows you to change the lighting in the scene to virtual light. The position of the light
|
|
9
9
|
* follows the camera and has a slight top-right offset in respect to the camera.
|
|
10
10
|
*
|
|
11
|
-
* 
|
|
12
12
|
*
|
|
13
13
|
* Example:
|
|
14
14
|
* ```js
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{copy as o,normalize as t,set as
|
|
2
|
+
import{copy as o,normalize as t,set as n,subtract as e,cross as i}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newDoubleArray as s}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as r}from"../../../../geometry/support/Indices.js";function c(n,e){const{worldUp:i,height:l,spherical:c,requireElevation:m,requireNormals:p,requireSizes:f}=e,a=n.vertexCount,d=n.outlineSegmentCount,g=3*(2*a+4*d),v=s(g),h=r(6*d+n.polygonIndexCount),b=r(n.polygonIndexCount);if(m&&!("mapPositions"in n))return null;const{positions:j,polygonIndices:C,outline:q}=n,P="mapPositions"in n?n.mapPositions:j;if("tessellated-indices"!==q.output)return null;const z=q.outlineIndices;o(x,i);const S=m?s(g):void 0,w=p?s(g):void 0,A=f?s(g):void 0,D=C.length/3,E=l>0?1:-1;let N=0,U=0,k=a;for(let o=0;o<a;++o){const o=j[N],n=j[N+1],e=j[N+2];c&&(x[0]=o,x[1]=n,x[2]=e,t(x,x));const i=3*U;v[i+0]=o,v[i+1]=n,v[i+2]=e;const s=P[N+0],r=P[N+1],u=P[N+2];null!=S&&(S[i+0]=s,S[i+1]=r,S[i+2]=u),null!=w&&(w[i+0]=-E*x[0],w[i+1]=-E*x[1],w[i+2]=-E*x[2]),null!=A&&(A[U]=0);const m=3*k;v[m+0]=o+l*x[0],v[m+1]=n+l*x[1],v[m+2]=e+l*x[2],null!=S&&(S[m+0]=s,S[m+1]=r,S[m+2]=u),null!=A&&(A[k]=l),N+=3,U+=1,k+=1}let B=2*a,F=0;for(let o=0;o<z.length;++o){const t=z[o],n=t.length-1;n<=1||(u(v,S,A,w,t,n,a,B,h,F,l),B+=4*n,F+=2*n)}let G=0,H=0,J=3*F;const K=l<0?I:y,L=l<0?y:I;for(let o=0;o<D;++o)b[H]=C[G+K[0]],b[H+1]=C[G+K[1]],b[H+2]=C[G+K[2]],h[J]=C[G+L[0]]+a,h[J+1]=C[G+L[1]]+a,h[J+2]=C[G+L[2]]+a,H+=3,J+=3,G+=3;return{vertices:v,indices:h,bottomIndices:b,elevation:S,normals:w,sizes:A}}function u(o,t,n,e,i,l,s,r,c,u,a){t??=[],n??=[],e??=[];let d=r,g=r+1,v=r+2*l,h=r+2*l+1,x=3*u;for(let y=0;y<l;++y){const l=i[y],r=i[y+1],u=l+s,I=r+s;let b=l,j=r,C=u,q=I;a<0&&(b=I,j=r,C=u,q=l),m(o,b,j,C,f),p(o,t,e,n,f,d,b),p(o,t,e,n,f,g,j),p(o,t,e,n,f,v,C),p(o,t,e,n,f,h,q),c[x]=d,c[x+1]=v,c[x+2]=h,c[x+3]=d,c[x+4]=h,c[x+5]=g,x+=6,d+=2,g+=2,v+=2,h+=2}}function m(o,l,s,r,c){l*=3,s*=3,r*=3,n(a,o[l++],o[l++],o[l++]),n(d,o[s++],o[s++],o[s++]),n(g,o[r++],o[r++],o[r++]),e(v,d,a),e(h,g,a),i(c,h,v),t(c,c)}function p(o,t,n,e,i,l,s){e[l]=e[s],s*=3,o[l*=3]=o[s],o[l+1]=o[s+1],o[l+2]=o[s+2],t[l]=t[s],t[l+1]=t[s+1],t[l+2]=t[s+2],n[l]=i[0],n[l+1]=i[1],n[l+2]=i[2]}const f=l(),a=l(),d=l(),g=l(),v=l(),h=l(),x=l(),y=[0,2,1],I=[0,1,2];export{c as extrudePolygon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{projectBuffer as e}from"../../../../geometry/projection/projectBuffer.js";import{newDoubleArray as t,doubleSubArray as n}from"../../../../geometry/support/DoubleArray.js";import{applyPerVertexElevationAlignment as s}from"../../layers/graphics/elevationAlignmentUtils.js";import{
|
|
2
|
+
import{projectBuffer as e}from"../../../../geometry/projection/projectBuffer.js";import{newDoubleArray as t,doubleSubArray as n}from"../../../../geometry/support/DoubleArray.js";import{applyPerVertexElevationAlignment as s}from"../../layers/graphics/elevationAlignmentUtils.js";import{axisFromRings as i,ringsToOutlinedTessellationInfo as o,tessellateOrLoad as l,load as r}from"../../layers/graphics/tessellationUtils.js";import{drapedZ as u}from"../../terrain/OverlayRenderer.js";async function c(){return r()}class a{constructor(e,t,n,s){this.positions=e,this.polygonIndices=t,this.outline=n,this.projectionSuccess=s,this.count=e.length/3}get vertexCount(){return this.positions.length/3}get polygonIndexCount(){return this.polygonIndices.length}get outlineIndexCount(){const{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=y(e.outlineIndices[n]);return t}get outlineSegmentCount(){const{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++){const s=y(e.outlineIndices[n]);s>1&&(t+=s)}return t}}class p extends a{}class d extends a{}class f extends a{constructor(e,t,n,s,i,o){super(e,n,s,i),this.mapPositions=t,this.sampledElevation=o}}function g(e,t){const{projectIfNearlyVertical:n=!1,outlineOutput:s="none"}=t??{},r="tessellated-indices"===s,u=i(e.rings,!!e.hasZ,e.spatialReference),c=o(e.rings,{hasZ:!!e.hasZ,ccwRingsAsHoles:!0,spatialReference:e.spatialReference,axis:u}),{pending:a,result:p}=l(c,{projectionAxis:n?u:void 0,outlines:r?c.outlines:void 0});if(a||!p.succeeded)return null;let f={output:"none"};if("vertex-data"===s){const e=p.positions!==c.positions?c.positions:c.positions.slice();f={output:"vertex-data",outlines:m(c.outlines,e)}}else"tessellated-indices"===s&&(f=R(p));return new d(p.positions,p.indices,f,!0)}function h(t,n){const{drapedSpatialReference:s,projectIfNearlyVertical:r=!1,outlineOutput:c="none"}=n,a=i(t.rings,!1,t.spatialReference),d=o(t.rings,{hasZ:!1,ccwRingsAsHoles:!0,spatialReference:t.spatialReference,axis:a}),f="none"!==c,g=e(d.positions,t.spatialReference,0,d.positions,s,0),{pending:h,result:x}=l(d,{projectionAxis:r?a:void 0,outlines:f?d.outlines:void 0});if(h||!x.succeeded)return null;const{positions:v,indices:y}=x;for(let e=2;e<v.length;e+=3)v[e]=u;let j={output:"none"};if("vertex-data"===c){if(v!==d.positions)for(let t=2;t<d.positions.length;t+=3)d.positions[t]=u;const e=v!==d.positions?d.positions:d.positions.slice();j={output:"vertex-data",outlines:m(d.outlines,e)}}else"tessellated-indices"===c&&(j=R(x));return new p(v,y,j,g)}function x(e,n,r,u,c){const{projectIfNearlyVertical:a=!1,outlineOutput:p="none"}=c??{},d="none"!==p,g=!!e.hasZ&&"on-the-ground"!==u.mode,h=i(e.rings,g,e.spatialReference),x=o(e.rings,{hasZ:g,ccwRingsAsHoles:!0,spatialReference:e.spatialReference,axis:h}),{pending:m,result:y}=l(x,{projectionAxis:a?h:void 0,outlines:d?x.outlines:void 0});if(m||!y.succeeded)return null;const{positions:j,vertexCount:I}=y,w=t(j.length),A=s(j,e.spatialReference,0,w,0,j,0,I,n,r,u);let Z={output:"none"};"vertex-data"===p?Z={output:"vertex-data",outlines:v(y,w)}:"tessellated-indices"===p&&(Z=R(y));const C=null!=A;return new f(j,w,y.indices,Z,C,A)}function m(e,t,s=null){return e.filter(({count:e})=>e>1).map(({index:e,count:i})=>{const o=3*e,l=3*i;return null!=s?new I(e,i,n(t,o,l),n(s,o,l)):new j(e,i,n(t,o,l))})}function R(e){const{outlineIndexBuffer:t,outlineRingLengths:n}=e;if(null==t||null==n)return{output:"none"};const s=new Array(n.length);let i=0;for(let o=0;o<n.length;o++){const e=n[o],l=t.slice(i,i+e);s[o]=l,i+=e}return{output:"tessellated-indices",outlineIndices:s}}function v(e,s){const{outlineIndexBuffer:i,outlineRingLengths:o,positions:l}=e;if(null==i||null==o)return[];let r=0;for(let t=0;t<o.length;t++)r+=o[t]-1;const u=t(3*r),c=t(3*r),a=new Array;let p=0,d=0;for(let t=0;t<o.length;t++){const e=o[t],r=e-1;for(let t=0;t<r;t++){const e=3*i[p+t],n=3*(d+t);u[n]=l[e],u[n+1]=l[e+1],u[n+2]=l[e+2],c[n]=s[e],c[n+1]=s[e+1],c[n+2]=s[e+2]}a.push(new I(d,r,n(u,3*d,3*r),n(c,3*d,3*r))),p+=e,d+=r}return a}function y(e,t=0,n=e.length){return n>1&&e[t]===e[t+n-1]?n-1:n}class j{constructor(e,t,n){this.index=e,this.count=t,this.position=n}}class I extends j{constructor(e,t,n,s){super(e,t,n),this.mapPositions=s}}export{I as OutlineVertexData,j as OutlineVertexDataDraped,a as PolygonRenderInfoBase,p as PolygonRenderInfoDraped,f as PolygonRenderInfoElevationAligned,d as PolygonRenderInfoNotElevationAligned,c as load,h as polygonToRenderInfoDraped,x as polygonToRenderInfoElevationAligned,g as polygonToRenderInfoNotElevationAligned,R as splitOutlineIndexRings,v as tessellatedOutlineIndicesToVertexData};
|
|
@@ -107,7 +107,7 @@ export interface RenderNodeProperties extends Partial<Pick<RenderNode, "produces
|
|
|
107
107
|
* used for advanced graphics effects. The following additional inputs are available:
|
|
108
108
|
*
|
|
109
109
|
* <span id="render-node-input-images"></span>
|
|
110
|
-
* | <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/views/3d/rendernodeCompositeColor.
|
|
110
|
+
* | <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/views/3d/rendernodeCompositeColor.avif" style="width:200px;"/> | <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/views/3d/rendernodeCompositeColorDepth.avif" style="width:200px;"/> | <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/views/3d/rendernodeCompositeEmissive.avif" style="width:200px;"/> | <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/views/3d/rendernodeHighlight.avif" style="width:200px;"/> | <img src="https://developers.arcgis.com/javascript/latest/assets/references/core/views/3d/rendernodeNormals.avif" style="width:200px;"/> |
|
|
111
111
|
* | ---------- | ---------- | ---------- | ---------- | ---------- |
|
|
112
112
|
* | composite-color | composite-color depth attachment | composite-color emissive attachment | highlights | normals |
|
|
113
113
|
*
|
|
@@ -142,7 +142,7 @@ export interface RenderNodeProperties extends Partial<Pick<RenderNode, "produces
|
|
|
142
142
|
* drawn as a perfect sphere with a radius of 6378137, so the unit of the coordinate system should be considered
|
|
143
143
|
* meters.
|
|
144
144
|
*
|
|
145
|
-
* 
|
|
146
146
|
*
|
|
147
147
|
* You can use [toRenderCoordinates()](https://developers.arcgis.com/javascript/latest/references/core/views/3d/webgl/#toRenderCoordinates) and [fromRenderCoordinates()](https://developers.arcgis.com/javascript/latest/references/core/views/3d/webgl/#fromRenderCoordinates) to transform to
|
|
148
148
|
* and from the rendering coordinate system without having to worry about viewingMode and the exact coordinate system
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{property as t,subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{RenderNodeOutput as r,InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{F as n}from"../../../../../chunks/FocusAreaMask.glsl.js";import{FocusAreaMaskTechnique as a}from"./FocusAreaMaskTechnique.js";import{Pos3 as h}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as c}from"../../lib/VertexArrayObject.js";import{DepthStencilAttachment as l,PrimitiveType as u}from"../../../../webgl/enums.js";import{noParameters as p}from"../../../../webgl/NoParameters.js";import{VertexBuffer as m}from"../../../../webgl/VertexBuffer.js";let d=class extends o{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=i.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new n}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0}precompile(){this.techniques.precompile(a)}render(e){const t=this.techniques.getCompiled(a);if(!t||!this._vaos)return void this.requestRender(1);const s=e.find(({name:e})=>e===r.TRANSPARENT),o=this.renderingContext,n=this.bindParameters,h=n.camera,c=h.fullViewport[2],m=h.fullViewport[3],d=this.fboCache.acquire(c,m,i.FOCUSAREA,2);this.view.stage.renderer.occludedRequiresStencil?(d.acquireDepth(13),o.blitFramebuffer(s.fbo,d.fbo,256)):d.attachDepth(s.getAttachment(l)),o.bindFramebuffer(d.fbo),o.setClearColor(0,0,0,1),o.clear(17408),o.setViewport(0,0,c,m);const f=o.bindTechnique(t,n);o.setFaceCullingEnabled(!1),o.setStencilTestEnabled(!0),o.setStencilOpSeparate(1028,7680,34055,7680),o.setStencilOpSeparate(1029,7680,34056,7680),o.setDepthWriteEnabled(!1);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],t=this._counts[r];this._maskParameters.origin=this._origins[r],f.bindDraw(n,p,this._maskParameters),o.bindVAO(e),o.setDepthTestEnabled(!0),o.setStencilWriteMask(255),o.setStencilFunction(519,0,255),o.setColorMask(!1,!1,!1,!1),o.drawArrays(u.TRIANGLES,0,t),o.setDepthTestEnabled(!1),o.setStencilWriteMask(0),o.setStencilFunction(517,0,255),o.setColorMask(!0,!0,!0,!0),o.drawArrays(u.TRIANGLES,0,t)}return d}updateGeometries(){if(!this.view.stage)return;this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0;this.focusAreasView.volumes.forEach(e=>{const t=new Array
|
|
2
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{RenderNodeOutput as r,InternalRenderCategory as i}from"../../../webgl.js";import o from"../../../webgl/RenderNode.js";import{F as n}from"../../../../../chunks/FocusAreaMask.glsl.js";import{FocusAreaMaskTechnique as a}from"./FocusAreaMaskTechnique.js";import{Pos3 as h}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as c}from"../../lib/VertexArrayObject.js";import{DepthStencilAttachment as l,PrimitiveType as u}from"../../../../webgl/enums.js";import{noParameters as p}from"../../../../webgl/NoParameters.js";import{VertexBuffer as m}from"../../../../webgl/VertexBuffer.js";let d=class extends o{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=i.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new n}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0}precompile(){this.techniques.precompile(a)}render(e){const t=this.techniques.getCompiled(a);if(!t||!this._vaos)return void this.requestRender(1);const s=e.find(({name:e})=>e===r.TRANSPARENT),o=this.renderingContext,n=this.bindParameters,h=n.camera,c=h.fullViewport[2],m=h.fullViewport[3],d=this.fboCache.acquire(c,m,i.FOCUSAREA,2);this.view.stage.renderer.occludedRequiresStencil?(d.acquireDepth(13),o.blitFramebuffer(s.fbo,d.fbo,256)):d.attachDepth(s.getAttachment(l)),o.bindFramebuffer(d.fbo),o.setClearColor(0,0,0,1),o.clear(17408),o.setViewport(0,0,c,m);const f=o.bindTechnique(t,n);o.setFaceCullingEnabled(!1),o.setStencilTestEnabled(!0),o.setStencilOpSeparate(1028,7680,34055,7680),o.setStencilOpSeparate(1029,7680,34056,7680),o.setDepthWriteEnabled(!1);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],t=this._counts[r];this._maskParameters.origin=this._origins[r],f.bindDraw(n,p,this._maskParameters),o.bindVAO(e),o.setDepthTestEnabled(!0),o.setStencilWriteMask(255),o.setStencilFunction(519,0,255),o.setColorMask(!1,!1,!1,!1),o.drawArrays(u.TRIANGLES,0,t),o.setDepthTestEnabled(!1),o.setStencilWriteMask(0),o.setStencilFunction(517,0,255),o.setColorMask(!0,!0,!0,!0),o.drawArrays(u.TRIANGLES,0,t)}return d}updateGeometries(){if(!this.view.stage)return;this._vaos.forEach(e=>e.dispose()),this._vaos.length=this._counts.length=this._origins.length=0;this.focusAreasView.volumes.forEach(e=>{const t=new Array,s=e.geometryVolume,r=s.indicesBottom;for(let n=0;n<r.length;n++)t.push(s.positions[3*(r[n]-1)]),t.push(s.positions[3*(r[n]-1)+1]),t.push(s.positions[3*(r[n]-1)+2]);const i=s.indicesExtruded;for(let n=0;n<i.length;n++)t.push(s.positions[3*i[n]]),t.push(s.positions[3*i[n]+1]),t.push(s.positions[3*i[n]+2]);const o=new c(this.renderingContext,new m(this.renderingContext,h,new Float32Array(t)));this._vaos.push(o),this._counts.push(r.length+i.length),this._origins.push(e.origin)}),this.requestRender(1)}};e([t()],d.prototype,"consumes",void 0),e([t()],d.prototype,"produces",void 0),e([t({constructOnly:!0})],d.prototype,"focusAreasView",void 0),d=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskNode")],d);export{d as FocusAreaMaskNode};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{nextPowerOfTwo as e}from"../../../../core/mathUtils.js";import{disposeMaybe as i,destroyMaybe as r}from"../../../../core/maybe.js";import{property as s,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{ortho as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{set as n}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UNIT_X as c,ZEROS as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{RenderNodeOutput as d,InternalRenderCategory as p}from"../../webgl.js";import{Frustum as f}from"../../state/Frustum.js";import{glLayout as _}from"../../support/buffer/glUtil.js";import{newLayout as m}from"../../support/buffer/InterleavedLayout.js";import g from"../../webgl/RenderCamera.js";import C from"../../webgl/RenderNode.js";import{ShaderOutputConfiguration as F}from"../core/shaderLibrary/ShaderOutputConfiguration.js";import{VertexArrayObject as R}from"./VertexArrayObject.js";import{C as w}from"../../../../chunks/CutFillDepth.glsl.js";import{CutFillDepthTechnique as x}from"../shaders/CutFillDepthTechnique.js";import{CutFillDepthTechniqueConfiguration as P}from"../shaders/CutFillDepthTechniqueConfiguration.js";import{C as T}from"../../../../chunks/CutFillReduction.glsl.js";import{CutFillReductionTechnique as y}from"../shaders/CutFillReductionTechnique.js";import{CutFillReductionTechniqueConfiguration as b}from"../shaders/CutFillReductionTechniqueConfiguration.js";import{C as B}from"../../../../chunks/CutFillTargetDepth.glsl.js";import{CutFillTargetDepthTechnique as D}from"../shaders/CutFillTargetDepthTechnique.js";import{ImmediateTask as j,TaskPriority as q}from"../../../support/Scheduler.js";import{Yield as E}from"../../../support/Yield.js";import{PrimitiveType as S,DataType as O}from"../../../webgl/enums.js";import{Sync as v}from"../../../webgl/Sync.js";import{VertexBuffer as V}from"../../../webgl/VertexBuffer.js";let A=class extends C{constructor(t){super(t),this.consumes={required:[d.TRANSPARENT]},this.produces=p.CUTFILL_COMPUTATION,this._cutFillTargetDepthConfiguration=new F,this._cutFillDepthConfiguration=new P,this._cutFillReductionConfiguration=new b,this._cutFillTargetDepthParameters=new B,this._cutFillDepthParameters=new w,this._cutFillReductionParameters=new T,this.needsRender=!1,this.readyToRun=!1,this.done=!0,this._frameTask=j,this._result=new k,this._localOrigin=a(),this._maxTextureSize=512,this._width=0,this._height=0,this._reducedWidth=0,this._reducedHeight=0,this._depthFormat=13,this._colorFormat=10,this._numChannels=2,this._targetGeometryVao=null,this._numReductions=3,this._reductionPasses=0,this._pixelBufferSize=0,this._pixelBufferOffset=0,this._perReductionPixelBufferSize=0}initialize(){this._frameTask=this.view.resourceController.scheduler.registerTask(q.VOLUME_MEASUREMENT,this),this.addHandles(this._frameTask),this._maxTextureSize=Math.min(this._maxTextureSize,this.fboCache.rctx.parameters.maxTextureSize),this._cutFillTargetDepthConfiguration.output=9,this._frustum=new f(this.view.renderCoordsHelper)}destroy(){this._targetGeometryVao=i(this._targetGeometryVao);const t=this.gl;this._sync=r(this._sync),this._pixelBuffer&&(t.deleteBuffer(this._pixelBuffer),this._pixelBuffer=null,this._pixelBufferSize=0)}precompile(){this.techniques.precompile(D,this._cutFillTargetDepthConfiguration),this._cutFillDepthConfiguration.preparePass=0,this.techniques.precompile(x,this._cutFillDepthConfiguration),this._cutFillDepthConfiguration.preparePass=1,this.techniques.precompile(x,this._cutFillDepthConfiguration),this._cutFillReductionConfiguration.reductionPass=0,this.techniques.precompile(y,this._cutFillReductionConfiguration),this._cutFillReductionConfiguration.reductionPass=1,this.techniques.precompile(y,this._cutFillReductionConfiguration),this._cutFillReductionConfiguration.reductionPass=2,this.techniques.precompile(y,this._cutFillReductionConfiguration),this.view.stage.renderer.precompileCutFillOrthographicReferenceDepth()}render(t){const e=t.find(({name:t})=>t===this.produces);if(!this._orthographicCamera||!this._targetGeometryVao||!this.needsRender||this._sync)return e;const i=this.techniques.getCompiled(D,this._cutFillTargetDepthConfiguration);this._cutFillDepthConfiguration.preparePass=0;const r=this.techniques.getCompiled(x,this._cutFillDepthConfiguration);this._cutFillDepthConfiguration.preparePass=1;const s=this.techniques.getCompiled(x,this._cutFillDepthConfiguration);this._cutFillReductionConfiguration.reductionPass=0;const h=this.techniques.getCompiled(y,this._cutFillReductionConfiguration);this._cutFillReductionConfiguration.reductionPass=1;const o=this.techniques.getCompiled(y,this._cutFillReductionConfiguration);this._cutFillReductionConfiguration.reductionPass=2;const n=this.techniques.getCompiled(y,this._cutFillReductionConfiguration);if(!(i&&r&&s&&h&&o&&n))return this.requestRender(1),e;this.needsRender=!1;const u=this.renderingContext,a=this.fboCache,d=this.gl,p=u.getViewport(),f=a.acquire(this._width,this._height,"cutfill reference depth",this._depthFormat);u.bindFramebuffer(f.fbo),u.setViewport(0,0,this._width,this._height),u.clear(1280),this.view.stage.renderer.renderCutFillOrthographicReferenceDepth(this._orthographicCamera);const _=a.acquire(this._width,this._height,"cutfill target depth",this._depthFormat);u.bindFramebuffer(_.fbo),u.setViewport(0,0,this._width,this._height),u.setClearDepth(1),u.clear(256),this._cutFillTargetDepthParameters.origin=this._localOrigin,this._cutFillTargetDepthParameters.cutFillCamera=this._orthographicCamera,u.bindTechnique(i,this.bindParameters,this._cutFillTargetDepthParameters),u.bindVAO(this._targetGeometryVao),u.drawArrays(S.TRIANGLES,0,this._targetGeometryVao.vertexCount("geometry"));const m=a.acquire(this._width,this._height,"cutfill reduction even",this._colorFormat),g=a.acquire(this._width,this._height,"cutfill reduction odd",this._colorFormat);return this._cutFillDepthParameters.referenceDepthTexture=f.depthTexture,this._cutFillDepthParameters.targetDepthTexture=_.depthTexture,this._pixelBuffer||(this._pixelBuffer=d.createBuffer()),d.bindBuffer(d.PIXEL_PACK_BUFFER,this._pixelBuffer),d.bufferData(d.PIXEL_PACK_BUFFER,this._pixelBufferSize,d.STREAM_READ),this._prepareFBO(m,this.width,this.height),u.bindTechnique(r,this.bindParameters,this._cutFillDepthParameters),u.screen.draw(),this._runPyramidReduction(m,g,h),this._prepareFBO(m,this.width,this.height,c),u.bindTechnique(s,this.bindParameters,this._cutFillDepthParameters),u.screen.draw(),this._runPyramidReduction(m,g,o),this._prepareFBO(m,this.width,this.height,l),u.bindTechnique(s,this.bindParameters,this._cutFillDepthParameters),u.screen.draw(),this._runPyramidReduction(m,g,n),f.release(),_.release(),m.release(),g.release(),d.bindBuffer(d.PIXEL_PACK_BUFFER,null),u.setViewport(p.x,p.y,p.width,p.height),this._sync=new v(d),setTimeout(()=>this.readyToRun=!0,0),e}update(t,i){if(!this.done)return;this.done=!1;const r=this.renderingContext,{cameraDimensions:{width:s,height:h},localOriginRenderSpace:o}=t,n=this._maxTextureSize,u=h/s,a=s>h?n:n/u,c=s>h?n*u:n;this._width=e(a),this._height=e(c);const l=[this._width,this._height];this._orthographicCamera=this._createCamera(t,l),this._frustum?.update(this._orthographicCamera),this._updateTargetVao(r,i),this._localOrigin=o,this._reductionPasses=Math.ceil(Math.log2(Math.min(this._width,this._height))),this._reducedWidth=Math.ceil(this._width/2**this._reductionPasses),this._reducedHeight=Math.ceil(this._height/2**this._reductionPasses),this._perReductionPixelBufferSize=this._reducedWidth*this._reducedHeight*this._numChannels*4,this._pixelBufferSize=this._perReductionPixelBufferSize*this._numReductions,this._pixelBufferOffset=0,this.needsRender=!0,this.requestRender(1)}runTask(){if(!this._sync)return void(this.readyToRun=!1);try{if(!this._sync.poll())return E}catch(e){return this.readyToRun=!1,void(this._sync=r(this._sync))}this.readyToRun=!1,this._sync=r(this._sync);const t=this.gl;this._cpuBuffer=new Float32Array(this._pixelBufferSize/4),t.bindBuffer(t.PIXEL_PACK_BUFFER,this._pixelBuffer),t.getBufferSubData(t.PIXEL_PACK_BUFFER,0,this._cpuBuffer),t.bindBuffer(t.PIXEL_PACK_BUFFER,null),this._updateResults(this._cpuBuffer),this.done=!0}getResult(){return this._result}get frustum(){return this._frustum}get width(){return this._width}get height(){return this._height}get updating(){return this.readyToRun||!this.done||this._frameTask.updating}_runPyramidReduction(t,e,i){const r=this.renderingContext,s=this.gl;let h=this._width,o=this._height;for(let n=0;n<this._reductionPasses;n++)h=Math.ceil(h/2),o=Math.ceil(o/2),this._cutFillReductionParameters.depthTexture=t.getTexture(),this._prepareFBO(e,h,o),r.bindTechnique(i,this.bindParameters,this._cutFillReductionParameters),r.screen.draw(),[t,e]=[e,t];s.readPixels(0,0,h,o,33319,O.FLOAT,this._pixelBufferOffset),this._pixelBufferOffset+=this._perReductionPixelBufferSize}_updateResults(t){const e=new U(0,1,u()),i=new U(0,0,u());for(let r=0;r<this._reducedWidth;r++)for(let s=0;s<this._reducedHeight;s++){let h=(r+s*this._reducedWidth)*this._numChannels;const o=this._reducedWidth*this._reducedHeight*this._numChannels;e.totalDepth+=t[h],i.totalDepth+=t[h+1],h+=o;const n=t[h];n<e.depthExtremum&&(e.depthExtremum=n,M(e.depthExtremumCoords,t[h+1],this._width)),h+=o;const u=t[h];u>i.depthExtremum&&(i.depthExtremum=u,M(i.depthExtremumCoords,t[h+1],this._width))}this._result=new k(this._width,this._height,e,i)}_prepareFBO(t,e,i,r=l){const s=this.renderingContext;s.bindFramebuffer(t.fbo),s.setViewport(0,0,e,i),s.setClearColor(r[0],r[1],r[2],r[3]),s.clear(16384)}_createCamera(t,e){const{cameraPositionRenderSpace:i,localOriginRenderSpace:r,northVector:s,cameraDimensions:{width:h,height:n},cameraNearFar:{near:u,far:a}}=t,c=new g({eye:i,center:r,up:s,near:u,far:a});return c.viewport=[0,0,e[0],e[1]],o(c.projectionMatrix,-h/2,h/2,-n/2,n/2,u,a),c}_updateTargetVao(t,e){this._targetGeometryVao=i(this._targetGeometryVao);const r=e.reduce((t,e)=>t+e.indices.length,0),s=z.createBuffer(r),h=s.position;let o=0;for(const i of e){const{positions:t,indices:e}=i;for(let i=0;i<e.length;++i){const r=3*e[i];h.set(o,0,t[r]),h.set(o,1,t[r+1]),h.set(o,2,t[r+2]),o++}}const n=new V(t,_(z),s.buffer);this._targetGeometryVao=new R(t,n)}};t([s()],A.prototype,"consumes",void 0),t([s()],A.prototype,"produces",void 0),t([s()],A.prototype,"needsRender",void 0),t([s()],A.prototype,"readyToRun",void 0),t([s()],A.prototype,"done",void 0),t([s()],A.prototype,"updating",null),t([s()],A.prototype,"_frameTask",void 0),A=t([h("esri.views.3d.webgl-engine.lib.CutFillComputationRenderNode")],A);const z=m().vec3f("position").freeze();function M(t,e,i){const r=e%i,s=Math.floor(e/i);n(t,r,s)}class L{constructor(t,e){this.positions=t,this.indices=e}}class U{constructor(t,e,i){this.totalDepth=t,this.depthExtremum=e,this.depthExtremumCoords=i}}class k{constructor(t=0,e=0,i=new U(0,1,u()),r=new U(0,0,u())){this.width=t,this.height=e,this.cut=i,this.fill=r}}export{A as CutFillComputationRenderNode,k as CutFillComputationResult,U as CutFillDepthResult,L as TargetGeometryRenderInfo};
|
|
2
|
+
import{__decorate as t}from"tslib";import{nextPowerOfTwo as e}from"../../../../core/mathUtils.js";import{disposeMaybe as i,destroyMaybe as r}from"../../../../core/maybe.js";import{property as s,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{ortho as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{set as n}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UNIT_X as c,ZEROS as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{RenderNodeOutput as d,InternalRenderCategory as p}from"../../webgl.js";import{Frustum as _}from"../../state/Frustum.js";import{glLayout as f}from"../../support/buffer/glUtil.js";import{newLayout as m}from"../../support/buffer/InterleavedLayout.js";import g from"../../webgl/RenderCamera.js";import C from"../../webgl/RenderNode.js";import{ShaderOutputConfiguration as F}from"../core/shaderLibrary/ShaderOutputConfiguration.js";import{VertexArrayObject as R}from"./VertexArrayObject.js";import{C as w}from"../../../../chunks/CutFillDepth.glsl.js";import{CutFillDepthTechnique as x}from"../shaders/CutFillDepthTechnique.js";import{CutFillDepthTechniqueConfiguration as P}from"../shaders/CutFillDepthTechniqueConfiguration.js";import{C as T}from"../../../../chunks/CutFillReduction.glsl.js";import{CutFillReductionTechnique as y}from"../shaders/CutFillReductionTechnique.js";import{CutFillReductionTechniqueConfiguration as b}from"../shaders/CutFillReductionTechniqueConfiguration.js";import{C as B}from"../../../../chunks/CutFillTargetDepth.glsl.js";import{CutFillTargetDepthTechnique as D}from"../shaders/CutFillTargetDepthTechnique.js";import{ImmediateTask as j,TaskPriority as q}from"../../../support/Scheduler.js";import{Yield as E}from"../../../support/Yield.js";import{PrimitiveType as S,DataType as O}from"../../../webgl/enums.js";import{Sync as v}from"../../../webgl/Sync.js";import{VertexBuffer as V}from"../../../webgl/VertexBuffer.js";let A=class extends C{constructor(t){super(t),this.consumes={required:[d.TRANSPARENT]},this.produces=p.CUTFILL_COMPUTATION,this._cutFillTargetDepthConfiguration=new F,this._cutFillDepthConfiguration=new P,this._cutFillReductionConfiguration=new b,this._cutFillTargetDepthParameters=new B,this._cutFillDepthParameters=new w,this._cutFillReductionParameters=new T,this.needsRender=!1,this.readyToRun=!1,this.done=!0,this._frameTask=j,this._result=new k,this._localOrigin=a(),this._maxTextureSize=512,this._width=0,this._height=0,this._reducedWidth=0,this._reducedHeight=0,this._depthFormat=13,this._colorFormat=10,this._numChannels=2,this._targetGeometryVao=null,this._numReductions=3,this._reductionPasses=0,this._pixelBufferSize=0,this._pixelBufferOffset=0,this._perReductionPixelBufferSize=0}initialize(){this._frameTask=this.view.resourceController.scheduler.registerTask(q.VOLUME_MEASUREMENT,this),this.addHandles(this._frameTask),this._maxTextureSize=Math.min(this._maxTextureSize,this.fboCache.rctx.parameters.maxTextureSize),this._cutFillTargetDepthConfiguration.output=9,this._frustum=new _(this.view.renderCoordsHelper)}destroy(){this._targetGeometryVao=i(this._targetGeometryVao);const t=this.gl;this._sync=r(this._sync),this._pixelBuffer&&(t.deleteBuffer(this._pixelBuffer),this._pixelBuffer=null,this._pixelBufferSize=0)}precompile(){this.techniques.precompile(D,this._cutFillTargetDepthConfiguration),this._cutFillDepthConfiguration.preparePass=0,this.techniques.precompile(x,this._cutFillDepthConfiguration),this._cutFillDepthConfiguration.preparePass=1,this.techniques.precompile(x,this._cutFillDepthConfiguration),this._cutFillReductionConfiguration.reductionPass=0,this.techniques.precompile(y,this._cutFillReductionConfiguration),this._cutFillReductionConfiguration.reductionPass=1,this.techniques.precompile(y,this._cutFillReductionConfiguration),this._cutFillReductionConfiguration.reductionPass=2,this.techniques.precompile(y,this._cutFillReductionConfiguration),this.view.stage.renderer.precompileCutFillOrthographicReferenceDepth()}render(t){const e=t.find(({name:t})=>t===this.produces);if(!this._orthographicCamera||!this._targetGeometryVao||!this.needsRender||this._sync)return e;const i=this.techniques.getCompiled(D,this._cutFillTargetDepthConfiguration);this._cutFillDepthConfiguration.preparePass=0;const r=this.techniques.getCompiled(x,this._cutFillDepthConfiguration);this._cutFillDepthConfiguration.preparePass=1;const s=this.techniques.getCompiled(x,this._cutFillDepthConfiguration);this._cutFillReductionConfiguration.reductionPass=0;const h=this.techniques.getCompiled(y,this._cutFillReductionConfiguration);this._cutFillReductionConfiguration.reductionPass=1;const o=this.techniques.getCompiled(y,this._cutFillReductionConfiguration);this._cutFillReductionConfiguration.reductionPass=2;const n=this.techniques.getCompiled(y,this._cutFillReductionConfiguration);if(!(i&&r&&s&&h&&o&&n))return this.requestRender(1),e;this.needsRender=!1;const u=this.renderingContext,a=this.fboCache,d=this.gl,p=u.getViewport(),_=a.acquire(this._width,this._height,"cutfill reference depth",this._depthFormat);u.bindFramebuffer(_.fbo),u.setViewport(0,0,this._width,this._height),u.clear(1280),this.view.stage.renderer.renderCutFillOrthographicReferenceDepth(this._orthographicCamera);const f=a.acquire(this._width,this._height,"cutfill target depth",this._depthFormat);u.bindFramebuffer(f.fbo),u.setViewport(0,0,this._width,this._height),u.setClearDepth(1),u.clear(256),this._cutFillTargetDepthParameters.origin=this._localOrigin,this._cutFillTargetDepthParameters.cutFillCamera=this._orthographicCamera,u.bindTechnique(i,this.bindParameters,this._cutFillTargetDepthParameters),u.bindVAO(this._targetGeometryVao),u.drawArrays(S.TRIANGLES,0,this._targetGeometryVao.vertexCount("geometry"));const m=a.acquire(this._width,this._height,"cutfill reduction even",this._colorFormat),g=a.acquire(this._width,this._height,"cutfill reduction odd",this._colorFormat);return this._cutFillDepthParameters.referenceDepthTexture=_.depthTexture,this._cutFillDepthParameters.targetDepthTexture=f.depthTexture,this._pixelBuffer||(this._pixelBuffer=d.createBuffer()),d.bindBuffer(d.PIXEL_PACK_BUFFER,this._pixelBuffer),d.bufferData(d.PIXEL_PACK_BUFFER,this._pixelBufferSize,d.STREAM_READ),this._prepareFBO(m,this.width,this.height),u.bindTechnique(r,this.bindParameters,this._cutFillDepthParameters),u.screen.draw(),this._runPyramidReduction(m,g,h),this._prepareFBO(m,this.width,this.height,c),u.bindTechnique(s,this.bindParameters,this._cutFillDepthParameters),u.screen.draw(),this._runPyramidReduction(m,g,o),this._prepareFBO(m,this.width,this.height,l),u.bindTechnique(s,this.bindParameters,this._cutFillDepthParameters),u.screen.draw(),this._runPyramidReduction(m,g,n),_.release(),f.release(),m.release(),g.release(),d.bindBuffer(d.PIXEL_PACK_BUFFER,null),u.setViewport(p.x,p.y,p.width,p.height),this._sync=new v(d),setTimeout(()=>this.readyToRun=!0,0),e}update(t,i){if(!this.done)return;this.done=!1;const r=this.renderingContext,{cameraDimensions:{width:s,height:h},localOriginRenderSpace:o}=t,n=this._maxTextureSize,u=h/s,a=s>h?n:n/u,c=s>h?n*u:n;this._width=e(a),this._height=e(c);const l=[this._width,this._height];this._orthographicCamera=this._createCamera(t,l),this._frustum?.update(this._orthographicCamera),this._updateTargetVao(r,i),this._localOrigin=o,this._reductionPasses=Math.ceil(Math.log2(Math.min(this._width,this._height))),this._reducedWidth=Math.ceil(this._width/2**this._reductionPasses),this._reducedHeight=Math.ceil(this._height/2**this._reductionPasses),this._perReductionPixelBufferSize=this._reducedWidth*this._reducedHeight*this._numChannels*4,this._pixelBufferSize=this._perReductionPixelBufferSize*this._numReductions,this._pixelBufferOffset=0,this.needsRender=!0,this.requestRender(1)}runTask(){if(!this._sync)return void(this.readyToRun=!1);try{if(!this._sync.poll())return E}catch(e){return this.readyToRun=!1,void(this._sync=r(this._sync))}this.readyToRun=!1,this._sync=r(this._sync);const t=this.gl;this._cpuBuffer=new Float32Array(this._pixelBufferSize/4),t.bindBuffer(t.PIXEL_PACK_BUFFER,this._pixelBuffer),t.getBufferSubData(t.PIXEL_PACK_BUFFER,0,this._cpuBuffer),t.bindBuffer(t.PIXEL_PACK_BUFFER,null),this._updateResults(this._cpuBuffer),this.done=!0}getResult(){return this._result}get frustum(){return this._frustum}get width(){return this._width}get height(){return this._height}get updating(){return this.readyToRun||!this.done||this._frameTask.updating}_runPyramidReduction(t,e,i){const r=this.renderingContext,s=this.gl;let h=this._width,o=this._height;for(let n=0;n<this._reductionPasses;n++)h=Math.ceil(h/2),o=Math.ceil(o/2),this._cutFillReductionParameters.depthTexture=t.getTexture(),this._prepareFBO(e,h,o),r.bindTechnique(i,this.bindParameters,this._cutFillReductionParameters),r.screen.draw(),[t,e]=[e,t];s.readPixels(0,0,h,o,33319,O.FLOAT,this._pixelBufferOffset),this._pixelBufferOffset+=this._perReductionPixelBufferSize}_updateResults(t){const e=new U(0,1,u()),i=new U(0,0,u());for(let r=0;r<this._reducedWidth;r++)for(let s=0;s<this._reducedHeight;s++){let h=(r+s*this._reducedWidth)*this._numChannels;const o=this._reducedWidth*this._reducedHeight*this._numChannels;e.totalDepth+=t[h],i.totalDepth+=t[h+1],h+=o;const n=t[h];n<e.depthExtremum&&(e.depthExtremum=n,M(e.depthExtremumCoords,t[h+1],this._width)),h+=o;const u=t[h];u>i.depthExtremum&&(i.depthExtremum=u,M(i.depthExtremumCoords,t[h+1],this._width))}this._result=new k(this._width,this._height,e,i)}_prepareFBO(t,e,i,r=l){const s=this.renderingContext;s.bindFramebuffer(t.fbo),s.setViewport(0,0,e,i),s.setClearColor(r[0],r[1],r[2],r[3]),s.clear(16384)}_createCamera(t,e){const{cameraPositionRenderSpace:i,localOriginRenderSpace:r,northVector:s,cameraDimensions:{width:h,height:n},cameraNearFar:{near:u,far:a}}=t,c=new g({eye:i,center:r,up:s,near:u,far:a});return c.viewport=[0,0,e[0],e[1]],o(c.projectionMatrix,-h/2,h/2,-n/2,n/2,u,a),c}_updateTargetVao(t,e){this._targetGeometryVao=i(this._targetGeometryVao);const r=e.indices.length,s=z.createBuffer(r),h=s.position,{positions:o,indices:n}=e;for(let i=0;i<n.length;++i){const t=3*n[i];h.set(i,0,o[t]),h.set(i,1,o[t+1]),h.set(i,2,o[t+2])}const u=new V(t,f(z),s.buffer);this._targetGeometryVao=new R(t,u)}};t([s()],A.prototype,"consumes",void 0),t([s()],A.prototype,"produces",void 0),t([s()],A.prototype,"needsRender",void 0),t([s()],A.prototype,"readyToRun",void 0),t([s()],A.prototype,"done",void 0),t([s()],A.prototype,"updating",null),t([s()],A.prototype,"_frameTask",void 0),A=t([h("esri.views.3d.webgl-engine.lib.CutFillComputationRenderNode")],A);const z=m().vec3f("position").freeze();function M(t,e,i){const r=e%i,s=Math.floor(e/i);n(t,r,s)}class L{constructor(t,e){this.positions=t,this.indices=e}}class U{constructor(t,e,i){this.totalDepth=t,this.depthExtremum=e,this.depthExtremumCoords=i}}class k{constructor(t=0,e=0,i=new U(0,1,u()),r=new U(0,0,u())){this.width=t,this.height=e,this.cut=i,this.fill=r}}export{A as CutFillComputationRenderNode,k as CutFillComputationResult,U as CutFillDepthResult,L as TargetGeometryRenderInfo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{property as o,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{InternalRenderCategory as l}from"../../webgl.js";import{glLayout as u}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import c from"../../webgl/RenderNode.js";import{VertexArrayObject as m}from"./VertexArrayObject.js";import{C as h}from"../../../../chunks/CutFillComposition.glsl.js";import{CutFillCompositionTechnique as d}from"../shaders/CutFillCompositionTechnique.js";import{C as f}from"../../../../chunks/CutFillMask.glsl.js";import{CutFillMaskTechnique as p}from"../shaders/CutFillMaskTechnique.js";import{DefaultMaterialPassParameters as C,DefaultMaterialDrawParameters as _,DefaultMaterialTechnique as b}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as g}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{DepthStencilAttachment as V,PrimitiveType as v}from"../../../webgl/enums.js";import{noParameters as T}from"../../../webgl/NoParameters.js";import{VertexBuffer as w}from"../../../webgl/VertexBuffer.js";let F=class extends c{constructor(e){super(e),this.consumes={required:[l.CUTFILL_COLOR,l.GROUND_DEPTH]},this.produces=l.CUTFILL_COLOR,this.measureType="cut-fill",this._vaoCut=null,this._vaoFill=null,this._maskParameters=new f,this._cutVolumeParameters=new C,this._fillVolumeParameters=new C,this._compositeParameters=new h,this._drawParameters=new _;const t=1===e.view.state.viewingMode;this._cutVolumeConfiguration=new g(t),this._cutVolumeConfiguration.customDepthTest=2,this._cutVolumeConfiguration.writeDepth=!1,this._cutVolumeConfiguration.cullFace=1,this._cutVolumeConfiguration.doubleSidedMode=2,this._fillVolumeConfiguration=new g(t),this._fillVolumeConfiguration.customDepthTest=1,this._fillVolumeConfiguration.cullFace=2}initialize(){this.addHandles([i(()=>[this.cutColor,this.fillColor],()=>this._updateColors(),s),i(()=>this.measureType,()=>this.requestRender(1),s)])}destroy(){this._disposeVaos()}precompile(){"cut-fill"===this.measureType?(this._cutVolumeConfiguration.cullFace=1,this._cutVolumeConfiguration.doubleSidedMode=2):(this._cutVolumeConfiguration.cullFace=0,this._cutVolumeConfiguration.doubleSidedMode=0),this.techniques.precompile(b,this._cutVolumeConfiguration),this.techniques.precompile(b,this._fillVolumeConfiguration),this.techniques.precompile(p),this.techniques.precompile(d)}render(e){const t=this.techniques.getCompiled(b,this._cutVolumeConfiguration),i=this.techniques.getCompiled(b,this._fillVolumeConfiguration),s=this.techniques.getCompiled(p),o=this.techniques.getCompiled(d),r=e.find(({name:e})=>e===this.produces);if(!this._vaoCut||!this._vaoFill)return r;const a=this._vaoCut.vertexCount("geometry"),u=this._vaoFill.vertexCount("geometry");if(!(t&&i&&s&&o))return this.requestRender(1),r;const n=this.bindParameters,c=n.camera,m=c.fullViewport[2],h=c.fullViewport[3],f=this.renderingContext,C=this.fboCache,_=e.find(({name:e})=>e===l.GROUND_DEPTH),g=C.acquire(m,h,"cutfill color mask",2);g.attachDepth(_.getAttachment(V)),f.bindFramebuffer(g.fbo),f.setClearColor(0,0,0,1),f.clear(17408),f.setViewport(0,0,m,h),f.bindTechnique(s,n,T,this._maskParameters),f.setFaceCullingEnabled(!1),f.setStencilTestEnabled(!0),f.setStencilOpSeparate(1028,7680,34055,7680),f.setStencilOpSeparate(1029,7680,34056,7680),f.setDepthWriteEnabled(!1),f.bindVAO(this._vaoCut),f.setDepthTestEnabled(!0),f.setStencilWriteMask(255),f.setStencilFunction(519,0,255),f.setColorMask(!1,!1,!1,!1),f.drawArrays(v.TRIANGLES,0,a),f.setDepthTestEnabled(!1),f.setStencilWriteMask(0),f.setStencilFunction(517,0,255),f.setColorMask(!0,!1,!1,!1),f.drawArrays(v.TRIANGLES,0,a),f.bindVAO(this._vaoFill),f.setDepthTestEnabled(!0),f.setStencilWriteMask(255),f.setStencilFunction(519,0,255),f.setColorMask(!1,!0,!1,!1),f.drawArrays(v.TRIANGLES,0,u);const w=C.acquire(m,h,"cutfill color cut volume",5);w.acquireDepth(13),f.blitFramebuffer(r.fbo,w.fbo,256),f.bindFramebuffer(w.fbo),f.setClearColor(0,0,0,0),f.clear(16384),f.setColorMask(!0,!0,!0,!0),f.bindTechnique(t,this.bindParameters,this._cutVolumeParameters,this._drawParameters),f.bindVAO(this._vaoCut),f.drawArrays(v.TRIANGLES,0,a);const F=C.acquire(m,h,"cutfill color fill volume",5);F.acquireDepth(13),f.blitFramebuffer(r.fbo,F.fbo,256),f.bindFramebuffer(F.fbo),f.setClearColor(0,0,0,0),f.clear(16384),f.setColorMask(!0,!0,!0,!0),f.bindTechnique(i,this.bindParameters,this._fillVolumeParameters,this._drawParameters),f.bindVAO(this._vaoFill),f.drawArrays(v.TRIANGLES,0,u);const P=this.fboCache.acquire(m,h,this.produces);return f.bindFramebuffer(P.fbo),this._compositeParameters.color=r.getTexture(),this._compositeParameters.cutVolume=w.getTexture(),this._compositeParameters.fillVolume=F.getTexture(),this._compositeParameters.cutFillMask=g.getTexture(),this._compositeParameters.sceneDepth=r.getTexture(V),this._compositeParameters.referenceDepth=_.getTexture(V),this.borderColor.toUnitRGBA(this._compositeParameters.borderColor),f.bindTechnique(o,n,this._compositeParameters),f.screen.draw(),g.release(),w.release(),F.release(),P.attachDepth(r.getAttachment(V)),P}enable(){this.produces=l.CUTFILL_COLOR,this.requestRender(1)}disable(){this.produces="disabled",this.requestRender(1)}updateGeometries(e,t,i){this._disposeVaos(),this._vaoCut=this._createVao(e),this._vaoFill=this._createVao(t),this._maskParameters.origin=i,a(this._drawParameters.origin,i),this.requestRender(1)}_updateColors(){this._cutVolumeParameters.diffuse=this.cutColor.toUnitRGB(),this._cutVolumeParameters.opacity=this.cutColor.a,this._fillVolumeParameters.diffuse=this.fillColor.toUnitRGB(),this._fillVolumeParameters.opacity=this.fillColor.a,this.requestRender(1)}_createVao(e){const
|
|
2
|
+
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../core/maybe.js";import{watch as i,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{property as o,subclass as r}from"../../../../core/accessorSupport/decorators.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{InternalRenderCategory as l}from"../../webgl.js";import{glLayout as u}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import c from"../../webgl/RenderNode.js";import{VertexArrayObject as m}from"./VertexArrayObject.js";import{C as h}from"../../../../chunks/CutFillComposition.glsl.js";import{CutFillCompositionTechnique as d}from"../shaders/CutFillCompositionTechnique.js";import{C as f}from"../../../../chunks/CutFillMask.glsl.js";import{CutFillMaskTechnique as p}from"../shaders/CutFillMaskTechnique.js";import{DefaultMaterialPassParameters as C,DefaultMaterialDrawParameters as _,DefaultMaterialTechnique as b}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as g}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{DepthStencilAttachment as V,PrimitiveType as v}from"../../../webgl/enums.js";import{noParameters as T}from"../../../webgl/NoParameters.js";import{VertexBuffer as w}from"../../../webgl/VertexBuffer.js";let F=class extends c{constructor(e){super(e),this.consumes={required:[l.CUTFILL_COLOR,l.GROUND_DEPTH]},this.produces=l.CUTFILL_COLOR,this.measureType="cut-fill",this._vaoCut=null,this._vaoFill=null,this._maskParameters=new f,this._cutVolumeParameters=new C,this._fillVolumeParameters=new C,this._compositeParameters=new h,this._drawParameters=new _;const t=1===e.view.state.viewingMode;this._cutVolumeConfiguration=new g(t),this._cutVolumeConfiguration.customDepthTest=2,this._cutVolumeConfiguration.writeDepth=!1,this._cutVolumeConfiguration.cullFace=1,this._cutVolumeConfiguration.doubleSidedMode=2,this._fillVolumeConfiguration=new g(t),this._fillVolumeConfiguration.customDepthTest=1,this._fillVolumeConfiguration.cullFace=2}initialize(){this.addHandles([i(()=>[this.cutColor,this.fillColor],()=>this._updateColors(),s),i(()=>this.measureType,()=>this.requestRender(1),s)])}destroy(){this._disposeVaos()}precompile(){"cut-fill"===this.measureType?(this._cutVolumeConfiguration.cullFace=1,this._cutVolumeConfiguration.doubleSidedMode=2):(this._cutVolumeConfiguration.cullFace=0,this._cutVolumeConfiguration.doubleSidedMode=0),this.techniques.precompile(b,this._cutVolumeConfiguration),this.techniques.precompile(b,this._fillVolumeConfiguration),this.techniques.precompile(p),this.techniques.precompile(d)}render(e){const t=this.techniques.getCompiled(b,this._cutVolumeConfiguration),i=this.techniques.getCompiled(b,this._fillVolumeConfiguration),s=this.techniques.getCompiled(p),o=this.techniques.getCompiled(d),r=e.find(({name:e})=>e===this.produces);if(!this._vaoCut||!this._vaoFill)return r;const a=this._vaoCut.vertexCount("geometry"),u=this._vaoFill.vertexCount("geometry");if(!(t&&i&&s&&o))return this.requestRender(1),r;const n=this.bindParameters,c=n.camera,m=c.fullViewport[2],h=c.fullViewport[3],f=this.renderingContext,C=this.fboCache,_=e.find(({name:e})=>e===l.GROUND_DEPTH),g=C.acquire(m,h,"cutfill color mask",2);g.attachDepth(_.getAttachment(V)),f.bindFramebuffer(g.fbo),f.setClearColor(0,0,0,1),f.clear(17408),f.setViewport(0,0,m,h),f.bindTechnique(s,n,T,this._maskParameters),f.setFaceCullingEnabled(!1),f.setStencilTestEnabled(!0),f.setStencilOpSeparate(1028,7680,34055,7680),f.setStencilOpSeparate(1029,7680,34056,7680),f.setDepthWriteEnabled(!1),f.bindVAO(this._vaoCut),f.setDepthTestEnabled(!0),f.setStencilWriteMask(255),f.setStencilFunction(519,0,255),f.setColorMask(!1,!1,!1,!1),f.drawArrays(v.TRIANGLES,0,a),f.setDepthTestEnabled(!1),f.setStencilWriteMask(0),f.setStencilFunction(517,0,255),f.setColorMask(!0,!1,!1,!1),f.drawArrays(v.TRIANGLES,0,a),f.bindVAO(this._vaoFill),f.setDepthTestEnabled(!0),f.setStencilWriteMask(255),f.setStencilFunction(519,0,255),f.setColorMask(!1,!0,!1,!1),f.drawArrays(v.TRIANGLES,0,u);const w=C.acquire(m,h,"cutfill color cut volume",5);w.acquireDepth(13),f.blitFramebuffer(r.fbo,w.fbo,256),f.bindFramebuffer(w.fbo),f.setClearColor(0,0,0,0),f.clear(16384),f.setColorMask(!0,!0,!0,!0),f.bindTechnique(t,this.bindParameters,this._cutVolumeParameters,this._drawParameters),f.bindVAO(this._vaoCut),f.drawArrays(v.TRIANGLES,0,a);const F=C.acquire(m,h,"cutfill color fill volume",5);F.acquireDepth(13),f.blitFramebuffer(r.fbo,F.fbo,256),f.bindFramebuffer(F.fbo),f.setClearColor(0,0,0,0),f.clear(16384),f.setColorMask(!0,!0,!0,!0),f.bindTechnique(i,this.bindParameters,this._fillVolumeParameters,this._drawParameters),f.bindVAO(this._vaoFill),f.drawArrays(v.TRIANGLES,0,u);const P=this.fboCache.acquire(m,h,this.produces);return f.bindFramebuffer(P.fbo),this._compositeParameters.color=r.getTexture(),this._compositeParameters.cutVolume=w.getTexture(),this._compositeParameters.fillVolume=F.getTexture(),this._compositeParameters.cutFillMask=g.getTexture(),this._compositeParameters.sceneDepth=r.getTexture(V),this._compositeParameters.referenceDepth=_.getTexture(V),this.borderColor.toUnitRGBA(this._compositeParameters.borderColor),f.bindTechnique(o,n,this._compositeParameters),f.screen.draw(),g.release(),w.release(),F.release(),P.attachDepth(r.getAttachment(V)),P}enable(){this.produces=l.CUTFILL_COLOR,this.requestRender(1)}disable(){this.produces="disabled",this.requestRender(1)}updateGeometries(e,t,i){this._disposeVaos(),this._vaoCut=this._createVao(e),this._vaoFill=this._createVao(t),this._maskParameters.origin=i,a(this._drawParameters.origin,i),this.requestRender(1)}_updateColors(){this._cutVolumeParameters.diffuse=this.cutColor.toUnitRGB(),this._cutVolumeParameters.opacity=this.cutColor.a,this._fillVolumeParameters.diffuse=this.fillColor.toUnitRGB(),this._fillVolumeParameters.opacity=this.fillColor.a,this.requestRender(1)}_createVao(e){const{vertices:t,normals:i,indicesBottom:s,indicesExtruded:o}=e,r=s.length+o.length,a=this.renderingContext,l=P.createBuffer(r),{position:n,normal:c}=l;let h=0;for(let u=0;u<s.length;u++){const e=3*s[u];n.set(h,0,t[e]),n.set(h,1,t[e+1]),n.set(h,2,t[e+2]),c.set(h,0,i[e]),c.set(h,1,i[e+1]),c.set(h,2,i[e+2]),h++}for(let u=0;u<o.length;u++){const e=3*o[u];n.set(h,0,t[e]),n.set(h,1,t[e+1]),n.set(h,2,t[e+2]),c.set(h,0,i[e]),c.set(h,1,i[e+1]),c.set(h,2,i[e+2]),h++}const d=new w(a,u(P),l.buffer);return new m(a,d)}_disposeVaos(){this._vaoCut=t(this._vaoCut),this._vaoFill=t(this._vaoFill)}};e([o()],F.prototype,"consumes",void 0),e([o()],F.prototype,"produces",void 0),e([o()],F.prototype,"cutColor",void 0),e([o()],F.prototype,"fillColor",void 0),e([o()],F.prototype,"borderColor",void 0),e([o()],F.prototype,"measureType",void 0),F=e([r("esri.views.3d.webgl-engine.lib.CutFillVisualizationRenderNode")],F);const P=n().vec3f("position").vec3f("normal").freeze();class q{constructor(e,t,i,s){this.vertices=e,this.indicesBottom=t,this.indicesExtruded=i,this.normals=s}}export{F as CutFillVisualizationRenderNode,q as VolumeGeometry};
|
package/views/3d/webgl.d.ts
CHANGED
|
@@ -164,7 +164,7 @@ export function fromRenderCoordinates<T1 extends ArrayLike<number>, T2 extends A
|
|
|
164
164
|
* * Y: Northing
|
|
165
165
|
* * Z: Elevation
|
|
166
166
|
*
|
|
167
|
-
* 
|
|
168
168
|
*
|
|
169
169
|
* When [view.viewingMode](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#viewingMode) is `global`, a linear
|
|
170
170
|
* transformation does not take the curvature of the globe or other non-linear projection aspects into account. Thus,
|
package/views/Magnifier.d.ts
CHANGED
|
@@ -8,19 +8,19 @@ export interface MagnifierProperties extends Partial<Pick<Magnifier, "factor" |
|
|
|
8
8
|
* as a magnified image. An instance of this class can be accessed through
|
|
9
9
|
* either [MapView.magnifier](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#magnifier) or [SceneView.magnifier](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#magnifier).
|
|
10
10
|
*
|
|
11
|
-
* 
|
|
12
12
|
*
|
|
13
13
|
* As you can see in the screenshot above, the Magnifier utilizes a default overlay image of a magnifier
|
|
14
14
|
* glass. The overlay image is set using the [overlayUrl](https://developers.arcgis.com/javascript/latest/references/core/views/Magnifier/#overlayUrl) property. You can disable the overlay image by setting the [overlayEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/Magnifier/#overlayEnabled) to `false`. The following
|
|
15
15
|
* demonstrates using a Magnifier without an overlay image.
|
|
16
16
|
*
|
|
17
|
-
* 
|
|
18
18
|
*
|
|
19
19
|
* The Magnifier contains a default mask image, which is set using the [maskUrl](https://developers.arcgis.com/javascript/latest/references/core/views/Magnifier/#maskUrl), and determines the visible area of the magnified image. Be default, the magnified area
|
|
20
20
|
* is in the shape of a circle. The following demonstrates an example of a mask image set in the shape of a square. Note that the `overlayEnabled` was set
|
|
21
21
|
* to `false` in this example as well to hide the overlay image, and only display the magnified area.
|
|
22
22
|
*
|
|
23
|
-
* 
|
|
24
24
|
*
|
|
25
25
|
* @since 4.19
|
|
26
26
|
* @see [MapView.magnifier](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#magnifier)
|