@arcgis/core 4.33.0-next.20250512 → 4.33.0-next.20250514
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/arcade/functions/centroid.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/geometry/operators.js +1 -1
- package/arcade/geometry/operatorsWorker.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/assets/components/assets/combobox/t9n/messages.en.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.json +1 -1
- package/assets/components/assets/icon/calendarHeatChart16.json +1 -0
- package/assets/components/assets/icon/calendarHeatChart24.json +1 -0
- package/assets/components/assets/icon/calendarHeatChart32.json +1 -0
- package/assets/components/assets/icon/matrixHeatChart16.json +1 -0
- package/assets/components/assets/icon/matrixHeatChart24.json +1 -0
- package/assets/components/assets/icon/matrixHeatChart32.json +1 -0
- package/assets/components/assets/icon/progressBarChart16.json +1 -0
- package/assets/components/assets/icon/progressBarChart24.json +1 -0
- package/assets/components/assets/icon/progressBarChart32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualization16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualization24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualization32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOpen16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOpen24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOpen32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlined16F.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlined24F.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlined32F.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedColorLocked16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedColorLocked24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedColorLocked32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpen16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpen24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpen32.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpenColorLocked16.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpenColorLocked24.json +1 -0
- package/assets/components/assets/icon/spikeDataVisualizationOutlinedOpenColorLocked32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0766ecb677d667e5fb83.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{4deeeceb784e4390441d.js → 0a4cece5e96fb7e8a57b.js} +1 -1
- package/assets/esri/core/workers/chunks/12e99071f6582f6caeaf.js +1 -0
- package/assets/esri/core/workers/chunks/191a45a594ecaf7f1abb.js +1 -0
- package/assets/esri/core/workers/chunks/1991f0d0f0a12175f849.js +1 -0
- package/assets/esri/core/workers/chunks/218a66d53f7cf4f285aa.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{07695960aa0344dbfbf3.js → 28d9e2ffc3059a55311e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a5e746e10239a3bfe237.js → 30f3014c0ac6e2bc14bf.js} +1 -1
- package/assets/esri/core/workers/chunks/3596540ef49e5330ceb2.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/4899cdc8bb5085c356f9.js +1 -0
- package/assets/esri/core/workers/chunks/498886c321a2501658bc.js +1 -0
- package/assets/esri/core/workers/chunks/56569d0c2cf5c5167651.js +1 -0
- package/assets/esri/core/workers/chunks/{ba3193ea145960a50e87.js → 5c8d52b72a3bea4202ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{fbcd94f60f92257a7303.js → 6394ab6f629aa90292e6.js} +2 -2
- package/assets/esri/core/workers/chunks/{fbcd94f60f92257a7303.js.LICENSE.txt → 6394ab6f629aa90292e6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{8b74b609de4f70e1a75c.js → 64af433e88d4dd21a2ff.js} +1 -1
- package/assets/esri/core/workers/chunks/{2b01e3bce78541620a86.js → 6cbe8205a4e0f62da519.js} +1 -1
- package/assets/esri/core/workers/chunks/6e64ce0958c3432004b6.js +346 -0
- package/assets/esri/core/workers/chunks/6e8c6c9112ecb867b7be.js +1 -0
- package/assets/esri/core/workers/chunks/{a8430e1e2142f1ce9b92.js → 82c395d8649096609a8a.js} +1 -1
- package/assets/esri/core/workers/chunks/{a73c6b4bc5baf440f85a.js → 88b7265270feede80e1d.js} +1 -1
- package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/8c21cc9af4ce9652cc5c.js +1 -0
- package/assets/esri/core/workers/chunks/{243dc74ec62891ba1ef7.js → 8e82acd1f730571680f4.js} +1 -1
- package/assets/esri/core/workers/chunks/90ae15ce22a49bd84876.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/a09b5700c92bb76c3234.js +1 -0
- package/assets/esri/core/workers/chunks/b06cb23048c32940f5de.js +1 -0
- package/assets/esri/core/workers/chunks/{079434fe765c53d304f2.js → b1e275607d9754079f60.js} +1 -1
- package/assets/esri/core/workers/chunks/b4f38fe9cc948a39ad87.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{3c45603af279ad7fed8c.js → b8b5dfd2d73a8410fba2.js} +1 -1
- package/assets/esri/core/workers/chunks/c604fefedccfd4db9953.js +1 -0
- package/assets/esri/core/workers/chunks/{0aca29f7156b2b412f2e.js → d1f7bfb8daf11ecada9f.js} +1 -1
- package/assets/esri/core/workers/chunks/{b816b608f31954128246.js → d21d9e8b8c8a2e0485d5.js} +1 -1
- package/assets/esri/core/workers/chunks/da3c62a851a4332f6dda.js +1 -0
- package/assets/esri/core/workers/chunks/{a8b42d8c0b76c234c09f.js → e0247252c6a0f3340e33.js} +81 -82
- package/assets/esri/core/workers/chunks/e0dc8794343c2a949ffb.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/e5608e5232e983531f72.js +1 -0
- package/assets/esri/core/workers/chunks/f8fb0c7eaf73709bd855.js +1 -0
- package/assets/esri/core/workers/chunks/fd24dd602a3fed88d90e.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +17 -10
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +4 -0
- package/assets/esri/themes/base/widgets/_SelectionList.scss +7 -3
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/LineSeries.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorDefinitions.js +5 -0
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorSimplifyOGC.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +1 -1
- package/chunks/ShadowHighlight.glsl.js +5 -5
- package/chunks/Theme.js +1 -1
- package/chunks/Tick.js +1 -1
- package/chunks/arcade.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/accessorSupport/Lifecycle.js +5 -0
- package/core/accessorSupport/Properties.js +1 -1
- package/core/accessorSupport/decorators/subclass.js +1 -1
- package/core/accessorSupport/tracking/Flags.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/mapCollectionUtils.js +1 -1
- package/core/urlUtils.js +1 -1
- package/geometry/operators/gx/operatorIntegrate.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorSimplifyOGC.js +1 -1
- package/geometry/operators/simplifyOGCOperator.js +1 -1
- package/interfaces.d.ts +368 -2450
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/KnowledgeGraphLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/knowledgeGraph/supportUtils.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/package.json +3 -4
- package/smartMapping/statistics/uniqueValues.js +1 -1
- package/smartMapping/support/adapters/support/layerUtils.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/effects/EffectRadial.js +1 -1
- package/versionManagement/versionAdapters/FeatureLayerVersionAdapter.js +1 -1
- package/versionManagement/versionAdapters/NetworkVersionAdapter.js +1 -1
- package/versionManagement/versionAdapters/SubTypeGroupLayerVersionAdapter.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/3d/FocusAreasView.js +5 -0
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/Lyr3DWasm.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/graphics/pipeline/FeatureProcessingContext.js +1 -1
- package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/TileLocks.js +5 -0
- package/views/3d/layers/graphics/pipeline/featureData/FeatureData.js +1 -1
- package/views/3d/layers/graphics/pipeline/featureData/FeatureDataSubset.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/i3s/I3SQueryResultGeometry.js +1 -1
- package/views/3d/layers/i3s/meshUtils.js +5 -0
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/terrain/TileTexture.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -27
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js +29 -0
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View.js +1 -1
- package/views/analysis/analysisViewUtils.js +1 -1
- package/views/layers/BuildingComponentSublayerView.js +1 -1
- package/views/layers/BuildingSceneLayerView.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/support/TextureCompressionWorkerHandle.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/FeatureTable/AttachmentsColumn.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Slice.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
- package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/009dbddfc6499e2cee4f.js +0 -1
- package/assets/esri/core/workers/chunks/1b8cc83aa1179245b2dc.js +0 -1
- package/assets/esri/core/workers/chunks/26ebb7816dd8c8cd4f3b.js +0 -1
- package/assets/esri/core/workers/chunks/2abce00d812c7f6b542d.js +0 -1
- package/assets/esri/core/workers/chunks/47cd99ab3ed11a931084.js +0 -1
- package/assets/esri/core/workers/chunks/51d9eaeeb781fd1d1162.js +0 -1
- package/assets/esri/core/workers/chunks/5228fc7fcdf57f44781e.js +0 -1
- package/assets/esri/core/workers/chunks/83d6a1b3db7d364d156b.js +0 -1
- package/assets/esri/core/workers/chunks/83e13baab4b90a88d967.js +0 -1
- package/assets/esri/core/workers/chunks/92cbe9af8a6c061bfb57.js +0 -346
- package/assets/esri/core/workers/chunks/93cc26e5636040fdc0b8.js +0 -1
- package/assets/esri/core/workers/chunks/c17c269cc30e7e1d0bfb.js +0 -1
- package/assets/esri/core/workers/chunks/c3f144ca69995dca34a9.js +0 -1
- package/assets/esri/core/workers/chunks/d551f70560a2b1ef5696.js +0 -1
- package/core/accessorSupport/interfaces.js +0 -5
- package/views/3d/layers/graphics/pipeline/TileActionSynchronizer.js +0 -5
- package/views/FocusAreasView.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import e from"../../../../analysis/SlicePlane.js";import{clock as i}from"../../../../core/clock.js";import{destroyMaybe as a,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as r,when as l,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{addFrameTask as h}from"../../../../core/scheduling.js";import{createScreenPoint as p,screenPointObjectToArray as u}from"../../../../core/screenUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as d}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromRotation as _,fromScaling as v,multiply as P}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{e as y,l as m,c as w,g,f,t as M,n as D,i as V}from"../../../../chunks/vec32.js";import{create as b,clone as T}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{clone as E,ZEROS as k}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{d as S,a as x,n as j,f as H}from"../../../../chunks/boundedPlane.js";import{signedDistance as C,create as R,intersectRay as O,getNormal as I}from"../../../../geometry/support/plane.js";import{create as z}from"../../../../geometry/support/ray.js";import{sv3d as G,sm4d as L,sv2d as U}from"../../../../geometry/support/vectorStacks.js";import{getRotateHeadingTexture as A,getTiltRotateTexture as K}from"../images/Factory.js";import{ResizeManipulator as B}from"./ResizeManipulator.js";import{RotateManipulator as F}from"./RotateManipulator.js";import{getOutlineColor as N,planeColor as q}from"./settings.js";import{ShiftManipulator as Z,OffsetMode as W}from"./ShiftManipulator.js";import{pointerMoveTimerMs as J,planePreviewOutlineWidth as Q,forceVerticalModifier as X,forceHorizontalModifier as Y,previewFadeDurationSeconds as $,previewFadeDotThreshold as tt,initialDepthOffsetFrac as et}from"./sliceToolConfig.js";import{createGridVisualElement as it,createOutlineVisualElement as at,planeToShape as st,createRotatePlane as nt,RotationAxis as rt,resizePlane as lt,calculatePlaneHalfSize as ot,SliceOrientation as ht,createPlane as pt,DidPointerMoveRecentlyFlag as ut,calculateBoundedPlaneTranslateRotate as ct,updateShiftRestartHandle as dt,updateRotateHeadingHandle as _t,updateRotateTiltHandle as vt,updateResizeHandle as Pt,createShiftPlane as yt}from"./sliceToolUtils.js";import{calculateInputRotationTransform as mt}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as wt}from"../../interactive/editingTools/dragEventPipeline3D.js";import{fromScreenNormalized as gt}from"../../support/geometryUtils/ray.js";import{AnalysisToolBase as ft}from"../../../interactive/AnalysisToolBase.js";import{createManipulatorDragEventPipeline as Mt}from"../../../interactive/dragEventPipeline.js";import{newToolIntersector as Dt}from"../../../interactive/ToolIntersector.js";import{createScreenPointFromEvent as Vt}from"../../../support/screenUtils.js";var bt;let Tt=class extends ft{static{bt=this}constructor(t){super(t),this._clock=i,this._previewPlaneOpacity=1,this.removeIncompleteOnCancel=!1,this._layersMode="none",this.shiftManipulator=null,this.rotateHeadingManipulator=null,this.rotateTiltManipulator=null,this.resizeManipulators=null,this._frameTask=null,this._pointerMoveTimerMs=J,this._prevPointerMoveTimeout=null,this._previewPlaneGridVisualElement=null,this._previewPlaneOutlineVisualElement=null,this._startPlane=S(),this._previewPlane=null,this._activeKeyModifiers={},this._lastCursorPosition=p(),this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._intersector=Dt(t.view.state.viewingMode)}initialize(){if(null==this.analysis)throw new Error("SliceTool requires valid analysis, but null was provided.");const t=t=>{this._updateManipulatorsInteractive(t),t.grabbing||(null!=this.analysisViewData.plane&&x(this.analysisViewData.plane,this._startPlane),this.inputState=null)},e=new Z(this.view,W.CENTER_ON_ARROW);this.shiftManipulator=e,this.manipulators.add(e),this.addHandles([this._createShiftDragPipeline(e),e.events.on("grab-changed",(i=>{this._onShiftGrab(i),t(e)}))]);const i=!this.view.stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result,a=new F(this.view,((t,e)=>A(this.view.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:i})));this.rotateHeadingManipulator=a,this.manipulators.add(a),this.addHandles([this._createRotateHeadingDragPipeline(a),a.events.on("grab-changed",(e=>{this._onRotateHeadingGrab(e),t(a)}))]);const s=new F(this.view,((t,e)=>K(this.view.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:i})));this.rotateTiltManipulator=s,this.manipulators.add(s),this.addHandles([this._createRotateTiltDragPipeline(s),s.events.on("grab-changed",(e=>{this._onRotateTiltGrab(e),t(s)}))]),this.resizeManipulators=this._resizeHandles.map(((e,i)=>{const a=new B(this.view,e);return this.addHandles([this._createResizeDragPipeline(a),a.events.on("grab-changed",(e=>{this._onResizeGrab(e,i),t(a)}))]),a})),this.manipulators.addMany(this.resizeManipulators),this._previewPlaneGridVisualElement=it(this.view),this._previewPlaneOutlineVisualElement=at(this.view),this._previewPlaneOutlineVisualElement.width=Q,this.addHandles(n((()=>[this.analysisViewData.plane,this.analysis.tiltEnabled]),(()=>this._updateManipulators()),r)),this.addHandles([l((()=>"sliced"===this.state),(()=>{this.finishToolCreation(),this.stop()}),o),n((()=>this.view.state.camera),(()=>this._onCameraChange()))])}destroy(){this._removeFrameTask(),this._clearPointerMoveTimeout(),this._previewPlaneOutlineVisualElement=a(this._previewPlaneOutlineVisualElement),this._previewPlaneGridVisualElement=a(this._previewPlaneGridVisualElement)}get state(){const t=!!this.analysisViewData.plane,e=!!this.inputState;return t?t&&e?"slicing":t&&!e?"sliced":"ready":"ready"}get cursor(){return this._isPlacingSlicePlane||"exclude"===this.layersMode?"crosshair":null!=this._creatingPointerId?"grabbing":null}set analysis(t){if(null==t)throw new Error("SliceTool requires valid analysis, but null was provided.");this.removeHandles("analysis"),this._set("analysis",t)}get layersMode(){return this._layersMode}static{this.disableEngineLayers=!1}get inputState(){return this._get("inputState")}set inputState(t){this._set("inputState",t),this.analysisViewData.showGrid=null!=t&&"resize"===t.type,this._updateMaterials()}get _isPlacingSlicePlane(){return!this.inputState&&!this.analysisViewData.plane&&this.active}get _creatingPointerId(){return null!=this.inputState&&"shift"===this.inputState.type?this.inputState.creatingPointerId:null}stop(){this.active&&(this.view.activeTool=null)}enterExcludeLayerMode(){null!=this.analysisViewData.plane&&(this._layersMode="exclude",this.active||(this.view.activeTool=this))}exitExcludeLayerMode(){null!=this.analysisViewData.plane&&(this._layersMode="none",this.stop())}onDeactivate(){this._updatePreviewPlane(null)}onShow(){this._updateVisibility(!0)}onHide(){this._updateVisibility(!1)}_updateVisibility(t){this._updateManipulators(),t||this._clearPointerMoveTimeout()}onInputEvent(t){switch(t.type){case"pointer-drag":if(!kt(t))return;this._isPlacingSlicePlane?this._onClickPlacePlane(t)&&t.stopPropagation():this._onPointerDrag(t)&&t.stopPropagation();break;case"pointer-move":this._onPointerMove(t);break;case"pointer-up":this._onPointerUp(t)&&t.stopPropagation();break;case"immediate-click":if(!kt(t))return;this._onClickPlacePlane(t)&&t.stopPropagation();break;case"click":if(!kt(t))return;this._onClickExcludeLayer(t)&&t.stopPropagation();break;case"drag":this.inputState&&t.stopPropagation();break;case"key-down":this._onKeyDown(t)&&t.stopPropagation();break;case"key-up":this._onKeyUp(t)&&t.stopPropagation()}}onEditableChange(){this.analysisViewData.editable=this.internallyEditable}_onPointerDrag(t){const e=this.inputState;if(t.pointerId===this._creatingPointerId&&null!=e&&"shift"===e.type){const i=Vt(t);return this.shiftManipulator.events.emit("drag",{action:e.hasBeenDragged?"update":"start",pointerType:t.pointerType,start:i,screenPoint:i}),e.hasBeenDragged=!0,!0}return!1}_onPointerMove(t){this._lastCursorPosition.x=t.x,this._lastCursorPosition.y=t.y,this._resetPointerMoveTimeout(),"touch"!==t.pointerType&&this._updatePreviewPlane(Vt(t),this._activeKeyModifiers)}_onCameraChange(){this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),this._updateManipulators()}_onPointerUp(t){if(t.pointerId===this._creatingPointerId&&null!=this.analysisViewData.plane){const e=Vt(t);return this.shiftManipulator.events.emit("drag",{action:"end",start:e,screenPoint:e}),x(this.analysisViewData.plane,this._startPlane),this.inputState=null,!0}return!1}_onClickPlacePlane(t){if("exclude"===this.layersMode)return!1;if(this._isPlacingSlicePlane){const i=Vt(t),a=S();if(this._pickPlane(i,!1,this._activeKeyModifiers,a)){if("pointer-drag"===t.type){const e=gt(this.view.state.camera,i,xt);this.inputState=Et(e,t.pointerId,a.origin,a)}return x(a,this._startPlane),this.analysis.shape=st(a,this.view,this.view.spatialReference,new e),!0}}return!1}_onClickExcludeLayer(t){return!("exclude"!==this.layersMode||!this.created)&&(this.view.hitTest(Vt(t)).then((t=>{if(t.results.length){const e=t.results[0],i="graphic"===e?.type&&e.graphic;if(i){const t=i.sourceLayer||i.layer;t&&this.analysis.excludedLayers.push(t)}}else t.ground.layer?this.analysis.excludedLayers.push(t.ground.layer):this.analysis.excludeGroundSurface=!0})),this.exitExcludeLayerMode(),!0)}_onKeyDown(t){return(t.key===X||t.key===Y)&&(this._activeKeyModifiers[t.key]=!0,null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onKeyUp(t){return!(t.key!==X&&t.key!==Y||!this._activeKeyModifiers[t.key])&&(delete this._activeKeyModifiers[t.key],null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onShiftGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=gt(this.view.state.camera,t.screenPoint,xt);x(this.analysisViewData.plane,this._startPlane),this.inputState=Et(e,null,this.shiftManipulator.renderLocation,this.analysisViewData.plane)}_createShiftDragPipeline(t){return Mt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"shift"!==a.type)return;const s=null!=this.analysisViewData.plane?x(this.analysisViewData.plane,S()):null;e.next(wt(this.view,a.shiftPlane)).next(this._shiftDragAdjustSensitivity(a)).next(this._shiftDragUpdatePlane(a)),i.next((()=>{null!=s&&this._updateBoundedPlane(s)}))}))}_shiftDragAdjustSensitivity(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=.001,a=Math.min((1-Math.abs(y(j(this.analysisViewData.plane),e.ray.direction)/m(e.ray.direction)))/i,1),s=-C(this._startPlane.plane,e.renderEnd),n=-C(this._startPlane.plane,t.startPoint);return t.depth=t.depth*(1-a)+s*a-n,e}}_shiftDragUpdatePlane(t){return()=>{if(null==this.analysisViewData.plane)return;const e=w(G.get(),this._startPlane.origin),i=w(G.get(),j(this._startPlane));g(i,i,-t.depth),f(i,i,e);const a=H(i,this.analysisViewData.plane.basis1,this.analysisViewData.plane.basis2,S());this._updateBoundedPlane(a)}}_onRotateHeadingGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=nt(this.analysisViewData.plane,this.view.renderCoordsHelper,rt.HEADING,R()),i=gt(this.view.state.camera,t.screenPoint,xt),a=b();O(e,i,a)&&(x(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateHeadingDragPipeline(t){return Mt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?x(this.analysisViewData.plane,S()):null;e.next(wt(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next((()=>{null!=s&&this._updateBoundedPlane(s)}))}))}_onRotateTiltGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=nt(this.analysisViewData.plane,this.view.renderCoordsHelper,rt.TILT,R()),i=gt(this.view.state.camera,t.screenPoint,xt),a=b();O(e,i,a)&&(x(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateTiltDragPipeline(t){return Mt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?x(this.analysisViewData.plane,S()):null;e.next(wt(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next((()=>{null!=s&&this._updateBoundedPlane(s)}))}))}_rotateDragRenderPlaneToRotate(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=I(t.rotatePlane),a=mt(t.startPoint,e.renderEnd,this.analysisViewData.plane.origin,i);return{...e,rotateAxis:i,rotateAngle:a}}}_rotateDragUpdatePlaneFromRotate(){return t=>{if(null==this.analysisViewData.plane)return;const e=_(L.get(),t.rotateAngle,t.rotateAxis);if(null==e)return;const i=M(G.get(),this._startPlane.basis1,e),a=M(G.get(),this._startPlane.basis2,e),s=H(this.analysisViewData.plane.origin,i,a,S());this._updateBoundedPlane(s)}}_onResizeGrab(t,e){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const i=gt(this.view.state.camera,t.screenPoint,xt),a=G.get();O(this.analysisViewData.plane.plane,i,a)&&(x(this.analysisViewData.plane,this._startPlane),this.inputState={type:"resize",activeHandleIdx:e,startPoint:T(a)})}_createResizeDragPipeline(t){return Mt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"resize"!==a.type||null==this.analysisViewData.plane)return;const s=x(this.analysisViewData.plane,S());e.next(wt(this.view,this.analysisViewData.plane.plane)).next(this._resizeDragUpdatePlane(a)),i.next((()=>{this._updateBoundedPlane(s)}))}))}_resizeDragUpdatePlane(t){return e=>{if(null==this.analysisViewData.plane)return;const i=this._resizeHandles[t.activeHandleIdx],a=lt(i,t.startPoint,e.renderEnd,this.view.state.camera,this._startPlane,x(this.analysisViewData.plane));this._updateBoundedPlane(a)}}_updateBoundedPlane(t){const e=this.analysisViewData;if(null==e)throw new Error("valid internal object expected");e.plane=t}_updatePreviewPlane(t,e={}){let i=this._previewPlane;if(this._previewPlane=null,null==t)return this._removeFrameTask(),void this._updateManipulators();if(!this.analysisViewData.plane&&this.active){const a=null!=i?i:S();if(i=null!=i?x(i,St):null,this._pickPlane(t,!0,e,a)){const t=tt;let e=!1;null!=i&&(e=y(I(i.plane),I(a.plane))<t||y(D(G.get(),i.basis1),D(G.get(),a.basis1))<t),e&&(this._previewPlaneOpacity=0),this._previewPlane=a}}null!=this._previewPlane&&null==this._frameTask&&0===this._previewPlaneOpacity?this._frameTask=h({update:({deltaTime:t})=>{this._previewPlaneOpacity=Math.min(this._previewPlaneOpacity+t/(1e3*$),1),this._updateManipulators(),1===this._previewPlaneOpacity&&this._removeFrameTask()}}):null==this._previewPlane&&null!=this._frameTask?this._removeFrameTask():null!=this._previewPlane&&this._updateManipulators()}_removeFrameTask(){this._frameTask=s(this._frameTask)}_pickMinResult(t){const e=u(t,U.get());return this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(e,this._intersector),this._intersector.results.min}_pickPlane(t,e,i,a){const s=this._pickMinResult(t),n=G.get();if(!s.getIntersectionPoint(n))return!1;const r=s.getTransformedNormal(G.get()),l=this.view.state.camera;y(r,l.viewForward)>0&&g(r,r,-1);const o=ot(n,l),h=(e?1:-1)*o*et,p=g(G.get(),r,h);f(p,p,n);const u=this.analysis.tiltEnabled?ht.TILTED:ht.HORIZONTAL_OR_VERTICAL,c=i[X]?ht.VERTICAL:i[Y]?ht.HORIZONTAL:u;return pt(p,r,o,o,l,c,this.view.renderCoordsHelper,a),!0}_clearPointerMoveTimeout(){this._prevPointerMoveTimeout=s(this._prevPointerMoveTimeout)}_resetPointerMoveTimeout(){this._clearPointerMoveTimeout(),this.shiftManipulator.state|=ut,this.rotateHeadingManipulator.state|=ut,this.rotateTiltManipulator.state|=ut,this._prevPointerMoveTimeout=this._clock.setTimeout((()=>{this.shiftManipulator.state&=~ut,this.rotateHeadingManipulator.state&=~ut,this.rotateTiltManipulator.state&=~ut}),this._pointerMoveTimerMs)}_updateManipulators(){if(bt.disableEngineLayers)return;let t,e=!1;if(null!=this.analysisViewData.plane)t=this.analysisViewData.plane,e=!1;else{if(null==this._previewPlane)return this.shiftManipulator.available=!1,this.rotateHeadingManipulator.available=!1,this.rotateTiltManipulator.available=!1,this.resizeManipulators.forEach((t=>t.available=!1)),this._previewPlaneOutlineVisualElement.visible=!1,void(this._previewPlaneGridVisualElement.visible=!1);t=this._previewPlane,e=!0}const i=ct(t,L.get());e?(this.shiftManipulator.available=!1,this.rotateHeadingManipulator.available=!1,this.rotateTiltManipulator.available=!1,this.resizeManipulators.forEach((t=>t.available=!1)),this._previewPlaneOutlineVisualElement.attached=!0,this._previewPlaneGridVisualElement.attached=!0,this._previewPlaneOutlineVisualElement.visible=!0,this._previewPlaneGridVisualElement.visible=!0):(this.shiftManipulator.available=!0,this.rotateHeadingManipulator.available=!0,this.rotateTiltManipulator.available=this.analysis.tiltEnabled,this.resizeManipulators.forEach((t=>t.available=!0)),dt(this.shiftManipulator,i,t,this.view.state.camera),_t(this.rotateHeadingManipulator,i,t,this.view.renderCoordsHelper),vt(this.rotateTiltManipulator,i,t),this.resizeManipulators.forEach(((e,a)=>Pt(e,this._resizeHandles[a],i,t))),this._previewPlaneOutlineVisualElement.visible=!1,this._previewPlaneGridVisualElement.visible=!1);const a=V(G.get(),m(t.basis1),m(t.basis2),1),s=v(L.get(),a),n=P(s,i,s);this._previewPlaneOutlineVisualElement.transform=n,this._previewPlaneGridVisualElement.transform=n,this._updateMaterials()}_updateMaterials(){const t=N(this.view.effectiveTheme);t[3]*=this._previewPlaneOpacity;const e=E(q);e[3]*=this._previewPlaneOpacity,this._previewPlaneOutlineVisualElement.color=t,this._previewPlaneGridVisualElement.backgroundColor=e,this._previewPlaneGridVisualElement.gridColor=k}_updateManipulatorsInteractive(t){if(!t.grabbing)return this.shiftManipulator.interactive=!0,this.rotateHeadingManipulator.interactive=!0,this.rotateTiltManipulator.interactive=!0,void this.resizeManipulators.forEach((t=>{t.interactive=!0}));this.shiftManipulator.interactive=this.shiftManipulator===t,this.rotateHeadingManipulator.interactive=this.rotateHeadingManipulator===t,this.rotateTiltManipulator.interactive=this.rotateTiltManipulator===t,this.resizeManipulators.forEach((e=>{e.interactive=e===t}))}get test(){return{plane:this.analysisViewData.plane,setPointerMoveTimerMs:t=>{this._pointerMoveTimerMs=t}}}};function Et(t,e,i,a){const s=yt(i,j(a),t.direction,R()),n=b();return O(s,t,n)?{type:"shift",creatingPointerId:e,hasBeenDragged:!1,shiftPlane:s,depth:0,startPoint:n}:null}function kt(t){return"mouse"!==t.pointerType||0===t.button}t([c()],Tt.prototype,"_clock",void 0),t([c({constructOnly:!0})],Tt.prototype,"view",void 0),t([c()],Tt.prototype,"analysisViewData",void 0),t([c({readOnly:!0})],Tt.prototype,"state",null),t([c({readOnly:!0})],Tt.prototype,"cursor",null),t([c()],Tt.prototype,"analysis",null),t([c()],Tt.prototype,"removeIncompleteOnCancel",void 0),t([c()],Tt.prototype,"_layersMode",void 0),t([c()],Tt.prototype,"layersMode",null),t([c({value:null})],Tt.prototype,"inputState",null),t([c()],Tt.prototype,"_isPlacingSlicePlane",null),t([c()],Tt.prototype,"_creatingPointerId",null),Tt=bt=t([d("esri.views.3d.analysis.Slice.SliceTool")],Tt);const St=S(),xt=z();export{Tt as default};
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import e from"../../../../analysis/SlicePlane.js";import{clock as i}from"../../../../core/clock.js";import{destroyMaybe as a,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as r,when as l,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{addFrameTask as h}from"../../../../core/scheduling.js";import{createScreenPoint as p,screenPointObjectToArray as u}from"../../../../core/screenUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as d}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromRotation as _,fromScaling as v,multiply as m}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{e as P,l as y,c as w,g,f,t as M,n as T,i as D}from"../../../../chunks/vec32.js";import{create as V,clone as b}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{clone as k,ZEROS as S}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{d as E,a as x,n as C,f as j}from"../../../../chunks/boundedPlane.js";import{signedDistance as H,create as R,intersectRay as I,getNormal as O}from"../../../../geometry/support/plane.js";import{create as z}from"../../../../geometry/support/ray.js";import{sv3d as G,sm4d as A,sv2d as U}from"../../../../geometry/support/vectorStacks.js";import{getRotateHeadingTexture as L,getTiltRotateTexture as K}from"../images/Factory.js";import{ResizeManipulator as B}from"./ResizeManipulator.js";import{RotateManipulator as F}from"./RotateManipulator.js";import{getOutlineColor as N,planeColor as q}from"./settings.js";import{ShiftManipulator as Z,OffsetMode as W}from"./ShiftManipulator.js";import{pointerMoveTimerMs as J,planePreviewOutlineWidth as Q,forceVerticalModifier as X,forceHorizontalModifier as Y,previewFadeDurationSeconds as $,previewFadeDotThreshold as tt,initialDepthOffsetFrac as et}from"./sliceToolConfig.js";import{createGridVisualElement as it,createOutlineVisualElement as at,planeToShape as st,createRotatePlane as nt,RotationAxis as rt,resizePlane as lt,calculatePlaneHalfSize as ot,SliceOrientation as ht,createPlane as pt,DidPointerMoveRecentlyFlag as ut,calculateBoundedPlaneTranslateRotate as ct,updateShiftRestartHandle as dt,updateRotateHeadingHandle as _t,updateRotateTiltHandle as vt,updateResizeHandle as mt,createShiftPlane as Pt}from"./sliceToolUtils.js";import{calculateInputRotationTransform as yt}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as wt}from"../../interactive/editingTools/dragEventPipeline3D.js";import{fromScreenNormalized as gt}from"../../support/geometryUtils/ray.js";import{AnalysisToolBase as ft}from"../../../interactive/AnalysisToolBase.js";import{createManipulatorDragEventPipeline as Mt}from"../../../interactive/dragEventPipeline.js";import{newToolIntersector as Tt}from"../../../interactive/ToolIntersector.js";import{createScreenPointFromEvent as Dt}from"../../../support/screenUtils.js";var Vt;let bt=class extends ft{static{Vt=this}constructor(t){super(t),this._clock=i,this._previewPlaneOpacity=1,this.removeIncompleteOnCancel=!1,this._mode="none",this.shiftManipulator=null,this.rotateHeadingManipulator=null,this.rotateTiltManipulator=null,this.resizeManipulators=null,this._frameTask=null,this._pointerMoveTimerMs=J,this._prevPointerMoveTimeout=null,this._previewPlaneGridVisualElement=null,this._previewPlaneOutlineVisualElement=null,this._startPlane=E(),this._previewPlane=null,this._activeKeyModifiers={},this._lastCursorPosition=p(),this._resizeHandles=[{direction:[1,0]},{direction:[1,1]},{direction:[0,1]},{direction:[-1,1]},{direction:[-1,0]},{direction:[-1,-1]},{direction:[0,-1]},{direction:[1,-1]}],this._intersector=Tt(t.view.state.viewingMode)}initialize(){if(null==this.analysis)throw new Error("SliceTool requires valid analysis, but null was provided.");const t=t=>{this._updateManipulatorsInteractive(t),t.grabbing||(null!=this.analysisViewData.plane&&x(this.analysisViewData.plane,this._startPlane),this.inputState=null)},e=new Z(this.view,W.CENTER_ON_ARROW);this.shiftManipulator=e,this.manipulators.add(e),this.addHandles([this._createShiftDragPipeline(e),e.events.on("grab-changed",(i=>{this._onShiftGrab(i),t(e)}))]);const i=!this.view.stage?.renderView.renderingContext.driverTest.svgPremultipliesAlpha.result,a=new F(this.view,((t,e)=>L(this.view.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:i})));this.rotateHeadingManipulator=a,this.manipulators.add(a),this.addHandles([this._createRotateHeadingDragPipeline(a),a.events.on("grab-changed",(e=>{this._onRotateHeadingGrab(e),t(a)}))]);const s=new F(this.view,((t,e)=>K(this.view.stage.textures,{accentColor:t,contrastColor:e,preMultiplyAlpha:i})));this.rotateTiltManipulator=s,this.manipulators.add(s),this.addHandles([this._createRotateTiltDragPipeline(s),s.events.on("grab-changed",(e=>{this._onRotateTiltGrab(e),t(s)}))]),this.resizeManipulators=this._resizeHandles.map(((e,i)=>{const a=new B(this.view,e);return this.addHandles([this._createResizeDragPipeline(a),a.events.on("grab-changed",(e=>{this._onResizeGrab(e,i),t(a)}))]),a})),this.manipulators.addMany(this.resizeManipulators),this._previewPlaneGridVisualElement=it(this.view),this._previewPlaneOutlineVisualElement=at(this.view),this._previewPlaneOutlineVisualElement.width=Q,this.addHandles(n((()=>[this.analysisViewData.plane,this.analysis.tiltEnabled]),(()=>this._updateManipulators()),r)),this.addHandles([l((()=>"sliced"===this.state),(()=>{this.finishToolCreation(),this.stop()}),o),n((()=>this.view.state.camera),(()=>this._onCameraChange()))])}destroy(){this._removeFrameTask(),this._clearPointerMoveTimeout(),this._previewPlaneOutlineVisualElement=a(this._previewPlaneOutlineVisualElement),this._previewPlaneGridVisualElement=a(this._previewPlaneGridVisualElement)}get state(){const t=!!this.analysisViewData.plane,e=!!this.inputState;return t?t&&e?"slicing":t&&!e?"sliced":"ready":"ready"}get cursor(){return this.active?this._placingSlicePlane||"exclude"===this.mode?"crosshair":null!=this._creatingPointerId?"grabbing":null:null}set analysis(t){if(null==t)throw new Error("SliceTool requires valid analysis, but null was provided.");this.removeHandles("analysis"),this._set("analysis",t)}get mode(){return this._mode}static{this.disableEngineLayers=!1}get inputState(){return this._get("inputState")}set inputState(t){this._set("inputState",t),this.analysisViewData.showGrid=null!=t&&"resize"===t.type,this._updateMaterials()}get _placingSlicePlane(){return this.active&&!this.inputState&&"place"===this._mode}get _creatingPointerId(){return null!=this.inputState&&"shift"===this.inputState.type?this.inputState.creatingPointerId:null}start(t){this._finishToolCreationIfValid(),this._mode=t,this.active||(this.view.activeTool=this)}stop(){this.active&&(this.view.activeTool=null)}onActivate(){this._finishToolCreationIfValid(),"none"===this._mode&&null==this.analysisViewData.plane&&(this._mode="place")}onDeactivate(){this._mode="none",this._updatePreviewPlane(null)}onShow(){this._updateVisibility(!0)}onHide(){this._updateVisibility(!1)}_updateVisibility(t){this._updateManipulators(),t||this._clearPointerMoveTimeout()}onInputEvent(t){switch(t.type){case"pointer-drag":if(!St(t))return;this._placingSlicePlane?this._onClickPlacePlane(t)&&t.stopPropagation():this._onPointerDrag(t)&&t.stopPropagation();break;case"pointer-move":this._onPointerMove(t);break;case"pointer-up":this._onPointerUp(t)&&t.stopPropagation();break;case"immediate-click":if(!St(t))return;"exclude"===this._mode?t.defer((async()=>{await this._onClickExcludeLayer(t)&&t.stopPropagation()})):this._onClickPlacePlane(t)&&t.stopPropagation();break;case"drag":this.inputState&&t.stopPropagation();break;case"key-down":this._onKeyDown(t)&&t.stopPropagation();break;case"key-up":this._onKeyUp(t)&&t.stopPropagation()}}onEditableChange(){this.analysisViewData.editable=this.internallyEditable}_onPointerDrag(t){const e=this.inputState;if(t.pointerId===this._creatingPointerId&&null!=e&&"shift"===e.type){const i=Dt(t);return this.shiftManipulator.events.emit("drag",{action:e.hasBeenDragged?"update":"start",pointerType:t.pointerType,start:i,screenPoint:i}),e.hasBeenDragged=!0,!0}return!1}_onPointerMove(t){this._lastCursorPosition.x=t.x,this._lastCursorPosition.y=t.y,this._resetPointerMoveTimeout(),"touch"!==t.pointerType&&this._updatePreviewPlane(Dt(t),this._activeKeyModifiers)}_onCameraChange(){this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),this._updateManipulators()}_onPointerUp(t){if(t.pointerId===this._creatingPointerId&&null!=this.analysisViewData.plane){const e=Dt(t);return this.shiftManipulator.events.emit("drag",{action:"end",start:e,screenPoint:e}),x(this.analysisViewData.plane,this._startPlane),this.inputState=null,!0}return!1}_onClickPlacePlane(t){if(!this._placingSlicePlane)return!1;const i=Dt(t),a=E();if(this._pickPlane(i,!1,this._activeKeyModifiers,a)){if("pointer-drag"===t.type){const e=gt(this.view.state.camera,i,xt);this.inputState=kt(e,t.pointerId,a.origin,a)}return x(a,this._startPlane),this.analysis.shape=st(a,this.view,this.view.spatialReference,new e),"pointer-drag"!==t.type&&this.stop(),!0}return!1}async _onClickExcludeLayer(t){if("exclude"!==this.mode)return!1;const e=await this.view.hitTest(Dt(t)),i=e.results.at(0);if(i){const t="graphic"===i.type&&i.graphic;if(t){const e=t.sourceLayer||t.layer;e&&this.analysis.excludedLayers.push(e)}}else e.ground.layer?this.analysis.excludedLayers.push(e.ground.layer):this.analysis.excludeGroundSurface=!0;return this.stop(),!0}_onKeyDown(t){return(t.key===X||t.key===Y)&&(this._activeKeyModifiers[t.key]=!0,null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onKeyUp(t){return!(t.key!==X&&t.key!==Y||!this._activeKeyModifiers[t.key])&&(delete this._activeKeyModifiers[t.key],null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onShiftGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=gt(this.view.state.camera,t.screenPoint,xt);x(this.analysisViewData.plane,this._startPlane),this.inputState=kt(e,null,this.shiftManipulator.renderLocation,this.analysisViewData.plane)}_createShiftDragPipeline(t){return Mt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"shift"!==a.type)return;const s=null!=this.analysisViewData.plane?x(this.analysisViewData.plane,E()):null;e.next(wt(this.view,a.shiftPlane)).next(this._shiftDragAdjustSensitivity(a)).next(this._shiftDragUpdatePlane(a)),i.next((()=>{null!=s&&this._updateBoundedPlane(s)}))}))}_shiftDragAdjustSensitivity(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=.001,a=Math.min((1-Math.abs(P(C(this.analysisViewData.plane),e.ray.direction)/y(e.ray.direction)))/i,1),s=-H(this._startPlane.plane,e.renderEnd),n=-H(this._startPlane.plane,t.startPoint);return t.depth=t.depth*(1-a)+s*a-n,e}}_shiftDragUpdatePlane(t){return()=>{if(null==this.analysisViewData.plane)return;const e=w(G.get(),this._startPlane.origin),i=w(G.get(),C(this._startPlane));g(i,i,-t.depth),f(i,i,e);const a=j(i,this.analysisViewData.plane.basis1,this.analysisViewData.plane.basis2,E());this._updateBoundedPlane(a)}}_onRotateHeadingGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=nt(this.analysisViewData.plane,this.view.renderCoordsHelper,rt.HEADING,R()),i=gt(this.view.state.camera,t.screenPoint,xt),a=V();I(e,i,a)&&(x(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateHeadingDragPipeline(t){return Mt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?x(this.analysisViewData.plane,E()):null;e.next(wt(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next((()=>{null!=s&&this._updateBoundedPlane(s)}))}))}_onRotateTiltGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=nt(this.analysisViewData.plane,this.view.renderCoordsHelper,rt.TILT,R()),i=gt(this.view.state.camera,t.screenPoint,xt),a=V();I(e,i,a)&&(x(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateTiltDragPipeline(t){return Mt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?x(this.analysisViewData.plane,E()):null;e.next(wt(this.view,a.rotatePlane)).next(this._rotateDragRenderPlaneToRotate(a)).next(this._rotateDragUpdatePlaneFromRotate()),i.next((()=>{null!=s&&this._updateBoundedPlane(s)}))}))}_rotateDragRenderPlaneToRotate(t){return e=>{if(null==this.analysisViewData.plane)return null;const i=O(t.rotatePlane),a=yt(t.startPoint,e.renderEnd,this.analysisViewData.plane.origin,i);return{...e,rotateAxis:i,rotateAngle:a}}}_rotateDragUpdatePlaneFromRotate(){return t=>{if(null==this.analysisViewData.plane)return;const e=_(A.get(),t.rotateAngle,t.rotateAxis);if(null==e)return;const i=M(G.get(),this._startPlane.basis1,e),a=M(G.get(),this._startPlane.basis2,e),s=j(this.analysisViewData.plane.origin,i,a,E());this._updateBoundedPlane(s)}}_onResizeGrab(t,e){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const i=gt(this.view.state.camera,t.screenPoint,xt),a=G.get();I(this.analysisViewData.plane.plane,i,a)&&(x(this.analysisViewData.plane,this._startPlane),this.inputState={type:"resize",activeHandleIdx:e,startPoint:b(a)})}_createResizeDragPipeline(t){return Mt(t,((t,e,i)=>{const a=this.inputState;if(null==a||"resize"!==a.type||null==this.analysisViewData.plane)return;const s=x(this.analysisViewData.plane,E());e.next(wt(this.view,this.analysisViewData.plane.plane)).next(this._resizeDragUpdatePlane(a)),i.next((()=>{this._updateBoundedPlane(s)}))}))}_resizeDragUpdatePlane(t){return e=>{if(null==this.analysisViewData.plane)return;const i=this._resizeHandles[t.activeHandleIdx],a=lt(i,t.startPoint,e.renderEnd,this.view.state.camera,this._startPlane,x(this.analysisViewData.plane));this._updateBoundedPlane(a)}}_updateBoundedPlane(t){const e=this.analysisViewData;if(null==e)throw new Error("valid internal object expected");e.plane=t}_updatePreviewPlane(t,e={}){if("exclude"===this.mode)return;let i=this._previewPlane;if(this._previewPlane=null,null==t)return this._removeFrameTask(),void this._updateManipulators();if(this.active){const a=null!=i?i:E();if(i=null!=i?x(i,Et):null,this._pickPlane(t,!0,e,a)){const t=tt;let e=!1;null!=i&&(e=P(O(i.plane),O(a.plane))<t||P(T(G.get(),i.basis1),T(G.get(),a.basis1))<t),e&&(this._previewPlaneOpacity=0),this._previewPlane=a}}null!=this._previewPlane&&null==this._frameTask&&0===this._previewPlaneOpacity?this._frameTask=h({update:({deltaTime:t})=>{this._previewPlaneOpacity=Math.min(this._previewPlaneOpacity+t/(1e3*$),1),this._updateManipulators(),1===this._previewPlaneOpacity&&this._removeFrameTask()}}):null==this._previewPlane&&null!=this._frameTask?this._removeFrameTask():null!=this._previewPlane&&this._updateManipulators()}_removeFrameTask(){this._frameTask=s(this._frameTask)}_pickMinResult(t){const e=u(t,U.get());return this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(e,this._intersector),this._intersector.results.min}_pickPlane(t,e,i,a){const s=this._pickMinResult(t),n=G.get();if(!s.getIntersectionPoint(n))return!1;const r=s.getTransformedNormal(G.get()),l=this.view.state.camera;P(r,l.viewForward)>0&&g(r,r,-1);const o=ot(n,l),h=(e?1:-1)*o*et,p=g(G.get(),r,h);f(p,p,n);const u=this.analysis.tiltEnabled?ht.TILTED:ht.HORIZONTAL_OR_VERTICAL,c=i[X]?ht.VERTICAL:i[Y]?ht.HORIZONTAL:u;return pt(p,r,o,o,l,c,this.view.renderCoordsHelper,a),!0}_clearPointerMoveTimeout(){this._prevPointerMoveTimeout=s(this._prevPointerMoveTimeout)}_resetPointerMoveTimeout(){this._clearPointerMoveTimeout(),this.shiftManipulator.state|=ut,this.rotateHeadingManipulator.state|=ut,this.rotateTiltManipulator.state|=ut,this._prevPointerMoveTimeout=this._clock.setTimeout((()=>{this.shiftManipulator.state&=~ut,this.rotateHeadingManipulator.state&=~ut,this.rotateTiltManipulator.state&=~ut}),this._pointerMoveTimerMs)}_updateManipulators(){if(Vt.disableEngineLayers)return;let t,e,i=!1;if(null!=this.analysisViewData.plane)t=this.analysisViewData.plane,e=this._previewPlane??t,i=!1;else{if(null==this._previewPlane)return this._setManipulatorVisibility(!1),void this._setPreviewPlaneVisibility(!1);e=t=this._previewPlane,i=!0}if(this._setManipulatorVisibility(!i),!i){const e=ct(t,A.get());dt(this.shiftManipulator,e,t,this.view.state.camera),_t(this.rotateHeadingManipulator,e,t,this.view.renderCoordsHelper),vt(this.rotateTiltManipulator,e,t),this.resizeManipulators.forEach(((i,a)=>mt(i,this._resizeHandles[a],e,t)))}this._setPreviewPlaneVisibility(!this._creatingPointerId&&(i||"place"===this._mode)),this._updatePreviewPlaneTransform(e),this._updateMaterials()}_setManipulatorVisibility(t){this.shiftManipulator.available=t,this.rotateHeadingManipulator.available=t,this.rotateTiltManipulator.available=t&&this.analysis.tiltEnabled,this.resizeManipulators.forEach((e=>e.available=t))}_updatePreviewPlaneTransform(t){const e=ct(t,A.get()),i=D(G.get(),y(t.basis1),y(t.basis2),1),a=v(A.get(),i),s=m(a,e,a);this._previewPlaneOutlineVisualElement.transform=s,this._previewPlaneGridVisualElement.transform=s}_setPreviewPlaneVisibility(t){const e=this._previewPlaneOutlineVisualElement,i=this._previewPlaneGridVisualElement;t&&(e.attached=!0,i.attached=!0),e.visible=t,i.visible=t}_updateMaterials(){const t=N(this.view.effectiveTheme);t[3]*=this._previewPlaneOpacity;const e=k(q);e[3]*=this._previewPlaneOpacity,this._previewPlaneOutlineVisualElement.color=t,this._previewPlaneGridVisualElement.backgroundColor=e,this._previewPlaneGridVisualElement.gridColor=S}_updateManipulatorsInteractive(t){if(!t.grabbing)return this.shiftManipulator.interactive=!0,this.rotateHeadingManipulator.interactive=!0,this.rotateTiltManipulator.interactive=!0,void this.resizeManipulators.forEach((t=>{t.interactive=!0}));this.shiftManipulator.interactive=this.shiftManipulator===t,this.rotateHeadingManipulator.interactive=this.rotateHeadingManipulator===t,this.rotateTiltManipulator.interactive=this.rotateTiltManipulator===t,this.resizeManipulators.forEach((e=>{e.interactive=e===t}))}_finishToolCreationIfValid(){this.analysis.valid&&this.finishToolCreation()}get test(){return{plane:this.analysisViewData.plane,setPointerMoveTimerMs:t=>{this._pointerMoveTimerMs=t}}}};function kt(t,e,i,a){const s=Pt(i,C(a),t.direction,R()),n=V();return I(s,t,n)?{type:"shift",creatingPointerId:e,hasBeenDragged:!1,shiftPlane:s,depth:0,startPoint:n}:null}function St(t){return"mouse"!==t.pointerType||0===t.button}t([c()],bt.prototype,"_clock",void 0),t([c({constructOnly:!0})],bt.prototype,"view",void 0),t([c()],bt.prototype,"analysisViewData",void 0),t([c({readOnly:!0})],bt.prototype,"state",null),t([c({readOnly:!0})],bt.prototype,"cursor",null),t([c()],bt.prototype,"analysis",null),t([c()],bt.prototype,"removeIncompleteOnCancel",void 0),t([c()],bt.prototype,"_mode",void 0),t([c()],bt.prototype,"mode",null),t([c({value:null})],bt.prototype,"inputState",null),t([c()],bt.prototype,"_placingSlicePlane",null),t([c()],bt.prototype,"_creatingPointerId",null),bt=Vt=t([d("esri.views.3d.analysis.Slice.SliceTool")],bt);const Et=E(),xt=z();export{bt as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as i}from"../../../chunks/tslib.es6.js";import s from"../../../core/Accessor.js";import
|
|
5
|
+
import{_ as i}from"../../../chunks/tslib.es6.js";import s from"../../../core/Accessor.js";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as e}from"./AnalysisView3D.js";import{SliceController as l}from"./Slice/SliceController.js";import r from"./Slice/SliceTool.js";import{SliceVisualization as n}from"./Slice/SliceVisualization.js";import{connectAnalysisViewToTool as p,removeAnalysisViewTool as y,startExclusiveInteractiveOperation as c}from"../../analysis/analysisViewUtils.js";let h=class extends(e(s)){constructor(i){super(i),this.type="slice-view-3d",this.analysis=null,this.tool=null,this.plane=null,this.active=!0,this.userOperation=null,this._analysisVisualization=null,this._analysisController=null}initialize(){this._analysisVisualization=new n({view:this.view,analysis:this.analysis,analysisViewData:this}),this._analysisController=new l({view:this.view,analysis:this.analysis,analysisViewData:this}),this.addHandles(p(this,r))}destroy(){y(this),this._analysisVisualization=t(this._analysisVisualization),this._analysisController=t(this._analysisController)}get editable(){return!this._analysisVisualization.preview}set editable(i){this._analysisVisualization.preview=!i}get showGrid(){return this._analysisVisualization?.showGrid??!1}set showGrid(i){this._analysisVisualization&&(this._analysisVisualization.showGrid=i)}get testData(){}async place(i){return this.active=!0,c(this,{abortOptions:i,onToolActivated:i=>i.start("place")})}async pickLayerToExclude(i){return this.active=!0,c(this,{abortOptions:i,onToolActivated:i=>i.start("exclude")})}};i([o({readOnly:!0})],h.prototype,"type",void 0),i([o({constructOnly:!0,nonNullable:!0})],h.prototype,"analysis",void 0),i([o()],h.prototype,"tool",void 0),i([o()],h.prototype,"plane",void 0),i([o()],h.prototype,"active",void 0),i([o()],h.prototype,"editable",null),i([o()],h.prototype,"showGrid",null),i([o()],h.prototype,"userOperation",void 0),i([o()],h.prototype,"_analysisVisualization",void 0),i([o()],h.prototype,"_analysisController",void 0),h=i([a("esri.views.3d.analysis.SliceAnalysisView3D")],h);const u=h;export{u as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../../../chunks/tslib.es6.js";import
|
|
5
|
+
import{_ as r}from"../../../../chunks/tslib.es6.js";import e from"../../../../Color.js";import o from"../../../../core/Handles.js";import{watch as t,initial as s}from"../../../../core/reactiveUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import"../../../../core/Warning.js";import"../../../../core/Error.js";import{viewshedToolManipulatorConfiguration as c}from"./ViewshedConfiguration.js";import{Manipulator3D as m}from"../../interactive/Manipulator3D.js";import{createManipulatorMaterial as a}from"../../interactive/manipulatorUtils.js";import{RenderObject as n}from"../../interactive/RenderObject.js";import{createSphereGeometry as p}from"../../webgl-engine/lib/GeometryUtil.js";class l extends m{constructor(r,e){super({view:r,autoScaleRenderObjects:!1,worldSized:!1,radius:c.observerSize,interactive:!1}),this._handles=new o;const i=a(this._color);this.renderObjects=[new n(p(i,c.observerSize,32,32))],e.manipulators.add(this),this._handles.add([t((()=>this._color),(r=>{i.setParameters({color:r})}),s)])}destroy(){this._handles.remove(),super.destroy()}get _color(){return e.toUnitRGBA(this.view.effectiveTheme.accentColor)}}r([i()],l.prototype,"_color",null);export{l as ViewshedObserverManipulator};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Accessor.js";import t from"../../../core/Collection.js";import{handlesGroup as s}from"../../../core/handleUtils.js";import i from"../../../core/Logger.js";import{getOrCreateMapValue as o}from"../../../core/MapUtils.js";import{abortMaybe as n}from"../../../core/maybe.js";import{isAbortError as l,allSettledValues as a,throwIfAborted as u,createResolver as p}from"../../../core/promiseUtils.js";import{watch as h,syncAndInitial as c}from"../../../core/reactiveUtils.js";import{property as y}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import"../../../layers/buildingSublayers/BuildingGroupSublayer.js";import{isQuery as g,isGraphic as f}from"../../../support/guards.js";import m from"./BuildingComponentSublayerView3D.js";import{BuildingSublayerView3DMixin as w}from"./BuildingSublayerView3D.js";import{LayerView3D as b}from"./LayerView3D.js";import{parseFilterMode as V}from"./i3s/BuildingFilterUtil.js";import{checkSpatialReference as j}from"./i3s/I3SUtil.js";import{emptyHighlightHandle as C,normalizeHighlightTargetExceptQuery as _}from"./support/highlightUtils.js";import{LayerViewPerformanceInfo as S}from"./support/LayerViewPerformanceInfo.js";import{updatingProgress as v}from"../support/updatingProperties.js";import B from"../../layers/BuildingSceneLayerView.js";import{isInEffectiveScaleRange as L}from"../../support/layerViewUtils.js";const F=w(r);let M=class extends(b(B)){constructor(e){super(e),this.type="building-scene-3d",this.sublayerViews=new t,this._abortController=new AbortController,this._loadingComponents=0,this._pendingWhenSublayerViews=new Map,this.ignoresMemoryFactor=!1}get filterExpression(){const e=this.layer.activeFilterId,r=null!=e?this.layer.filters.find((r=>r.id===e)):null,t=null!=r?r.filterBlocks?.find((e=>"solid"===e.filterMode.type)):null;return t?t.filterExpression:null}get filterExpressions(){const e=this.layer.activeFilterId,r=null!=e?this.layer.filters.find((r=>r.id===e)):null;return r?.filterBlocks?r.filterBlocks.toArray().map((e=>[e.filterExpression??"",V(e)])):[]}get updatingProgressValue(){const e=this.sublayerViews,r=this._loadingComponents+(e?e.length:0);return e.reduce(((e,r)=>e+r.updatingProgress),0)/r}get visibleAtCurrentScale(){return L(this.layer.effectiveScaleRange,this.view.scale)}isUpdating(){return this._loadingComponents>0||this.sublayerViews&&this.sublayerViews.some((e=>e.updating))}initialize(){j(this.layer.spatialReference,this.view.spatialReference,this.view.viewingMode),this._initializeSubLayerViews(this.layer.sublayers,this)}destroy(){this.sublayerViews&&(this.sublayerViews.forEach((e=>e.destroy())),this.sublayerViews=null),this._abortController=n(this._abortController)}_initializeSubLayerViews(e,r){const t=this,s=this.view;e.forEach((e=>{if(!e.isEmpty)if("building-group"===e.type){const t=new F({sublayer:e,view:s,parent:r});this._initializeSubLayerViews(e.sublayers,t)}else"mesh"===e.geometryType&&(this._loadingComponents++,e.load({signal:this._abortController.signal}).then((()=>{const i=new m({sublayer:e,layerView:t,view:s,parent:r});this.sublayerViews.push(i);const o=this._pendingWhenSublayerViews.get(e);if(o){for(const e of o)e.resolve(i);this._pendingWhenSublayerViews.delete(e)}this.addHandles([h((()=>i.updating),(()=>this.notifyChange("updating")),c),h((()=>i.updatingProgress),(()=>this.notifyChange("updatingProgressValue")),c)])})).catch((r=>{l(r)||i.getLogger(this).error(`Error while creating view for sublayer ${e.id}\nLayer: ${this.layer.url}\n`,r)})).then((()=>{this._loadingComponents--,this.notifyChange("updating"),this.notifyChange("updatingProgressValue")})))}))}getGraphicFromIntersectorTarget(e){for(const
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Accessor.js";import t from"../../../core/Collection.js";import{handlesGroup as s}from"../../../core/handleUtils.js";import i from"../../../core/Logger.js";import{getOrCreateMapValue as o}from"../../../core/MapUtils.js";import{abortMaybe as n}from"../../../core/maybe.js";import{isAbortError as l,allSettledValues as a,throwIfAborted as u,createResolver as p}from"../../../core/promiseUtils.js";import{watch as h,syncAndInitial as c}from"../../../core/reactiveUtils.js";import{property as y}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import"../../../layers/buildingSublayers/BuildingGroupSublayer.js";import{isQuery as g,isGraphic as f}from"../../../support/guards.js";import m from"./BuildingComponentSublayerView3D.js";import{BuildingSublayerView3DMixin as w}from"./BuildingSublayerView3D.js";import{LayerView3D as b}from"./LayerView3D.js";import{parseFilterMode as V}from"./i3s/BuildingFilterUtil.js";import{checkSpatialReference as j}from"./i3s/I3SUtil.js";import{emptyHighlightHandle as C,normalizeHighlightTargetExceptQuery as _}from"./support/highlightUtils.js";import{LayerViewPerformanceInfo as S}from"./support/LayerViewPerformanceInfo.js";import{updatingProgress as v}from"../support/updatingProperties.js";import B from"../../layers/BuildingSceneLayerView.js";import{isInEffectiveScaleRange as L}from"../../support/layerViewUtils.js";const F=w(r);let M=class extends(b(B)){constructor(e){super(e),this.type="building-scene-3d",this.sublayerViews=new t,this._abortController=new AbortController,this._loadingComponents=0,this._pendingWhenSublayerViews=new Map,this.ignoresMemoryFactor=!1}get filterExpression(){const e=this.layer.activeFilterId,r=null!=e?this.layer.filters.find((r=>r.id===e)):null,t=null!=r?r.filterBlocks?.find((e=>"solid"===e.filterMode.type)):null;return t?t.filterExpression:null}get filterExpressions(){const e=this.layer.activeFilterId,r=null!=e?this.layer.filters.find((r=>r.id===e)):null;return r?.filterBlocks?r.filterBlocks.toArray().map((e=>[e.filterExpression??"",V(e)])):[]}get updatingProgressValue(){const e=this.sublayerViews,r=this._loadingComponents+(e?e.length:0);return e.reduce(((e,r)=>e+r.updatingProgress),0)/r}get visibleAtCurrentScale(){return L(this.layer.effectiveScaleRange,this.view.scale)}isUpdating(){return this._loadingComponents>0||this.sublayerViews&&this.sublayerViews.some((e=>e.updating))}initialize(){j(this.layer.spatialReference,this.view.spatialReference,this.view.viewingMode),this._initializeSubLayerViews(this.layer.sublayers,this)}destroy(){this.sublayerViews&&(this.sublayerViews.forEach((e=>e.destroy())),this.sublayerViews=null),this._abortController=n(this._abortController)}_initializeSubLayerViews(e,r){const t=this,s=this.view;e.forEach((e=>{if(!e.isEmpty)if("building-group"===e.type){const t=new F({sublayer:e,view:s,parent:r});this._initializeSubLayerViews(e.sublayers,t)}else"mesh"===e.geometryType&&(this._loadingComponents++,e.load({signal:this._abortController.signal}).then((()=>{const i=new m({sublayer:e,layerView:t,view:s,parent:r});this.sublayerViews.push(i);const o=this._pendingWhenSublayerViews.get(e);if(o){for(const e of o)e.resolve(i);this._pendingWhenSublayerViews.delete(e)}this.addHandles([h((()=>i.updating),(()=>this.notifyChange("updating")),c),h((()=>i.updatingProgress),(()=>this.notifyChange("updatingProgressValue")),c)])})).catch((r=>{l(r)||i.getLogger(this).error(`Error while creating view for sublayer ${e.id}\nLayer: ${this.layer.url}\n`,r)})).then((()=>{this._loadingComponents--,this.notifyChange("updating"),this.notifyChange("updatingProgressValue")})))}))}getGraphicFromIntersectorTarget(e,r){for(const t of this.sublayerViews.items)if(t.sublayer.id===e.sublayerId)return t.getGraphicFromIntersectorTarget(e,r);return null}async fetchPopupFeaturesFromGraphics(e,r){if(0===e.length)return[];const t=P(e,(e=>e.sourceLayer)),s=[];for(const[o,n]of t){const e=this._findComponent(o);null!=e&&s.push(e.fetchPopupFeaturesFromGraphics(n,r))}const i=await a(s);return u(r),i.flat()}whenGraphicBounds(e){const r=this._findComponent(e.sourceLayer);return null==r?Promise.reject():r.whenGraphicBounds(e)}getAABBFromIntersectorTarget(e){for(const r of this.sublayerViews.items)if(r.sublayer.id===e.sublayerId)return r.getAABBFromIntersectorTarget(e);return null}async whenSublayerView(e){const r=this._findComponent(e);if(null!=r)return r;const t=this._pendingWhenSublayerViews.get(e),s=p();return t?t.push(s):this._pendingWhenSublayerViews.set(e,[s]),s.promise}_findComponent(e){return this.sublayerViews.find((r=>e===r.sublayer))}highlight(e,r){if(g(e))return C;const t=_(e);if(0===t.length)return C;if(f(t[0])){const e=t,i=new Map;for(const r of e)o(i,r.sourceLayer,(()=>[])).push(r);const n=[];return this.sublayerViews.forEach((e=>{const t=i.get(e.sublayer);t&&n.push(e.highlight(t,r))})),s(n)}return C}get usedMemory(){return this.sublayerViews.reduce(((e,r)=>e+r.usedMemory),0)}get unloadedMemory(){return this.sublayerViews.reduce(((e,r)=>e+r.unloadedMemory),0)}get performanceInfo(){return new S(this.usedMemory)}};function P(e,r){const t=new Map,s=e.length;for(let i=0;i<s;i++){const s=e[i],o=r(s,i,e),n=t.get(o);n?n.push(s):t.set(o,[s])}return t}e([y()],M.prototype,"sublayerViews",void 0),e([y({readOnly:!0})],M.prototype,"filterExpression",null),e([y({readOnly:!0})],M.prototype,"filterExpressions",null),e([y(v)],M.prototype,"updatingProgress",void 0),e([y({readOnly:!0,dependsOn:[]})],M.prototype,"updatingProgressValue",null),e([y({readOnly:!0})],M.prototype,"visibleAtCurrentScale",null),M=e([d("esri.views.3d.layers.BuildingSceneLayerView3D")],M);const E=M;export{E as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Error.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Error.js";import has from"../../../core/has.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{hydrateGraphic as a}from"../../../layers/graphics/hydratedFeatures.js";import{combineTimeExtent as p}from"../../../layers/support/timeSupport.js";import o from"../../../rest/support/Query.js";import{UpdatePolicy as l}from"../webgl-engine/lib/UpdatePolicy.js";import{defaultHighlightName as u}from"../../support/HighlightDefaults.js";import{isInEffectiveScaleRange as h,hasLayerBasedScaleRanges as y}from"../../support/layerViewUtils.js";import{projectWithZConversionSilent as c}from"../../support/projectionUtils.js";const g=g=>{let d=class extends g{constructor(){super(...arguments),this.highlightOptions=null,this.updatePolicy=l.SYNC,this.slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null,this.supportsHeightUnitConversion=!0}initialize(){const e=this.layer;"isTable"in e&&e.isTable?this.addResolvingPromise(Promise.reject(new r("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e}))):(this.addResolvingPromise(this._validateGeometryType()),this.addResolvingPromise((async()=>{if(this.destroyed)return;this.fullExtentInLocalViewSpatialReference="local"===this.view.viewingMode?await c(this.layer.fullExtent,this.view.spatialReference):null;const e=await this.createGraphicsPipeline();this.destroyed?e.destroy():(this.graphicsPipeline=e,await e.when())})()),this.notifyChange("updating"))}destroy(){this.graphicsPipeline=i(this.graphicsPipeline)}get dataUpdating(){return!!this.graphicsPipeline?.dataUpdating}get legendEnabled(){return this.canResume()&&this.graphicsPipeline?.legendEnabled}get visibleAtCurrentScale(){return y?h(this.layer.effectiveScaleRange,this.view.scale):!this.graphicsPipeline?.scaleVisibilitySuspended}get symbologySnappingSupported(){return this.graphicsPipeline.symbologySnappingSupported}get hasAllFeatures(){return this.graphicsPipeline.hasAllFeatures}get hasAllFeaturesInView(){return this.graphicsPipeline.hasAllFeaturesInView}get hasFullGeometries(){return this.graphicsPipeline.hasFullGeometries}get timeExtent(){return p(this.layer,this.view?.timeExtent,this._get("timeExtent"))}getHit(e){if(has("feature-pipeline-3d-test"))return this._getHitMock(e);const t=this.graphicsPipeline.findGraphic((t=>t.uid===e));if(null==t)return null;const r=a(t,this.layer);return{type:"graphic",graphic:r,layer:r.layer}}_getHitMock(e){const r=this.layer,i={};i[this.layer.objectIdField]=e;const s=new t({layer:r,sourceLayer:r,visible:!0,symbol:null,attributes:i,geometry:null});return{type:"graphic",graphic:s,layer:s.layer}}whenGraphicBounds(e,t){return this.graphicsPipeline?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsPipeline?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,t){return this.graphicsPipeline.elevationAlignPointsInFeatures(e,t)}async queryForSymbologySnapping(e,t){return this.graphicsPipeline.graphicsQuery.queryForSymbologySnapping(e,t)}queryFeatures(e,t){return this.graphicsPipeline.graphicsQuery.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this.graphicsPipeline.graphicsQuery.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return null==e?this.createQuery():o.from(e)}highlight(e,t){return this.graphicsPipeline.highlight(e,t?.name??u)}maskOccludee(e){return this.graphicsPipeline.maskOccludee(e)}getSuspendInfo(){return{...super.getSuspendInfo(),...this.graphicsPipeline.suspendInfo}}isUpdating(){return!(!this.graphicsPipeline||this.graphicsPipeline.destroyed)&&!(!this.graphicsPipeline?.updating&&this.view?.basemapTerrain?.ready)}async _validateGeometryType(){switch(this.layer.geometryType){case"multipatch":case"multipoint":throw new r("featurelayerview3d:unsupported-geometry-type","Unsupported geometry type ${geometryType}",{geometryType:this.layer.geometryType})}}get performanceInfo(){return this.graphicsPipeline.performanceInfo}queryAttributeBins(){throw new Error("Not implemented")}queryAggregates(){throw new Error("Not implemented")}};return e([s()],d.prototype,"graphicsPipeline",void 0),e([s({readOnly:!0})],d.prototype,"dataUpdating",null),e([s()],d.prototype,"highlightOptions",void 0),e([s()],d.prototype,"suspended",void 0),e([s({readOnly:!0})],d.prototype,"legendEnabled",null),e([s({readOnly:!0})],d.prototype,"visibleAtCurrentScale",null),e([s()],d.prototype,"updating",void 0),e([s({readOnly:!0})],d.prototype,"updatePolicy",void 0),e([s({type:Boolean})],d.prototype,"slicePlaneEnabled",void 0),e([s({readOnly:!0})],d.prototype,"suspendInfo",void 0),e([s()],d.prototype,"symbologySnappingSupported",null),e([s({readOnly:!0})],d.prototype,"hasAllFeatures",null),e([s({readOnly:!0})],d.prototype,"hasAllFeaturesInView",null),e([s({readOnly:!0})],d.prototype,"hasFullGeometries",null),e([s({readOnly:!0})],d.prototype,"timeExtent",null),d=e([n("esri.views.3d.layers.FeatureLikeLayerView3D")],d),d};export{g as FeatureLikeLayerView3D};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{when as i}from"../../../core/reactiveUtils.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{elevationAlignPointsInFeatures as n}from"./graphics/elevationAlignPointsInFeatures.js";import{GraphicsProcessor as p}from"./graphics/GraphicsProcessor.js";import{queryForSymbologySnapping as l}from"./graphics/queryForSymbologySnapping.js";import{LayerViewPerformanceInfo as c}from"./support/LayerViewPerformanceInfo.js";import{UpdatePolicy as h}from"../webgl-engine/lib/UpdatePolicy.js";import d from"../../layers/LayerView.js";import{defaultHighlightName as u}from"../../support/HighlightDefaults.js";import{isInEffectiveScaleRange as g,hasLayerBasedScaleRanges as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{when as i}from"../../../core/reactiveUtils.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{elevationAlignPointsInFeatures as n}from"./graphics/elevationAlignPointsInFeatures.js";import{GraphicsProcessor as p}from"./graphics/GraphicsProcessor.js";import{queryForSymbologySnapping as l}from"./graphics/queryForSymbologySnapping.js";import{LayerViewPerformanceInfo as c}from"./support/LayerViewPerformanceInfo.js";import{UpdatePolicy as h}from"../webgl-engine/lib/UpdatePolicy.js";import d from"../../layers/LayerView.js";import{defaultHighlightName as u}from"../../support/HighlightDefaults.js";import{isInEffectiveScaleRange as g,hasLayerBasedScaleRanges as m}from"../../support/layerViewUtils.js";import{projectWithZConversionSilent as y}from"../../support/projectionUtils.js";let f=class extends(a(d)){constructor(){super(...arguments),this.type="graphics-3d",this.symbologySnappingSupported=!0,this._slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null,this.ignoresMemoryFactor=!0}get highlightOptions(){return null}initialize(){this._set("processor",new p({owner:this,scaleVisibilityEnabled:!0,frustumVisibilityEnabled:!0})),this.addResolvingPromise(this.processor.initializePromise),this.addHandles(this.layer.on("graphic-update",(e=>this.processor.graphicsCore.graphicUpdateHandler(e)))),this.layer.internal?this.notifyChange("updating"):("local"===this.view.viewingMode&&this.addResolvingPromise((async()=>this.fullExtentInLocalViewSpatialReference=await y(this.layer.fullExtent,this.view.spatialReference))()),this.addHandles(i((()=>this.view?.basemapTerrain?.ready),(()=>()=>this.notifyChange("updating")),{once:!0})))}destroy(){this._updatingHandles.removeAll(),this._set("processor",s(this.processor))}get loadedGraphics(){return this.layer.graphics}get legendEnabled(){return this.canResume()&&!this.processor?.frustumVisibilitySuspended}get visibleAtCurrentScale(){return m?g(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get slicePlaneEnabled(){const e=this.layer.internal;return this._slicePlaneEnabled&&!e}set slicePlaneEnabled(e){this._slicePlaneEnabled=e}getSuspendInfo(){const e=super.getSuspendInfo();return e.outsideOfView=this.processor?.frustumVisibilitySuspended??!1,e}getHit(e){return this.processor.getHit(e)}whenGraphicBounds(e,r){return this.processor.whenGraphicBounds(e,r)}computeAttachmentOrigin(e,r){return this.processor?.computeAttachmentOrigin(e,r)}getSymbolLayerSize(e,r){return this.processor.getSymbolLayerSize(e,r)}queryGraphics(){return Promise.resolve(this.loadedGraphics)}maskOccludee(e){return this.processor.maskOccludee(e)}highlight(e,r){return this.processor.highlight(e,r?.name??u)}async elevationAlignPointsInFeatures(e,s){const{processor:i}=this;if(null==i?.graphics3DGraphics)throw new r("graphicslayerview3d:missing-processor","A Graphics3D processor is needed to resolve graphics elevation.");const{graphics3DGraphics:t}=i,o=e=>"number"==typeof e?t.get(e):void 0;return n(this.view,this.layer,o,e,s)}async queryForSymbologySnapping(e,r){return l(this.processor,e,r)}get updatePolicy(){return this.processor?.graphicsCore.effectiveUpdatePolicy||h.SYNC}isUpdating(){return this.view&&this.layer&&!(!this.processor?.updating&&(this.layer.internal||this.view.basemapTerrain?.ready))}get performanceInfo(){return new c(this.usedMemory,this.loadedGraphics.length,-1,-1)}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return this.processor?.graphicsCore?.unprocessedMemoryEstimate}get test(){return{graphics3DProcessor:this.processor,loadedGraphics:this.loadedGraphics}}};e([t()],f.prototype,"highlightOptions",null),e([t()],f.prototype,"loadedGraphics",null),e([t({readOnly:!0})],f.prototype,"legendEnabled",null),e([t()],f.prototype,"layer",void 0),e([t({readOnly:!0})],f.prototype,"processor",void 0),e([t({readOnly:!0})],f.prototype,"visibleAtCurrentScale",null),e([t()],f.prototype,"_slicePlaneEnabled",void 0),e([t({type:Boolean})],f.prototype,"slicePlaneEnabled",null),f=e([o("esri.views.3d.layers.GraphicsLayerView3D")],f);const b=f;export{b as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../../chunks/tslib.es6.js";import e from"../../../core/Accessor.js";import s from"../../../core/Identifiable.js";import{destroyMaybe as
|
|
5
|
+
import{_ as r}from"../../../chunks/tslib.es6.js";import e from"../../../core/Accessor.js";import s from"../../../core/Identifiable.js";import{destroyMaybe as o}from"../../../core/maybe.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{GraphicsProcessor as p}from"./graphics/GraphicsProcessor.js";import{defaultHighlightName as c}from"../../support/HighlightDefaults.js";let a=class extends(s.IdentifiableMixin(e)){constructor(r){super(r),this.drapeSourcePriorityOffset=0,this.processor=null,this.slicePlaneEnabled=!1,this.layer=new h,this.suspended=!1}initialize(){this._set("processor",new p({owner:this,drapeSourcePriorityOffset:this.drapeSourcePriorityOffset}))}destroy(){this._set("processor",o(this.processor))}get loadedGraphics(){return this.getGraphics()}get updating(){return!!this.processor?.updating}get symbolUpdateType(){return this.processor.graphicsCore.symbolUpdateType}getHit(r){return this.processor.getHit(r)}whenGraphicBounds(r,e){return this.processor.whenGraphicBounds(r,e)}graphicChanged(r){this.processor.graphicsCore.graphicUpdateHandler(r)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}async queryGraphics(){return this.loadedGraphics}highlight(r,e){return this.processor.highlight(r,e?.name??c)}maskOccludee(r){return this.processor.maskOccludee(r)}get test(){return{graphics3DProcessor:this.processor}}};r([t({constructOnly:!0})],a.prototype,"view",void 0),r([t({constructOnly:!0})],a.prototype,"getGraphics",void 0),r([t()],a.prototype,"loadedGraphics",null),r([t()],a.prototype,"drapeSourcePriorityOffset",void 0),r([t({readOnly:!0})],a.prototype,"updating",null),r([t()],a.prototype,"processor",void 0),r([t({type:Boolean})],a.prototype,"slicePlaneEnabled",void 0),r([t()],a.prototype,"layer",void 0),r([t()],a.prototype,"suspended",void 0),a=r([i("esri.views.3d.layers.GraphicsView3D")],a);class h extends s{constructor(){super(),this.type="graphics-view-3d-dummy",this.id=this.uid}}const d=a;export{d as default};
|