@arcgis/core 4.23.0-next.20220118 → 4.23.0-next.20220126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Graphic.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00c5bb5eecb0e89266df.js +1 -0
- package/assets/esri/core/workers/chunks/021a37e2b191298e80b7.js +1 -0
- package/assets/esri/core/workers/chunks/1370c92c40fd6271553c.js +1 -0
- package/assets/esri/core/workers/chunks/199670a3a564ebe3bd79.js +1 -0
- package/assets/esri/core/workers/chunks/1e4d37c2b9dc83d20a11.js +1 -0
- package/assets/esri/core/workers/chunks/1fbcc8424452d0256bd6.js +1 -0
- package/assets/esri/core/workers/chunks/{7c9d2638693d5f798b23.js → 23b15e7c2f96d260e16c.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2ae5fc4f787ea568b88.js → 2460f3b6ada6ae900dec.js} +1 -1
- package/assets/esri/core/workers/chunks/{99f0d896c17dd09cd285.js → 2629adf79e7fd9f25f07.js} +1 -1
- package/assets/esri/core/workers/chunks/2792ca40f1e92849247c.js +1 -0
- package/assets/esri/core/workers/chunks/2a96f1bba9ce6883e5e0.js +1 -0
- package/assets/esri/core/workers/chunks/2e899ef5881b4ec6fa55.js +1 -0
- package/assets/esri/core/workers/chunks/3231ee3e090bb4cac3fc.js +1 -0
- package/assets/esri/core/workers/chunks/{0c3e3a5baf54bd5e210c.js → 36e250278b5622ccf068.js} +1 -1
- package/assets/esri/core/workers/chunks/395ba088d4864588ff66.js +1 -0
- package/assets/esri/core/workers/chunks/3cc77692b2eee27b9c9e.js +1 -0
- package/assets/esri/core/workers/chunks/3f343f792fd9f44d6f25.js +1 -0
- package/assets/esri/core/workers/chunks/{8a250ec51097f16feb66.js → 40a1e713f63ec77110c0.js} +1 -1
- package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +1 -0
- package/assets/esri/core/workers/chunks/{ba6fdaed6c315dc13981.js → 434b16731c6a81f868ef.js} +1 -1
- package/assets/esri/core/workers/chunks/4385a268c2a64281d1c1.js +1 -0
- package/assets/esri/core/workers/chunks/{44b01d42d4ec72913229.js → 438f0b5ae5c53ae4f06a.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d539878bfbd7c549e60.js → 46b4bb66a54bbd8e2e57.js} +1 -1
- package/assets/esri/core/workers/chunks/4c76146014dc15143ba3.js +1 -0
- package/assets/esri/core/workers/chunks/5a4a5585ec8027079f32.js +1 -0
- package/assets/esri/core/workers/chunks/5d991b74d958005c26c4.js +1 -0
- package/assets/esri/core/workers/chunks/5dfe1f8d520025e2118b.js +1 -0
- package/assets/esri/core/workers/chunks/601e697dc7414bda128a.js +1 -0
- package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +1 -0
- package/assets/esri/core/workers/chunks/68a59ce98177d8513337.js +1 -0
- package/assets/esri/core/workers/chunks/{9cdaba126ac7fa5f33f0.js → 6cd5e4380d29b9a3c344.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7b1b75643ed31489495.js → 6f50a9647f026a8d4729.js} +1 -1
- package/assets/esri/core/workers/chunks/{47395d225229d237f0ac.js → 7bc5cc5dbf1b7b70ddac.js} +1 -1
- package/assets/esri/core/workers/chunks/7d661129a0d8c466eeec.js +1 -0
- package/assets/esri/core/workers/chunks/{64276aacaafa4c8a15bd.js → 7dcf52d3db3903c8eb9f.js} +1 -1
- package/assets/esri/core/workers/chunks/8070972c0efb78523b68.js +1 -0
- package/assets/esri/core/workers/chunks/8fa0a14165d43ffe87a5.js +1 -0
- package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +1 -0
- package/assets/esri/core/workers/chunks/94b8dbf859df71858d1c.js +1 -0
- package/assets/esri/core/workers/chunks/97a28641b3b2fd31bea2.js +1 -0
- package/assets/esri/core/workers/chunks/{d1454155ee1b8a421cbb.js → 97ec9eef0048760fa260.js} +1 -1
- package/assets/esri/core/workers/chunks/98986e6601b0366376b4.js +1 -0
- package/assets/esri/core/workers/chunks/9cdcf9309d6feda70185.js +1 -0
- package/assets/esri/core/workers/chunks/a78757b9c7e8cbea08fa.js +1 -0
- package/assets/esri/core/workers/chunks/aa04b90b82bf70caaae4.js +1 -0
- package/assets/esri/core/workers/chunks/{b10fcbe1393c812fc219.js → aa861b8eae6c85f3dad4.js} +1 -1
- package/assets/esri/core/workers/chunks/aace7e1fef256bb961c9.js +1 -0
- package/assets/esri/core/workers/chunks/{ed0297fc61014e848c18.js → af5694b4d278cf1db2d9.js} +1 -1
- package/assets/esri/core/workers/chunks/afbb4f802ca5774f0326.js +1 -0
- package/assets/esri/core/workers/chunks/b0b036ad3ad3cd956747.js +1 -0
- package/assets/esri/core/workers/chunks/b2c5f92e3d7606297ca9.js +1 -0
- package/assets/esri/core/workers/chunks/b2d2de935487257c568b.js +1 -0
- package/assets/esri/core/workers/chunks/b2ebe4f6d100e15b512d.js +1 -0
- package/assets/esri/core/workers/chunks/b8316c6469a543029bc6.js +1 -0
- package/assets/esri/core/workers/chunks/{4b69129c0557852d9b3d.js → ba5eb394f098968c22d2.js} +1 -1
- package/assets/esri/core/workers/chunks/bf0a65b4be31959f921d.js +1 -0
- package/assets/esri/core/workers/chunks/bf6dda4a2af14c4b7716.js +1 -0
- package/assets/esri/core/workers/chunks/c890c7fca27170e3341f.js +1 -0
- package/assets/esri/core/workers/chunks/{573dc3064e84ca86844d.js → c959e0d1cf7dce0421b9.js} +1 -1
- package/assets/esri/core/workers/chunks/c976785f2391c77d8a30.js +1 -0
- package/assets/esri/core/workers/chunks/{1fd48459afb58a6cf14f.js → ca2f5faa01d99c21ec14.js} +1 -1
- package/assets/esri/core/workers/chunks/{7aa543a97f055cddea99.js → cc146c57bbdac8029fd8.js} +1 -1
- package/assets/esri/core/workers/chunks/{d39b7983b68d6e5b404d.js → cdbc005eebec1503b99d.js} +1 -1
- package/assets/esri/core/workers/chunks/{7e596478507466953e65.js → cef4af64860ebbfc1c47.js} +1 -1
- package/assets/esri/core/workers/chunks/d72488db62fcf39447b6.js +1 -0
- package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +981 -0
- package/assets/esri/core/workers/chunks/e4b84ca8ddfd48dd79b1.js +1 -0
- package/assets/esri/core/workers/chunks/e4e2036373166c1d5cf5.js +1 -0
- package/assets/esri/core/workers/chunks/e4f93c55eaefab4192b5.js +1 -0
- package/assets/esri/core/workers/chunks/e6165e17fbb07bfc40a1.js +1 -0
- package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +1 -0
- package/assets/esri/core/workers/chunks/{f678293de9a6d8f5b5db.js → ec89466f76d0ba22525e.js} +1 -1
- package/assets/esri/core/workers/chunks/ee45618c45806ab654cb.js +1 -0
- package/assets/esri/core/workers/chunks/f4baa5ea2e42b1317941.js +1 -0
- package/assets/esri/core/workers/chunks/f760a3e030b0f358a92a.js +1 -0
- package/assets/esri/core/workers/chunks/face43cf5abcd2f5bd9d.js +1 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/assets/esri/themes/base/_mixins.scss +4 -1
- package/assets/esri/themes/base/icons/style.scss +11 -2
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +13 -10
- package/assets/esri/themes/base/widgets/_CoordinateConversion.scss +4 -2
- package/assets/esri/themes/base/widgets/_Directions.scss +5 -3
- package/assets/esri/themes/base/widgets/_Editor.scss +5 -2
- package/assets/esri/themes/base/widgets/_ElevationProfile.scss +6 -4
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +6 -0
- package/assets/esri/themes/base/widgets/_ItemList.scss +1 -1
- package/assets/esri/themes/base/widgets/_LayerList.scss +13 -9
- package/assets/esri/themes/base/widgets/_Popup.scss +4 -2
- package/assets/esri/themes/base/widgets/_Print.scss +24 -11
- package/assets/esri/themes/base/widgets/_Search.scss +4 -2
- package/assets/esri/themes/base/widgets/_TableList.scss +9 -7
- package/assets/esri/themes/base/widgets/_Weather.scss +12 -0
- package/assets/esri/themes/base/widgets/_Widget.scss +18 -9
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark-blue/main.css +1 -1
- package/assets/esri/themes/dark-green/main.css +1 -1
- package/assets/esri/themes/dark-purple/main.css +1 -1
- package/assets/esri/themes/dark-red/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/themes/light-blue/main.css +1 -1
- package/assets/esri/themes/light-green/main.css +1 -1
- package/assets/esri/themes/light-purple/main.css +1 -1
- package/assets/esri/themes/light-red/main.css +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
- package/chunks/CloudsComposition.glsl.js +4 -4
- package/chunks/ComponentShader.glsl.js +19 -19
- package/chunks/DefaultMaterial.glsl.js +2 -2
- package/chunks/Terrain.glsl.js +11 -11
- package/chunks/WaterSurface.glsl.js +21 -21
- package/chunks/pe.js +1 -1
- package/chunks/vec3.js +1 -1
- package/chunks/vxlLayer.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/accessorSupport/get.js +1 -1
- package/core/accessorSupport/read.js +1 -1
- package/core/accessorSupport/set.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/has.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/geometry/pe.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/interfaces.d.ts +315 -78
- package/layers/RouteLayer.js +1 -1
- package/layers/VoxelLayer.js +1 -1
- package/layers/VoxelWasmPerScene.js +1 -1
- package/layers/mixins/OperationalLayer.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/libs/vxl/enums.js +1 -1
- package/package.json +2 -2
- package/popup/content/AttachmentsContent.js +1 -1
- package/popup/content/support/mediaInfoTypes.js +1 -1
- package/portal/schemas/buildingSceneLayerItem.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/integratedMeshLayerItem.js +1 -1
- package/portal/schemas/pointCloudLayerItem.js +1 -1
- package/portal/schemas/sceneLayerItem.js +1 -1
- package/portal/schemas/webScene.js +1 -1
- package/rasterRenderers.js +1 -1
- package/rest/find.js +1 -1
- package/rest/geometryService/generalize.js +1 -1
- package/rest/geometryService/lengths.js +1 -1
- package/rest/geometryService/offset.js +1 -1
- package/rest/geometryService/relation.js +1 -1
- package/rest/geometryService/trimExtend.js +1 -1
- package/rest/identify.js +1 -1
- package/{tasks → rest}/operations/find.js +0 -0
- package/{tasks → rest}/operations/generalize.js +0 -0
- package/rest/operations/identify.js +5 -0
- package/{tasks → rest}/operations/lengths.js +0 -0
- package/{tasks → rest}/operations/offset.js +0 -0
- package/{tasks → rest}/operations/relation.js +0 -0
- package/{tasks → rest}/operations/trimExtend.js +0 -0
- package/{tasks → rest}/operations/urlUtils.js +0 -0
- package/rest/print.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/operations/queryAttachments.js +1 -1
- package/rest/query/operations/queryRelatedRecords.js +1 -1
- package/rest/query/operations/queryTopFeatures.js +1 -1
- package/rest/route/utils.js +1 -1
- package/rest/support/NetworkServiceDescription.js +1 -1
- package/rest/support/RouteInfo.js +1 -1
- package/rest/support/RouteParameters.js +1 -1
- package/rest/support/RouteSettings.js +5 -0
- package/rest/support/Stop.js +1 -1
- package/rest/support/networkEnums.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/Font.js +1 -1
- package/symbols/LabelSymbol3D.js +1 -1
- package/symbols/PointSymbol3D.js +1 -1
- package/symbols/TextSymbol.js +1 -1
- package/symbols/TextSymbol3DLayer.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
- package/symbols/support/Symbol3DVerticalOffset.js +1 -1
- package/symbols/support/cimSymbolUtils.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/previewWebStyleSymbol.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/symbols/support/textUtils.js +5 -0
- package/symbols.js +1 -1
- package/views/2d/engine/vectorTiles/style/VectorTilesRequestManager.js +1 -1
- package/views/2d/engine/webgl/brushes/raster/BrushRasterBitmap.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/support/engineHelpers.js +1 -1
- package/views/3d/environment/CloudsComposition.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/environment/weather.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +5 -0
- package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.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/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/{Graphics3DGraphicLikeLayerView.js → GraphicsProcessor.js} +1 -1
- package/views/3d/layers/graphics/QueryEngine.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +7 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +28 -24
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +21 -13
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +12 -14
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/webgl/ContextState.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Renderbuffer.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/Util.js +1 -1
- package/views/webgl/enums.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/views/webgl/testFloatBufferBlend.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Feature/FeatureExpression.js +1 -1
- package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/FeatureForm/InputField.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Slider/SliderViewModel.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/widgets/support/InteractiveToolViewModel.js +1 -1
- package/widgets/support/geolocationUtils.js +1 -1
- package/assets/components/assets/calcite-icon/checkSquareF16.json +0 -1
- package/assets/components/assets/calcite-icon/checkSquareF24.json +0 -1
- package/assets/components/assets/calcite-icon/checkSquareF32.json +0 -1
- package/assets/components/assets/calcite-icon/lineSolid4.json +0 -1
- package/assets/components/assets/calcite-icon/squareF16.json +0 -1
- package/assets/components/assets/calcite-icon/squareF24.json +0 -1
- package/assets/components/assets/calcite-icon/squareF32.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon16.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon24.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon32.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF16.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF24.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF32.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF16.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF24.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF32.json +0 -1
- package/assets/esri/core/workers/chunks/01ef8de7f76a8c61b464.js +0 -1
- package/assets/esri/core/workers/chunks/09da224052976e290828.js +0 -1
- package/assets/esri/core/workers/chunks/0f254c3e91e8fee55f28.js +0 -1
- package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +0 -1
- package/assets/esri/core/workers/chunks/21a77eed1a4ef5b0ff08.js +0 -1
- package/assets/esri/core/workers/chunks/23745a5ab47c840dc452.js +0 -1
- package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +0 -1
- package/assets/esri/core/workers/chunks/2d947080a27db6ce0d75.js +0 -1
- package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +0 -1
- package/assets/esri/core/workers/chunks/32f8c4af7e70ebdcb19e.js +0 -1
- package/assets/esri/core/workers/chunks/3564e14010953def6df9.js +0 -1
- package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +0 -1
- package/assets/esri/core/workers/chunks/3a9740dccda6a733313c.js +0 -1
- package/assets/esri/core/workers/chunks/403c7d64f12f00330d88.js +0 -1
- package/assets/esri/core/workers/chunks/4409d77c9734de4e82a7.js +0 -1
- package/assets/esri/core/workers/chunks/4c301ca9c493b96df746.js +0 -1
- package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +0 -1
- package/assets/esri/core/workers/chunks/615aa2d3ecafe30c80c0.js +0 -1
- package/assets/esri/core/workers/chunks/631c5b514bb73782c570.js +0 -1
- package/assets/esri/core/workers/chunks/6c1e92ff4c732dfda756.js +0 -1
- package/assets/esri/core/workers/chunks/722a10c65456844d72b9.js +0 -1
- package/assets/esri/core/workers/chunks/75d53b28afe732c459b2.js +0 -1
- package/assets/esri/core/workers/chunks/85b34d91cf07567d6873.js +0 -1
- package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +0 -1
- package/assets/esri/core/workers/chunks/89de05207744149fb58b.js +0 -1
- package/assets/esri/core/workers/chunks/8fdd5bca3716816d359b.js +0 -1
- package/assets/esri/core/workers/chunks/987182b3a578fc7de251.js +0 -1
- package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +0 -1
- package/assets/esri/core/workers/chunks/9d9dffc8884d66a258e4.js +0 -1
- package/assets/esri/core/workers/chunks/a28b53c61bddefb6616e.js +0 -1
- package/assets/esri/core/workers/chunks/a6ff3db3493543df81bc.js +0 -1
- package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +0 -1
- package/assets/esri/core/workers/chunks/a960074644c3722be71e.js +0 -1
- package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +0 -1
- package/assets/esri/core/workers/chunks/b99e69302ea701fff0ea.js +0 -971
- package/assets/esri/core/workers/chunks/b9de831ac379cf1d2969.js +0 -1
- package/assets/esri/core/workers/chunks/bc790b2f964144d10abe.js +0 -1
- package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +0 -1
- package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +0 -1
- package/assets/esri/core/workers/chunks/c3eca92d02958732e141.js +0 -1
- package/assets/esri/core/workers/chunks/c6bd943fe8fd13bb4806.js +0 -1
- package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +0 -1
- package/assets/esri/core/workers/chunks/cb68db7169b9dfd1c3ff.js +0 -1
- package/assets/esri/core/workers/chunks/cc96608b2802fbfe7a08.js +0 -1
- package/assets/esri/core/workers/chunks/cd02fe27eb07681cb366.js +0 -1
- package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +0 -1
- package/assets/esri/core/workers/chunks/da1c2873bdbc0956dca0.js +0 -1
- package/assets/esri/core/workers/chunks/dd433c160f7a0c120b82.js +0 -1
- package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +0 -1
- package/assets/esri/core/workers/chunks/e2d68bcd2f99a65387bf.js +0 -1
- package/assets/esri/core/workers/chunks/ef8b75b92cf549e0507e.js +0 -1
- package/assets/esri/core/workers/chunks/f7fc4c993536e62f7f3e.js +0 -1
- package/assets/esri/core/workers/chunks/fd3e5d823dc7917f4b8f.js +0 -1
- package/symbols/support/constants.js +0 -5
- package/tasks/operations/identify.js +0 -5
- package/views/3d/layers/graphics/Graphics3DFeatureLikeLayerView.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.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isNone as r,isSome as e}from"../../../../core/maybe.js";import{isPclIntersectorResult as t,isI3sIntersectorResult as i}from"../../layers/i3s/Intersector.js";import{isTerrainIntersectorResult as a,isOverlayIntersectorResult as n}from"../../terrain/Intersector.js";import{isObjectIntersectorResult as c,isHudIntersectorResult as o}from"./intersectorUtils.js";import{isLodIntersectorResult as l}from"./lodRendering/Intersector.js";function s(r,e){return c(r)||o(r)?g(r.target.object.metadata,e):a(r)?null==(l=e.map)?void 0:l.ground:t(r)||i(r)||n(r)?g(r.target,e):null;var l}function p(r,e){return c(r)||o(r)?u(r.target.object.metadata,e):t(r)?r.target.createGraphic():n(r)||l(r)?u(r.target,e):i(r)?d(r.target,e):null}function u(t,i){if(r(t)||r(t.graphicUid))return null;const a=g(t,i);if(r(a))return null;if(a===i.graphics)return e(i.graphicsView)?i.graphicsView.getGraphicFromGraphicUid(t.graphicUid):null;const n=i.allLayerViews.find((r=>r.layer===a));return n&&!n.suspended&&"getGraphicFromGraphicUid"in n&&e(t.graphicUid)?n.getGraphicFromGraphicUid(t.graphicUid):null}function d(e,t){const i=g(e,t);if(r(i))return null;const a=t.allLayerViews.find((r=>r.layer===i));return a&&!a.suspended&&"getGraphicFromIntersectorTarget"in a?a.getGraphicFromIntersectorTarget(e):null}function g(t,i){return r(t.layerUid)?null:e(i.graphicsView)&&t.layerUid===i.graphicsView.
|
|
5
|
+
import{isNone as r,isSome as e}from"../../../../core/maybe.js";import{isPclIntersectorResult as t,isI3sIntersectorResult as i}from"../../layers/i3s/Intersector.js";import{isTerrainIntersectorResult as a,isOverlayIntersectorResult as n}from"../../terrain/Intersector.js";import{isObjectIntersectorResult as c,isHudIntersectorResult as o}from"./intersectorUtils.js";import{isLodIntersectorResult as l}from"./lodRendering/Intersector.js";function s(r,e){return c(r)||o(r)?g(r.target.object.metadata,e):a(r)?null==(l=e.map)?void 0:l.ground:t(r)||i(r)||n(r)?g(r.target,e):null;var l}function p(r,e){return c(r)||o(r)?u(r.target.object.metadata,e):t(r)?r.target.createGraphic():n(r)||l(r)?u(r.target,e):i(r)?d(r.target,e):null}function u(t,i){if(r(t)||r(t.graphicUid))return null;const a=g(t,i);if(r(a))return null;if(a===i.graphics)return e(i.graphicsView)?i.graphicsView.getGraphicFromGraphicUid(t.graphicUid):null;const n=i.allLayerViews.find((r=>r.layer===a));return n&&!n.suspended&&"getGraphicFromGraphicUid"in n&&e(t.graphicUid)?n.getGraphicFromGraphicUid(t.graphicUid):null}function d(e,t){const i=g(e,t);if(r(i))return null;const a=t.allLayerViews.find((r=>r.layer===i));return a&&!a.suspended&&"getGraphicFromIntersectorTarget"in a?a.getGraphicFromIntersectorTarget(e):null}function g(t,i){return r(t.layerUid)?null:e(i.graphicsView)&&t.layerUid===i.graphicsView.processor.layer.id?i.graphics:i.map.findLayerByUid(t.layerUid)}export{p as toGraphic,s as toOwner};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isNone as e}from"../../../../../core/maybe.js";import{isAborted as t,throwIfAborted as s}from"../../../../../core/promiseUtils.js";import{I as a,c as n}from"../../../../../chunks/mat4f64.js";import{a as i}from"../../../../../chunks/vec2f64.js";import{f as r,d as l,m as o}from"../../../../../chunks/vec3.js";import{c}from"../../../../../chunks/vec3f64.js";import{c as h}from"../../../../../chunks/vec4f64.js";import d from"../../../support/debugFlags.js";import{glLayout as u}from"../../../support/buffer/glUtil.js";import{bindOutputHighlight as _}from"../../core/shaderLibrary/output/OutputHighlight.glsl.js";import p from"../Camera.js";import{Default3D as m}from"../DefaultVertexAttributeLocations.js";import{IntersectorType as f}from"../IntersectorInterfaces.js";import{DepthOrder as g}from"../Octree.js";import{RenderPass as I}from"../RenderPass.js";import{RenderSlot as D}from"../RenderSlot.js";import{assert as v}from"../Util.js";import{InstanceData as y,StateFlags as E}from"./InstanceData.js";import{InstanceOctree as T}from"./InstanceOctree.js";import{LevelSelector as R}from"./LevelSelector.js";import{LodLevel as A}from"./LodLevel.js";import{RenderInstanceData as b}from"./RenderInstanceData.js";import{getInstanceBufferLayout as C}from"../../materials/DefaultMaterial.js";import{colorMixModes as L}from"../../materials/internal/MaterialUtil.js";import{encodeDoubleVec3 as S}from"../../materials/renderers/utils.js";import{bindVertexBufferLayout as U,unbindVertexBufferLayout as x}from"../../../../webgl/Util.js";let P=function(e){const t=e.baseBoundingSphere.radius,s=e.levels.map((e=>e.minScreenSpaceRadius));return new R(t,s)};function O(e){P=e}class H{constructor(e,t,s,a){this.type=f.LOD,this.isGround=!1,this._inverseViewport=i(),this._levels=[],this._defaultRenderInstanceData=[],this._highlightRenderInstanceData=[],this._instanceIndex=0,this._slicePlane=!1,this._enableLevelSelection=!0,this._lastCamera=new p,this._updateCyclesWithStaticCamera=-1,this._needFullCycle=!1,this.slots=[D.OPAQUE_PLUGIN,D.TRANSPARENT_PLUGIN],this.canRender=!0,this._symbol=e,this._optionalFields=t,this._metadata=s,this._instanceBufferLayout=C({instancedDoublePrecision:!0,instanced:t}),this._glInstanceBufferLayout=u(this._instanceBufferLayout,1),this._instanceData=new y(this._optionalFields,a),this._instanceData.on("instance-added",(()=>this._requestUpdateCycle())),this._instanceData.on("instance-removed",(()=>this._requestUpdateCycle())),this._instanceData.on("instance-transform-changed",(e=>{this._requestUpdateCycle(),this._metadata.notifyGraphicGeometryChanged(e.index)})),this._instanceData.on("instance-visibility-changed",(e=>{this._requestUpdateCycle(!0),this._metadata.notifyGraphicVisibilityChanged(e.index)})),this._instanceData.on("instance-highlight-changed",(()=>this._requestUpdateCycle(!0))),this._enableLevelSelection=this._symbol.levels.length>1}get levels(){return this._levels}get baseBoundingBox(){return this._levels[this._levels.length-1].boundingBox}get baseBoundingSphere(){return this._levels[this._levels.length-1].boundingSphere}get baseMaterial(){return this._levels[this._levels.length-1].components[0].material}get slicePlaneEnabled(){return this._slicePlane}set slicePlaneEnabled(e){this._slicePlane=e}get layerUid(){return this._metadata.layerUid}get instanceData(){return this._instanceData}get memoryUsage(){const e={cpu:0,gpu:0};return this._defaultRenderInstanceData.forEach((t=>{const s=t.memoryUsage;e.cpu+=s.cpu,e.gpu+=s.gpu})),this._highlightRenderInstanceData.forEach((t=>{const s=t.memoryUsage;e.cpu+=s.cpu,e.gpu+=s.gpu})),e}get renderStats(){const e=this._instanceData.size,t=[];return this._levels.forEach(((e,s)=>{const a=this._defaultRenderInstanceData[s],n=this._highlightRenderInstanceData[s],i=a.size+n.size,r=e.triangleCount;t.push({renderedInstances:i,renderedTriangles:i*r,trianglesPerInstance:r})})),{totalInstances:e,renderedInstances:t.reduce(((e,t)=>e+t.renderedInstances),0),renderedTriangles:t.reduce(((e,t)=>e+t.renderedTriangles),0),levels:t}}async initializeRenderContext(e,a){this._context=e;const n=e.renderContext.rctx,i=await Promise.allSettled(this._symbol.levels.map((t=>(this._defaultRenderInstanceData.push(new b(n,this._instanceBufferLayout)),this._highlightRenderInstanceData.push(new b(n,this._instanceBufferLayout)),A.create(e,t,a))))),r=i.map((e=>"fulfilled"===e.status?e.value:null)).filter((e=>e));if(t(a)||r.length!==i.length){r.forEach((e=>e.destroy())),s(a);for(const e of i)if("rejected"===e.status)throw e.reason}this._levels=r,this._levelSelector=P(this)}uninitializeRenderContext(){this._invalidateOctree(),this._levels.forEach((e=>e.destroy())),this._defaultRenderInstanceData.forEach((e=>e.destroy())),this._highlightRenderInstanceData.forEach((e=>e.destroy()))}get needsTransparentPass(){return this._levels.some((e=>e.components.some((e=>e.material.requiresSlot(D.TRANSPARENT_MATERIAL)))))}get needsHighlight(){return this._highlightRenderInstanceData.some((e=>e.size>0))}prepareRender(e,t){if(d.LOD_INSTANCE_RENDERER_DISABLE_UPDATES)return;if(this._enableLevelSelection){const e=t.equals(this._lastCamera);this._lastCamera.copyFrom(t),e||this._requestUpdateCycle()}const s=this._needFullCycle?this._instanceData.size:2e3;this._needFullCycle=!1,this._updateInstances(t,s),this.needsUpdates&&this._context.requestRender()}render(e){var t,s,n,i;const r=e.slot===D.OPAQUE_PLUGIN?D.OPAQUE_MATERIAL:e.slot===D.TRANSPARENT_PLUGIN?D.TRANSPARENT_MATERIAL:null;if(!r||!this.baseMaterial.isVisible()||!this.baseMaterial.isVisibleInPass(e.pass))return;const l=e.camera;this._inverseViewport[0]=1/l.fullViewport[2],this._inverseViewport[1]=1/l.fullViewport[3];const o={slot:r,origin:[0,0,0],camera:l,inverseViewport:this._inverseViewport,shadowMap:e.shadowMap,shadowMappingEnabled:e.shadowMap.enabled,ssaoHelper:e.ssaoHelper,ssaoEnabled:e.ssaoHelper.enabled,screenToWorldRatio:null,screenToPCSRatio:null,slicePlane:e.sliceHelper&&e.sliceHelper.plane,hudVisibilityTexture:null!=(t=null==(s=e.offscreenRenderingHelper)?void 0:s.hudVisibilityTexture)?t:null,highlightDepthTexture:null!=(n=null==(i=e.offscreenRenderingHelper)?void 0:i.depthTexture)?n:null,hasOccludees:!1,linearDepthTexture:null,lastFrameColorTexture:null,reprojectionMatrix:a,ssrEnabled:!1,lighting:e.scenelightingData,transparencyPassType:e.transparencyPassType,terrainLinearDepthTexture:e.multipassTerrainParams.terrainLinearDepthTexture,geometryLinearDepthTexture:e.multipassGeometryParams.geometryLinearDepthTexture,multipassTerrainEnabled:e.multipassTerrainParams.multipassTerrainEnabled,cullAboveGround:e.multipassTerrainParams.cullAboveGround,multipassGeometryEnabled:e.multipassGeometryParams.multipassGeometryEnabled,highlightColorTexture:null};e.rctx.bindVAO();const c=e.pass!==I.MATERIAL_HIGHLIGHT&&e.pass!==I.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT,h=e.pass!==I.MATERIAL_DEPTH_SHADOWMAP_DEFAULT;c&&this._renderComponents(e,r,o,this._defaultRenderInstanceData),h&&this._renderComponents(e,r,o,this._highlightRenderInstanceData)}intersect(e,t,s,a){if(!this.baseMaterial.isVisible())return;const n=c();r(n,a,s);const i=n=>{this._instanceData.getCombinedModelTransform(n,N),e.transform.set(N),o(G,s,e.transform.inverse),o(F,a,e.transform.inverse);const i=this._instanceData.getState(n),r=this._instanceData.getLodLevel(n);v(i&E.ACTIVE,"invalid instance state"),v(r>=0&&r<this._levels.length,"invaid lod level"),this._levels[r].intersect(e,t,G,F,n,this._metadata)};this.baseMaterial.parameters.verticalOffset?this.octree.forEach(i):this.octree.forEachAlongRay(s,n,i)}queryDepthRange(e){return this._queryDepthRangeOctree(e)}notifyShaderTransformationChanged(){this._invalidateOctree()}_requestUpdateCycle(e=!1){this._updateCyclesWithStaticCamera=-1,e&&(this._needFullCycle=!0),this.needsUpdates&&this._context.requestRender()}get needsUpdates(){return this._instanceData.size>0&&this._updateCyclesWithStaticCamera<1}get octree(){return this._octree||(this._octree=this._buildOctree()),this._octree}_invalidateOctree(){this._octree&&(this._octree.destroy(),this._octree=null)}_buildOctree(){const e=new T(this._instanceData,this.baseBoundingSphere),t=this._instanceData,s=t.view?t.view.state:null;for(let a=0;a<this._instanceData.capacity;++a){s.get(a)&E.ACTIVE&&e.addInstance(a)}return e}_queryDepthRangeOctree(e){const t=e.eye,s=e.viewForward,a=this.octree.findClosest(s,g.FRONT_TO_BACK,e.frustum),n=this.octree.findClosest(s,g.BACK_TO_FRONT,e.frustum);if(null!=a&&null!=n){this._instanceData.view.boundingSphere.getVec(a,j),r(j,j,t);const i=l(j,s)-j[3];this._instanceData.view.boundingSphere.getVec(n,j),r(j,j,t);const o=l(j,s)+j[3];return{near:Math.max(e.near,i),far:Math.min(e.far,o)}}return{near:1/0,far:-1/0}}_startUpdateCycle(){this._updateCyclesWithStaticCamera++,this._defaultRenderInstanceData.forEach((e=>{e.startUpdateCylce()})),this._highlightRenderInstanceData.forEach((e=>{e.startUpdateCylce()})),this.needsUpdates&&this._context.requestRender()}_updateInstances(e,t){const s=this._enableLevelSelection,a=this._levelSelector;a.updateCamera(e),this._defaultRenderInstanceData.forEach((e=>{e.beginUpdate()})),this._highlightRenderInstanceData.forEach((e=>{e.beginUpdate()}));const n=this._instanceData,i=this._instanceData.view,r=n.size,l=n.capacity;let o=this._instanceIndex;t=Math.min(r,t);for(let c=0;c<t;++c){0===o&&this._startUpdateCycle();const e=i.state.get(o);let r=0;if(!(e&E.ALLOCATED)){o=(o+1)%l,t++;continue}const c=i.lodLevel.get(o);if(e&E.DEFAULT_ACTIVE&&this._defaultRenderInstanceData[c].freeTail(),e&E.HIGHLIGHT_ACTIVE&&this._highlightRenderInstanceData[c].freeTail(),e&E.REMOVE)n.freeInstance(o);else if(e&E.VISIBLE){let t=0;s&&(i.modelOrigin.getVec(o,w),t=a.selectLevel(w,n.getCombinedMedianScaleFactor(o))),r=e&~(E.ACTIVE|E.TRANSFORM_CHANGED),t>=0&&(e&E.HIGHLIGHT?(M(this._highlightRenderInstanceData[t],i,o),r|=E.HIGHLIGHT_ACTIVE):(M(this._defaultRenderInstanceData[t],i,o),r|=E.DEFAULT_ACTIVE)),i.state.set(o,r),i.lodLevel.set(o,t)}else r=e&~(E.ACTIVE|E.TRANSFORM_CHANGED),i.state.set(o,r);if(this._octree){const t=!!(e&E.ACTIVE),s=!!(r&E.ACTIVE);!t&&s?this._octree.addInstance(o):t&&!s?this._octree.removeInstance(o):t&&s&&e&E.TRANSFORM_CHANGED&&(this._octree.removeInstance(o),this._octree.addInstance(o))}o=(o+1)%l}this._instanceIndex=o,this._defaultRenderInstanceData.forEach((e=>{e.endUpdate()})),this._highlightRenderInstanceData.forEach((e=>{e.endUpdate()}))}_renderComponents(e,t,s,a){this.levels.forEach(((n,i)=>{n.components.forEach((n=>{this._renderComponent(e,t,s,a[i],n,i)}))}))}_renderComponent(t,s,a,n,i,r){if(0===n.size||!i.material.requiresSlot(s))return;const{rctx:l,pass:o}=t,c=i.glMaterials.load(l,o);if(e(c))return;const h=l.capabilities.instancing,u=c.beginSlot(a),p=u.program;u.bindPipelineState(l,s),l.useProgram(p),c.bind(a,u),l.bindVAO(i.vao),u.ensureAttributeLocations(i.vao),t.isHighlightPass&&_(p,a),u.bindDraw(a),d.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL&&t.pass===I.MATERIAL&&(p.setUniform4fv("externalColor",B[Math.min(r,B.length-1)]),p.setUniform1i("colorMixMode",L.replace));const f=n.capacity,g=n.headIndex,D=n.tailIndex,y=n.firstIndex,E=this._glInstanceBufferLayout,T=(e,t)=>{U(l,m,n.buffer,E,e),h.drawArraysInstanced(u.primitiveType,0,i.vertexCount,t-e),x(l,m,n.buffer,E)};i.material.parameters.transparent&&null!=y?g>D?(v(y>=D&&y<=g,"invalid firstIndex"),T(y,g),T(D,y)):g<D&&(y<=g?(v(y>=0&&y<=g,"invalid firstIndex"),T(y,g),T(D,f),T(0,y)):(v(y>=D&&y<=f,"invalid firstIndex"),T(y,f),T(0,g),T(D,y))):g>D?T(D,g):g<D&&(T(0,g),T(D,f)),l.bindVAO(null)}}function M(e,t,s){const a=e.allocateHead();V(t,s,e.view,a)}function V(e,t,s,a){S(e.modelOrigin,t,s.modelOriginHi,s.modelOriginLo,a),s.model.copyFrom(a,e.model,t),s.modelNormal.copyFrom(a,e.modelNormal,t),e.color&&s.color&&s.color.copyFrom(a,e.color,t),e.featureAttribute&&s.featureAttribute&&s.featureAttribute.copyFrom(a,e.featureAttribute,t)}const w=c(),j=h(),N=n(),G=c(),F=c(),B=[[1,0,1,1],[0,0,1,1],[0,1,0,1],[1,1,0,1],[1,0,0,1]];export{H as LodRenderer,O as setLevelSelectorFactory};
|
|
5
|
+
import{isNone as e}from"../../../../../core/maybe.js";import{isAborted as t,throwIfAborted as s}from"../../../../../core/promiseUtils.js";import{I as a,c as n}from"../../../../../chunks/mat4f64.js";import{a as i}from"../../../../../chunks/vec2f64.js";import{f as r,d as l,m as o}from"../../../../../chunks/vec3.js";import{c}from"../../../../../chunks/vec3f64.js";import{c as h}from"../../../../../chunks/vec4f64.js";import d from"../../../support/debugFlags.js";import{glLayout as u}from"../../../support/buffer/glUtil.js";import{bindOutputHighlight as _}from"../../core/shaderLibrary/output/OutputHighlight.glsl.js";import m from"../Camera.js";import{Default3D as p}from"../DefaultVertexAttributeLocations.js";import{IntersectorType as f}from"../IntersectorInterfaces.js";import{DepthOrder as g}from"../Octree.js";import{RenderPass as I}from"../RenderPass.js";import{RenderSlot as D}from"../RenderSlot.js";import{assert as v}from"../Util.js";import{InstanceData as y,StateFlags as E}from"./InstanceData.js";import{InstanceOctree as T}from"./InstanceOctree.js";import{LevelSelector as R}from"./LevelSelector.js";import{LodLevel as A}from"./LodLevel.js";import{RenderInstanceData as C}from"./RenderInstanceData.js";import{getInstanceBufferLayout as b}from"../../materials/DefaultMaterial.js";import{colorMixModes as L}from"../../materials/internal/MaterialUtil.js";import{encodeDoubleVec3 as S}from"../../materials/renderers/utils.js";import{bindVertexBufferLayout as U,unbindVertexBufferLayout as x}from"../../../../webgl/Util.js";let P=function(e){const t=e.baseBoundingSphere.radius,s=e.levels.map((e=>e.minScreenSpaceRadius));return new R(t,s)};function O(e){P=e}class H{constructor(e,t,s,a){this.type=f.LOD,this.isGround=!1,this._inverseViewport=i(),this._levels=[],this._defaultRenderInstanceData=[],this._highlightRenderInstanceData=[],this._instanceIndex=0,this._slicePlane=!1,this._enableLevelSelection=!0,this._lastCamera=new m,this._updateCyclesWithStaticCamera=-1,this._needFullCycle=!1,this.slots=[D.OPAQUE_PLUGIN,D.TRANSPARENT_PLUGIN],this.canRender=!0,this._symbol=e,this._optionalFields=t,this._metadata=s,this._instanceBufferLayout=b({instancedDoublePrecision:!0,instanced:t}),this._glInstanceBufferLayout=u(this._instanceBufferLayout,1),this._instanceData=new y(this._optionalFields,a),this._instanceData.on("instance-added",(()=>this._requestUpdateCycle())),this._instanceData.on("instance-removed",(()=>this._requestUpdateCycle())),this._instanceData.on("instance-transform-changed",(e=>{this._requestUpdateCycle(),this._metadata.notifyGraphicGeometryChanged(e.index)})),this._instanceData.on("instance-visibility-changed",(e=>{this._requestUpdateCycle(!0),this._metadata.notifyGraphicVisibilityChanged(e.index)})),this._instanceData.on("instance-highlight-changed",(()=>this._requestUpdateCycle(!0))),this._enableLevelSelection=this._symbol.levels.length>1}get levels(){return this._levels}get baseBoundingBox(){return this._levels[this._levels.length-1].boundingBox}get baseBoundingSphere(){return this._levels[this._levels.length-1].boundingSphere}get baseMaterial(){return this._levels[this._levels.length-1].components[0].material}get slicePlaneEnabled(){return this._slicePlane}set slicePlaneEnabled(e){this._slicePlane=e}get layerUid(){return this._metadata.layerUid}get instanceData(){return this._instanceData}get memoryUsage(){const e={cpu:0,gpu:0};return this._defaultRenderInstanceData.forEach((t=>{const s=t.memoryUsage;e.cpu+=s.cpu,e.gpu+=s.gpu})),this._highlightRenderInstanceData.forEach((t=>{const s=t.memoryUsage;e.cpu+=s.cpu,e.gpu+=s.gpu})),e}get renderStats(){const e=this._instanceData.size,t=[];return this._levels.forEach(((e,s)=>{const a=this._defaultRenderInstanceData[s],n=this._highlightRenderInstanceData[s],i=a.size+n.size,r=e.triangleCount;t.push({renderedInstances:i,renderedTriangles:i*r,trianglesPerInstance:r})})),{totalInstances:e,renderedInstances:t.reduce(((e,t)=>e+t.renderedInstances),0),renderedTriangles:t.reduce(((e,t)=>e+t.renderedTriangles),0),levels:t}}async initializeRenderContext(e,a){this._context=e;const n=e.renderContext.rctx,i=await Promise.allSettled(this._symbol.levels.map((t=>(this._defaultRenderInstanceData.push(new C(n,this._instanceBufferLayout)),this._highlightRenderInstanceData.push(new C(n,this._instanceBufferLayout)),A.create(e,t,a))))),r=i.map((e=>"fulfilled"===e.status?e.value:null)).filter((e=>e));if(t(a)||r.length!==i.length){r.forEach((e=>e.destroy())),s(a);for(const e of i)if("rejected"===e.status)throw e.reason}this._levels=r,this._levelSelector=P(this)}uninitializeRenderContext(){this._invalidateOctree(),this._levels.forEach((e=>e.destroy())),this._defaultRenderInstanceData.forEach((e=>e.destroy())),this._highlightRenderInstanceData.forEach((e=>e.destroy()))}get needsTransparentPass(){return this._levels.some((e=>e.components.some((e=>e.material.requiresSlot(D.TRANSPARENT_MATERIAL)))))}get needsHighlight(){return this._highlightRenderInstanceData.some((e=>e.size>0))}prepareRender(e,t){if(d.LOD_INSTANCE_RENDERER_DISABLE_UPDATES)return;if(this._enableLevelSelection){const e=t.equals(this._lastCamera);this._lastCamera.copyFrom(t),e||this._requestUpdateCycle()}const s=this._needFullCycle?this._instanceData.size:2e3;this._needFullCycle=!1,this._updateInstances(t,s),this.needsUpdates&&this._context.requestRender()}render(e){var t,s,n,i;const r=e.slot===D.OPAQUE_PLUGIN?D.OPAQUE_MATERIAL:e.slot===D.TRANSPARENT_PLUGIN?D.TRANSPARENT_MATERIAL:null;if(!r||!this.baseMaterial.isVisible()||!this.baseMaterial.isVisibleInPass(e.pass))return;const l=e.camera;this._inverseViewport[0]=1/l.fullViewport[2],this._inverseViewport[1]=1/l.fullViewport[3];const o={slot:r,origin:[0,0,0],camera:l,inverseViewport:this._inverseViewport,shadowMap:e.shadowMap,shadowMappingEnabled:e.shadowMap.enabled,ssaoHelper:e.ssaoHelper,ssaoEnabled:e.ssaoHelper.enabled,screenToWorldRatio:null,screenToPCSRatio:null,slicePlane:e.sliceHelper&&e.sliceHelper.plane,hudVisibilityTexture:null!=(t=null==(s=e.offscreenRenderingHelper)?void 0:s.hudVisibilityTexture)?t:null,highlightDepthTexture:null!=(n=null==(i=e.offscreenRenderingHelper)?void 0:i.depthTexture)?n:null,hasOccludees:!1,linearDepthTexture:null,lastFrameColorTexture:null,reprojectionMatrix:a,ssrEnabled:!1,lighting:e.scenelightingData,transparencyPassType:e.transparencyPassType,terrainLinearDepthTexture:e.multipassTerrainParams.terrainLinearDepthTexture,geometryLinearDepthTexture:e.multipassGeometryParams.geometryLinearDepthTexture,multipassTerrainEnabled:e.multipassTerrainParams.multipassTerrainEnabled,cullAboveGround:e.multipassTerrainParams.cullAboveGround,multipassGeometryEnabled:e.multipassGeometryParams.multipassGeometryEnabled,highlightColorTexture:null,cloudsCompositionParams:null};e.rctx.bindVAO();const c=e.pass!==I.MATERIAL_HIGHLIGHT&&e.pass!==I.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT,h=e.pass!==I.MATERIAL_DEPTH_SHADOWMAP_DEFAULT;c&&this._renderComponents(e,r,o,this._defaultRenderInstanceData),h&&this._renderComponents(e,r,o,this._highlightRenderInstanceData)}intersect(e,t,s,a){if(!this.baseMaterial.isVisible())return;const n=c();r(n,a,s);const i=n=>{this._instanceData.getCombinedModelTransform(n,N),e.transform.set(N),o(G,s,e.transform.inverse),o(F,a,e.transform.inverse);const i=this._instanceData.getState(n),r=this._instanceData.getLodLevel(n);v(i&E.ACTIVE,"invalid instance state"),v(r>=0&&r<this._levels.length,"invaid lod level"),this._levels[r].intersect(e,t,G,F,n,this._metadata)};this.baseMaterial.parameters.verticalOffset?this.octree.forEach(i):this.octree.forEachAlongRay(s,n,i)}queryDepthRange(e){return this._queryDepthRangeOctree(e)}notifyShaderTransformationChanged(){this._invalidateOctree()}_requestUpdateCycle(e=!1){this._updateCyclesWithStaticCamera=-1,e&&(this._needFullCycle=!0),this.needsUpdates&&this._context.requestRender()}get needsUpdates(){return this._instanceData.size>0&&this._updateCyclesWithStaticCamera<1}get octree(){return this._octree||(this._octree=this._buildOctree()),this._octree}_invalidateOctree(){this._octree&&(this._octree.destroy(),this._octree=null)}_buildOctree(){const e=new T(this._instanceData,this.baseBoundingSphere),t=this._instanceData,s=t.view?t.view.state:null;for(let a=0;a<this._instanceData.capacity;++a){s.get(a)&E.ACTIVE&&e.addInstance(a)}return e}_queryDepthRangeOctree(e){const t=e.eye,s=e.viewForward,a=this.octree.findClosest(s,g.FRONT_TO_BACK,e.frustum),n=this.octree.findClosest(s,g.BACK_TO_FRONT,e.frustum);if(null!=a&&null!=n){this._instanceData.view.boundingSphere.getVec(a,j),r(j,j,t);const i=l(j,s)-j[3];this._instanceData.view.boundingSphere.getVec(n,j),r(j,j,t);const o=l(j,s)+j[3];return{near:Math.max(e.near,i),far:Math.min(e.far,o)}}return{near:1/0,far:-1/0}}_startUpdateCycle(){this._updateCyclesWithStaticCamera++,this._defaultRenderInstanceData.forEach((e=>{e.startUpdateCylce()})),this._highlightRenderInstanceData.forEach((e=>{e.startUpdateCylce()})),this.needsUpdates&&this._context.requestRender()}_updateInstances(e,t){const s=this._enableLevelSelection,a=this._levelSelector;a.updateCamera(e),this._defaultRenderInstanceData.forEach((e=>{e.beginUpdate()})),this._highlightRenderInstanceData.forEach((e=>{e.beginUpdate()}));const n=this._instanceData,i=this._instanceData.view,r=n.size,l=n.capacity;let o=this._instanceIndex;t=Math.min(r,t);for(let c=0;c<t;++c){0===o&&this._startUpdateCycle();const e=i.state.get(o);let r=0;if(!(e&E.ALLOCATED)){o=(o+1)%l,t++;continue}const c=i.lodLevel.get(o);if(e&E.DEFAULT_ACTIVE&&this._defaultRenderInstanceData[c].freeTail(),e&E.HIGHLIGHT_ACTIVE&&this._highlightRenderInstanceData[c].freeTail(),e&E.REMOVE)n.freeInstance(o);else if(e&E.VISIBLE){let t=0;s&&(i.modelOrigin.getVec(o,w),t=a.selectLevel(w,n.getCombinedMedianScaleFactor(o))),r=e&~(E.ACTIVE|E.TRANSFORM_CHANGED),t>=0&&(e&E.HIGHLIGHT?(M(this._highlightRenderInstanceData[t],i,o),r|=E.HIGHLIGHT_ACTIVE):(M(this._defaultRenderInstanceData[t],i,o),r|=E.DEFAULT_ACTIVE)),i.state.set(o,r),i.lodLevel.set(o,t)}else r=e&~(E.ACTIVE|E.TRANSFORM_CHANGED),i.state.set(o,r);if(this._octree){const t=!!(e&E.ACTIVE),s=!!(r&E.ACTIVE);!t&&s?this._octree.addInstance(o):t&&!s?this._octree.removeInstance(o):t&&s&&e&E.TRANSFORM_CHANGED&&(this._octree.removeInstance(o),this._octree.addInstance(o))}o=(o+1)%l}this._instanceIndex=o,this._defaultRenderInstanceData.forEach((e=>{e.endUpdate()})),this._highlightRenderInstanceData.forEach((e=>{e.endUpdate()}))}_renderComponents(e,t,s,a){this.levels.forEach(((n,i)=>{n.components.forEach((n=>{this._renderComponent(e,t,s,a[i],n,i)}))}))}_renderComponent(t,s,a,n,i,r){if(0===n.size||!i.material.requiresSlot(s))return;const{rctx:l,pass:o}=t,c=i.glMaterials.load(l,o);if(e(c))return;const h=l.capabilities.instancing,u=c.beginSlot(a),m=u.program;u.bindPipelineState(l,s),l.useProgram(m),c.bind(a,u),l.bindVAO(i.vao),u.ensureAttributeLocations(i.vao),t.isHighlightPass&&_(m,a),u.bindDraw(a),d.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL&&t.pass===I.MATERIAL&&(m.setUniform4fv("externalColor",B[Math.min(r,B.length-1)]),m.setUniform1i("colorMixMode",L.replace));const f=n.capacity,g=n.headIndex,D=n.tailIndex,y=n.firstIndex,E=this._glInstanceBufferLayout,T=(e,t)=>{U(l,p,n.buffer,E,e),h.drawArraysInstanced(u.primitiveType,0,i.vertexCount,t-e),x(l,p,n.buffer,E)};i.material.parameters.transparent&&null!=y?g>D?(v(y>=D&&y<=g,"invalid firstIndex"),T(y,g),T(D,y)):g<D&&(y<=g?(v(y>=0&&y<=g,"invalid firstIndex"),T(y,g),T(D,f),T(0,y)):(v(y>=D&&y<=f,"invalid firstIndex"),T(y,f),T(0,g),T(D,y))):g>D?T(D,g):g<D&&(T(0,g),T(D,f)),l.bindVAO(null)}}function M(e,t,s){const a=e.allocateHead();V(t,s,e.view,a)}function V(e,t,s,a){S(e.modelOrigin,t,s.modelOriginHi,s.modelOriginLo,a),s.model.copyFrom(a,e.model,t),s.modelNormal.copyFrom(a,e.modelNormal,t),e.color&&s.color&&s.color.copyFrom(a,e.color,t),e.featureAttribute&&s.featureAttribute&&s.featureAttribute.copyFrom(a,e.featureAttribute,t)}const w=c(),j=h(),N=n(),G=c(),F=c(),B=[[1,0,1,1],[0,0,1,1],[0,1,0,1],[1,1,0,1],[1,0,0,1]];export{H as LodRenderer,O as setLevelSelectorFactory};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{isSome as e}from"../../../../core/maybe.js";import{c as t}from"../../../../chunks/mat3f64.js";import{s as i,g as s,n as r,f as a,l as n,a as o,d as l,t as c}from"../../../../chunks/vec3.js";import{c as u,f as h}from"../../../../chunks/vec3f64.js";import{ViewingMode as d}from"../../../ViewingMode.js";import{newLayout as p}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as m}from"../core/shaderLibrary/ShaderOutputOptions.js";import{Normals as f}from"../core/shaderLibrary/shading/Normals.glsl.js";import{defaultMaskAlphaCutoff as v}from"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import{CullFaceOptions as g,AlphaDiscardMode as T,VertexAttribute as b}from"../lib/basicInterfaces.js";import C from"../lib/GLMaterialTexture.js";import{materialParametersDefaults as S,Material as O}from"../lib/Material.js";import{OITPolygonOffsetLimit as x}from"../lib/OrderIndependentTransparency.js";import{RenderPass as A}from"../lib/RenderPass.js";import{RenderSlot as E}from"../lib/RenderSlot.js";import{getVerticalOffsetObject3D as M}from"../lib/verticalOffsetUtils.js";import{writeDefaultAttributes as q}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as I,intersectTriangleGeometry as P}from"./internal/MaterialUtil.js";import{DefaultMaterialTechniqueConfiguration as L,DefaultMaterialTechnique as D}from"../shaders/DefaultMaterialTechnique.js";import{RealisticTreeTechnique as R}from"../shaders/RealisticTreeTechnique.js";class y extends O{constructor(e){super(e,w),this.supportsEdges=!0,this.techniqueConfig=new L,this.vertexBufferLayout=N(this.parameters),this.instanceBufferLayout=e.instanced?j(this.parameters):null}isVisibleInPass(e){return e!==A.MATERIAL_DEPTH_SHADOWMAP_ALL&&e!==A.MATERIAL_DEPTH_SHADOWMAP_DEFAULT&&e!==A.MATERIAL_DEPTH_SHADOWMAP_HIGHLIGHT||this.parameters.castShadows}isVisible(){const e=this.parameters;if(!super.isVisible()||0===e.layerOpacity)return!1;const t=e.instanced,i=e.vertexColors,s=e.symbolColors,r=!!t&&t.indexOf("color")>-1,a=e.vvColorEnabled,n="replace"===e.colorMixMode,o=e.opacity>0,l=e.externalColor&&e.externalColor[3]>0;return i&&(r||a||s)?!!n||o:i?n?l:o:r||a||s?!!n||o:n?l:o}getTechniqueConfig(t,i){return this.techniqueConfig.output=t,this.techniqueConfig.hasNormalTexture=!!this.parameters.normalTextureId,this.techniqueConfig.hasColorTexture=!!this.parameters.textureId,this.techniqueConfig.vertexTangents=this.parameters.vertexTangents,this.techniqueConfig.instanced=!!this.parameters.instanced,this.techniqueConfig.instancedDoublePrecision=this.parameters.instancedDoublePrecision,this.techniqueConfig.vvSize=this.parameters.vvSizeEnabled,this.techniqueConfig.verticalOffset=null!==this.parameters.verticalOffset,this.techniqueConfig.screenSizePerspective=null!==this.parameters.screenSizePerspective,this.techniqueConfig.slicePlaneEnabled=this.parameters.slicePlaneEnabled,this.techniqueConfig.sliceHighlightDisabled=this.parameters.sliceHighlightDisabled,this.techniqueConfig.alphaDiscardMode=this.parameters.textureAlphaMode,this.techniqueConfig.normalsTypeDerivate="screenDerivative"===this.parameters.normals,this.techniqueConfig.transparent=this.parameters.transparent,this.techniqueConfig.writeDepth=this.parameters.writeDepth,this.techniqueConfig.sceneHasOcludees=this.parameters.sceneHasOcludees,this.techniqueConfig.cullFace=this.parameters.slicePlaneEnabled?g.None:this.parameters.cullFace,this.techniqueConfig.multipassTerrainEnabled=i.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=i.cullAboveGround,this.techniqueConfig.hasModelTransformation=e(this.parameters.modelTransformation),t!==m.Color&&t!==m.Alpha||(this.techniqueConfig.vertexColors=this.parameters.vertexColors,this.techniqueConfig.symbolColors=this.parameters.symbolColors,this.parameters.treeRendering?this.techniqueConfig.doubleSidedMode=f.DoubleSidedMode.WindingOrder:this.techniqueConfig.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?f.DoubleSidedMode.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?f.DoubleSidedMode.WindingOrder:f.DoubleSidedMode.None,this.techniqueConfig.instancedColor=!!this.parameters.instanced&&this.parameters.instanced.indexOf("color")>-1,this.techniqueConfig.receiveShadows=this.parameters.receiveShadows&&this.parameters.shadowMappingEnabled,this.techniqueConfig.receiveAmbientOcclusion=!!i.ssaoEnabled&&this.parameters.receiveSSAO,this.techniqueConfig.vvColor=this.parameters.vvColorEnabled,this.techniqueConfig.textureAlphaPremultiplied=!!this.parameters.textureAlphaPremultiplied,this.techniqueConfig.usePBR=this.parameters.usePBR,this.techniqueConfig.hasMetalnessAndRoughnessTexture=!!this.parameters.metallicRoughnessTextureId,this.techniqueConfig.hasEmissionTexture=!!this.parameters.emissiveTextureId,this.techniqueConfig.hasOcclusionTexture=!!this.parameters.occlusionTextureId,this.techniqueConfig.offsetBackfaces=!(!this.parameters.transparent||!this.parameters.offsetTransparentBackfaces),this.techniqueConfig.isSchematic=this.parameters.usePBR&&this.parameters.isSchematic,this.techniqueConfig.transparencyPassType=i.transparencyPassType,this.techniqueConfig.enableOffset=i.camera.relativeElevation<x),this.techniqueConfig}intersect(e,t,u,h,p,m,f){if(null!==this.parameters.verticalOffset){const e=h.camera;i(U,u[12],u[13],u[14]);let t=null;switch(h.viewingMode){case d.Global:t=r(k,U);break;case d.Local:t=s(k,G)}let f=0;if(null!==this.parameters.verticalOffset){const i=a(V,U,e.eye),s=n(i),r=o(i,i,1/s);let c=null;this.parameters.screenSizePerspective&&(c=l(t,r)),f+=I(e,s,this.parameters.verticalOffset,c,this.parameters.screenSizePerspective)}o(t,t,f),c(F,t,h.transform.inverseRotation),p=a(H,p,F),m=a(z,m,F)}P(e,t,h,p,m,M(h.verticalOffset),f)}requiresSlot(e){return e===(this.parameters.transparent?this.parameters.writeDepth?E.TRANSPARENT_MATERIAL:E.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL:E.OPAQUE_MATERIAL)||e===E.DRAPED_MATERIAL}createGLMaterial(e){return e.output===m.Color||e.output===m.Alpha||e.output===m.Depth||e.output===m.Normal||e.output===m.Shadow||e.output===m.Highlight?new _(e):null}createBufferWriter(){return new B(this.vertexBufferLayout,this.instanceBufferLayout)}}class _ extends C{constructor(e){super({...e,...e.material.parameters})}updateParameters(e){const t=this._material.parameters;return this.updateTexture(t.textureId),this.ensureTechnique(t.treeRendering?R:D,e)}_updateShadowState(e){e.shadowMappingEnabled!==this._material.parameters.shadowMappingEnabled&&this._material.setParameters({shadowMappingEnabled:e.shadowMappingEnabled})}_updateOccludeeState(e){e.hasOccludees!==this._material.parameters.sceneHasOcludees&&this._material.setParameters({sceneHasOcludees:e.hasOccludees})}beginSlot(e){return this._output!==m.Color&&this._output!==m.Alpha||(this._updateShadowState(e),this._updateOccludeeState(e)),this.updateParameters(e)}bind(e,t){t.bindPass(this._material.parameters,e),this.bindTextures(t.program)}}const w={textureId:void 0,initTextureTransparent:!1,isSchematic:!1,usePBR:!1,normalTextureId:void 0,vertexTangents:!1,occlusionTextureId:void 0,emissiveTextureId:void 0,metallicRoughnessTextureId:void 0,emissiveFactor:[0,0,0],mrrFactors:[0,1,.5],ambient:[.2,.2,.2],diffuse:[.8,.8,.8],externalColor:[1,1,1,1],colorMixMode:"multiply",opacity:1,layerOpacity:1,vertexColors:!1,symbolColors:!1,doubleSided:!1,doubleSidedType:"normal",cullFace:g.Back,instanced:void 0,instancedDoublePrecision:!1,normals:"default",receiveSSAO:!0,receiveShadows:!0,castShadows:!0,shadowMappingEnabled:!1,verticalOffset:null,screenSizePerspective:null,slicePlaneEnabled:!1,sliceHighlightDisabled:!1,offsetTransparentBackfaces:!1,vvSizeEnabled:!1,vvSizeMinSize:[1,1,1],vvSizeMaxSize:[100,100,100],vvSizeOffset:[0,0,0],vvSizeFactor:[1,1,1],vvSizeValue:[1,1,1],vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],vvSymbolAnchor:[0,0,0],vvSymbolRotationMatrix:t(),modelTransformation:null,transparent:!1,writeDepth:!0,textureAlphaMode:T.Blend,textureAlphaCutoff:v,textureAlphaPremultiplied:!1,sceneHasOcludees:!1,...S};class B{constructor(e,t){this.vertexBufferLayout=e,this.instanceBufferLayout=t}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){return e.indices.get(b.POSITION).length}write(e,t,i,s){q(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,i,s)}}function N(e){const t=e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId,i=p().vec3f(b.POSITION).vec3f(b.NORMAL);return e.vertexTangents&&i.vec4f(b.TANGENT),t&&i.vec2f(b.UV0),e.vertexColors&&i.vec4u8(b.COLOR),e.symbolColors&&i.vec4u8(b.SYMBOLCOLOR),i}function j(e){let t=p();return t=e.instancedDoublePrecision?t.vec3f(b.MODELORIGINHI).vec3f(b.MODELORIGINLO).mat3f(b.MODEL).mat3f(b.MODELNORMAL):t.mat4f(b.MODEL).mat4f(b.MODELNORMAL),e.instanced&&e.instanced.indexOf("color")>-1&&(t=t.vec4f(b.INSTANCECOLOR)),e.instanced&&e.instanced.indexOf("featureAttribute")>-1&&(t=t.vec4f(b.INSTANCEFEATUREATTRIBUTE)),t}const H=u(),z=u(),G=h(0,0,1),k=u(),F=u(),U=u(),V=u();export{y as DefaultMaterial,j as getInstanceBufferLayout};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../../../chunks/tslib.es6.js";import{
|
|
5
|
+
import{_ as r}from"../../../../chunks/tslib.es6.js";import e from"../../../../core/has.js";import{bindCloudsComposition as t}from"../../environment/CloudsComposition.js";import{ShaderOutput as o}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniformsWithOrigin as i}from"../core/shaderLibrary/Slice.glsl.js";import{bindOutputHighlight as s}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as a}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{PBRMode as n}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapUniforms as p}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindSSRUniforms as l}from"../core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js";import{bindWaterDistortionUniforms as u}from"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import{bindProjectionMatrix as h,bindView as c,bindCameraPosition as d}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as m}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as g}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as f,ShaderTechniqueConfiguration as b}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TransparencyPassType as y}from"../lib/basicInterfaces.js";import{Default3D as v}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as T,oitBlending as S,oitDepthTest as j,oitDepthWrite as w,getOITPolygonOffset as P}from"../lib/OrderIndependentTransparency.js";import{Program as C}from"../lib/Program.js";import{W as E}from"../../../../chunks/WaterSurface.glsl.js";import{makePipelineState as x,defaultDepthWriteParams as O,defaultColorWriteParams as R}from"../../../webgl/renderState.js";class D extends g{constructor(r,e,t){super(r,e,t),this._textureRepository=r.waterTextureRepository}initializeProgram(r){const t=D.shader.get(),o=this.configuration,i=t.build({OITEnabled:o.transparencyPassType===y.Color,output:o.output,viewingMode:r.viewingMode,slicePlaneEnabled:o.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,receiveShadows:o.receiveShadows,pbrMode:n.Water,useCustomDTRExponentForWater:!0,ssrEnabled:o.useSSR,cloudsReflectionsEnable:e("enable-feature:clouds-reflections"),highStepCount:!0,multipassTerrainEnabled:o.multipassTerrainEnabled,cullAboveGround:o.cullAboveGround});return new C(r.rctx,i,v)}bindPass(r,i){h(this.program,i.camera.projectionMatrix),i.multipassTerrainEnabled&&(this.program.setUniform2fv("cameraNearFar",i.camera.nearFar),this.program.setUniform2fv("inverseViewport",i.inverseViewport),a(this.program,i)),this.configuration.output===o.Color&&(i.lighting.setUniforms(this.program,!1),l(this.program,i),e("enable-feature:clouds-reflections")&&t(this.program,i.camera,i.cloudsCompositionParams)),this.configuration.output!==o.Color&&this.configuration.output!==o.Normal||(u(this.program,r),this._textureRepository.bind(this.program)),this.program.setUniform4fv("waterColor",r.color),this.configuration.output===o.Highlight&&s(this.program,i)}bindDraw(r){c(this.program,r),this.program.rebindTextures(),this.configuration.output!==o.Color&&this.configuration.output!==o.Alpha||d(this.program,r.origin,r.camera.viewInverseTransposeMatrix),this.configuration.output===o.Color&&p(this.program,r),this.configuration.output!==o.Color&&this.configuration.output!==o.Alpha&&this.configuration.output!==o.Highlight||i(this.program,this.configuration,r)}_setPipelineState(r){const e=this.configuration,t=r===y.NONE,i=r===y.FrontFace;return x({blending:e.output!==o.Normal&&e.output!==o.Highlight&&e.transparent?t?T:S(r):null,depthTest:{func:j(r)},depthWrite:t?e.writeDepth&&O:w(r),colorWrite:R,polygonOffset:t||i?null:P(e.enableOffset)})}initializePipeline(){return this._setPipelineState(this.configuration.transparencyPassType)}}D.shader=new m(E,(()=>import("../shaders/WaterSurface.glsl.js")));class L extends b{constructor(){super(...arguments),this.output=o.Color,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.transparent=!1,this.enableOffset=!0,this.writeDepth=!1,this.useSSR=!1,this.isDraped=!1,this.transparencyPassType=y.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}r([f({count:o.COUNT})],L.prototype,"output",void 0),r([f()],L.prototype,"receiveShadows",void 0),r([f()],L.prototype,"slicePlaneEnabled",void 0),r([f()],L.prototype,"transparent",void 0),r([f()],L.prototype,"enableOffset",void 0),r([f()],L.prototype,"writeDepth",void 0),r([f()],L.prototype,"useSSR",void 0),r([f()],L.prototype,"isDraped",void 0),r([f({count:y.COUNT})],L.prototype,"transparencyPassType",void 0),r([f()],L.prototype,"multipassTerrainEnabled",void 0),r([f()],L.prototype,"cullAboveGround",void 0);export{D as WaterTechnique,L as WaterTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import e from"../../../../core/Accessor.js";import{isSome as o,isNone as r}from"../../../../core/maybe.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{ContentObjectType as s}from"../lib/ContentObjectType.js";import{GridLocalOriginFactory as a}from"../lib/GridLocalOriginFactory.js";import c from"../lib/ModelDirtySet.js";import{RenderGeometry as d}from"../lib/RenderGeometry.js";import{assert as m}from"../lib/Util.js";import{isWebGLLayer as l}from"../lib/WebGLLayer.js";let
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import e from"../../../../core/Accessor.js";import{isSome as o,isNone as r}from"../../../../core/maybe.js";import{property as n}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{ContentObjectType as s}from"../lib/ContentObjectType.js";import{GridLocalOriginFactory as a}from"../lib/GridLocalOriginFactory.js";import c from"../lib/ModelDirtySet.js";import{RenderGeometry as d}from"../lib/RenderGeometry.js";import{assert as m}from"../lib/Util.js";import{isWebGLLayer as l}from"../lib/WebGLLayer.js";let h=class extends e{constructor(){super(...arguments),this.dirtySet=new c({model:this}),this._content=new Map,this._originFactory=new a(null,75e4)}getObject(t){return this._content.get(t)}add(t){const e=t.id;m(!this._content.has(e),"Model/Stage already contains object to be added"),this._content.set(e,t),l(t)&&this.dirtySet.layerAdded(t)}remove(t){m(this._content.has(t.id),"Model/Stage doesn't contain object to be removed"),this._content.delete(t.id),t.unload(),l(t)&&this.dirtySet.layerRemoved(t)}addMany(t){for(const e of t)o(e)&&(m(!this._content.has(e.id),"Model/Stage already contains object to be added"),this._content.set(e.id,e))}removeMany(t){for(const e of t)m(this._content.has(e.id),"Model/Stage doesn't contain object to be removed"),this._content.delete(e.id),e.unload()}has(t){return this._content.has(t.id)}forEachOfType(t,e){this._content.forEach((o=>{o.type===t&&e(o)}))}getRenderGeometry(t,e){const{geometry:o,material:r,id:n,shaderTransformation:i,origin:s,instanceParameters:a}=e,c=new d(o,r,{id:n,boundingInfo:o.boundingInfo,calculateShaderTransformation:i,castShadow:t.castShadow});return c.updateTransformation((o=>t.getCombinedStaticTransformation(e,o))),c.origin=s||this._originFactory.getOrigin(c.boundingSphere),c.instanceParameters=a,c}updateRenderGeometryTransformation(t,e,o){if(r(t))return!1;o.updateTransformation((o=>t.getCombinedStaticTransformation(e,o)));const n=this._originFactory.getOrigin(o.boundingSphere);return o.origin!==n}getStats(){const t={},e=Array.from(this._content.values());for(let o=0;o<s.COUNT;++o)t[o]=e.filter((t=>t.type===o)).length;return{contentTypes:t,dirtySet:this.dirtySet.formatDebugInfo()}}get test(){return{content:Array.from(this._content.values())}}};t([n({constructOnly:!0})],h.prototype,"dirtySet",void 0),h=t([i("esri.views.3d.webgl-engine.parts.Model")],h);export{h as Model};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isNone as e,disposeMaybe as t}from"../../../../core/maybe.js";import{createResolver as r}from"../../../../core/promiseUtils.js";import{b as s}from"../../../../chunks/vec4f64.js";import{AutoDisposable as i}from"../lib/AutoDisposable.js";import{RenderRequestType as
|
|
5
|
+
import{isNone as e,disposeMaybe as t}from"../../../../core/maybe.js";import{createResolver as r}from"../../../../core/promiseUtils.js";import{b as s}from"../../../../chunks/vec4f64.js";import{AutoDisposable as i}from"../lib/AutoDisposable.js";import{RenderRequestType as o,Decorations as n}from"../lib/basicInterfaces.js";import{encodeResult as a,createEmptyImageData as h,resampleHermite as c}from"../../../support/screenshotUtils.js";import{PixelFormat as l,DataType as d,TargetType as f,DepthStencilTargetType as u}from"../../../webgl/enums.js";import{FramebufferObject as _}from"../../../webgl/FramebufferObject.js";class g extends i{constructor(e,t,r,s,i,o){super(),this._rctx=e,this._renderScene=t,this._requestRenderScene=r,this._renderOverlay=s,this._forceCameraHook=i,this._disposeOffscreenBuffers=o,this.supersample=!0,this._screenshotQueue=new Array}dispose(){this._rctx=null}takeScreenshot(e){this._requestRenderScene(o.BACKGROUND);const t=r();return this._screenshotQueue.push({settings:e,resolver:t}),t.promise}update(e){for(const t of this._screenshotQueue){if(this.isDisposed){t.resolver.reject();continue}const r={...t.settings,pixelRatio:t.settings.pixelRatio*e.viewCamera.pixelRatio},s=this._ensureScreenshotEncodeCanvas(),i=this._renderScreenshot(e,r),o=a(i,r,s,{flipY:!0,premultipliedAlpha:!0});t.resolver(o)}this._screenshotQueue.length=0}_renderScreenshotOverlay(t,r,s){if(e(this._renderOverlay))return r;t.width=r.width,t.height=r.height;const i=t.getContext("2d"),o=s.pixelRatio;return i.save(),i.translate(0,r.height),i.scale(1,-1),s.region&&i.translate(-s.region.x,-s.region.y),i.scale(o,o),r=this._renderOverlay(t,r),i.restore(),r}_readbackScreenshot(e,t){return e.resample?this._readbackScreenshotResampled(e,t):this._readbackScreenshotImmediate(e,t)}_readbackScreenshotResampled(e,t){const{framebufferWidth:r,framebufferHeight:s,region:i,resample:o}=e,n=this._ensureScreenshotEncodeCanvas();let a=h(r,s,n);this._rctx.gl.readPixels(0,0,r,s,l.RGBA,d.UNSIGNED_BYTE,new Uint8Array(a.data.buffer)),t(),a=this._renderScreenshotOverlay(n,a,{...e,region:null});const f=h(i.width,i.height,n);return c(a,f,!0,o.region.x,s-(o.region.y+o.region.height),o.region.width,o.region.height)}_readbackScreenshotImmediate(e,t){const{framebufferHeight:r,region:s}=e,i=this._ensureScreenshotEncodeCanvas(),o=h(s.width,s.height,i);return this._rctx.gl.readPixels(s.x,r-(s.y+s.height),s.width,s.height,l.RGBA,d.UNSIGNED_BYTE,new Uint8Array(o.data.buffer)),t(),this._renderScreenshotOverlay(i,o,e)}_renderScreenshot(e,r){let i=null;const o=e.viewCamera,{framebufferWidth:a,framebufferHeight:h}=r;let c=!1;const l=r.disableDecorations&&e.frameHasDecorations,d=a!==o.fullWidth||h!==o.fullHeight,g=r.ignorePadding&&o.pixelRatio!==r.pixelRatio,m=d||l||g;if(m){const e=o.clone();if(r.ignorePadding){const t=s(e.padding);for(let s=0;s<4;s++)t[s]=Math.round(t[s]/e.pixelRatio*r.pixelRatio);e.padding=t}e.fullWidth=a,e.fullHeight=h,e.pixelRatio=r.pixelRatio;const t=o.fovX-e.fovX,l=o.fovY-e.fovY;t<0&&t<l?e.fovX=o.fovX:l<0&&l<t&&(e.fovY=o.fovY),this._forceCameraHook(e),c=!0,i=new _(this._rctx,{width:e.fullWidth,height:e.fullHeight,colorTarget:f.TEXTURE,depthStencilTarget:u.DEPTH_STENCIL_RENDER_BUFFER}),this._renderScene(i,e,r.disableDecorations?n.OFF:n.ON),this._disposeOffscreenBuffers()}const p=()=>{this._rctx.bindFramebuffer(null),t(i)},v=this._readbackScreenshot(r,p);if(p(),m&&!this._rctx.contextAttributes.alpha)for(let t=3;t<v.data.length;t+=4)v.data[t]=255;return c&&this._forceCameraHook(o),v}_ensureScreenshotEncodeCanvas(){return this._screenshotEncodeCanvas||(this._screenshotEncodeCanvas=document.createElement("canvas")),this._screenshotEncodeCanvas}}export{g as ScreenshotManager};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{f as t}from"../../../../chunks/vec3f64.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniforms as i}from"../core/shaderLibrary/Slice.glsl.js";import{bindCustomOrigin as o}from"../core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as s}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as a}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{bindVerticalOffsetUniforms as n}from"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{bindOutputHighlight as l}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as p}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{Normals as c}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as u,bindPBRUniforms as h}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapViewCustomOrigin as d}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindVisualVariablesUniformsForSymbols as m}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{doublePrecisionRequiresObfuscation as f}from"../core/shaderLibrary/util/DoublePrecision.glsl.js";import{bindProjectionMatrix as v,bindViewCustomOrigin as g,bindCameraPosition as b}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as y}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as T}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as x,ShaderTechniqueConfiguration as P}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{AlphaDiscardMode as M,CullFaceOptions as S,TransparencyPassType as C}from"../lib/basicInterfaces.js";import{Default3D as O}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as D,oitBlending as A,oitDepthTest as j,getOITPolygonOffset as w}from"../lib/OrderIndependentTransparency.js";import{Program as N}from"../lib/Program.js";import{stencilWriteMaskOn as E,stencilToolMaskBaseParams as U,stencilBaseAllZerosParams as z}from"../lib/StencilUtils.js";import{colorMixModes as L,bindScreenSizePerspective as R}from"../materials/internal/MaterialUtil.js";import{D as H}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as F,cullingParams as B,defaultDepthWriteParams as I,defaultColorWriteParams as k}from"../../../webgl/renderState.js";class V extends T{initializeProgram(e){const t=V.shader.get(),r=this.configuration,i=t.build({OITEnabled:r.transparencyPassType===C.Color,output:r.output,viewingMode:e.viewingMode,receiveShadows:r.receiveShadows,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:r.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,symbolColor:r.symbolColors,vvSize:r.vvSize,vvColor:r.vvColor,vvInstancingEnabled:!0,instanced:r.instanced,instancedColor:r.instancedColor,instancedDoublePrecision:r.instancedDoublePrecision,pbrMode:r.usePBR?r.isSchematic?u.Schematic:u.Normal:u.Disabled,hasMetalnessAndRoughnessTexture:r.hasMetalnessAndRoughnessTexture,hasEmissionTexture:r.hasEmissionTexture,hasOcclusionTexture:r.hasOcclusionTexture,hasNormalTexture:r.hasNormalTexture,hasColorTexture:r.hasColorTexture,receiveAmbientOcclusion:r.receiveAmbientOcclusion,useCustomDTRExponentForWater:!1,normalType:r.normalsTypeDerivate?s.Type.ScreenDerivative:s.Type.Attribute,doubleSidedMode:r.doubleSidedMode,vertexTangents:r.vertexTangents,attributeTextureCoordinates:r.hasMetalnessAndRoughnessTexture||r.hasEmissionTexture||r.hasOcclusionTexture||r.hasNormalTexture||r.hasColorTexture?a.AttributeType.Default:a.AttributeType.None,textureAlphaPremultiplied:r.textureAlphaPremultiplied,attributeColor:r.vertexColors,screenSizePerspectiveEnabled:r.screenSizePerspective,verticalOffsetEnabled:r.verticalOffset,offsetBackfaces:r.offsetBackfaces,doublePrecisionRequiresObfuscation:f(e.rctx),alphaDiscardMode:r.alphaDiscardMode,supportsTextureAtlas:!1,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new N(e.rctx,i,O)}bindPass(e,t){var i,o;v(this.program,t.camera.projectionMatrix);const s=this.configuration.output;(this.configuration.output===r.Depth||t.multipassTerrainEnabled||s===r.Shadow)&&this.program.setUniform2fv("cameraNearFar",t.camera.nearFar),t.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",t.inverseViewport),p(this.program,t)),s===r.Alpha&&(this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",L[e.colorMixMode])),s===r.Color?(t.lighting.setUniforms(this.program,!1),this.program.setUniform3fv("ambient",e.ambient),this.program.setUniform3fv("diffuse",e.diffuse),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",L[e.colorMixMode]),this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.configuration.usePBR&&h(this.program,e,this.configuration.isSchematic)):s===r.Highlight&&l(this.program,t),m(this.program,e),n(this.program,e,t),R(e.screenSizePerspective,this.program,"screenSizePerspectiveAlignment"),e.textureAlphaMode!==M.Mask&&e.textureAlphaMode!==M.MaskBlend||this.program.setUniform1f("textureAlphaCutoff",e.textureAlphaCutoff),null==(i=t.shadowMap)||i.bind(this.program),null==(o=t.ssaoHelper)||o.bind(this.program,t.camera)}bindDraw(e){const s=this.configuration.instancedDoublePrecision?t(e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]):e.origin;g(this.program,s,e.camera.viewMatrix),this.program.rebindTextures(),(this.configuration.output===r.Color||this.configuration.output===r.Alpha||this.configuration.output===r.Depth&&this.configuration.screenSizePerspective||this.configuration.output===r.Normal&&this.configuration.screenSizePerspective||this.configuration.output===r.Highlight&&this.configuration.screenSizePerspective)&&b(this.program,s,e.camera.viewInverseTransposeMatrix),this.configuration.output===r.Normal&&this.program.setUniformMatrix4fv("viewNormal",e.camera.viewInverseTransposeMatrix),this.configuration.instancedDoublePrecision&&o(this.program,s),i(this.program,this.configuration,e.slicePlane,s),this.configuration.output===r.Color&&d(this.program,e,s)}_setPipeline(e,t){const i=this.configuration,o=e===C.NONE,s=e===C.FrontFace;return F({blending:i.output!==r.Color&&i.output!==r.Alpha||!i.transparent?null:o?D:A(e),culling:q(i)&&B(i.cullFace),depthTest:{func:j(e)},depthWrite:o||s?i.writeDepth&&I:null,colorWrite:k,stencilWrite:i.sceneHasOcludees?E:null,stencilTest:i.sceneHasOcludees?t?U:z:null,polygonOffset:o||s?null:w(i.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipeline(this.configuration.transparencyPassType,!0),this._setPipeline(this.configuration.transparencyPassType,!1)}getPipelineState(e,t){return t?this._occludeePipelineState:super.getPipelineState(e,t)}}function q(e){return e.cullFace?e.cullFace!==S.None:!e.slicePlaneEnabled&&(!e.transparent&&!e.doubleSidedMode)}V.shader=new y(H,(()=>import("./DefaultMaterial.glsl.js")));class _ extends P{constructor(){super(...arguments),this.output=r.Color,this.alphaDiscardMode=M.Opaque,this.doubleSidedMode=c.DoubleSidedMode.None,this.isSchematic=!1,this.vertexColors=!1,this.offsetBackfaces=!1,this.symbolColors=!1,this.vvSize=!1,this.vvColor=!1,this.verticalOffset=!1,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.sliceHighlightDisabled=!1,this.receiveAmbientOcclusion=!1,this.screenSizePerspective=!1,this.textureAlphaPremultiplied=!1,this.hasColorTexture=!1,this.usePBR=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.instanced=!1,this.instancedColor=!1,this.instancedDoublePrecision=!1,this.vertexTangents=!1,this.normalsTypeDerivate=!1,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparent=!1,this.enableOffset=!0,this.cullFace=S.None,this.transparencyPassType=C.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1}}e([x({count:r.COUNT})],_.prototype,"output",void 0),e([x({count:M.COUNT})],_.prototype,"alphaDiscardMode",void 0),e([x({count:c.DoubleSidedMode.COUNT})],_.prototype,"doubleSidedMode",void 0),e([x()],_.prototype,"isSchematic",void 0),e([x()],_.prototype,"vertexColors",void 0),e([x()],_.prototype,"offsetBackfaces",void 0),e([x()],_.prototype,"symbolColors",void 0),e([x()],_.prototype,"vvSize",void 0),e([x()],_.prototype,"vvColor",void 0),e([x()],_.prototype,"verticalOffset",void 0),e([x()],_.prototype,"receiveShadows",void 0),e([x()],_.prototype,"slicePlaneEnabled",void 0),e([x()],_.prototype,"sliceHighlightDisabled",void 0),e([x()],_.prototype,"receiveAmbientOcclusion",void 0),e([x()],_.prototype,"screenSizePerspective",void 0),e([x()],_.prototype,"textureAlphaPremultiplied",void 0),e([x()],_.prototype,"hasColorTexture",void 0),e([x()],_.prototype,"usePBR",void 0),e([x()],_.prototype,"hasMetalnessAndRoughnessTexture",void 0),e([x()],_.prototype,"hasEmissionTexture",void 0),e([x()],_.prototype,"hasOcclusionTexture",void 0),e([x()],_.prototype,"hasNormalTexture",void 0),e([x()],_.prototype,"instanced",void 0),e([x()],_.prototype,"instancedColor",void 0),e([x()],_.prototype,"instancedDoublePrecision",void 0),e([x()],_.prototype,"vertexTangents",void 0),e([x()],_.prototype,"normalsTypeDerivate",void 0),e([x()],_.prototype,"writeDepth",void 0),e([x()],_.prototype,"sceneHasOcludees",void 0),e([x()],_.prototype,"transparent",void 0),e([x()],_.prototype,"enableOffset",void 0),e([x({count:S.COUNT})],_.prototype,"cullFace",void 0),e([x({count:C.COUNT})],_.prototype,"transparencyPassType",void 0),e([x()],_.prototype,"multipassTerrainEnabled",void 0),e([x()],_.prototype,"cullAboveGround",void 0);export{V as DefaultMaterialTechnique,_ as DefaultMaterialTechniqueConfiguration};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Logger.js";import{isSome as t}from"../../../../core/maybe.js";import{f as o}from"../../../../chunks/vec3f64.js";import{ShaderOutput as i}from"../core/shaderLibrary/ShaderOutputOptions.js";import{bindSliceUniforms as s}from"../core/shaderLibrary/Slice.glsl.js";import{bindCustomOrigin as a}from"../core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as n}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as l}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{bindVerticalOffsetUniforms as p}from"../core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{bindOutputHighlight as c}from"../core/shaderLibrary/output/OutputHighlight.glsl.js";import{bindMultipassTerrainTexture as u}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{Normals as h}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as d,bindPBRUniforms as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{bindReadShadowMapViewCustomOrigin as f}from"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{bindVisualVariablesUniformsForSymbols as g}from"../core/shaderLibrary/shading/VisualVariables.glsl.js";import{doublePrecisionRequiresObfuscation as v}from"../core/shaderLibrary/util/DoublePrecision.glsl.js";import{bindProjectionMatrix as b,bindViewCustomOrigin as y,bindCameraPosition as T}from"../core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as x}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as M}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as P,ShaderTechniqueConfiguration as S}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{AlphaDiscardMode as C,CullFaceOptions as O,TransparencyPassType as D}from"../lib/basicInterfaces.js";import{Default3D as A}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as j,oitBlending as w,oitDepthTest as N,getOITPolygonOffset as E}from"../lib/OrderIndependentTransparency.js";import{Program as U}from"../lib/Program.js";import{stencilWriteMaskOn as L,stencilToolMaskBaseParams as z,stencilBaseAllZerosParams as R}from"../lib/StencilUtils.js";import{colorMixModes as H,bindScreenSizePerspective as F}from"../materials/internal/MaterialUtil.js";import{D as B}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as I,cullingParams as k,defaultDepthWriteParams as q,defaultColorWriteParams as V}from"../../../webgl/renderState.js";const _=r.getLogger("esri.views.3d.webgl-engine.shaders.DefaultTechnique");class G extends M{initializeProgram(e){const r=G.shader.get(),t=this.configuration,o=r.build({OITEnabled:t.transparencyPassType===D.Color,output:t.output,viewingMode:e.viewingMode,receiveShadows:t.receiveShadows,slicePlaneEnabled:t.slicePlaneEnabled,sliceHighlightDisabled:t.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,symbolColor:t.symbolColors,vvSize:t.vvSize,vvColor:t.vvColor,vvInstancingEnabled:!0,instanced:t.instanced,instancedColor:t.instancedColor,instancedDoublePrecision:t.instancedDoublePrecision,pbrMode:t.usePBR?t.isSchematic?d.Schematic:d.Normal:d.Disabled,hasMetalnessAndRoughnessTexture:t.hasMetalnessAndRoughnessTexture,hasEmissionTexture:t.hasEmissionTexture,hasOcclusionTexture:t.hasOcclusionTexture,hasNormalTexture:t.hasNormalTexture,hasColorTexture:t.hasColorTexture,hasModelTransformation:t.hasModelTransformation,receiveAmbientOcclusion:t.receiveAmbientOcclusion,useCustomDTRExponentForWater:!1,normalType:t.normalsTypeDerivate?n.Type.ScreenDerivative:n.Type.Attribute,doubleSidedMode:t.doubleSidedMode,vertexTangents:t.vertexTangents,attributeTextureCoordinates:t.hasMetalnessAndRoughnessTexture||t.hasEmissionTexture||t.hasOcclusionTexture||t.hasNormalTexture||t.hasColorTexture?l.AttributeType.Default:l.AttributeType.None,textureAlphaPremultiplied:t.textureAlphaPremultiplied,attributeColor:t.vertexColors,screenSizePerspectiveEnabled:t.screenSizePerspective,verticalOffsetEnabled:t.verticalOffset,offsetBackfaces:t.offsetBackfaces,doublePrecisionRequiresObfuscation:v(e.rctx),alphaDiscardMode:t.alphaDiscardMode,supportsTextureAtlas:!1,multipassTerrainEnabled:t.multipassTerrainEnabled,cullAboveGround:t.cullAboveGround});return new U(e.rctx,o,A)}bindPass(e,r){var o,s;b(this.program,r.camera.projectionMatrix);const a=this.configuration.output;this.configuration.hasModelTransformation&&(t(e.modelTransformation)?this.program.setUniformMatrix4fv("model",e.modelTransformation):_.warnOnce("hasModelTransformation true, but no modelTransformation found.")),(this.configuration.output===i.Depth||r.multipassTerrainEnabled||a===i.Shadow)&&this.program.setUniform2fv("cameraNearFar",r.camera.nearFar),r.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",r.inverseViewport),u(this.program,r)),a===i.Alpha&&(this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",H[e.colorMixMode])),a===i.Color?(r.lighting.setUniforms(this.program,!1),this.program.setUniform3fv("ambient",e.ambient),this.program.setUniform3fv("diffuse",e.diffuse),this.program.setUniform4fv("externalColor",e.externalColor),this.program.setUniform1i("colorMixMode",H[e.colorMixMode]),this.program.setUniform1f("opacity",e.opacity),this.program.setUniform1f("layerOpacity",e.layerOpacity),this.configuration.usePBR&&m(this.program,e,this.configuration.isSchematic)):a===i.Highlight&&c(this.program,r),g(this.program,e),p(this.program,e,r),F(e.screenSizePerspective,this.program,"screenSizePerspectiveAlignment"),e.textureAlphaMode!==C.Mask&&e.textureAlphaMode!==C.MaskBlend||this.program.setUniform1f("textureAlphaCutoff",e.textureAlphaCutoff),null==(o=r.shadowMap)||o.bind(this.program),null==(s=r.ssaoHelper)||s.bind(this.program,r.camera)}bindDraw(e){const r=this.configuration.instancedDoublePrecision?o(e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]):e.origin;y(this.program,r,e.camera.viewMatrix),this.program.rebindTextures(),(this.configuration.output===i.Color||this.configuration.output===i.Alpha||this.configuration.output===i.Depth&&this.configuration.screenSizePerspective||this.configuration.output===i.Normal&&this.configuration.screenSizePerspective||this.configuration.output===i.Highlight&&this.configuration.screenSizePerspective)&&T(this.program,r,e.camera.viewInverseTransposeMatrix),this.configuration.output===i.Normal&&this.program.setUniformMatrix4fv("viewNormal",e.camera.viewInverseTransposeMatrix),this.configuration.instancedDoublePrecision&&a(this.program,r),s(this.program,this.configuration,e.slicePlane,r),this.configuration.output===i.Color&&f(this.program,e,r)}_setPipeline(e,r){const t=this.configuration,o=e===D.NONE,s=e===D.FrontFace;return I({blending:t.output!==i.Color&&t.output!==i.Alpha||!t.transparent?null:o?j:w(e),culling:W(t)&&k(t.cullFace),depthTest:{func:N(e)},depthWrite:o||s?t.writeDepth&&q:null,colorWrite:V,stencilWrite:t.sceneHasOcludees?L:null,stencilTest:t.sceneHasOcludees?r?z:R:null,polygonOffset:o||s?null:E(t.enableOffset)})}initializePipeline(){return this._occludeePipelineState=this._setPipeline(this.configuration.transparencyPassType,!0),this._setPipeline(this.configuration.transparencyPassType,!1)}getPipelineState(e,r){return r?this._occludeePipelineState:super.getPipelineState(e,r)}}function W(e){return e.cullFace?e.cullFace!==O.None:!e.slicePlaneEnabled&&(!e.transparent&&!e.doubleSidedMode)}G.shader=new x(B,(()=>import("./DefaultMaterial.glsl.js")));class J extends S{constructor(){super(...arguments),this.output=i.Color,this.alphaDiscardMode=C.Opaque,this.doubleSidedMode=h.DoubleSidedMode.None,this.isSchematic=!1,this.vertexColors=!1,this.offsetBackfaces=!1,this.symbolColors=!1,this.vvSize=!1,this.vvColor=!1,this.verticalOffset=!1,this.receiveShadows=!1,this.slicePlaneEnabled=!1,this.sliceHighlightDisabled=!1,this.receiveAmbientOcclusion=!1,this.screenSizePerspective=!1,this.textureAlphaPremultiplied=!1,this.hasColorTexture=!1,this.usePBR=!1,this.hasMetalnessAndRoughnessTexture=!1,this.hasEmissionTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.instanced=!1,this.instancedColor=!1,this.instancedDoublePrecision=!1,this.vertexTangents=!1,this.normalsTypeDerivate=!1,this.writeDepth=!0,this.sceneHasOcludees=!1,this.transparent=!1,this.enableOffset=!0,this.cullFace=O.None,this.transparencyPassType=D.NONE,this.multipassTerrainEnabled=!1,this.cullAboveGround=!1,this.hasModelTransformation=!1}}e([P({count:i.COUNT})],J.prototype,"output",void 0),e([P({count:C.COUNT})],J.prototype,"alphaDiscardMode",void 0),e([P({count:h.DoubleSidedMode.COUNT})],J.prototype,"doubleSidedMode",void 0),e([P()],J.prototype,"isSchematic",void 0),e([P()],J.prototype,"vertexColors",void 0),e([P()],J.prototype,"offsetBackfaces",void 0),e([P()],J.prototype,"symbolColors",void 0),e([P()],J.prototype,"vvSize",void 0),e([P()],J.prototype,"vvColor",void 0),e([P()],J.prototype,"verticalOffset",void 0),e([P()],J.prototype,"receiveShadows",void 0),e([P()],J.prototype,"slicePlaneEnabled",void 0),e([P()],J.prototype,"sliceHighlightDisabled",void 0),e([P()],J.prototype,"receiveAmbientOcclusion",void 0),e([P()],J.prototype,"screenSizePerspective",void 0),e([P()],J.prototype,"textureAlphaPremultiplied",void 0),e([P()],J.prototype,"hasColorTexture",void 0),e([P()],J.prototype,"usePBR",void 0),e([P()],J.prototype,"hasMetalnessAndRoughnessTexture",void 0),e([P()],J.prototype,"hasEmissionTexture",void 0),e([P()],J.prototype,"hasOcclusionTexture",void 0),e([P()],J.prototype,"hasNormalTexture",void 0),e([P()],J.prototype,"instanced",void 0),e([P()],J.prototype,"instancedColor",void 0),e([P()],J.prototype,"instancedDoublePrecision",void 0),e([P()],J.prototype,"vertexTangents",void 0),e([P()],J.prototype,"normalsTypeDerivate",void 0),e([P()],J.prototype,"writeDepth",void 0),e([P()],J.prototype,"sceneHasOcludees",void 0),e([P()],J.prototype,"transparent",void 0),e([P()],J.prototype,"enableOffset",void 0),e([P({count:O.COUNT})],J.prototype,"cullFace",void 0),e([P({count:D.COUNT})],J.prototype,"transparencyPassType",void 0),e([P()],J.prototype,"multipassTerrainEnabled",void 0),e([P()],J.prototype,"cullAboveGround",void 0),e([P()],J.prototype,"hasModelTransformation",void 0);export{G as DefaultMaterialTechnique,J as DefaultMaterialTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{NormalAttribute as e}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as r}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{R as i}from"../../../../chunks/RealisticTree.glsl.js";import{Normals as s}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as t}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{doublePrecisionRequiresObfuscation as o}from"../core/shaderLibrary/util/DoublePrecision.glsl.js";import{ReloadableShaderModule as a}from"../core/shaderTechnique/ReloadableShaderModule.js";import{TransparencyPassType as l}from"../lib/basicInterfaces.js";import{Default3D as n}from"../lib/DefaultVertexAttributeLocations.js";import{Program as
|
|
5
|
+
import{NormalAttribute as e}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as r}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{R as i}from"../../../../chunks/RealisticTree.glsl.js";import{Normals as s}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as t}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{doublePrecisionRequiresObfuscation as o}from"../core/shaderLibrary/util/DoublePrecision.glsl.js";import{ReloadableShaderModule as a}from"../core/shaderTechnique/ReloadableShaderModule.js";import{TransparencyPassType as l}from"../lib/basicInterfaces.js";import{Default3D as n}from"../lib/DefaultVertexAttributeLocations.js";import{Program as d}from"../lib/Program.js";import{DefaultMaterialTechnique as c}from"./DefaultMaterialTechnique.js";class u extends c{initializeProgram(i){const a=u.shader.get(),c=this.configuration,b=a.build({OITEnabled:c.transparencyPassType===l.Color,output:c.output,viewingMode:i.viewingMode,receiveShadows:c.receiveShadows,slicePlaneEnabled:c.slicePlaneEnabled,sliceHighlightDisabled:c.sliceHighlightDisabled,sliceEnabledForVertexPrograms:!1,symbolColor:c.symbolColors,vvSize:c.vvSize,vvColor:c.vvColor,vvInstancingEnabled:!0,instanced:c.instanced,instancedColor:c.instancedColor,instancedDoublePrecision:c.instancedDoublePrecision,pbrMode:c.usePBR?t.Normal:t.Disabled,hasMetalnessAndRoughnessTexture:!1,hasEmissionTexture:!1,hasOcclusionTexture:!1,hasNormalTexture:!1,hasColorTexture:c.hasColorTexture,hasModelTransformation:!1,receiveAmbientOcclusion:c.receiveAmbientOcclusion,useCustomDTRExponentForWater:!1,normalType:e.Type.Attribute,doubleSidedMode:s.DoubleSidedMode.WindingOrder,vertexTangents:!1,attributeTextureCoordinates:c.hasColorTexture?r.AttributeType.Default:r.AttributeType.None,textureAlphaPremultiplied:c.textureAlphaPremultiplied,attributeColor:c.vertexColors,screenSizePerspectiveEnabled:c.screenSizePerspective,verticalOffsetEnabled:c.verticalOffset,offsetBackfaces:c.offsetBackfaces,doublePrecisionRequiresObfuscation:o(i.rctx),alphaDiscardMode:c.alphaDiscardMode,supportsTextureAtlas:!1,multipassTerrainEnabled:c.multipassTerrainEnabled,cullAboveGround:c.cullAboveGround});return new d(i.rctx,b,n)}}u.shader=new a(i,(()=>import("../core/shaderLibrary/default/RealisticTree.glsl.js")));export{u as RealisticTreeTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/shading/Water.glsl.js";import"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/basicInterfaces.js";export{b as build}from"../../../../chunks/WaterSurface.glsl.js";
|
|
5
|
+
import"../core/shaderLibrary/ForwardLinearDepth.glsl.js";import"../core/shaderLibrary/ShaderOutputOptions.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/Transform.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import"../core/shaderLibrary/shading/EvaluateMainLighting.glsl.js";import"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import"../core/shaderLibrary/shading/NormalUtils.glsl.js";import"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../core/shaderLibrary/shading/Water.glsl.js";import"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import"../core/shaderLibrary/util/AlphaDiscard.glsl.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderModules/interfaces.js";import"../core/shaderModules/ShaderBuilder.js";import"../lib/basicInterfaces.js";export{b as build}from"../../../../chunks/WaterSurface.glsl.js";
|
package/views/SceneView.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import"../geometry.js";import i from"../Graphic.js";import r from"../Ground.js";import s from"../Viewpoint.js";import n from"../core/Collection.js";import{byId as a}from"../core/domUtils.js";import o from"../core/Error.js";import{on as l}from"../core/events.js";import{handlesGroup as p,makeHandle as h}from"../core/handleUtils.js";import d from"../core/has.js";import{isIterable as c}from"../core/iteratorUtils.js";import u from"../core/Logger.js";import{destroyMaybe as g,isNone as m,isSome as f,unwrapOr as y}from"../core/maybe.js";import{ObservableChangesType as w}from"../core/ObservableChangesType.js";import{throwIfAborted as v}from"../core/promiseUtils.js";import{initial as _,syncAndInitial as b}from"../core/reactiveUtils.js";import{setFrameDuration as S}from"../core/scheduling.js";import{on as M,whenOnce as R,init as x,whenTrueOnce as V}from"../core/watchUtils.js";import{initialize as T}from"../core/workers/workers.js";import{screenPointObjectToArray as C,createScreenPoint as O,createScreenPointArray as P}from"../core/screenUtils.js";import{property as E}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import{cast as j}from"../core/accessorSupport/decorators/cast.js";import{subclass as I}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as G}from"../core/accessorSupport/ensureType.js";import{c as H}from"../chunks/vec3f64.js";import L from"../geometry/HeightModelInfo.js";import{canProjectWithoutEngine as U,project as A,projectPointToVector as D,projectVectorToVector as F,projectBoundingRect as W}from"../geometry/projection.js";import{create as q,toExtent as z}from"../geometry/support/aaBoundingRect.js";import{B as k,a as N}from"../chunks/boundedPlane.js";import{renderSRFromViewSR as B}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as Q}from"../geometry/support/scaleUtils.js";import $ from"../layers/VoxelWasmManager.js";import{isTiledLayer as X}from"../layers/support/layerUtils.js";import{BreakpointsOwner as K}from"./BreakpointsOwner.js";import{DOMContainer as Z}from"./DOMContainer.js";import J from"./GroundView.js";import{PopupView as Y}from"./PopupView.js";import ee from"./View.js";import te from"./ViewAnimation.js";import{ViewingMode as ie,stringFromViewingMode as re,viewingModeFromString as se}from"./ViewingMode.js";import{layerView3DImporter as ne}from"./3d/layerViewModuleImportUtils.js";import ae from"./3d/analysis/AnalysisViewManager3D.js";import oe from"./3d/constraints/Constraints.js";import le from"./3d/environment/SceneViewEnvironment.js";import{SceneViewEnvironmentManager as pe}from"./3d/environment/SceneViewEnvironmentManager.js";import he from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as de}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as ce}from"./3d/layers/graphics/Labeler.js";import{ObjectResourceCache as ue}from"./3d/layers/graphics/ObjectResourceCache.js";import ge from"./3d/layers/support/FeatureTileTree3D.js";import me from"./3d/state/ViewState.js";import fe from"./3d/state/ViewStateManager.js";import{SceneIntersectionHelper as ye}from"./3d/state/helpers/SceneIntersectionHelper.js";import{CombinedElevationProvider as we}from"./3d/support/CombinedElevationProvider.js";import ve from"./3d/support/debugFlags.js";import _e from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as be}from"./3d/support/ElevationProvider.js";import Se from"./3d/support/HighlightOptions.js";import{MapCoordsHelper as Me}from"./3d/support/MapCoordsHelper.js";import{PropertiesPool as Re}from"./3d/support/PropertiesPool.js";import xe from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Ve}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Te}from"./3d/support/ResourceController.js";import Ce from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Oe}from"./3d/support/SharedSymbolResources.js";import Pe from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Ee from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as je,getTiledLayerInfo as Ie}from"./3d/terrain/terrainUtils.js";import{Stage as Ge}from"./3d/webgl-engine/Stage.js";import{newIntersector as He,DEFAULT_TOLERANCE as Le}from"./3d/webgl-engine/lib/Intersector.js";import{StoreResults as Ue,IntersectorType as Ae}from"./3d/webgl-engine/lib/IntersectorInterfaces.js";import{isValidIntersectorResult as De}from"./3d/webgl-engine/lib/intersectorUtils.js";import{toGraphic as Fe,toOwner as We}from"./3d/webgl-engine/lib/intersectorUtilsConversions.js";import{TERRAIN_ID as qe}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{hitTestSelectSameDistance as ze}from"./support/hitTestSelectUtils.js";import{occludeesSupported as ke}from"./support/layerViewUtils.js";import{toRenderSettings as Ne,screenshotSuperSampleSettings as Be}from"./support/screenshotUtils.js";import{isSupportedScreenPointEvent as Qe,createScreenPointFromSupportedEvent as $e}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Xe}from"./support/spatialReferenceSupport.js";import{check as Ke}from"./support/WebGLRequirements.js";import Ze from"./ui/3d/DefaultUI3D.js";import Je from"../webscene/Environment.js";import Ye from"../geometry/Extent.js";import et from"../geometry/SpatialReference.js";import tt from"../geometry/Point.js";const it=u.getLogger("esri.views.SceneView");let rt=class extends(K(Z(Y(ee)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._defaults={},this._externallySet={environment:!1},this._createGraphicsViewController=null,this._resolveWhenReady=[],this.propertiesPool=new Re({slicePlane:k},this),this._resourceController=Te(this),this._defaultToMapOptions={include:new Set},this._defaultHitTestOptions={exclude:new Set},this.deconflictor=new de({view:this}),this.labeler=new ce({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.basemapTerrain=null,this.elevationProvider=null,this.camera=null,this.canvas=null,this.center=null,this.constraints=new oe,this.environmentManager=new pe,this.extent=null,this.floors=new n,this.windowDevicePixelRatio=1,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new ae({view:this}),this.groundView=null,this.navigating=!1,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new me,this.scale=null,this.spatialReference=null,this.alphaCompositingEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new Ze,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this.viewpoint=null,this.zoom=null,this.highlightOptions=new Se,T(),e&&e.environment||(this._defaults.environment=new le,this.environment=this._defaults.environment);const t=e=>{f(e)&&e.type===w.MOVE||(this._updatingChanged(),this.map&&this.map.allLayers.forEach((async e=>{try{await e.when()}catch{}this._updatingChanged()})))};this.handles.add([M(this,"map.allLayers","after-changes",t,t,t,!0),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),this.watch("map",(e=>{e&&e.load&&e.load().catch((()=>{}))}))]),this.inputManager=new he({view:this});const i=()=>{const e=window.devicePixelRatio;e!==this.windowDevicePixelRatio&&(this.windowDevicePixelRatio=e,this.notifyChange("pixelRatio"))};this.stateManager=new fe({view:this,updateDevicePixelRatio:i})}initialize(){this.groundView=new J({view:this}),this._updateUpdatingMonitors();const e=()=>this._updateDefaultToMapOptions();this.handles.add(M(this,"map.allLayers","after-changes",e,e,e)),this.updatingHandles.add((()=>this.qualitySettings.memoryLimit),(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),_),this.updatingHandles.add((()=>this.qualitySettings.additionalCacheMemory),(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),_),this.updatingHandles.add((()=>this.qualitySettings.frameRate),(e=>S(e>0?1e3/Math.ceil(e):0)),_),this.updatingHandles.add((()=>ve.SCENEVIEW_LOCKING_LOG),(e=>this.defaultsFromMap.logDebugInformation=e),_),this.updatingHandles.add((()=>{var e;return null==(e=this.map)?void 0:e.ground}),e,b),this.updatingHandles.add((()=>{var e,t;return null==(e=this.map)||null==(t=e.ground)?void 0:t.opacity}),(()=>this._updateDefaultHitTestOptions()),b),this.handles.add(this.watch("spatialReference",(()=>this.notifyChange("clippingArea")),!0))}destroy(){this.destroyed||(this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._exitSurface(),this._disposeGraphicsView(),this.sharedSymbolResources=g(this.sharedSymbolResources),this.labeler.destroy(),this._set("labeler",null),this.deconflictor.destroy(),this._set("deconflictor",null),this._resourceController=g(this._resourceController),this.stateManager.destroy(),this._set("stateManager",null),this.inputManager.destroy(),this._set("inputManager",null),this.propertiesPool.destroy(),this.handles.remove("updatingMonitors"),this.environmentManager.destroy(),this._set("environmentManager",null),this.groundView=g(this.groundView))}get renderSpatialReference(){return this.renderCoordsHelper&&this.renderCoordsHelper.spatialReference}get basemapSpatialReference(){return this.basemapTerrain&&this.basemapTerrain.spatialReference}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get clippingArea(){if("global"===this.viewingMode)return null;let e=this._userClippingArea||this.get("map.clippingArea");return!(!!this._userClippingArea||this.get("map.clippingEnabled"))||m(e)?(this._clippingArea=null,null):e instanceof Ye?this.spatialReference&&(e=at(e,this.spatialReference),m(e))?(it.error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(e=e.clone(),m(e.intersection(this.groundAndLayersExtent))&&(e.xmin=e.xmax,e.ymin=e.ymax),e.zmin=void 0,e.zmax=void 0,e.equals(this._clippingArea)||(this._clippingArea=e),this._clippingArea):(it.error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&f(e)?it.error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===ie.Global)return null;const e=this.renderSpatialReference,t=this.dataExtent;return m(t)||m(e)||t.spatialReference.equals(e)?t:at(t,e)}get dataExtent(){let e=this.groundAndLayersExtent;const t=this.spatialReference||et.WGS84,i=at(this.clippingArea,t);f(i)&&(e=f(e)?e.intersection(i):i);const r=this._get("dataExtent");return f(e)&&e.equals(r)?r:e}get groundAndLayersExtent(){const e=this.spatialReference||et.WGS84;let t;const i=i=>{const r=at(i,e);m(r)||(f(t)?t.union(r):t=r.clone())},r=this.basemapTerrain;if(null!=r&&r.spatialReference){const e=r.groundExtent;i(new Ye({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}if(this.map){const e=e=>{!f(e.fullExtent)||"graphics"===e.type&&e.internal||i(e.fullExtent)};this.map.allLayers.forEach((t=>e(t)))}if(m(t))return null;t.hasZ?(t.zmin=Math.min(0,t.zmin),t.zmax=Math.max(0,t.zmax)):(t.zmin=0,t.zmax=0);const s=this._get("groundAndLayersExtent");return t.equals(s)?s:t}set environment(e){e!==this._defaults.environment&&(this._externallySet.environment=!0),this._set("environment",e)}castEnvironment(e){return e?e instanceof le?e:e instanceof Je?null!=this.environment?this.environment.cloneWithWebsceneEnvironment(e):le.fromWebsceneEnvironment(e):G(le,e):new le}get pixelRatio(){return Math.min(this.windowDevicePixelRatio,this.maximumPixelRatio)}set pixelRatio(e){f(e)?this._override("pixelRatio",e):this._clearOverride("pixelRatio")}get maximumPixelRatio(){let e=1/0;const{maximumPixelRatio:t,maximumRenderResolution:i}=this.qualitySettings;if(null!=t&&(e=Math.min(e,t)),null!=i){const t=i/Math.max(this.width,this.height);e=Math.min(e,t)}return e}set maximumPixelRatio(e){f(e)?this._override("maximumPixelRatio",e):this._clearOverride("maximumPixelRatio")}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get _defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||f(this.activeTool)}get stationary(){return!this.animation&&!this.resizing&&(m(this.state)||this.state.stationary)}set qualityProfile(e){_e.isValidProfile(e)&&(_e.apply(e,this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||_e.getDefaultProfile()}set slicePlane(e){if(f(this._stage)&&this._stage.renderView.setRenderParameters({slicePlane:e}),m(e))return void this._set("slicePlane",null);const t=this.propertiesPool.get("slicePlane");N(e,t),this._set("slicePlane",t)}get typeSpecificPreconditionsReady(){return!!this.viewingMode}get resolution(){return null!=this.spatialReference?Q(this.scale,this.spatialReference):0}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?L.deriveUnitFromSR(e,this.spatialReference):null}get updating(){var e,t,i;if(this.destroyed)return!1;let r=0,s=this.layerViewManager.updating,n=s?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((e=>{if(e.isFulfilled()){if(e.updating){if(s=!0,e.suspended||je(e))return;++n,r+=e.updatingProgress}}else++n}));for(const a of[this.graphicsView,this.basemapView,this._resourceController,this._stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this.featureTreeDebugger,this.toolViewManager,this.analysisViewManager])if(f(a)&&a.updating){const e=.1;n+=e,r+=.5*e}for(const a of[this.deconflictor,this.labeler,this.basemapTerrain])f(a)&&a.updating&&(++n,r+=a.updatingProgress);if(s=!!(s||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||this._createGraphicsViewController||null!=(e=this.inputManager)&&e.hasPendingInputs||null!=(t=this.map)&&null!=(i=t.allLayers)&&i.some((e=>!e.isFulfilled()))),s?(this._numUpdating=Math.max(n,this._numUpdating),r+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?r/=this._numUpdating:r=s?0:1,this._get("updatingProgress")!==r){const e=this._resourceController.scheduler.now;if(r<1){const t=Math.min((e-this._lastUpdateTime)/2e3,1);r=this.updatingProgress*(1-t)+r*t}this._set("updatingProgress",r),this._lastUpdateTime=s&&r<1?e:0}return s}get viewingMode(){var e;const t=this._predeterminedViewingMode;if(f(t))return re(t);const i=this.spatialReference;return f(null==(e=this.defaultsFromMap)?void 0:e.viewingMode)&&i&&i.equals(this.defaultsFromMap.spatialReference)?re(this.defaultsFromMap.viewingMode):!i||Xe(i,ie.Global)?"global":"local"}set viewingMode(e){this.ready?it.error("#viewingMode","viewingMode cannot be set once view is ready"):e?this._override("viewingMode",e):void 0===e&&this._clearOverride("viewingMode")}get resourceController(){return this._resourceController}get performanceInfo(){return new Ce(this)}forceAnimationTime(e){this._stage.renderView.forcedAnimationTime=this.basemapTerrain.overlayManager.forcedAnimationTime=e}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return it.error("#toMap()","Scene view cannot be used before it is ready"),null;const i=t?this.externalToInternalIntersectOptions(t):this._defaultToMapOptions,r=f(i.graphics)&&(f(i.graphics.include)||f(i.graphics.exclude)),s=Qe(e)?$e(this,e):e,n=C(s);i.enableDraped=i.include&&!i.include.has(qe)||i.exclude&&i.exclude.has(qe);const a=this.sceneIntersectionHelper,o=He(this.state.viewingMode);if(o.options.selectionMode=!0,o.options.store=r?Ue.ALL:Ue.MIN,a.intersectIntersectorScreen(n,o,i),r){for(const e of o.results.all){const t=Fe(e,this);if(m(t))return this._intersectResultToMapPoint(e);if(this._testGraphicUidFilter(i.graphics,t))return this._intersectResultToMapPoint(e)}return null}return this._intersectResultToMapPoint(o.results.min)}toScreen(e){if(!this.ready)return it.error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=y(null==e.z&&be(this.elevationProvider,e),0);return D(e,lt,this.renderSpatialReference,t),this.state.camera.projectToScreen(lt,pt),O(pt[0],pt[1])}pixelSizeAt(e){return this.ready?e?(D(e,lt,this.renderSpatialReference),this.state.camera.computeScreenPixelSizeAt(lt)):0:(it.error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null)}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e):1}hitTest(e,t){if(!this.ready)return it.error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=Qe(e)?$e(this,e):e,r=P(i.x,i.y),s=t?this.externalToInternalIntersectOptions(t):this._defaultHitTestOptions;s.requiresGroundFeedback=!0,s.enableDraped=!0;const n=He(this.state.viewingMode);n.options.selectionMode=!0,n.options.store=Ue.ALL,this.sceneIntersectionHelper.intersectIntersectorScreen(r,n,s);const a=this._intersectResultsToHits(n.results.all,s.graphics),o=n.results.ground,l=We(o,this),p=f(l)&&"type"in l&&"integrated-mesh"===l.type?l:null,h={screenPoint:i,results:a,ground:{mapPoint:this._intersectResultToMapPoint(o),distance:De(o)?o.distanceInRenderSpace:0,layer:p}};return ve.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(h.intersector=n),Promise.resolve(h)}popupHitTest(e){return ze(this,e).then((({results:t,ground:i})=>{let r=null;return!(0===t.length||Math.abs(y(t[0].distance,0)-i.distance)<1e-5)||i.layer&&"integrated-mesh"===i.layer.type||(r=i.mapPoint),{results:t,screenPoint:e,mapPoint:r}}))}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(m(e.parent))throw new o("view:no-analysisview-for-analysis","The analysis has not been added to an AnalysisLayer or SceneView.analyses",{analysis:e});if("analysis"===e.parent.type){return(await this.whenLayerView(e.parent)).whenAnalysisView(e)}return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}takeScreenshot(e){return this.whenReady().then((()=>{const t=Ne(e,this);for(const e of this.map.allLayers.items)"voxel"===e.type&&(t.renderScreenshotTwice=!0);return t.pixelRatio/=this.pixelRatio,this._stage.renderView.takeScreenshot(Be(t,this.supersampleScreenshotsEnabled,this.padding))}))}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return ne.importLayerView(e)}hasLayerViewModule(e){return ne.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){var e,t,i,r;return this.map&&"initialViewProperties"in this.map&&(null==(e=this.map)||null==(t=e.initialViewProperties)?void 0:t.spatialReference)||(null==(i=this.defaultsFromMap)?void 0:i.spatialReference)||(null==(r=this.defaultsFromMap)?void 0:r.ready)&&this._initialDefaultSpatialReference||null}async validate(){let e=Ke(this.type);if(d("safari")&&d("safari")<9&&(e=new o("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:d("safari")})),f(e))throw it.warn("#validate()",e.message),e}get _predeterminedViewingMode(){var e,t;const i=this._isOverridden("viewingMode")?this._get("viewingMode"):null!=(e=this.map&&"initialViewProperties"in this.map?null==(t=this.map.initialViewProperties)?void 0:t.viewingMode:null)?e:null;return f(i)?se(i):null}getSpatialReferenceSupport({spatialReference:e,layer:t}){const i=this._predeterminedViewingMode;if(f(i))return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,ie.Local),s=this._validateSpatialReferenceForViewingMode(e,t,ie.Global);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Local)}:{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Global)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!Xe(e,i)&&(!!m(t)||(!X(t)||!m(Ie(t,e,i)))&&("voxel"!==t.type||i===ie.Local))}_makeSpatialReferenceConstraints(e,t,i){return t&&!X(t)&&"voxel"!==t.type&&(e.isWebMercator||e.isWGS84)?[{spatialReference:e,viewingMode:i},{spatialReference:e.isWebMercator?et.WGS84:et.WebMercator,viewingMode:i}]:[{spatialReference:e,viewingMode:i}]}_validateSpatialReference(e){const t=f(this.getSpatialReferenceSupport({spatialReference:e})),i=this._predeterminedViewingMode;return t||(f(i)?it.warnOnce(`Spatial reference defined on view not supported in ${re(i)} viewing mode.`):e.isGeographic&&it.warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}computeMapPointFromVec3d(e,t){let i=this.spatialReference||et.WGS84;return F(e,this.renderSpatialReference,e,i)||(i=et.WGS84,F(e,this.renderSpatialReference,e,i)),t?(t.x=e[0],t.y=e[1],t.z=e[2],t.spatialReference=i):t=new tt(e,i),t}trackGraphicState(e){if(!e.graphic)return it.error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&f(t)&&"graphics3d"in t&&t.graphics3d&&t.graphics3d.graphicsCore&&(i=t.graphics3d.graphicsCore.trackGraphicState(e))};return f(t)?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}highlight(e){if(Array.isArray(e))return p(e.map((e=>this.highlight(e))));if(n.isCollection(e))return p(e.toArray().map((e=>this.highlight(e))));const t=this.getViewForGraphic(e);return t&&"highlight"in t?t.highlight(e):h()}maskOccludee(e){if(!e)return it.error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&f(t)&&"graphics3d"in t&&ke(t)&&(i=t.maskOccludee(e))};return f(t)?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}getViewForGraphic(e){return e.layer===this.graphics?this.graphicsView:e.layer?this.allLayerViews.find((t=>t.layer===e.layer)):null}graphicChanged(e){f(this.graphicsView)&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){if(e.layer===this)return await R(this,"graphicsView"),this.graphicsView;if(!e.layer||!this.map)throw new o("no-view-for-graphic");return t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{-1!==s.added.indexOf(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer)}externalToInternalIntersectOptions(e){const t=this._externalToInternalRenderItems(e.include,ot.INCLUDE),i=this._externalToInternalRenderItems(e.exclude,ot.EXCLUDE);return{include:t.layerUids,exclude:i.layerUids,graphics:{include:t.graphicUids,exclude:i.graphicUids}}}_intersectResultToMapPoint(e,t){return e.getIntersectionPoint(lt)?(t=this.computeMapPointFromVec3d(lt,t),e.intersector===Ae.TERRAIN&&this.basemapTerrain&&(t.z=y(be(this.basemapTerrain,t),0)),t):null}_intersectResultsToHits(e,t){const i=new Array;let r=null;for(let s=0;s<e.length;s++){const n=e[s],a=We(n,this);if(f(a)&&(a===this.map.ground||"type"in a&&"integrated-mesh"===a.type))break;const o=Fe(n,this);if(!f(o))continue;if(m(r)&&s!==e.length-1&&(r=new Set),f(r)){const e=this._getGraphicFilterUid(o);if(r.has(e))continue;r.add(e)}if(!this._testGraphicUidFilter(t,o))continue;const l=this._intersectResultToMapPoint(n),p=n.distanceInRenderSpace;i.push({graphic:o,mapPoint:l,distance:p})}return i}_getGraphicFilterUid(e){if(e.layer&&"objectIdField"in e.layer){const t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}_testGraphicUidFilter(e,t){const i=this._getGraphicFilterUid(t);return m(e)||(m(e.include)||e.include.has(i))&&(m(e.exclude)||!e.exclude.has(i))}_externalToInternalRenderItems(e,t,s={layerUids:null,graphicUids:null}){if(!e)return s;if(e instanceof i)nt(s,this._getGraphicFilterUid(e)),t===ot.INCLUDE&&(f(this.graphicsView)&&e.layer===this?st(s,this.graphicsView.graphics3d.layer.id):e.layer&&st(s,e.layer.uid));else if(c(e))for(const i of e)i===this.graphics&&f(this.graphicsView)?st(s,this.graphicsView.graphics3d.layer.id):i instanceof r?i===this.map.ground&&st(s,qe):this._externalToInternalRenderItems(i,t,s);else st(s,e.uid);return s}_initBasemapTerrain(){this._set("basemapTerrain",new Ee({view:this})),this._set("elevationProvider",new we({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){this.basemapTerrain&&(this.elevationProvider.unregister(this.basemapTerrain),this.elevationProvider.destroy(),this._set("elevationProvider",null),this.basemapTerrain.destroy(),this._set("basemapTerrain",null))}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Pe({view:this})),this._set("featureTiles",new ge({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.contentCameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain&&this.basemapTerrain.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=f(this.basemapTerrain.extent)?A(z(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;f(this.clippingArea)?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.handles.add([this.updatingHandles.add((()=>ve.FEATURE_TILE_TREE_SHOW_TILES),(e=>{e&&this.featureTiles&&!this.featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this.featureTreeDebugger&&ve.FEATURE_TILE_TREE_SHOW_TILES&&(this.featureTreeDebugger=new e({view:this}))})):e||!this.featureTreeDebugger||ve.FEATURE_TILE_TREE_SHOW_TILES||(this.featureTreeDebugger.destroy(),this.featureTreeDebugger=null)}),b),this.updatingHandles.add((()=>this.clippingArea),e,b),this.updatingHandles.add((()=>this.basemapTerrain.extent),e,b)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.state&&(this.stateManager.deinit(),this.handles.remove("render-coords-helper"),this.handles.remove("feature-tiles"),this.featureTiles.destroy(),this._set("featureTiles",null),this.pointsOfInterest.destroy(),this._set("pointsOfInterest",null),this._exitBasemapTerrain(),this.state.exit(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference;this.mapCoordsHelper&&this.mapCoordsHelper.spatialReference.equals(e)||this._set("mapCoordsHelper",new Me(this.map,e));const t=this.state.isGlobal,i=B(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Ve.create(this.state.viewingMode,i)),t||this.handles.add(this.watch("basemapTerrain.extent",(e=>{const t=this.renderCoordsHelper.spatialReference;0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!W(e,this.basemapTerrain.spatialReference,ht,t)||(this.renderCoordsHelper.extent=ht)}),!0),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(Le/this.renderCoordsHelper.unitInMeters))}else this._set("mapCoordsHelper",null),this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.mapCoordsHelper&&(this.handles.remove("render-coords-helper"),this._set("renderCoordsHelper",null),this._set("mapCoordsHelper",null))}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){f(e)&&e.type===w.MOVE||(this.handles.remove("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.handles.add([e.watch(["updating","updatingProgress"],(()=>this._updatingChanged()),!0)],"updatingMonitors"),e.when((()=>this._updatingChanged()),(()=>this._updatingChanged())))})),this._updatingChanged())}_renderScreenshotOverlay(e,t){if(!this.overlay||!this.overlay.hasVisibleItems)return t;const i=e.getContext("2d");return i.putImageData(t,0,0),this.overlay.renderCanvas(e),i.getImageData(0,0,t.width,t.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,canvas:this.renderCanvas,screenshot:{renderOverlay:(e,t)=>this._renderScreenshotOverlay(e,t)}},t=new ye(this.state.viewingMode,(e=>this._stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=a(this.surface),{resourceController:r,state:s,renderSpatialReference:n}=this;this._stage=new Ge({options:e,container:i,resourceController:r,state:s,sceneIntersectionHelper:t,renderSR:n}),this._stage.renderView.setRenderParameters({slicePlane:this.slicePlane}),this._lostWebGLContextHandle=l(this._stage.renderView.canvas,"webglcontextlost",(()=>this.fatalError=new o("webgl-context-lost"))),this.handles.add([this.updatingHandles.add((()=>this.qualitySettings.antialiasingEnabled),(()=>this._stage.renderView.setRenderParameters({antialiasingEnabled:this.qualitySettings.antialiasingEnabled})),_),this.updatingHandles.add((()=>this.qualitySettings.highQualityTransparency),(()=>this._stage.renderView.setRenderParameters({highQualityTransparency:this.qualitySettings.highQualityTransparency})),_),x(this,"magnifier",(e=>this._stage.renderView.magnifier=e),!0)],"stage");const p=()=>{this._stage.renderView.setRenderParameters({defaultHighlightOptions:Se.toEngineOptions(this.highlightOptions)})};this.handles.add(this.updatingHandles.add((()=>[this.highlightOptions.color,this.highlightOptions.haloColor,this.highlightOptions.haloOpacity,this.highlightOptions.fillOpacity,this.highlightOptions.shadowOpacity,this.highlightOptions.shadowColor,this.highlightOptions.shadowDifference]),p),"stage"),p(),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(Le/this.renderCoordsHelper.unitInMeters),this._set("canvas",this._stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage.destroy(),this._stage=null,this._lostWebGLContextHandle.remove(),this._lostWebGLContextHandle=null,this.handles.remove("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this.state.init(e,this.spatialReference),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Oe({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state,objectResourceCache:new ue})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}_createGraphicsViewIfNeeded(){if(this.graphicsView||this._createGraphicsViewController)return;if(0===this.graphics.length)return;this.handles.remove("graphics-view"),this._createGraphicsViewController=new AbortController;const e=()=>{this._createGraphicsViewController=null,this._updatingChanged()};this._createGraphicsViewAsync(this._createGraphicsViewController.signal).then(e,e),this._updatingChanged()}async _createGraphicsViewAsync(e){const t=(await import("./3d/layers/GraphicsView3D.js")).default;v(e),await V(this.basemapTerrain,"ready",e),this._set("graphicsView",new t({view:this}))}_disposeGraphicsView(){this._createGraphicsViewController&&(this._createGraphicsViewController.abort(),this._createGraphicsViewController=null),this.handles.remove("graphics-view"),f(this.graphicsView)&&(this.handles.remove(this.graphicsView.graphics3d.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_startup(){const e=se(this.viewingMode);if(e===ie.Global&&(this._clippingArea=null),this._initSurface(e),this._set("ready",!0),this.handles.add(M(this,"graphics","after-changes",(()=>this._createGraphicsViewIfNeeded())),"graphics-view"),this._createGraphicsViewIfNeeded(),!this._externallySet.environment){const e=this.get("map.initialViewProperties.environment");e&&(this.environment=e)}this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const t=this._resolveWhenReady;this._resolveWhenReady=[],t.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this.labeler.dispose(),this._disposeGraphicsView(),this.handles.remove("graphics-view"),this._exitSurface(),this._set("ready",!1)}_updateDefaultToMapOptions(){if(this._defaultToMapOptions.include.clear(),this.map){this.map.ground&&this._defaultToMapOptions.include.add(qe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&this._defaultToMapOptions.include.add(e.uid)}}_updateDefaultHitTestOptions(){if(this._defaultHitTestOptions.exclude.clear(),this.map){this.map.ground&&this.map.ground.opacity<1&&this._defaultHitTestOptions.exclude.add(qe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&e.opacity<1&&this._defaultToMapOptions.exclude.add(e.uid)}}getVoxelWasmPerSceneView(){return $.getInstance().getVoxelWasmPerSceneView(this)}};function st(e,t){e.layerUids||(e.layerUids=new Set),e.layerUids.add(t)}function nt(e,t){e.graphicUids||(e.graphicUids=new Set),e.graphicUids.add(t)}function at(e,t){return f(e)&&U(e.spatialReference,t)?A(e,t):null}var ot;e([E()],rt.prototype,"_userClippingArea",void 0),e([E()],rt.prototype,"_resourceController",void 0),e([E()],rt.prototype,"_stage",void 0),e([E({readOnly:!0})],rt.prototype,"deconflictor",void 0),e([E({readOnly:!0})],rt.prototype,"labeler",void 0),e([E({type:te,readOnly:!0,aliasOf:"state.animation"})],rt.prototype,"animation",void 0),e([E({readOnly:!0})],rt.prototype,"basemapTerrain",void 0),e([E({readOnly:!0})],rt.prototype,"elevationProvider",void 0),e([E({type:t,aliasOf:"stateManager.camera"})],rt.prototype,"camera",void 0),e([E({type:t,aliasOf:"stateManager.contentCamera"})],rt.prototype,"contentCamera",void 0),e([E({readOnly:!0})],rt.prototype,"canvas",void 0),e([E({type:tt,aliasOf:"stateManager.center"})],rt.prototype,"center",void 0),e([E({type:Ye})],rt.prototype,"clippingArea",null),e([E({type:oe})],rt.prototype,"constraints",void 0),e([E({type:Ye,readOnly:!0})],rt.prototype,"renderDataExtent",null),e([E({type:Ye,readOnly:!0})],rt.prototype,"dataExtent",null),e([E({type:Ye,readOnly:!0})],rt.prototype,"groundAndLayersExtent",null),e([E({value:null,type:le})],rt.prototype,"environment",null),e([j("environment")],rt.prototype,"castEnvironment",null),e([E({readOnly:!0})],rt.prototype,"environmentManager",void 0),e([E({type:Ye,aliasOf:"stateManager.extent"})],rt.prototype,"extent",void 0),e([E()],rt.prototype,"floors",void 0),e([E({readOnly:!0,aliasOf:"stateManager.screenCenter"})],rt.prototype,"screenCenter",void 0),e([E({type:Number})],rt.prototype,"pixelRatio",null),e([E({type:Number,dependsOn:["qualitySettings.maximumPixelRatio","qualitySettings.maximumRenderResolution","size"]})],rt.prototype,"maximumPixelRatio",null),e([E({aliasOf:"stateManager.frustum"})],rt.prototype,"frustum",void 0),e([E({type:Number,readOnly:!0})],rt.prototype,"fullOpacity",void 0),e([E({readOnly:!0})],rt.prototype,"graphicsView",void 0),e([E({readOnly:!0})],rt.prototype,"analysisViewManager",void 0),e([E()],rt.prototype,"groundView",void 0),e([E({type:Boolean})],rt.prototype,"initialExtentRequired",null),e([E()],rt.prototype,"_defaultsFromMapSettings",null),e([E({type:Boolean,readOnly:!0})],rt.prototype,"interacting",null),e([E()],rt.prototype,"stationary",null),e([E({aliasOf:"state.navigating"})],rt.prototype,"navigating",void 0),e([E()],rt.prototype,"map",void 0),e([E({readOnly:!0})],rt.prototype,"mapCoordsHelper",void 0),e([E({aliasOf:"stateManager.padding"})],rt.prototype,"padding",void 0),e([E({type:Pe,readOnly:!0})],rt.prototype,"pointsOfInterest",void 0),e([E({type:ge,readOnly:!0})],rt.prototype,"featureTiles",void 0),e([E()],rt.prototype,"featureTreeDebugger",void 0),e([E({type:Boolean})],rt.prototype,"screenSizePerspectiveEnabled",void 0),e([E({constructOnly:!0})],rt.prototype,"deactivatedWebGLExtensions",void 0),e([E({constructOnly:!0})],rt.prototype,"debugWebGLExtensions",void 0),e([E({constructOnly:!0})],rt.prototype,"renderCanvas",void 0),e([E({constructOnly:!0})],rt.prototype,"state",void 0),e([E({readOnly:!0})],rt.prototype,"inputManager",void 0),e([E({readOnly:!0})],rt.prototype,"stateManager",void 0),e([E({type:["low","medium","high"]})],rt.prototype,"qualityProfile",null),e([E({type:xe,get(){let e=this._get("qualitySettings");return e||(e=new xe,_e.apply(this.qualityProfile,e)),e}})],rt.prototype,"qualitySettings",void 0),e([E()],rt.prototype,"slicePlane",null),e([E({readOnly:!0})],rt.prototype,"typeSpecificPreconditionsReady",null),e([E({readOnly:!0})],rt.prototype,"renderCoordsHelper",void 0),e([E({readOnly:!0})],rt.prototype,"sceneIntersectionHelper",void 0),e([E({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],rt.prototype,"resolution",null),e([E({type:Number,aliasOf:"stateManager.scale"})],rt.prototype,"scale",void 0),e([E()],rt.prototype,"heightModelInfo",null),e([E()],rt.prototype,"spatialReference",void 0),e([E({type:Boolean,constructOnly:!0})],rt.prototype,"alphaCompositingEnabled",void 0),e([E({type:Boolean})],rt.prototype,"supersampleScreenshotsEnabled",void 0),e([E({readOnly:!0})],rt.prototype,"type",void 0),e([E({type:Ze})],rt.prototype,"ui",void 0),e([E({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","_stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.hasPendingInputs","toolViewManager.updating","analysisViewManager.updating"]})],rt.prototype,"updating",null),e([E({type:Number,readOnly:!0,dependsOn:["updating"]})],rt.prototype,"updatingProgress",void 0),e([E({type:["global","local"]})],rt.prototype,"viewingMode",null),e([E({type:s,aliasOf:"stateManager.viewpoint"})],rt.prototype,"viewpoint",void 0),e([E({type:Number,aliasOf:"stateManager.zoom"})],rt.prototype,"zoom",void 0),e([E({type:Se})],rt.prototype,"highlightOptions",void 0),rt=e([I("esri.views.SceneView")],rt),function(e){e[e.INCLUDE=0]="INCLUDE",e[e.EXCLUDE=1]="EXCLUDE"}(ot||(ot={}));const lt=H(),pt=P(),ht=q(),dt=rt;export{dt as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import"../geometry.js";import i from"../Graphic.js";import r from"../Ground.js";import s from"../Viewpoint.js";import n from"../core/Collection.js";import{byId as a}from"../core/domUtils.js";import o from"../core/Error.js";import{on as l}from"../core/events.js";import{handlesGroup as p,makeHandle as h}from"../core/handleUtils.js";import d from"../core/has.js";import{isIterable as c}from"../core/iteratorUtils.js";import u from"../core/Logger.js";import{destroyMaybe as g,isNone as m,isSome as f,unwrapOr as y}from"../core/maybe.js";import{ObservableChangesType as w}from"../core/ObservableChangesType.js";import{throwIfAborted as v}from"../core/promiseUtils.js";import{initial as _,syncAndInitial as b}from"../core/reactiveUtils.js";import{setFrameDuration as M}from"../core/scheduling.js";import{on as R,whenOnce as S,init as x,whenTrueOnce as V}from"../core/watchUtils.js";import{initialize as C}from"../core/workers/workers.js";import{screenPointObjectToArray as T,createScreenPoint as O,createScreenPointArray as P}from"../core/screenUtils.js";import{property as E}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import{cast as j}from"../core/accessorSupport/decorators/cast.js";import{subclass as I}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as G}from"../core/accessorSupport/ensureType.js";import{c as H}from"../chunks/vec3f64.js";import L from"../geometry/HeightModelInfo.js";import{canProjectWithoutEngine as U,project as A,projectPointToVector as D,projectVectorToVector as F,projectBoundingRect as W}from"../geometry/projection.js";import{create as q,toExtent as z}from"../geometry/support/aaBoundingRect.js";import{B as k,a as N}from"../chunks/boundedPlane.js";import{renderSRFromViewSR as B}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as Q}from"../geometry/support/scaleUtils.js";import $ from"../layers/VoxelWasmManager.js";import{isTiledLayer as X}from"../layers/support/layerUtils.js";import{BreakpointsOwner as K}from"./BreakpointsOwner.js";import{DOMContainer as Z}from"./DOMContainer.js";import J from"./GroundView.js";import{PopupView as Y}from"./PopupView.js";import ee from"./View.js";import te from"./ViewAnimation.js";import{ViewingMode as ie,stringFromViewingMode as re,viewingModeFromString as se}from"./ViewingMode.js";import{layerView3DImporter as ne}from"./3d/layerViewModuleImportUtils.js";import ae from"./3d/analysis/AnalysisViewManager3D.js";import oe from"./3d/constraints/Constraints.js";import le from"./3d/environment/SceneViewEnvironment.js";import{SceneViewEnvironmentManager as pe}from"./3d/environment/SceneViewEnvironmentManager.js";import he from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as de}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as ce}from"./3d/layers/graphics/Labeler.js";import{ObjectResourceCache as ue}from"./3d/layers/graphics/ObjectResourceCache.js";import ge from"./3d/layers/support/FeatureTileTree3D.js";import me from"./3d/state/ViewState.js";import fe from"./3d/state/ViewStateManager.js";import{SceneIntersectionHelper as ye}from"./3d/state/helpers/SceneIntersectionHelper.js";import{CombinedElevationProvider as we}from"./3d/support/CombinedElevationProvider.js";import ve from"./3d/support/debugFlags.js";import _e from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as be}from"./3d/support/ElevationProvider.js";import Me from"./3d/support/HighlightOptions.js";import{MapCoordsHelper as Re}from"./3d/support/MapCoordsHelper.js";import{PropertiesPool as Se}from"./3d/support/PropertiesPool.js";import xe from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Ve}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ce}from"./3d/support/ResourceController.js";import Te from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Oe}from"./3d/support/SharedSymbolResources.js";import Pe from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Ee from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as je,getTiledLayerInfo as Ie}from"./3d/terrain/terrainUtils.js";import{Stage as Ge}from"./3d/webgl-engine/Stage.js";import{newIntersector as He,DEFAULT_TOLERANCE as Le}from"./3d/webgl-engine/lib/Intersector.js";import{StoreResults as Ue,IntersectorType as Ae}from"./3d/webgl-engine/lib/IntersectorInterfaces.js";import{isValidIntersectorResult as De}from"./3d/webgl-engine/lib/intersectorUtils.js";import{toGraphic as Fe,toOwner as We}from"./3d/webgl-engine/lib/intersectorUtilsConversions.js";import{TERRAIN_ID as qe}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{hitTestSelectSameDistance as ze}from"./support/hitTestSelectUtils.js";import{occludeesSupported as ke}from"./support/layerViewUtils.js";import{toRenderSettings as Ne,screenshotSuperSampleSettings as Be}from"./support/screenshotUtils.js";import{isSupportedScreenPointEvent as Qe,createScreenPointFromSupportedEvent as $e}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Xe}from"./support/spatialReferenceSupport.js";import{check as Ke}from"./support/WebGLRequirements.js";import Ze from"./ui/3d/DefaultUI3D.js";import Je from"../webscene/Environment.js";import Ye from"../geometry/Extent.js";import et from"../geometry/SpatialReference.js";import tt from"../geometry/Point.js";const it=u.getLogger("esri.views.SceneView");let rt=class extends(K(Z(Y(ee)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._defaults={},this._externallySet={environment:!1},this._createGraphicsViewController=null,this._resolveWhenReady=[],this.propertiesPool=new Se({slicePlane:k},this),this._resourceController=Ce(this),this._defaultToMapOptions={include:new Set},this._defaultHitTestOptions={exclude:new Set},this.deconflictor=new de({view:this}),this.labeler=new ce({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.basemapTerrain=null,this.elevationProvider=null,this.camera=null,this.canvas=null,this.center=null,this.constraints=new oe,this.environmentManager=new pe,this.extent=null,this.floors=new n,this.windowDevicePixelRatio=1,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new ae({view:this}),this.groundView=null,this.navigating=!1,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new me,this.scale=null,this.spatialReference=null,this.alphaCompositingEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new Ze,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this.viewpoint=null,this.zoom=null,this.highlightOptions=new Me,C(),e&&e.environment||(this._defaults.environment=new le,this.environment=this._defaults.environment);const t=e=>{f(e)&&e.type===w.MOVE||(this._updatingChanged(),this.map&&this.map.allLayers.forEach((async e=>{try{await e.when()}catch{}this._updatingChanged()})))};this.handles.add([R(this,"map.allLayers","after-changes",t,t,t,!0),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),this.watch("map",(e=>{e&&e.load&&e.load().catch((()=>{}))}))]),this.inputManager=new he({view:this});const i=()=>{const e=window.devicePixelRatio;e!==this.windowDevicePixelRatio&&(this.windowDevicePixelRatio=e,this.notifyChange("pixelRatio"))};this.stateManager=new fe({view:this,updateDevicePixelRatio:i})}initialize(){this.groundView=new J({view:this}),this._updateUpdatingMonitors();const e=()=>this._updateDefaultToMapOptions();this.handles.add(R(this,"map.allLayers","after-changes",e,e,e)),this.updatingHandles.add((()=>this.qualitySettings.memoryLimit),(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),_),this.updatingHandles.add((()=>this.qualitySettings.additionalCacheMemory),(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),_),this.updatingHandles.add((()=>this.qualitySettings.frameRate),(e=>M(e>0?1e3/Math.ceil(e):0)),_),this.updatingHandles.add((()=>ve.SCENEVIEW_LOCKING_LOG),(e=>this.defaultsFromMap.logDebugInformation=e),_),this.updatingHandles.add((()=>{var e;return null==(e=this.map)?void 0:e.ground}),e,b),this.updatingHandles.add((()=>{var e,t;return null==(e=this.map)||null==(t=e.ground)?void 0:t.opacity}),(()=>this._updateDefaultHitTestOptions()),b),this.handles.add(this.watch("spatialReference",(()=>this.notifyChange("clippingArea")),!0))}destroy(){this.destroyed||(this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._exitSurface(),this._disposeGraphicsView(),this.sharedSymbolResources=g(this.sharedSymbolResources),this.labeler.destroy(),this._set("labeler",null),this.deconflictor.destroy(),this._set("deconflictor",null),this._resourceController=g(this._resourceController),this.stateManager.destroy(),this._set("stateManager",null),this.inputManager.destroy(),this._set("inputManager",null),this.propertiesPool.destroy(),this.handles.remove("updatingMonitors"),this.environmentManager.destroy(),this._set("environmentManager",null),this.groundView=g(this.groundView))}get renderSpatialReference(){return this.renderCoordsHelper&&this.renderCoordsHelper.spatialReference}get basemapSpatialReference(){return this.basemapTerrain&&this.basemapTerrain.spatialReference}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get clippingArea(){if("global"===this.viewingMode)return null;let e=this._userClippingArea||this.get("map.clippingArea");return!(!!this._userClippingArea||this.get("map.clippingEnabled"))||m(e)?(this._clippingArea=null,null):e instanceof Ye?this.spatialReference&&(e=at(e,this.spatialReference),m(e))?(it.error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(e=e.clone(),m(e.intersection(this.groundAndLayersExtent))&&(e.xmin=e.xmax,e.ymin=e.ymax),e.zmin=void 0,e.zmax=void 0,e.equals(this._clippingArea)||(this._clippingArea=e),this._clippingArea):(it.error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&f(e)?it.error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===ie.Global)return null;const e=this.renderSpatialReference,t=this.dataExtent;return m(t)||m(e)||t.spatialReference.equals(e)?t:at(t,e)}get dataExtent(){let e=this.groundAndLayersExtent;const t=this.spatialReference||et.WGS84,i=at(this.clippingArea,t);f(i)&&(e=f(e)?e.intersection(i):i);const r=this._get("dataExtent");return f(e)&&e.equals(r)?r:e}get groundAndLayersExtent(){const e=this.spatialReference||et.WGS84;let t;const i=i=>{const r=at(i,e);m(r)||(f(t)?t.union(r):t=r.clone())},r=this.basemapTerrain;if(null!=r&&r.spatialReference){const e=r.groundExtent;i(new Ye({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}if(this.map){const e=e=>{!f(e.fullExtent)||"graphics"===e.type&&e.internal||i(e.fullExtent)};this.map.allLayers.forEach((t=>e(t)))}if(m(t))return null;t.hasZ?(t.zmin=Math.min(0,t.zmin),t.zmax=Math.max(0,t.zmax)):(t.zmin=0,t.zmax=0);const s=this._get("groundAndLayersExtent");return t.equals(s)?s:t}set environment(e){e!==this._defaults.environment&&(this._externallySet.environment=!0),this._set("environment",e)}castEnvironment(e){return e?e instanceof le?e:e instanceof Je?null!=this.environment?this.environment.cloneWithWebsceneEnvironment(e):le.fromWebsceneEnvironment(e):G(le,e):new le}get pixelRatio(){return Math.min(this.windowDevicePixelRatio,this.maximumPixelRatio)}set pixelRatio(e){f(e)?this._override("pixelRatio",e):this._clearOverride("pixelRatio")}get maximumPixelRatio(){let e=1/0;const{maximumPixelRatio:t,maximumRenderResolution:i}=this.qualitySettings;if(null!=t&&(e=Math.min(e,t)),null!=i){const t=i/Math.max(this.width,this.height);e=Math.min(e,t)}return e}set maximumPixelRatio(e){f(e)?this._override("maximumPixelRatio",e):this._clearOverride("maximumPixelRatio")}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get _defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||f(this.activeTool)}get stationary(){return!this.animation&&!this.resizing&&(m(this.state)||this.state.stationary)}set qualityProfile(e){_e.isValidProfile(e)&&(_e.apply(e,this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||_e.getDefaultProfile()}set slicePlane(e){if(f(this._stage)&&this._stage.renderView.setRenderParameters({slicePlane:e}),m(e))return void this._set("slicePlane",null);const t=this.propertiesPool.get("slicePlane");N(e,t),this._set("slicePlane",t)}get typeSpecificPreconditionsReady(){return!!this.viewingMode}get resolution(){return null!=this.spatialReference?Q(this.scale,this.spatialReference):0}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?L.deriveUnitFromSR(e,this.spatialReference):null}get updating(){var e,t,i;if(this.destroyed)return!1;let r=0,s=this.layerViewManager.updating,n=s?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((e=>{if(e.isFulfilled()){if(e.updating){if(s=!0,e.suspended||je(e))return;++n,r+=e.updatingProgress}}else++n}));for(const a of[this.graphicsView,this.basemapView,this._resourceController,this._stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this.featureTreeDebugger,this.toolViewManager,this.analysisViewManager])if(f(a)&&a.updating){const e=.1;n+=e,r+=.5*e}for(const a of[this.deconflictor,this.labeler,this.basemapTerrain])f(a)&&a.updating&&(++n,r+=a.updatingProgress);if(s=!!(s||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||this._createGraphicsViewController||null!=(e=this.inputManager)&&e.hasPendingInputs||null!=(t=this.map)&&null!=(i=t.allLayers)&&i.some((e=>!e.isFulfilled()))),s?(this._numUpdating=Math.max(n,this._numUpdating),r+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?r/=this._numUpdating:r=s?0:1,this._get("updatingProgress")!==r){const e=this._resourceController.scheduler.now;if(r<1){const t=Math.min((e-this._lastUpdateTime)/2e3,1);r=this.updatingProgress*(1-t)+r*t}this._set("updatingProgress",r),this._lastUpdateTime=s&&r<1?e:0}return s}get viewingMode(){var e;const t=this._predeterminedViewingMode;if(f(t))return re(t);const i=this.spatialReference;return f(null==(e=this.defaultsFromMap)?void 0:e.viewingMode)&&i&&i.equals(this.defaultsFromMap.spatialReference)?re(this.defaultsFromMap.viewingMode):!i||Xe(i,ie.Global)?"global":"local"}set viewingMode(e){this.ready?it.error("#viewingMode","viewingMode cannot be set once view is ready"):e?this._override("viewingMode",e):void 0===e&&this._clearOverride("viewingMode")}get resourceController(){return this._resourceController}get performanceInfo(){return new Te(this)}forceAnimationTime(e){this._stage.renderView.forcedAnimationTime=this.basemapTerrain.overlayManager.forcedAnimationTime=e}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return it.error("#toMap()","Scene view cannot be used before it is ready"),null;const i=t?this.externalToInternalIntersectOptions(t):this._defaultToMapOptions,r=f(i.graphics)&&(f(i.graphics.include)||f(i.graphics.exclude)),s=Qe(e)?$e(this,e):e,n=T(s);i.enableDraped=i.include&&!i.include.has(qe)||i.exclude&&i.exclude.has(qe);const a=this.sceneIntersectionHelper,o=He(this.state.viewingMode);if(o.options.selectionMode=!0,o.options.store=r?Ue.ALL:Ue.MIN,a.intersectIntersectorScreen(n,o,i),r){for(const e of o.results.all){const t=Fe(e,this);if(m(t))return this._intersectResultToMapPoint(e);if(this._testGraphicUidFilter(i.graphics,t))return this._intersectResultToMapPoint(e)}return null}return this._intersectResultToMapPoint(o.results.min)}toScreen(e){if(!this.ready)return it.error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=y(null==e.z&&be(this.elevationProvider,e),0);return D(e,lt,this.renderSpatialReference,t),this.state.camera.projectToScreen(lt,pt),O(pt[0],pt[1])}pixelSizeAt(e){return this.ready?e?(D(e,lt,this.renderSpatialReference),this.state.camera.computeScreenPixelSizeAt(lt)):0:(it.error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null)}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e):1}hitTest(e,t){if(!this.ready)return it.error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=Qe(e)?$e(this,e):e,r=P(i.x,i.y),s=t?this.externalToInternalIntersectOptions(t):this._defaultHitTestOptions;s.requiresGroundFeedback=!0,s.enableDraped=!0;const n=He(this.state.viewingMode);n.options.selectionMode=!0,n.options.store=Ue.ALL,this.sceneIntersectionHelper.intersectIntersectorScreen(r,n,s);const a=this._intersectResultsToHits(n.results.all,s.graphics),o=n.results.ground,l=We(o,this),p=f(l)&&"type"in l&&"integrated-mesh"===l.type?l:null,h={screenPoint:i,results:a,ground:{mapPoint:this._intersectResultToMapPoint(o),distance:De(o)?o.distanceInRenderSpace:0,layer:p}};return ve.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(h.intersector=n),Promise.resolve(h)}popupHitTest(e){return ze(this,e).then((({results:t,ground:i})=>{let r=null;return!(0===t.length||Math.abs(y(t[0].distance,0)-i.distance)<1e-5)||i.layer&&"integrated-mesh"===i.layer.type||(r=i.mapPoint),{results:t,screenPoint:e,mapPoint:r}}))}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(m(e.parent))throw new o("view:no-analysisview-for-analysis","The analysis has not been added to an AnalysisLayer or SceneView.analyses",{analysis:e});if("analysis"===e.parent.type){return(await this.whenLayerView(e.parent)).whenAnalysisView(e)}return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}takeScreenshot(e){return this.whenReady().then((()=>{const t=Ne(e,this);return t.pixelRatio/=this.pixelRatio,this._stage.renderView.takeScreenshot(Be(t,this.supersampleScreenshotsEnabled,this.padding))}))}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return ne.importLayerView(e)}hasLayerViewModule(e){return ne.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){var e,t,i,r;return this.map&&"initialViewProperties"in this.map&&(null==(e=this.map)||null==(t=e.initialViewProperties)?void 0:t.spatialReference)||(null==(i=this.defaultsFromMap)?void 0:i.spatialReference)||(null==(r=this.defaultsFromMap)?void 0:r.ready)&&this._initialDefaultSpatialReference||null}async validate(){let e=Ke(this.type);if(d("safari")&&d("safari")<9&&(e=new o("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:d("safari")})),f(e))throw it.warn("#validate()",e.message),e}get _predeterminedViewingMode(){var e,t;const i=this._isOverridden("viewingMode")?this._get("viewingMode"):null!=(e=this.map&&"initialViewProperties"in this.map?null==(t=this.map.initialViewProperties)?void 0:t.viewingMode:null)?e:null;return f(i)?se(i):null}getSpatialReferenceSupport({spatialReference:e,layer:t}){const i=this._predeterminedViewingMode;if(f(i))return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,ie.Local),s=this._validateSpatialReferenceForViewingMode(e,t,ie.Global);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Local)}:{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Global)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!Xe(e,i)&&(!!m(t)||(!X(t)||!m(Ie(t,e,i)))&&("voxel"!==t.type||i===ie.Local))}_makeSpatialReferenceConstraints(e,t,i){return t&&!X(t)&&"voxel"!==t.type&&(e.isWebMercator||e.isWGS84)?[{spatialReference:e,viewingMode:i},{spatialReference:e.isWebMercator?et.WGS84:et.WebMercator,viewingMode:i}]:t&&X(t)&&e.isWebMercator&&i!==ie.Global?[{spatialReference:e,viewingMode:i},{spatialReference:et.WGS84,viewingMode:ie.Local}]:[{spatialReference:e,viewingMode:i}]}_validateSpatialReference(e){const t=f(this.getSpatialReferenceSupport({spatialReference:e})),i=this._predeterminedViewingMode;return t||(f(i)?it.warnOnce(`Spatial reference defined on view not supported in ${re(i)} viewing mode.`):e.isGeographic&&it.warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}computeMapPointFromVec3d(e,t){let i=this.spatialReference||et.WGS84;return F(e,this.renderSpatialReference,e,i)||(i=et.WGS84,F(e,this.renderSpatialReference,e,i)),t?(t.x=e[0],t.y=e[1],t.z=e[2],t.spatialReference=i):t=new tt(e,i),t}trackGraphicState(e){if(!e.graphic)return it.error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&f(t)&&"processor"in t&&t.processor&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return f(t)?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}highlight(e){if(Array.isArray(e))return p(e.map((e=>this.highlight(e))));if(n.isCollection(e))return p(e.toArray().map((e=>this.highlight(e))));const t=this.getViewForGraphic(e);return t&&"highlight"in t?t.highlight(e):h()}maskOccludee(e){if(!e)return it.error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&f(t)&&ke(t)&&(i=t.maskOccludee(e))};return f(t)?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}getViewForGraphic(e){return e.layer===this.graphics?this.graphicsView:e.layer?this.allLayerViews.find((t=>t.layer===e.layer)):null}graphicChanged(e){f(this.graphicsView)&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){if(e.layer===this)return await S(this,"graphicsView"),this.graphicsView;if(!e.layer||!this.map)throw new o("no-view-for-graphic");return t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{-1!==s.added.indexOf(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer)}externalToInternalIntersectOptions(e){const t=this._externalToInternalRenderItems(e.include,ot.INCLUDE),i=this._externalToInternalRenderItems(e.exclude,ot.EXCLUDE);return{include:t.layerUids,exclude:i.layerUids,graphics:{include:t.graphicUids,exclude:i.graphicUids}}}_intersectResultToMapPoint(e,t){return e.getIntersectionPoint(lt)?(t=this.computeMapPointFromVec3d(lt,t),e.intersector===Ae.TERRAIN&&this.basemapTerrain&&(t.z=y(be(this.basemapTerrain,t),0)),t):null}_intersectResultsToHits(e,t){const i=new Array;let r=null;for(let s=0;s<e.length;s++){const n=e[s],a=We(n,this);if(f(a)&&(a===this.map.ground||"type"in a&&"integrated-mesh"===a.type))break;const o=Fe(n,this);if(!f(o))continue;if(m(r)&&s!==e.length-1&&(r=new Set),f(r)){const e=this._getGraphicFilterUid(o);if(r.has(e))continue;r.add(e)}if(!this._testGraphicUidFilter(t,o))continue;const l=this._intersectResultToMapPoint(n),p=n.distanceInRenderSpace;i.push({graphic:o,mapPoint:l,distance:p})}return i}_getGraphicFilterUid(e){if(e.layer&&"objectIdField"in e.layer){const t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}_testGraphicUidFilter(e,t){const i=this._getGraphicFilterUid(t);return m(e)||(m(e.include)||e.include.has(i))&&(m(e.exclude)||!e.exclude.has(i))}_externalToInternalRenderItems(e,t,s={layerUids:null,graphicUids:null}){if(!e)return s;if(e instanceof i)nt(s,this._getGraphicFilterUid(e)),t===ot.INCLUDE&&(f(this.graphicsView)&&e.layer===this?st(s,this.graphicsView.processor.layer.id):e.layer&&st(s,e.layer.uid));else if(c(e))for(const i of e)i===this.graphics&&f(this.graphicsView)?st(s,this.graphicsView.processor.layer.id):i instanceof r?i===this.map.ground&&st(s,qe):this._externalToInternalRenderItems(i,t,s);else st(s,e.uid);return s}_initBasemapTerrain(){this._set("basemapTerrain",new Ee({view:this})),this._set("elevationProvider",new we({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){this.basemapTerrain&&(this.elevationProvider.unregister(this.basemapTerrain),this.elevationProvider.destroy(),this._set("elevationProvider",null),this.basemapTerrain.destroy(),this._set("basemapTerrain",null))}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Pe({view:this})),this._set("featureTiles",new ge({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.contentCameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain&&this.basemapTerrain.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=f(this.basemapTerrain.extent)?A(z(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;f(this.clippingArea)?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.handles.add([this.updatingHandles.add((()=>ve.FEATURE_TILE_TREE_SHOW_TILES),(e=>{e&&this.featureTiles&&!this.featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this.featureTreeDebugger&&ve.FEATURE_TILE_TREE_SHOW_TILES&&(this.featureTreeDebugger=new e({view:this}))})):e||!this.featureTreeDebugger||ve.FEATURE_TILE_TREE_SHOW_TILES||(this.featureTreeDebugger.destroy(),this.featureTreeDebugger=null)}),b),this.updatingHandles.add((()=>this.clippingArea),e,b),this.updatingHandles.add((()=>this.basemapTerrain.extent),e,b)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.state&&(this.stateManager.deinit(),this.handles.remove("render-coords-helper"),this.handles.remove("feature-tiles"),this.featureTiles.destroy(),this._set("featureTiles",null),this.pointsOfInterest.destroy(),this._set("pointsOfInterest",null),this._exitBasemapTerrain(),this.state.exit(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference;this.mapCoordsHelper&&this.mapCoordsHelper.spatialReference.equals(e)||this._set("mapCoordsHelper",new Re(this.map,e));const t=this.state.isGlobal,i=B(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Ve.create(this.state.viewingMode,i)),t||this.handles.add(this.watch("basemapTerrain.extent",(e=>{const t=this.renderCoordsHelper.spatialReference;0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!W(e,this.basemapTerrain.spatialReference,ht,t)||(this.renderCoordsHelper.extent=ht)}),!0),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(Le/this.renderCoordsHelper.unitInMeters))}else this._set("mapCoordsHelper",null),this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.mapCoordsHelper&&(this.handles.remove("render-coords-helper"),this._set("renderCoordsHelper",null),this._set("mapCoordsHelper",null))}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){f(e)&&e.type===w.MOVE||(this.handles.remove("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.handles.add([e.watch(["updating","updatingProgress"],(()=>this._updatingChanged()),!0)],"updatingMonitors"),e.when((()=>this._updatingChanged()),(()=>this._updatingChanged())))})),this._updatingChanged())}_renderScreenshotOverlay(e,t){if(!this.overlay||!this.overlay.hasVisibleItems)return t;const i=e.getContext("2d");return i.putImageData(t,0,0),this.overlay.renderCanvas(e),i.getImageData(0,0,t.width,t.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,canvas:this.renderCanvas,screenshot:{renderOverlay:(e,t)=>this._renderScreenshotOverlay(e,t)}},t=new ye(this.state.viewingMode,(e=>this._stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=a(this.surface),{resourceController:r,state:s,renderSpatialReference:n}=this;this._stage=new Ge({options:e,container:i,resourceController:r,state:s,sceneIntersectionHelper:t,renderSR:n}),this._stage.renderView.setRenderParameters({slicePlane:this.slicePlane}),this._lostWebGLContextHandle=l(this._stage.renderView.canvas,"webglcontextlost",(()=>this.fatalError=new o("webgl-context-lost"))),this.handles.add([this.updatingHandles.add((()=>this.qualitySettings.antialiasingEnabled),(()=>this._stage.renderView.setRenderParameters({antialiasingEnabled:this.qualitySettings.antialiasingEnabled})),_),this.updatingHandles.add((()=>this.qualitySettings.highQualityTransparency),(()=>this._stage.renderView.setRenderParameters({highQualityTransparency:this.qualitySettings.highQualityTransparency})),_),x(this,"magnifier",(e=>this._stage.renderView.magnifier=e),!0)],"stage");const p=()=>{this._stage.renderView.setRenderParameters({defaultHighlightOptions:Me.toEngineOptions(this.highlightOptions)})};this.handles.add(this.updatingHandles.add((()=>[this.highlightOptions.color,this.highlightOptions.haloColor,this.highlightOptions.haloOpacity,this.highlightOptions.fillOpacity,this.highlightOptions.shadowOpacity,this.highlightOptions.shadowColor,this.highlightOptions.shadowDifference]),p),"stage"),p(),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(Le/this.renderCoordsHelper.unitInMeters),this._set("canvas",this._stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage.destroy(),this._stage=null,this._lostWebGLContextHandle.remove(),this._lostWebGLContextHandle=null,this.handles.remove("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this.state.init(e,this.spatialReference),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Oe({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state,objectResourceCache:new ue})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}_createGraphicsViewIfNeeded(){if(this.graphicsView||this._createGraphicsViewController)return;if(0===this.graphics.length)return;this.handles.remove("graphics-view"),this._createGraphicsViewController=new AbortController;const e=()=>{this._createGraphicsViewController=null,this._updatingChanged()};this._createGraphicsViewAsync(this._createGraphicsViewController.signal).then(e,e),this._updatingChanged()}async _createGraphicsViewAsync(e){const t=(await import("./3d/layers/GraphicsView3D.js")).default;v(e),await V(this.basemapTerrain,"ready",e),this._set("graphicsView",new t({view:this}))}_disposeGraphicsView(){this._createGraphicsViewController&&(this._createGraphicsViewController.abort(),this._createGraphicsViewController=null),this.handles.remove("graphics-view"),f(this.graphicsView)&&(this.handles.remove(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_startup(){const e=se(this.viewingMode);if(e===ie.Global&&(this._clippingArea=null),this._initSurface(e),this._set("ready",!0),this.handles.add(R(this,"graphics","after-changes",(()=>this._createGraphicsViewIfNeeded())),"graphics-view"),this._createGraphicsViewIfNeeded(),!this._externallySet.environment){const e=this.get("map.initialViewProperties.environment");e&&(this.environment=e)}this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const t=this._resolveWhenReady;this._resolveWhenReady=[],t.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this.labeler.dispose(),this._disposeGraphicsView(),this.handles.remove("graphics-view"),this._exitSurface(),this._set("ready",!1)}_updateDefaultToMapOptions(){if(this._defaultToMapOptions.include.clear(),this.map){this.map.ground&&this._defaultToMapOptions.include.add(qe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&this._defaultToMapOptions.include.add(e.uid)}}_updateDefaultHitTestOptions(){if(this._defaultHitTestOptions.exclude.clear(),this.map){this.map.ground&&this.map.ground.opacity<1&&this._defaultHitTestOptions.exclude.add(qe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&e.opacity<1&&this._defaultToMapOptions.exclude.add(e.uid)}}getVoxelWasmPerSceneView(){return $.getInstance().getVoxelWasmPerSceneView(this)}};function st(e,t){e.layerUids||(e.layerUids=new Set),e.layerUids.add(t)}function nt(e,t){e.graphicUids||(e.graphicUids=new Set),e.graphicUids.add(t)}function at(e,t){return f(e)&&U(e.spatialReference,t)?A(e,t):null}var ot;e([E()],rt.prototype,"_userClippingArea",void 0),e([E()],rt.prototype,"_resourceController",void 0),e([E()],rt.prototype,"_stage",void 0),e([E({readOnly:!0})],rt.prototype,"deconflictor",void 0),e([E({readOnly:!0})],rt.prototype,"labeler",void 0),e([E({type:te,readOnly:!0,aliasOf:"state.animation"})],rt.prototype,"animation",void 0),e([E({readOnly:!0})],rt.prototype,"basemapTerrain",void 0),e([E({readOnly:!0})],rt.prototype,"elevationProvider",void 0),e([E({type:t,aliasOf:"stateManager.camera"})],rt.prototype,"camera",void 0),e([E({type:t,aliasOf:"stateManager.contentCamera"})],rt.prototype,"contentCamera",void 0),e([E({readOnly:!0})],rt.prototype,"canvas",void 0),e([E({type:tt,aliasOf:"stateManager.center"})],rt.prototype,"center",void 0),e([E({type:Ye})],rt.prototype,"clippingArea",null),e([E({type:oe})],rt.prototype,"constraints",void 0),e([E({type:Ye,readOnly:!0})],rt.prototype,"renderDataExtent",null),e([E({type:Ye,readOnly:!0})],rt.prototype,"dataExtent",null),e([E({type:Ye,readOnly:!0})],rt.prototype,"groundAndLayersExtent",null),e([E({value:null,type:le})],rt.prototype,"environment",null),e([j("environment")],rt.prototype,"castEnvironment",null),e([E({readOnly:!0})],rt.prototype,"environmentManager",void 0),e([E({type:Ye,aliasOf:"stateManager.extent"})],rt.prototype,"extent",void 0),e([E()],rt.prototype,"floors",void 0),e([E({readOnly:!0,aliasOf:"stateManager.screenCenter"})],rt.prototype,"screenCenter",void 0),e([E({type:Number})],rt.prototype,"pixelRatio",null),e([E({type:Number,dependsOn:["qualitySettings.maximumPixelRatio","qualitySettings.maximumRenderResolution","size"]})],rt.prototype,"maximumPixelRatio",null),e([E({aliasOf:"stateManager.frustum"})],rt.prototype,"frustum",void 0),e([E({type:Number,readOnly:!0})],rt.prototype,"fullOpacity",void 0),e([E({readOnly:!0})],rt.prototype,"graphicsView",void 0),e([E({readOnly:!0})],rt.prototype,"analysisViewManager",void 0),e([E()],rt.prototype,"groundView",void 0),e([E({type:Boolean})],rt.prototype,"initialExtentRequired",null),e([E()],rt.prototype,"_defaultsFromMapSettings",null),e([E({type:Boolean,readOnly:!0})],rt.prototype,"interacting",null),e([E()],rt.prototype,"stationary",null),e([E({aliasOf:"state.navigating"})],rt.prototype,"navigating",void 0),e([E()],rt.prototype,"map",void 0),e([E({readOnly:!0})],rt.prototype,"mapCoordsHelper",void 0),e([E({aliasOf:"stateManager.padding"})],rt.prototype,"padding",void 0),e([E({type:Pe,readOnly:!0})],rt.prototype,"pointsOfInterest",void 0),e([E({type:ge,readOnly:!0})],rt.prototype,"featureTiles",void 0),e([E()],rt.prototype,"featureTreeDebugger",void 0),e([E({type:Boolean})],rt.prototype,"screenSizePerspectiveEnabled",void 0),e([E({constructOnly:!0})],rt.prototype,"deactivatedWebGLExtensions",void 0),e([E({constructOnly:!0})],rt.prototype,"debugWebGLExtensions",void 0),e([E({constructOnly:!0})],rt.prototype,"renderCanvas",void 0),e([E({constructOnly:!0})],rt.prototype,"state",void 0),e([E({readOnly:!0})],rt.prototype,"inputManager",void 0),e([E({readOnly:!0})],rt.prototype,"stateManager",void 0),e([E({type:["low","medium","high"]})],rt.prototype,"qualityProfile",null),e([E({type:xe,get(){let e=this._get("qualitySettings");return e||(e=new xe,_e.apply(this.qualityProfile,e)),e}})],rt.prototype,"qualitySettings",void 0),e([E()],rt.prototype,"slicePlane",null),e([E({readOnly:!0})],rt.prototype,"typeSpecificPreconditionsReady",null),e([E({readOnly:!0})],rt.prototype,"renderCoordsHelper",void 0),e([E({readOnly:!0})],rt.prototype,"sceneIntersectionHelper",void 0),e([E({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],rt.prototype,"resolution",null),e([E({type:Number,aliasOf:"stateManager.scale"})],rt.prototype,"scale",void 0),e([E()],rt.prototype,"heightModelInfo",null),e([E()],rt.prototype,"spatialReference",void 0),e([E({type:Boolean,constructOnly:!0})],rt.prototype,"alphaCompositingEnabled",void 0),e([E({type:Boolean})],rt.prototype,"supersampleScreenshotsEnabled",void 0),e([E({readOnly:!0})],rt.prototype,"type",void 0),e([E({type:Ze})],rt.prototype,"ui",void 0),e([E({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","_stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.hasPendingInputs","toolViewManager.updating","analysisViewManager.updating"]})],rt.prototype,"updating",null),e([E({type:Number,readOnly:!0,dependsOn:["updating"]})],rt.prototype,"updatingProgress",void 0),e([E({type:["global","local"]})],rt.prototype,"viewingMode",null),e([E({type:s,aliasOf:"stateManager.viewpoint"})],rt.prototype,"viewpoint",void 0),e([E({type:Number,aliasOf:"stateManager.zoom"})],rt.prototype,"zoom",void 0),e([E({type:Me})],rt.prototype,"highlightOptions",void 0),rt=e([I("esri.views.SceneView")],rt),function(e){e[e.INCLUDE=0]="INCLUDE",e[e.EXCLUDE=1]="EXCLUDE"}(ot||(ot={}));const lt=H(),pt=P(),ht=q(),dt=rt;export{dt 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.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../geometry.js";import{handlesGroup as t}from"../../core/handleUtils.js";import{clone as n}from"../../core/lang.js";import{clamp as e}from"../../core/mathUtils.js";import{isSome as r,isNone as o,unwrap as a}from"../../core/maybe.js";import{createScreenPoint as c}from"../../core/screenUtils.js";import{f as s}from"../../chunks/vec3f64.js";import{project as i}from"../../geometry/projection.js";import{ViewingMode as l}from"../ViewingMode.js";import{move as u}from"../draw/support/drawUtils.js";import m from"../../geometry/Point.js";function f(t,n){let e=null,a=null;return c=>{if("cancel"===c.action)return void(r(a)&&(a.execute({action:"cancel"}),e=null,a=null));const s={action:c.action,screenStart:c.start,screenEnd:c.screenPoint};"start"===c.action&&o(e)&&(e=new
|
|
5
|
+
import"../../geometry.js";import{handlesGroup as t}from"../../core/handleUtils.js";import{clone as n}from"../../core/lang.js";import{clamp as e}from"../../core/mathUtils.js";import{isSome as r,isNone as o,unwrap as a}from"../../core/maybe.js";import{createScreenPoint as c}from"../../core/screenUtils.js";import{f as s}from"../../chunks/vec3f64.js";import{project as i}from"../../geometry/projection.js";import{ViewingMode as l}from"../ViewingMode.js";import{move as u}from"../draw/support/drawUtils.js";import m from"../../geometry/Point.js";function f(t,n){let e=null,a=null;return c=>{if("cancel"===c.action)return void(r(a)&&(a.execute({action:"cancel"}),e=null,a=null));const s={action:c.action,screenStart:c.start,screenEnd:c.screenPoint};"start"===c.action&&o(e)&&(e=new G,a=new G,n(t,e,a,c.pointerType,s)),r(e)&&e.execute(s),"end"===c.action&&r(e)&&(e=null,a=null)}}function p(t,n){return t.events.on("drag",f(t,n))}function y(n,e){const r=[];for(const t of n)r.push(p(t,e));return t(r)}function d(t,n){const e=[t.x,t.y,t.z],r=n,o=[Math.cos(r),Math.sin(r)],a=Math.sqrt(o[0]*o[0]+o[1]*o[1]);if(0===a)return null;o[0]/=a,o[1]/=a;const c=t=>{const n=(t.x-e[0])*o[0]+(t.y-e[1])*o[1];t.x=e[0]+n*o[0],t.y=e[1]+n*o[1]};return t=>(c(t.mapStart),c(t.mapEnd),t)}function x(t,n){let e=null;return r=>{if("start"===r.action&&(e=h(t,r.mapStart.spatialReference,n)),o(e))return null;const a=r.mapEnd.x-r.mapStart.x,c=r.mapEnd.y-r.mapStart.y,s=r.mapEnd.z-r.mapStart.z;return e.move(a,c,s),{...r,translationX:a,translationY:c,translationZ:s}}}function g(t,n){return o(t)?null:t.spatialReference.equals(n)?t.clone():i(t,n)}function h(t,n,e){const r=t.geometry;if(o(r))return null;if("mesh"===r.type)return E(t,r,n,e);const a=g(r,n),c=r.spatialReference;return o(a)?null:{move:(n,e,r)=>{const o=u(a.clone(),n,e,r);o.spatialReference.equals(c)?t.geometry=o:t.geometry=i(o,c)}}}function E(t,n,e,o){if(r(n.transform))return S(t,n,n.transform,e);if(!n.spatialReference.equals(e))return null;let a=0,c=0,s=0;return{move:(e,r,i)=>{const u=e-a,f=r-c,p=i-s;if(u||f||p){const y=new m(n.origin.x+u,n.origin.y+f,n.origin.z+p,n.origin.spatialReference);n.centerAt(y,{geographic:o===l.Global}),t.notifyGeometryChanged(),a=e,c=r,s=i}}}}function S(t,n,e,a){const c=g(e.getOriginPoint(n.spatialReference),a),l=n.spatialReference;return o(c)?null:{move:(n,o,a)=>{const m=u(c.clone(),n,o,a);if(m.spatialReference.equals(l))e.origin=s(m.x,m.y,m.z);else{const t=i(m,l);r(t)&&(e.origin=s(t.x,t.y,t.z))}t.notifyMeshTransformChanged(),t.notifyGeometryChanged()}}}function j(t,n=null,e){let a=null;const c=r(n)&&!t.spatialReference.equals(n)?t=>r(t)?i(t,n):t:t=>t,s={exclude:[],...e};return n=>{if("start"===n.action&&(a=c(t.toMap(n.screenStart,s))),o(a))return null;const e=c(t.toMap(n.screenEnd,s));return r(e)?{...n,mapStart:a,mapEnd:e}:null}}function R(t,n){const e=t.map((t=>a(x(t,n)))).filter((t=>r(t)));return t=>{const n=t.mapEnd.x-t.mapStart.x,r=t.mapEnd.y-t.mapStart.y,o=t.mapEnd.z-t.mapStart.z;return e.forEach((n=>n(t))),{...t,translationX:n,translationY:r,translationZ:o}}}function z(t,e){const r=new Map;for(const o of e)r.set(o,n(t[o]));return n=>(r.forEach(((n,e)=>{t[e]=n})),n)}function w(t){return r(t.geometry)&&"mesh"===t.geometry.type?v(t,t.geometry):z(t,["geometry"])}function v(t,n){const e=r(n.transform)?n.transform.clone():null,o=n.vertexAttributes.clonePositional();return r=>(n.transform=e,n.vertexAttributes=o,t.notifyGeometryChanged(),r)}function M(t){const n=t.map((t=>a(w(t)))).filter((t=>r(t)));return t=>(n.forEach((n=>n(t))),t)}function q(t){return z(t,["symbol"])}function D(){let t=0,n=0,e=0;return r=>{"start"===r.action&&(t=r.mapStart.x,n=r.mapStart.y,e=r.mapStart.z);const o=r.mapEnd.x-t,a=r.mapEnd.y-n,c=r.mapEnd.z-e;return t=r.mapEnd.x,n=r.mapEnd.y,e=r.mapEnd.z,{...r,mapDeltaX:o,mapDeltaY:a,mapDeltaZ:c,mapDeltaSpatialReference:r.mapStart.spatialReference}}}function b(){let t=0,n=0;return e=>{"start"===e.action&&(t=e.screenStart.x,n=e.screenStart.y);const r=e.screenEnd.x-t,o=e.screenEnd.y-n;return t=e.screenEnd.x,n=e.screenEnd.y,{...e,screenDeltaX:r,screenDeltaY:o}}}function C(t,n){let r=null,o=0,a=0;return s=>{if("start"===s.action&&(r=t.toScreen(n),r.x<0||r.x>t.width||r.y<0||r.y>t.height?r=null:(o=s.screenStart.x-r.x,a=s.screenStart.y-r.y)),null==r)return null;const i=e(s.screenEnd.x-o,0,t.width),l=e(s.screenEnd.y-a,0,t.height),u=c(i,l);return s.screenStart=r,s.screenEnd=u,s}}class G{constructor(){this.execute=()=>{}}next(t,n=new G){return r(t)&&(this.execute=e=>{const o=t(e);r(o)&&n.execute(o)}),n}}export{G as EventPipeline,D as addMapDelta,b as addScreenDelta,d as constrainToMapAxis,f as createDragEventPipelineCallback,p as createManipulatorDragEventPipeline,y as createManipulatorDragEventPipelineMany,C as dragAtLocation,x as dragGraphic,R as dragGraphicMany,w as resetGraphic,M as resetGraphicMany,z as resetProperties,q as resetSymbol,j as screenToMap};
|