@arcgis/core 4.33.0-next.20250514 → 4.33.0-next.20250516
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/Basemap.js +1 -1
- package/Graphic.js +1 -1
- package/Map.js +1 -1
- package/WebScene.js +1 -1
- package/applications/Components/SelectionOperation.js +1 -1
- package/applications/Components/baUtils.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/009730713ed9bc7c7388.js +1 -0
- package/assets/esri/core/workers/chunks/02853ab923245459b32e.js +1 -0
- package/assets/esri/core/workers/chunks/0624ae07d3af8d5f1ac8.js +1 -0
- package/assets/esri/core/workers/chunks/{6e8c6c9112ecb867b7be.js → 0817ddd885ce8b2459cb.js} +1 -1
- package/assets/esri/core/workers/chunks/{69e8aabe5a1eb2d1e414.js → 0832bd5195b5791dd803.js} +1 -1
- package/assets/esri/core/workers/chunks/0c50ee1f3cdd30d96479.js +1 -0
- package/assets/esri/core/workers/chunks/0d23610475c85385fbff.js +1 -0
- package/assets/esri/core/workers/chunks/{b4f38fe9cc948a39ad87.js → 0fd6d80393722132e044.js} +2 -2
- package/assets/esri/core/workers/chunks/{b4f38fe9cc948a39ad87.js.LICENSE.txt → 0fd6d80393722132e044.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/1051a5a57b2fb843a555.js +1 -0
- package/assets/esri/core/workers/chunks/133e4bde346828d4510b.js +1 -0
- package/assets/esri/core/workers/chunks/19a58adc75a34f84b0ef.js +1 -0
- package/assets/esri/core/workers/chunks/{7e8f78b96d43c224c7b6.js → 19c50f052eba0553bf4d.js} +1 -1
- package/assets/esri/core/workers/chunks/1d7f2abfccc54659d6f2.js +1 -0
- package/assets/esri/core/workers/chunks/{339e7a900e2bba9d3647.js → 1f19bd3ef795c6765384.js} +1 -1
- package/assets/esri/core/workers/chunks/1f9c6fbcd4d0eae1e574.js +1 -0
- package/assets/esri/core/workers/chunks/234117cc5cb7c6863313.js +1 -0
- package/assets/esri/core/workers/chunks/{1c025beaaac5ec7c04fb.js → 2adf558cd8d8155d07d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{837f886f759fc6f0489d.js → 2b1486a466760d2152f5.js} +1 -1
- package/assets/esri/core/workers/chunks/{47f64a340b5d56bf9e59.js → 2cf82d3645c75d311e99.js} +1 -1
- package/assets/esri/core/workers/chunks/320e821af81138fe12ac.js +1 -0
- package/assets/esri/core/workers/chunks/{f7ab3511f6627f467796.js → 377a7f0f7d304ff9fe5b.js} +1 -1
- package/assets/esri/core/workers/chunks/3bf1cf6c3cba172e2f6d.js +1 -0
- package/assets/esri/core/workers/chunks/{b3ca65d6112079fb1d00.js → 3ce5d7ad16e41eea05be.js} +1 -1
- package/assets/esri/core/workers/chunks/465f2db4ab8aa9c9f907.js +1 -0
- package/assets/esri/core/workers/chunks/{1e13e03aad422f9e871e.js → 47fe2379f2214bf50036.js} +1 -1
- package/assets/esri/core/workers/chunks/{b8b5dfd2d73a8410fba2.js → 4954e0cf4a40e45d237f.js} +1 -1
- package/assets/esri/core/workers/chunks/4a362a35bcdb8405a53a.js +1 -0
- package/assets/esri/core/workers/chunks/4f8ebd9f0758b801835c.js +1 -0
- package/assets/esri/core/workers/chunks/5228d39c05d660a135b6.js +1 -0
- package/assets/esri/core/workers/chunks/523046e04679e301797d.js +1 -0
- package/assets/esri/core/workers/chunks/{736cb9f74bf050b70f4c.js → 52a3d0e041717da7697e.js} +1 -1
- package/assets/esri/core/workers/chunks/54ea93f416ab52b413c1.js +1 -0
- package/assets/esri/core/workers/chunks/554a8bf4626336e68798.js +1 -0
- package/assets/esri/core/workers/chunks/55f087bca75c3f2a4515.js +1 -0
- package/assets/esri/core/workers/chunks/{bbaadce582df7e20397b.js → 56d2a20c1b143697aa19.js} +1 -1
- package/assets/esri/core/workers/chunks/57211c35a9646f088d86.js +1 -0
- package/assets/esri/core/workers/chunks/58526def64536b6581ab.js +1 -0
- package/assets/esri/core/workers/chunks/5890740d5a761b038560.js +1 -0
- package/assets/esri/core/workers/chunks/{9a641fb94819574e48f6.js → 5a73d8b7b01758ed4fdd.js} +1 -1
- package/assets/esri/core/workers/chunks/5dbd8d81d94cfda5bb32.js +1 -0
- package/assets/esri/core/workers/chunks/{a0d2bd5d4ed3c90f6b1c.js → 5f766bcb751d66fbf1c8.js} +1 -1
- package/assets/esri/core/workers/chunks/609c7c9b7046b3a7acde.js +1 -0
- package/assets/esri/core/workers/chunks/{d21d9e8b8c8a2e0485d5.js → 612f6739c9399fbae4d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{30f3014c0ac6e2bc14bf.js → 622c0552ca3cd674d46c.js} +1 -1
- package/assets/esri/core/workers/chunks/6409160d226a0bea5ac6.js +1 -0
- package/assets/esri/core/workers/chunks/65fd971d0574d69cbc26.js +1 -0
- package/assets/esri/core/workers/chunks/6993a59cbb78bc26f029.js +1 -0
- package/assets/esri/core/workers/chunks/6b23ca6570357f9fb724.js +1 -0
- package/assets/esri/core/workers/chunks/6c37a5bd00d255d1337a.js +1 -0
- package/assets/esri/core/workers/chunks/6ce4327f63e6eb92bba8.js +1 -0
- package/assets/esri/core/workers/chunks/6f9b8df290b0ce09beae.js +1 -0
- package/assets/esri/core/workers/chunks/{e0247252c6a0f3340e33.js → 6fa1a5b7276a037dbd6a.js} +84 -106
- package/assets/esri/core/workers/chunks/7a9a0383f27f4967bcfa.js +1 -0
- package/assets/esri/core/workers/chunks/7c819b3e6d69c526f4b2.js +1 -0
- package/assets/esri/core/workers/chunks/7df147da40474b028705.js +1 -0
- package/assets/esri/core/workers/chunks/{0766ecb677d667e5fb83.js → 7e1dc8e5e18f18dd21e2.js} +2 -2
- package/assets/esri/core/workers/chunks/{0766ecb677d667e5fb83.js.LICENSE.txt → 7e1dc8e5e18f18dd21e2.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{e662c86b8bafc5512d3d.js → 847e88e1d6da1e74cdc8.js} +1 -1
- package/assets/esri/core/workers/chunks/{6f5ec9bf7cf8a36d8e8b.js → 87eca6de502d18d8b7eb.js} +1 -1
- package/assets/esri/core/workers/chunks/87fc7b6c3e2d4f7775e2.js +1 -0
- package/assets/esri/core/workers/chunks/{10e6dffa57aa1a626708.js → 8a6aac37b3133de74cce.js} +1 -1
- package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/91cd29f53f07bc38fe75.js +1 -0
- package/assets/esri/core/workers/chunks/{5583d18032ed8bc17c74.js → 938f1eebc48871be64e9.js} +1 -1
- package/assets/esri/core/workers/chunks/97c148adf0347c69a79c.js +1 -0
- package/assets/esri/core/workers/chunks/9839309d0cd804fe52c2.js +1 -0
- package/assets/esri/core/workers/chunks/{029a118e6dfb3f544a5c.js → 98ef17d15517368d2383.js} +1 -1
- package/assets/esri/core/workers/chunks/{c10885b3a0739708e9e0.js → 9a06476b834584d00d5c.js} +1 -1
- package/assets/esri/core/workers/chunks/9c8224ca29475556e5ea.js +1 -0
- package/assets/esri/core/workers/chunks/{fd24dd602a3fed88d90e.js → 9d5eac3bd1526e2b33e3.js} +1 -1
- package/assets/esri/core/workers/chunks/{38f5e6a202ce292edd9f.js → 9eb9c8db2510154c09cc.js} +1 -1
- package/assets/esri/core/workers/chunks/a036503087baa1f9fd00.js +1 -0
- package/assets/esri/core/workers/chunks/{6e64ce0958c3432004b6.js → a70a86ba4e487f62f683.js} +2 -2
- package/assets/esri/core/workers/chunks/a937076d2f8c2b6a5d8a.js +1 -0
- package/assets/esri/core/workers/chunks/{90ae15ce22a49bd84876.js → ab9614555a15f04396f6.js} +2 -2
- package/assets/esri/core/workers/chunks/{90ae15ce22a49bd84876.js.LICENSE.txt → ab9614555a15f04396f6.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/ae733c963d61065faa54.js +1 -0
- package/assets/esri/core/workers/chunks/{8e82acd1f730571680f4.js → aeb5bbe861f65544d504.js} +1 -1
- package/assets/esri/core/workers/chunks/b0522dffa5600345c07e.js +1 -0
- package/assets/esri/core/workers/chunks/{d1f7bfb8daf11ecada9f.js → b4273381dc069f4e1fa2.js} +1 -1
- package/assets/esri/core/workers/chunks/{fb2e28e6a87956267d1c.js → b92a34f88569c481ed10.js} +1 -1
- package/assets/esri/core/workers/chunks/{352b7dcd1633e0c98194.js → ba940ebdae84b174a7be.js} +1 -1
- package/assets/esri/core/workers/chunks/be2c8c0a8b2bce7979b6.js +1 -0
- package/assets/esri/core/workers/chunks/bf9b6b74654d303a6dae.js +1 -0
- package/assets/esri/core/workers/chunks/c07c1bb7ae09136dc1f6.js +1 -0
- package/assets/esri/core/workers/chunks/c938f5d269ba202d10ef.js +1 -0
- package/assets/esri/core/workers/chunks/cbbca011f8b176d4b5db.js +1 -0
- package/assets/esri/core/workers/chunks/{c604fefedccfd4db9953.js → ce321fd8fc5551e190ec.js} +1 -1
- package/assets/esri/core/workers/chunks/ce53ddda04e09ba2f860.js +1 -0
- package/assets/esri/core/workers/chunks/d9a23fb0c6c936d5e8ec.js +1 -0
- package/assets/esri/core/workers/chunks/db3f710d770adf631b28.js +2 -0
- package/assets/esri/core/workers/chunks/{6394ab6f629aa90292e6.js.LICENSE.txt → db3f710d770adf631b28.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{6805e7b43d6ecf3ea93c.js → dcf5719f38ad40b92941.js} +1 -1
- package/assets/esri/core/workers/chunks/e2cada6644c49b1b6e79.js +1 -0
- package/assets/esri/core/workers/chunks/e2fb4bebce3aee406efa.js +1 -0
- package/assets/esri/core/workers/chunks/e3638f9d4c0fda238f4b.js +1 -0
- package/assets/esri/core/workers/chunks/e85f892ea44d67d53ff0.js +2 -0
- package/assets/esri/core/workers/chunks/{3596540ef49e5330ceb2.js.LICENSE.txt → e85f892ea44d67d53ff0.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/e89345c7af9d3d4d8452.js +1 -0
- package/assets/esri/core/workers/chunks/{a31658f544ac6e1801d6.js → ead5d4e271effc04def3.js} +1 -1
- package/assets/esri/core/workers/chunks/ece68a25651ef03fc95d.js +1 -0
- package/assets/esri/core/workers/chunks/f218a190015de1444018.js +1 -0
- package/assets/esri/core/workers/chunks/f229044615af3142bcb0.js +1 -0
- package/assets/esri/core/workers/chunks/f2692f25ef693cf12ce0.js +1 -0
- package/assets/esri/core/workers/chunks/f4c6ea630cecf0f260d7.js +2 -0
- package/assets/esri/core/workers/chunks/{e0dc8794343c2a949ffb.js.LICENSE.txt → f4c6ea630cecf0f260d7.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/f718cb847c4eb1e43ad9.js +1 -0
- package/assets/esri/core/workers/chunks/faa40ef04604c7cce706.js +1 -0
- package/assets/esri/core/workers/chunks/{218a66d53f7cf4f285aa.js → fbd2f45d5adce4ca323f.js} +2 -2
- package/assets/esri/core/workers/chunks/{218a66d53f7cf4f285aa.js.LICENSE.txt → fbd2f45d5adce4ca323f.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{498886c321a2501658bc.js → ffaa977cd97a2b7190c5.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Editor.scss +2 -1
- package/assets/esri/themes/base/widgets/_SearchResultRenderer.scss +5 -30
- package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +5 -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/assets/esri/widgets/Search/t9n/Search.json +1 -1
- package/assets/esri/widgets/Search/t9n/Search_en.json +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/Jpg.js +1 -1
- package/chunks/LineSeries.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/QuadraticBezier.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +7 -5
- package/chunks/ShadowCastClear.glsl.js +5 -0
- package/chunks/ShadowCastVisualize.glsl.js +1 -1
- package/chunks/ShadowHighlight.glsl.js +8 -7
- package/chunks/Transformation2D.js +1 -1
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/chunks/basis_encoder.js +1 -1
- package/chunks/basis_transcoder.js +1 -1
- package/chunks/bundle.js +1 -1
- package/chunks/chartUtilsAm5.js +1 -1
- package/chunks/dxt_encoder.js +1 -1
- package/chunks/geometryEngineBase.js +1 -1
- package/chunks/i3s.js +1 -1
- package/chunks/lclayout.js +1 -1
- package/chunks/libtess-asm.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/chunks/vec4.js +1 -1
- package/chunks/vxlLayer.js +1 -1
- package/config.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/core/image/apng.js +1 -1
- package/core/image/gif.js +1 -1
- package/core/mathUtils.js +1 -1
- package/core/workers/Connection.js +1 -1
- package/geometry/operators/densifyOperator.d.ts +0 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
- package/geometry/support/aaBoundingBox.js +1 -1
- package/geometry/support/meshProperties.js +1 -1
- package/geometry/support/normalizeUtilsSync.js +1 -1
- package/interfaces.d.ts +313 -163
- package/intl/date.js +1 -1
- package/intl/number.js +1 -1
- package/layers/BingMapsLayer.js +1 -1
- package/layers/graphics/OptimizedFeatureSet.js +1 -1
- package/layers/graphics/controllers/StreamController.js +1 -1
- package/layers/graphics/data/FeatureIdInfo.js +5 -0
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/StreamFeatureManager.js +1 -1
- package/layers/graphics/data/createFeatureId.js +5 -0
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/graphics/sources/WFSSourceWorker.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/ogc/ogcFeatureUtils.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/orientedImagery/queries.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/support/LercWorker.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/layers/support/rasterFunctions/stretchUtils.js +1 -1
- package/layers/support/wmsUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/package.json +2 -2
- package/portal/Portal.js +1 -1
- package/request.js +1 -1
- package/rest/knowledgeGraph/GraphAddNamedTypesResult.js +1 -1
- package/rest/knowledgeGraph/GraphAddPropertyResult.js +5 -0
- package/rest/knowledgeGraph/GraphApplyEditsResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeletePropertyResult.js +5 -0
- package/rest/knowledgeGraph/GraphUpdateNamedTypesResult.js +5 -0
- package/rest/knowledgeGraph/GraphUpdatePropertyResult.js +5 -0
- package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/rest/networks/support/Association.js +1 -1
- package/rest/networks/support/NetworkElement.js +1 -1
- package/rest/networks/support/QueryAssociationsParameters.js +1 -1
- package/rest/networks/support/TelecomNetworkElement.js +1 -1
- package/rest/networks/support/TraceResult.js +1 -1
- package/rest/networks/unitIdentifiers/insertGap.js +5 -0
- package/rest/networks/unitIdentifiers/queryUnitIdentifiers.js +5 -0
- package/rest/networks/unitIdentifiers/reset.js +5 -0
- package/rest/networks/unitIdentifiers/resize.js +5 -0
- package/rest/networks/unitIdentifiers/support/InsertGapParameters.js +5 -0
- package/rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParamters.js +5 -0
- package/rest/networks/unitIdentifiers/support/ResetParameters.js +5 -0
- package/rest/networks/unitIdentifiers/support/ResizeParameters.js +5 -0
- package/rest/networks/unitIdentifiers/support/UnitQueryResult.js +5 -0
- package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
- package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
- package/rest/query/operations/queryRelatedRecords.js +1 -1
- package/rest/utils.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/support/apiKeyUtils.js +1 -1
- package/support/basemapEnsureType.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/unionTypes.d.ts +2 -0
- package/views/2d/engine/ManagedCanvas.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/webgl/TileContainer.js +1 -1
- package/views/2d/engine/webgl/grouping.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/featureServiceUtils.js +1 -1
- package/views/2d/layers/features/processor/AAggregateStrategy.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
- package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/AnalysisViewManager3D.js +1 -1
- package/views/3d/analysis/DimensionAnalysisView3D.d.ts +4 -0
- package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/camera/constraintUtils/common.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/layers/ContentGeometryLayerView.js +5 -0
- package/views/3d/layers/DimensionLayerView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/ViewshedLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/QueryEngine.js +1 -1
- package/views/3d/layers/graphics/focusAreaStyle.js +5 -0
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
- package/views/3d/layers/i3s/PagedNodeIndex.js +1 -1
- package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/LayerViewAnalysisViewManager.js +5 -0
- package/views/3d/support/pointsOfInterest/ContentGeometryUpdates.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileAgent.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IndexRange/ComponentRange.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ShadowmapFiltering.glsl.js +3 -25
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderModules/Texture2DShadowBindUniform.js +5 -0
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +3 -3
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
- package/views/3d/webgl-engine/lib/DepthRange.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastClear.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/FocusArea.js +1 -1
- package/views/FocusAreas.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/TextureDescriptor.js +1 -1
- package/views/webgl/textureUtils.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/BatchAttributeForm/VisibleElements.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/CoordinateConversion.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.d.ts +4 -0
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.d.ts +4 -0
- package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/support/profileUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +5 -0
- package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/imageNavigationUtils.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +5 -0
- package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +5 -0
- package/widgets/OrientedImageryViewer/navigation/errors.js +5 -0
- package/widgets/OrientedImageryViewer/navigation/queries.js +5 -0
- package/widgets/OrientedImageryViewer/navigation/utils.js +5 -0
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer.js +1 -1
- package/widgets/Search/SearchResultRenderer.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/searchResultRendererCSS.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList/selectionListUtils.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/utils/createAssociation.js +1 -1
- package/assets/esri/core/workers/chunks/0516bd18334d3af6c555.js +0 -1
- package/assets/esri/core/workers/chunks/0d8a635c1f9aeaf7564c.js +0 -1
- package/assets/esri/core/workers/chunks/191a45a594ecaf7f1abb.js +0 -1
- package/assets/esri/core/workers/chunks/1abd026ed12c863e1d94.js +0 -1
- package/assets/esri/core/workers/chunks/1c6542315390037053a6.js +0 -1
- package/assets/esri/core/workers/chunks/201db423e3c6f947b77c.js +0 -1
- package/assets/esri/core/workers/chunks/23de8aeed5b82c682cbe.js +0 -1
- package/assets/esri/core/workers/chunks/297d2c0a9d3f1e978318.js +0 -1
- package/assets/esri/core/workers/chunks/2e0af748eba93f3ea6cb.js +0 -1
- package/assets/esri/core/workers/chunks/3596540ef49e5330ceb2.js +0 -2
- package/assets/esri/core/workers/chunks/3604a77c93cf2927787b.js +0 -1
- package/assets/esri/core/workers/chunks/391b1c3e736a62befbaf.js +0 -1
- package/assets/esri/core/workers/chunks/40e556a0645af8658658.js +0 -1
- package/assets/esri/core/workers/chunks/4402336db7210cd583e0.js +0 -1
- package/assets/esri/core/workers/chunks/4899cdc8bb5085c356f9.js +0 -1
- package/assets/esri/core/workers/chunks/4bd5cbf6e0be2fc7e84d.js +0 -1
- package/assets/esri/core/workers/chunks/4c8052e81916579841f4.js +0 -1
- package/assets/esri/core/workers/chunks/4c9aa1dafdc0d9537231.js +0 -1
- package/assets/esri/core/workers/chunks/4feb774f123da26e9f2a.js +0 -1
- package/assets/esri/core/workers/chunks/51b5dfc7085272d26b89.js +0 -1
- package/assets/esri/core/workers/chunks/566c2ce50af225e556ac.js +0 -1
- package/assets/esri/core/workers/chunks/5ddf463c85c33428e807.js +0 -1
- package/assets/esri/core/workers/chunks/61032b5050464cb48056.js +0 -1
- package/assets/esri/core/workers/chunks/6394ab6f629aa90292e6.js +0 -2
- package/assets/esri/core/workers/chunks/63dade3e1cc7f5b76846.js +0 -1
- package/assets/esri/core/workers/chunks/64af433e88d4dd21a2ff.js +0 -1
- package/assets/esri/core/workers/chunks/6b42bcfbb60432e3ed1f.js +0 -1
- package/assets/esri/core/workers/chunks/6e12900a9f4c3c9941ec.js +0 -1
- package/assets/esri/core/workers/chunks/6e5d8a6b29c06a27998c.js +0 -1
- package/assets/esri/core/workers/chunks/6f506303017903b9a06f.js +0 -1
- package/assets/esri/core/workers/chunks/71e46e866c23372b0b58.js +0 -1
- package/assets/esri/core/workers/chunks/75fa861b5757551f8fdc.js +0 -1
- package/assets/esri/core/workers/chunks/7c49a8877bd744daa3d5.js +0 -1
- package/assets/esri/core/workers/chunks/7ea5bbb52e84be9a608e.js +0 -1
- package/assets/esri/core/workers/chunks/82c395d8649096609a8a.js +0 -1
- package/assets/esri/core/workers/chunks/86138c297095af1ac604.js +0 -1
- package/assets/esri/core/workers/chunks/8c21cc9af4ce9652cc5c.js +0 -1
- package/assets/esri/core/workers/chunks/8e6301006abdf47cc88d.js +0 -1
- package/assets/esri/core/workers/chunks/90f93091fe088875f80f.js +0 -1
- package/assets/esri/core/workers/chunks/91a02ee91f61cf841111.js +0 -1
- package/assets/esri/core/workers/chunks/9baeb3b5733acdda4e7c.js +0 -1
- package/assets/esri/core/workers/chunks/a1d697e2be1e892a666a.js +0 -1
- package/assets/esri/core/workers/chunks/a1f27c4f4b5ef3e359f7.js +0 -1
- package/assets/esri/core/workers/chunks/a348ff2dd936c6bf9399.js +0 -1
- package/assets/esri/core/workers/chunks/a9b1f4bf5eaa937943be.js +0 -1
- package/assets/esri/core/workers/chunks/b64f708f821dd2bb51cd.js +0 -1
- package/assets/esri/core/workers/chunks/bf453744067267e84d1b.js +0 -1
- package/assets/esri/core/workers/chunks/c1175477dfcdee90a453.js +0 -1
- package/assets/esri/core/workers/chunks/c4e2b75b9135920babc3.js +0 -1
- package/assets/esri/core/workers/chunks/cb80b7ddc9acf625d754.js +0 -1
- package/assets/esri/core/workers/chunks/d22f91bc16a7641bcbef.js +0 -1
- package/assets/esri/core/workers/chunks/d52cf7b795ee52034f9e.js +0 -1
- package/assets/esri/core/workers/chunks/d971571a957de70d5a8d.js +0 -1
- package/assets/esri/core/workers/chunks/d9d9d4f99140e579eabb.js +0 -1
- package/assets/esri/core/workers/chunks/dc3a6beb3028009b3c23.js +0 -1
- package/assets/esri/core/workers/chunks/e0dc8794343c2a949ffb.js +0 -2
- package/assets/esri/core/workers/chunks/e483d2f169e51a361742.js +0 -1
- package/assets/esri/core/workers/chunks/e5608e5232e983531f72.js +0 -1
- package/assets/esri/core/workers/chunks/e613df03ceb39e29befa.js +0 -1
- package/assets/esri/core/workers/chunks/e697dd4508f02dcfe329.js +0 -1
- package/assets/esri/core/workers/chunks/eabfab23246d4a052ea3.js +0 -1
- package/assets/esri/core/workers/chunks/ec8e8048b3df2c92008d.js +0 -1
- package/assets/esri/core/workers/chunks/ed6d0fea159dea638c2f.js +0 -1
- package/assets/esri/core/workers/chunks/f5fcba6ca6f43bf1d65d.js +0 -1
- package/assets/esri/core/workers/chunks/f92d76b694ff0cdb212c.js +0 -1
- package/chunks/NetworkElement.js +0 -5
- package/views/FocusAreasUtils.js +0 -5
- package/views/analysis/DimensionAnalysisView.d.ts +0 -4
- package/views/analysis/DimensionAnalysisView.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 e from"../../../../../geometry/SpatialReference.js";import t from"../../../../../layers/support/FieldsIndex.js";class i{static minimal(e,n,l=[]){return new i({geometryType:e,fieldsIndex:new t(l).toJSON(),
|
|
5
|
+
import e from"../../../../../geometry/SpatialReference.js";import t from"../../../../../layers/support/FieldsIndex.js";class i{static minimal(e,n,l=[]){return new i({geometryType:e,fieldsIndex:new t(l).toJSON(),featureIdInfo:{type:"object-id",fieldName:n},subtypes:null,subtypeField:null,types:null,globalIdField:null,spatialReference:null,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null,typeIdField:null})}static createFeature(e){return new i(e)}constructor(i){let n;this._options=i,this._fieldsIndex=t.fromJSON(i.fieldsIndex),i.spatialReference&&(this._spatialReference=e.fromJSON(i.spatialReference)),i.outSpatialReference&&(this._outSpatialReference=e.fromJSON(i.outSpatialReference)),"object-id"===i.featureIdInfo.type&&(n=i.featureIdInfo.fieldName),this._arcadeSchema={fields:this.fieldsIndex.fields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,objectIdField:n,globalIdField:this._options.globalIdField,spatialReference:this._spatialReference,timeInfo:this._options.timeInfo,typeIdField:this._options.typeIdField??void 0,types:this._options.types??void 0,subtypeField:this._options.subtypeField,subtypes:this._options.subtypes??void 0,datesInUnknownTimezone:this._options.timeReferenceUnknownClient??void 0,dateFieldsTimeZone:this._options.dateFieldsTimeZone??void 0}}get fieldsIndex(){return this._fieldsIndex}get geometryType(){return"esriGeometryMultiPatch"===this._options.geometryType?"esriGeometryPolygon":this._options.geometryType}get serviceGeometryType(){return this._options.geometryType}get subtypeField(){return this._options.subtypeField}get timeInfo(){return this._options.timeInfo}get featureIdInfo(){return this._options.featureIdInfo}get globalIdField(){return this._options.globalIdField}get arcadeSchema(){return this._arcadeSchema}get spatialReference(){return this._spatialReference}get outSpatialReference(){return this._outSpatialReference}get timeReferenceUnknownClient(){return this._options.timeReferenceUnknownClient}weakCloneWithAdditionalFields(e){return new i({fieldsIndex:{fields:[...this._fieldsIndex.fields,...e],timeZoneByFieldName:null},geometryType:this.geometryType,globalIdField:this.globalIdField,featureIdInfo:this.featureIdInfo,spatialReference:this.spatialReference,outSpatialReference:this.outSpatialReference,subtypeField:this.subtypeField,subtypes:this._options.subtypes,timeInfo:this.timeInfo,timeReferenceUnknownClient:this.timeReferenceUnknownClient,dateFieldsTimeZone:this._options.dateFieldsTimeZone,typeIdField:this._options.typeIdField,types:this._options.types})}}class n extends i{static createGraphics(e){return new n({fieldsIndex:(new t).toJSON(),featureIdInfo:{type:"object-id",fieldName:"uid"},geometryType:null,spatialReference:e,outSpatialReference:e,globalIdField:null,subtypeField:null,subtypes:null,timeInfo:null,typeIdField:null,types:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null})}}export{i as FeatureMetadata,n as GraphicsMetadata};
|
|
@@ -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{convertFromFeatures as e,convertFromFeatureSet as t,getQuantizedArea as r}from"../../../../../layers/graphics/featureConversionUtils.js";import{hasGeometry as s}from"../../../../../layers/graphics/OptimizedFeature.js";import
|
|
5
|
+
import{convertFromFeatures as e,convertFromFeatureSet as t,getQuantizedArea as r}from"../../../../../layers/graphics/featureConversionUtils.js";import{hasGeometry as s}from"../../../../../layers/graphics/OptimizedFeature.js";import n from"../../../../../layers/support/FieldsIndex.js";import{FeatureSetReader as i}from"./FeatureSetReader.js";class u extends i{static fromFeatures(t,r){const{geometryType:s}=r,n=e([],t,s,!1,!1,r.featureIdInfo);for(let e=0;e<n.length;e++)n[e].displayId=t[e].displayId;return u.fromOptimizedFeatures(n,r)}static fromFeatureSet(e,r){const s=t(e,r.featureIdInfo);return u.fromOptimizedFeatureSet(s,r)}static fromOptimizedFeatureSet(e,t){const r=u.fromOptimizedFeatures(e.features,t);return r._exceededTransferLimit=e.exceededTransferLimit,r._transform=e.transform,r._fieldsIndex=new n(e.fields),r}static fromOptimizedFeatures(e,t,r){const s=new u(e,t);return s._fieldsIndex=t.fieldsIndex,s._transform=r,s}static empty(e){return new u([],e)}constructor(e,t){super(t),this._exceededTransferLimit=!1,this._featureIndex=-1,this._fieldsIndex=null,this._geometryType=t.geometryType,this._features=e}get fields(){return this._fieldsIndex}get geometryType(){return this._geometryType}get hasFeatures(){return!!this._features.length}get hasNext(){return this._featureIndex+1<this._features.length}get exceededTransferLimit(){return this._exceededTransferLimit}get hasZ(){return!1}get hasM(){return!1}get _current(){return this._features[this._featureIndex]}get usedMemory(){return this._current.usedMemory}getSize(){return this._features.length}getCursor(){return this.copy()}getInTransform(){return this._transform}getAttributeHash(){let e="";for(const t in this._current.attributes)e+=this._current.attributes[t];return e}getIndex(){return this._featureIndex}setIndex(e){this._featureIndex=e}getObjectId(){return this._current?.objectId}getDisplayId(){return this._current.displayId}setDisplayId(e){this._current.displayId=e}copy(){const e=new u(this._features,this.metadata);return this.copyInto(e),e}next(){for(;++this._featureIndex<this._features.length&&!this._getExists(););return this._featureIndex<this._features.length}readGeometryArea(){return s(this._current)?r(this._current.geometry,2):0}_readX(){return s(this._current)?this._current.geometry.coords[0]:0}_readY(){return s(this._current)?this._current.geometry.coords[1]:0}_readGeometry(){return s(this._current)?this._current.geometry??null:null}_readServerCentroid(){return this._current.centroid}_readAttribute(e,t){if(!this._fieldsIndex){const t=this._current.attributes[e];if(void 0!==t)return t;const r=e.toLowerCase();for(const e in this._current.attributes)if(e.toLowerCase()===r)return this._current.attributes[e];return}const r=this._fieldsIndex.get(e);if(!r)return;const s=this._current.attributes[r.name];return null==s?s:t&&this.fields.isDateField(e)?new Date(s):s}_readAttributes(){return this._current.attributes}copyInto(e){super.copyInto(e),e._featureIndex=this._featureIndex,e._transform=this._transform,e._fieldsIndex=this._fieldsIndex}}export{u as FeatureSetReaderJSON};
|
|
@@ -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 e from"../../../../../core/Error.js";import"../../../../../core/has.js";import t from"../../../../../core/Logger.js";import{assertIsSome as r}from"../../../../../core/maybe.js";import{baseObjectMemory as s}from"../../../../../core/memoryEstimations.js";import n from"../../../../../core/pbf.js";import a from"../../../../../layers/graphics/OptimizedGeometry.js";import{FeatureSetCache as i}from"./FeatureSetCache.js";import{FeatureSetReader as h}from"./FeatureSetReader.js";import{parseHeader as o}from"./FeatureSetReaderPBFHeader.js";const d=!0,u=268435455,c=128,l=128e3,g={small:{delta:new Int32Array(c),decoded:new Int32Array(c)},small64:{delta:new Float64Array(0),decoded:new Float64Array(0)},large:{delta:new Int32Array(l),decoded:new Int32Array(l)},large64:{delta:new Float64Array(0),decoded:new Float64Array(0)}};function _(e,t){return t?e<=g.small64.delta.length?g.small64:(e<=g.large64.delta.length||(g.large64.delta=new Float64Array(Math.round(1.25*e)),g.large64.decoded=new Float64Array(Math.round(1.25*e))),g.large64):e<=g.small.delta.length?g.small:(e<=g.large.delta.length||(g.large.delta=new Int32Array(Math.round(1.25*e)),g.large.decoded=new Int32Array(Math.round(1.25*e))),g.large)}function f(r){try{const e=2,t=new n(new Uint8Array(r),new DataView(r));for(;t.next();){if(t.tag()===e)return I(t.getMessage());t.skip()}}catch(s){const r=new e("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:s});t.getLogger("esri.view.2d.layers.features.support.FeatureSetReaderPBF").error(r)}return null}function I(e){const t=1;for(;e.next();){if(e.tag()===t)return e.getMessage();e.skip()}return null}function y(e){const t=1,r=2,s=3,n=4,a=5,i=6,h=7,o=8,d=9,u=e.getLength(),c=e.pos()+u;for(;e.pos()<c&&e.next();)switch(e.tag()){case t:return e.getString();case r:return e.getFloat();case s:return e.getDouble();case n:return e.getSInt32();case a:return e.getUInt32();case i:return e.getInt64();case h:return e.getUInt64();case o:return e.getSInt64();case d:return e.getBool();default:return e.skip(),null}return null}function m(e,t,r,s,n,a){return.5*Math.abs(e*s+r*a+n*t-e*a-r*t-n*s)}function p(e,t,r,s,n){if(!e)return!1;return 0===t*n-s*r&&t*s+r*n>0}class x extends h{static fromBuffer(e,t,r=!1){const s=t.geometryType,n=f(e),a=o(n,"esriGeometryPoint"===s,r);return new x(n,a,t,r)}constructor(e,t,r,s){super(r),this._use64Bit=s,this._hasNext=!1,this._isPoints=!1,this._featureIndex=-1,this._featureOffset=0,this._cache={area:0,unquantGeometry:void 0,geometry:void 0},this._parseCaches=new Array,this._geometryType=r.geometryType,this._reader=e,this._header=t,this._hasNext=t.hasFeatures,this._isPoints="esriGeometryPoint"===r.geometryType}get _size(){return this._header.featureCount}get fields(){return this._header.fields}get geometryType(){return this._geometryType}get hasZ(){return!1}get hasM(){return!1}get hasFeatures(){return this._header.hasFeatures}get hasNext(){return this._hasNext}get exceededTransferLimit(){return this._header.exceededTransferLimit}getSize(){return this._size}getInTransform(){return this._header.transform}getCursor(){return this.copy()}getIndex(){return this._featureIndex}setIndex(e){this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0,this._featureIndex=e}getAttributeHash(){let e="";for(const t of this._header.fields.fields)e+=this._readAttributeAtIndex(t.index)+".";return e}getObjectId(){return this._readAttributeAtIndex(this._header.
|
|
5
|
+
import e from"../../../../../core/Error.js";import"../../../../../core/has.js";import t from"../../../../../core/Logger.js";import{assertIsSome as r}from"../../../../../core/maybe.js";import{baseObjectMemory as s}from"../../../../../core/memoryEstimations.js";import n from"../../../../../core/pbf.js";import a from"../../../../../layers/graphics/OptimizedGeometry.js";import{FeatureSetCache as i}from"./FeatureSetCache.js";import{FeatureSetReader as h}from"./FeatureSetReader.js";import{parseHeader as o}from"./FeatureSetReaderPBFHeader.js";const d=!0,u=268435455,c=128,l=128e3,g={small:{delta:new Int32Array(c),decoded:new Int32Array(c)},small64:{delta:new Float64Array(0),decoded:new Float64Array(0)},large:{delta:new Int32Array(l),decoded:new Int32Array(l)},large64:{delta:new Float64Array(0),decoded:new Float64Array(0)}};function _(e,t){return t?e<=g.small64.delta.length?g.small64:(e<=g.large64.delta.length||(g.large64.delta=new Float64Array(Math.round(1.25*e)),g.large64.decoded=new Float64Array(Math.round(1.25*e))),g.large64):e<=g.small.delta.length?g.small:(e<=g.large.delta.length||(g.large.delta=new Int32Array(Math.round(1.25*e)),g.large.decoded=new Int32Array(Math.round(1.25*e))),g.large)}function f(r){try{const e=2,t=new n(new Uint8Array(r),new DataView(r));for(;t.next();){if(t.tag()===e)return I(t.getMessage());t.skip()}}catch(s){const r=new e("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:s});t.getLogger("esri.view.2d.layers.features.support.FeatureSetReaderPBF").error(r)}return null}function I(e){const t=1;for(;e.next();){if(e.tag()===t)return e.getMessage();e.skip()}return null}function y(e){const t=1,r=2,s=3,n=4,a=5,i=6,h=7,o=8,d=9,u=e.getLength(),c=e.pos()+u;for(;e.pos()<c&&e.next();)switch(e.tag()){case t:return e.getString();case r:return e.getFloat();case s:return e.getDouble();case n:return e.getSInt32();case a:return e.getUInt32();case i:return e.getInt64();case h:return e.getUInt64();case o:return e.getSInt64();case d:return e.getBool();default:return e.skip(),null}return null}function m(e,t,r,s,n,a){return.5*Math.abs(e*s+r*a+n*t-e*a-r*t-n*s)}function p(e,t,r,s,n){if(!e)return!1;return 0===t*n-s*r&&t*s+r*n>0}class x extends h{static fromBuffer(e,t,r=!1){const s=t.geometryType,n=f(e),a=o(n,"esriGeometryPoint"===s,t.featureIdInfo,r);return new x(n,a,t,r)}constructor(e,t,r,s){super(r),this._use64Bit=s,this._hasNext=!1,this._isPoints=!1,this._featureIndex=-1,this._featureOffset=0,this._cache={area:0,unquantGeometry:void 0,geometry:void 0},this._parseCaches=new Array,this._geometryType=r.geometryType,this._reader=e,this._header=t,this._hasNext=t.hasFeatures,this._isPoints="esriGeometryPoint"===r.geometryType}get _size(){return this._header.featureCount}get fields(){return this._header.fields}get geometryType(){return this._geometryType}get hasZ(){return!1}get hasM(){return!1}get hasFeatures(){return this._header.hasFeatures}get hasNext(){return this._hasNext}get exceededTransferLimit(){return this._header.exceededTransferLimit}getSize(){return this._size}getInTransform(){return this._header.transform}getCursor(){return this.copy()}getIndex(){return this._featureIndex}setIndex(e){this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0,this._featureIndex=e}getAttributeHash(){let e="";for(const t of this._header.fields.fields)e+=this._readAttributeAtIndex(t.index)+".";return e}getObjectId(){if(1===this._header.idFieldIndices.length)return this._readAttributeAtIndex(this._header.idFieldIndices[0]);const e=this._header.idFieldIndices.map((e=>this._readAttributeAtIndex(e)));return JSON.stringify(e)}getDisplayId(){return this._header.displayIds[this._featureIndex]}setDisplayId(e){this._header.displayIds[this._featureIndex]=e}readGeometryArea(){return this._cache.area||this._readGeometry(!0),this._cache.area}copy(){const e=this._reader.clone(),t=new x(e,this._header,this.metadata,this._use64Bit);return this.copyInto(t),t}next(){for(this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0;++this._featureIndex<this._size&&!this._getExists(););return this._featureIndex<this._size}get usedMemory(){return s+(this._cache.geometry?.usedMemory??0)}_readX(){return this._header.centroid[2*this._featureIndex]}_readY(){return this._header.centroid[2*this._featureIndex+1]}_readServerCentroid(){const e=this._header.centroid[2*this._featureIndex],t=this._header.centroid[2*this._featureIndex+1];return e===u?null:new a([],[e,t])}_readGeometry(e=!1){if(void 0===this._cache.geometry){let r=null;if(this._isPoints){if(this._header.centroid[2*this._featureIndex]===u)return null;const e=this._header.centroid[2*this._featureIndex],t=this._header.centroid[2*this._featureIndex+1];r=new a([],[e,t])}else{const s=this._header.offsets.geometry[this._featureIndex],n=this._reader;if(0===s)return null;n.move(s);try{r=e?this._parseGeometryForDisplay(n):this._parseGeometry(n)}catch(t){return null}}return 0===r?.coords.length&&(r=null),this._cache.geometry=r,r}return this._cache.geometry}_readAttribute(e,t){const r=this._header.fields.get(e);if(null==r)return;const s=this._readAttributeAtIndex(r.index),n=this._header.fields.isDateField(r.name);return t?null==s?s:n?new Date(s):s:s}_readAttributes(){const e={};for(const t of this._header.fields.fields)e[t.name]=this._readAttributeAtIndex(t.index);return e}copyInto(e){super.copyInto(e),e._featureIndex=this._featureIndex,e._featureOffset=this._featureOffset,e._hasNext=this._hasNext,e._parseCaches=this._parseCaches}_readAttributeAtIndex(e){let t=this._parseCaches[e];if(t||(t=new i(this.getSize()),this._parseCaches[e]=t),t.has(this._featureIndex))return t.get(this._featureIndex);const r=this._header.offsets.attributes[this._featureIndex*this._header.fieldCount+e],s=this._reader;s.move(r);const n=y(s);return t.set(this._featureIndex,n),n}_readGeometryDeltaDecoded(e=!1){if(void 0===this._cache.unquantGeometry){const t=this._readGeometry(e);if(!t)return this._cache.unquantGeometry=void 0,null;if(!this.getInTransform())return this._cache.unquantGeometry=t,t;const r=_(t.coords.length,this._use64Bit).decoded,s=t.clone(r),n=s.coords;let a=0;for(const e of s.lengths){for(let t=1;t<e;t++){const e=2*(a+t),r=2*(a+t-1);n[e]+=n[r],n[e+1]+=n[r+1]}a+=e}return this._cache.unquantGeometry=s,s}return this._cache.unquantGeometry}_parseGeometry(e){const t=2,r=3,s=e.asUnsafe(),n=s.getLength(),i=s.pos()+n,h=[],o=[];for(;s.pos()<i&&s.next();)switch(s.tag()){case t:{const e=s.getUInt32(),t=s.pos()+e;for(;s.pos()<t;)o.push(s.getUInt32());break}case r:{const e=s.getUInt32(),t=s.pos()+e;for(h.push(s.getSInt64()),h.push(s.getSInt64()),this.hasZ&&s.getSInt64(),this.hasM&&s.getSInt64();s.pos()<t;)h.push(s.getSInt64()),h.push(s.getSInt64()),this.hasZ&&s.getSInt64(),this.hasM&&s.getSInt64();break}default:s.skip()}return new a(o,h)}_parseGeometryForDisplay(e){const t=2,s=3,n=e.asUnsafe(),i=n.getLength(),h=n.pos()+i,o=[],u=[];let c=0,l=0,g=null,f=0;const I="esriGeometryPolygon"===this.geometryType,y="esriGeometryPolyline"===this.geometryType,x=I||y;for(;n.pos()<h&&n.next();)switch(n.tag()){case t:{const e=n.getUInt32(),t=n.pos()+e;for(;n.pos()<t;){const e=n.getUInt32();o.push(e),c+=e}g=_(2*c,this._use64Bit).delta;break}case s:{n.getUInt32();const e=2+(this.hasZ?1:0)+(this.hasM?1:0);r(g);for(const t of o)if(l+e*t>g.length)for(let e=0;e<t;e++)n.getSInt64(),n.getSInt64(),this.hasZ&&n.getSInt64(),this.hasM&&n.getSInt64();else if(I&&d){const e=this.getAreaSimplificationThreshold(t,this._header.vertexCount);let r=2,s=1;const a=!1;let i=n.getSInt64(),h=n.getSInt64();g[l++]=i,g[l++]=h,this.hasZ&&n.getSInt64(),this.hasM&&n.getSInt64();let o=n.getSInt64(),d=n.getSInt64();for(this.hasZ&&n.getSInt64(),this.hasM&&n.getSInt64();r<t;){let t=n.getSInt64(),a=n.getSInt64();this.hasZ&&n.getSInt64(),this.hasM&&n.getSInt64();const u=i+o,c=h+d;m(i,h,u,c,u+t,c+a)>=e?(f+=-.5*(u-i)*(c+h),s>1&&p(x,g[l-2],g[l-1],o,d)?(g[l-2]+=o,g[l-1]+=d):(g[l++]=o,g[l++]=d,s++),i=u,h=c):(t+=o,a+=d),o=t,d=a,r++}s<3||a?l-=2*s:(f+=-.5*(i+o-i)*(h+d+h),p(x,g[l-2],g[l-1],o,d)?(g[l-2]+=o,g[l-1]+=d,u.push(s)):(g[l++]=o,g[l++]=d,u.push(++s)))}else{let e=0,r=n.getSInt64(),s=n.getSInt64();this.hasZ&&n.getSInt64(),this.hasM&&n.getSInt64(),g[l++]=r,g[l++]=s,e+=1;for(let a=1;a<t;a++){const t=n.getSInt64(),i=n.getSInt64(),h=r+t,o=s+i;f+=-.5*(h-r)*(o+s),this.hasZ&&n.getSInt64(),this.hasM&&n.getSInt64(),a>2&&p(x,g[l-2],g[l-1],t,i)?(g[l-2]+=t,g[l-1]+=i):(g[l++]=t,g[l++]=i,e+=1),r=h,s=o}u.push(e)}break}default:n.skip()}return this._cache.area=f,u.length?new a(u,g):null!=g?this._createDeltaQuantizedExtrudedGeometry(g[0],g[1]):null}}export{x as FeatureSetReaderPBF};
|
|
@@ -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 e
|
|
5
|
+
import{getFeatureIdInfoFieldNames as e}from"../../../../../layers/graphics/data/FeatureIdInfo.js";import t from"../../../../../layers/support/FieldsIndex.js";import{parseField as s,parseTransform as r}from"../../../../../rest/query/operations/pbfFeatureServiceParser.js";const n=268435455;class o{constructor(){this.hasFeatures=!1,this.exceededTransferLimit=!1,this.fieldCount=0,this.featureCount=0,this.idFieldIndices=[],this.vertexCount=0,this.offsets={attributes:new Array,geometry:new Array},this.centroid=new Array}}function a(a,i,c,f=!1){const d=9,u=12,p=13,g=15,l=a.asUnsafe(),h=l.pos(),y=new o;let m=0,w=0;const k=1,x=2,I=4,b=3;let A=null,L=!1;const F=[];for(;l.next();)switch(l.tag()){case u:A=l.processMessage(r);break;case d:if(y.exceededTransferLimit=l.getBool(),y.exceededTransferLimit){y.offsets.geometry=f?new Float64Array(8e3):new Int32Array(8e3),y.centroid=f?new Float64Array(16e3):new Int32Array(16e3);for(let e=0;e<y.centroid.length;e++)y.centroid[e]=n}break;case p:{const e=l.processMessage(s);e.index=m++,F.push(e);break}case g:{const e=l.getLength(),t=l.pos()+e;if(!y.exceededTransferLimit){const e=y.offsets.geometry,t=y.centroid;e.push(0),t.push(n),t.push(n)}!L&&y.exceededTransferLimit&&(L=!0,y.offsets.attributes=f?new Float64Array(8e3*m):new Uint32Array(8e3*m));let s=w*m;for(;l.pos()<t&&l.next();)switch(l.tag()){case k:{if(L)y.offsets.attributes[s++]=l.pos();else{y.offsets.attributes.push(l.pos())}const e=l.getLength();l.skipLen(e);break}case x:if(i){const e=l.getLength(),t=l.pos()+e;for(;l.pos()<t&&l.next();)switch(l.tag()){case b:{l.getUInt32();const e=l.getSInt64(),t=l.getSInt64();y.centroid[2*w]=e,y.centroid[2*w+1]=t;break}default:l.skip()}}else{y.offsets.geometry[w]=l.pos();const e=l.getLength();y.vertexCount+=e,l.skipLen(e)}break;case I:{const e=l.getLength(),t=l.pos()+e;for(;l.pos()<t&&l.next();)switch(l.tag()){case b:{l.getUInt32();const e=l.getSInt64(),t=l.getSInt64();y.centroid[2*w]=e,y.centroid[2*w+1]=t;break}default:l.skip()}break}default:l.skip()}w++,y.hasFeatures=!0;break}default:l.skip()}y.fields=new t(F),y.featureCount=w,y.fieldCount=m;const C=e(c);return y.idFieldIndices=Array.from(C,(e=>y.fields.get(e)?.index)),y.transform=A,y.displayIds=new Uint32Array(y.featureCount),y.groupIds=new Uint16Array(y.featureCount),l.move(h),y}export{o as FeatureSetHeader,a as parseHeader};
|
|
@@ -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{baseObjectMemory as e}from"../../../../../core/memoryEstimations.js";import t from"../../../../../layers/graphics/OptimizedGeometry.js";import{FeatureSetReader as r}from"./FeatureSetReader.js";class n extends r{constructor(t,r,n,s,i,d=new Uint32Array(s.size())){super(t),this._fields=r,this._geometryInfo=n,this._inner=s,this._chunkId=i,this._displayIds=d,this._index=-1,this.usedMemory=e,this._size=this._inner.size()
|
|
5
|
+
import"../../../../../core/has.js";import{baseObjectMemory as e}from"../../../../../core/memoryEstimations.js";import t from"../../../../../layers/graphics/OptimizedGeometry.js";import{FeatureSetReader as r}from"./FeatureSetReader.js";class n extends r{constructor(t,r,n,s,i,d=new Uint32Array(s.size())){super(t),this._fields=r,this._geometryInfo=n,this._inner=s,this._chunkId=i,this._displayIds=d,this._index=-1,this.usedMemory=e,this._size=this._inner.size();const o=t.featureIdInfo;"object-id"===o.type&&(this._objectIdFieldIndex=this._fields.get(o.fieldName)?.index),this._chunkId>65535&&console.error("Exceeded max allowed parquet reader size")}destroy(){super.destroy(),this._inner.free()}get fields(){return this._fields}get geometryType(){return this._geometryInfo.geometryType}get hasFeatures(){return!0}get hasNext(){throw new Error("Method not implemented.")}get exceededTransferLimit(){return!1}get hasZ(){return!1}get hasM(){return!1}getInTransform(){return null}getSize(){return this._size}getCursor(){return this.copy()}getAttributeHash(){let e="";for(const t of this.fields.fields)e+=this._readAttribute(t.name,!1)+".";return e}getObjectId(){return null!=this._objectIdFieldIndex?this._inner.readAttribute(this._index,this._objectIdFieldIndex):this._index<<16|this._chunkId}getDisplayId(){return this._displayIds[this._index]}setDisplayId(e){this._displayIds[this._index]=e}setIndex(e){this._index=e}getBoundsXMin(){return this._inner.boundsXMin(this._index)}getBoundsYMin(){return this._inner.boundsYMin(this._index)}getBoundsXMax(){return this._inner.boundsXMax(this._index)}getBoundsYMax(){return this._inner.boundsYMax(this._index)}setBoundsXMin(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsYMin(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsXMax(e){throw new Error("InternalError: Setting bounds is unsupported")}setBoundsYMax(e){throw new Error("InternalError: Setting bounds is unsupported")}getIndex(){return this._index}next(){for(;++this._index<this._size&&!this._getExists(););return this._index<this._size}readGeometryArea(){return this.readGeometryForDisplay()?.area()??0}copy(){const e=new n(this.metadata,this._fields,this._geometryInfo,this._inner,this._chunkId,this._displayIds);return this.copyInto(e),e}copyInto(e){super.copyInto(e),e._index=this._index}readGeometryForDisplayTransformed(e){const[r,n]=e.translate,[s,i]=e.scale,d=this._inner.readGeometryTransformed(this._index,r,n,s,i);return d?new t(d.readLengthsUnsafe(),d.readCoordsUnsafe()):null}_readGeometry(e){const r=this._inner.readCoords(this._index),n=this._inner.readLengths(this._index);return r&&n?new t(n,r):null}_readX(){return this._readGeometry()?.coords[0]}_readY(){return this._readGeometry()?.coords[1]}_readServerCentroid(){return null}_readAttribute(e,t){const r=this.fields.get(e);if(!r)return;if(null==r.index)return this.getObjectId();const n=this._inner.readAttribute(this._index,r.index);if(null==n)return n;const s=this.fields.isDateField(r.name);return t?null==n?n:s?new Date(n):n:n}_readAttributes(){const e={};for(const t of this._fields.fields)null!=t.index?this._inner.hasField(t.index)&&(e[t.name]=this._readAttribute(t.name,!1)):e.__OBJECTID=this.getObjectId();return e}}export{n as FeatureSetReaderParquet};
|
|
@@ -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 o from"../../core/Accessor.js";import s from"../../core/Collection.js";import{mapCollection as
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{equals as s}from"../../core/arrayUtils.js";import r from"../../core/Collection.js";import{mapCollection as t}from"../../core/mapCollectionUtils.js";import{destroyMaybe as i}from"../../core/maybe.js";import{watch as n,syncAndInitial as a}from"../../core/reactiveUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import{e as c}from"../../chunks/earcut.js";import{create as p}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as d}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as u}from"../../geometry/ellipsoidUtils.js";import h from"../../geometry/Point.js";import{e as f}from"../../chunks/densifyOperator.js";import{computeTranslationToOriginAndRotation as y}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{newDoubleArray as g}from"../../geometry/support/DoubleArray.js";import{earth as v}from"../../geometry/support/Ellipsoid.js";import{newIndexArray as w}from"../../geometry/support/Indices.js";import{t as j}from"../../chunks/vec3.js";import{FocusAreaOutlineItem as _}from"../FocusAreaOutlineItem.js";import{ViewingMode as A}from"../ViewingMode.js";import{ElevationContext as R}from"./layers/graphics/ElevationContext.js";import{extrudePolygon as b}from"./layers/graphics/Graphics3DExtrudeSymbolLayer.js";import{computeCentroid as C}from"./layers/graphics/graphicUtils.js";import{geometryToRenderInfo as N}from"./support/renderInfoUtils/polygon.js";import{FocusAreaColorNode as x}from"./webgl-engine/effects/focusArea/FocusAreaColorNode.js";import{FocusAreaGeometry as k,FocusAreaMaskNode as H}from"./webgl-engine/effects/focusArea/FocusAreaMaskNode.js";const M=-2e4,U=65e5;let P=class extends o{constructor(e){super(e),this._volumes=new Map,this._elevationContext=new R,this._outlineMap=new r}initialize(){this.addHandles([n((()=>this.areas?.style??"none"),(e=>this._ensureRenderNodes(e)),a)]),this.addHandles([n((()=>this.polygons),(e=>this._updateVolumes(e)),a)]),this._outlineMap=t((()=>this.areas?.areas),(e=>new _({area:e,view:this.view})),{recycleItems:!0})}destroy(){this.removeAllHandles(),this._outlineMap.forEach((e=>e.destroy()))}get areas(){return this.view.map?.focusAreas}get enabledAreas(){return this.areas?.areas.toArray().filter((({enabled:e})=>e))??[]}get style(){return this.areas?.style??"none"}get polygons(){return this.enabledAreas.reduce(((e,o)=>e.concat(o.geometries.toArray())),new Array)}containsGeometry(e){if(0===this.polygons.length)return!0;const o=new h(e);return this.polygons.some((e=>e.contains(o)))}_updateVolumes(e){this._extrude(e),this._ensureRenderNodes(this.style)}_extrude(e){if(!this.view.renderCoordsHelper||s(Array.from(this._volumes.keys()),e))return;const o=U-M,r=d(),t=this.view.renderCoordsHelper.viewingMode===A.Global,i=p(),n=p();t||this.view.renderCoordsHelper.worldUpAtPosition([0,0,0],r);const a=new Map;for(const s of e){const e=this._volumes.get(s);if(e){a.set(s,e);continue}const l=C(s);if(null==l)continue;const m=f(s,u(this.view.spatialReference).radius/v.radius*5e5,{unit:"meters"});y(m.spatialReference,[l.x,l.y,0],i,this.view.renderCoordsHelper.spatialReference);const p=this.view.renderCoordsHelper.worldUpAtPosition([i[12],i[13],i[14]],V);n[12]=-i[12],n[13]=-i[13],n[14]=-i[14];const d=N(m,this.view.elevationProvider,this.view.renderCoordsHelper,this._elevationContext),{polygons:h,mapPositions:_,position:A}=d,R=new Array;for(const s of h){const e=s.count,a=c(s.mapPositions,s.holeIndices,3);if(0===a.length)continue;const l=a.length,m=6*e,d=w(m+l),u=w(l),h=g(3*m);b(A,_,a,s,h,null,null,null,d,u,o,r,t),j(h,h,n);const f=new k(h,u,d,o,[i[12]+M*p[0],i[13]+M*p[1],i[14]+M*p[2]]);R.push(f)}a.set(s,R)}this._volumes=a,this._maskRenderNode?.updateGeometries()}_ensureRenderNodes(e){this.view.stage&&("none"===e||0===this.volumes.size?(this._maskRenderNode=i(this._maskRenderNode),this._colorRenderNode=i(this._colorRenderNode)):(this._maskRenderNode??=new H({focusAreasView:this}),this._colorRenderNode??=new x({focusAreasView:this})))}get volumes(){return this._volumes}};e([l()],P.prototype,"_volumes",void 0),e([l({constructOnly:!0})],P.prototype,"view",void 0),P=e([m("esri.views.3d.FocusAreasView")],P);const V=d();export{P as FocusAreasView};
|
|
@@ -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 s from"../../../core/Accessor.js";import{createTask as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import s from"../../../core/Accessor.js";import{createTask as i}from"../../../core/asyncUtils.js";import t from"../../../core/Collection.js";import a from"../../../core/Error.js";import{makeHandle as n}from"../../../core/handleUtils.js";import"../../../core/has.js";import r from"../../../core/Logger.js";import{removeMaybe as o,destroyMaybe as l,abortMaybe as c}from"../../../core/maybe.js";import{createAbortError as d,isAborted as h,onAbort as w,createResolver as y}from"../../../core/promiseUtils.js";import{schedule as m}from"../../../core/scheduling.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import{subclass as _}from"../../../core/accessorSupport/decorators/subclass.js";const V="analyses-owner-handles";var p,A;!function(e){e[e.PENDING=0]="PENDING",e[e.CREATED=1]="CREATED"}(p||(p={})),function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED"}(A||(A={}));let v=class extends s{constructor(e){super(e),this._allAnalysisViews=new t,this._creatingViewCount=0,this._items=new Map,this._scheduledUpdateHandle=null,this._attachedToViewResolver=f(),this._analysisModules={"area-measurement":{module:null},dimension:{module:null},"direct-line-measurement":{module:null},"line-of-sight":{module:null},slice:{module:null},viewshed:{module:null}},this._emitOnView=(e,s)=>this.view.emit(e,s)}destroy(){this._disconnectOwners(),this._attachedToViewResolver.reject(d("AnalysisViewManager was destroyed"))}attach(){this._connectOwners(),this._attachedToViewResolver.resolve()}detach(){this._disconnectOwners(),this._attachedToViewResolver.reject(d()),this._attachedToViewResolver=f()}get updating(){return!this.view.ready||0!==this._creatingViewCount||this._allAnalysisViews.some((e=>e.updating))}get testInfo(){}async whenAnalysisView(e){await this._attachedToViewResolver.promise;const s=this._items.get(e);if(null==s||s.state.list===A.REMOVED){throw new a("AnalysisViewManager:no-analysisview-for-analysis","The analysis has not been added to view.analyses",{analysis:e})}return s.createAnalysisViewTask.promise}_connectOwners(){this.addHandles(this._connectAnalysesCollection(this.view.analyses),V)}_disconnectOwners(){this.removeHandles(V),this._update(),this._creatingViewCount=0}_connectAnalysesCollection(e){for(const t of e)this._addAnalysis(t);const s=e.on("after-add",(e=>this._addAnalysis(e.item))),i=e.on("after-remove",(e=>this._removeAnalysis(e.item)));return n((()=>{s.remove(),i.remove();for(const s of e)this._removeAnalysis(s)}))}_addAnalysis(e){const s=this._items.get(e);if(null==s){const s={state:{view:p.PENDING,list:A.ADDED},analysis:e,view:null,createAnalysisViewTask:null};this._items.set(e,s),s.createAnalysisViewTask=i((i=>this._createAnalysisViewPromise(s,i).then((s=>(this._emitOnView("analysis-view-create",{analysis:e,analysisView:s}),s)),(s=>{throw this._emitOnView("analysis-view-create-error",{analysis:e,error:s}),s}))))}else s.state.list=A.ADDED}_removeAnalysis(e){const s=this._items.get(e);null!=s?(s.state.list=A.REMOVED,this._scheduleUpdate()):r.getLogger(this).error("Trying to remove analysis which was not added")}_scheduleUpdate(){null==this._scheduledUpdateHandle&&(this._scheduledUpdateHandle=m((()=>this._update())))}_update(){this._scheduledUpdateHandle=o(this._scheduledUpdateHandle),this._items.forEach((e=>{if(e.state.list!==A.REMOVED)return;const{analysis:s,view:i}=e;switch(this._items.delete(s),e.state.view){case p.PENDING:e.createAnalysisViewTask=c(e.createAnalysisViewTask);break;case p.CREATED:null!=i&&(this._allAnalysisViews.remove(i),e.view=l(i),e.createAnalysisViewTask=null,this._emitOnView("analysis-view-destroy",{analysis:s,analysisView:i}))}}))}async _createAnalysisViewPromise(e,s){const i=e.analysis,t=i.type,a=this._analysisModules[t];if(this._creatingViewCount+=1,null==a.module)try{a.module=await this._loadAnalysisModule(t)}catch(o){throw this._creatingViewCount-=1,o}if(h(s))throw this._creatingViewCount-=1,d("AnalysisView creation aborted");const n=new a.module.default({analysis:i,view:this.view});let r=!0;w(s,(()=>{r&&this._destroyAnalysisView(i,n)}));try{await n.when()}catch(o){throw r=!1,this._destroyAnalysisView(i,n),o}if(h(s))throw d();return r=!1,e.view=n,e.state.view=p.CREATED,this._allAnalysisViews.add(n),this._creatingViewCount-=1,n}_destroyAnalysisView(e,s){s.destroyed||(this._creatingViewCount-=1,s.destroy(),this._emitOnView("analysis-view-destroy",{analysis:e,analysisView:s}))}_loadAnalysisModule(e){switch(e){case"area-measurement":return import("./AreaMeasurementAnalysisView3D.js");case"dimension":return import("./DimensionAnalysisView3D.js");case"direct-line-measurement":return import("./DirectLineMeasurementAnalysisView3D.js");case"line-of-sight":return import("./LineOfSightAnalysisView3D.js");case"slice":return import("./SliceAnalysisView3D.js");case"viewshed":return import("./ViewshedAnalysisView3D.js")}}};function f(){const e=y();return e.promise.catch((()=>{})),e}e([u()],v.prototype,"updating",null),e([u({constructOnly:!0})],v.prototype,"view",void 0),e([u()],v.prototype,"_allAnalysisViews",void 0),e([u()],v.prototype,"_creatingViewCount",void 0),v=e([_("esri.views.3d.analysis.AnalysisViewManager3D")],v);const D=v;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 i}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{destroyHandle as
|
|
5
|
+
import{_ as i}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{destroyHandle as o}from"../../../core/handleUtils.js";import"../../../core/has.js";import s from"../../../core/Logger.js";import{mapCollection as e}from"../../../core/mapCollectionUtils.js";import{abortMaybe as n,destroyMaybe as r}from"../../../core/maybe.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{AnalysisView3D as p}from"./AnalysisView3D.js";import{DimensionController as m}from"./Dimension/DimensionController.js";import{DimensionTool as u}from"./Dimension/DimensionTool.js";import{DimensionVisualization as c}from"./Dimension/DimensionVisualization.js";import{LengthDimensionComputation as d}from"./Dimension/LengthDimensionComputation.js";import{applyProjectionAndElevationAlignment as h,logFailedGeometryProjectionError as y}from"./support/projectionUtils.js";import{connectAnalysisViewToTool as v,removeAnalysisViewTool as g,startExclusiveInteractiveOperation as j}from"../../analysis/analysisViewUtils.js";let D=class extends(p(t)){constructor(i){super(i),this.type="dimension-view-3d",this.analysis=null,this.tool=null,this.selectedDimension=null,this.userOperation=null,this._dimensionsToComputations=new Map,this._projectAndAlignPoint=null}initialize(){this._projectAndAlignPoint=i=>{if(null==i)return null;const{spatialReference:t,elevationProvider:o}=this.view,e=h(i,t,o);return null==e&&y(this.analysis,i.spatialReference,s.getLogger(this)),e};const i=e((()=>this.analysis.dimensions),(i=>this._createComputation(i)));this.computations=i,this.addHandles([v(this,u),o(i)]),this._analysisVisualization=new c({analysisViewData:this,view:this.view,isDecoration:!this.parent}),this._analysisController=new m({analysisViewData:this,view:this.view})}destroy(){this.userOperation=n(this.userOperation),g(this),this._analysisVisualization=r(this._analysisVisualization)}get updating(){return this._analysisVisualization?.loadingMessages??!1}get results(){return this.analysis.dimensions.map((i=>this._dimensionsToComputations.get(i).result))}get selectedComputation(){const{selectedDimension:i}=this;return null==i?null:this._dimensionsToComputations.get(i)}get testInfo(){}async createLengthDimensions(i){return this.selectedDimension=null,j(this,{abortOptions:i,onToolActivated:i=>i.place("multiple")})}async place(i){return this.selectedDimension=null,j(this,{abortOptions:i,onToolActivated:i=>i.place("single")})}_createComputation(i){const{_dimensionsToComputations:t}=this,o=new d({dimension:i,projectAndAlignPoint:this._projectAndAlignPoint});return t.set(i,o),{computation:o,remove:()=>this._removeComputation(o)}}_removeComputation(i){const{dimension:t}=i;t===this.selectedDimension&&(this.selectedDimension=null),this._dimensionsToComputations.delete(t),i.destroy()}};i([a({readOnly:!0})],D.prototype,"type",void 0),i([a({constructOnly:!0,nonNullable:!0})],D.prototype,"analysis",void 0),i([a()],D.prototype,"tool",void 0),i([a()],D.prototype,"updating",null),i([a({readOnly:!0})],D.prototype,"results",null),i([a()],D.prototype,"computations",void 0),i([a()],D.prototype,"selectedDimension",void 0),i([a()],D.prototype,"selectedComputation",null),i([a()],D.prototype,"userOperation",void 0),i([a()],D.prototype,"_analysisVisualization",void 0),i([a()],D.prototype,"_analysisController",void 0),i([a()],D.prototype,"_dimensionsToComputations",void 0),D=i([l("esri.views.3d.analysis.DimensionAnalysisView3D")],D);const _=D;export{_ 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{updatePointsFromFeatureReference as t,getFeatureId as o}from"../../../../analysis/featureReferenceUtils.js";import i from"../../../../core/Accessor.js";import{createTask as n}from"../../../../core/asyncUtils.js";import r from"../../../../core/Evented.js";import s from"../../../../core/Handles.js";import{handlesGroup as a,makeHandle as l}from"../../../../core/handleUtils.js";import c from"../../../../core/Logger.js";import{abortMaybe as u}from"../../../../core/maybe.js";import{ignoreAbortErrors as d}from"../../../../core/promiseUtils.js";import{initial as p}from"../../../../core/reactiveUtils.js";import{property as g}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import{subclass as h}from"../../../../core/accessorSupport/decorators/subclass.js";import{c as m,d as v,n as f,g as _,f as b,F as y,a as C}from"../../../../chunks/vec32.js";import{create as T}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as O}from"../../../../core/support/UpdatingHandles.js";import I from"../../../../geometry/Point.js";import{projectOrLoad as P}from"../../../../geometry/projection.js";import{projectBoundingRect as j}from"../../../../geometry/projection/projectBoundingRect.js";import{empty as S,containsPointObject as w,intersectsSegment as R}from"../../../../geometry/support/aaBoundingRect.js";import{fromPoints as A,create as H}from"../../../../geometry/support/ray.js";import{zValueInAbsoluteHeightMode as E}from"../../../../support/elevationInfoUtils.js";import L from"../LineOfSightAnalysisResult.js";import{LineOfSightComputation as V}from"./LineOfSightComputation.js";import{LineOfSightRayIntersector as F}from"./LineOfSightRayIntersector.js";import{logFailedGeometryProjectionError as x}from"../support/projectionUtils.js";import{StoreResults as D}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{toGraphic as G}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{ImmediateTask as N,TaskPriority as z}from"../../../support/Scheduler.js";let k=class extends(r.EventedMixin(i)){constructor(e){super(e),this.updateOnCameraChange=!0,this._observerGroundOffsetRenderSpace=0,this._effectiveObserverElevationMode="absolute-height",this._observerFeatureId=null,this._updatingHandles=new O,this._frameTask=N,this._computationHandles=new s,this._externalObserverUpdate=!0}initialize(){const e=this.view.resourceController?.scheduler;this._frameTask=e?e.registerTask(z.LINE_OF_SIGHT_TOOL):N,this._intersector=new F({view:this.view}),this.addHandles([this._connectObserver(),this._connectComputations(),this._connectTargets()])}destroy(){this._computationHandles.destroy(),this._computations.removeAll(),this._updatingHandles.destroy()}get updating(){return this._frameTask.updating||this._updatingHandles.updating}get priority(){return this._frameTask.priority}set priority(e){this._frameTask.priority=e}get _computations(){return this.analysisViewData.computations}get _elevationAlignedObserverPositionRenderSpace(){return this.analysisViewData.observerEngineLocation}set _elevationAlignedObserverPositionRenderSpace(e){this.analysisViewData.observerEngineLocation=e}get _screenPixelSize(){return this.view.state.camera.computeScreenPixelSizeAt(this._elevationAlignedObserverPositionRenderSpace)}_computeResult(e){const t=e.computation,{inputPoints:o,computationResult:i}=t,{observerAdjusted:n,targetAdjusted:r}=o,{start:s,end:a}=i;m(s,n),m(a,r);this._canCompute(t)?this._computeIntersection(e):M(e),t.notifyResultChanged(),this.emit("result-changed",{target:e.computation.target,result:t.result})}_adjustStartEndPositions(e){const{view:o}=this,{inputPoints:i}=e,{observer:n,target:r,observerAdjusted:s,targetAdjusted:a}=i;m(s,n),m(a,r),t(o,this._intersector.intersector,i);const{observerSurfaceNormal:l,targetSurfaceNormal:c}=i,u=this._screenPixelSize,d=B;null!=l?m(d,l):v(d,a,s);const p=u;f(d,d),_(d,d,Math.min(p,1)),b(s,s,d),null!=c?m(d,c):v(d,s,a);const g=o.state.camera.computeScreenPixelSizeAt(a);f(d,d),_(d,d,Math.min(g,1)),b(a,a,d)}_computeIntersection({computation:e,interpolationInfo:t}){const{view:o}=this,{sceneIntersectionHelper:i,renderCoordsHelper:n}=o;if(null==i)return;const r=this._intersector.intersector,{computationResult:s,inputPoints:a}=e,{observer:l,target:c}=a,{start:u,end:d}=s,p=A(u,d,q);r.options.store=D.MIN,i.intersectToolIntersectorRay(p,r);const g=r.results.min,h=s.intersection,v=B;let f=!0;if(null!=g&&g.getIntersectionPoint(h)){m(t.originalIntersection,h),m(t.originalObserver,u),m(t.originalTarget,d),n.fromRenderCoords(h,v,o.spatialReference);const e=1-y(d,c)/y(u,c);f=y(l,h)>=e*y(l,c)}const _=new I(v,o.spatialReference);{const{result:t,target:i}=e;null!=t?(t.target=i,t.intersectedGraphic=f?null:G(g,o),t.intersectedLocation=f?null:_,t.visible=f):e.result=new L({target:i,elevationAlignedTargetLocation:e.elevationAlignedTargetLocation,intersectedGraphic:f?null:G(g,o),intersectedLocation:f?null:_,visible:f})}s.isValid=a.isValid=!0,s.isTargetVisible=f}_canCompute(e){const t=this.analysisViewData.elevationAlignedObserver,o=this.view.frustum;if(null==t||null==e.elevationAlignedTargetLocation||null==o)return!1;const{observerAdjusted:i,targetAdjusted:n}=e.inputPoints,r=o.intersectsPoint(i),s=o.intersectsPoint(n);return r&&s}_onObserverPositionChange(e,t,i,n,r){if(this._externalObserverUpdate=r,null==e)return this.analysisViewData.elevationAlignedObserver=null,void(this._observerFeatureId=null);if(null==t)return x(this.analysis,e.spatialReference,c.getLogger(this)),void(this.analysisViewData.elevationAlignedObserver=null);const s=U(t,i),{absoluteZ:a,elevation:l}=E(t.x,t.y,t.z,this.view.spatialReference,this.view,s),u=t.clone();u.z=a,this._effectiveObserverElevationMode=s.mode,this.analysisViewData.elevationAlignedObserver=u;const d=T();this.view.renderCoordsHelper.toRenderCoords(u,d),this._elevationAlignedObserverPositionRenderSpace=d,this._observerGroundOffsetRenderSpace=a-l,this._observerFeatureId=o(n),this.priority=z.LINE_OF_SIGHT_TOOL_INTERACTIVE}_onObserverRenderSpacePositionChangeForComputation(e,t,o,i,n){const{inputPoints:r}=e;switch(m(r.observer,t),r.observerFeatureId=n,r.observerSurfaceNormal=null,i){case"on-the-ground":case"relative-to-ground":{const e=this._intersector.updateFromGroundIntersection(r.observer,o,r.observer);null==r.observerFeatureId&&(r.observerSurfaceNormal=e)}}this._adjustStartEndPositions(e),e.notifyInputPointsChanged(),this.priority=z.LINE_OF_SIGHT_TOOL_INTERACTIVE}_onTargetPositionChange(e,t,i,n,r,s=!0){const a=e.inputPoints;if(s&&(a.isValid=!1),null==i)return null!=t&&x(this.analysis,t.spatialReference,c.getLogger(this)),e.elevationAlignedTargetLocation=null,void e.notifyInputPointsChanged();const l=U(i,n),{absoluteZ:u,elevation:d}=E(i.x,i.y,i.z,this.view.spatialReference,this.view,l),p=i.clone();switch(p.z=u,e.elevationAlignedTargetLocation=p,this.view.renderCoordsHelper.toRenderCoords(e.elevationAlignedTargetLocation,a.target),a.targetFeatureId=o(r),a.targetSurfaceNormal=null,l.mode){case"on-the-ground":case"relative-to-ground":{const e=this._intersector.updateFromGroundIntersection(a.target,u-d,a.target);null==a.targetFeatureId&&(a.targetSurfaceNormal=e)}}this._adjustStartEndPositions(e),e.notifyInputPointsChanged(),this.priority=z.LINE_OF_SIGHT_TOOL_INTERACTIVE}_connectComputationToTarget(e){return a([this._updatingHandles.add((()=>({computation:e,targetPosition:e.target.position,targetElevationInfo:e.target.elevationInfo,targetFeatureInfo:e.target.feature,projectedTargetPosition:P(e.target.position,this.view.spatialReference)})),(({computation:e,targetPosition:t,targetElevationInfo:o,targetFeatureInfo:i,projectedTargetPosition:n})=>{null==n.pending?this._onTargetPositionChange(e,t,n.geometry,o,i):this._updatingHandles.addPromise(n.pending)}),p)])}_connectComputationToObserver(e){return this._updatingHandles.add((()=>({computation:e,observer:this.analysisViewData.elevationAlignedObserver})),(({computation:e})=>{this._externalObserverUpdate&&(e.inputPoints.isValid=!1,e.notifyInputPointsChanged())}),p)}_connectComputationToRenderSpaceObserver(e){return this._updatingHandles.add((()=>({computation:e,observer:this._elevationAlignedObserverPositionRenderSpace,observerGroundOffset:this._observerGroundOffsetRenderSpace,observerElevationMode:this._effectiveObserverElevationMode,observerFeatureId:this._observerFeatureId})),(({computation:e,observer:t,observerGroundOffset:o,observerElevationMode:i,observerFeatureId:n})=>{this._onObserverRenderSpacePositionChangeForComputation(e,t,o,i,n)}),p)}_connectComputationToCamera(e){return this._updatingHandles.add((()=>({camera:this.view.state.camera,isDirty:this._isCameraDirty})),(({isDirty:t})=>{!this.updateOnCameraChange||e.inputPoints.isValid&&!t||e.notifyInputPointsChanged()}))}_connectComputationToSlicePlane(e){return this._updatingHandles.add((()=>this.view.slice.plane),(()=>{e.inputPoints.isValid=!1,e.notifyInputPointsChanged()}))}_connectComputationToElevation(e){const t=(o,i)=>{const n=this.analysis.observer,r=e.target;let s=null,a=null,l=null,c=null,u=null,d=null;if(null!=n?.position){const e=P(n.position,this.view.spatialReference);if(null!=e.pending)return this._updatingHandles.addPromise(e.pending),void e.pending.finally((()=>t(o,i)));s=e.geometry,a=n.elevationInfo,l=n.feature}if(null!=r.position){const e=P(r.position,this.view.spatialReference);if(null!=e.pending)return this._updatingHandles.addPromise(e.pending),void e.pending.finally((()=>t(o,i)));c=e.geometry,u=r.elevationInfo,d=r.feature}null==s&&null==c||(j(o,i,J,this.view.spatialReference),null!=s&&w(J,s)&&this._onObserverPositionChange(null!=n?n.position:null,s,a,l,!1),null!=c&&w(J,c)&&this._onTargetPositionChange(e,r.position,c,u,d,!1),null!=s&&null!=c&&R(J,s,c)&&e.notifyInputPointsChanged())};return this.view.elevationProvider.on("elevation-change",(({extent:e,spatialReference:o})=>t(e,o)))}_connectComputationToTask(e){let t=null;const o={computation:e,interpolationInfo:{originalIntersection:T(),originalObserver:T(),originalTarget:T()}};return a([this._updatingHandles.add((()=>e.inputPoints),(()=>{t=u(t),t=n((async e=>{await d(this._frameTask.schedule((()=>this._computeResult(o)),e))}))}),{initial:!0,equals:()=>!1}),l((()=>t=u(t)))])}_connectComputation(e){const t=this._computationHandles;t.has(e)||t.add([this._connectComputationToTarget(e),this._connectComputationToObserver(e),this._connectComputationToRenderSpaceObserver(e),this._connectComputationToCamera(e),this._connectComputationToSlicePlane(e),this._connectComputationToElevation(e),this._connectComputationToTask(e)],e)}_disconnectComputation(e){this._computationHandles.remove(e)}_onComputationCollectionChange({added:e,removed:t}){for(const o of t)this._disconnectComputation(o);for(const o of e)this._connectComputation(o)}_onTargetCollectionChange({added:e,removed:t}){for(const o of t)this._removeTarget(o);for(const o of e)this._addTarget(o)}_onCursorTargetChange(e,t){null!=t&&this._removeTarget(t),null!=e&&this._addTarget(e)}_addTarget(e){this._computations.some((t=>t.target===e))||this._computations.add(new V({target:e}))}_removeTarget(e){const t=this._computations.findIndex((t=>t.target===e));this._computations.removeAt(t)}_connectObserver(){return a([this._updatingHandles.add((()=>({observerPosition:null!=this.analysis.observer?this.analysis.observer.position:null,projectedObserverPosition:P(null!=this.analysis.observer?this.analysis.observer.position:null,this.view.spatialReference),observerElevationInfo:null!=this.analysis.observer?this.analysis.observer.elevationInfo:null,observerFeatureInfo:null!=this.analysis.observer?this.analysis.observer.feature:null})),(({observerPosition:e,projectedObserverPosition:t,observerElevationInfo:o,observerFeatureInfo:i})=>{null==t.pending?this._onObserverPositionChange(e,t.geometry,o,i,!0):this._updatingHandles.addPromise(t.pending)}),p)])}_connectComputations(){return this._updatingHandles.addOnCollectionChange((()=>this._computations),(e=>this._onComputationCollectionChange(e)),{initial:!0,final:!0})}_connectTargets(){return a([this._updatingHandles.addOnCollectionChange((()=>this.analysis.targets),(e=>this._onTargetCollectionChange(e)),{initial:!0,final:!0}),this._updatingHandles.add((()=>this.analysisViewData.cursorTarget),((e,t)=>{this._onCursorTargetChange(e,t)}))])}get _isCameraDirty(){const e=this.analysisViewData.elevationAlignedObserver,{view:t}=this,{renderCoordsHelper:o}=t;if(null==e||null==o)return!1;const i=B;o.toRenderCoords(e,i);const n=t.state.camera.computeScreenPixelSizeAt(i);return Math.abs((n-this._screenPixelSize)/this._screenPixelSize)>Z}};function U(e,t){return e.hasZ?t??{mode:"absolute-height",offset:0}:{mode:"on-the-ground",offset:0}}function M({computation:e,interpolationInfo:t}){const{computationResult:o,inputPoints:i}=e,{start:n,end:r,intersection:s}=o,{originalIntersection:a,originalObserver:l,originalTarget:c}=t;if(m(s,a),i.isValid){const e=B,t=y(l,a)/y(l,c);C(e,n,l),_(e,e,1-t),b(s,s,e),C(e,r,c),_(e,e,t),b(s,s,e),o.isValid=!0}else e.result=null,o.isValid=!1,o.isTargetVisible=!1}e([g({constructOnly:!0})],k.prototype,"analysis",void 0),e([g({constructOnly:!0})],k.prototype,"analysisViewData",void 0),e([g({constructOnly:!0})],k.prototype,"view",void 0),e([g()],k.prototype,"updating",null),e([g()],k.prototype,"priority",null),e([g()],k.prototype,"updateOnCameraChange",void 0),e([g()],k.prototype,"_computations",null),e([g()],k.prototype,"_elevationAlignedObserverPositionRenderSpace",null),e([g()],k.prototype,"_observerGroundOffsetRenderSpace",void 0),e([g()],k.prototype,"_effectiveObserverElevationMode",void 0),e([g()],k.prototype,"_observerFeatureId",void 0),e([g()],k.prototype,"_screenPixelSize",null),e([g({readOnly:!0})],k.prototype,"_updatingHandles",void 0),e([g()],k.prototype,"_frameTask",void 0),e([g()],k.prototype,"_isCameraDirty",null),k=e([h("esri.views.3d.analysis.LineOfSight.LineOfSightController")],k);const Z=.1,B=T(),q=H(),J=S();export{k as LineOfSightController};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{updatePointsFromFeatureReference as t,getFeatureId as o}from"../../../../analysis/featureReferenceUtils.js";import n from"../../../../core/Accessor.js";import{createTask as i}from"../../../../core/asyncUtils.js";import r from"../../../../core/Evented.js";import s from"../../../../core/Handles.js";import{handlesGroup as a,makeHandle as l}from"../../../../core/handleUtils.js";import u from"../../../../core/Logger.js";import{abortMaybe as c}from"../../../../core/maybe.js";import{ignoreAbortErrors as d}from"../../../../core/promiseUtils.js";import{initial as p,on as g}from"../../../../core/reactiveUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{c as v,d as f,n as _,g as b,f as y,F as C,a as T}from"../../../../chunks/vec32.js";import{create as O}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as I}from"../../../../core/support/UpdatingHandles.js";import P from"../../../../geometry/Point.js";import{projectOrLoad as j}from"../../../../geometry/projection.js";import{projectBoundingRect as S}from"../../../../geometry/projection/projectBoundingRect.js";import{intersectsSegment as w}from"../../../../geometry/support/aaBoundingBox.js";import{empty as R,containsPointObject as A,intersectsSegment as H}from"../../../../geometry/support/aaBoundingRect.js";import{fromPoints as E,create as L}from"../../../../geometry/support/ray.js";import{zValueInAbsoluteHeightMode as V}from"../../../../support/elevationInfoUtils.js";import F from"../LineOfSightAnalysisResult.js";import{LineOfSightComputation as x}from"./LineOfSightComputation.js";import{LineOfSightRayIntersector as D}from"./LineOfSightRayIntersector.js";import{logFailedGeometryProjectionError as G}from"../support/projectionUtils.js";import{StoreResults as N}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{toGraphic as z}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{ImmediateTask as U,TaskPriority as k}from"../../../support/Scheduler.js";let M=class extends(r.EventedMixin(n)){constructor(e){super(e),this.updateOnCameraChange=!0,this._observerGroundOffsetRenderSpace=0,this._effectiveObserverElevationMode="absolute-height",this._observerFeatureId=null,this._updatingHandles=new I,this._frameTask=U,this._computationHandles=new s,this._externalObserverUpdate=!0}initialize(){const e=this.view.resourceController?.scheduler;this._frameTask=e?e.registerTask(k.LINE_OF_SIGHT_TOOL):U,this._intersector=new D({view:this.view}),this.addHandles([this._connectObserver(),this._connectComputations(),this._connectTargets()])}destroy(){this._computationHandles.destroy(),this._computations.removeAll(),this._updatingHandles.destroy()}get updating(){return this._frameTask.updating||this._updatingHandles.updating}get priority(){return this._frameTask.priority}set priority(e){this._frameTask.priority=e}get _computations(){return this.analysisViewData.computations}get _elevationAlignedObserverPositionRenderSpace(){return this.analysisViewData.observerEngineLocation}set _elevationAlignedObserverPositionRenderSpace(e){this.analysisViewData.observerEngineLocation=e}get _screenPixelSize(){return this.view.state.camera.computeScreenPixelSizeAt(this._elevationAlignedObserverPositionRenderSpace)}_computeResult(e){const t=e.computation,{inputPoints:o,computationResult:n}=t,{observerAdjusted:i,targetAdjusted:r}=o,{start:s,end:a}=n;v(s,i),v(a,r);this._canCompute(t)?this._computeIntersection(e):Z(e),t.notifyResultChanged(),this.emit("result-changed",{target:e.computation.target,result:t.result})}_adjustStartEndPositions(e){const{view:o}=this,{inputPoints:n}=e,{observer:i,target:r,observerAdjusted:s,targetAdjusted:a}=n;v(s,i),v(a,r),t(o,this._intersector.intersector,n);const{observerSurfaceNormal:l,targetSurfaceNormal:u}=n,c=this._screenPixelSize,d=J;null!=l?v(d,l):f(d,a,s);const p=c;_(d,d),b(d,d,Math.min(p,1)),y(s,s,d),null!=u?v(d,u):f(d,s,a);const g=o.state.camera.computeScreenPixelSizeAt(a);_(d,d),b(d,d,Math.min(g,1)),y(a,a,d)}_computeIntersection({computation:e,interpolationInfo:t}){const{view:o}=this,{sceneIntersectionHelper:n,renderCoordsHelper:i}=o;if(null==n)return;const r=this._intersector.intersector,{computationResult:s,inputPoints:a}=e,{observer:l,target:u}=a,{start:c,end:d}=s,p=E(c,d,K);r.options.store=N.MIN,n.intersectToolIntersectorRay(p,r);const g=r.results.min,h=s.intersection,m=J;let f=!0;if(null!=g&&g.getIntersectionPoint(h)){v(t.originalIntersection,h),v(t.originalObserver,c),v(t.originalTarget,d),i.fromRenderCoords(h,m,o.spatialReference);const e=1-C(d,u)/C(c,u);f=C(l,h)>=e*C(l,u)}const _=new P(m,o.spatialReference);{const{result:t,target:n}=e;null!=t?(t.target=n,t.intersectedGraphic=f?null:z(g,o),t.intersectedLocation=f?null:_,t.visible=f):e.result=new F({target:n,elevationAlignedTargetLocation:e.elevationAlignedTargetLocation,intersectedGraphic:f?null:z(g,o),intersectedLocation:f?null:_,visible:f})}s.isValid=a.isValid=!0,s.isTargetVisible=f}_canCompute(e){const t=this.analysisViewData.elevationAlignedObserver,o=this.view.frustum;if(null==t||null==e.elevationAlignedTargetLocation||null==o)return!1;const{observerAdjusted:n,targetAdjusted:i}=e.inputPoints,r=o.intersectsPoint(n),s=o.intersectsPoint(i);return r&&s}_onObserverPositionChange(e,t,n,i,r){if(this._externalObserverUpdate=r,null==e)return this.analysisViewData.elevationAlignedObserver=null,void(this._observerFeatureId=null);if(null==t)return G(this.analysis,e.spatialReference,u.getLogger(this)),void(this.analysisViewData.elevationAlignedObserver=null);const s=B(t,n),{absoluteZ:a,elevation:l}=V(t.x,t.y,t.z,this.view.spatialReference,this.view,s),c=t.clone();c.z=a,this._effectiveObserverElevationMode=s.mode,this.analysisViewData.elevationAlignedObserver=c;const d=O();this.view.renderCoordsHelper.toRenderCoords(c,d),this._elevationAlignedObserverPositionRenderSpace=d,this._observerGroundOffsetRenderSpace=a-l,this._observerFeatureId=o(i),this.priority=k.LINE_OF_SIGHT_TOOL_INTERACTIVE}_onObserverRenderSpacePositionChangeForComputation(e,t,o,n,i){const{inputPoints:r}=e;switch(v(r.observer,t),r.observerFeatureId=i,r.observerSurfaceNormal=null,n){case"on-the-ground":case"relative-to-ground":{const e=this._intersector.updateFromGroundIntersection(r.observer,o,r.observer);null==r.observerFeatureId&&(r.observerSurfaceNormal=e)}}this._adjustStartEndPositions(e),e.notifyInputPointsChanged(),this.priority=k.LINE_OF_SIGHT_TOOL_INTERACTIVE}_onTargetPositionChange(e,t,n,i,r,s=!0){const a=e.inputPoints;if(s&&(a.isValid=!1),null==n)return null!=t&&G(this.analysis,t.spatialReference,u.getLogger(this)),e.elevationAlignedTargetLocation=null,void e.notifyInputPointsChanged();const l=B(n,i),{absoluteZ:c,elevation:d}=V(n.x,n.y,n.z,this.view.spatialReference,this.view,l),p=n.clone();switch(p.z=c,e.elevationAlignedTargetLocation=p,this.view.renderCoordsHelper.toRenderCoords(e.elevationAlignedTargetLocation,a.target),a.targetFeatureId=o(r),a.targetSurfaceNormal=null,l.mode){case"on-the-ground":case"relative-to-ground":{const e=this._intersector.updateFromGroundIntersection(a.target,c-d,a.target);null==a.targetFeatureId&&(a.targetSurfaceNormal=e)}}this._adjustStartEndPositions(e),e.notifyInputPointsChanged(),this.priority=k.LINE_OF_SIGHT_TOOL_INTERACTIVE}_connectComputationToTarget(e){return a([this._updatingHandles.add((()=>({computation:e,targetPosition:e.target.position,targetElevationInfo:e.target.elevationInfo,targetFeatureInfo:e.target.feature,projectedTargetPosition:j(e.target.position,this.view.spatialReference)})),(({computation:e,targetPosition:t,targetElevationInfo:o,targetFeatureInfo:n,projectedTargetPosition:i})=>{null==i.pending?this._onTargetPositionChange(e,t,i.geometry,o,n):this._updatingHandles.addPromise(i.pending)}),p)])}_connectComputationToObserver(e){return this._updatingHandles.add((()=>({computation:e,observer:this.analysisViewData.elevationAlignedObserver})),(({computation:e})=>{this._externalObserverUpdate&&(e.inputPoints.isValid=!1,e.notifyInputPointsChanged())}),p)}_connectComputationToRenderSpaceObserver(e){return this._updatingHandles.add((()=>({computation:e,observer:this._elevationAlignedObserverPositionRenderSpace,observerGroundOffset:this._observerGroundOffsetRenderSpace,observerElevationMode:this._effectiveObserverElevationMode,observerFeatureId:this._observerFeatureId})),(({computation:e,observer:t,observerGroundOffset:o,observerElevationMode:n,observerFeatureId:i})=>{this._onObserverRenderSpacePositionChangeForComputation(e,t,o,n,i)}),p)}_connectComputationToCamera(e){return this._updatingHandles.add((()=>({camera:this.view.state.camera,isDirty:this._isCameraDirty})),(({isDirty:t})=>{!this.updateOnCameraChange||e.inputPoints.isValid&&!t||e.notifyInputPointsChanged()}))}_connectComputationToSlicePlane(e){return this._updatingHandles.add((()=>this.view.slice.plane),(()=>{e.inputPoints.isValid=!1,e.notifyInputPointsChanged()}))}_connectComputationToElevation(e){const t=(o,n)=>{const i=this.analysis.observer,r=e.target;let s=null,a=null,l=null,u=null,c=null,d=null;if(null!=i?.position){const e=j(i.position,this.view.spatialReference);if(null!=e.pending)return this._updatingHandles.addPromise(e.pending),void e.pending.finally((()=>t(o,n)));s=e.geometry,a=i.elevationInfo,l=i.feature}if(null!=r.position){const e=j(r.position,this.view.spatialReference);if(null!=e.pending)return this._updatingHandles.addPromise(e.pending),void e.pending.finally((()=>t(o,n)));u=e.geometry,c=r.elevationInfo,d=r.feature}null==s&&null==u||(S(o,n,Q,this.view.spatialReference),null!=s&&A(Q,s)&&this._onObserverPositionChange(null!=i?i.position:null,s,a,l,!1),null!=u&&A(Q,u)&&this._onTargetPositionChange(e,r.position,u,c,d,!1),null!=s&&null!=u&&H(Q,s,u)&&e.notifyInputPointsChanged())};return this.view.elevationProvider.on("elevation-change",(({extent:e,spatialReference:o})=>t(e,o)))}_connectComputationToTask(e){let t=null;const o={computation:e,interpolationInfo:{originalIntersection:O(),originalObserver:O(),originalTarget:O()}};return a([this._updatingHandles.add((()=>e.inputPoints),(()=>{t=c(t),t=i((async e=>{await d(this._frameTask.schedule((()=>this._computeResult(o)),e))}))}),{initial:!0,equals:()=>!1}),l((()=>t=c(t)))])}_connectComputationToContent(e){return g((()=>this.view.pointsOfInterest?.contentGeometryUpdates.events),"request-update",(t=>{const o=t?.renderBounds,{observerAdjusted:n,targetAdjusted:i}=e.inputPoints;(null==o||w(o,n,i))&&(e.inputPoints.isValid=!1,e.notifyInputPointsChanged())}))}_connectComputation(e){const t=this._computationHandles;t.has(e)||t.add([this._connectComputationToTarget(e),this._connectComputationToObserver(e),this._connectComputationToRenderSpaceObserver(e),this._connectComputationToCamera(e),this._connectComputationToSlicePlane(e),this._connectComputationToElevation(e),this._connectComputationToTask(e),this._connectComputationToContent(e)],e)}_disconnectComputation(e){this._computationHandles.remove(e)}_onComputationCollectionChange({added:e,removed:t}){for(const o of t)this._disconnectComputation(o);for(const o of e)this._connectComputation(o)}_onTargetCollectionChange({added:e,removed:t}){for(const o of t)this._removeTarget(o);for(const o of e)this._addTarget(o)}_onCursorTargetChange(e,t){null!=t&&this._removeTarget(t),null!=e&&this._addTarget(e)}_addTarget(e){this._computations.some((t=>t.target===e))||this._computations.add(new x({target:e}))}_removeTarget(e){const t=this._computations.findIndex((t=>t.target===e));this._computations.removeAt(t)}_connectObserver(){return a([this._updatingHandles.add((()=>({observerPosition:null!=this.analysis.observer?this.analysis.observer.position:null,projectedObserverPosition:j(null!=this.analysis.observer?this.analysis.observer.position:null,this.view.spatialReference),observerElevationInfo:null!=this.analysis.observer?this.analysis.observer.elevationInfo:null,observerFeatureInfo:null!=this.analysis.observer?this.analysis.observer.feature:null})),(({observerPosition:e,projectedObserverPosition:t,observerElevationInfo:o,observerFeatureInfo:n})=>{null==t.pending?this._onObserverPositionChange(e,t.geometry,o,n,!0):this._updatingHandles.addPromise(t.pending)}),p)])}_connectComputations(){return this._updatingHandles.addOnCollectionChange((()=>this._computations),(e=>this._onComputationCollectionChange(e)),{initial:!0,final:!0})}_connectTargets(){return a([this._updatingHandles.addOnCollectionChange((()=>this.analysis.targets),(e=>this._onTargetCollectionChange(e)),{initial:!0,final:!0}),this._updatingHandles.add((()=>this.analysisViewData.cursorTarget),((e,t)=>{this._onCursorTargetChange(e,t)}))])}get _isCameraDirty(){const e=this.analysisViewData.elevationAlignedObserver,{view:t}=this,{renderCoordsHelper:o}=t;if(null==e||null==o)return!1;const n=J;o.toRenderCoords(e,n);const i=t.state.camera.computeScreenPixelSizeAt(n);return Math.abs((i-this._screenPixelSize)/this._screenPixelSize)>q}};function B(e,t){return e.hasZ?t??{mode:"absolute-height",offset:0}:{mode:"on-the-ground",offset:0}}function Z({computation:e,interpolationInfo:t}){const{computationResult:o,inputPoints:n}=e,{start:i,end:r,intersection:s}=o,{originalIntersection:a,originalObserver:l,originalTarget:u}=t;if(v(s,a),n.isValid){const e=J,t=C(l,a)/C(l,u);T(e,i,l),b(e,e,1-t),y(s,s,e),T(e,r,u),b(e,e,t),y(s,s,e),o.isValid=!0}else e.result=null,o.isValid=!1,o.isTargetVisible=!1}e([h({constructOnly:!0})],M.prototype,"analysis",void 0),e([h({constructOnly:!0})],M.prototype,"analysisViewData",void 0),e([h({constructOnly:!0})],M.prototype,"view",void 0),e([h()],M.prototype,"updating",null),e([h()],M.prototype,"priority",null),e([h()],M.prototype,"updateOnCameraChange",void 0),e([h()],M.prototype,"_computations",null),e([h()],M.prototype,"_elevationAlignedObserverPositionRenderSpace",null),e([h()],M.prototype,"_observerGroundOffsetRenderSpace",void 0),e([h()],M.prototype,"_effectiveObserverElevationMode",void 0),e([h()],M.prototype,"_observerFeatureId",void 0),e([h()],M.prototype,"_screenPixelSize",null),e([h({readOnly:!0})],M.prototype,"_updatingHandles",void 0),e([h()],M.prototype,"_frameTask",void 0),e([h()],M.prototype,"_isCameraDirty",null),M=e([m("esri.views.3d.analysis.LineOfSight.LineOfSightController")],M);const q=.1,J=O(),K=L(),Q=R();export{M as LineOfSightController};
|
|
@@ -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 n,g as a,e as m}from"../../../../chunks/vec32.js";import{ConstraintOptions as t}from"./ConstraintOptions.js";import{ConstraintTypes as i}from"./ConstraintTypes.js";function o(n,a){return
|
|
5
|
+
import{c as n,g as a,e as m}from"../../../../chunks/vec32.js";import{ConstraintOptions as t}from"./ConstraintOptions.js";import{ConstraintTypes as i}from"./ConstraintTypes.js";function o(n,a){return 0!==(n&a)}function r(n,a,m,t,i,o){0!==n&&(m?(o.min=Math.min(o.min,a),o.max=Math.max(o.max,a)):null!=t?(o.min-=Math.max(0,(a-o.min)*(1-t)),o.max+=Math.max(0,(a-o.max)*(1-t))):i&&(o.min-=Math.max(0,a-o.min-i),o.max+=Math.max(0,a-o.max-i)))}const s=new t(i.NONE);function x(t,i,o,r){return i=i||t.viewForward,n(r,i),a(r,r,Math.sign(m(i,o))),r}export{r as adjustRangeForInteraction,s as defaultConstraintOptions,o as hasConstraintType,x as interactionDirectionTowardsConstraintMinimization};
|
|
@@ -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{neverReached as e}from"../../../core/compilerUtils.js";import t from"../../../core/Evented.js";import{makeHandle as i}from"../../../core/handleUtils.js";import"../../../core/has.js";import{deg2rad as s}from"../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../core/maybe.js";import{createRenderScreenPointArray3 as r,createScreenPointArray as n,screenPointObjectToArray as a,castRenderScreenPointArray as c}from"../../../core/screenUtils.js";import{fromMat4 as l}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as d,set as _,multiply as u,identity as g}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{squaredDistance as f}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{f as p,o as b,t as v,g as y,c as j,s as L,i as S,d as w}from"../../../chunks/vec32.js";import{create as O,ZEROS as R}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as T}from"../../../geometry/ellipsoidUtils.js";import A from"../../../geometry/Point.js";import{canProjectWithoutEngine as E,projectPoint as D}from"../../../geometry/projection.js";import{computeENUToPCPFLocalRotation as F}from"../../../geometry/projection/localRotationUtils.js";import{sphericalPCPFtoLonLatElevation as z}from"../../../geometry/projection/projectors.js";import{containsPointObject as P}from"../../../geometry/support/aaBoundingRect.js";import{distance2 as C,fromPoints as x,create as M,closestRayDistance2 as k}from"../../../geometry/support/lineSegment.js";import{fromPositionAndNormal as I,create as U,intersectRay as W}from"../../../geometry/support/plane.js";import{create as B}from"../../../geometry/support/ray.js";import{sv3d as N}from"../../../geometry/support/vectorStacks.js";import{clonePoint as H,hydratedSpatialReference as q}from"../../../layers/graphics/hydratedFeatures.js";import{getElevationOffset as G}from"../../../support/elevationInfoUtils.js";import{getElevationAtPoint as V}from"../support/ElevationProvider.js";import{fromScreen as Y}from"../support/geometryUtils/ray.js";import J from"../webgl/RenderCamera.js";import{Object3D as K}from"../webgl-engine/lib/Object3D.js";import{UpdatePolicy as Q}from"../webgl-engine/lib/UpdatePolicy.js";import{WebGLLayer as X}from"../webgl-engine/lib/WebGLLayer.js";import{ManipulatorStateCustomFlags as Z,ManipulatorStateFlags as $}from"../../interactive/interfaces.js";class ee{constructor(e){this.metadata=void 0,this._camera=new J,this._elevation={offset:0,override:null},this.collisionType={type:"point"},this.collisionPriority=0,this._renderObjects=new Array,this.autoScaleRenderObjects=!0,this._available=!0,this._noDisplayCount=0,this._radius=10,this._worldSized=!1,this.focusMultiplier=2,this.touchMultiplier=2.5,this.worldOriented=!1,this._modelTransform=m(),this._worldFrame=null,this._renderLocation=O(),this._renderLocationDirty=!0,this._location=new A({x:0,y:0,z:0}),this._elevationAlignedLocation=new A,this._elevationAlignedLocationDirty=!0,this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.consumesClicks=!0,this.cursor=null,this.grabCursor=null,this._grabbing=!1,this.dragging=!1,this._hovering=!1,this._selected=!1,this._state=Z.None,this._focused=!1,this.events=new t.EventEmitter,this._screenLocation={screenPointArray:n(),renderScreenPointArray:r(),pixelSize:0},this._screenLocationDirty=!0,this._engineResourcesAddedToStage=!1,this._attached=!1,this._location.spatialReference=e.view.spatialReference,Object.assign(this,e);const i=this.view.state?.camera;i&&this._camera.copyFrom(i)}destroy(){this._applyObjectTransform=pe,this._removeResourcesFromStage(),this._engineResources=null,this.view=null,this._camera=null}get _stage(){return this.view?.stage}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this._elevationAlignedLocationDirty=!0,this._renderLocationDirty=!0,this._updateEngineObject()}get renderObjects(){return this._renderObjects}set renderObjects(e){this._removeResourcesFromStage(),this._engineResources=null,this._renderObjects=e.slice(),this._updateEngineObject()}set available(e){e!==this._available&&(this._available=e,this._updateEngineObject())}get available(){return this._available}disableDisplay(){return this._noDisplayCount++,1===this._noDisplayCount&&this._updateEngineObject(),i((()=>{this._noDisplayCount--,0===this._noDisplayCount&&this._updateEngineObject()}))}set radius(e){e!==this._radius&&(this._radius=e,this._updateEngineObject())}get radius(){return this._radius}set worldSized(e){e!==this._worldSized&&(this._worldSized=e,this._updateEngineObject())}get worldSized(){return this._worldSized}get modelTransform(){return this._modelTransform}set modelTransform(e){te(e)&&(this._screenLocationDirty=!0),d(this._modelTransform,e),this._updateEngineObject()}get renderLocation(){return this._renderLocationDirty&&(this._renderLocationDirty=!1,this.view.renderCoordsHelper.toRenderCoords(this.elevationAlignedLocation,this._renderLocation),this.worldOriented?(this._worldFrame||(this._worldFrame=m()),ie(this.view,this._renderLocation,this._worldFrame)):this._worldFrame&&(this._worldFrame=null)),this._renderLocation}set renderLocation(e){this.view.renderCoordsHelper.fromRenderCoords(e,this._location),this.elevationAlignedLocation=this._location}get location(){return this._location}set location(e){H(e,this._location),this._notifyLocationChanged()}_notifyLocationChanged(){this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!0,this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}get elevationAlignedLocation(){return this._elevationAlignedLocationDirty?(this._evaluateElevationAlignment(),this._updateElevationAlignedLocation(),this._elevationAlignedLocation):this._elevationAlignedLocation}set elevationAlignedLocation(e){H(e,this._location),this._evaluateElevationAlignment(),this._location.z-=this._elevation.offset,this._updateElevationAlignedLocation(),this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}_updateElevationAlignedLocation(){const e=null!=this._elevation.override?this._elevation.override:this.location.z||0;this._elevationAlignedLocation.x=this.location.x,this._elevationAlignedLocation.y=this.location.y,this._elevationAlignedLocation.z=e+this._elevation.offset,this._elevationAlignedLocation.spatialReference=q(this.location.spatialReference),this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!1}grabbableForEvent(){return!0}get grabbing(){return this._grabbing}set grabbing(e){e!==this._grabbing&&(this._grabbing=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get hovering(){return this._hovering}set hovering(e){e!==this._hovering&&(this._hovering=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get selected(){return this._selected}set selected(e){e!==this._selected&&(this._selected=e,this._updateEngineObject(),this.events.emit("select-changed",{action:e?"select":"deselect"}))}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,this._updateEngineObject())}updateStateEnabled(e,t){t?this.state|=e:this.state&=~e}_setFocused(e){e!==this._focused&&(this._focused=e,this.events.emit("focus-changed",{action:!0===e?"focus":"unfocus"}))}get focused(){return this._focused}get screenLocation(){return this._ensureScreenLocation(),this._screenLocation}_ensureScreenLocation(){if(!this._screenLocationDirty)return;this._screenLocation.pixelSize=this._camera.computeScreenPixelSizeAt(this.renderLocation),this._screenLocationDirty=!1;let e;if(te(this._modelTransform)){const t=this._calculateModelTransformOffset(me);e=p(t,t,this.renderLocation)}else e=this.renderLocation;this._camera.projectToRenderScreen(e,this._screenLocation.renderScreenPointArray),this._camera.renderToScreen(this._screenLocation.renderScreenPointArray,this._screenLocation.screenPointArray)}get applyObjectTransform(){return this._applyObjectTransform}set applyObjectTransform(e){this._applyObjectTransform=e,this._screenLocationDirty=!0,this._updateEngineObject()}get attached(){return this._attached}intersectionDistance(t,i){if(!this.available)return null;const s=a(t,se),o=this._getCollisionRadius(i),r=-1*this.collisionPriority;switch(this.collisionType.type){case"point":if(f(this.screenLocation.screenPointArray,s)<o*o)return this.screenLocation.renderScreenPointArray[2]+r;break;case"line":{const e=this.collisionType.paths,t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,ce),n=o*this.screenLocation.pixelSize,a=Y(this._camera,s,re);if(null==a)return null;for(const s of e){if(0===s.length)continue;const e=v(he,s[0],i);for(let t=1;t<s.length;t++){const o=v(de,s[t],i),l=k(x(e,o,oe),a);if(null!=l&&l<n*n){const t=p(N.get(),e,o);y(t,t,.5);const i=c(N.get());return this._camera.projectToRenderScreen(t,i),i[2]+r}j(e,o)}}break}case"disc":{const e=this.collisionType.direction,t=this.collisionType.offset??R,i=this._getWorldToScreenObjectScale(),n=this._calculateObjectTransform(i,ce),a=o*this.screenLocation.pixelSize,c=Y(this._camera,s,re);if(null==c)return null;const h=l(ne,n),d=b(ue,e,h),_=v(ge,t,n);I(_,d,le);const u=_e;if(W(le,c,u)&&L(u,_)<a*a)return this.screenLocation.renderScreenPointArray[2]+r;break}case"ribbon":{const{paths:e,direction:t}=this.collisionType,i=this._getWorldToScreenObjectScale(),n=this._calculateObjectTransform(i,ce),a=o*this._camera.computeScreenPixelSizeAt(this.renderLocation),h=Y(this._camera,s,re);if(null==h)return null;const d=l(ne,n),_=b(ue,t,d),u=this._calculateModelTransformPosition(ge);I(u,_,le);const g=_e;if(!W(le,h,g))break;for(const s of e){if(0===s.length)continue;const e=v(he,s[0],n);for(let t=1;t<s.length;t++){const i=v(de,s[t],n),o=C(x(e,i,oe),g);if(null!=o&&o<a*a){const t=p(N.get(),e,i);y(t,t,.5);const s=c(N.get());return this._camera.projectToRenderScreen(t,s),s[2]+r}j(e,i)}}break}default:e(this.collisionType)}return null}attach(e={manipulator3D:{}}){const t=this._stage;if(!t)return;const i=e.manipulator3D;null==i.engineLayerId?(this._engineLayer=new X(t,{pickable:!1,updatePolicy:Q.SYNC}),i.engineLayerId=this._engineLayer.id):t?.getLayer&&(this._engineLayer=t.getLayer(i.engineLayerId)),i.engineLayerReferences=(i.engineLayerReferences||0)+1,this._camera.copyFrom(this.view.state.camera),this._attached=!0,this._updateEngineObject(),E(this._location.spatialReference,this.view.spatialReference)||(this.location=new A({x:0,y:0,z:0,spatialReference:this.view.spatialReference}))}detach(e={manipulator3D:{}}){const t=e.manipulator3D;t.engineLayerReferences--;const i=0===t.engineLayerReferences;this._removeResourcesFromStage(),i&&(t.engineLayerId=null,o(this._engineLayer)),this._engineResources=null,this._engineLayer=null,this._attached=!1}onViewChange(){this._camera.copyFrom(this.view.state.camera),this._screenLocationDirty=!0,this._updateEngineObject()}onElevationChange(e){D(this.location,fe,e.spatialReference)&&P(e.extent,fe)&&this._notifyLocationChanged()}_evaluateElevationAlignment(){if(null==this.elevationInfo)return;let e=null,t=0;const i=G(this.elevationInfo,this.location.spatialReference??this.view.elevationProvider.spatialReference);switch(this.elevationInfo.mode){case"on-the-ground":e=V(this.view.elevationProvider,this.location,"ground")??0;break;case"relative-to-ground":t=(V(this.view.elevationProvider,this.location,"ground")??0)+i;break;case"relative-to-scene":t=(V(this.view.elevationProvider,this.location,"scene")??0)+i;break;case"absolute-height":t=i}return t!==this._elevation.offset||e!==this._elevation.override?(this._elevation.offset=t,void(this._elevation.override=e)):void 0}_updateEngineObject(){if(!this._attached)return;if(!this.available)return void this._removeResourcesFromStage();const e=this._getWorldToScreenObjectScale(),t=ce;if(!0===this.autoScaleRenderObjects){const i=this._getFocusedSize(this._radius,this.focused)*e;this._calculateObjectTransform(i,t)}else this._calculateObjectTransform(e,t);const{objectsByState:i}=this._ensureEngineResources(),s=(this.focused?$.Focused:$.Unfocused)|(this.selected?$.Selected:$.Unselected),o=this._noDisplayCount>0;for(const{stateMask:r,objects:n}of i){if(o){for(const e of n)e.visible=!1;continue}const e=(r&$.All)!==$.None,i=(r&Z.All)!==Z.None,a=!e||(s&r)==(r&$.All),c=!i||(this.state&r)==(r&Z.All);if(a&&c)for(const s of n)s.visible=!0,s.transformation=t;else for(const t of n)t.visible=!1}}_ensureEngineResources(){if(null==this._engineResources){const e=this._engineLayer,t=[],i=new Set;this.renderObjects.forEach((({geometry:{material:e}})=>{i.has(e)||(t.push(e),i.add(e))}));const s=new Map;this._renderObjects.forEach((e=>{const t=new K({castShadow:!1,geometries:[e.geometry]}),i=s.get(e.stateMask)||[];i.push(t),s.set(e.stateMask,i)}));const o=[];s.forEach(((e,t)=>o.push({stateMask:t,objects:e}))),this._engineResources={objectsByState:o,layer:e,materials:t}}return this._addResourcesToStage(),this._engineResources}_addResourcesToStage(){const e=this._stage;if(this._engineResourcesAddedToStage||null==this._engineResources||!e)return;const{objectsByState:t,layer:i}=this._engineResources;t.forEach((({objects:e})=>i.addMany(e))),this._engineResourcesAddedToStage=!0}_removeResourcesFromStage(){const e=this._stage;if(!this._engineResourcesAddedToStage||null==this._engineResources||!e)return;const{objectsByState:t,layer:i}=this._engineResources;t.forEach((({objects:e})=>i.removeMany(e))),this._engineResourcesAddedToStage=!1}_getCollisionRadius(e){return this._getFocusedSize(this.radius,!0)*("touch"===e?this.touchMultiplier:1)}_getFocusedSize(e,t){return e*(t?this.focusMultiplier:1)}_getWorldToScreenObjectScale(){return this._worldSized?1:this.screenLocation.pixelSize}_calculateModelTransformPosition(e){const t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,ae);return S(e,i[12],i[13],i[14])}_calculateModelTransformOffset(e){const t=this._calculateModelTransformPosition(e);return w(e,t,this.renderLocation)}_calculateObjectTransform(e,t){return _(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1),this._worldFrame&&u(t,t,this._worldFrame),u(t,t,this._modelTransform),t[12]+=this.renderLocation[0],t[13]+=this.renderLocation[1],t[14]+=this.renderLocation[2],t[15]=1,null!=this._applyObjectTransform&&this._applyObjectTransform(t),t}get test(){}}function te(e){return 0!==e[12]||0!==e[13]||0!==e[14]}function ie(e,t,i){switch(e.viewingMode){case"local":return g(i),!0;case"global":{const o=T(e.renderCoordsHelper.spatialReference);return z(t,0,he,0,o.radius),F(s(he[0]),s(he[1]),i),!0}}}const se=n(),oe=M(),re=B(),ne=h(),ae=m(),ce=m(),le=U(),he=O(),de=O(),_e=O(),ue=O(),ge=O(),me=O(),fe=new A({x:0,y:0,z:0,spatialReference:null}),pe=()=>{};export{ee as Manipulator3D};
|
|
5
|
+
import{neverReached as e}from"../../../core/compilerUtils.js";import t from"../../../core/Evented.js";import{makeHandle as i}from"../../../core/handleUtils.js";import"../../../core/has.js";import{deg2rad as s}from"../../../core/mathUtils.js";import{destroyMaybe as o}from"../../../core/maybe.js";import{createRenderScreenPointArray3 as r,createScreenPointArray as n,screenPointObjectToArray as a,castRenderScreenPointArray as c}from"../../../core/screenUtils.js";import{fromMat4 as l}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as d,set as _,multiply as u,identity as g}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{squaredDistance as f}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{f as p,o as b,t as v,g as y,c as j,s as L,i as S,d as w}from"../../../chunks/vec32.js";import{create as O,ZEROS as R}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as T}from"../../../geometry/ellipsoidUtils.js";import A from"../../../geometry/Point.js";import{canProjectWithoutEngine as E,projectPoint as D}from"../../../geometry/projection.js";import{computeENUToPCPFLocalRotation as F}from"../../../geometry/projection/localRotationUtils.js";import{sphericalPCPFtoLonLatElevation as z}from"../../../geometry/projection/projectors.js";import{containsPointObject as P}from"../../../geometry/support/aaBoundingRect.js";import{distance2 as C,fromPoints as x,create as M,closestRayDistance2 as k}from"../../../geometry/support/lineSegment.js";import{fromPositionAndNormal as I,create as U,intersectRay as W}from"../../../geometry/support/plane.js";import{create as B}from"../../../geometry/support/ray.js";import{sv3d as N}from"../../../geometry/support/vectorStacks.js";import{clonePoint as H,hydratedSpatialReference as q}from"../../../layers/graphics/hydratedFeatures.js";import{getElevationOffset as G}from"../../../support/elevationInfoUtils.js";import{getElevationAtPoint as V}from"../support/ElevationProvider.js";import{fromScreen as Y}from"../support/geometryUtils/ray.js";import J from"../webgl/RenderCamera.js";import{Object3D as K}from"../webgl-engine/lib/Object3D.js";import{UpdatePolicy as Q}from"../webgl-engine/lib/UpdatePolicy.js";import{WebGLLayer as X}from"../webgl-engine/lib/WebGLLayer.js";import{ManipulatorStateCustomFlags as Z,ManipulatorStateFlags as $}from"../../interactive/interfaces.js";class ee{constructor(e){this.metadata=void 0,this._camera=new J,this._elevation={offset:0,override:null},this.collisionType={type:"point"},this.collisionPriority=0,this._renderObjects=new Array,this.autoScaleRenderObjects=!0,this._available=!0,this._noDisplayCount=0,this._radius=10,this._worldSized=!1,this.focusMultiplier=2,this.touchMultiplier=2.5,this.worldOriented=!1,this._modelTransform=m(),this._worldFrame=null,this._renderLocation=O(),this._renderLocationDirty=!0,this._location=new A({x:0,y:0,z:0}),this._elevationAlignedLocation=new A,this._elevationAlignedLocationDirty=!0,this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.consumesClicks=!0,this.cursor=null,this.grabCursor=null,this._grabbing=!1,this.dragging=!1,this._hovering=!1,this._selected=!1,this._state=Z.None,this._focused=!1,this.events=new t.EventEmitter,this._screenLocation={screenPointArray:n(),renderScreenPointArray:r(),pixelSize:0},this._screenLocationDirty=!0,this._engineResourcesAddedToStage=!1,this._attached=!1,this._location.spatialReference=e.view.spatialReference,Object.assign(this,e);const i=this.view.state?.camera;i&&this._camera.copyFrom(i)}destroy(){this._applyObjectTransform=pe,this._removeResourcesFromStage(),this._engineResources=null,this.view=null,this._camera=null}get _stage(){return this.view?.stage}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this._elevationAlignedLocationDirty=!0,this._renderLocationDirty=!0,this._updateEngineObject()}get renderObjects(){return this._renderObjects}set renderObjects(e){this._removeResourcesFromStage(),this._engineResources=null,this._renderObjects=e.slice(),this._updateEngineObject()}set available(e){e!==this._available&&(this._available=e,this._updateEngineObject())}get available(){return this._available}disableDisplay(){return this._noDisplayCount++,1===this._noDisplayCount&&this._updateEngineObject(),i((()=>{this._noDisplayCount--,0===this._noDisplayCount&&this._updateEngineObject()}))}set radius(e){e!==this._radius&&(this._radius=e,this._updateEngineObject())}get radius(){return this._radius}set worldSized(e){e!==this._worldSized&&(this._worldSized=e,this._updateEngineObject())}get worldSized(){return this._worldSized}get modelTransform(){return this._modelTransform}set modelTransform(e){te(e)&&(this._screenLocationDirty=!0),d(this._modelTransform,e),this._updateEngineObject()}get renderLocation(){return this._renderLocationDirty&&(this._renderLocationDirty=!1,this.view.renderCoordsHelper.toRenderCoords(this.elevationAlignedLocation,this._renderLocation),this.worldOriented?(this._worldFrame||(this._worldFrame=m()),ie(this.view,this._renderLocation,this._worldFrame)):this._worldFrame&&(this._worldFrame=null)),this._renderLocation}set renderLocation(e){this.view.renderCoordsHelper.fromRenderCoords(e,this._location),this.elevationAlignedLocation=this._location}get location(){return this._location}set location(e){H(e,this._location),this._notifyLocationChanged()}_notifyLocationChanged(){this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!0,this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}get elevationAlignedLocation(){return this._elevationAlignedLocationDirty?(this._evaluateElevationAlignment(),this._updateElevationAlignedLocation(),this._elevationAlignedLocation):this._elevationAlignedLocation}set elevationAlignedLocation(e){H(e,this._location),this._evaluateElevationAlignment(),this._location.z-=this._elevation.offset,this._updateElevationAlignedLocation(),this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}_updateElevationAlignedLocation(){const e=null!=this._elevation.override?this._elevation.override:this.location.z||0;this._elevationAlignedLocation.x=this.location.x,this._elevationAlignedLocation.y=this.location.y,this._elevationAlignedLocation.z=e+this._elevation.offset,this._elevationAlignedLocation.spatialReference=q(this.location.spatialReference),this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!1}grabbableForEvent(){return!0}get grabbing(){return this._grabbing}set grabbing(e){e!==this._grabbing&&(this._grabbing=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get hovering(){return this._hovering}set hovering(e){e!==this._hovering&&(this._hovering=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get selected(){return this._selected}set selected(e){e!==this._selected&&(this._selected=e,this._updateEngineObject(),this.events.emit("select-changed",{action:e?"select":"deselect"}))}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,this._updateEngineObject())}updateStateEnabled(e,t){t?this.state|=e:this.state&=~e}_setFocused(e){e!==this._focused&&(this._focused=e,this.events.emit("focus-changed",{action:!0===e?"focus":"unfocus"}))}get focused(){return this._focused}get screenLocation(){return this._ensureScreenLocation(),this._screenLocation}_ensureScreenLocation(){if(!this._screenLocationDirty)return;this._screenLocation.pixelSize=this._camera.computeScreenPixelSizeAt(this.renderLocation),this._screenLocationDirty=!1;let e;if(te(this._modelTransform)){const t=this._calculateModelTransformOffset(me);e=p(t,t,this.renderLocation)}else e=this.renderLocation;this._camera.projectToRenderScreen(e,this._screenLocation.renderScreenPointArray),this._camera.renderToScreen(this._screenLocation.renderScreenPointArray,this._screenLocation.screenPointArray)}get applyObjectTransform(){return this._applyObjectTransform}set applyObjectTransform(e){this._applyObjectTransform=e,this._screenLocationDirty=!0,this._updateEngineObject()}get attached(){return this._attached}intersectionDistance(t,i){if(!this.available)return null;const s=a(t,se),o=this._getCollisionRadius(i),r=-1*this.collisionPriority;switch(this.collisionType.type){case"point":if(f(this.screenLocation.screenPointArray,s)<o*o)return this.screenLocation.renderScreenPointArray[2]+r;break;case"line":{const e=this.collisionType.paths,t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,ce),n=o*this.screenLocation.pixelSize,a=Y(this._camera,s,re);if(null==a)return null;for(const s of e){if(0===s.length)continue;const e=v(he,s[0],i);for(let t=1;t<s.length;t++){const o=v(de,s[t],i),l=k(x(e,o,oe),a);if(null!=l&&l<n*n){const t=p(N.get(),e,o);y(t,t,.5);const i=c(N.get());return this._camera.projectToRenderScreen(t,i),i[2]+r}j(e,o)}}break}case"disc":{const e=this.collisionType.direction,t=this.collisionType.offset??R,i=this._getWorldToScreenObjectScale(),n=this._calculateObjectTransform(i,ce),a=o*this.screenLocation.pixelSize,c=Y(this._camera,s,re);if(null==c)return null;const h=l(ne,n),d=b(ue,e,h),_=v(ge,t,n);I(_,d,le);const u=_e;if(W(le,c,u)&&L(u,_)<a*a)return this.screenLocation.renderScreenPointArray[2]+r;break}case"ribbon":{const{paths:e,direction:t}=this.collisionType,i=this._getWorldToScreenObjectScale(),n=this._calculateObjectTransform(i,ce),a=o*this._camera.computeScreenPixelSizeAt(this.renderLocation),h=Y(this._camera,s,re);if(null==h)return null;const d=l(ne,n),_=b(ue,t,d),u=this._calculateModelTransformPosition(ge);I(u,_,le);const g=_e;if(!W(le,h,g))break;for(const s of e){if(0===s.length)continue;const e=v(he,s[0],n);for(let t=1;t<s.length;t++){const i=v(de,s[t],n),o=C(x(e,i,oe),g);if(null!=o&&o<a*a){const t=p(N.get(),e,i);y(t,t,.5);const s=c(N.get());return this._camera.projectToRenderScreen(t,s),s[2]+r}j(e,i)}}break}default:e(this.collisionType)}return null}attach(e={manipulator3D:{}}){const t=this._stage;if(!t)return;const i=e.manipulator3D;null==i.engineLayerId?(this._engineLayer=new X(t,{pickable:!1,updatePolicy:Q.SYNC}),i.engineLayerId=this._engineLayer.id):t?.getLayer&&(this._engineLayer=t.getLayer(i.engineLayerId)),i.engineLayerReferences=(i.engineLayerReferences||0)+1,this._camera.copyFrom(this.view.state.camera),this._attached=!0,this._updateEngineObject(),E(this._location.spatialReference,this.view.spatialReference)||(this.location=new A({x:0,y:0,z:0,spatialReference:this.view.spatialReference}))}detach(e={manipulator3D:{}}){const t=e.manipulator3D;t.engineLayerReferences--;const i=0===t.engineLayerReferences;this._removeResourcesFromStage(),i&&(t.engineLayerId=null,o(this._engineLayer)),this._engineResources=null,this._engineLayer=null,this._attached=!1}onViewChange(){this._camera.copyFrom(this.view.state.camera),this._screenLocationDirty=!0,this._updateEngineObject()}onElevationChange(e){D(this.location,fe,e.spatialReference)&&P(e.extent,fe)&&this._notifyLocationChanged()}_evaluateElevationAlignment(){if(null==this.elevationInfo)return;let e=null,t=0;const i=G(this.elevationInfo,this.location.spatialReference??this.view.elevationProvider.spatialReference);switch(this.elevationInfo.mode){case"on-the-ground":e=V(this.view.elevationProvider,this.location,"ground")??0;break;case"relative-to-ground":t=(V(this.view.elevationProvider,this.location,"ground")??0)+i;break;case"relative-to-scene":t=(V(this.view.elevationProvider,this.location,"scene")??0)+i;break;case"absolute-height":t=i}return t!==this._elevation.offset||e!==this._elevation.override?(this._elevation.offset=t,void(this._elevation.override=e)):void 0}_updateEngineObject(){if(!this._attached)return;if(!this.available)return void this._removeResourcesFromStage();const e=this._getWorldToScreenObjectScale(),t=ce;if(!0===this.autoScaleRenderObjects){const i=this._getFocusedSize(this._radius,this.focused)*e;this._calculateObjectTransform(i,t)}else this._calculateObjectTransform(e,t);const{objectsByState:i}=this._ensureEngineResources(),s=(this.focused?$.Focused:$.Unfocused)|(this.selected?$.Selected:$.Unselected),o=this._noDisplayCount>0;for(const{stateMask:r,objects:n}of i){if(o){for(const e of n)e.visible=!1;continue}const e=(r&$.All)!==$.None,i=(r&Z.All)!==Z.None,a=!e||(s&r)===(r&$.All),c=!i||(this.state&r)===(r&Z.All);if(a&&c)for(const s of n)s.visible=!0,s.transformation=t;else for(const t of n)t.visible=!1}}_ensureEngineResources(){if(null==this._engineResources){const e=this._engineLayer,t=[],i=new Set;this.renderObjects.forEach((({geometry:{material:e}})=>{i.has(e)||(t.push(e),i.add(e))}));const s=new Map;this._renderObjects.forEach((e=>{const t=new K({castShadow:!1,geometries:[e.geometry]}),i=s.get(e.stateMask)||[];i.push(t),s.set(e.stateMask,i)}));const o=[];s.forEach(((e,t)=>o.push({stateMask:t,objects:e}))),this._engineResources={objectsByState:o,layer:e,materials:t}}return this._addResourcesToStage(),this._engineResources}_addResourcesToStage(){const e=this._stage;if(this._engineResourcesAddedToStage||null==this._engineResources||!e)return;const{objectsByState:t,layer:i}=this._engineResources;t.forEach((({objects:e})=>i.addMany(e))),this._engineResourcesAddedToStage=!0}_removeResourcesFromStage(){const e=this._stage;if(!this._engineResourcesAddedToStage||null==this._engineResources||!e)return;const{objectsByState:t,layer:i}=this._engineResources;t.forEach((({objects:e})=>i.removeMany(e))),this._engineResourcesAddedToStage=!1}_getCollisionRadius(e){return this._getFocusedSize(this.radius,!0)*("touch"===e?this.touchMultiplier:1)}_getFocusedSize(e,t){return e*(t?this.focusMultiplier:1)}_getWorldToScreenObjectScale(){return this._worldSized?1:this.screenLocation.pixelSize}_calculateModelTransformPosition(e){const t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,ae);return S(e,i[12],i[13],i[14])}_calculateModelTransformOffset(e){const t=this._calculateModelTransformPosition(e);return w(e,t,this.renderLocation)}_calculateObjectTransform(e,t){return _(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1),this._worldFrame&&u(t,t,this._worldFrame),u(t,t,this._modelTransform),t[12]+=this.renderLocation[0],t[13]+=this.renderLocation[1],t[14]+=this.renderLocation[2],t[15]=1,null!=this._applyObjectTransform&&this._applyObjectTransform(t),t}get test(){}}function te(e){return 0!==e[12]||0!==e[13]||0!==e[14]}function ie(e,t,i){switch(e.viewingMode){case"local":return g(i),!0;case"global":{const o=T(e.renderCoordsHelper.spatialReference);return z(t,0,he,0,o.radius),F(s(he[0]),s(he[1]),i),!0}}}const se=n(),oe=M(),re=B(),ne=h(),ae=m(),ce=m(),le=U(),he=O(),de=O(),_e=O(),ue=O(),ge=O(),me=O(),fe=new A({x:0,y:0,z:0,spatialReference:null}),pe=()=>{};export{ee as Manipulator3D};
|
|
@@ -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 e from"../../../Color.js";import{multiplyOpacity as i}from"../../../core/colorUtils.js";import"../../../core/has.js";import{destroyHandle as n}from"../../../core/handleUtils.js";import{m as t}from"../../../chunks/vec32.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectVectorToVector as o}from"../../../geometry/projection/projectVectorToVector.js";import{onTheGroundElevationInfo as a,absoluteHeightElevationInfo as l}from"../../../support/elevationInfoUtils.js";import{vectorToRender as s}from"./support/viewUtils.js";import{ExtendedLineVisualElement as p,ExtensionType as c}from"./visualElements/ExtendedLineVisualElement.js";import{ParallelLineVisualElement as d}from"./visualElements/ParallelLineVisualElement.js";import{PointVisualElement as m}from"./visualElements/PointVisualElement.js";import{RightAngleQuadVisualElement as u}from"./visualElements/RightAngleQuadVisualElement.js";import{DrapedRenderGroup as f}from"../layers/interfaces.js";import{RenderOccludedFlag as g}from"../webgl-engine/lib/Material.js";import{toDehydratedPoint as v,isTarget as h,withSelfSnappingZ as E}from"../../interactive/sketch/normalizedPoint.js";import{defaults as C}from"../../interactive/snapping/Settings.js";import{SnappingDomain as w}from"../../interactive/snapping/SnappingDomain.js";import{LineSegmentHintType as j}from"../../interactive/snapping/snappingUtils.js";import{SnappingVisualizer as S}from"../../interactive/snapping/SnappingVisualizer.js";import{LineSnappingHint as O}from"../../interactive/snapping/hints/LineSnappingHint.js";class R extends S{sortUniqueHints(e){return e.sort(((e,i)=>(i instanceof O?i.length:0)-(e instanceof O?e.length:0)))}visualizeIntersectionPoint(e,i){const{spatialReference:t,view:r}=i,o=D(i);return n(new m({view:r,primitive:"circle",geometry:v(e.intersectionPoint,t),elevationInfo:e.isDraped?a:l,size:20,outlineSize:2,color:o.intersectionPointColor,outlineColor:o.intersectionPointOutlineColor,pixelSnappingEnabled:!1,isDecoration:!0,attached:!0}))}visualizePoint(e,i){const{view:t,spatialReference:r}=i,o=D(i),a=x(e.point,e.domain,i);return n(new m({view:t,primitive:"circle",geometry:v(a,r),elevationInfo:A(e),size:20,outlineSize:2,color:o.pointColor,outlineColor:o.pointOutlineColor,pixelSnappingEnabled:!1,isDecoration:!0,attached:!0}))}visualizeLine(e,i){const{view:t,spatialReference:r}=i,o=D(i),a=x(e.lineStart,e.domain,i),l=x(e.lineEnd,e.domain,i);return n(H(e.type,a,l,r,A(e),t,o,e.isDraped,e.fadeLeft,e.fadeRight))}visualizeParallelSign(e,i){const{view:r,spatialReference:o}=i,a=D(i),{isDraped:l}=e,s=A(e),p=x(e.lineStart,e.domain,i),c=x(e.lineEnd,e.domain,i),m=z(p,o,s,r,l),u=z(c,o,s,r,l),v=t(u,m,u,.5),h=new d({view:r,attached:!1,offset:C.parallelLineHintOffset,length:C.parallelLineHintLength,width:C.parallelLineHintWidth,color:a.parallelSignColor,location:v,renderOccluded:l?g.OccludeAndTransparent:g.Opaque,isDraped:l,renderGroup:f.SnappingHint,isDecoration:!0});return h.setDirectionFromPoints(m,v),h.attached=!0,n(h)}visualizeRightAngleQuad(e,i){const{view:t,spatialReference:r}=i,o=D(i),a=A(e),{isDraped:l}=e,s=x(e.previousVertex,e.domain,i),p=x(e.centerVertex,e.domain,i),c=x(e.nextVertex,e.domain,i),d=z(s,r,a,t,l),m=z(p,r,a,t,l),v=z(c,r,a,t,l);return n(new u({view:t,attached:!0,color:l?o.rightAngleColorDraped:o.rightAngleColor,renderOccluded:l?g.OccludeAndTransparent:g.Transparent,outlineRenderOccluded:l?g.OccludeAndTransparent:g.Opaque,outlineColor:o.rightAngleOutlineColor,outlineSize:C.rightAngleHintOutlineSize,size:C.rightAngleHintSize,isDraped:l,geometry:{previous:d,center:m,next:v},renderGroup:f.SnappingHint,isDecoration:!0}))}}function D(n){const{effectiveTheme:t}=n.view,r=e.toUnitRGBA(t.accentColor),o=[0,0,0,0];return{intersectionPointColor:o,intersectionPointOutlineColor:r,pointColor:o,pointOutlineColor:r,lineColor:r,lineOutlineColor:void 0,parallelSignColor:r,rightAngleColor:r,rightAngleColorDraped:e.toUnitRGBA(i(t.accentColor,.5)),rightAngleOutlineColor:r}}function x(e,i,{selfSnappingZ:n,view:t,spatialReference:r}){return i&w.SELF&&h(e)&&null!=n?E(e,n,t,r):e}function A(e){return e.isDraped?a:l}function H(e,i,n,t,r,o,a,l=!1,s=!0,d=!0){const m=z(i,t,r,o,l),u=z(n,t,r,o,l),v=new p({view:o,extensionType:c.FADED,start:m,end:u,isDraped:l,color:a.lineColor,renderOccluded:l?g.OccludeAndTransparent:g.Opaque,renderGroup:f.SnappingHint,isDecoration:!0});switch(e){case j.TARGET:v.width=C.lineHintWidthTarget,v.fadedExtensions={start:0,end:C.lineHintFadedExtensions};break;case j.REFERENCE_EXTENSION:v.width=C.lineHintWidthReference,v.fadedExtensions={start:0,end:0};break;case j.REFERENCE:v.width=C.lineHintWidthReference,v.fadedExtensions={start:s?C.lineHintFadedExtensions:0,end:d?C.lineHintFadedExtensions:0}}return v.attached=!0,v}function z(e,i,n,t,a){const l=r();if(a){const n=t.basemapTerrain.overlayManager.renderer.spatialReference;o(e,i,l,n)}else s(e,i,n,t,l);return l}export{R as SnappingVisualizer3D};
|
|
5
|
+
import e from"../../../Color.js";import{multiplyOpacity as i}from"../../../core/colorUtils.js";import"../../../core/has.js";import{destroyHandle as n}from"../../../core/handleUtils.js";import{m as t}from"../../../chunks/vec32.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectVectorToVector as o}from"../../../geometry/projection/projectVectorToVector.js";import{onTheGroundElevationInfo as a,absoluteHeightElevationInfo as l}from"../../../support/elevationInfoUtils.js";import{vectorToRender as s}from"./support/viewUtils.js";import{ExtendedLineVisualElement as p,ExtensionType as c}from"./visualElements/ExtendedLineVisualElement.js";import{ParallelLineVisualElement as d}from"./visualElements/ParallelLineVisualElement.js";import{PointVisualElement as m}from"./visualElements/PointVisualElement.js";import{RightAngleQuadVisualElement as u}from"./visualElements/RightAngleQuadVisualElement.js";import{DrapedRenderGroup as f}from"../layers/interfaces.js";import{RenderOccludedFlag as g}from"../webgl-engine/lib/Material.js";import{toDehydratedPoint as v,isTarget as h,withSelfSnappingZ as E}from"../../interactive/sketch/normalizedPoint.js";import{defaults as C}from"../../interactive/snapping/Settings.js";import{SnappingDomain as w}from"../../interactive/snapping/SnappingDomain.js";import{LineSegmentHintType as j}from"../../interactive/snapping/snappingUtils.js";import{SnappingVisualizer as S}from"../../interactive/snapping/SnappingVisualizer.js";import{LineSnappingHint as O}from"../../interactive/snapping/hints/LineSnappingHint.js";class R extends S{sortUniqueHints(e){return e.sort(((e,i)=>(i instanceof O?i.length:0)-(e instanceof O?e.length:0)))}visualizeIntersectionPoint(e,i){const{spatialReference:t,view:r}=i,o=D(i);return n(new m({view:r,primitive:"circle",geometry:v(e.intersectionPoint,t),elevationInfo:e.isDraped?a:l,size:20,outlineSize:2,color:o.intersectionPointColor,outlineColor:o.intersectionPointOutlineColor,pixelSnappingEnabled:!1,isDecoration:!0,attached:!0}))}visualizePoint(e,i){const{view:t,spatialReference:r}=i,o=D(i),a=x(e.point,e.domain,i);return n(new m({view:t,primitive:"circle",geometry:v(a,r),elevationInfo:A(e),size:20,outlineSize:2,color:o.pointColor,outlineColor:o.pointOutlineColor,pixelSnappingEnabled:!1,isDecoration:!0,attached:!0}))}visualizeLine(e,i){const{view:t,spatialReference:r}=i,o=D(i),a=x(e.lineStart,e.domain,i),l=x(e.lineEnd,e.domain,i);return n(H(e.type,a,l,r,A(e),t,o,e.isDraped,e.fadeLeft,e.fadeRight))}visualizeParallelSign(e,i){const{view:r,spatialReference:o}=i,a=D(i),{isDraped:l}=e,s=A(e),p=x(e.lineStart,e.domain,i),c=x(e.lineEnd,e.domain,i),m=z(p,o,s,r,l),u=z(c,o,s,r,l),v=t(u,m,u,.5),h=new d({view:r,attached:!1,offset:C.parallelLineHintOffset,length:C.parallelLineHintLength,width:C.parallelLineHintWidth,color:a.parallelSignColor,location:v,renderOccluded:l?g.OccludeAndTransparent:g.Opaque,isDraped:l,renderGroup:f.SnappingHint,isDecoration:!0});return h.setDirectionFromPoints(m,v),h.attached=!0,n(h)}visualizeRightAngleQuad(e,i){const{view:t,spatialReference:r}=i,o=D(i),a=A(e),{isDraped:l}=e,s=x(e.previousVertex,e.domain,i),p=x(e.centerVertex,e.domain,i),c=x(e.nextVertex,e.domain,i),d=z(s,r,a,t,l),m=z(p,r,a,t,l),v=z(c,r,a,t,l);return n(new u({view:t,attached:!0,color:l?o.rightAngleColorDraped:o.rightAngleColor,renderOccluded:l?g.OccludeAndTransparent:g.Transparent,outlineRenderOccluded:l?g.OccludeAndTransparent:g.Opaque,outlineColor:o.rightAngleOutlineColor,outlineSize:C.rightAngleHintOutlineSize,size:C.rightAngleHintSize,isDraped:l,geometry:{previous:d,center:m,next:v},renderGroup:f.SnappingHint,isDecoration:!0}))}}function D(n){const{effectiveTheme:t}=n.view,r=e.toUnitRGBA(t.accentColor),o=[0,0,0,0];return{intersectionPointColor:o,intersectionPointOutlineColor:r,pointColor:o,pointOutlineColor:r,lineColor:r,lineOutlineColor:void 0,parallelSignColor:r,rightAngleColor:r,rightAngleColorDraped:e.toUnitRGBA(i(t.accentColor,.5)),rightAngleOutlineColor:r}}function x(e,i,{selfSnappingZ:n,view:t,spatialReference:r}){return 0!==(i&w.SELF)&&h(e)&&null!=n?E(e,n,t,r):e}function A(e){return e.isDraped?a:l}function H(e,i,n,t,r,o,a,l=!1,s=!0,d=!0){const m=z(i,t,r,o,l),u=z(n,t,r,o,l),v=new p({view:o,extensionType:c.FADED,start:m,end:u,isDraped:l,color:a.lineColor,renderOccluded:l?g.OccludeAndTransparent:g.Opaque,renderGroup:f.SnappingHint,isDecoration:!0});switch(e){case j.TARGET:v.width=C.lineHintWidthTarget,v.fadedExtensions={start:0,end:C.lineHintFadedExtensions};break;case j.REFERENCE_EXTENSION:v.width=C.lineHintWidthReference,v.fadedExtensions={start:0,end:0};break;case j.REFERENCE:v.width=C.lineHintWidthReference,v.fadedExtensions={start:s?C.lineHintFadedExtensions:0,end:d?C.lineHintFadedExtensions:0}}return v.attached=!0,v}function z(e,i,n,t,a){const l=r();if(a){const n=t.basemapTerrain.overlayManager.renderer.spatialReference;o(e,i,l,n)}else s(e,i,n,t,l);return l}export{R as SnappingVisualizer3D};
|
|
@@ -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{
|
|
5
|
+
import{_ as s}from"../../../chunks/tslib.es6.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{LayerViewAnalysisViewManager as r}from"./support/LayerViewAnalysisViewManager.js";import n from"../../layers/DimensionLayerView.js";import t from"../../layers/LayerView.js";let o=class extends(a(n(t))){constructor(s){super(s),this.type="dimension-3d",this._analysisViewManager=null}initialize(){this._analysisViewManager=new r({parent:this,getAnalysis:()=>this.layer.analysis,loadAnalysisViewModule:()=>import("../analysis/DimensionAnalysisView3D.js")})}destroy(){this._analysisViewManager.destroy()}get analysisView(){return this._analysisViewManager.analysisView}whenAnalysisView(){return this._analysisViewManager.whenAnalysisView()}isUpdating(){return this._analysisViewManager.updating}};s([e()],o.prototype,"type",void 0),s([e()],o.prototype,"_analysisViewManager",void 0),s([e({readOnly:!0})],o.prototype,"analysisView",null),o=s([i("esri.views.3d.layers.DimensionLayerView3D")],o);const y=o;export{y 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 t}from"../../../chunks/tslib.es6.js";import"../../../core/has.js";import{abortMaybe as e}from"../../../core/maybe.js";import{debounce as r,ignoreAbortErrors as
|
|
5
|
+
import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../core/has.js";import{abortMaybe as e}from"../../../core/maybe.js";import{debounce as r,throwIfAborted as o,ignoreAbortErrors as s}from"../../../core/promiseUtils.js";import{when as i,sync as l}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{projectOrLoad as u}from"../../../geometry/projection.js";import{fromExtent as p,intersection as m,toExtent as d}from"../../../geometry/support/aaBoundingRect.js";import h from"../../../symbols/support/ElevationInfo.js";import{loadImagery as c}from"../../2d/engine/flow/dataUtils.js";import{getFlowSimulationSettings as y,simulationSettingsEqual as f}from"../../2d/engine/flow/utils.js";import g from"./SubView3D.js";import{createFlowGeometry as _}from"../support/flow/geometryUtils.js";import{boundingRectOfTileTree as w}from"../support/flow/loadUtils.js";import j from"../support/flow/StreamlinesStyle3D.js";import{IteratorPreorder as S}from"../terrain/tileUtils.js";let b=class extends g{constructor(t){super(t),this.type="flow",this._preorderIterator=new S,this._abortController=null,this._debouncedLoad=r((async()=>{const{view:t,_style:e}=this;if(null==e)return;const r=this._computeExtent();if(null==r)return;const s={extent:r,timeExtent:this.layer.timeExtent,size:this._viewSizeWithEqualRatio(r),pixelRatio:t.state.contentPixelRatio};null==this._abortController&&(this._abortController=new AbortController);const i=this._abortController,l=await e.load(s,i.signal);o(i.signal),null!=l&&(this._resources?.detach(),l.attach(t.stage),this._resources=l)})),this._loadImagery=(t,e)=>{const{extent:r,size:[o,s],timeExtent:i}=t;return c(this.layer,r,o,s,i,e)},this._createFlowGeometry=(t,e)=>_(this.view,t,e,this.elevationInfo)}initialize(){this.addHandles([i((()=>this.newStyleRequired),(()=>this._updateStyle()),l)]),this.updatingHandles.add((()=>this._style),(()=>this._triggerLoad())),this._updateStyle(),this.updatingHandles.addWhen((()=>!this.view.basemapTerrain?.updating),(()=>this._triggerLoad()))}destroy(){this._abortController=e(this._abortController),this.clear()}get layer(){return this.layerView.layer}get flowRenderer(){const t=this.layer.renderer;return"flow"!==t?.type?null:t}get elevationInfo(){return new h({mode:"absolute-height",offset:1e3})}get dataBounds(){const{fullExtent:t}=this.layer,{spatialReference:e}=this.view.basemapTerrain,r=u(t,e).geometry;return null==r?null:p(r)}get simulationSettings(){const{flowRenderer:t}=this;return null==t?null:y(t)}get newStyleRequired(){const t=this._style?.simulationSettings,e=this.simulationSettings;return null!=t&&null!=e&&!f(t,e)}doRefresh(){return this._triggerLoad()}clear(){this._resources?.detach(),this._resources=null}_triggerLoad(){return s(this.updatingHandles.addPromise(this._debouncedLoad()))}_updateStyle(){const{simulationSettings:t}=this;null!=t&&(this._style?.destroy(),this._style=new j({simulationSettings:t,loadImagery:this._loadImagery,createGeometry:this._createFlowGeometry}))}_computeExtent(){const t=this.view.basemapTerrain,e=t?.rootTiles;if(null==e||0===e.length)return null;const{spatialReference:r}=t,{dataBounds:o}=this;if(!r||null==o)return null;const s=w(e,this._preorderIterator,o);return null==s?null:(m(s,o,s),d(s,r))}_viewSizeWithEqualRatio(t){const e=(t.xmax-t.xmin)/(t.ymax-t.ymin),[r,o]=this.view.size;return r<o?[r,Math.floor(r/e)]:[Math.floor(o*e),o]}get test(){}};t([n()],b.prototype,"type",void 0),t([n()],b.prototype,"_style",void 0),t([n()],b.prototype,"layer",null),t([n()],b.prototype,"flowRenderer",null),t([n()],b.prototype,"elevationInfo",null),t([n()],b.prototype,"dataBounds",null),t([n()],b.prototype,"simulationSettings",null),t([n()],b.prototype,"newStyleRequired",null),b=t([a("esri.views.3d.layers.FlowSubView3D")],b);export{b as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{when as i}from"../../../core/reactiveUtils.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{elevationAlignPointsInFeatures as n}from"./graphics/elevationAlignPointsInFeatures.js";import{GraphicsProcessor as p}from"./graphics/GraphicsProcessor.js";import{queryForSymbologySnapping as l}from"./graphics/queryForSymbologySnapping.js";import{LayerViewPerformanceInfo as c}from"./support/LayerViewPerformanceInfo.js";import{UpdatePolicy as h}from"../webgl-engine/lib/UpdatePolicy.js";import d from"../../layers/LayerView.js";import{defaultHighlightName as u}from"../../support/HighlightDefaults.js";import{isInEffectiveScaleRange as g,hasLayerBasedScaleRanges as m}from"../../support/layerViewUtils.js";import{projectWithZConversionSilent as y}from"../../support/projectionUtils.js";let f=class extends(a(d)){constructor(){super(...arguments),this.type="graphics-3d",this.symbologySnappingSupported=!0,this._slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null,this.ignoresMemoryFactor=!0}get highlightOptions(){return null}initialize(){this._set("processor",new p({owner:this,scaleVisibilityEnabled:!0,frustumVisibilityEnabled:!0})),this.addResolvingPromise(this.processor.initializePromise),this.addHandles(this.layer.on("graphic-update",(e=>this.processor.graphicsCore.graphicUpdateHandler(e)))),this.layer.internal?this.notifyChange("updating"):("local"===this.view.viewingMode&&this.addResolvingPromise((async()=>this.fullExtentInLocalViewSpatialReference=await y(this.layer.fullExtent,this.view.spatialReference))()),this.addHandles(i((()=>this.view?.basemapTerrain?.ready),(()=>()=>this.notifyChange("updating")),{once:!0})))}destroy(){this._updatingHandles.removeAll(),this._set("processor",s(this.processor))}get loadedGraphics(){return this.layer.graphics}get legendEnabled(){return this.canResume()&&!this.processor?.frustumVisibilitySuspended}get visibleAtCurrentScale(){return m?g(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get slicePlaneEnabled(){const e=this.layer.internal;return this._slicePlaneEnabled&&!e}set slicePlaneEnabled(e){this._slicePlaneEnabled=e}getSuspendInfo(){const e=super.getSuspendInfo();return e.outsideOfView=this.processor?.frustumVisibilitySuspended??!1,e}getHit(e){return this.processor.getHit(e)}whenGraphicBounds(e,r){return this.processor.whenGraphicBounds(e,r)}computeAttachmentOrigin(e,r){return this.processor?.computeAttachmentOrigin(e,r)}getSymbolLayerSize(e,r){return this.processor.getSymbolLayerSize(e,r)}queryGraphics(){return Promise.resolve(this.loadedGraphics)}maskOccludee(e){return this.processor.maskOccludee(e)}highlight(e,r){return this.processor.highlight(e,r?.name??u)}async elevationAlignPointsInFeatures(e,s){const{processor:i}=this;if(null==i?.graphics3DGraphics)throw new r("graphicslayerview3d:missing-processor","A Graphics3D processor is needed to resolve graphics elevation.");const{graphics3DGraphics:t}=i,o=e=>"number"==typeof e?t.get(e):void 0;return n(this.view,this.layer,o,e,s)}async queryForSymbologySnapping(e,r){return l(this.processor,e,r)}get updatePolicy(){return this.processor?.graphicsCore.effectiveUpdatePolicy||h.SYNC}isUpdating(){return this.view&&this.layer&&!(!this.processor?.updating&&(this.layer.internal||this.view.basemapTerrain?.ready))}get performanceInfo(){return new c(this.usedMemory,this.loadedGraphics.length,-1,-1)}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return this.processor?.graphicsCore?.unprocessedMemoryEstimate}get test(){return{graphics3DProcessor:this.processor,loadedGraphics:this.loadedGraphics}}};e([t()],f.prototype,"highlightOptions",null),e([t()],f.prototype,"loadedGraphics",null),e([t({readOnly:!0})],f.prototype,"legendEnabled",null),e([t()],f.prototype,"layer",void 0),e([t({readOnly:!0})],f.prototype,"processor",void 0),e([t({readOnly:!0})],f.prototype,"visibleAtCurrentScale",null),e([t()],f.prototype,"_slicePlaneEnabled",void 0),e([t({type:Boolean})],f.prototype,"slicePlaneEnabled",null),f=e([o("esri.views.3d.layers.GraphicsLayerView3D")],f);const b=f;export{b as default};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{when as i}from"../../../core/reactiveUtils.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{elevationAlignPointsInFeatures as n}from"./graphics/elevationAlignPointsInFeatures.js";import{GraphicsProcessor as p}from"./graphics/GraphicsProcessor.js";import{queryForSymbologySnapping as l}from"./graphics/queryForSymbologySnapping.js";import{LayerViewPerformanceInfo as c}from"./support/LayerViewPerformanceInfo.js";import{UpdatePolicy as h}from"../webgl-engine/lib/UpdatePolicy.js";import d from"../../layers/LayerView.js";import{defaultHighlightName as u}from"../../support/HighlightDefaults.js";import{isInEffectiveScaleRange as g,hasLayerBasedScaleRanges as m}from"../../support/layerViewUtils.js";import{projectWithZConversionSilent as y}from"../../support/projectionUtils.js";let f=class extends(a(d)){constructor(){super(...arguments),this.type="graphics-3d",this.symbologySnappingSupported=!0,this._slicePlaneEnabled=!1,this.fullExtentInLocalViewSpatialReference=null,this.ignoresMemoryFactor=!0}get highlightOptions(){return null}initialize(){this._set("processor",new p({owner:this,scaleVisibilityEnabled:!0,frustumVisibilityEnabled:!0})),this.addResolvingPromise(this.processor.initializePromise),this.addHandles(this.layer.on("graphic-update",(e=>this.processor.graphicsCore.graphicUpdateHandler(e)))),this.layer.internal?this.notifyChange("updating"):("local"===this.view.viewingMode&&this.addResolvingPromise((async()=>this.fullExtentInLocalViewSpatialReference=await y(this.layer.fullExtent,this.view.spatialReference))()),this.addHandles(i((()=>this.view?.basemapTerrain?.ready),(()=>()=>this.notifyChange("updating")),{once:!0})))}destroy(){this._updatingHandles.removeAll(),this._set("processor",s(this.processor))}get loadedGraphics(){return this.layer.graphics}get legendEnabled(){return this.canResume()&&!this.processor?.frustumVisibilitySuspended}get visibleAtCurrentScale(){return m?g(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get slicePlaneEnabled(){const e=this.layer.internal;return this._slicePlaneEnabled&&!e}set slicePlaneEnabled(e){this._slicePlaneEnabled=e}getSuspendInfo(){const e=super.getSuspendInfo();return e.outsideOfView=this.processor?.frustumVisibilitySuspended??!1,e}getHit(e){return this.processor.getHit(e)}whenGraphicBounds(e,r){return this.processor.whenGraphicBounds(e,r)}computeAttachmentOrigin(e,r){return this.processor?.computeAttachmentOrigin(e,r)}getSymbolLayerSize(e,r){return this.processor.getSymbolLayerSize(e,r)}queryGraphics(){return Promise.resolve(this.loadedGraphics)}maskOccludee(e){return this.processor.maskOccludee(e)}highlight(e,r){return this.processor.highlight(e,r?.name??u)}notifyContentGeometryUpdate(){this.emit("visible-geometry-changed")}async elevationAlignPointsInFeatures(e,s){const{processor:i}=this;if(null==i?.graphics3DGraphics)throw new r("graphicslayerview3d:missing-processor","A Graphics3D processor is needed to resolve graphics elevation.");const{graphics3DGraphics:t}=i,o=e=>"number"==typeof e?t.get(e):void 0;return n(this.view,this.layer,o,e,s)}async queryForSymbologySnapping(e,r){return l(this.processor,e,r)}get updatePolicy(){return this.processor?.graphicsCore.effectiveUpdatePolicy||h.SYNC}isUpdating(){return this.view&&this.layer&&!(!this.processor?.updating&&(this.layer.internal||this.view.basemapTerrain?.ready))}get performanceInfo(){return new c(this.usedMemory,this.loadedGraphics.length,-1,-1)}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return this.processor?.graphicsCore?.unprocessedMemoryEstimate}get test(){return{graphics3DProcessor:this.processor,loadedGraphics:this.loadedGraphics}}};e([t()],f.prototype,"highlightOptions",null),e([t()],f.prototype,"loadedGraphics",null),e([t({readOnly:!0})],f.prototype,"legendEnabled",null),e([t()],f.prototype,"layer",void 0),e([t({readOnly:!0})],f.prototype,"processor",void 0),e([t({readOnly:!0})],f.prototype,"visibleAtCurrentScale",null),e([t()],f.prototype,"_slicePlaneEnabled",void 0),e([t({type:Boolean})],f.prototype,"slicePlaneEnabled",null),f=e([o("esri.views.3d.layers.GraphicsLayerView3D")],f);const b=f;export{b as default};
|