@arcgis/core 4.33.0-next.20250422 → 4.33.0-next.20250424
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/Graphic.js +1 -1
- package/WebScene.js +1 -1
- package/analysis/Analysis.d.ts +4 -0
- package/analysis/Analysis.js +1 -1
- package/analysis/SliceAnalysis.js +1 -1
- package/analysis/SlicePlane.js +1 -1
- package/analysis/support/AnalysisOriginWebScene.d.ts +4 -0
- package/analysis/support/AnalysisOriginWebScene.js +5 -0
- package/analysis/support/SliceAnalysisExcludedLayer.js +5 -0
- package/arcade/geometry/constructors.js +1 -1
- package/assets/components/assets/icon/mosaicMethodBlend16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodBlend24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodBlend32.json +1 -0
- package/assets/components/assets/icon/mosaicMethodByAttribute16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodByAttribute24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodByAttribute32.json +1 -0
- package/assets/components/assets/icon/mosaicMethodClosestToCenter16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodClosestToCenter24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodClosestToCenter32.json +1 -0
- package/assets/components/assets/icon/mosaicMethodClosestToNadir16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodClosestToNadir24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodClosestToNadir32.json +1 -0
- package/assets/components/assets/icon/mosaicMethodFirst16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodFirst24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodFirst32.json +1 -0
- package/assets/components/assets/icon/mosaicMethodLast16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodLast24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodLast32.json +1 -0
- package/assets/components/assets/icon/mosaicMethodLockRaster16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodLockRaster24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodLockRaster32.json +1 -0
- package/assets/components/assets/icon/mosaicMethodMaximum16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodMaximum24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodMaximum32.json +1 -0
- package/assets/components/assets/icon/mosaicMethodMean16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodMean24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodMean32.json +1 -0
- package/assets/components/assets/icon/mosaicMethodMinimum16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodMinimum24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodMinimum32.json +1 -0
- package/assets/components/assets/icon/mosaicMethodNone16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodNone24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodNone32.json +1 -0
- package/assets/components/assets/icon/mosaicMethodNorthWest16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodNorthWest24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodNorthWest32.json +1 -0
- package/assets/components/assets/icon/mosaicMethodSeamline16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodSeamline24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodSeamline32.json +1 -0
- package/assets/components/assets/icon/mosaicMethodSum16.json +1 -0
- package/assets/components/assets/icon/mosaicMethodSum24.json +1 -0
- package/assets/components/assets/icon/mosaicMethodSum32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{b2f9f0767dadf185120c.js → 00612d6e05b1c8647668.js} +1 -1
- package/assets/esri/core/workers/chunks/{d4d011eea16a89a5aad9.js → 0219c3f9408d3fa3c9a0.js} +1 -1
- package/assets/esri/core/workers/chunks/{f54546c155fba2fd3a7e.js → 05d7d8ff3e4cbad32580.js} +1 -1
- package/assets/esri/core/workers/chunks/{b1e275607d9754079f60.js → 079434fe765c53d304f2.js} +1 -1
- package/assets/esri/core/workers/chunks/{4f8782b3b6ad414409e8.js → 0a48b9734ab4c64a6f4f.js} +1 -1
- package/assets/esri/core/workers/chunks/{0eed612e82a279ac8d1e.js → 11b55e7e76e50fe11bbe.js} +1 -1
- package/assets/esri/core/workers/chunks/{ccc50f28f217e50cc2c3.js → 1427e7953c3d8c87c5e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{184d7c8ea818bec5c462.js → 146b3699a9e8b1f2dcc2.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ba7d44eff348004f084.js → 1a6d2d090b643a87408a.js} +1 -1
- package/assets/esri/core/workers/chunks/1b8cc83aa1179245b2dc.js +1 -0
- package/assets/esri/core/workers/chunks/{5e5225623977e61fd0ef.js → 213adc87c843d627c5d6.js} +1 -1
- package/assets/esri/core/workers/chunks/235efd948ae470a6f238.js +1 -0
- package/assets/esri/core/workers/chunks/{60d3b329e69f3cddb7f4.js → 265f69d153b7b6f07e42.js} +1 -1
- package/assets/esri/core/workers/chunks/{769b66cca8347f0f84db.js → 279bbd61b32577693a4a.js} +1 -1
- package/assets/esri/core/workers/chunks/290b065b377f9d2ee058.js +1 -0
- package/assets/esri/core/workers/chunks/29d3245261a7223124ed.js +1 -0
- package/assets/esri/core/workers/chunks/{0c6f2808c57ff820bfdd.js → 30551c1d3e4fa7be86c1.js} +2 -2
- package/assets/esri/core/workers/chunks/{0c6f2808c57ff820bfdd.js.LICENSE.txt → 30551c1d3e4fa7be86c1.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/335b539893569e3d7b82.js +1 -0
- package/assets/esri/core/workers/chunks/{78242f2bf742b33d99fa.js → 3795793643f4db64af0e.js} +1 -1
- package/assets/esri/core/workers/chunks/{38f9ede26098eb03ca2d.js → 3cf001abca8ad933bccf.js} +2 -2
- package/assets/esri/core/workers/chunks/{38f9ede26098eb03ca2d.js.LICENSE.txt → 3cf001abca8ad933bccf.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{dbaa4b8d37aab40d7bd1.js → 543eb46b55cacd6e1dbc.js} +2 -2
- package/assets/esri/core/workers/chunks/{dbaa4b8d37aab40d7bd1.js.LICENSE.txt → 543eb46b55cacd6e1dbc.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{93f792f5b94f3745b57d.js → 577f24923fa4d08360e4.js} +2 -2
- package/assets/esri/core/workers/chunks/{93f792f5b94f3745b57d.js.LICENSE.txt → 577f24923fa4d08360e4.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/5958af341014e13475d2.js +1 -0
- package/assets/esri/core/workers/chunks/{f46c4a69ef2f763e905b.js → 5d63dfa5a60c88e03b28.js} +1 -1
- package/assets/esri/core/workers/chunks/60f7cd05e88701f43d3f.js +1 -0
- package/assets/esri/core/workers/chunks/{26e0a0a13060cd3e4291.js → 626ba3a7dee952308566.js} +1 -1
- package/assets/esri/core/workers/chunks/7bfa18dd8771d4932533.js +1 -0
- package/assets/esri/core/workers/chunks/7cd32b10ed0e18e44ef2.js +1 -0
- package/assets/esri/core/workers/chunks/7ffa68d69c138db1295d.js +1 -0
- package/assets/esri/core/workers/chunks/8dd26b12c625d20196ed.js +319 -0
- package/assets/esri/core/workers/chunks/91f8547a13f0461045ef.js +1 -0
- package/assets/esri/core/workers/chunks/9661ee8569ee208e6237.js +1 -0
- package/assets/esri/core/workers/chunks/{c2f38c66fae2cdb57445.js → 96e5d192c8d23c1e324f.js} +1 -1
- package/assets/esri/core/workers/chunks/974742af7beb000c4b4a.js +1 -0
- package/assets/esri/core/workers/chunks/{e27fa1e84f16b7f19a90.js → 9850ff14bd9c7da81c65.js} +1 -1
- package/assets/esri/core/workers/chunks/{796cf1c2ca9955595836.js → 9b2ab27159500315fbc1.js} +1 -1
- package/assets/esri/core/workers/chunks/{a276980c06d5d311a37e.js → 9f416cc5673665f8c37c.js} +1 -1
- package/assets/esri/core/workers/chunks/a0c51c4c30a5f749dfc6.js +1 -0
- package/assets/esri/core/workers/chunks/a79511b926a2830bb160.js +1 -0
- package/assets/esri/core/workers/chunks/{fdcbd28f38bc485ac5e3.js → ab6ecd8eeec5ff761b34.js} +1 -1
- package/assets/esri/core/workers/chunks/{814d72abbfdd4552e4ec.js → ac9c6779771ec855da79.js} +2 -2
- package/assets/esri/core/workers/chunks/{814d72abbfdd4552e4ec.js.LICENSE.txt → ac9c6779771ec855da79.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{ef6e805c49e1afdf966b.js → c054198c6438cb57f188.js} +1 -1
- package/assets/esri/core/workers/chunks/c5d786166a5609b85276.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{5bdd5ae2d2f23ef6b331.js → c87e2a63b96e0da77dfe.js} +1 -1
- package/assets/esri/core/workers/chunks/{601fc99426f0213b0769.js → cbec01223d51cdb9ee79.js} +1 -1
- package/assets/esri/core/workers/chunks/cc4dd739c4c7e3ccea3f.js +1 -0
- package/assets/esri/core/workers/chunks/{90c893959145827961ac.js → cd9343c78a7c3acdbbcd.js} +1 -1
- package/assets/esri/core/workers/chunks/d3a74087e076a3ae76ca.js +1 -0
- package/assets/esri/core/workers/chunks/{26fcbe053194bd78fcc3.js → d8474dca270b25705699.js} +1 -1
- package/assets/esri/core/workers/chunks/{5db336767959507c07e5.js → d8dc922f7466300b668f.js} +2 -2
- package/assets/esri/core/workers/chunks/{5db336767959507c07e5.js.LICENSE.txt → d8dc922f7466300b668f.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{96cddbbeef61a4f33f29.js → db5913824d5e5a2a8365.js} +1 -1
- package/assets/esri/core/workers/chunks/{48a1bb1e171dd06a7c6e.js → dd94585508f49863dc15.js} +1 -1
- package/assets/esri/core/workers/chunks/e524462c63834fae7e01.js +2 -0
- package/assets/esri/core/workers/chunks/{02176f84d6d57f1bc1c8.js.LICENSE.txt → e524462c63834fae7e01.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{e7e987558cf017c62458.js → ebfa4a0334401f5e004a.js} +1 -1
- package/assets/esri/core/workers/chunks/{736a11e64e5f03e3936b.js → f2cef954b58c6604642c.js} +64 -64
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/BloomBlur.glsl.js +7 -7
- package/chunks/BloomComposition.glsl.js +24 -25
- package/chunks/Bufferer-CicaNej1.js +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/GeodeticDistanceCalculator-CcF1gMZX.js +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticLength.js +1 -1
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/OperatorSimplifyOGC.js +5 -0
- package/chunks/Point2D.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/QuadraticBezier.js +1 -1
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/chunks/relateOperator.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/vxlLayer.js +1 -1
- package/core/Collection.js +1 -1
- package/core/JSONSupport.js +1 -1
- package/core/SetUtils.js +1 -1
- package/{views/webgl/GLObjectType.js → core/support/jsonUtils.js} +1 -1
- package/core/urlUtils.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
- package/geometry/operators/gx/operatorLocateBetween.js +1 -1
- package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
- package/geometry/operators/gx/operatorSimplifyOGC.js +5 -0
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/simplifyOGCOperator.d.ts +6 -0
- package/geometry/operators/simplifyOGCOperator.js +5 -0
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/support/normalizeUtilsSync.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +442 -113
- package/layers/DimensionLayer.js +1 -1
- package/layers/RouteLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/ViewshedLayer.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/support/FieldsIndex.js +1 -1
- package/layers/support/VideoElement.js +1 -1
- package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
- package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
- package/layers/support/rasterFormats/TiffDecoder.js +1 -1
- package/layers/support/rasterFormats/{TiffTags.js → tiffTag.js} +1 -1
- package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
- package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
- package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
- package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
- package/layers/support/rasterFunctions/RemapFunction.js +1 -1
- package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
- package/layers/support/videoUtils.js +5 -0
- package/package.json +2 -2
- package/portal/schemas/definitions.js +1 -1
- package/renderers/UniqueValueRenderer.js +1 -1
- package/renderers/support/colorRampUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/IconSymbol3DLayer.js +1 -1
- package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
- package/versionManagement/utils.js +1 -1
- package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
- package/views/2d/engine/webgl/textureUtils.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/support/DebugOverlay.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/SliceVisualization.js +1 -1
- package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedAnalysisVisualization.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/atmosphereUtils.js +1 -1
- package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
- package/views/3d/interactive/visualElements/EngineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MarkerVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ViewshedShapeVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/graphics/pipeline/PipelineCommand.js +1 -1
- package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/TileActionSynchronizer.js +5 -0
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/cameraUtilsSpherical.js +1 -1
- package/views/3d/support/geometryUtils/sphere.js +1 -1
- package/views/3d/terrain/OverlayRenderTargets.js +1 -1
- package/views/3d/webgl/ManagedDepthTexture.js +1 -1
- package/views/3d/webgl/ManagedFBO.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +12 -14
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/DepthRange.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.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/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/interactive/Tooltip.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/layers/LineOfSightLayerView.d.ts +4 -0
- package/views/layers/LineOfSightLayerView.js +5 -0
- package/views/webgl/FBOAttachmentType.js +5 -0
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Renderbuffer.js +1 -1
- package/views/webgl/RenderbufferDescriptor.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/TextureDescriptor.js +1 -1
- package/webscene/InitialViewProperties.js +1 -1
- package/webscene/Presentation.js +1 -1
- package/webscene/Slide.js +1 -1
- package/webscene/SlideLegendInfo.js +1 -1
- package/webscene/background/ColorBackground.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/webscene/spec-certification/compare.js +1 -1
- package/webscene/spec-certification/index.js +1 -1
- package/webscene/spec-certification/spec.js +1 -1
- package/webscene/spec-certification/utils.js +1 -1
- package/webscene/support/Description.js +1 -1
- package/webscene/support/SlideElements.js +1 -1
- package/webscene/support/SlideEnvironment.js +1 -1
- package/webscene/support/SlideGround.js +1 -1
- package/webscene/support/SlideVisibleLayer.js +1 -1
- package/webscene/support/Title.js +1 -1
- package/webscene/support/analysisUtils.js +5 -0
- package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/support/SketchController.js +5 -0
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/assets/esri/core/workers/chunks/02176f84d6d57f1bc1c8.js +0 -2
- package/assets/esri/core/workers/chunks/244d2196bac5ef279436.js +0 -1
- package/assets/esri/core/workers/chunks/32f2e0c88046b39916cc.js +0 -1
- package/assets/esri/core/workers/chunks/388a763da712ca71ccf4.js +0 -1
- package/assets/esri/core/workers/chunks/5ffc3ca6c6a4d32e1282.js +0 -1
- package/assets/esri/core/workers/chunks/642a595353a86f3717e3.js +0 -1
- package/assets/esri/core/workers/chunks/82353e59ac6d909dcf41.js +0 -1
- package/assets/esri/core/workers/chunks/873327fc41edd3830afa.js +0 -319
- package/assets/esri/core/workers/chunks/93e9dfd1ba8f393c6c47.js +0 -1
- package/assets/esri/core/workers/chunks/95379fdd6917c8a84c71.js +0 -1
- package/assets/esri/core/workers/chunks/9b21dc4659922cc577cb.js +0 -1
- package/assets/esri/core/workers/chunks/a197c86d42cc9ce21924.js +0 -1
- package/assets/esri/core/workers/chunks/d81bebbb6fe000200d35.js +0 -1
- package/assets/esri/core/workers/chunks/daa54c8a317c27881763.js +0 -1
- package/assets/esri/core/workers/chunks/dd8e72d6784a8ebc115d.js +0 -1
- package/assets/esri/core/workers/chunks/e15c612caadf7bac4ab9.js +0 -1
- package/assets/esri/core/workers/chunks/e9fba86036b8fe700a41.js +0 -1
- package/views/3d/webgl/formats.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,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{addFrameTask as o}from"../../../../core/scheduling.js";import{createScreenPoint as h,screenPointObjectToArray as p}from"../../../../core/screenUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromRotation as d,fromScaling as _,multiply as v}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{f as P,l as y,c as m,h as w,g,t as f,n as M,i as D}from"../../../../chunks/vec32.js";import{clone as V,create as b}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{clone as T,ZEROS as E}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{d as k,a as S,n as x,f as j}from"../../../../chunks/boundedPlane.js";import{signedDistance as H,create as C,intersectRay as R,getNormal as O}from"../../../../geometry/support/plane.js";import{create as I}from"../../../../geometry/support/ray.js";import{sv3d as z,sm4d as G,sv2d as L}from"../../../../geometry/support/vectorStacks.js";import{getRotateHeadingTexture as U,getTiltRotateTexture as A}from"../images/Factory.js";import{ResizeManipulator as K}from"./ResizeManipulator.js";import{RotateManipulator as B}from"./RotateManipulator.js";import{getOutlineColor as F,planeColor as N}from"./settings.js";import{ShiftManipulator as q,OffsetMode as Z}from"./ShiftManipulator.js";import{pointerMoveTimerMs as W,planePreviewOutlineWidth as J,forceVerticalModifier as Q,forceHorizontalModifier as X,previewFadeDotThreshold as Y,previewFadeDurationSeconds as $,initialDepthOffsetFrac as tt}from"./sliceToolConfig.js";import{createGridVisualElement as et,createOutlineVisualElement as it,planeToShape as at,createRotatePlane as st,RotationAxis as nt,resizePlane as rt,calculatePlaneHalfSize as lt,SliceOrientation as ot,createPlane as ht,DidPointerMoveRecentlyFlag as pt,calculateBoundedPlaneTranslateRotate as ut,updateShiftRestartHandle as ct,updateRotateHeadingHandle as dt,updateRotateTiltHandle as _t,updateResizeHandle as vt,createShiftPlane as Pt}from"./sliceToolUtils.js";import{calculateInputRotationTransform as yt}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as mt}from"../../interactive/editingTools/dragEventPipeline3D.js";import{fromScreenNormalized as wt}from"../../support/geometryUtils/ray.js";import{AnalysisToolBase as gt}from"../../../interactive/AnalysisToolBase.js";import{createManipulatorDragEventPipeline as ft}from"../../../interactive/dragEventPipeline.js";import{newToolIntersector as Mt}from"../../../interactive/ToolIntersector.js";import{createScreenPointFromEvent as Dt}from"../../../support/screenUtils.js";var Vt;let bt=class extends gt{static{Vt=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=W,this._prevPointerMoveTimeout=null,this._previewPlaneGridVisualElement=null,this._previewPlaneOutlineVisualElement=null,this._startPlane=k(),this._previewPlane=null,this._activeKeyModifiers={},this._lastCursorPosition=h(),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=Mt(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&&S(this.analysisViewData.plane,this._startPlane),this.inputState=null)},e=new q(this.view,Z.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 B(this.view,((t,e)=>U(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 B(this.view,((t,e)=>A(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 K(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=et(this.view),this._previewPlaneOutlineVisualElement=it(this.view),this._previewPlaneOutlineVisualElement.width=J,this.addHandles(n((()=>[this.analysisViewData.plane,this.analysis.tiltEnabled]),(()=>this._updateManipulators()),r));const o=n((()=>this.state),(t=>{"sliced"===t&&this.finishToolCreation()}),l);this.addHandles([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}enterExcludeLayerMode(){null!=this.analysisViewData.plane&&(this._layersMode="exclude",this.active||(this.view.activeTool=this))}exitExcludeLayerMode(){null!=this.analysisViewData.plane&&(this._layersMode="none",this.active&&(this.view.activeTool=null))}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=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}),S(this.analysisViewData.plane,this._startPlane),this.inputState=null,!0}return!1}_onClickPlacePlane(t){if("exclude"===this.layersMode)return!1;if(this._isPlacingSlicePlane){const i=Dt(t),a=k();if(this._pickPlane(i,!1,this._activeKeyModifiers,a)){if("pointer-drag"===t.type){const e=wt(this.view.state.camera,i,xt);this.inputState=Et(e,t.pointerId,a.origin,a)}return S(a,this._startPlane),this.analysis.shape=at(a,this.view,this.view.spatialReference,new e),!0}}return!1}_onClickExcludeLayer(t){return!("exclude"!==this.layersMode||!this.created)&&(this.view.hitTest(Dt(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===Q||t.key===X)&&(this._activeKeyModifiers[t.key]=!0,null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onKeyUp(t){return!(t.key!==Q&&t.key!==X||!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=wt(this.view.state.camera,t.screenPoint,xt);S(this.analysisViewData.plane,this._startPlane),this.inputState=Et(e,null,this.shiftManipulator.renderLocation,this.analysisViewData.plane)}_createShiftDragPipeline(t){return ft(t,((t,e,i)=>{const a=this.inputState;if(null==a||"shift"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,k()):null;e.next(mt(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(x(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=m(z.get(),this._startPlane.origin),i=m(z.get(),x(this._startPlane));w(i,i,-t.depth),g(i,i,e);const a=j(i,this.analysisViewData.plane.basis1,this.analysisViewData.plane.basis2,k());this._updateBoundedPlane(a)}}_onRotateHeadingGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=st(this.analysisViewData.plane,this.view.renderCoordsHelper,nt.HEADING,C()),i=wt(this.view.state.camera,t.screenPoint,xt),a=b();R(e,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateHeadingDragPipeline(t){return ft(t,((t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,k()):null;e.next(mt(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=st(this.analysisViewData.plane,this.view.renderCoordsHelper,nt.TILT,C()),i=wt(this.view.state.camera,t.screenPoint,xt),a=b();R(e,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateTiltDragPipeline(t){return ft(t,((t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,k()):null;e.next(mt(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=d(G.get(),t.rotateAngle,t.rotateAxis);if(null==e)return;const i=f(z.get(),this._startPlane.basis1,e),a=f(z.get(),this._startPlane.basis2,e),s=j(this.analysisViewData.plane.origin,i,a,k());this._updateBoundedPlane(s)}}_onResizeGrab(t,e){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const i=wt(this.view.state.camera,t.screenPoint,xt),a=z.get();R(this.analysisViewData.plane.plane,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"resize",activeHandleIdx:e,startPoint:V(a)})}_createResizeDragPipeline(t){return ft(t,((t,e,i)=>{const a=this.inputState;if(null==a||"resize"!==a.type||null==this.analysisViewData.plane)return;const s=S(this.analysisViewData.plane,k());e.next(mt(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=rt(i,t.startPoint,e.renderEnd,this.view.state.camera,this._startPlane,S(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:k();if(i=null!=i?S(i,St):null,this._pickPlane(t,!0,e,a)){const t=Y;let e=!1;null!=i&&(e=P(O(i.plane),O(a.plane))<t||P(M(z.get(),i.basis1),M(z.get(),a.basis1))<t),e&&(this._previewPlaneOpacity=0),this._previewPlane=a}}null!=this._previewPlane&&null==this._frameTask&&0===this._previewPlaneOpacity?this._frameTask=o({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=p(t,L.get());return this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(e,this._intersector),this._intersector.results.min}_pickPlane(t,e,i,a){const s=this._pickMinResult(t),n=z.get();if(!s.getIntersectionPoint(n))return!1;const r=s.getTransformedNormal(z.get()),l=this.view.state.camera;P(r,l.viewForward)>0&&w(r,r,-1);const o=lt(n,l),h=(e?1:-1)*o*tt,p=w(z.get(),r,h);g(p,p,n);const u=this.analysis.tiltEnabled?ot.TILTED:ot.HORIZONTAL_OR_VERTICAL,c=i[Q]?ot.VERTICAL:i[X]?ot.HORIZONTAL:u;return ht(p,r,o,o,l,c,this.view.renderCoordsHelper,a),!0}_clearPointerMoveTimeout(){this._prevPointerMoveTimeout=s(this._prevPointerMoveTimeout)}_resetPointerMoveTimeout(){this._clearPointerMoveTimeout(),this.shiftManipulator.state|=pt,this.rotateHeadingManipulator.state|=pt,this.rotateTiltManipulator.state|=pt,this._prevPointerMoveTimeout=this._clock.setTimeout((()=>{this.shiftManipulator.state&=~pt,this.rotateHeadingManipulator.state&=~pt,this.rotateTiltManipulator.state&=~pt}),this._pointerMoveTimerMs)}_updateManipulators(){if(Vt.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=ut(t,G.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)),ct(this.shiftManipulator,i,t,this.view.state.camera),dt(this.rotateHeadingManipulator,i,t,this.view.renderCoordsHelper),_t(this.rotateTiltManipulator,i,t),this.resizeManipulators.forEach(((e,a)=>vt(e,this._resizeHandles[a],i,t))),this._previewPlaneOutlineVisualElement.visible=!1,this._previewPlaneGridVisualElement.visible=!1);const a=D(z.get(),y(t.basis1),y(t.basis2),1),s=_(G.get(),a),n=v(s,i,s);this._previewPlaneOutlineVisualElement.transform=n,this._previewPlaneGridVisualElement.transform=n,this._updateMaterials()}_updateMaterials(){const t=F(this.view.effectiveTheme);t[3]*=this._previewPlaneOpacity;const e=T(N);e[3]*=this._previewPlaneOpacity,this._previewPlaneOutlineVisualElement.color=t,this._previewPlaneGridVisualElement.backgroundColor=e,this._previewPlaneGridVisualElement.gridColor=E}_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}}}};t([u()],bt.prototype,"_clock",void 0),t([u({constructOnly:!0})],bt.prototype,"view",void 0),t([u()],bt.prototype,"analysisViewData",void 0),t([u({readOnly:!0})],bt.prototype,"state",null),t([u({readOnly:!0})],bt.prototype,"cursor",null),t([u()],bt.prototype,"analysis",null),t([u()],bt.prototype,"removeIncompleteOnCancel",void 0),t([u()],bt.prototype,"_layersMode",void 0),t([u()],bt.prototype,"layersMode",null),t([u({value:null})],bt.prototype,"inputState",null),t([u()],bt.prototype,"_isPlacingSlicePlane",null),t([u()],bt.prototype,"_creatingPointerId",null),bt=Vt=t([c("esri.views.3d.analysis.Slice.SliceTool")],bt);const Tt=bt;function Et(t,e,i,a){const s=Pt(i,x(a),t.direction,C()),n=b();return R(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}const St=k(),xt=I();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,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{addFrameTask as o}from"../../../../core/scheduling.js";import{createScreenPoint as h,screenPointObjectToArray as p}from"../../../../core/screenUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromRotation as d,fromScaling as _,multiply as v}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{f as P,l as y,c as m,h as w,g,t as f,n as M,i as D}from"../../../../chunks/vec32.js";import{clone as V,create as b}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{clone as T,ZEROS as E}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{d as k,a as S,n as x,f as j}from"../../../../chunks/boundedPlane.js";import{signedDistance as H,create as C,intersectRay as R,getNormal as O}from"../../../../geometry/support/plane.js";import{create as I}from"../../../../geometry/support/ray.js";import{sv3d as z,sm4d as G,sv2d as L}from"../../../../geometry/support/vectorStacks.js";import{getRotateHeadingTexture as U,getTiltRotateTexture as A}from"../images/Factory.js";import{ResizeManipulator as K}from"./ResizeManipulator.js";import{RotateManipulator as B}from"./RotateManipulator.js";import{getOutlineColor as F,planeColor as N}from"./settings.js";import{ShiftManipulator as q,OffsetMode as Z}from"./ShiftManipulator.js";import{pointerMoveTimerMs as W,planePreviewOutlineWidth as J,forceVerticalModifier as Q,forceHorizontalModifier as X,previewFadeDotThreshold as Y,previewFadeDurationSeconds as $,initialDepthOffsetFrac as tt}from"./sliceToolConfig.js";import{createGridVisualElement as et,createOutlineVisualElement as it,planeToShape as at,createRotatePlane as st,RotationAxis as nt,resizePlane as rt,calculatePlaneHalfSize as lt,SliceOrientation as ot,createPlane as ht,DidPointerMoveRecentlyFlag as pt,calculateBoundedPlaneTranslateRotate as ut,updateShiftRestartHandle as ct,updateRotateHeadingHandle as dt,updateRotateTiltHandle as _t,updateResizeHandle as vt,createShiftPlane as Pt}from"./sliceToolUtils.js";import{calculateInputRotationTransform as yt}from"../../interactive/manipulatorUtils.js";import{screenToRenderPlane as mt}from"../../interactive/editingTools/dragEventPipeline3D.js";import{fromScreenNormalized as wt}from"../../support/geometryUtils/ray.js";import{AnalysisToolBase as gt}from"../../../interactive/AnalysisToolBase.js";import{createManipulatorDragEventPipeline as ft}from"../../../interactive/dragEventPipeline.js";import{newToolIntersector as Mt}from"../../../interactive/ToolIntersector.js";import{createScreenPointFromEvent as Dt}from"../../../support/screenUtils.js";var Vt;let bt=class extends gt{static{Vt=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=W,this._prevPointerMoveTimeout=null,this._previewPlaneGridVisualElement=null,this._previewPlaneOutlineVisualElement=null,this._startPlane=k(),this._previewPlane=null,this._activeKeyModifiers={},this._lastCursorPosition=h(),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=Mt(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&&S(this.analysisViewData.plane,this._startPlane),this.inputState=null)},e=new q(this.view,Z.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 B(this.view,((t,e)=>U(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 B(this.view,((t,e)=>A(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 K(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=et(this.view),this._previewPlaneOutlineVisualElement=it(this.view),this._previewPlaneOutlineVisualElement.width=J,this.addHandles(n((()=>[this.analysisViewData.plane,this.analysis.tiltEnabled]),(()=>this._updateManipulators()),r));const o=n((()=>this.state),(t=>{"sliced"===t&&(this.finishToolCreation(),this.stop())}),l);this.addHandles([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=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}),S(this.analysisViewData.plane,this._startPlane),this.inputState=null,!0}return!1}_onClickPlacePlane(t){if("exclude"===this.layersMode)return!1;if(this._isPlacingSlicePlane){const i=Dt(t),a=k();if(this._pickPlane(i,!1,this._activeKeyModifiers,a)){if("pointer-drag"===t.type){const e=wt(this.view.state.camera,i,xt);this.inputState=Et(e,t.pointerId,a.origin,a)}return S(a,this._startPlane),this.analysis.shape=at(a,this.view,this.view.spatialReference,new e),!0}}return!1}_onClickExcludeLayer(t){return!("exclude"!==this.layersMode||!this.created)&&(this.view.hitTest(Dt(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===Q||t.key===X)&&(this._activeKeyModifiers[t.key]=!0,null!=this._previewPlane&&this._updatePreviewPlane(this._lastCursorPosition,this._activeKeyModifiers),!0)}_onKeyUp(t){return!(t.key!==Q&&t.key!==X||!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=wt(this.view.state.camera,t.screenPoint,xt);S(this.analysisViewData.plane,this._startPlane),this.inputState=Et(e,null,this.shiftManipulator.renderLocation,this.analysisViewData.plane)}_createShiftDragPipeline(t){return ft(t,((t,e,i)=>{const a=this.inputState;if(null==a||"shift"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,k()):null;e.next(mt(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(x(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=m(z.get(),this._startPlane.origin),i=m(z.get(),x(this._startPlane));w(i,i,-t.depth),g(i,i,e);const a=j(i,this.analysisViewData.plane.basis1,this.analysisViewData.plane.basis2,k());this._updateBoundedPlane(a)}}_onRotateHeadingGrab(t){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const e=st(this.analysisViewData.plane,this.view.renderCoordsHelper,nt.HEADING,C()),i=wt(this.view.state.camera,t.screenPoint,xt),a=b();R(e,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateHeadingDragPipeline(t){return ft(t,((t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,k()):null;e.next(mt(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=st(this.analysisViewData.plane,this.view.renderCoordsHelper,nt.TILT,C()),i=wt(this.view.state.camera,t.screenPoint,xt),a=b();R(e,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"rotate",rotatePlane:e,startPoint:a})}_createRotateTiltDragPipeline(t){return ft(t,((t,e,i)=>{const a=this.inputState;if(null==a||"rotate"!==a.type)return;const s=null!=this.analysisViewData.plane?S(this.analysisViewData.plane,k()):null;e.next(mt(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=d(G.get(),t.rotateAngle,t.rotateAxis);if(null==e)return;const i=f(z.get(),this._startPlane.basis1,e),a=f(z.get(),this._startPlane.basis2,e),s=j(this.analysisViewData.plane.origin,i,a,k());this._updateBoundedPlane(s)}}_onResizeGrab(t,e){if("start"!==t.action||null==this.analysisViewData.plane||!t.screenPoint)return;const i=wt(this.view.state.camera,t.screenPoint,xt),a=z.get();R(this.analysisViewData.plane.plane,i,a)&&(S(this.analysisViewData.plane,this._startPlane),this.inputState={type:"resize",activeHandleIdx:e,startPoint:V(a)})}_createResizeDragPipeline(t){return ft(t,((t,e,i)=>{const a=this.inputState;if(null==a||"resize"!==a.type||null==this.analysisViewData.plane)return;const s=S(this.analysisViewData.plane,k());e.next(mt(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=rt(i,t.startPoint,e.renderEnd,this.view.state.camera,this._startPlane,S(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:k();if(i=null!=i?S(i,St):null,this._pickPlane(t,!0,e,a)){const t=Y;let e=!1;null!=i&&(e=P(O(i.plane),O(a.plane))<t||P(M(z.get(),i.basis1),M(z.get(),a.basis1))<t),e&&(this._previewPlaneOpacity=0),this._previewPlane=a}}null!=this._previewPlane&&null==this._frameTask&&0===this._previewPlaneOpacity?this._frameTask=o({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=p(t,L.get());return this.view.sceneIntersectionHelper.intersectToolIntersectorScreen(e,this._intersector),this._intersector.results.min}_pickPlane(t,e,i,a){const s=this._pickMinResult(t),n=z.get();if(!s.getIntersectionPoint(n))return!1;const r=s.getTransformedNormal(z.get()),l=this.view.state.camera;P(r,l.viewForward)>0&&w(r,r,-1);const o=lt(n,l),h=(e?1:-1)*o*tt,p=w(z.get(),r,h);g(p,p,n);const u=this.analysis.tiltEnabled?ot.TILTED:ot.HORIZONTAL_OR_VERTICAL,c=i[Q]?ot.VERTICAL:i[X]?ot.HORIZONTAL:u;return ht(p,r,o,o,l,c,this.view.renderCoordsHelper,a),!0}_clearPointerMoveTimeout(){this._prevPointerMoveTimeout=s(this._prevPointerMoveTimeout)}_resetPointerMoveTimeout(){this._clearPointerMoveTimeout(),this.shiftManipulator.state|=pt,this.rotateHeadingManipulator.state|=pt,this.rotateTiltManipulator.state|=pt,this._prevPointerMoveTimeout=this._clock.setTimeout((()=>{this.shiftManipulator.state&=~pt,this.rotateHeadingManipulator.state&=~pt,this.rotateTiltManipulator.state&=~pt}),this._pointerMoveTimerMs)}_updateManipulators(){if(Vt.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=ut(t,G.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)),ct(this.shiftManipulator,i,t,this.view.state.camera),dt(this.rotateHeadingManipulator,i,t,this.view.renderCoordsHelper),_t(this.rotateTiltManipulator,i,t),this.resizeManipulators.forEach(((e,a)=>vt(e,this._resizeHandles[a],i,t))),this._previewPlaneOutlineVisualElement.visible=!1,this._previewPlaneGridVisualElement.visible=!1);const a=D(z.get(),y(t.basis1),y(t.basis2),1),s=_(G.get(),a),n=v(s,i,s);this._previewPlaneOutlineVisualElement.transform=n,this._previewPlaneGridVisualElement.transform=n,this._updateMaterials()}_updateMaterials(){const t=F(this.view.effectiveTheme);t[3]*=this._previewPlaneOpacity;const e=T(N);e[3]*=this._previewPlaneOpacity,this._previewPlaneOutlineVisualElement.color=t,this._previewPlaneGridVisualElement.backgroundColor=e,this._previewPlaneGridVisualElement.gridColor=E}_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}}}};t([u()],bt.prototype,"_clock",void 0),t([u({constructOnly:!0})],bt.prototype,"view",void 0),t([u()],bt.prototype,"analysisViewData",void 0),t([u({readOnly:!0})],bt.prototype,"state",null),t([u({readOnly:!0})],bt.prototype,"cursor",null),t([u()],bt.prototype,"analysis",null),t([u()],bt.prototype,"removeIncompleteOnCancel",void 0),t([u()],bt.prototype,"_layersMode",void 0),t([u()],bt.prototype,"layersMode",null),t([u({value:null})],bt.prototype,"inputState",null),t([u()],bt.prototype,"_isPlacingSlicePlane",null),t([u()],bt.prototype,"_creatingPointerId",null),bt=Vt=t([c("esri.views.3d.analysis.Slice.SliceTool")],bt);const Tt=bt;function Et(t,e,i,a){const s=Pt(i,x(a),t.direction,C()),n=b();return R(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}const St=k(),xt=I();export{Tt 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 e from"../../../../core/Accessor.js";import{
|
|
5
|
+
import{_ as i}from"../../../../chunks/tslib.es6.js";import e from"../../../../core/Accessor.js";import{destroyHandle as t}from"../../../../core/handleUtils.js";import{watch as s,syncAndInitial as o}from"../../../../core/reactiveUtils.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromScaling as a,multiply as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{i as m,l as p}from"../../../../chunks/vec32.js";import{ZEROS as u}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{sv3d as c,sm4d as h}from"../../../../geometry/support/vectorStacks.js";import{getGridColor as d,getOutlineColor as v,planeColor as g}from"./settings.js";import{planePreviewOutlineWidth as w,planeOutlineWidth as V}from"./sliceToolConfig.js";import{createGridVisualElement as _,createOutlineVisualElement as f,calculateBoundedPlaneTranslateRotate as E}from"./sliceToolUtils.js";import{createStipplePatternSimple as j}from"../../webgl-engine/materials/lineStippleUtils.js";let b=class extends e{constructor(i){super(i),this._gridVisualElement=null,this._outlineVisualElement=null,this.showGrid=!1,this.preview=!0}initialize(){const i=this.analysisViewData;if(null==i)throw new Error("expected internal object to be valid");this._gridVisualElement=_(this.view),this._outlineVisualElement=f(this.view),this.addHandles([s((()=>{const e=null!=i.plane&&this.analysisViewData.visible,{active:t}=this.analysisViewData,{preview:s,showGrid:o,view:r}=this,{effectiveTheme:l}=r;return{visible:e,active:t,preview:s,showGrid:o,gridColor:d(l),outlineColor:v(l)}}),(i=>this._updateMaterials(i)),o),s((()=>i.plane),(i=>this._updatePlane(i)),o),t(this._gridVisualElement),t(this._outlineVisualElement),s((()=>"web-scene"!==this.analysis?.origin?.type),(i=>{this._gridVisualElement.isDecoration=i,this._outlineVisualElement.isDecoration=i}),o)])}destroy(){this.set("view",null)}_updatePlane(i){if(null==i)return;this._gridVisualElement.attached=!0,this._outlineVisualElement.attached=!0;const e=m(c.get(),p(i.basis1),p(i.basis2),1),t=a(h.get(),e),s=E(i,h.get()),o=n(t,s,t);this._outlineVisualElement.transform=o,this._gridVisualElement.transform=o}_updateMaterials({visible:i,active:e,preview:t,showGrid:s,gridColor:o,outlineColor:r}){this._outlineVisualElement.color=r,this._outlineVisualElement.width=t?w:V,this._outlineVisualElement.stipplePattern=e?null:j(5),this._gridVisualElement.backgroundColor=g,this._gridVisualElement.gridColor=s?o:u,this._gridVisualElement.visible=i,this._outlineVisualElement.visible=i}};i([r()],b.prototype,"view",void 0),i([r()],b.prototype,"analysis",void 0),i([r()],b.prototype,"analysisViewData",void 0),i([r()],b.prototype,"showGrid",void 0),i([r()],b.prototype,"preview",void 0),b=i([l("esri.views.3d.analysis.Slice.SliceVisualization")],b);export{b as SliceVisualization};
|
|
@@ -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
|
|
5
|
+
import{_ as i}from"../../../chunks/tslib.es6.js";import s from"../../../core/Accessor.js";import a from"../../../core/Error.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 e}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as l}from"./AnalysisView3D.js";import{SliceController as r}from"./Slice/SliceController.js";import n from"./Slice/SliceTool.js";import{SliceVisualization as p}from"./Slice/SliceVisualization.js";import{connectAnalysisViewToTool as y,removeAnalysisViewTool as h,startExclusiveInteractiveOperation as c}from"../../analysis/analysisViewUtils.js";let u=class extends(l(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 p({view:this.view,analysis:this.analysis,analysisViewData:this}),this._analysisController=new r({view:this.view,analysis:this.analysis,analysisViewData:this}),this.addHandles(y(this,n))}destroy(){h(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){if(this.analysis.valid)throw new a("SliceAnalysisView3D:place","Cannot place slice plane when analysis already has a valid shape.");this.active=!0,this.userOperation=c(this,i),await this.userOperation.promise}};i([o({readOnly:!0})],u.prototype,"type",void 0),i([o({constructOnly:!0,nonNullable:!0})],u.prototype,"analysis",void 0),i([o()],u.prototype,"tool",void 0),i([o()],u.prototype,"plane",void 0),i([o()],u.prototype,"active",void 0),i([o()],u.prototype,"editable",null),i([o()],u.prototype,"showGrid",null),i([o()],u.prototype,"userOperation",void 0),i([o()],u.prototype,"_analysisVisualization",void 0),i([o()],u.prototype,"_analysisController",void 0),u=i([e("esri.views.3d.analysis.SliceAnalysisView3D")],u);const d=u;export{d 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 s}from"../../../../chunks/tslib.es6.js";import i from"../../../../core/Accessor.js";import{destroyHandle as e}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{mapCollection as
|
|
5
|
+
import{_ as s}from"../../../../chunks/tslib.es6.js";import i from"../../../../core/Accessor.js";import{destroyHandle as e}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{mapCollection as o}from"../../../../core/mapCollectionUtils.js";import{watch as t,initial as r}from"../../../../core/reactiveUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import n from"./ViewshedVisualization.js";let c=class extends i{get visible(){return this.analysisViewData.visible}constructor(s){super(s)}initialize(){const s=this.analysisViewData,i=o((()=>this.analysisViewData.viewshedComputedDataHandles),(({viewshedComputedData:i})=>{const e=new n({view:this.view,viewshedComputedData:i,analysisViewData:s,isDecoration:this.isDecoration});return{visualization:e,remove:()=>e.destroy()}}));this._viewshedVisualizations=i,this.addHandles([e(i),t((()=>this.visible),(s=>this._viewshedVisualizations.forEach((({visualization:i})=>i.visible=s))),r)])}get test(){}};s([a({constructOnly:!0})],c.prototype,"analysisViewData",void 0),s([a({constructOnly:!0,nonNullable:!0})],c.prototype,"view",void 0),s([a({constructOnly:!0})],c.prototype,"isDecoration",void 0),s([a()],c.prototype,"visible",null),c=s([l("esri.views.3d.analysis.Viewshed.ViewshedAnalysisVisualization")],c);export{c as ViewshedAnalysisVisualization};
|
|
@@ -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"../../../../Color.js";import i from"../../../../core/Accessor.js";import"../../../../core/has.js";import{equals as s}from"../../../../core/lang.js";import{deg2rad as r}from"../../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../../core/maybe.js";import{watch as a,initial as l}from"../../../../core/reactiveUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromRotation as h}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{t as d,i as u,a as p,H as _,n as f,h as V,r as v,v as w,c as E,g as b}from"../../../../chunks/vec32.js";import{create as g,clone as C}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as L,arcAnglePerSegment as A}from"./ViewshedConfiguration.js";import
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Color.js";import i from"../../../../core/Accessor.js";import"../../../../core/has.js";import{equals as s}from"../../../../core/lang.js";import{deg2rad as r}from"../../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../../core/maybe.js";import{watch as a,initial as l}from"../../../../core/reactiveUtils.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromRotation as h}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{t as d,i as u,a as p,H as _,n as f,h as V,r as v,v as w,c as E,g as b}from"../../../../chunks/vec32.js";import{create as g,clone as C}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{viewshedVisualizationConfiguration as L,arcAnglePerSegment as A}from"./ViewshedConfiguration.js";import D from"./ViewshedTool.js";import{LineVisualElement as y}from"../../interactive/visualElements/LineVisualElement.js";import{PointVisualElement as j}from"../../interactive/visualElements/PointVisualElement.js";import{ViewshedShapeVisualElement as F}from"../../interactive/visualElements/ViewshedShapeVisualElement.js";import{RenderOccludedFlag as O}from"../../webgl-engine/lib/Material.js";import{createStipplePatternSimple as R}from"../../webgl-engine/materials/lineStippleUtils.js";let S=class extends i{constructor(e){super(e),this.visible=!0,this._viewshedCorners={topLeft:g(),topRight:g(),bottomLeft:g(),bottomRight:g()},this._arcCenterPoints={top:g(),bottom:g(),left:g(),right:g()},this._parallelCenters={top:g(),bottom:g()}}initialize(){const e={view:this.view,isDecoration:!0},t={...e,color:this._color,renderOccluded:O.OccludeAndTransparent},i={...t,stipplePattern:R(2)};this._observerVisualElement=new j({...e,...L.observerPointConfiguration}),this._shapeVisualElement=new F({...e,isDecoration:this.isDecoration}),this._frameLinesVisualElement=new y(t),this._leftArcVisualElement=new y(t),this._rightArcVisualElement=new y(t),this._topArcVisualElement=new y(t),this._bottomArcVisualElement=new y(t),this._centralLongitude=new y(i),this._centralLatitude=new y(i),this.addHandles([a((()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const t=this._viewshedCorners,i=this._arcCenterPoints,s=this._parallelCenters;return e.cornerPoints(t),e.arcCentersPoints(i),e.parallelCenterPoints(s),{viewshedComputedData:e,corners:t,arcCenters:i,parallelCenters:s,interactive:this.analysisViewData.interactive,selected:this._selected}}),(e=>{const t=null!=e;this._forEachVisualElement((e=>e.attached=t)),t&&this._updateVisualElements(e)}),{initial:!0,equals:s}),a((()=>{const{viewshedComputedData:e}=this,{horizontalFieldOfView:t,verticalFieldOfView:i}=e??{};return{viewshedComputedData:e,horizontalFieldOfView:t,verticalFieldOfView:i}}),(({viewshedComputedData:e})=>{const{_shapeVisualElement:t}=this;e!==t.viewshedComputedData&&(t.viewshedComputedData=e),this._shapeVisualElement.recreateGeometry()}),l),a((()=>{const{interactive:e}=this.analysisViewData;return{visible:this.visible,selected:e&&this._selected,staged:e&&this._staged,horFovNot360:360!==this.viewshedComputedData?.horizontalFieldOfView}}),(({visible:e,selected:t,staged:i,horFovNot360:s})=>{const r=t||i;this._shapeVisualElement.visible=e,this._topArcVisualElement.visible=e,this._bottomArcVisualElement.visible=e,this._frameLinesVisualElement.visible=e&&s;const o=e&&(t||s);this._leftArcVisualElement.visible=o,this._rightArcVisualElement.visible=o,this._forEachLineVisualElement((e=>{e.width=r?L.frameWidthSelected:L.frameWidthNotSelected,e.renderOccluded=t?O.OccludeAndTransparent:O.Occlude})),[this._centralLatitude,this._centralLongitude].forEach((i=>{i.width=2*(r?L.frameWidthSelected:L.frameWidthNotSelected),i.visible=e&&t}))}),l),a((()=>{const{analysisViewData:{interactive:e,tool:t},_selected:i,visible:s}=this,r=this.view.activeTool,o=!t?.active&&r instanceof D&&r.creating;return{observerVisible:s&&!i&&(!e||(t?.creating??!1)||o),color:this._color}}),(({observerVisible:e,color:t})=>{this._observerVisualElement.visible=e,this._forEachLineVisualElement((e=>e.color=t))}),l)])}get _color(){const{viewshedComputedData:e,_selected:i,analysisViewData:s}=this;if(null==e)return t.toUnitRGBA(L.frameColor);const r=s.tool?.active||s.interactive,o=e.viewshed===s.tool?.stagedViewshed,a=r&&(i||o)?this.view.effectiveTheme.accentColor:L.frameColor;return t.toUnitRGBA(a)}get _selected(){const{viewshedComputedData:e,analysisViewData:{selectedViewshedComputedData:t}}=this;return null!=e&&e===t}get _staged(){const{analysisViewData:{tool:e},viewshedComputedData:t}=this;return null!=e&&e.creating&&e.stagedViewshed===t?.viewshed}destroy(){this._observerVisualElement=o(this._observerVisualElement),this._shapeVisualElement=o(this._shapeVisualElement),this._frameLinesVisualElement=o(this._frameLinesVisualElement),this._leftArcVisualElement=o(this._leftArcVisualElement),this._rightArcVisualElement=o(this._rightArcVisualElement),this._topArcVisualElement=o(this._topArcVisualElement),this._bottomArcVisualElement=o(this._bottomArcVisualElement),this._centralLongitude=o(this._centralLongitude),this._centralLatitude=o(this._centralLatitude)}_forEachLineVisualElement(e){[this._frameLinesVisualElement,this._leftArcVisualElement,this._rightArcVisualElement,this._topArcVisualElement,this._bottomArcVisualElement,this._centralLatitude,this._centralLongitude].forEach(e)}_forEachVisualElement(e){this._forEachLineVisualElement(e),e(this._observerVisualElement),e(this._shapeVisualElement)}_updateVisualElements(e){const{viewshedComputedData:t,corners:i,arcCenters:s,parallelCenters:r}=e,o=C(t.observerRenderSpace);this._observerVisualElement.geometry=t.observer,this._shapeVisualElement.updateTransform(),this._updateFrameLines(o,i),this._updateFrameArcs(t,i,r),this._updateCentralHelperArcs(t,s)}_updateFrameLines(e,t){this._frameLinesVisualElement.geometry=[[e,t.topLeft],[e,t.topRight],[e,t.bottomLeft],[e,t.bottomRight]]}_updateFrameArcs(e,t,i){const{observerRenderSpace:s,rightVector:o,horizontalFieldOfView:a,tiltedUpVector:l}=e,n=r(a),c=g(),p=m();h(p,n/2,l),d(c,o,p),P(this._leftArcVisualElement,s,t.bottomLeft,t.topLeft,"forward",c),h(p,-n/2,l),u(c,0,0,0),d(c,o,p),P(this._rightArcVisualElement,s,t.bottomRight,t.topRight,"forward",c);const _=a>180?"backward":"forward";P(this._topArcVisualElement,i.top,t.topRight,t.topLeft,_,l),P(this._bottomArcVisualElement,i.bottom,t.bottomRight,t.bottomLeft,_,l)}_updateCentralHelperArcs(e,t){const i=e.observerRenderSpace,s=e.horizontalFieldOfView>=180?"backward":"forward";P(this._centralLatitude,i,t.right,t.left,s,e.tiltedUpVector),P(this._centralLongitude,i,t.top,t.bottom,"forward",e.leftVector)}get test(){}};function P(e,t,i,s,r,o,a=A){const l=g();p(l,i,t);const n=_(l),c=g();p(c,s,t),f(c,c),V(c,c,n);let u=v(l,c);const L=C(o);"backward"===r&&(w(L,L),u=-(2*Math.PI-u));const D=[],y=Math.ceil(Math.abs(u)/a),j=m();h(j,u/y,L);const F=g();E(F,l);const O=g();E(O,i);for(let h=0;h<y;h++){const e=g();E(e,O),d(F,F,j),b(O,t,F);const i=g();E(i,O),D.push([e,i])}e.geometry=D}e([n()],S.prototype,"view",void 0),e([n({constructOnly:!0})],S.prototype,"isDecoration",void 0),e([n()],S.prototype,"analysisViewData",void 0),e([n()],S.prototype,"viewshedComputedData",void 0),e([n()],S.prototype,"visible",void 0),e([n()],S.prototype,"_color",null),e([n()],S.prototype,"_selected",null),e([n()],S.prototype,"_staged",null),S=e([c("esri.views.3d.analysis.Viewshed.ViewshedVisualization")],S);const z=S;export{z 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{getFeatureId as t,updatePointsFromFeatureReference as s}from"../../../analysis/featureReferenceUtils.js";import i from"../../../core/Accessor.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{mapCollection as o}from"../../../core/mapCollectionUtils.js";import{abortMaybe as a,destroyMaybe as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{getFeatureId as t,updatePointsFromFeatureReference as s}from"../../../analysis/featureReferenceUtils.js";import i from"../../../core/Accessor.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{mapCollection as o}from"../../../core/mapCollectionUtils.js";import{abortMaybe as a,destroyMaybe as n}from"../../../core/maybe.js";import{watch as d,when as l,syncAndInitial as h,initial as c}from"../../../core/reactiveUtils.js";import{property as p}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as m}from"../../../core/accessorSupport/decorators/subclass.js";import{c as u,p as w}from"../../../chunks/vec32.js";import{create as v}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectOrLoad as f,canProjectWithoutEngine as V,isLoaded as y}from"../../../geometry/projection.js";import{projectBoundingRect as _}from"../../../geometry/projection/projectBoundingRect.js";import{empty as j,containsPoint as g}from"../../../geometry/support/aaBoundingRect.js";import{AnalysisView3D as R}from"./AnalysisView3D.js";import{logFailedGeometryProjectionError as b}from"./support/projectionUtils.js";import{ViewshedAnalysisVisualization as D}from"./Viewshed/ViewshedAnalysisVisualization.js";import{ViewshedComputedData as C}from"./Viewshed/ViewshedComputedData.js";import F from"./Viewshed/ViewshedTool.js";import{newIntersector as H}from"../webgl-engine/lib/Intersector.js";import{StoreResults as T}from"../webgl-engine/lib/IntersectorInterfaces.js";import{Viewshed as O}from"../webgl-engine/lib/Viewshed.js";import{connectAnalysisViewToTool as k,removeAnalysisViewTool as S,activateAnalysisViewTool as U}from"../../analysis/analysisViewUtils.js";let A=class extends(R(i)){constructor(e){super(e),this.type="viewshed-view-3d",this.analysis=null,this.tool=null,this._selectedViewshed=null,this.viewshedComputedDataHandles=null,this._placementTask=null,this._viewshedRenderer=null,this._intersector=null}get selectedViewshed(){return this._selectedViewshed}set selectedViewshed(e){this._unselectOtherViewsheds(e),this._selectedViewshed=e}get selectedViewshedComputedData(){return this.tool?.selectedViewshedComputedData}get _isDecoration(){return!this.parent}initialize(){const e=this.view;this._viewshedRenderer=new O({view:e,selectedViewshed:()=>this.selectedViewshed??this.tool?.stagedViewshed,isDecoration:this._isDecoration}),this._intersector=H(this.view.state.viewingMode),this._intersector.options.hud=!1,this._intersector.options.store=T.MIN,this.viewshedComputedDataHandles=o((()=>this.analysis.viewsheds),(t=>{const s=new C({renderCoordsHelper:e.renderCoordsHelper,viewshed:t}),i=Symbol();return this.addHandles([d((()=>({valid:s.valid,canProject:V(s.observer?.spatialReference,this.view.spatialReference)||y()})),(({valid:e,canProject:t},i)=>{this.visible&&(e&&t?this._addViewshedsToRenderer(s):i?.valid&&i?.canProject&&this._removeViewshedsFromRenderer(s),t||b(this.analysis,s.observer.spatialReference,r.getLogger(this)))}),c),...this._createFeatureReferenceHandles(s)],i),{viewshedComputedData:s,remove:()=>{this.removeHandles(i),this._removeViewshedsFromRenderer(s),s.destroy()}}})),this._analysisVisualization=new D({view:e,analysisViewData:this,isDecoration:this._isDecoration}),this.addHandles([d((()=>this.visible),(e=>{const t=this.viewshedComputedDataHandles;if(null==t)return;e||(this.selectedViewshed=null);const s=t.map((e=>e.viewshedComputedData)).filter((e=>e.valid)).toArray();e?this._addViewshedsToRenderer(s):this._removeViewshedsFromRenderer(s)})),d((()=>e.renderCoordsHelper),(e=>{this.viewshedComputedDataHandles?.forEach((({viewshedComputedData:t})=>t.renderCoordsHelper=e))})),k(this,F),l((()=>this.interactive),(()=>{this._unselectOtherViewsheds(this.selectedViewshed)}),h)])}destroy(){this._placementTask=a(this._placementTask),S(this),this._analysisVisualization=n(this._analysisVisualization);const e=this.viewshedComputedDataHandles;null!=e&&this._removeViewshedsFromRenderer(e.map((e=>e.viewshedComputedData)).toArray())}_createFeatureReferenceHandles(e){const{view:t}=this;return[d((()=>[t.state.camera,t.slicePlane,e.viewshed.observer,e.targetRenderSpace,e.verticalFieldOfView,e.horizontalFieldOfView,e.feature]),(()=>{this._updateObserverFromFeature(t,e)}),c),this._createElevationUpdateHandle(e),l((()=>e.needUpdateByFeature),(()=>{this._updateObserverFromFeature(t,e),e.needUpdateByFeature=!1}))]}_createElevationUpdateHandle(e){const t=(s,i)=>{const{view:r}=this,{observer:o}=e;if(null==o)return;const a=f(o,r.spatialReference);if(null!=a.pending)return void a.pending.finally((()=>t(s,i)));const n=a.geometry;null!=n&&(_(s,i,I,r.spatialReference),g(I,[n.x,n.y])&&(e.needUpdateByFeature=!0))};return this.view.elevationProvider.on("elevation-change",(({extent:e,spatialReference:s})=>t(e,s)))}async createViewsheds(e){return this._placementTask=a(this._placementTask),this._placementTask=U(this,e),null!=this.tool&&this.tool.createViewsheds(),await this._placementTask.promise}_addViewshedsToRenderer(e){this._viewshedRenderer.updateViewsheds({adds:e})}_removeViewshedsFromRenderer(e){this._viewshedRenderer.updateViewsheds({removes:e})}_updateObserverFromFeature(e,i){const r=i.observerRenderSpace,o=i.targetRenderSpace,a=u(v(),r),n={observer:r,observerSurfaceNormal:null,observerAdjusted:a,observerFeatureId:t(i.feature),target:o,targetSurfaceNormal:null,targetAdjusted:u(v(),o),targetFeatureId:null};s(e,this._intersector,n,(e=>Math.min(e,.05*i.farDistanceRenderSpace))),i.observerRenderSpaceOverride=w(a,r)?null:a}_unselectOtherViewsheds(e){if(null!=e)for(const t of this.view.tools.items)t!==this.tool&&t instanceof F&&(t.analysisViewData.selectedViewshed=null)}get test(){}};e([p({readOnly:!0})],A.prototype,"type",void 0),e([p({constructOnly:!0,nonNullable:!0})],A.prototype,"analysis",void 0),e([p()],A.prototype,"tool",void 0),e([p()],A.prototype,"_selectedViewshed",void 0),e([p()],A.prototype,"selectedViewshed",null),e([p()],A.prototype,"selectedViewshedComputedData",null),e([p()],A.prototype,"viewshedComputedDataHandles",void 0),e([p()],A.prototype,"_analysisVisualization",void 0),e([p()],A.prototype,"_placementTask",void 0),e([p()],A.prototype,"_viewshedRenderer",void 0),A=e([m("esri.views.3d.analysis.ViewshedAnalysisView3D")],A);const z=A,I=j();export{z 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{c as e,d as r,g as n,j as t,o}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{wrap as c}from"../../../../geometry/support/ray.js";import{
|
|
5
|
+
import{c as e,d as r,g as n,j as t,o}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{wrap as c}from"../../../../geometry/support/ray.js";import{h as s,l as a}from"../../../../chunks/sphere.js";import{defaultConstraintOptions as f,interactionDirectionTowardsConstraintMinimization as m,adjustRangeForInteraction as u}from"./common.js";import{InteractionType as p}from"./InteractionType.js";function d(e,r,n=f){if(!e.state.isLocal)return 0;const t=e.state.constraints.distance;if(!e.pointsOfInterest.surfaceOrigin.renderLocation||t===1/0)return 0;j.min=0,j.max=t,l(e,n,j);const o=O(e,r),i=j.max-o;return i>=-1e-6?0:i}function y(t,o,i=f){const u=d(t,o,i);if(0===u)return!1;const p=t.pointsOfInterest.surfaceOrigin;if(!p.renderLocation)return!1;const y=O(t,o)+u,l=e(x,o.eye),j=m(o,i.interactionDirection,g(o,p.renderLocation,h),I);if(!s(a(p.renderLocation,y),c(o.eye,j),C))return!1;o.eye=C;const N=r(L,o.eye,l);o.center=n(C,o.center,N);const k=t.renderCoordsHelper.getAltitude(o.center),v=t.renderCoordsHelper.intersectInfiniteManifold(o.ray,k,C);return null!=v&&(o.center=v),!0}function l(e,r,n){const t=r.interactionType;if(t===p.NONE)return;const{min:o,max:i}=n,{interactionStartCamera:c,interactionFactor:s}=r;if(!c)return;const a=t===p.ZOOM||t===p.PAN,f=d(e,c),m=0===f?0:O(e,c);n.min=o,n.max=i;u(f,m,a,s,.05*m,n)}function O(e,r){const n=e.pointsOfInterest.surfaceOrigin;return n.renderLocation?t(r.eye,n.renderLocation):0}function g(e,r,n){return o(n,e.eye,r)}const j={min:0,max:0},x=i(),L=i(),I=i(),h=i(),C=i();export{y as applyDistanceConstraint,d as getDistanceConstraintError};
|
|
@@ -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{c as e,s as r,h as
|
|
5
|
+
import{c as e,s as r,h as n,d as t,g as i,f as o,l as s}from"../../../chunks/vec32.js";import{create as a}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as c}from"../../../geometry/ellipsoidUtils.js";import{containsPoint as l}from"../../../geometry/support/aaBoundingRect.js";import d from"../webgl/RenderCamera.js";import{DepthRange as g}from"../webgl-engine/lib/DepthRange.js";import{newIntersector as f}from"../webgl-engine/lib/Intersector.js";function u(e,r,n,t){return null!=e.renderCoordsHelper.fromRenderCoords(r.eye,w,t)&&l(n,w)}function m(e,r){return e.elevationProvider?e.elevationProvider.getElevation(r[0],r[1],r[2],e.renderCoordsHelper.spatialReference,"ground")??0:0}function p(o,s,a,c){const l=o.state.camera.clone();s&&a&&c&&(l.eye=s,l.center=a,l.up=c),v(o,l.ray,j)||e(j,l.center);const d=o.state.constraints,g=d.minimumPoiDistance;if(r(l.eye,j)<g){const r=d.collision.enabled;e(R,l.viewForward),n(R,R,g),r?l.eye=t(w,j,R):i(j,l.eye,R);const s=o.renderCoordsHelper,a=s.getAltitude(l.eye),c=d.collision.elevationMargin;r&&a<c&&(t(R,j,l.eye),l.eye=s.setAltitude(w,c,l.eye),i(j,l.eye,R))}return l.center=j,l}function y(e,n,t){if(!e.state.isGlobal||!e.stateManager.constraintsManager)return!1;const i=m(e,n),o=e.stateManager.constraintsManager.nearFarHeuristic;C.eye=n,C.center=t;const{far:s}=o.compute(C,e.renderDataExtent,g.infinite,i),a=s*s;return r(n,t)>a}function v(e,r,n){let t=M[e.viewingMode];t||(t=f(e.state.viewingMode),t.options.backfacesTerrain=!e.state.isGlobal,t.options.invisibleTerrain=!0,M[e.viewingMode]=t);const{isGlobal:i}=e.state;return!(!e.sceneIntersectionHelper.intersectRay(r,t,n)||y(e,r.origin,n))||(!(!e.renderCoordsHelper.intersectManifold(r,0,n)||y(e,r.origin,n))||!!i&&b(r,n,c(e.spatialReference).radius))}function b(e,r,t){const a=o(e.origin,e.origin)-t*t,c=a>0?Math.sqrt(a)/3:1;return n(r,e.direction,c/s(e.direction)),i(r,r,e.origin),!0}const M={},w=a(),j=a(),R=a(),C=new d;export{p as cameraOnContentAlongViewDirection,u as eyeWithinExtent,m as surfaceElevationBelowRenderLocation};
|
|
@@ -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{unitRGBAFromColor as t}from"../../../core/colorUtils.js";import{clamp as r,lerp as s}from"../../../core/mathUtils.js";import{disposeMaybe as i}from"../../../core/maybe.js";import{watch as o,syncAndInitial as a}from"../../../core/reactiveUtils.js";import"../../../core/Logger.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import"../../../core/Error.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{set as m}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{i as h,l as c,k as p}from"../../../chunks/vec32.js";import{s as u}from"../../../chunks/vec42.js";import{ZEROS as d}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{earth as f}from"../../../geometry/support/Ellipsoid.js";import{InternalRenderCategory as l}from"../webgl.js";import{innerAtmosphereDepth as g,computeInnerAltitudeFade as b}from"./atmosphereUtils.js";import{ChapmanAtmospherePassParameters as _,ChapmanAtmosphereTechnique as P}from"./ChapmanAtmosphereTechnique.js";import{ChapmanAtmosphereTechniqueConfiguration as j}from"./ChapmanAtmosphereTechniqueConfiguration.js";import{ColorFormat as w}from"../webgl/
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{unitRGBAFromColor as t}from"../../../core/colorUtils.js";import{clamp as r,lerp as s}from"../../../core/mathUtils.js";import{disposeMaybe as i}from"../../../core/maybe.js";import{watch as o,syncAndInitial as a}from"../../../core/reactiveUtils.js";import"../../../core/Logger.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import"../../../core/Error.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{set as m}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{i as h,l as c,k as p}from"../../../chunks/vec32.js";import{s as u}from"../../../chunks/vec42.js";import{ZEROS as d}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{earth as f}from"../../../geometry/support/Ellipsoid.js";import{InternalRenderCategory as l}from"../webgl.js";import{innerAtmosphereDepth as g,computeInnerAltitudeFade as b}from"./atmosphereUtils.js";import{ChapmanAtmospherePassParameters as _,ChapmanAtmosphereTechnique as P}from"./ChapmanAtmosphereTechnique.js";import{ChapmanAtmosphereTechniqueConfiguration as j}from"./ChapmanAtmosphereTechniqueConfiguration.js";import{ColorFormat as w}from"../webgl-engine/core/FBOCacheFormats.js";import{OpaqueEnvironment as v}from"../webgl-engine/effects/OpaqueEnvironment.js";import{RenderRequestType as q}from"../webgl-engine/lib/basicInterfaces.js";import{createQuadVAO as A,Layout as T}from"../webgl-engine/lib/glUtil3D.js";import{applyTextureResizeModulo as x}from"../webgl-engine/lib/textureUtils.js";import{A as C}from"../../../chunks/AtmosphereCompositing.glsl.js";import{AtmosphereCompositingTechnique as R}from"../webgl-engine/shaders/AtmosphereCompositingTechnique.js";import{DepthStencilAttachment as E,PrimitiveType as D}from"../../webgl/enums.js";import M from"../../../webscene/background/ColorBackground.js";let U=class extends v{constructor(){super(...arguments),this.requireGeometryDepth=!0,this._compositingPassParameters=new C,this._vao=null,this._passParameters=new _,this._configuration=new j}initialize(){this.techniques.precompile(P,this._configuration),this.techniques.precompile(R),this._configuration.reduced=!0,this.techniques.precompile(P,this._configuration),this._configuration.reduced=!1,this.addHandles([o((()=>this.view.environment.background),(e=>{const r=e instanceof M?t(e.color):d;h(this._passParameters.backgroundColor,r[0]*r[3],r[1]*r[3],r[2]*r[3])}),a),o((()=>this.view.stage?.renderer?.fullResolutionAtmosphere),(e=>this._configuration.reduced=!e),a),o((()=>this.view.environment.atmosphereEnabled),(e=>e?this._enable():this._disable()),a)])}destroy(){this._vao=i(this._vao)}render(e){const t=e.find((({name:e})=>e===l.OPAQUE_ENVIRONMENT));if(!this.bindParameters.mainDepth)return t;const r=this.renderingContext;this._vao??=A(r,T.Pos2Tex);const i=t.getAttachment(E);this._update();const o=this.techniques.get(P,this._configuration);if(!o.compiled)return this.requestRender(q.UPDATE),t;if(!this._configuration.reduced)return t.detachDepth(),r.bindFramebuffer(t.fbo),r.bindTechnique(o,this.bindParameters,this._passParameters),r.bindVAO(this._vao),r.drawArrays(D.TRIANGLE_STRIP,0,4),t.attachDepth(i),t;const a=this.techniques.get(R);if(!a.compiled)return this.requestRender(q.UPDATE),t;const n=r.getViewport(),m=this.bindParameters.camera,h=c(m.eye)-f.radius;let p;const u=f.atmosphereHeight;if(h<u){const e=Math.min(1,Math.max(0,h/u));p=s(.2,.3,e)}else{const e=Math.min(1,Math.max(0,(h-u)/(15*u)));p=s(.3,.6,e)}const d=this.renderingContext.parameters.maxTextureSize,g=x(Math.round(p*m.fullViewport[2]),d),b=x(Math.round(p*m.fullViewport[3]),d);r.setViewport(0,0,g,b);const _=this.fboCache.acquire(g,b,"chapman",w.RGBA8UNORM);return r.bindFramebuffer(_.fbo),r.clearFramebuffer([0,0,0,1],!0,!0),r.bindTechnique(o,this.bindParameters,this._passParameters),r.bindVAO(this._vao),r.drawArrays(D.TRIANGLE_STRIP,0,4),r.setViewport(n.x,n.y,n.width,n.height),this._compositingPassParameters.color=_.getTexture(),t.detachDepth(),r.bindFramebuffer(t.fbo),r.bindTechnique(a,this.bindParameters,this._compositingPassParameters),r.screen.draw(),t.attachDepth(i),_.release(),t}_update(){const e=this.bindParameters.camera,t=p(e.eye),s=Math.sqrt(t),i=t-this._passParameters.radii[1]**2,o=r((s-this._passParameters.radii[0])/f.atmosphereHeight,0,1);u(this._passParameters.heightParameters,s,t,i,o);const a=this.view.basemapTerrain?.getLowerBoundRadius()??0;m(this._passParameters.radii,a,a+f.atmosphereHeight),this._passParameters.innerFadeDistance=2*Math.sqrt((2*a-g)*g),this._passParameters.altitudeFade=b(s-a)}};U=e([n("esri.views.3d.environment.ChapmanAtmosphere")],U);export{U as ChapmanAtmosphere};
|
|
@@ -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{clamp as e}from"../../../core/mathUtils.js";import{fromValues as
|
|
5
|
+
import{clamp as e}from"../../../core/mathUtils.js";import{fromValues as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";function o(r){return e((r-t)/(a-t),0,1)}const t=1e5,a=1e6,F=1e4,i=r(parseFloat(Number(5802e-9).toFixed(6)),parseFloat(Number(13558e-9).toFixed(6)),parseFloat(Number(331e-7).toFixed(6))),m=3,s=r(m*parseFloat(Number(65e-8).toFixed(6)),m*parseFloat(Number(1881e-9).toFixed(6)),m*parseFloat(Number(85e-9).toFixed(6))),l=3996e-9,p=r(parseFloat(Number(i[0]+s[0]).toFixed(6)),parseFloat(Number(i[1]+s[1]).toFixed(6)),parseFloat(Number(i[2]+s[2]).toFixed(6)));export{p as betaCombined,l as betaMie,s as betaOzone,i as betaRayleigh,o as computeInnerAltitudeFade,F as innerAtmosphereDepth,t as innerAtmosphereFadeStart};
|
|
@@ -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 s from"../../../../core/Identifiable.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{DrapeSourceType as i,DrapedRenderGroup as c}from"../../layers/interfaces.js";import{DirtyOperation as u}from"../../webgl-engine/lib/ModelDirtyTypes.js";import{UpdatePolicy as
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Accessor.js";import s from"../../../../core/Identifiable.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{DrapeSourceType as i,DrapedRenderGroup as c}from"../../layers/interfaces.js";import{DirtyOperation as u}from"../../webgl-engine/lib/ModelDirtyTypes.js";import{UpdatePolicy as a}from"../../webgl-engine/lib/UpdatePolicy.js";class n{constructor(e){this._resourceFactory=e,this._resources=null,this._visible=!0,this._attached=!1,this._renderGroup=c.Outline}destroy(){this._destroyResources()}get resources(){return null!=this._resources?this._resources.external:null}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this._syncGeometriesToRenderer())}get attached(){return this._attached}set attached(e){e!==this._attached&&(this._attached=e,this._createOrDestroyResources())}get renderGroup(){return this._renderGroup}set renderGroup(e){this._renderGroup=e;const r=this._resources?.layerView;r&&(r.renderGroup=e)}recreate(){this.attached&&this._createResources()}recreateGeometry(){this._resourceFactory.recreateGeometry?null!=this._resources&&(this._ensureRenderGeometriesRemoved(),this._resourceFactory.recreateGeometry(this._resources.external),this._syncGeometriesToRenderer()):this.recreate()}forEachMaterial(e){this._resources&&this._resourceFactory.forEachMaterial(this._resources.external,e)}_createOrDestroyResources(){this._attached?null==this._resources&&this._createResources():this._destroyResources()}_createResources(){this._destroyResources();const e=this._resourceFactory.createResources(),r=new d({view:this._resourceFactory.view,renderGroup:this._renderGroup}),s=this._resourceFactory.view.basemapTerrain?.overlayManager;this._resources={layerView:new d({view:this._resourceFactory.view,renderGroup:this._renderGroup}),external:e,geometriesAdded:!1},s&&(this._resources.drapeSourceRenderer=s.registerGeometryDrapeSource(r)),this._syncGeometriesToRenderer()}_destroyResources(){if(null==this._resources)return;this._ensureRenderGeometriesRemoved();const e=this._resourceFactory.view.basemapTerrain?.overlayManager;e&&e.unregisterDrapeSource(this._resources.layerView),this._resourceFactory.destroyResources(this._resources.external),this._resources=null}_syncGeometriesToRenderer(){this._visible?this._ensureRenderGeometriesAdded():this._ensureRenderGeometriesRemoved()}_ensureRenderGeometriesRemoved(){if(null==this._resources?.drapeSourceRenderer)return;if(!this._resources.geometriesAdded)return;this._resources.drapeSourceRenderer.removeGeometries(this._resources.external.geometries,u.UPDATE),this._resources.geometriesAdded=!1}_ensureRenderGeometriesAdded(){if(null==this._resources?.drapeSourceRenderer)return;if(this._resources.geometriesAdded)return;this._resources.drapeSourceRenderer.addGeometries(this._resources.external.geometries,u.UPDATE),this._resources.geometriesAdded=!0}}let d=class extends(s.IdentifiableMixin(r)){constructor(e){super(e),this.drapeSourceType=i.Features,this.updatePolicy=a.SYNC,this.renderGroup=c.Outline}};e([t({constructOnly:!0})],d.prototype,"view",void 0),e([t({readOnly:!0})],d.prototype,"drapeSourceType",void 0),e([t()],d.prototype,"renderGroup",void 0),d=e([o("esri.views.3d.interactive.visualElements.DrapedVisualElementResources")],d);export{n as DrapedVisualElementResources};
|
|
@@ -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{DrapedVisualElementResources as e}from"./DrapedVisualElementResources.js";import{VisualElement as s}from"./VisualElement.js";import{VisualElementResources as r}from"./VisualElementResources.js";class t extends s{constructor(s){super(s),this._isDraped=!1,this.object3dResources=new r(this.createObject3DResourceFactory(s.view)),this.drapedResources=new e(this.createDrapedResourceFactory(s.view)),this.isDraped=s.isDraped??!1}get isDraped(){return this._isDraped}set isDraped(e){e!==this._isDraped&&(this._isDraped=e,this.object3dResources.attached=this.attached&&!e,this.drapedResources.attached=this.attached&&e)}get renderGroup(){return this.drapedResources.renderGroup}set renderGroup(e){this.drapedResources.renderGroup=e}createResources(){this.object3dResources.attached=!this._isDraped,this.drapedResources.attached=this._isDraped}destroyResources(){this.object3dResources.attached=!1,this.drapedResources.attached=!1}recreate(){this.object3dResources.recreate(),this.drapedResources.recreate()}recreateGeometry(){this.object3dResources.recreateGeometry(),this.drapedResources.recreateGeometry()}destroy(){this.object3dResources.destroy(),this.drapedResources.destroy(),super.destroy()}updateVisibility(e){this.object3dResources.visible=e,this.drapedResources.visible=e}}export{t as EngineVisualElement};
|
|
5
|
+
import{DrapedVisualElementResources as e}from"./DrapedVisualElementResources.js";import{VisualElement as s}from"./VisualElement.js";import{VisualElementResources as r}from"./VisualElementResources.js";class t extends s{constructor(s){super(s),this._isDraped=!1,this.object3dResources=new r(this.createObject3DResourceFactory(s.view)),this.drapedResources=new e(this.createDrapedResourceFactory(s.view)),this.isDraped=s.isDraped??!1}get isDraped(){return this._isDraped}set isDraped(e){e!==this._isDraped&&(this._isDraped=e,this.object3dResources.attached=this.attached&&!e,this.drapedResources.attached=this.attached&&e)}get renderGroup(){return this.drapedResources.renderGroup}set renderGroup(e){this.drapedResources.renderGroup=e}createResources(){this.object3dResources.attached=!this._isDraped,this.drapedResources.attached=this._isDraped}destroyResources(){this.object3dResources.attached=!1,this.drapedResources.attached=!1}recreate(){this.object3dResources.recreate(),this.drapedResources.recreate()}recreateGeometry(){this.object3dResources.recreateGeometry(),this.drapedResources.recreateGeometry()}destroy(){this.object3dResources.destroy(),this.drapedResources.destroy(),super.destroy()}updateVisibility(e){this.object3dResources.visible=e,this.drapedResources.visible=e}forEachMaterial(e){this.object3dResources?.forEachMaterial(e),this.drapedResources?.forEachMaterial(e)}}export{t as EngineVisualElement};
|
|
@@ -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"../../../../core/has.js";import{c as e,d as t,p as r,v as i}from"../../../../chunks/vec32.js";import{create as s,fromValues as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a,c as o}from"../../../../chunks/vec42.js";import{fromValues as l,clone as h}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as d,fromRay as _,getStart as c,getEnd as p}from"../../../../geometry/support/clipRay.js";import{intersectClipRay as u}from"../../../../geometry/support/frustum.js";import{create as m,fromPoints as f,pointAt as y}from"../../../../geometry/support/lineSegment.js";import{create as g,fromPoints as b}from"../../../../geometry/support/ray.js";import{EngineVisualElement as D}from"./EngineVisualElement.js";import{LaserlineVisualElement as O}from"./LaserlineVisualElement.js";import{drapedZ as w}from"../../terrain/OverlayRenderer.js";import{createPolylineGeometry as E}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as A}from"../../webgl-engine/lib/Material.js";import{RenderGeometry as j}from"../../webgl-engine/lib/RenderGeometry.js";import{VertexAttribute as R}from"../../webgl-engine/lib/VertexAttribute.js";import{RibbonLineMaterial as C}from"../../webgl-engine/materials/RibbonLineMaterial.js";class G extends D{constructor(e){super(e),this._ray=g(),this._isWorldDown=!1,this._start=s(),this._end=n(1,0,0),this._width=1,this._color=l(1,0,1,1),this._polygonOffset=!1,this._writeDepthEnabled=!0,this._innerWidth=0,this._innerColor=l(1,1,1,1),this._stipplePattern=null,this._stippleOffColor=null,this._stipplePreferContinuous=!0,this._falloff=0,this._extensionType=
|
|
5
|
+
import"../../../../core/has.js";import{c as e,d as t,p as r,v as i}from"../../../../chunks/vec32.js";import{create as s,fromValues as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a,c as o}from"../../../../chunks/vec42.js";import{fromValues as l,clone as h}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as d,fromRay as _,getStart as c,getEnd as p}from"../../../../geometry/support/clipRay.js";import{intersectClipRay as u}from"../../../../geometry/support/frustum.js";import{create as m,fromPoints as f,pointAt as y}from"../../../../geometry/support/lineSegment.js";import{create as g,fromPoints as b}from"../../../../geometry/support/ray.js";import{EngineVisualElement as D}from"./EngineVisualElement.js";import{LaserlineVisualElement as O}from"./LaserlineVisualElement.js";import{drapedZ as w}from"../../terrain/OverlayRenderer.js";import{createPolylineGeometry as E}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as A}from"../../webgl-engine/lib/Material.js";import{RenderGeometry as j}from"../../webgl-engine/lib/RenderGeometry.js";import{VertexAttribute as R}from"../../webgl-engine/lib/VertexAttribute.js";import{RibbonLineMaterial as C}from"../../webgl-engine/materials/RibbonLineMaterial.js";class G extends D{constructor(e){super(e),this._ray=g(),this._isWorldDown=!1,this._start=s(),this._end=n(1,0,0),this._width=1,this._color=l(1,0,1,1),this._polygonOffset=!1,this._writeDepthEnabled=!0,this._innerWidth=0,this._innerColor=l(1,1,1,1),this._stipplePattern=null,this._stippleOffColor=null,this._stipplePreferContinuous=!0,this._falloff=0,this._extensionType=V.LINE,this._laserlineStyle=null,this._laserlineEnabled=!1,this._renderOccluded=A.OccludeAndTransparent,this._fadedExtensions=L,this._laserline=new O({view:this.view,isDecoration:e.isDecoration}),this.applyProperties(e)}destroy(){this._laserline.destroy(),super.destroy()}createObject3DResourceFactory(e){return{view:e,createResources:e=>this._createObject3DResources(e),destroyResources:P,recreateGeometry:(e,t)=>this._recreateObject3DGeometry(e,t),cameraChanged:()=>this._updateGeometry(),forEachMaterial:(e,t)=>t(e.material)}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:P,recreateGeometry:e=>this._recreateDrapedGeometry(e),forEachMaterial:(e,t)=>t(e.material)}}updateVisibility(e){super.updateVisibility(e),this._laserline.visible=e}onAttachedChange(){this._laserline.attached=this._laserlineAttached}setStartEndFromWorldDownAtLocation(r){this._isWorldDown=!0,e(this._start,r),this.view.renderCoordsHelper.worldUpAtPosition(r,this._end),t(this._end,r,this._end),b(this._start,this._end,this._ray),this._updateGeometry()}get start(){return this._start}set start(t){this._isWorldDown=!1,r(this._start,t)||(e(this._start,t),b(this._start,this._end,this._ray),this._updateGeometry())}get end(){return this._end}set end(t){this._isWorldDown=!1,r(this._end,t)||(e(this._end,t),b(this._start,this._end,this._ray),this._updateGeometry())}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get color(){return this._color}set color(e){a(e,this._color)||(o(this._color,e),this._updateMaterial())}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){e!==this._polygonOffset&&(this._polygonOffset=e,this._updateMaterial())}get writeDepthEnabled(){return this._writeDepthEnabled}set writeDepthEnabled(e){this._writeDepthEnabled!==e&&(this._writeDepthEnabled=e,this._updateMaterial())}get innerWidth(){return this._innerWidth}set innerWidth(e){e!==this._innerWidth&&(this._innerWidth=e,this._updateMaterial())}get innerColor(){return this._innerColor}set innerColor(e){a(e,this._innerColor)||(o(this._innerColor,e),this._updateMaterial())}get stipplePattern(){return this._stipplePattern}set stipplePattern(e){const t=null!=e!=(null!=this._stipplePattern);this._stipplePattern=e,t?this.recreate():this._updateMaterial()}get stippleOffColor(){return this._stippleOffColor}set stippleOffColor(e){null!=e&&null!=this._stippleOffColor&&a(e,this._stippleOffColor)||(this._stippleOffColor=null!=e?h(e):null,this._updateMaterial())}get stipplePreferContinuous(){return this._stipplePreferContinuous}set stipplePreferContinuous(e){e!==this._stipplePreferContinuous&&(this._stipplePreferContinuous=e,this._updateMaterial())}get falloff(){return this._falloff}set falloff(e){e!==this._falloff&&(this._falloff=e,this._updateMaterial())}get extensionType(){return this._extensionType}set extensionType(e){e!==this._extensionType&&(this._extensionType=e,this.recreateGeometry())}get _laserlineAttached(){return this._laserlineEnabled&&null!=this._laserlineStyle&&this.attached&&!this.isDraped}get laserlineStyle(){return this._laserlineStyle}set laserlineStyle(e){this._laserlineStyle=e,this._laserline.attached=this._laserlineAttached,null!=e&&(this._laserline.style=e)}get laserlineEnabled(){return this._laserlineEnabled}set laserlineEnabled(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,this._laserline.attached=this._laserlineAttached)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get _normalizedRenderOccluded(){return this.isDraped&&this._renderOccluded===A.OccludeAndTransparentStencil?A.OccludeAndTransparent:this._renderOccluded}get fadedExtensions(){return this._fadedExtensions}set fadedExtensions(e){this._fadedExtensions=e??L,this.recreateGeometry()}_updateMaterial(){const{materialParameters:e}=this;this.object3dResources.resources?.material.setParameters(e),this.drapedResources.resources?.material.setParameters(e)}get materialParameters(){return{width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:this._stipplePreferContinuous,innerWidth:this._innerWidth,innerColor:this._innerColor,falloff:this._falloff,hasPolygonOffset:this._polygonOffset,renderOccluded:this._normalizedRenderOccluded,isDecoration:this.isDecoration,writeDepth:this._writeDepthEnabled}}_createObject3DResources(e){const t=new C(this.materialParameters),r=new Array;return this._createObject3DGeometry(t,e,r),{material:t,geometries:r}}_recreateObject3DGeometry(e,t){e.geometries.length=0,this._createObject3DGeometry(e.material,t,e.geometries)}_createObject3DGeometry(e,t,r){const i=this._createGeometry(e);r.push(i),t.addGeometry(i),this._updateVerticesObject3D(t)}_createDrapedResources(){const e=new C(this.materialParameters);return{material:e,geometries:[this._createDrapedGeometry(e)]}}_recreateDrapedGeometry(e){e.geometries=[this._createDrapedGeometry(e.material)]}_createDrapedGeometry(e){const t=this._createGeometry(e);return this._updateVerticesDraped(t),new j(t)}_createGeometry(e){const t=this.extensionType===V.FADED,r=t?[s(),s(),s(),s()]:[s(),s()];return E(e,r,null,t?[1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0]:null)}_updateGeometry(){if(this.isDraped)this.drapedResources.recreateGeometry();else{const e=this.object3dResources.object;e&&this._updateVerticesObject3D(e)}}_updateVerticesObject3D(e){const t=this._lineSegment;this._updateVertexAttributesObject3D(e,t),this._laserline.intersectsLine=t}_updateVerticesDraped(e){this._updateVertexAttributesDraped(e,this._lineSegment)}get _lineSegment(){return this._extensionType===V.FADED?this._updateLineSegmentFinite(S):this._updateLineSegmentInfinite(this._extensionType,S)}_updateLineSegmentFinite(e){return f(this._start,this._end,e)}_updateLineSegmentInfinite(e,t){const r=this.view.state.camera;switch(_(this._ray,x),e){case V.LINE:x.c0=-Number.MAX_VALUE;break;case V.RAY:case V.GROUND_RAY:{const e=this._ray.origin,t=this.view.elevationProvider.getElevation(e[0],e[1],e[2],this.view.renderCoordsHelper.spatialReference,"ground")??0,r=this.view.renderCoordsHelper.getAltitude(e);this._isWorldDown&&r<t&&i(x.ray.direction,x.ray.direction),this._extensionType===V.GROUND_RAY&&null!=t&&(x.c1=Math.abs(r-t));break}}if(!u(r.frustum,x))return this._updateLineSegmentFinite(t);const s=c(x,v),n=p(x,M);return f(s,n,t)}_updateVertexAttributesObject3D(e,t){const r=e.geometries[0].getMutableAttribute(R.POSITION)?.data;if(!r)return;let i=0;for(const s of this._lineVertices(t))r[i++]=s[0],r[i++]=s[1],r[i++]=s[2];e.geometryVertexAttributeUpdated(e.geometries[0],R.POSITION)}_updateVertexAttributesDraped(e,t){const r=e.getMutableAttribute(R.POSITION)?.data;if(!r)return;let i=0;for(const s of this._lineVertices(t))r[i++]=s[0],r[i++]=s[1],r[i++]=w;e.invalidateBoundingInfo()}*_lineVertices(e){this.extensionType===V.FADED?(yield y(e,-this.fadedExtensions.start,v),yield y(e,0,v),yield y(e,1,v),yield y(e,1+this.fadedExtensions.end,v)):(yield y(e,0,v),yield y(e,1,v))}}function P(e){e.geometries=[]}const x=d(),v=s(),M=s(),S=m();var V;!function(e){e[e.LINE=0]="LINE",e[e.RAY=1]="RAY",e[e.GROUND_RAY=2]="GROUND_RAY",e[e.FADED=3]="FADED"}(V||(V={}));const T=1/3,L={start:T,end:T};export{G as ExtendedLineVisualElement,V as ExtensionType};
|
|
@@ -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 t from"../../../../Color.js";import e from"../../../../core/Handles.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{createRenderScreenPointArray as i,createRenderScreenPointArray3 as s,createScreenPointArray as r}from"../../../../core/screenUtils.js";import{add as a,set as
|
|
5
|
+
import t from"../../../../Color.js";import e from"../../../../core/Handles.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{createRenderScreenPointArray as i,createRenderScreenPointArray3 as s,createScreenPointArray as r}from"../../../../core/screenUtils.js";import{add as a,set as h,scale as n,negate as l,normalize as c,length as _}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{g as m}from"../../../../chunks/vec32.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{renderScreenSpaceTangent as d}from"../support/viewUtils.js";import{VisualElement as p}from"./VisualElement.js";import x from"../../../overlay/LineOverlayItem.js";import b from"../../../overlay/TextOverlayItem.js";class f extends p{constructor(o){super(o),this._handles=new e,this._textItem=null,this._calloutItem=null,this._showCallout=!0,this._showText=!0,this._geometry=null,this._text="-",this._fontSize=14,this._backgroundColor=new t([0,0,0,.6]),this._calloutColor=new t([0,0,0,.5]),this._textColor=new t([255,255,255]),this._distance=25,this._anchor="right",this.updatePositionOnCameraMove=!0,this.applyProperties(o)}get geometry(){return this._geometry}set geometry(t){this._geometry=t,this.updateLabelPosition()}get isDecoration(){return this._isDecoration}set isDecoration(t){this._isDecoration=t,this._textItem&&(this._textItem.isDecoration=t),this._calloutItem&&(this._calloutItem.isDecoration=t)}get textItem(){return this._textItem}get text(){return this._text}set text(t){this._text=t,this.attached&&(this._textItem.text=this._text)}get fontSize(){return this._fontSize}set fontSize(t){this._fontSize=t,this.attached&&(this._textItem.fontSize=this._fontSize)}get backgroundColor(){return this._backgroundColor}set backgroundColor(t){this._backgroundColor=t,this.attached&&(this._textItem.backgroundColor=this._backgroundColor)}get calloutColor(){return this._calloutColor}set calloutColor(t){this._calloutColor=t,this.attached&&(this._calloutItem.color=this._calloutColor.toRgba())}get textColor(){return this._textColor}set textColor(t){this._textColor=t,this.attached&&(this._textItem.textColor=this._textColor)}get distance(){return this._distance}set distance(t){this._distance!==t&&(this._distance=t,this.updateLabelPosition())}get anchor(){return this._anchor}set anchor(t){this._anchor!==t&&(this._anchor=t,this.updateLabelPosition())}get _camera(){return this.view.state.cssCamera}overlaps(t){return!!this.attached&&(this.textItem.visible&&t.textItem.visible&&!!this.view.overlay?.overlaps(this._textItem,t.textItem))}updateLabelPosition(){if(!this.attached)return;this._showText=!1,this._showCallout=!1;const{geometry:t,view:e,visible:o}=this;if(null!=t&&e.stage)switch(t.type){case"point":if(!this._computeLabelPositionFromPoint(t.point,L))break;if(t.callout){const e=this._camera,o=t.callout.distance;a(j,j,[0,t.callout.offset]),e.renderToScreen(j,L),h(P,0,1),n(P,P,o),a(P,P,j),e.renderToScreen(P,D),this._showCallout=this._updatePosition(L,D)}else this._textItem.position=[L[0],L[1]],this._textItem.anchor="center";this._showText=!0;break;case"corner":if(!this._computeLabelPositionFromCorner(t,this._distance,L,D))break;this._showCallout=this._updatePosition(L,D),this._showText=!0;break;case"segment":{if(!this._computeLabelPositionFromSegment(t,this._distance,this._anchor,L,D))break;this._showText=!0;const e=this._updatePosition(L,D);this._showCallout=!1!==t.callout&&e,this._showCallout||(this._textItem.anchor="center")}}this.updateVisibility(o)}_computeLabelPositionFromPoint(t,e){const o=this._camera;return o.projectToRenderScreen(t,T),!(T[2]<0||T[2]>1)&&(o.renderToScreen(T,e),!0)}_computeLabelPositionFromCorner(t,e,o,i){if(!t)return!1;const s=this._camera;return g(t.left,1,s,S),l(S,S),g(t.right,0,s,y),a(P,S,y),l(P,P),c(P,P),s.projectToRenderScreen(t.left.endRenderSpace,T),!(T[2]<0||T[2]>1)&&(s.renderToScreen(T,o),n(P,P,e),a(P,P,T),s.renderToScreen(P,i),!0)}_computeLabelPositionFromSegment(t,e,o,i,s){if(!t)return!1;const r=t.segment,c=this._camera;d(r.startRenderSpace,r.endRenderSpace,c,S),h(P,-S[1],S[0]);let m=!1;switch(o){case"top":m=P[1]<0;break;case"bottom":m=P[1]>0;break;case"left":m=P[0]>0;break;case"right":m=P[0]<0}if(m&&l(P,P),0===_(P))switch(o){case"top":P[1]=1;break;case"bottom":P[1]=-1;break;case"left":P[0]=-1;break;case"right":P[0]=1}return r.eval(R[t.sampleLocation],k),c.projectToRenderScreen(k,T),!(T[2]<0||T[2]>1)&&(c.renderToScreen(T,i),n(P,P,e),a(P,P,T),c.renderToScreen(P,s),!0)}_updatePosition(t,e){if(e){const o=e[0]-t[0],i=e[1]-t[1];return this._textItem.position=[e[0],e[1]],this._textItem.anchor=Math.abs(o)>Math.abs(i)?o>0?"left":"right":i>0?"top":"bottom",this._calloutItem.startPosition=[t[0],t[1]],this._calloutItem.endPosition=[e[0],e[1]],!0}return this._textItem.position=[t[0],t[1]],this._textItem.anchor="center",!1}createResources(){this._textItem=new b({visible:!0,text:this._text,fontSize:this._fontSize,backgroundColor:this._backgroundColor,textColor:this._textColor,isDecoration:this._isDecoration}),this._calloutItem=new x({color:this._calloutColor.toRgba(),visible:!0,width:2,isDecoration:this._isDecoration}),this.updateLabelPosition(),this.view.overlay?.items.addMany([this._textItem,this._calloutItem]),this.updatePositionOnCameraMove&&this._handles.add(o((()=>this.view.state.camera),(()=>this.updateLabelPosition())))}destroyResources(){this.view.overlay&&!this.view.overlay.destroyed&&this.view.overlay.items.removeMany([this._textItem,this._calloutItem]),this._handles.removeAll()}updateVisibility(t){this._textItem.visible=this._showText&&t,this._calloutItem.visible=this._showCallout&&t}forEachMaterial(){}}function g(t,e,o,i){return t.eval(e,v,w),m(I,v,w),d(v,I,o,i)}function C(t){switch(t){case"top":return"bottom";case"right":return"left";case"bottom":return"top";case"left":return"right"}}const v=u(),I=u(),w=u(),S=i(),y=i(),P=i(),k=u(),T=s(),j=i(),L=r(),D=r(),R={start:0,center:.5,end:1};export{f as LabelVisualElement,C as mirrorPosition};
|
|
@@ -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"../../../../core/has.js";import{c as e}from"../../../../chunks/vec32.js";import{create as t,clone as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as n,fromValues as s,copy as r}from"../../../../geometry/support/lineSegment.js";import{VisualElement as l}from"./VisualElement.js";import{LaserLineRenderer as a}from"../../webgl-engine/effects/laserlines/LaserLineRenderer.js";import{d as h}from"../../../../chunks/Laserlines.glsl.js";class c extends l{constructor(e){super(e),this._angleCutoff=h,this._style={},this._heightManifoldTarget=t(),this._heightManifoldEnabled=!1,this._intersectsLine=n(),this._intersectsLineEnabled=!1,this._intersectsLineInfinite=!1,this._lineVerticalPlaneSegment=null,this._pathVerticalPlaneBuffers=null,this._pointDistanceLine=null,this.applyProperties(e)}get testData(){}createResources(){this._ensureRenderer()}destroyResources(){this._disposeRenderer()}updateVisibility(){this._syncRenderer(),this._syncHeightManifold(),this._syncIntersectsLine(),this._syncPathVerticalPlane(),this._syncLineVerticalPlane(),this._syncPointDistance()}get angleCutoff(){return this._angleCutoff}set angleCutoff(e){this._angleCutoff!==e&&(this._angleCutoff=e,this._syncAngleCutoff())}get style(){return this._style}set style(e){this._style=e,this._syncStyle()}get heightManifoldTarget(){return this._heightManifoldEnabled?this._heightManifoldTarget:null}set heightManifoldTarget(t){null!=t?(e(this._heightManifoldTarget,t),this._heightManifoldEnabled=!0):this._heightManifoldEnabled=!1,this._syncRenderer(),this._syncHeightManifold()}set intersectsWorldUpAtLocation(e){if(null==e)return void(this.intersectsLine=null);const t=this.view.renderCoordsHelper.worldUpAtPosition(e,_);this.intersectsLine=s(e,t),this.intersectsLineInfinite=!0}get intersectsLine(){return this._intersectsLineEnabled?this._intersectsLine:null}set intersectsLine(e){null!=e?(r(e,this._intersectsLine),this._intersectsLineEnabled=!0):this._intersectsLineEnabled=!1,this._syncIntersectsLine(),this._syncRenderer()}get intersectsLineInfinite(){return this._intersectsLineInfinite}set intersectsLineInfinite(e){this._intersectsLineInfinite=e,this._syncIntersectsLineInfinite()}get lineVerticalPlaneSegment(){return this._lineVerticalPlaneSegment}set lineVerticalPlaneSegment(e){this._lineVerticalPlaneSegment=null!=e?r(e):null,this._syncLineVerticalPlane(),this._syncRenderer()}get pathVerticalPlane(){return this._pathVerticalPlaneBuffers}set pathVerticalPlane(e){this._pathVerticalPlaneBuffers=e,this._syncPathVerticalPlane(),this._syncLineVerticalPlane(),this._syncPointDistance(),this._syncRenderer()}get pointDistanceLine(){return this._pointDistanceLine}set pointDistanceLine(e){this._pointDistanceLine=null!=e?{origin:i(e.origin),target:e.target?i(e.target):null}:null,this._syncPointDistance(),this._syncRenderer()}_syncRenderer(){this.attached&&this.visible&&(this._intersectsLineEnabled||this._heightManifoldEnabled||null!=this._pointDistanceLine||null!=this._pathVerticalPlaneBuffers)?this._ensureRenderer():this._disposeRenderer()}_ensureRenderer(){null==this._renderer&&(this._renderer=new a({view:this.view,contrastControlEnabled:!0,isDecoration:this.isDecoration}),this._syncStyle(),this._syncHeightManifold(),this._syncIntersectsLine(),this._syncIntersectsLineInfinite(),this._syncPathVerticalPlane(),this._syncLineVerticalPlane(),this._syncPointDistance(),this._syncAngleCutoff())}_syncStyle(){null!=this._renderer&&this._renderer.setParameters(this._style)}_syncAngleCutoff(){this._renderer?.setParameters({angleCutoff:this._angleCutoff})}_syncHeightManifold(){null!=this._renderer&&(this._renderer.heightManifoldEnabled=this._heightManifoldEnabled&&this.visible,this._heightManifoldEnabled&&(this._renderer.heightManifoldTarget=this._heightManifoldTarget))}_syncIntersectsLine(){null!=this._renderer&&(this._renderer.intersectsLineEnabled=this._intersectsLineEnabled&&this.visible,this._intersectsLineEnabled&&(this._renderer.intersectsLineSegment=this._intersectsLine))}_syncIntersectsLineInfinite(){null!=this._renderer&&(this._renderer.intersectsLineInfinite=this._intersectsLineInfinite)}_syncPathVerticalPlane(){null!=this._renderer&&(this._renderer.pathVerticalPlaneEnabled=null!=this._pathVerticalPlaneBuffers&&this.visible,null!=this._pathVerticalPlaneBuffers&&(this._renderer.pathVerticalPlaneBuffers=this._pathVerticalPlaneBuffers))}_syncLineVerticalPlane(){null!=this._renderer&&(this._renderer.lineVerticalPlaneEnabled=null!=this._lineVerticalPlaneSegment&&this.visible,null!=this._lineVerticalPlaneSegment&&(this._renderer.lineVerticalPlaneSegment=this._lineVerticalPlaneSegment))}_syncPointDistance(){if(null==this._renderer)return;const e=this._pointDistanceLine,t=null!=e;this._renderer.pointDistanceEnabled=t&&null!=e.target&&this.visible,t&&(this._renderer.pointDistanceOrigin=e.origin,null!=e.target&&(this._renderer.pointDistanceTarget=e.target))}_disposeRenderer(){null!=this._renderer&&this.view.stage&&(this._renderer.destroy(),this._renderer=null)}}const _=t();export{c as LaserlineVisualElement};
|
|
5
|
+
import"../../../../core/has.js";import{c as e}from"../../../../chunks/vec32.js";import{create as t,clone as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as n,fromValues as s,copy as r}from"../../../../geometry/support/lineSegment.js";import{VisualElement as l}from"./VisualElement.js";import{LaserLineRenderer as a}from"../../webgl-engine/effects/laserlines/LaserLineRenderer.js";import{d as h}from"../../../../chunks/Laserlines.glsl.js";class c extends l{constructor(e){super(e),this._angleCutoff=h,this._style={},this._heightManifoldTarget=t(),this._heightManifoldEnabled=!1,this._intersectsLine=n(),this._intersectsLineEnabled=!1,this._intersectsLineInfinite=!1,this._lineVerticalPlaneSegment=null,this._pathVerticalPlaneBuffers=null,this._pointDistanceLine=null,this.applyProperties(e)}get testData(){}createResources(){this._ensureRenderer()}destroyResources(){this._disposeRenderer()}updateVisibility(){this._syncRenderer(),this._syncHeightManifold(),this._syncIntersectsLine(),this._syncPathVerticalPlane(),this._syncLineVerticalPlane(),this._syncPointDistance()}get angleCutoff(){return this._angleCutoff}set angleCutoff(e){this._angleCutoff!==e&&(this._angleCutoff=e,this._syncAngleCutoff())}get style(){return this._style}set style(e){this._style=e,this._syncStyle()}get heightManifoldTarget(){return this._heightManifoldEnabled?this._heightManifoldTarget:null}set heightManifoldTarget(t){null!=t?(e(this._heightManifoldTarget,t),this._heightManifoldEnabled=!0):this._heightManifoldEnabled=!1,this._syncRenderer(),this._syncHeightManifold()}set intersectsWorldUpAtLocation(e){if(null==e)return void(this.intersectsLine=null);const t=this.view.renderCoordsHelper.worldUpAtPosition(e,_);this.intersectsLine=s(e,t),this.intersectsLineInfinite=!0}get intersectsLine(){return this._intersectsLineEnabled?this._intersectsLine:null}set intersectsLine(e){null!=e?(r(e,this._intersectsLine),this._intersectsLineEnabled=!0):this._intersectsLineEnabled=!1,this._syncIntersectsLine(),this._syncRenderer()}get intersectsLineInfinite(){return this._intersectsLineInfinite}set intersectsLineInfinite(e){this._intersectsLineInfinite=e,this._syncIntersectsLineInfinite()}get lineVerticalPlaneSegment(){return this._lineVerticalPlaneSegment}set lineVerticalPlaneSegment(e){this._lineVerticalPlaneSegment=null!=e?r(e):null,this._syncLineVerticalPlane(),this._syncRenderer()}get pathVerticalPlane(){return this._pathVerticalPlaneBuffers}set pathVerticalPlane(e){this._pathVerticalPlaneBuffers=e,this._syncPathVerticalPlane(),this._syncLineVerticalPlane(),this._syncPointDistance(),this._syncRenderer()}get pointDistanceLine(){return this._pointDistanceLine}set pointDistanceLine(e){this._pointDistanceLine=null!=e?{origin:i(e.origin),target:e.target?i(e.target):null}:null,this._syncPointDistance(),this._syncRenderer()}get isDecoration(){return this._isDecoration}set isDecoration(e){this._isDecoration=e,this._renderer&&(this._renderer.isDecoration=e)}_syncRenderer(){this.attached&&this.visible&&(this._intersectsLineEnabled||this._heightManifoldEnabled||null!=this._pointDistanceLine||null!=this._pathVerticalPlaneBuffers)?this._ensureRenderer():this._disposeRenderer()}_ensureRenderer(){null==this._renderer&&(this._renderer=new a({view:this.view,contrastControlEnabled:!0,isDecoration:this.isDecoration}),this._syncStyle(),this._syncHeightManifold(),this._syncIntersectsLine(),this._syncIntersectsLineInfinite(),this._syncPathVerticalPlane(),this._syncLineVerticalPlane(),this._syncPointDistance(),this._syncAngleCutoff())}_syncStyle(){null!=this._renderer&&this._renderer.setParameters(this._style)}_syncAngleCutoff(){this._renderer?.setParameters({angleCutoff:this._angleCutoff})}_syncHeightManifold(){null!=this._renderer&&(this._renderer.heightManifoldEnabled=this._heightManifoldEnabled&&this.visible,this._heightManifoldEnabled&&(this._renderer.heightManifoldTarget=this._heightManifoldTarget))}_syncIntersectsLine(){null!=this._renderer&&(this._renderer.intersectsLineEnabled=this._intersectsLineEnabled&&this.visible,this._intersectsLineEnabled&&(this._renderer.intersectsLineSegment=this._intersectsLine))}_syncIntersectsLineInfinite(){null!=this._renderer&&(this._renderer.intersectsLineInfinite=this._intersectsLineInfinite)}_syncPathVerticalPlane(){null!=this._renderer&&(this._renderer.pathVerticalPlaneEnabled=null!=this._pathVerticalPlaneBuffers&&this.visible,null!=this._pathVerticalPlaneBuffers&&(this._renderer.pathVerticalPlaneBuffers=this._pathVerticalPlaneBuffers))}_syncLineVerticalPlane(){null!=this._renderer&&(this._renderer.lineVerticalPlaneEnabled=null!=this._lineVerticalPlaneSegment&&this.visible,null!=this._lineVerticalPlaneSegment&&(this._renderer.lineVerticalPlaneSegment=this._lineVerticalPlaneSegment))}_syncPointDistance(){if(null==this._renderer)return;const e=this._pointDistanceLine,t=null!=e;this._renderer.pointDistanceEnabled=t&&null!=e.target&&this.visible,t&&(this._renderer.pointDistanceOrigin=e.origin,null!=e.target&&(this._renderer.pointDistanceTarget=e.target))}_disposeRenderer(){null!=this._renderer&&this.view.stage&&(this._renderer.destroy(),this._renderer=null)}forEachMaterial(){}}const _=t();export{c as LaserlineVisualElement};
|
|
@@ -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{fromTranslation as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{i as r,t as s}from"../../../../chunks/vec32.js";import{ZEROS as o,create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{Object3DVisualElement as n}from"./Object3DVisualElement.js";import{lineStripsToParameters as l,createGeometry as m}from"../../support/engineContent/line.js";import{RenderOccludedFlag as p}from"../../webgl-engine/lib/Material.js";import{RibbonLineMaterial as h}from"../../webgl-engine/materials/RibbonLineMaterial.js";class d extends n{constructor(e,t){super(e),this._hasExternalMaterial=!1,this._hasExternalMaterial=null!=t,this._material=t??new h({width:1,color:a(1,0,1,1),stipplePreferContinuous:!0,isClosed:!1,falloff:0,innerWidth:1,hasPolygonOffset:!1,renderOccluded:p.OccludeAndTransparent,isDecoration:!!e.isDecoration,writeDepth:!0}),this.applyProperties(e)}setGeometryFromPoint(e,t=1e3){const r=i();this.view.renderCoordsHelper.toRenderCoords(e,r)&&this.setGeometryFromRenderSpacePoint(r,t)}setGeometryFromRenderSpacePoint(e,t=1e3){this.geometry=[[[e[0]-t,e[1],e[2]],[e[0]+t,e[1],e[2]]],[[e[0],e[1]-t,e[2]],[e[0],e[1]+t,e[2]]],[[e[0],e[1],e[2]-t],[e[0],e[1],e[2]+t]]]}setGeometryFromExtent(e){const t=this.view.spatialReference,s=i(),o=i(),a=100,n=[];r(s,e[0],e[1],a),this.view.renderCoordsHelper.toRenderCoords(s,t,o),n.push([o[0],o[1],o[2]]),r(s,e[2],e[1],a),this.view.renderCoordsHelper.toRenderCoords(s,t,o),n.push([o[0],o[1],o[2]]),r(s,e[2],e[3],a),this.view.renderCoordsHelper.toRenderCoords(s,t,o),n.push([o[0],o[1],o[2]]),r(s,e[0],e[3],a),this.view.renderCoordsHelper.toRenderCoords(s,t,o),n.push([o[0],o[1],o[2]]),r(s,e[0],e[1],a),this.view.renderCoordsHelper.toRenderCoords(s,t,o),n.push([o[0],o[1],o[2]]),r(s,e[0],e[1],a),this.view.renderCoordsHelper.toRenderCoords(s,t,o),n.push([o[0],o[1],o[2]]),this.geometry=[n]}setGeometryFromFrustum(e){const t=[];e.lines.forEach((e=>{t.push([e.origin[0],e.origin[1],e.origin[2]]),t.push([e.endpoint[0],e.endpoint[1],e.endpoint[2]])})),this.geometry=[t]}setGeometryFromBoundedPlane(e){const t=[],r=e.origin,s=e.basis1,o=e.basis2,a=.5,n=i(),l=i(),m=i(),p=i();n[0]=r[0]-s[0]*a-o[0]*a,n[1]=r[1]-s[1]*a-o[1]*a,n[2]=r[2]-s[2]*a-o[2]*a,l[0]=r[0]-s[0]*a+o[0]*a,l[1]=r[1]-s[1]*a+o[1]*a,l[2]=r[2]-s[2]*a+o[2]*a,m[0]=r[0]+s[0]*a+o[0]*a,m[1]=r[1]+s[1]*a+o[1]*a,m[2]=r[2]+s[2]*a+o[2]*a,p[0]=r[0]+s[0]*a-o[0]*a,p[1]=r[1]+s[1]*a-o[1]*a,p[2]=r[2]+s[2]*a-o[2]*a,t.push([n[0],n[1],n[2]]),t.push([l[0],l[1],l[2]]),t.push([m[0],m[1],m[2]]),t.push([p[0],p[1],p[2]]),t.push([n[0],n[1],n[2]]),this.geometry=[t]}setGeometryFromSegment(t){const r=t.endRenderSpace;this.transform=e(f,r);const{points:s}=t.createRenderGeometry(r,this.view.renderCoordsHelper);this.geometry=[s]}setGeometryFromSegments(t,r=o){this.transform=e(f,r),this.geometry=t.map((e=>e.createRenderGeometry(r,this.view.renderCoordsHelper).points))}getTransformedGeometry(){return null==this._geometry?null:this._geometry.map((e=>e.map((e=>s(i(),e,this.transform)))))}get renderOccluded(){return this._material.parameters.renderOccluded}set renderOccluded(e){this._material.setParameters({renderOccluded:e})}get geometry(){return this._geometry}set geometry(e){this._geometry=e,this.recreateGeometry()}get width(){return this._material.parameters.width}set width(e){this._material.setParameters({width:e})}get color(){return this._material.parameters.color}set color(e){const t=1===e[3];this._material.setParameters({color:e,writeDepth:t})}get innerWidth(){return this._material.parameters.innerWidth}set innerWidth(e){this._material.setParameters({innerWidth:e})}get innerColor(){return this._material.parameters.innerColor}set innerColor(e){this._material.setParameters({innerColor:e})}get stipplePattern(){return this._material.parameters.stipplePattern}set stipplePattern(e){null!=this._material&&this._material.setParameters({stipplePattern:e})}get stippleOffColor(){return this._material.parameters.stippleOffColor}set stippleOffColor(e){this._material.setParameters({stippleOffColor:e})}get stipplePreferContinuous(){return this._material.parameters.stipplePreferContinuous}set stipplePreferContinuous(e){this._material.setParameters({stipplePreferContinuous:e})}get falloff(){return this._material.parameters.falloff}set falloff(e){this._material.setParameters({falloff:e})}get polygonOffset(){return this._material.parameters.hasPolygonOffset}set polygonOffset(e){this._material.setParameters({hasPolygonOffset:e})}createExternalResources(){}destroyExternalResources(){}createGeometries(e){for(const t of l(this.geometry)){const r=m(this._material,t);e.addGeometry(r)}}
|
|
5
|
+
import{fromTranslation as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{i as r,t as s}from"../../../../chunks/vec32.js";import{ZEROS as o,create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{Object3DVisualElement as n}from"./Object3DVisualElement.js";import{lineStripsToParameters as l,createGeometry as m}from"../../support/engineContent/line.js";import{RenderOccludedFlag as p}from"../../webgl-engine/lib/Material.js";import{RibbonLineMaterial as h}from"../../webgl-engine/materials/RibbonLineMaterial.js";class d extends n{constructor(e,t){super(e),this._hasExternalMaterial=!1,this._hasExternalMaterial=null!=t,this._material=t??new h({width:1,color:a(1,0,1,1),stipplePreferContinuous:!0,isClosed:!1,falloff:0,innerWidth:1,hasPolygonOffset:!1,renderOccluded:p.OccludeAndTransparent,isDecoration:!!e.isDecoration,writeDepth:!0}),this.applyProperties(e)}setGeometryFromPoint(e,t=1e3){const r=i();this.view.renderCoordsHelper.toRenderCoords(e,r)&&this.setGeometryFromRenderSpacePoint(r,t)}setGeometryFromRenderSpacePoint(e,t=1e3){this.geometry=[[[e[0]-t,e[1],e[2]],[e[0]+t,e[1],e[2]]],[[e[0],e[1]-t,e[2]],[e[0],e[1]+t,e[2]]],[[e[0],e[1],e[2]-t],[e[0],e[1],e[2]+t]]]}setGeometryFromExtent(e){const t=this.view.spatialReference,s=i(),o=i(),a=100,n=[];r(s,e[0],e[1],a),this.view.renderCoordsHelper.toRenderCoords(s,t,o),n.push([o[0],o[1],o[2]]),r(s,e[2],e[1],a),this.view.renderCoordsHelper.toRenderCoords(s,t,o),n.push([o[0],o[1],o[2]]),r(s,e[2],e[3],a),this.view.renderCoordsHelper.toRenderCoords(s,t,o),n.push([o[0],o[1],o[2]]),r(s,e[0],e[3],a),this.view.renderCoordsHelper.toRenderCoords(s,t,o),n.push([o[0],o[1],o[2]]),r(s,e[0],e[1],a),this.view.renderCoordsHelper.toRenderCoords(s,t,o),n.push([o[0],o[1],o[2]]),r(s,e[0],e[1],a),this.view.renderCoordsHelper.toRenderCoords(s,t,o),n.push([o[0],o[1],o[2]]),this.geometry=[n]}setGeometryFromFrustum(e){const t=[];e.lines.forEach((e=>{t.push([e.origin[0],e.origin[1],e.origin[2]]),t.push([e.endpoint[0],e.endpoint[1],e.endpoint[2]])})),this.geometry=[t]}setGeometryFromBoundedPlane(e){const t=[],r=e.origin,s=e.basis1,o=e.basis2,a=.5,n=i(),l=i(),m=i(),p=i();n[0]=r[0]-s[0]*a-o[0]*a,n[1]=r[1]-s[1]*a-o[1]*a,n[2]=r[2]-s[2]*a-o[2]*a,l[0]=r[0]-s[0]*a+o[0]*a,l[1]=r[1]-s[1]*a+o[1]*a,l[2]=r[2]-s[2]*a+o[2]*a,m[0]=r[0]+s[0]*a+o[0]*a,m[1]=r[1]+s[1]*a+o[1]*a,m[2]=r[2]+s[2]*a+o[2]*a,p[0]=r[0]+s[0]*a-o[0]*a,p[1]=r[1]+s[1]*a-o[1]*a,p[2]=r[2]+s[2]*a-o[2]*a,t.push([n[0],n[1],n[2]]),t.push([l[0],l[1],l[2]]),t.push([m[0],m[1],m[2]]),t.push([p[0],p[1],p[2]]),t.push([n[0],n[1],n[2]]),this.geometry=[t]}setGeometryFromSegment(t){const r=t.endRenderSpace;this.transform=e(f,r);const{points:s}=t.createRenderGeometry(r,this.view.renderCoordsHelper);this.geometry=[s]}setGeometryFromSegments(t,r=o){this.transform=e(f,r),this.geometry=t.map((e=>e.createRenderGeometry(r,this.view.renderCoordsHelper).points))}getTransformedGeometry(){return null==this._geometry?null:this._geometry.map((e=>e.map((e=>s(i(),e,this.transform)))))}get renderOccluded(){return this._material.parameters.renderOccluded}set renderOccluded(e){this._material.setParameters({renderOccluded:e})}get geometry(){return this._geometry}set geometry(e){this._geometry=e,this.recreateGeometry()}get width(){return this._material.parameters.width}set width(e){this._material.setParameters({width:e})}get color(){return this._material.parameters.color}set color(e){const t=1===e[3];this._material.setParameters({color:e,writeDepth:t})}get innerWidth(){return this._material.parameters.innerWidth}set innerWidth(e){this._material.setParameters({innerWidth:e})}get innerColor(){return this._material.parameters.innerColor}set innerColor(e){this._material.setParameters({innerColor:e})}get stipplePattern(){return this._material.parameters.stipplePattern}set stipplePattern(e){null!=this._material&&this._material.setParameters({stipplePattern:e})}get stippleOffColor(){return this._material.parameters.stippleOffColor}set stippleOffColor(e){this._material.setParameters({stippleOffColor:e})}get stipplePreferContinuous(){return this._material.parameters.stipplePreferContinuous}set stipplePreferContinuous(e){this._material.setParameters({stipplePreferContinuous:e})}get falloff(){return this._material.parameters.falloff}set falloff(e){this._material.setParameters({falloff:e})}get polygonOffset(){return this._material.parameters.hasPolygonOffset}set polygonOffset(e){this._material.setParameters({hasPolygonOffset:e})}createExternalResources(){}destroyExternalResources(){}createGeometries(e){for(const t of l(this.geometry)){const r=m(this._material,t);e.addGeometry(r)}}forEachMaterial(e){this._hasExternalMaterial||e(this._material)}}const f=t();export{d as LineVisualElement};
|
|
@@ -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{fromTranslation as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as r,clone as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{Object3DVisualElement as a}from"./Object3DVisualElement.js";import{lineStripsToParameters as s,createGeometry as
|
|
5
|
+
import{fromTranslation as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as r,clone as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{Object3DVisualElement as a}from"./Object3DVisualElement.js";import{lineStripsToParameters as s,createGeometry as m}from"../../support/engineContent/line.js";import{RenderOccludedFlag as l}from"../../webgl-engine/lib/Material.js";import{LineMarkerMaterial as o}from"../../webgl-engine/materials/LineMarkerMaterial.js";class n extends a{constructor(e,t){super(e),this._hasExternalMaterial=!1,this._renderOccluded=l.OccludeAndTransparent,this._width=1,this._color=r(1,0,1,1),this._placement="end",this._markerPrimitive="arrow",this._material=t,this._hasExternalMaterial=null!=t,this.applyProperties(e)}setGeometryFromSegment(t,r){const i=t.endRenderSpace;this.transform=e(h,i),this._normal=r;const{points:a}=t.createRenderGeometry(i,this.view.renderCoordsHelper);this.geometry=[a]}get renderOccluded(){return this._material?.parameters.renderOccluded??this._renderOccluded}set renderOccluded(e){this._renderOccluded=e,this._material?.setParameters({renderOccluded:e})}get geometry(){return this._geometry}set geometry(e){this._geometry=e,this.recreateGeometry()}get normal(){return this._normal}set normal(e){this._normal=e,this.recreateGeometry()}get width(){return this._material?.parameters.width??this._width}set width(e){this._width=e,this._material?.setParameters({width:e})}get color(){return this._material?.parameters.color??this._color}set color(e){this._color=i(e),this._material?.setParameters({color:this._color})}get placement(){return this._material?.parameters.placement??this._placement}set placement(e){this._placement=e,this._material?.setParameters({placement:this._placement})}get markerPrimitive(){return this._material?.parameters.markerPrimitive??this._markerPrimitive}set markerPrimitive(e){this._markerPrimitive=e,this._material?.setParameters({markerPrimitive:e})}createExternalResources(){this._hasExternalMaterial||(this._material=new o({width:this._width,color:this._color,placement:this._placement,renderOccluded:this._renderOccluded,markerPrimitive:this._markerPrimitive,isDecoration:this.isDecoration}))}destroyExternalResources(){this._hasExternalMaterial||(this._material=null)}createGeometries(e){for(const t of s(this.geometry,this.normal)){const r=m(this._material,t);e.addGeometry(r)}}forEachMaterial(e){this._hasExternalMaterial||e(this._material)}}const h=t();export{n as MarkerVisualElement};
|
|
@@ -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{getTranslation as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{copy as r}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{d as i}from"../../../../chunks/vec32.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as s,c}from"../../../../chunks/vec42.js";import{fromValues as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{Object3DVisualElement as a}from"./Object3DVisualElement.js";import{Attribute as
|
|
5
|
+
import{getTranslation as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{copy as r}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{d as i}from"../../../../chunks/vec32.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as s,c}from"../../../../chunks/vec42.js";import{fromValues as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{Object3DVisualElement as a}from"./Object3DVisualElement.js";import{Attribute as n}from"../../webgl-engine/lib/Attribute.js";import{Geometry as h}from"../../webgl-engine/lib/Geometry.js";import{RenderOccludedFlag as d}from"../../webgl-engine/lib/Material.js";import{VertexAttribute as m}from"../../webgl-engine/lib/VertexAttribute.js";import{CheckerBoardMaterial as u}from"../../webgl-engine/materials/CheckerBoardMaterial.js";class _ extends a{constructor(e){super(e),this._checkerBoardMaterial=null,this._renderOccluded=d.OccludeAndTransparent,this._geometry=null,this._size=t(1,1),this._color1=l(1,.5,0,.5),this._color2=l(1,1,1,.5),this.applyProperties(e)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get geometry(){return this._geometry}set geometry(e){this._geometry=e,this.recreateGeometry()}get size(){return this._size}set size(e){r(this._size,e),this._updateMaterial()}get color1(){return this._color1}set color1(e){s(e,this._color1)||(c(this._color1,e),this._updateMaterial())}get color2(){return this._color2}set color2(e){s(e,this._color2)||(c(this._color2,e),this._updateMaterial())}_updateMaterial(){this._checkerBoardMaterial?.setParameters({size:this._size,color1:this._color1,color2:this._color2,renderOccluded:this._renderOccluded})}createExternalResources(){this._checkerBoardMaterial=new u({size:this._size,color1:this._color1,color2:this._color2,writeDepth:!1,polygonOffset:!0,renderOccluded:d.OccludeAndTransparent,isDecoration:this.isDecoration})}destroyExternalResources(){this._checkerBoardMaterial=null}forEachMaterial(e){e(this._checkerBoardMaterial)}createGeometries(r){if(null==this._geometry||null==this._checkerBoardMaterial)return;const t=g;e(t,this.transform);const s=this._geometry,c=[],l=o();s.position.forEach((e=>{i(l,e,t),c.push(l[0],l[1],l[2])}));const a=[];s.uv.forEach((e=>{a.push(e[0],e[1])}));const d=new h(this._checkerBoardMaterial,[[m.POSITION,new n(c,s.triangleIndices,3,!0)],[m.UV0,new n(a,s.triangleIndices,2,!0)]]);r.addGeometry(d)}}const g=o();export{_ as MeasurementAreaVisualElement};
|