@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{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Accessor.js";import i from"../../../core/Handles.js";import s from"../../../core/has.js";import{lerp as r}from"../../../core/mathUtils.js";import{releaseMaybe as o,disposeMaybe as h,destroyMaybe as a,isNone as n}from"../../../core/maybe.js";import{init as c}from"../../../core/watchUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{f as m}from"../../../chunks/mat3.js";import{c as d}from"../../../chunks/mat3f64.js";import{x as f}from"../../../chunks/mat4.js";import{c as l}from"../../../chunks/mat4f64.js";import{f as _,z as g}from"../../../chunks/vec3f32.js";import{getReferenceEllipsoid as y}from"../../../geometry/projectionEllipsoid.js";import{cloudPresets as v}from"./CloudsPresets.js";import{CloudsTechniqueConfiguration as
|
|
5
|
+
import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Accessor.js";import i from"../../../core/Handles.js";import s from"../../../core/has.js";import{lerp as r}from"../../../core/mathUtils.js";import{releaseMaybe as o,disposeMaybe as h,destroyMaybe as a,isNone as n}from"../../../core/maybe.js";import{init as c}from"../../../core/watchUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{f as m}from"../../../chunks/mat3.js";import{c as d}from"../../../chunks/mat3f64.js";import{x as f}from"../../../chunks/mat4.js";import{c as l}from"../../../chunks/mat4f64.js";import{f as _,z as g}from"../../../chunks/vec3f32.js";import{getReferenceEllipsoid as y}from"../../../geometry/projectionEllipsoid.js";import{cloudPresets as v}from"./CloudsPresets.js";import{CloudsTechniqueConfiguration as x,CloudsTechnique as b}from"./CloudsTechnique.js";import{NoiseTextureAtlas as S}from"./NoiseTextureAtlas.js";import{createQuadVAO as T}from"../webgl-engine/lib/glUtil3D.js";import{TaskPriority as w}from"../../support/Scheduler.js";import{TextureType as z,PixelFormat as M,PixelType as j,TextureWrapMode as C,TextureSamplingMode as U,TargetType as E}from"../../webgl/enums.js";import{FramebufferObject as R}from"../../webgl/FramebufferObject.js";let q=class extends e{constructor(t){super(t),this._frameTask=null,this._handles=new i,this._cubeMapSize=s("esri-mobile")?1024:2048,this._techniques=[],this._techniqueConfiguration=new x,this.coverage=r(P.coverage[0],P.coverage[1],.5),this.density=r(P.density[0],P.density[1],.5),this.absorption=r(P.absorption[0],P.absorption[1],.5),this.cloudSize=r(P.cloudSize[0],P.cloudSize[1],.5),this.detailSize=r(P.detailSize[0],P.detailSize[1],.5),this.smoothness=r(P.smoothness[0],P.smoothness[1],.5),this.cloudHeight=r(P.cloudHeight[0],P.cloudHeight[1],.5),this.raymarchingStepType=P.raymarchingStepType,this._cloudRadius=0,this._viewMatrix=l(),this._viewMatrix3=d(),this.running=!1}_getTechnique(t){const e=this._techniques[t];return e||(this._techniqueConfiguration.steps=t,this._techniques[t]=new b({rctx:this.rctx,viewingMode:this.view.state.viewingMode},this._techniqueConfiguration),this._techniques[t])}initialize(){this._vao=T(this.rctx);const t=y(this.view.spatialReference);this._cloudRadius=.5*t.radius,this.setDirty(),this._frameTask=this.view.resourceController.scheduler.registerTask(w.CLOUDS_GENERATOR,this),this._handles.add(this._frameTask),this._handles.add(c(this,"coverage",(()=>this.setDirty())));["coverage","density","absorption","cloudSize","detailSize","smoothness","cloudHeight","raymarchingStepType"].forEach((t=>this._handles.add(c(this,t,(()=>this.setDirty())))))}destroy(){this._handles.destroy(),this._techniques.forEach((t=>o(t))),this._techniques=null,this._frameBufferCube=h(this._frameBufferCube),this._vao=h(this._vao),this._noiseTexture=a(this._noiseTexture)}_ensureNoiseTexture(){return n(this._noiseTexture)&&(this._noiseTexture=new S(this.rctx,this.view),this._noiseTexture.render(this.rctx)),this._noiseTexture}get frameBufferCube(){if(n(this._frameBufferCube)){const t={target:z.TEXTURE_CUBE_MAP,pixelFormat:M.RGBA,dataType:j.UNSIGNED_BYTE,wrapMode:C.CLAMP_TO_EDGE,samplingMode:U.LINEAR,hasMipmap:!1,width:this._cubeMapSize,height:this._cubeMapSize};this._frameBufferCube=new R(this.rctx,{colorTarget:E.CUBEMAP,width:this._cubeMapSize,height:this._cubeMapSize},t)}return this._frameBufferCube}get cubeMap(){return this._frameBufferCube}applyPreset(t,e){const i=t.median,s=t=>{const s=r(t[0],t[1],i);return e<.5?r(t[0],s,2*e):r(s,t[1],2*(e-.5))};this.coverage=s(t.coverage),this.density=s(t.density),this.absorption=s(t.absorption),this.cloudSize=s(t.cloudSize),this.detailSize=s(t.detailSize),this.smoothness=s(t.smoothness),this.cloudHeight=s(t.cloudHeight),this.raymarchingStepType=t.raymarchingStepType}setDirty(){this.running=!0}runTask(t){if(0===this.coverage||n(this._vao))return void(this.running=!1);const e=this._ensureNoiseTexture().textureAtlas;if(n(e))return void(this.running=!1);const i=this.rctx.getViewport();this.rctx.setViewport(0,0,this._cubeMapSize,this._cubeMapSize),this.rctx.bindFramebuffer(this.frameBufferCube);const s=this._getTechnique(this.raymarchingStepType),o=s.program;this.rctx.useProgram(o);const h=1+this.absorption,a=r(35,120,this.absorption);o.bindTexture(e,"cloudShapeTexture"),o.setUniform1f("cloudRadius",this._cloudRadius),o.setUniform1f("halfCubeMapSize",.5*this._cubeMapSize),o.setUniform1f("power",a),o.setUniform1f("sigmaE",h),o.setUniform1f("density",r(0,.3,this.density)),o.setUniform1f("cloudSize",r(0,.02,Math.max(.01,1-this.cloudSize))),o.setUniform1f("detailSize",r(0,.2,Math.max(.01,1-this.detailSize))),o.setUniform1f("smoothness",r(0,.5,1-this.smoothness)),o.setUniform1f("cloudHeight",r(0,1500,this.cloudHeight)),o.setUniform1f("coverage",this.coverage),this.rctx.bindVAO(this._vao),o.assertCompatibleVertexAttributeLocations(this._vao),s.bindPipelineState(this.rctx);for(let r=0;r<5;r++){const t=A[r],e=B[r];f(this._viewMatrix,k,t,e),m(this._viewMatrix3,this._viewMatrix),o.setUniformMatrix3fv("viewMatrix",this._viewMatrix3);const i=z.TEXTURE_CUBE_MAP_POSITIVE_X+r;this.frameBufferCube.setColorTextureTarget(i),this.rctx.gl.drawArrays(this.rctx.gl.TRIANGLE_STRIP,0,4),this.rctx.gl.flush()}this.running=!1,this.rctx.setViewport(i.x,i.y,i.width,i.height),this.requestRender(),t.madeProgress()}};t([u({constructOnly:!0})],q.prototype,"rctx",void 0),t([u({constructOnly:!0})],q.prototype,"view",void 0),t([u({constructOnly:!0})],q.prototype,"requestRender",void 0),t([u()],q.prototype,"_frameTask",void 0),t([u()],q.prototype,"coverage",void 0),t([u()],q.prototype,"density",void 0),t([u()],q.prototype,"absorption",void 0),t([u()],q.prototype,"cloudSize",void 0),t([u()],q.prototype,"detailSize",void 0),t([u()],q.prototype,"smoothness",void 0),t([u()],q.prototype,"cloudHeight",void 0),t([u()],q.prototype,"raymarchingStepType",void 0),t([u()],q.prototype,"running",void 0),q=t([p("esri.views.3d.environment.CloudsGenerator")],q);const A=[_(1,0,0),_(-1,0,0),_(0,1,0),_(0,-1,0),_(0,0,1)],B=[_(0,1,0),_(0,1,0),_(0,0,-1),_(0,0,1),_(0,1,0)],k=g(),P=v.sunny;export{q as CloudsGenerator};
|
|
@@ -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"../../../core/Accessor.js";import"../../../core/has.js";import s from"../../../core/Handles.js";import{equalsShallow as i}from"../../../core/lang.js";import{lerp as r}from"../../../core/mathUtils.js";import{isSome as o,destroyMaybe as n,applySome as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import"../../../core/has.js";import s from"../../../core/Handles.js";import{equalsShallow as i}from"../../../core/lang.js";import{lerp as r}from"../../../core/mathUtils.js";import{isSome as o,destroyMaybe as n,applySome as a,isNone as h}from"../../../core/maybe.js";import{watch as p,syncAndInitial as l}from"../../../core/reactiveUtils.js";import{when as d}from"../../../core/watchUtils.js";import{property as m}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as _}from"../../../core/accessorSupport/decorators/subclass.js";import{l as u}from"../../../chunks/vec3.js";import{getReferenceEllipsoid as c}from"../../../geometry/projectionEllipsoid.js";import{isMoon as g,isEarth as w}from"../../../geometry/support/spatialReferenceUtils.js";import{ChapmanAtmosphere as v}from"./ChapmanAtmosphere.js";import{CloudsComposition as y}from"./CloudsComposition.js";import{isReadyCloudsData as f}from"./CloudsData.js";import{CloudsGenerator as R}from"./CloudsGenerator.js";import{cloudPresets as A}from"./CloudsPresets.js";import{Fog as C}from"./Fog.js";import{PanoramicAtmosphere as E}from"./PanoramicAtmosphere.js";import N from"./SimpleAtmosphere.js";import{Stars as T}from"./Stars.js";import{weatherHeightLimit as j}from"./weather.js";import{RenderPass as P}from"../webgl-engine/lib/RenderPass.js";import{RenderSlot as b}from"../webgl-engine/lib/RenderSlot.js";const x=[b.POSTPROCESSING_ENVIRONMENT_OPAQUE,b.POSTPROCESSING_ENVIRONMENT_TRANSPARENT];let S=class extends t{constructor(e){super(e),this._handles=new s,this._context=null,this._pendingAtmosphere=null,this._atmosphere=null,this._stars=null,this._clouds=null,this._cloudComposition=null,this._fog=null}get atmosphereType(){return o(this._pendingAtmosphere)?this._pendingAtmosphere.type:o(this._atmosphere)?this._atmosphere.type:"none"}get canRender(){var e;return!(null==(e=this.view.basemapTerrain)||!e.renderer.canRender)||"global"!==this.view.viewingMode}get needsLinearDepth(){return"realistic"===this._selectAtmosphereType()}get updating(){return o(this._pendingAtmosphere)||o(this._stars)&&this._stars.updating||o(this._clouds)&&this._clouds.running}get weatherVisible(){return u(this.view.state.camera.eye)-c(this.view.spatialReference).radius<=j}get weatherEnabled(){var e;return!(null==(e=this.view.environmentManager)||!e.weatherEnabled)}initialize(){this.view._stage.addRenderPlugin(x,this)}destroy(){this._pendingAtmosphere=n(this._pendingAtmosphere),this.uninitializeRenderContext(),this._handles=n(this._handles),this.view&&null!=this.view._stage&&(this.view._stage.removeRenderPlugin(this),this._set("view",null))}initializeRenderContext(e=null){this._context=e,this._handles.add([d(this.view,"basemapTerrain",(()=>this._updateBasemapTerrain()),!0),p((()=>({viewingMode:this.view.viewingMode,atmosphereEnabled:this.view.environment.atmosphereEnabled,atmosphereQuality:this.view.environment.atmosphere.quality})),(()=>this._updateAtmosphere()),l),p((()=>this._starsCreationParameters),(e=>this._createOrDestroyStars(e)),{sync:!0,initial:!0,equals:i}),p((()=>this._cloudsCreationParameters),(e=>this._createOrDestroyClouds(e)),{sync:!0,initial:!0,equals:i}),p((()=>this._fogCreationParameters),(e=>this._createOrDestroyFog(e)),{sync:!0,initial:!0,equals:i}),p((()=>this._weatherUpdateParameters),(e=>{this._updateWeather(e),this._updateFog(e)}),l)])}uninitializeRenderContext(){this._stars=n(this._stars),this._atmosphere=n(this._atmosphere),this._clouds=n(this._clouds),this._cloudComposition=n(this._cloudComposition),this._fog=n(this._fog)}render(e){if(e.pass===P.MATERIAL)switch(e.slot){case b.POSTPROCESSING_ENVIRONMENT_OPAQUE:o(this._stars)&&this._stars.render(e),o(this._atmosphere)&&this._atmosphere.canRender&&(this._atmosphere.render(e),f(this._clouds)&&o(this._cloudComposition)&&(this._cloudComposition.render(e,this._clouds,o(this.view.animation)),this._cloudComposition.isFading&&this._setNeedsRender()));break;case b.POSTPROCESSING_ENVIRONMENT_TRANSPARENT:if(o(this._atmosphere)&&this._atmosphere.canRender){const t=this.weatherEnabled?this.view.environment.weather.type:"disabled";this._atmosphere.renderHaze(e,"rainy"===t),o(this._fog)&&("foggy"!==t&&"realistic"===this._selectAtmosphereType()||this._fog.render(e,"foggy"===t,"rainy"===t))}}}get _cloudsCreationParameters(){return this.weatherEnabled?{view:this.view,viewingMode:this.view.state.viewingMode,rctx:o(this._context)?this._context.renderContext.rctx:null,radius:c(this.view.spatialReference).radius}:null}_createOrDestroyClouds(e){this._clouds=n(this._clouds),this._cloudComposition=n(this._cloudComposition),a(e,(({view:e,viewingMode:t,rctx:s,radius:i})=>{this._clouds=new R({rctx:s,view:e,requestRender:()=>this._setNeedsRender()}),this._cloudComposition=new y(s,t,i,u(e.state.camera.eye)-i)})),this._setNeedsRender()}get _weatherUpdateParameters(){const e=this.weatherEnabled?this.view.environment.weather:null;return h(e)?null:{type:e.type,weatherAdjustment:"foggy"===e.type?e.fogStrength:e.cloudCover}}_updateWeather(e){h(e)||h(this._clouds)||this._clouds.applyPreset(A[e.type],e.weatherAdjustment)}_setNeedsRender(){o(this._context)&&this._context.requestRender()}get _starsCreationParameters(){var e,t,s;return{view:this.view,starsEnabled:null!=(e=null==(t=this.view)||null==(s=t.environment)?void 0:s.starsEnabled)&&e}}_createOrDestroyStars({view:e,starsEnabled:t}){t&&h(this._stars)?(this._stars=new T({view:e,requestRender:()=>this._setNeedsRender()}),this._setNeedsRender()):!t&&o(this._stars)&&(this._stars.destroy(),this._stars=null,this._setNeedsRender())}_updateFog(e){h(this._fog)||h(e)||("foggy"===e.type?this._fog.strength=r(3e-5,.005,e.weatherAdjustment**3):this._fog.strength=4e-6)}get _fogCreationParameters(){return!this.weatherEnabled||h(this._context)?null:{view:this.view,context:this._context}}_createOrDestroyFog(e){this.weatherEnabled&&h(this._fog)?(a(e,(({view:e,context:t})=>{this._fog=new C(t,e)})),this._updateFog(this._weatherUpdateParameters),this._setNeedsRender()):o(this._fog)&&(this._fog.destroy(),this._fog=null,this._setNeedsRender())}_updateAtmosphere(){const e=this._selectAtmosphereType();if(this.atmosphereType===e)return;o(this._pendingAtmosphere)&&(this._pendingAtmosphere!==this._atmosphere&&this._pendingAtmosphere.destroy(),this._pendingAtmosphere=null);const t=this._getAtmosphereClass();if(!t)return o(this._atmosphere)&&(this._atmosphere.destroy(),this._atmosphere=null,this._setNeedsRender()),void this._updateBasemapTerrain();const s=new t(this.view);o(this._context)&&s.initializeRenderContext(this._context),h(this._atmosphere)&&(this._atmosphere=s,this._setNeedsRender()),this._pendingAtmosphere=s,s.when().then((()=>{o(this._atmosphere)&&this._pendingAtmosphere&&this._pendingAtmosphere!==this._atmosphere&&(this._atmosphere.destroy(),this._atmosphere=this._pendingAtmosphere),this._pendingAtmosphere=null,this._setNeedsRender(),this._updateBasemapTerrain()})).catch((()=>{this._pendingAtmosphere===s&&(this._pendingAtmosphere=null)}))}_getAtmosphereClass(){switch(this._selectAtmosphereType()){case"none":return null;case"realistic":return v;case"panoramic":return E;case"simple":return N;default:return}}_selectAtmosphereType(){const e=this.view.get("environment.atmosphereEnabled"),t=this.view.get("environment.atmosphere.quality"),s=this.view.viewingMode;return!e||null==t||g(this.view.spatialReference)?"none":"local"===s?"panoramic":"high"===t&&o(this._context)&&v.isSupported(this._context)&&w(this.view.spatialReference)?"realistic":"simple"}_updateBasemapTerrain(){this.view.basemapTerrain&&(this.view.basemapTerrain.velvetOverground=o(this._atmosphere)&&"simple"===this.atmosphereType)}get test(){return{atmosphere:this._atmosphere,clouds:this._clouds,selectAtmosphereType:()=>this._selectAtmosphereType()}}};e([m({constructOnly:!0})],S.prototype,"view",void 0),e([m({type:Boolean,readOnly:!0})],S.prototype,"updating",null),e([m()],S.prototype,"weatherVisible",null),e([m()],S.prototype,"_pendingAtmosphere",void 0),e([m()],S.prototype,"_stars",void 0),e([m()],S.prototype,"_clouds",void 0),e([m()],S.prototype,"_cloudComposition",void 0),e([m()],S.prototype,"_fog",void 0),e([m()],S.prototype,"weatherEnabled",null),e([m()],S.prototype,"_cloudsCreationParameters",null),e([m()],S.prototype,"_weatherUpdateParameters",null),e([m()],S.prototype,"_starsCreationParameters",null),e([m()],S.prototype,"_fogCreationParameters",null),S=e([_("esri.views.3d.environment.EnvironmentRenderer")],S);export{S as EnvironmentRenderer};
|
|
@@ -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{smoothstep as e,lerp as t}from"../../../core/mathUtils.js";import{isNone as i,releaseMaybe as r,disposeMaybe as s}from"../../../core/maybe.js";import{a
|
|
5
|
+
import{smoothstep as e,lerp as t}from"../../../core/mathUtils.js";import{isNone as i,releaseMaybe as r,disposeMaybe as s}from"../../../core/maybe.js";import{a}from"../../../chunks/mat4.js";import{c as h}from"../../../chunks/mat4f64.js";import{s as o}from"../../../chunks/vec2.js";import{a as n}from"../../../chunks/vec2f64.js";import{l as c}from"../../../chunks/vec3.js";import{getReferenceEllipsoid as u}from"../../../geometry/projectionEllipsoid.js";import{atmosphereHeight as _}from"./atmosphereUtils.js";import{FogTechniqueConfiguration as f,FogTechnique as m}from"./FogTechnique.js";import{weatherHeightLimit as g}from"./weather.js";import{Pos2Tex as p}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as d}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as l}from"../../webgl/enums.js";class v{constructor(e,t){this._projectionInverse=h(),this._viewInverse=h(),this._nearFar=n(),this._darkenHaze=!1,this._hazeMultiplier=1,this._foggyFadeStart=.3,this._foggyFadeEnd=.6,this._hazeFadeStart=.7,this._hazeFadeEnd=1,this._hazeFadeBuffer=500,this._strength=4e-6,this._view=t;const i=e.renderContext.rctx;this._vao=d(i,p),this._shaderTechniqueRepository=e.shaderTechniqueRep;const r=u(t.spatialReference);this._planetRadius=r.radius,this._atmosphereRadius=r.radius+_}set strength(e){this._strength=e}get strength(){return this._strength}get foggyWeatherTechnique(){if(i(this._foggyWeatherTechnique)){const e=new f;e.haze=!1,this._foggyWeatherTechnique=this._shaderTechniqueRepository.acquire(m,e)}return this._foggyWeatherTechnique}get distanceFogTechnique(){if(i(this._distanceFogTechnique)){const e=new f;e.haze=!0,this._distanceFogTechnique=this._shaderTechniqueRepository.acquire(m,e)}return this._distanceFogTechnique}destroy(){this._distanceFogTechnique=r(this._distanceFogTechnique),this._foggyWeatherTechnique=r(this._foggyWeatherTechnique),this._vao=s(this._vao)}when(){return Promise.resolve()}render(e,t,i){if(0===this._view.basemapTerrain.baseOpacity&&!t)return;if(this._darkenHaze=i,this._update(e.camera,t),this._fogAmount<=0)return;const r=e.rctx,s=e.offscreenRenderingHelper,a=t?this.foggyWeatherTechnique:this.distanceFogTechnique;r.useProgram(a.program),a.bindPipelineState(r),s.renderDepthDetached((()=>{a.program.bindTexture(s.depthTexture,"depthTex"),this._renderFog(a.program,e)}))}_renderFog(e,t){if(i(this._vao))return!1;const r=t.rctx;return t.scenelightingData.setLightDirectionUniform(e),e.setUniform3fv("cameraPosition",t.camera.eye),e.setUniformMatrix4fv("projectionInverse",this._projectionInverse),e.setUniformMatrix4fv("viewInverse",this._viewInverse),e.setUniform2fv("nearFar",this._nearFar),e.setUniform1f("atmosphereC",this._atmosphereC),e.setUniform1f("strength",this._strength),e.setUniform1f("fogAmount",this._hazeMultiplier*this._fogAmount),r.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),r.drawArrays(l.TRIANGLE_STRIP,0,4),!0}_update(r,s){if(i(r))return;a(this._projectionInverse,r.projectionMatrix),a(this._viewInverse,r.viewMatrix),o(this._nearFar,r.near,r.far);const h=c(r.eye),n=h*h;this._atmosphereC=n-this._atmosphereRadius*this._atmosphereRadius,this._fogAmount=s?1-e(this._foggyFadeStart*g,this._foggyFadeEnd*g,Math.abs(h-this._planetRadius)):1-e(this._hazeFadeStart*g,this._hazeFadeEnd*g,Math.abs(h-this._planetRadius)),this._hazeMultiplier=this._darkenHaze?t(.4,1,e(g-this._hazeFadeBuffer,g+this._hazeFadeBuffer,Math.abs(h-this._planetRadius))):1}static isSupported(e){return e.capabilities.depthTexture}}export{v as Fog};
|
|
@@ -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"../../../Color.js";import r from"../../../core/Evented.js";import s from"../../../core/Handles.js";import{destroyMaybe as i,isSome as n,isNone as o,mapOr as a}from"../../../core/maybe.js";import{after as c}from"../../../core/promiseUtils.js";import{init as h}from"../../../core/watchUtils.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{s as p,a as _,g as m,e as u}from"../../../chunks/vec3.js";import{c as f,f as P}from"../../../chunks/vec3f64.js";import{d as g,f as v}from"../../../chunks/vec4f64.js";import{canProjectToWGS84ComparableLonLat as b,projectPointToWGS84ComparableLonLat as w}from"../../../geometry/projection.js";import{isEarth as C}from"../../../geometry/support/spatialReferenceUtils.js";import{ViewingMode as U}from"../../ViewingMode.js";import{EnvironmentRenderer as y}from"./EnvironmentRenderer.js";import{positionToTimezoneInfo as R}from"../support/earthUtils.js";import{computeColorAndIntensity as T,ColorAndIntensity as S,computeShadowsEnabled as M}from"../support/sunUtils.js";import{MainLight as H,AmbientLight as W,FillLight as G}from"../webgl-engine/lighting/Lightsources.js";import j from"../../../webscene/background/ColorBackground.js";let E=class extends r.EventedAccessor{constructor(){super(),this._referencePointUpdateDelay=200,this._referencePointUpdateInterval=3e3,this._referencePointUpdateDistThreshold=1e6,this._referencePosUpdateQuery=null,this._referencePosMapCoordsRequested=null,this._viewHandles=new s,this._preserveAbsoluteDateTime=!1,this._trackingEnabled=!1,this._referencePosResetPreserveAbsoluteTime=!1,this._referencePosUpdateTimer=null,this._referencePosMapCoords=null,this._mainLight=new H,this._ambientLight=new W,this._moonLight=new G,this.disableQueries=!1,this._disableWeather=!1,this._renderer=null,this._referencePosWGS84Comparable=null,this._resetReferencePosition()}destroy(){this.disconnectView(),this._viewHandles.destroy()}get _view(){var e;return null==(e=this._renderer)?void 0:e.view}get updating(){var e;return!!(!this.disableQueries&&(this._referencePosUpdateQuery||this._referencePosMapCoordsRequested)||null!=(e=this._renderer)&&e.updating)}get weatherEnabled(){var e,t,r;return(null==(e=this._view)?void 0:e.environment.atmosphereEnabled)&&!this._disableWeather&&(null==(t=this._view)||null==(r=t.state)?void 0:r.viewingMode)===U.Global&&C(this._view.spatialReference)}get referencePositionWGS84Comparable(){return this._referencePosWGS84Comparable}connectView(e){this._renderer||(this._renderer=new y({view:e}),this._viewHandles.add([e.watch("environment.lighting.date",(e=>this._lightingDateHandler(e)),!0),e.watch("stationary",(()=>this._interactingStationaryHandler())),e.watch(["environment.lighting.directShadowsEnabled","environment.lighting.ambientOcclusionEnabled","environment.lighting.waterReflectionEnabled","environment.background.color"],(()=>this._updateRenderParamsHandler()),!0),e.watch("spatialReference",(()=>this._resetReferencePosition(!0)),!0),e.watch("environment.weather.type",(()=>this._updateLightParams()),!0),this.watch("weatherEnabled",(()=>this._updateLightParams()),!0),h(e,"viewingMode",(()=>this._resetReferencePosition(!0)),!0),h(e,"environment.lighting.cameraTrackingEnabled",(e=>this._updateCameraTracking(e)),!0),h(e,"state.camera",(()=>this._cameraHandler()),!0),this.watch("disableQueries",(()=>this._cameraHandler()))]),this._updateRenderParamsHandler(),this._updateLightParams(),this._cameraHandler(),this.notifyChange("updating"))}disconnectView(){this._viewHandles.removeAll(),this._resetReferencePosition(),this._renderer=i(this._renderer)}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;e&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){if(!e)return;const t=this._view.environment.lighting;if(!t.positionTimezoneInfo.autoUpdated){this._preserveAbsoluteDateTime=!0;const r=this._view.spatialReference;if(!b(r)){const e=this._view.camera.position;if(!this._referencePosMapCoords||!this._referencePosMapCoords.equals(e))return void this._requestReferencePositionUpdate(e)}if(this._preupdateTracking(e),n(this._referencePosWGS84Comparable)){const e=R(this._referencePosWGS84Comparable,D);n(e)&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}}this._updateLightParams(e)}_preupdateTracking(e){!this._trackingEnabled&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const r=t.stateManager.camera;r&&(this._cameraHandlerClientSide(r,e)||this._cameraHandlerServerSide(r))}_cameraHandlerClientSide(e,t){const r=C(this._view.spatialReference);if(r&&!b(this._view.spatialReference))return!1;const s=e.position;return o(this._referencePosWGS84Comparable)&&(this._referencePosWGS84Comparable=f()),r?w(s,this._referencePosWGS84Comparable):p(this._referencePosWGS84Comparable,s.longitude,s.latitude,s.z),this.notifyChange("referencePositionWGS84Comparable"),this._autoUpdateTimezone(this._referencePosWGS84Comparable,t)||this._updateLightParams(t),!0}_cameraHandlerServerSide(e){const t=e.position;(!this._referencePosMapCoords||this._referencePosMapCoordsRequested||this._exceedsReferencePosDistThreshold(t))&&this._requestReferencePositionUpdate(t,!0),this._view.mapCoordsHelper&&this._referencePosWGS84Comparable&&(this._referencePosWGS84Comparable[2]=t.z*this._view.mapCoordsHelper.unitInMeters,this._referencePosChanged())}_interactingStationaryHandler(){this._view.stationary&&this._executePendingReferencePositionUpdate()}_updateLightParams(e){const t=this._view,r=t.environment.lighting,s=e||r.date,i=t._stage,o=this._referencePosWGS84Comparable,a=n(o)?k:Q;if(n(o)){const e=this.weatherEnabled?t.environment.weather.type:"disabled";T(s,o,t.state.viewingMode,k,e)}const c=this._mainLight,h=a.direct;_(c.intensity,h.color,h.intensity*Math.PI),m(c.direction,h.directionToLightSource);const d=this._ambientLight;_(d.intensity,a.ambient.color,a.ambient.intensity);const l=this._moonLight;u(l.intensity,q,A,a.globalFactor);const p=(1-.5*a.globalFactor)*(1-.4*a.noonFactor*(1-a.globalFactor));_(l.intensity,l.intensity,p),m(l.direction,h.directionToLightSource),i.renderView.updateLightSources([c,d,l],1-a.noonFactor,a.globalFactor),this._updateRenderParamsHandler()}_autoUpdateTimezone(e,t=null){if(!this._view.environment.lighting.cameraTrackingEnabled||o(e))return!1;const r=L;r.setTime((t||this._view.environment.lighting.date).getTime());const s=R(e,D);if(o(s))return!1;let i=this._view.environment.lighting.positionTimezoneInfo;if(i.autoUpdated){if(i.hours===s.hours&&i.minutes===s.minutes&&i.seconds===s.seconds)return!1}else i=s;const n=r.getUTCHours()-(s.hours-i.hours),a=r.getUTCMinutes()-(s.minutes-i.minutes),c=r.getUTCSeconds()-(s.seconds-i.seconds);return r.setUTCHours(n),r.setUTCMinutes(a),r.setUTCSeconds(c),!t&&this._view.environment.lighting.autoUpdate(r,s)}_updateRenderParamsHandler(){const e=this._view._stage;if(!e)return;const r=a(this._referencePosWGS84Comparable,!0,(e=>M(e[2],this._view.state.viewingMode))),s=this._view.environment.background,i=s instanceof j?{type:"color",color:g(t.toUnitRGBA(s.color))}:{type:"color",color:v(0,0,0,1)};e.renderView.setRenderParameters({shadowMap:this._view.environment.lighting.directShadowsEnabled&&r,ssao:this._view.environment.lighting.ambientOcclusionEnabled,waterReflectionEnabled:this._view.environment.lighting.waterReflectionEnabled,background:i})}_resetReferencePosition(e=!1){this._cancelReferencePosUpdates(),this._referencePosMapCoords=null,this._referencePosMapCoordsRequested=null,this._referencePosResetPreserveAbsoluteTime=null,this._referencePosWGS84Comparable=null,this.notifyChange("updating"),e&&this._cameraHandler()}_requestReferencePositionUpdate(e,t=!1){if(!this.disableQueries&&(this._referencePosMapCoordsRequested?this._referencePosMapCoordsRequested.copy(e):this._referencePosMapCoordsRequested=e.clone(),this._referencePosResetPreserveAbsoluteTime=!!t,!this._referencePosUpdateQuery&&!this._referencePosUpdateTimer&&this._view.stationary)){const e=this._referencePosUpdateQuery=c(this._referencePointUpdateDelay).then((()=>{if(this._referencePosUpdateQuery===e){const t=()=>this._referencePosUpdateQuery!==e;return this._doReferencePositionUpdateQuery(t)}})).catch((e=>{"mapcoordshelper:missing-geometry-service"===e.name&&(this.disableQueries=!0)})).then((()=>{this._referencePosUpdateQuery===e&&(this._referencePosUpdateQuery=null,this._referencePosUpdateTimer||this._executePendingReferencePositionUpdate(),this.notifyChange("updating"))})),t=this._referencePosUpdateTimer=c(this._referencePointUpdateInterval).then((()=>{this._referencePosUpdateTimer===t&&(this._referencePosUpdateTimer=null,this._referencePosUpdateQuery||this._executePendingReferencePositionUpdate())}));this.notifyChange("updating")}}async _doReferencePositionUpdateQuery(e){this._referencePosResetPreserveAbsoluteTime&&(this._preserveAbsoluteDateTime=!1),this._referencePosMapCoords?this._referencePosMapCoords.copy(this._referencePosMapCoordsRequested):this._referencePosMapCoords=this._referencePosMapCoordsRequested.clone(),this._referencePosResetPreserveAbsoluteTime=null,this._referencePosMapCoordsRequested=null;const t=await this._view.mapCoordsHelper.toGeographic(this._referencePosMapCoords);if(!e()&&!isNaN(t[0])&&!isNaN(t[1])){const e=this._referencePosMapCoords.z*this._view.mapCoordsHelper.unitInMeters;this._referencePosWGS84Comparable?(this._referencePosWGS84Comparable[0]=t[0],this._referencePosWGS84Comparable[1]=t[1],this._referencePosWGS84Comparable[2]=e):this._referencePosWGS84Comparable=[t[0],t[1],e],this._referencePosChanged()}}_executePendingReferencePositionUpdate(){const e=this._referencePosMapCoordsRequested;e&&this._requestReferencePositionUpdate(e,this._referencePosResetPreserveAbsoluteTime)}_referencePosChanged(){this._preserveAbsoluteDateTime?this._updateLightParams():this._autoUpdateTimezone(this._referencePosWGS84Comparable)||this._updateLightParams(),this.notifyChange("referencePositionWGS84Comparable")}_exceedsReferencePosDistThreshold(e){if(this._referencePosMapCoords){let t=this._referencePosMapCoords.distance(e);return this._view.mapCoordsHelper&&(t*=this._view.mapCoordsHelper.unitInMeters),t>this._referencePointUpdateDistThreshold}return!0}_cancelReferencePosUpdates(){const e=!!this._referencePosUpdateQuery;return this._referencePosUpdateQuery=null,this._referencePosUpdateTimer=null,e}get test(){const e=this;return{get renderer(){return e._renderer},set referencePointUpdateInterval(t){e._referencePointUpdateInterval=t},set referencePointUpdateDistThreshold(t){e._referencePointUpdateDistThreshold=t},set referencePosUpdateTimer(t){e._referencePosUpdateTimer=t},set referencePointUpdateDelay(t){e._referencePointUpdateDelay=t},set disableWeather(t){e._disableWeather=t}}}};e([d({type:Boolean,readOnly:!0})],E.prototype,"updating",null),e([d()],E.prototype,"disableQueries",void 0),e([d()],E.prototype,"_disableWeather",void 0),e([d()],E.prototype,"weatherEnabled",null),e([d()],E.prototype,"referencePositionWGS84Comparable",null),e([d()],E.prototype,"_renderer",void 0),e([d()],E.prototype,"_referencePosWGS84Comparable",void 0),E=e([l("esri.views.3d.environment.SceneViewEnvironmentManager")],E);const k=new S,Q=new S,L=new Date,D={hours:0,minutes:0,seconds:0},q=P(.22,.22,.33),A=P(.22,.22,.22);export{E as SceneViewEnvironmentManager};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Color.js";import r from"../../../core/Evented.js";import i from"../../../core/Handles.js";import{destroyMaybe as s,isSome as n,isNone as o,mapOr as a}from"../../../core/maybe.js";import{after as h}from"../../../core/promiseUtils.js";import{init as c}from"../../../core/watchUtils.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{s as p,a as _,g as m,e as u}from"../../../chunks/vec3.js";import{c as f,f as P}from"../../../chunks/vec3f64.js";import{d as g,f as v}from"../../../chunks/vec4f64.js";import{canProjectToWGS84ComparableLonLat as b,projectPointToWGS84ComparableLonLat as w}from"../../../geometry/projection.js";import{isEarth as C}from"../../../geometry/support/spatialReferenceUtils.js";import{ViewingMode as U}from"../../ViewingMode.js";import{EnvironmentRenderer as y}from"./EnvironmentRenderer.js";import{positionToTimezoneInfo as R}from"../support/earthUtils.js";import{computeColorAndIntensity as T,ColorAndIntensity as S,computeShadowsEnabled as M}from"../support/sunUtils.js";import{MainLight as H,AmbientLight as W,FillLight as G}from"../webgl-engine/lighting/Lightsources.js";import j from"../../../webscene/background/ColorBackground.js";let E=class extends r.EventedAccessor{constructor(){super(),this._referencePointUpdateDelay=200,this._referencePointUpdateInterval=3e3,this._referencePointUpdateDistThreshold=1e6,this._referencePosUpdateQuery=null,this._referencePosMapCoordsRequested=null,this._viewHandles=new i,this._preserveAbsoluteDateTime=!1,this._trackingEnabled=!1,this._referencePosResetPreserveAbsoluteTime=!1,this._referencePosUpdateTimer=null,this._referencePosMapCoords=null,this._mainLight=new H,this._ambientLight=new W,this._moonLight=new G,this.disableQueries=!1,this._disableWeather=!1,this._renderer=null,this._referencePosWGS84Comparable=null,this._resetReferencePosition()}destroy(){this.disconnectView(),this._viewHandles.destroy()}get _view(){var e;return null==(e=this._renderer)?void 0:e.view}get updating(){var e;return!!(!this.disableQueries&&(this._referencePosUpdateQuery||this._referencePosMapCoordsRequested)||null!=(e=this._renderer)&&e.updating)}get weatherEnabled(){var e,t,r;return(null==(e=this._view)?void 0:e.environment.atmosphereEnabled)&&!this._disableWeather&&(null==(t=this._view)||null==(r=t.state)?void 0:r.viewingMode)===U.Global&&C(this._view.spatialReference)}get weatherVisible(){var e;return this.weatherEnabled&&(null==(e=this._renderer)?void 0:e.weatherVisible)}get referencePositionWGS84Comparable(){return this._referencePosWGS84Comparable}connectView(e){this._renderer||(this._renderer=new y({view:e}),this._viewHandles.add([e.watch("environment.lighting.date",(e=>this._lightingDateHandler(e)),!0),e.watch("stationary",(()=>this._interactingStationaryHandler())),e.watch(["environment.lighting.directShadowsEnabled","environment.lighting.ambientOcclusionEnabled","environment.lighting.waterReflectionEnabled","environment.background.color"],(()=>this._updateRenderParamsHandler()),!0),e.watch("spatialReference",(()=>this._resetReferencePosition(!0)),!0),e.watch("environment.weather.type",(()=>this._updateLightParams()),!0),this.watch("weatherEnabled",(()=>this._updateLightParams()),!0),c(e,"viewingMode",(()=>this._resetReferencePosition(!0)),!0),c(e,"environment.lighting.cameraTrackingEnabled",(e=>this._updateCameraTracking(e)),!0),c(e,"state.camera",(()=>this._cameraHandler()),!0),this.watch("disableQueries",(()=>this._cameraHandler()))]),this._updateRenderParamsHandler(),this._updateLightParams(),this._cameraHandler(),this.notifyChange("updating"))}disconnectView(){this._viewHandles.removeAll(),this._resetReferencePosition(),this._renderer=s(this._renderer)}_updateCameraTracking(e){if(this._trackingEnabled=e,e)this._cameraHandler();else{const e=this._view.environment.lighting;e&&(e.positionTimezoneInfo.autoUpdated=!1)}}_lightingDateHandler(e){if(!e)return;const t=this._view.environment.lighting;if(!t.positionTimezoneInfo.autoUpdated){this._preserveAbsoluteDateTime=!0;const r=this._view.spatialReference;if(!b(r)){const e=this._view.camera.position;if(!this._referencePosMapCoords||!this._referencePosMapCoords.equals(e))return void this._requestReferencePositionUpdate(e)}if(this._preupdateTracking(e),n(this._referencePosWGS84Comparable)){const e=R(this._referencePosWGS84Comparable,D);n(e)&&(t.autoUpdate(null,e),this._trackingEnabled&&(t.positionTimezoneInfo.autoUpdated=!0))}}this._updateLightParams(e)}_preupdateTracking(e){!this._trackingEnabled&&this._view.environment.lighting.cameraTrackingEnabled&&this._cameraHandler(e)}_cameraHandler(e=null){const t=this._view;if(!t.ready)return;const r=t.stateManager.camera;r&&(this._cameraHandlerClientSide(r,e)||this._cameraHandlerServerSide(r))}_cameraHandlerClientSide(e,t){const r=C(this._view.spatialReference);if(r&&!b(this._view.spatialReference))return!1;const i=e.position;return o(this._referencePosWGS84Comparable)&&(this._referencePosWGS84Comparable=f()),r?w(i,this._referencePosWGS84Comparable):p(this._referencePosWGS84Comparable,i.longitude,i.latitude,i.z),this.notifyChange("referencePositionWGS84Comparable"),this._autoUpdateTimezone(this._referencePosWGS84Comparable,t)||this._updateLightParams(t),!0}_cameraHandlerServerSide(e){const t=e.position;(!this._referencePosMapCoords||this._referencePosMapCoordsRequested||this._exceedsReferencePosDistThreshold(t))&&this._requestReferencePositionUpdate(t,!0),this._view.mapCoordsHelper&&this._referencePosWGS84Comparable&&(this._referencePosWGS84Comparable[2]=t.z*this._view.mapCoordsHelper.unitInMeters,this._referencePosChanged())}_interactingStationaryHandler(){this._view.stationary&&this._executePendingReferencePositionUpdate()}_updateLightParams(e){const t=this._view,r=t.environment.lighting,i=e||r.date,s=t._stage,o=this._referencePosWGS84Comparable,a=n(o)?k:Q;if(n(o)){const e=this.weatherEnabled?t.environment.weather.type:"disabled";T(i,o,t.state.viewingMode,k,e)}const h=this._mainLight,c=a.direct;_(h.intensity,c.color,c.intensity*Math.PI),m(h.direction,c.directionToLightSource);const d=this._ambientLight;_(d.intensity,a.ambient.color,a.ambient.intensity);const l=this._moonLight;u(l.intensity,q,A,a.globalFactor);const p=(1-.5*a.globalFactor)*(1-.4*a.noonFactor*(1-a.globalFactor));_(l.intensity,l.intensity,p),m(l.direction,c.directionToLightSource),s.renderView.updateLightSources([h,d,l],1-a.noonFactor,a.globalFactor),this._updateRenderParamsHandler()}_autoUpdateTimezone(e,t=null){if(!this._view.environment.lighting.cameraTrackingEnabled||o(e))return!1;const r=L;r.setTime((t||this._view.environment.lighting.date).getTime());const i=R(e,D);if(o(i))return!1;let s=this._view.environment.lighting.positionTimezoneInfo;if(s.autoUpdated){if(s.hours===i.hours&&s.minutes===i.minutes&&s.seconds===i.seconds)return!1}else s=i;const n=r.getUTCHours()-(i.hours-s.hours),a=r.getUTCMinutes()-(i.minutes-s.minutes),h=r.getUTCSeconds()-(i.seconds-s.seconds);return r.setUTCHours(n),r.setUTCMinutes(a),r.setUTCSeconds(h),!t&&this._view.environment.lighting.autoUpdate(r,i)}_updateRenderParamsHandler(){const e=this._view._stage;if(!e)return;const r=a(this._referencePosWGS84Comparable,!0,(e=>M(e[2],this._view.state.viewingMode))),i=this._view.environment.background,s=i instanceof j?{type:"color",color:g(t.toUnitRGBA(i.color))}:{type:"color",color:v(0,0,0,1)};e.renderView.setRenderParameters({shadowMap:this._view.environment.lighting.directShadowsEnabled&&r,ssao:this._view.environment.lighting.ambientOcclusionEnabled,waterReflectionEnabled:this._view.environment.lighting.waterReflectionEnabled,background:s})}_resetReferencePosition(e=!1){this._cancelReferencePosUpdates(),this._referencePosMapCoords=null,this._referencePosMapCoordsRequested=null,this._referencePosResetPreserveAbsoluteTime=null,this._referencePosWGS84Comparable=null,this.notifyChange("updating"),e&&this._cameraHandler()}_requestReferencePositionUpdate(e,t=!1){if(!this.disableQueries&&(this._referencePosMapCoordsRequested?this._referencePosMapCoordsRequested.copy(e):this._referencePosMapCoordsRequested=e.clone(),this._referencePosResetPreserveAbsoluteTime=!!t,!this._referencePosUpdateQuery&&!this._referencePosUpdateTimer&&this._view.stationary)){const e=this._referencePosUpdateQuery=h(this._referencePointUpdateDelay).then((()=>{if(this._referencePosUpdateQuery===e){const t=()=>this._referencePosUpdateQuery!==e;return this._doReferencePositionUpdateQuery(t)}})).catch((e=>{"mapcoordshelper:missing-geometry-service"===e.name&&(this.disableQueries=!0)})).then((()=>{this._referencePosUpdateQuery===e&&(this._referencePosUpdateQuery=null,this._referencePosUpdateTimer||this._executePendingReferencePositionUpdate(),this.notifyChange("updating"))})),t=this._referencePosUpdateTimer=h(this._referencePointUpdateInterval).then((()=>{this._referencePosUpdateTimer===t&&(this._referencePosUpdateTimer=null,this._referencePosUpdateQuery||this._executePendingReferencePositionUpdate())}));this.notifyChange("updating")}}async _doReferencePositionUpdateQuery(e){this._referencePosResetPreserveAbsoluteTime&&(this._preserveAbsoluteDateTime=!1),this._referencePosMapCoords?this._referencePosMapCoords.copy(this._referencePosMapCoordsRequested):this._referencePosMapCoords=this._referencePosMapCoordsRequested.clone(),this._referencePosResetPreserveAbsoluteTime=null,this._referencePosMapCoordsRequested=null;const t=await this._view.mapCoordsHelper.toGeographic(this._referencePosMapCoords);if(!e()&&!isNaN(t[0])&&!isNaN(t[1])){const e=this._referencePosMapCoords.z*this._view.mapCoordsHelper.unitInMeters;this._referencePosWGS84Comparable?(this._referencePosWGS84Comparable[0]=t[0],this._referencePosWGS84Comparable[1]=t[1],this._referencePosWGS84Comparable[2]=e):this._referencePosWGS84Comparable=[t[0],t[1],e],this._referencePosChanged()}}_executePendingReferencePositionUpdate(){const e=this._referencePosMapCoordsRequested;e&&this._requestReferencePositionUpdate(e,this._referencePosResetPreserveAbsoluteTime)}_referencePosChanged(){this._preserveAbsoluteDateTime?this._updateLightParams():this._autoUpdateTimezone(this._referencePosWGS84Comparable)||this._updateLightParams(),this.notifyChange("referencePositionWGS84Comparable")}_exceedsReferencePosDistThreshold(e){if(this._referencePosMapCoords){let t=this._referencePosMapCoords.distance(e);return this._view.mapCoordsHelper&&(t*=this._view.mapCoordsHelper.unitInMeters),t>this._referencePointUpdateDistThreshold}return!0}_cancelReferencePosUpdates(){const e=!!this._referencePosUpdateQuery;return this._referencePosUpdateQuery=null,this._referencePosUpdateTimer=null,e}get test(){const e=this;return{get renderer(){return e._renderer},set referencePointUpdateInterval(t){e._referencePointUpdateInterval=t},set referencePointUpdateDistThreshold(t){e._referencePointUpdateDistThreshold=t},set referencePosUpdateTimer(t){e._referencePosUpdateTimer=t},set referencePointUpdateDelay(t){e._referencePointUpdateDelay=t},set disableWeather(t){e._disableWeather=t}}}};e([d({type:Boolean,readOnly:!0})],E.prototype,"updating",null),e([d()],E.prototype,"disableQueries",void 0),e([d()],E.prototype,"_disableWeather",void 0),e([d()],E.prototype,"weatherEnabled",null),e([d()],E.prototype,"weatherVisible",null),e([d()],E.prototype,"referencePositionWGS84Comparable",null),e([d()],E.prototype,"_renderer",void 0),e([d()],E.prototype,"_referencePosWGS84Comparable",void 0),E=e([l("esri.views.3d.environment.SceneViewEnvironmentManager")],E);const k=new S,Q=new S,L=new Date,D={hours:0,minutes:0,seconds:0},q=P(.22,.22,.33),A=P(.22,.22,.22);export{E as SceneViewEnvironmentManager};
|
|
@@ -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 e from"./CloudyWeather.js";import r from"./FoggyWeather.js";import t from"./RainyWeather.js";import o from"./SunnyWeather.js";const n={key:"type",base:null,typeMap:{sunny:o,cloudy:e,rainy:t,foggy:r}};function
|
|
5
|
+
import e from"./CloudyWeather.js";import r from"./FoggyWeather.js";import t from"./RainyWeather.js";import o from"./SunnyWeather.js";const n={key:"type",base:null,typeMap:{sunny:o,cloudy:e,rainy:t,foggy:r}},y=1e4;function a(e,r){if(e.type!==r.type)return!1;switch(e.type){case"sunny":case"rainy":case"cloudy":return e.cloudCover===r.cloudCover;case"foggy":return e.fogStrength===r.fogStrength}}export{a as weatherEquals,y as weatherHeightLimit,n as weatherTypes};
|
|
@@ -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{HandleOwner as t}from"../../../../../core/HandleOwner.js";import{deg2rad as s,rad2deg as
|
|
5
|
+
import{_ as e}from"../../../../../chunks/tslib.es6.js";import{HandleOwner as t}from"../../../../../core/HandleOwner.js";import{deg2rad as s,rad2deg as r}from"../../../../../core/mathUtils.js";import{isSome as i}from"../../../../../core/maybe.js";import{watch as o,sync as a}from"../../../../../core/reactiveUtils.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 c}from"../../../../../core/accessorSupport/decorators/subclass.js";import{axis as h,angle as p}from"../../../../../geometry/support/axisAngleDegrees.js";import{ViewingMode as l}from"../../../../ViewingMode.js";import{createGraphicGeometryUndoRecord as g}from"./undoRecords.js";let m=class extends t{constructor(e){super(e),this.angle=0,this.scale=1,this.initialAngle=0,this.previousAngle=0,this.previousScale=1}initialize(){this.restart()}restart(){this.handles.remove(d);const e=this.geometry.transform;if(this.scale=1,i(e)){const t=h(e.rotation)[2];Math.abs(t)>.999999&&(this.angle=s(p(e.rotation))*Math.sign(t))}this.initialAngle=this.angle,this.previousAngle=this.angle,this.previousScale=this.scale,this.handles.add(o((()=>({angle:this.angle,scale:this.scale})),(e=>this._update(e)),a),d)}cancel(){this.scale=1,this.angle=this.initialAngle}createUndoRecord(){return g(this.graphic)}_update({scale:e,angle:t}){const s=this.geometry.anchor,o=this.viewingMode===l.Global;e!==this.previousScale&&(this.geometry.scale(e/this.previousScale,{origin:s,geographic:o}),this.previousScale=e,i(this.geometry.transform)&&this.graphic.notifyMeshTransformChanged(),this.graphic.notifyGeometryChanged()),t!==this.previousAngle&&(this.geometry.rotate(0,0,r(t-this.previousAngle),{origin:s,geographic:o}),this.previousAngle=t,i(this.geometry.transform)&&this.graphic.notifyMeshTransformChanged(),this.graphic.notifyGeometryChanged())}};e([n({constructOnly:!0})],m.prototype,"graphic",void 0),e([n({constructOnly:!0})],m.prototype,"geometry",void 0),e([n({constructOnly:!0})],m.prototype,"viewingMode",void 0),e([n()],m.prototype,"angle",void 0),e([n()],m.prototype,"scale",void 0),m=e([c("esri.views.3d.interactive.editingTools.transformGraphic.ScaleRotateMeshAdapter")],m);const d="scale-heading-update-key";export{m as ScaleRotateMeshAdapter};
|
|
@@ -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
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{destroyMaybe as t,isSome as s}from"../../../core/maybe.js";import{initial as o,watch as i,when as a,syncAndInitial as l}from"../../../core/reactiveUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{hydrateGeometry as p}from"../../../layers/graphics/hydratedFeatures.js";import{FeatureTileController3D as c}from"../../../layers/graphics/controllers/FeatureTileController3D.js";import{FeatureLikeLayerView3D as m}from"./FeatureLikeLayerView3D.js";import{LayerView3D as h}from"./LayerView3D.js";import{FeatureTileFetcher3DLayerViewContext as d}from"./support/FeatureTileFetcher3DLayerViewContext.js";import{EventedSet as y}from"../support/EventedSet.js";import{updatingProgress as f}from"../support/updatingProperties.js";import{UpdatePolicy as g}from"../webgl-engine/lib/basicInterfaces.js";import{FeatureLayerView as F}from"../../layers/FeatureLayerView.js";import b from"../../layers/LayerView.js";import{RefreshableLayerView as v}from"../../layers/RefreshableLayerView.js";let x=class extends(v(m(F(h(b))))){constructor(e){super(e),this._controllerTotal=0,this._graphicsCoreTotal=0,this.suspendResumeExtentMode="data"}initialize(){this.updatingHandles.add((()=>this.view.floors),(()=>this.processor.filterVisibility.filterChanged()))}destroy(){this.fetcherContext=t(this.fetcherContext)}get maximumNumberOfFeatures(){var e,r;return null!=(e=null==(r=this.controller)?void 0:r.maximumNumberOfFeatures)?e:this._get("maximumNumberOfFeatures")}set maximumNumberOfFeatures(e){this._set("maximumNumberOfFeatures",e),this.controller&&(this.controller.maximumNumberOfFeatures=e)}get maximumNumberOfFeaturesExceeded(){return!!this.controller&&!(this.suspended||!this.controller.maximumNumberOfFeaturesExceeded)}get updatingProgressValue(){var e,r,t;let s=0;if(null!=(e=this.controller)&&e.updating){const e=this.controller.updatingRemaining,r=Math.max(this.controller.updatingTotal,this._controllerTotal);r>0&&(s=(r-e)/r,this._controllerTotal=r)}let o=0;if(null!=(r=this.processor)&&null!=(t=r.graphicsCore)&&t.updating){const e=this.processor.graphicsCore.updatingRemaining,r=Math.max(e,this._graphicsCoreTotal);r>0&&(o=(r-e)/r,this._graphicsCoreTotal=r)}return.5*(s+o)}get updatePolicy(){if(!this.controller)return g.ASYNC;switch(this.controller.mode){case"snapshot":{const e=C[this.layer.geometryType];return null==e||this.controller.serviceDataCount>e?g.ASYNC:g.SYNC}case"tiles":return g.ASYNC}}get hasZ(){const e=this.layer,r=e.capabilities&&e.capabilities.data;return!(!r||!r.supportsZ)&&("returnZ"in e&&null!=e.returnZ?e.returnZ:r.supportsZ)}get hasM(){const e=this.layer,r=e.capabilities&&e.capabilities.data;return!(!r||!r.supportsM)&&("returnM"in e&&null!=e.returnM&&e.returnM)}setVisibility(e,r){var t;null==(t=this.processor)||t.graphicsCore.setObjectIdVisibility(e,r)}createQuery(){return super.createQuery()}queryFeatures(e,r){const t=()=>super.queryFeatures(e,r);return"mesh"===this.layer.geometryType?this._queryFeaturesMesh(this._ensureQuery(e),t):t()}beforeSetController(e){e.maximumNumberOfFeatures=this.maximumNumberOfFeatures}createController(){this.fetcherContext=new d({layerView:this,returnZ:this.hasZ,returnM:this.hasM});const e=new c({layerView:this,context:this.fetcherContext,graphics:new y,extent:this.clippingExtent});return this.updatingHandles.add((()=>e.serviceDataExtent),(e=>{this.processor&&(this.processor.dataExtent=e)}),o),this.handles.add(i((()=>this.suspended),(r=>{r?e.suspend():e.resume()}),l)),this.updatingHandles.add((()=>{var e,r;return null==(e=this.processor)||null==(r=e.graphicsCore)?void 0:r.displayFeatureLimit}),(()=>this._updateDisplayFeatureLimit(e)),o),this.handles.add([this.view.resourceController.memoryController.events.on("quality-changed",(()=>this._updateDisplayFeatureLimit())),a((()=>!this.updating),(()=>{this._controllerTotal=0,this._graphicsCoreTotal=0,this.notifyChange("updatingProgressValue")}))]),e}async doRefresh(e){e&&!this.suspended&&this.controller&&this.controller.refetch(),this.processor.filterVisibility.dirty=!0}getUsedMemory(){var e,r,t,s;const o=null==(e=this.processor)?void 0:e.graphicsCore;return(null!=(r=null==o?void 0:o.usedMemory)?r:0)+(null!=(t=null==(s=this.controller)?void 0:s.memoryForUnusedFeatures)?t:0)}getUnloadedMemory(){var e,r,t,s;const o=null==(e=this.processor)?void 0:e.graphicsCore;return(null!=(r=null==o?void 0:o.unprocessedMemoryEstimate)?r:0)+(null!=(t=(null==(s=this.controller)?void 0:s.expectedFeatureDiff)*(null==o?void 0:o.usedMemoryPerGraphic))?t:0)}ignoresMemoryFactor(){var e;return null==(e=this.controller)?void 0:e.hasMaximumNumberOfFeaturesOverride}_updateDisplayFeatureLimit(e=this.controller){var r;if(!e||null==(r=this.processor)||!r.graphicsCore)return;const t=this.processor.graphicsCore.displayFeatureLimit,s=this.view.resourceController.memoryController.memoryFactor;if(1===s)e.displayFeatureLimit=t;else{const r=Math.ceil(t.maximumNumberOfFeatures*s),o=Math.ceil(t.maximumTotalNumberOfFeatures*s),i=Math.ceil(t.minimumTotalNumberOfFeatures*s);e.displayFeatureLimit={...t,maximumNumberOfFeatures:r,maximumTotalNumberOfFeatures:o,minimumTotalNumberOfFeatures:i}}}async _queryFeaturesMesh(e,r){await this._validateQueryFeaturesMesh(e);const t=await r();if(e&&e.outStatistics)return t;const s=this.layer.objectIdField,o=this.processor.graphicsCore.graphics3DGraphicsByObjectID,i=[];for(const a of t.features)if(a.geometry){const e=o.get(a.attributes[s]);e&&(a.geometry=p(e.graphic.geometry),i.push(a))}else i.push(a);return t.features=i,t}async _validateQueryFeaturesMesh(e){if(!e)return;const t=e=>{throw new r("feature-layer-view:unsupported-query",`Queries on Mesh feature collection layers do not support '${e}'`)},o=["quantizationParameters","geometryPrecision","maxAllowableOffset"];for(const r of o)null!=e[r]&&t(r);"returnM"in e&&e.returnM&&t("returnM"),"returnCentroid"in e&&e.returnCentroid&&t("returnCentroid"),s(e.outSpatialReference)&&!e.outSpatialReference.equals(this.view.spatialReference)&&t("outSpatialReference")}get performanceInfo(){var e,r,t,o,i;const a=null==(e=this.controller)?void 0:e.displayFeatureLimit,l=s(a)&&a.averageSymbolComplexity,u=s(l)?`f:${l.primitivesPerFeature},v:${l.primitivesPerCoordinate}`:"n/a",n={...this._getResourceInfo(),storedFeatures:0,totalVertices:0,partial:this.maximumNumberOfFeaturesExceeded,mode:null!=(r=null==(t=this.controller)?void 0:t.mode)?r:"n/a",symbolComplexity:u,nodes:null!=(o=null==(i=this.controller)?void 0:i.tileDescriptors.length)?o:0};if(this.controller&&n.displayedNumberOfFeatures){const e=this.controller.debug;n.storedFeatures=e.storedFeatures,n.totalVertices=e.totalVertices}return n}get test(){return{updatePolicy:this.updatePolicy,controller:this.controller}}};e([u()],x.prototype,"layer",void 0),e([u()],x.prototype,"controller",void 0),e([u()],x.prototype,"maximumNumberOfFeatures",null),e([u()],x.prototype,"maximumNumberOfFeaturesExceeded",null),e([u(f)],x.prototype,"updatingProgress",void 0),e([u({readOnly:!0,dependsOn:["controller.updatingRemaining","controller.updatingTotal","processor.graphicsCore.updatingRemaining"]})],x.prototype,"updatingProgressValue",null),e([u({readOnly:!0})],x.prototype,"updatePolicy",null),e([u({readOnly:!0})],x.prototype,"hasZ",null),e([u({readOnly:!0})],x.prototype,"hasM",null),e([u()],x.prototype,"suspendResumeExtentMode",void 0),x=e([n("esri.views.3d.layers.FeatureLayerViewBase3D")],x);const C={point:5e3,polygon:500,polyline:1e3},M=x;export{M 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{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import{
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import{destroyMaybe as r,get as s,isNone as i}from"../../../core/maybe.js";import{whenOnce as o}from"../../../core/reactiveUtils.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 l}from"../../../core/accessorSupport/decorators/subclass.js";import{hydrateGraphic as a}from"../../../layers/graphics/hydratedFeatures.js";import{FeatureTileController3D as u}from"../../../layers/graphics/controllers/FeatureTileController3D.js";import p from"../../../rest/support/Query.js";import{DrapeSourceType as c}from"./interfaces.js";import d from"./graphics/Graphics3DFeatureProcessor.js";import h from"./graphics/QueryEngine.js";import{toViewIfLocal as y}from"./support/projectExtentUtils.js";import{UpdatePolicy as m}from"../webgl-engine/lib/basicInterfaces.js";import{TaskPriority as g}from"../../support/Scheduler.js";const f=f=>{let E=class extends f{constructor(){super(...arguments),this.controller=null,this.updatePolicy=m.SYNC,this.suspendResumeExtentMode="computed",this.slicePlaneEnabled=!1,this.drapeSourceType=c.Features,this.fullExtentInLocalViewSpatialReference=null,this.suspendResumeExtent=null,this._controllerCreated=!1,this.clippingExtent=null,this.supportsHeightUnitConversion=!0,this.pendingController=null,this.queryEngine=null}initialize(){const e=this.layer;if("isTable"in e&&e.isTable)return void this.addResolvingPromise(Promise.reject(new t("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e})));this.addResolvingPromise(this._validateGeometryType());const r=new d({owner:this,frustumVisibilityEnabled:!0,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentVisibilityEnabled:!0,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!0,preferredUpdatePolicy:this.updatePolicy,updateClippingExtent:e=>this._updateClippingExtent(e)});this._set("processor",r),this.addResolvingPromise((async()=>{await r.setup(),this.queryEngine=new h({layerView:this,priority:g.FEATURE_QUERY_ENGINE})})()),this.addResolvingPromise((async()=>{const e=await y(this);this.fullExtentInLocalViewSpatialReference=e,await this._initializeController()})()),this.updatingHandles.add((()=>this.updatePolicy),(e=>this.processor.preferredUpdatePolicy=e)),this.notifyChange("updating")}destroy(){this._destroyPendingController(),this.controller=r(this.controller),this._set("processor",r(this.processor)),this.queryEngine=r(this.queryEngine),this.loadedGraphics=null}_destroyPendingController(){this.pendingController=r(this.pendingController)}get legendEnabled(){var e,t;return this.canResume()&&!(null!=(e=this.processor)&&null!=(t=e.frustumVisibility)&&t.suspended)}getGraphicFromGraphicUid(e){var t;let r=null;return null==(t=this.loadedGraphics)||t.forEach((t=>{t.uid===e&&(r=a(t,this.layer))})),r}whenGraphicBounds(e,t){var r;return null==(r=this.processor)?void 0:r.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){var r;return null==(r=this.processor)?void 0:r.computeAttachmentOrigin(e,t)}queryFeatures(e,t){return this.queryEngine.executeQuery(this._ensureQuery(e),s(t,"signal"))}queryObjectIds(e,t){return this.queryEngine.executeQueryForIds(this._ensureQuery(e),s(t,"signal"))}queryFeatureCount(e,t){return this.queryEngine.executeQueryForCount(this._ensureQuery(e),s(t,"signal"))}queryExtent(e,t){return this.queryEngine.executeQueryForExtent(this._ensureQuery(e),s(t,"signal"))}_ensureQuery(e){return i(e)?this.createQuery():p.from(e)}highlight(e){return this.processor.highlight(e,this.layer.objectIdField)}maskOccludee(e){return this.processor.maskOccludee(e)}canResume(){var e;return super.canResume()&&!(null!=(e=this.processor)&&e.suspended)}getSuspendInfo(){const e=super.getSuspendInfo();return this.processor?{...e,...this.processor.suspendInfo}:e}isUpdating(){var e,t,r;return!(!this.processor||this.processor.destroyed)&&!(this._controllerCreated&&(null==(e=this.controller)||!e.updating)&&null!=(t=this.view)&&null!=(r=t.basemapTerrain)&&r.ready&&!this.processor.updating)}async _initializeController(){const e=this.createController();this.pendingController=e,await e.when(),this._setControllerWhenInitialized(e)}async _setControllerWhenInitialized(e){try{await this.when()}catch(t){}this._controllerCreated=!0,this.notifyChange("updating"),this.isResolved()&&!this.destroyed?(await o((()=>{var e,t;return null==(e=this.view)||null==(t=e.basemapTerrain)?void 0:t.ready})),this.beforeSetController(e),this.pendingController=null,this.controller=e,this.loadedGraphics=e.graphics,this.notifyChange("updating")):this._destroyPendingController()}_updateClippingExtent(e){if(this.clippingExtent=e,!this.controller)return!1;switch(this.controller.type){case"stream":return!1;case"feature-tile-3d":return this.controller.extent=e,!0}}async _validateGeometryType(){switch(this.layer.geometryType){case"multipatch":case"multipoint":return Promise.reject(new t("featurelayerview3d:unsupported-geometry-type","Unsupported geometry type ${geometryType}",{geometryType:this.layer.geometryType}))}}_getResourceInfo(){var e,t;const r=this.controller instanceof u?this.controller:null;return{displayedNumberOfFeatures:this.loadedGraphics.length,maximumNumberOfFeatures:null!=(e=null==r?void 0:r.maximumNumberOfFeatures)?e:-1,totalNumberOfFeatures:null!=(t=null==r?void 0:r.serviceDataCount)?t:-1,nodes:0,...this.processor.performanceInfo}}get performanceInfo(){return this._getResourceInfo()}};return e([n()],E.prototype,"loadedGraphics",void 0),e([n()],E.prototype,"suspended",void 0),e([n({readOnly:!0})],E.prototype,"legendEnabled",null),e([n()],E.prototype,"updating",void 0),e([n()],E.prototype,"controller",void 0),e([n()],E.prototype,"processor",void 0),e([n({readOnly:!0})],E.prototype,"updatePolicy",void 0),e([n({readOnly:!0})],E.prototype,"suspendResumeExtentMode",void 0),e([n({type:Boolean})],E.prototype,"slicePlaneEnabled",void 0),e([n({readOnly:!0})],E.prototype,"suspendInfo",void 0),E=e([l("esri.views.3d.layers.FeatureLikeLayerView3D")],E),E};export{f as FeatureLikeLayerView3D};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as s}from"../../../chunks/tslib.es6.js";import{isSome as e}from"../../../core/maybe.js";import{whenTrueOnce as r,init as i,watch as t}from"../../../core/watchUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{DrapeSourceType as p}from"./interfaces.js";import{LayerView3D as n}from"./LayerView3D.js";import c from"./graphics/Graphics3DFrustumVisibility.js";import h from"./graphics/GraphicsProcessor.js";import{enlargeExtent as u}from"./graphics/graphicUtils.js";import{toViewIfLocal as l}from"./support/projectExtentUtils.js";import{UpdatePolicy as d}from"../webgl-engine/lib/basicInterfaces.js";import m from"../../layers/LayerView.js";const y=1.2;let g=class extends(n(m)){constructor(){super(...arguments),this.type="graphics-3d",this.frustumVisibility=new c,this.slicePlaneEnabled=!1,this.drapeSourceType=p.Features,this.suspendResumeExtent=null,this.fullExtentInLocalViewSpatialReference=null}initialize(){this._set("processor",new h({owner:this,layer:this.layer,scaleVisibilityEnabled:!0})),this.processor.setup(),this.frustumVisibility.setup(this),this._setupSuspendResumeExtent(),this.updatingHandles.add((()=>this.fullOpacity),(()=>this.processor.graphicsCore.opacityChange())),this.handles.add(this.layer.on("graphic-update",(s=>this.processor.graphicsCore.graphicUpdateHandler(s)))),this.addResolvingPromise(l(this).then((s=>this.fullExtentInLocalViewSpatialReference=s))),this.layer.internal?this.notifyChange("updating"):this.handles.add(r(this.view,"basemapTerrain.ready",(()=>this.notifyChange("updating"))))}destroy(){this.frustumVisibility&&(this.frustumVisibility.destroy(),this._set("frustumVisibility",null)),this.processor&&(this.processor.destroy(),this._set("processor",null))}get legendEnabled(){return this.canResume()&&!this.frustumVisibility.suspended}getSuspendInfo(){var s;const r=super.getSuspendInfo();return e(this.processor.scaleVisibility)&&this.processor.scaleVisibility.suspended&&(r.outsideScaleRange=!0),r.outsideOfView=!(null==(s=this.frustumVisibility)||!s.suspended),r}async fetchPopupFeatures(s,r){return e(r)?r.clientGraphics:null}notifyGraphicGeometryChanged(s){this.processor.graphicsCore.notifyGraphicGeometryChanged(s)}notifyGraphicVisibilityChanged(s){this.processor.graphicsCore.notifyGraphicVisibilityChanged(s)}get graphics3DGraphics(){var s;return null==(s=this.processor)?void 0:s.graphics3DGraphics}get graphics3DGraphicsByObjectID(){var s;return null==(s=this.processor)?void 0:s.graphics3DGraphicsByObjectID}get symbolUpdateType(){return this.processor.graphicsCore.symbolUpdateType}getGraphicFromGraphicUid(s){return this.processor.getGraphicFromGraphicUid(s)}whenGraphicBounds(s,e){return this.processor.whenGraphicBounds(s,e)}computeAttachmentOrigin(s,e){return this.processor?this.processor.graphicsCore.computeAttachmentOrigin(s,e):null}getSymbolLayerSize(s,e){return this.processor.getSymbolLayerSize(s,e)}queryGraphics(){return Promise.resolve(this.loadedGraphics)}maskOccludee(s){return this.processor.maskOccludee(s)}highlight(s){return this.processor.highlight(s)}get updatePolicy(){var s;return(null==(s=this.processor)?void 0:s.graphicsCore.effectiveUpdatePolicy)||d.SYNC}canResume(){var s;return super.canResume()&&!(null!=(s=this.processor)&&s.suspended)}isUpdating(){var s,e;return!(!(this.processor&&this.processor.updating||this.frustumVisibility&&this.frustumVisibility.updating)&&(this.layer.internal||null!=(s=this.view)&&null!=(e=s.basemapTerrain)&&e.ready))}_setupSuspendResumeExtent(){const s=()=>{this.suspendResumeExtent=u(this.processor.graphicsCore.computedExtent,this.suspendResumeExtent,y,this.processor.graphicsCore.extentPadding),this.frustumVisibility.setExtent(this.suspendResumeExtent)};i(this.processor.graphicsCore,"computedExtent",(()=>s()),!0),t(this.processor.graphicsCore,"extentPadding",(()=>s()),!0)}get performanceInfo(){return{displayedNumberOfFeatures:this.loadedGraphics.length,maximumNumberOfFeatures:-1,totalNumberOfFeatures:-1,nodes:0,core:null,updating:this.updating,elevationUpdating:this.processor.elevationAlignment.updating,visibilityFrustum:!this.frustumVisibility.suspended}}};s([o({aliasOf:"layer.graphics"})],g.prototype,"loadedGraphics",void 0),s([o({readOnly:!0})],g.prototype,"suspended",void 0),s([o({readOnly:!0})],g.prototype,"legendEnabled",null),s([o({readOnly:!0})],g.prototype,"updating",void 0),s([o()],g.prototype,"layer",void 0),s([o({readOnly:!0})],g.prototype,"frustumVisibility",void 0),s([o({readOnly:!0})],g.prototype,"processor",void 0),s([o({type:Boolean})],g.prototype,"slicePlaneEnabled",void 0),g=s([a("esri.views.3d.layers.GraphicsLayerView3D")],g);const f=g;export{f 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{_ as r}from"../../../chunks/tslib.es6.js";import
|
|
5
|
+
import{_ as r}from"../../../chunks/tslib.es6.js";import s from"../../../core/Accessor.js";import{isSome as e}from"../../../core/maybe.js";import{property as o}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{DrapeSourceType as t}from"./interfaces.js";import p from"./graphics/GraphicsProcessor.js";import{GraphicsView as c}from"../../layers/GraphicsView.js";let a=class extends(c(s)){constructor(r){super(r),this.processor=null,this.slicePlaneEnabled=!1,this.drapeSourceType=t.Features}initialize(){const r="__sceneView.graphics-"+Date.now().toString(16),s={id:r,uid:r,type:"graphics-view-3d-proxy"};this._set("processor",new p({owner:this,layer:s})),this.processor.setup()}destroy(){this.processor&&(this.processor.destroy(),this._set("processor",null))}get updating(){var r;return!(null==(r=this.processor)||!r.updating)}notifyGraphicGeometryChanged(r){this.processor.graphicsCore.notifyGraphicGeometryChanged(r)}notifyGraphicVisibilityChanged(r){this.processor.graphicsCore.notifyGraphicVisibilityChanged(r)}get graphics3DGraphics(){return this.processor.graphicsCore.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.processor.graphicsCore.graphics3DGraphicsByObjectID}get symbolUpdateType(){return this.processor.graphicsCore.symbolUpdateType}getGraphicFromGraphicUid(r){return this.processor.getGraphicFromGraphicUid(r)}whenGraphicBounds(r,s){return this.processor.whenGraphicBounds(r,s)}graphicChanged(r){this.processor.graphicsCore.graphicUpdateHandler(r)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}queryGraphics(){return Promise.resolve(this.loadedGraphics)}async fetchPopupFeatures(r,s){return e(s)?s.clientGraphics:null}highlight(r){return this.processor.highlight(r)}maskOccludee(r){return this.processor.maskOccludee(r)}};r([o({readOnly:!0,aliasOf:"view.graphics"})],a.prototype,"graphics",void 0),r([o({aliasOf:"graphics"})],a.prototype,"loadedGraphics",void 0),r([o({readOnly:!0})],a.prototype,"updating",null),r([o({constructOnly:!0})],a.prototype,"view",void 0),r([o()],a.prototype,"processor",void 0),r([o({type:Boolean})],a.prototype,"slicePlaneEnabled",void 0),a=r([i("esri.views.3d.layers.GraphicsView3D")],a);const h=a;export{h 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{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Logger.js";import{destroyMaybe as i,isSome as s,isNone as o,unwrap as a}from"../../../core/maybe.js";import{initial as n}from"../../../core/reactiveUtils.js";import{init as d}from"../../../core/watchUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{b as u}from"../../../chunks/vec3.js";import{f as c,c as p}from"../../../chunks/vec3f64.js";import{projectBuffer as g,projectVectorToVector as m,projectBoundingRect as f}from"../../../geometry/projection.js";import{create as y}from"../../../geometry/support/aaBoundingRect.js";import{extentContainsCoords3D as _}from"../../../geometry/support/contains.js";import{getGeometryZScaler as b}from"../../../geometry/support/zscale.js";import{makeDehydratedPoint as v,estimateSize as E}from"../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as x}from"../../../layers/graphics/hydratedFeatures.js";import I from"../../../layers/graphics/controllers/I3SOnDemandController.js";import w from"../../../layers/support/FeatureFilter.js";import{getRenderingInfo as S,getRenderingInfoAsync as C}from"../../../renderers/support/renderingInfoUtils.js";import D from"../../../rest/support/Query.js";import{I3SPointsWorkerHandle as F}from"./I3SPointsWorkerHandle.js";import{DrapeSourceType as A}from"./interfaces.js";import{LayerView3D as O}from"./LayerView3D.js";import j from"./graphics/Graphics3DFeatureLikeLayerView.js";import N from"./graphics/QueryEngine.js";import{createInteractiveEditSession as T,processAttributeEdits as G}from"./i3s/attributeEditing.js";import{I3SAttributeOverrides as V}from"./i3s/I3SAttributeOverrides.js";import{checkSpatialReferences as M,containsDraco as R,whenGraphicAttributes as P,getCachedAttributeValue as L}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as U}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as H}from"./support/fieldProperties.js";import{PopupSceneLayerView as q}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as Q}from"./support/SceneLayerViewRequiredFields.js";import k from"../support/debugFlags.js";import{GraphicsMap as B}from"../support/GraphicsMap.js";import{compute as z}from"../support/orientedBoundingBox.js";import{updatingProgress as W}from"../support/updatingProperties.js";import{UpdatePolicy as K}from"../webgl-engine/lib/basicInterfaces.js";import Z from"../../layers/SceneLayerView.js";import{TaskPriority as Y}from"../../support/Scheduler.js";const J=r.getLogger("esri.views.3d.layers.SceneLayerGraphicsView3D"),$=H();let X=class extends(U(q(O(Z)))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._nodesAddedToStage=new Map,this.drapeSourceType=A.Features,this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this.loadedGraphics=new B,this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}initialize(){var e,t;const r=this.layer;this.addResolvingPromise(r.indexInfo),this._attributeOverrides=new V(this.layer,null==(e=this.view.resourceController)?void 0:e.memoryController),M(r,this.view.spatialReference,this.view.viewingMode),this.fieldsHelper=new Q({layerView:this}),this.updatingHandles.add((()=>r.rangeInfos),(e=>this._rangeInfosChanged(e)),n),this.updatingHandles.add((()=>r.renderer),((e,t)=>this._rendererChange(e,t))),this.updatingHandles.add((()=>this.parsedDefinitionExpression),(()=>this._filterChange())),this.updatingHandles.add((()=>this.view.floors),(()=>this.graphics3d.filterVisibility.filterChanged())),this.handles.add(d(k,"I3S_TREE_SHOW_TILES",(e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then((({I3STreeDebugger:t})=>{!this._treeDebugger&&k.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))}))}else e||!this._treeDebugger||k.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)}))),this._set("graphics3d",new j({owner:this,layer:r,preferredUpdatePolicy:K.ASYNC,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentVisibilityEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,suspendResumeExtentMode:"data",dataExtent:r.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),null==(t=this.graphics3d.elevationAlignment)||t.events.on("invalidate-elevation",(e=>this._invalidateElevation(e))),this.supportsHeightUnitConversion&&(this._verticalScale=b("point",r.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.graphics3d.setup()),this._memCache=this.view.resourceController.memoryController.newCache(r.uid),this._controller=new I({layerView:this,scaleVisibilityEnabled:!1}),R(this.layer.geometryDefinitions)&&(this._worker=new F((e=>this.view.resourceController.schedule(e)))),this.handles.add(this.layer.on("apply-edits",(e=>this.updatingHandles.addPromise(e.result)))),this.handles.add(this.layer.on("edits",(e=>this._handleEdits(e)))),this.when((()=>{this._queryEngine=new N({layerView:this,priority:Y.FEATURE_QUERY_ENGINE}),this.updatingHandles.add((()=>this.maximumNumberOfFeatures),(e=>this._controller.featureTarget=e),n),this.updatingHandles.add((()=>this.suspended),(e=>{e&&this._removeAllNodeData()}))}))}destroy(){this._treeDebugger=i(this._treeDebugger),this._attributeOverrides=i(this._attributeOverrides),this._set("graphics3d",i(this.graphics3d)),this._controller=i(this._controller),this._queryEngine=i(this._queryEngine),this._worker=i(this._worker),this._memCache=i(this._memCache),this._nodesAddedToStage.clear(),this.fieldsHelper=i(this.fieldsHelper)}get requiredFields(){var e,t;return null!=(e=null==(t=this.fieldsHelper)?void 0:t.requiredFields)?e:[]}get maximumNumberOfFeatures(){const e=this.graphics3d&&this.graphics3d.graphicsCore&&this.graphics3d.graphicsCore.displayFeatureLimit;return e?e.maximumNumberOfFeatures:0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller&&!this._controller.leavesReached)}get hasM(){return!1}get hasZ(){return!0}notifyGraphicGeometryChanged(e){this.graphics3d.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphics3d.graphicsCore.notifyGraphicVisibilityChanged(e)}async whenGraphicAttributes(e,t){return P(this.layer,e,this._getObjectIdField(),t,(()=>[...this._nodesAddedToStage.values()]))}getGraphicFromGraphicUid(e){if(!this.loadedGraphics)return null;const t=x(this.loadedGraphics.find((t=>t.uid===e)),this.layer),r=this._getObjectIdField();return t&&t.attributes&&t.attributes[r]?(t.layer=this.layer,t.sourceLayer=this.layer,t):null}whenGraphicBounds(e,t){return this.graphics3d.graphicsCore.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphics3d.graphicsCore.computeAttachmentOrigin(e,t)}canResume(){return super.canResume()&&(!this._controller||this._controller.rootNodeVisible)}isUpdating(){var e,t,r;return!!(null!=(e=this._controller)&&e.updating||null!=(t=this.graphics3d)&&t.updating||null!=(r=this.fieldsHelper)&&r.updating)}getRenderingInfo(e,t,r){const i=S(e,{renderer:t,arcade:r});if(s(i)&&i.color){const e=i.color;e[0]=e[0]/255,e[1]=e[1]/255,e[2]=e[2]/255}return i}async getRenderingInfoAsync(e,t,r,i){return C(e,{renderer:t,arcade:r,...i})}get symbolUpdateType(){return this.graphics3d.graphicsCore.symbolUpdateType}highlight(e){return this.graphics3d.highlight(e,this.layer.objectIdField)}get updatePolicy(){return this.graphics3d.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return T(this.attributeEditingContext,e)}async _extractBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};return o(this._worker)&&(this._worker=new F((e=>this.view.resourceController.schedule(e)))),this._worker.invoke(r,t).then((e=>{if(s(e)){return{positionData:e.positions,featureIds:e.featureIds}}throw new Error("Failed to decompress Draco point data")}))}_checkExtent(e,t){e&&!_(e,t)&&(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&J.error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&J.error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++)}async addNode(e,t,r){if(!re(t)&&!te(t))return Promise.reject();if(this._nodesAddedToStage.has(e.index))return void J.error("I3S node "+e.id+" already added");const i=s(this.layer.fullExtent)?se(this.layer.fullExtent.clone(),.5):null,o=this._controller.crsVertex,a=[],n={graphics:null,featureIds:null,attributeInfo:t.attributeDataInfo,node:e};if(re(t)?await this._addNodeBinaryPointData(e,n,t,i,a,r):te(t)&&this._addNodeLegacyPointData(e,n,t,i,a),await this._attributeOverrides.apply(n.featureIds,t.attributeDataInfo,r),e.numFeatures=n.graphics.length,this._updateNodeMemory(e),ie(n),a.length>0&&(this._computeObb(e,a,o),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return this._cacheNodeData(n),Promise.resolve();if(s(this._verticalScale))for(const s of n.graphics)this._verticalScale(s.geometry);return this._nodesAddedToStage.set(e.index,n),this.loadedGraphics.addMany(n.graphics),this._filterNode(n),this._treeDebugger&&this._treeDebugger.update(),Promise.resolve()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;g(t,r,0,t,s,0,t.length/3);const o={data:t,size:3};e.serviceObb=z(o),i.isGeographic&&m(e.serviceObb.center,s,e.serviceObb.center,i)}isNodeLoaded(e){return this._nodesAddedToStage.has(e)}isNodeReloading(){return!1}updateNodeState(){}async _addNodeBinaryPointData(e,r,i,o,n,d){const l=await this._extractBinaryPointData(i,d);if(null==l)return Promise.reject();const h=this._getObjectIdField(),p=this._controller.crsVertex,m=this.view.spatialReference,f=this.graphics3d.graphicsCore,{positionData:y,featureIds:_}=l,b=3,E=y.length/b,x=new Array;for(let I=0;I<E;I++){const r=s(e.serviceObb)?e.serviceObb.center:[0,0,0],i=I*b,d=c(y[i+0],y[i+1],y[i+2]);u(d,d,r),e.serviceObb||n.push(d[0],d[1],d[2]),s(o)&&this._checkExtent(o,d);const l=_[I],E={};null!=l&&(E[h]=l);const w=null==l?t.generateUID():l;g(d,p,0,ae,m,0,1);const S=v(ae[0],ae[1],ae[2],m),C=this.loadedGraphics.get(w);if(s(C))C.level<e.level&&(ne.property="geometry",ne.graphic=C,ne.oldValue=a(C.geometry),ne.newValue=S,C.geometry=S,f.graphicUpdateHandler(ne)),x.push(C);else{const r=t.generateUID();x.push({objectId:w,uid:r,geometry:S,attributes:E,visible:!0,level:e.level})}}r.graphics=x,r.featureIds=_}_addNodeLegacyPointData(e,r,i,o,a){const n=this._getObjectIdField(),d=this._controller.crsVertex,l=this.view.spatialReference,h=[0,0,0],u=new Array,c=new Array;for(const p of i.pointData){const r=p.featureDataPosition,i=r.length,m=p.geometries&&p.geometries[0]||oe[i],f=p.featureIds[0];if("points"!==m.params.type)continue;s(o)&&this._checkExtent(o,r);const y={};null!=f&&(y[n]=f);const _=null==f?t.generateUID():f;let b;"Embedded"===m.type&&(b=m.params.vertexAttributes.position);for(let o=0;o<b.length;o+=i){for(let e=0;e<i;e++)h[e]=r[e]+b[o+e];const n=3===i;e.serviceObb||a.push(h[0],h[1],n?h[2]:0),g(h,d,0,ae,l,0,1);const u=v(ae[0],ae[1],n?ae[2]:void 0,l),p=this.loadedGraphics.get(_);s(p)?c.push(p):c.push({objectId:_,uid:t.generateUID(),geometry:u,attributes:y,visible:!0})}u.push(f)}r.graphics=c,r.featureIds=u}_updateNodeMemory(e){e.memory=4096+(s(e.numFeatures)?e.numFeatures*this.graphics3d.graphicsCore.usedMemoryPerGraphic:0)}_cacheNodeData(e){const t=e.graphics.reduce(((e,t)=>E(t)+e),512+8*e.featureIds.length+1024);this._memCache.put(this._getMemCacheKey(e.node),e,t)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this._nodesAddedToStage.forEach((e=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}})),this._nodesAddedToStage.clear(),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this._nodesAddedToStage.get(e);return t?(this.loadedGraphics.removeMany(t.graphics),this._nodesAddedToStage.delete(e),this._treeDebugger&&this._treeDebugger.update(),t):null}async loadCachedNodeData(e){return this._memCache.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,t,r,i){if(!this._nodesAddedToStage.has(e.index))return this.loadedGraphics.addMany(t.graphics),this._nodesAddedToStage.set(e.index,t),this._updateNodeMemory(e),await this.updateAttributes(e.index,r,i),this._filterNode(t),this._treeDebugger&&this._treeDebugger.update(),Promise.resolve();J.error("I3S node "+e.id+" already added")}getLoadedNodeIds(){const e=[];return this._nodesAddedToStage.forEach((t=>e.push(t.node.id))),e.sort()}getVisibleNodes(){const e=new Array;return this._nodesAddedToStage.forEach((t=>e.push(t.node))),e}getLoadedNodeIndices(e){this._nodesAddedToStage.forEach(((t,r)=>e.push(r)))}getLoadedAttributes(e){const t=this._nodesAddedToStage.get(e);if(t&&s(t.attributeInfo))return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this._nodesAddedToStage.get(e);if(t&&s(t.attributeInfo))return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this._nodesAddedToStage.get(e);r&&!o(r.attributeInfo)&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this._nodesAddedToStage.get(e);i&&(await this._attributeOverrides.apply(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){if(ie(e),this._filterNode(e),this.graphics3d.graphicsCore.labelsEnabled){const t=e.graphics.map((e=>e.uid));this.graphics3d.graphicsCore.updateLabelingInfo(t)}}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||"OBJECTID"}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every(((e,t)=>s[t]===o[t]))||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&J.warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this._nodesAddedToStage.forEach((e=>this._filterNode(e)))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression;for(const r of e.graphics){const e=r.visible;r.visible=!t||this._evaluateClause(t,r),e!==r.visible&&(ne.graphic=r,ne.property="visible",ne.oldValue=e,ne.newValue=r.visible,this.graphics3d.graphicsCore.graphicUpdateHandler(ne))}}_invalidateElevation(e){const t=this._controller.crsIndex;f(e.extent,e.spatialReference,de,t),this._controller.updateElevationChanged(de,t)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return s(this.filter)?this.filter.createQuery(e):new D(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),null==t?void 0:t.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),null==t?void 0:t.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),null==t?void 0:t.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),null==t?void 0:t.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(o(e)?this.createQuery():D.from(e))}getUsedMemory(){const e=this.graphics3d&&this.graphics3d.graphicsCore;return e?e.usedMemory:0}getUnloadedMemory(){const e=this.graphics3d&&this.graphics3d.graphicsCore;return.8*((this._controller?this._controller.unloadedMemoryEstimate:0)+(e?e.unprocessedMemoryEstimate:0))}ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}_handleEdits(e){G(this.attributeEditingContext,e)}get attributeEditingContext(){const e=this._getObjectIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,forEachNode:e=>this._nodesAddedToStage.forEach((t=>e(t.node,t.featureIds))),attributeStorageInfo:this.i3slayer.attributeStorageInfo,attributeOverrides:this._attributeOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const o=this._nodesAddedToStage.get(t);if(s(i)){const t=this.loadedGraphics.get(i.attributes[e]);s(t)&&this.graphics3d.graphicsCore.recreateGraphics([t])}else s(o)&&this.graphics3d.graphicsCore.recreateGraphics(o.graphics)},clearMemCache:()=>{}}}get performanceInfo(){const e={displayedNumberOfFeatures:this.loadedGraphics.length,maximumNumberOfFeatures:this.maximumNumberOfFeatures,totalNumberOfFeatures:-1,nodes:this._nodesAddedToStage.size,core:this.graphics3d.graphicsCore.performanceInfo};return this._controller&&this._controller.updateStats(e),e}get test(){return{controller:this._controller,numNodes:this._nodesAddedToStage.size,numFeatures:this.loadedGraphics.length}}};e([l()],X.prototype,"graphics3d",void 0),e([l({type:w})],X.prototype,"filter",void 0),e([l()],X.prototype,"loadedGraphics",void 0),e([l({aliasOf:"layer"})],X.prototype,"i3slayer",void 0),e([l()],X.prototype,"_controller",void 0),e([l()],X.prototype,"updating",void 0),e([l()],X.prototype,"suspended",void 0),e([l()],X.prototype,"holeFilling",void 0),e([l(W)],X.prototype,"updatingProgress",void 0),e([l({aliasOf:"_controller.updatingProgress"})],X.prototype,"updatingProgressValue",void 0),e([l($.requiredFields)],X.prototype,"requiredFields",null),e([l($.availableFields)],X.prototype,"availableFields",void 0),e([l()],X.prototype,"fieldsHelper",void 0),e([l({type:Number})],X.prototype,"maximumNumberOfFeatures",null),e([l({readOnly:!0})],X.prototype,"maximumNumberOfFeaturesExceeded",null),e([l({readOnly:!0,aliasOf:"view.qualitySettings.sceneService.point.lodFactor"})],X.prototype,"lodFactor",void 0),e([l({readOnly:!0})],X.prototype,"hasM",null),e([l({readOnly:!0})],X.prototype,"hasZ",null),X=e([h("esri.views.3d.layers.SceneLayerGraphicsView3D")],X);const ee=X;function te(e){return"pointData"in e}function re(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function ie(e){const t=e.attributeInfo;for(let r=0;r<e.graphics.length;r++){const i=e.graphics[r];if(i.attributes||(i.attributes={}),s(t)&&s(t.loadedAttributes))for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(i.attributes[e]=L(t.attributeData[e],r))}}function se(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,e.hasZ&&(e.zmin-=t,e.zmax+=t),e.hasM&&(e.mmin-=t,e.mmax+=t),e}const oe={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},ae=p(),ne={graphic:null,property:null,oldValue:null,newValue:null},de=y();export{ee as default};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Logger.js";import{destroyMaybe as i,isNone as s,isSome as o,unwrap as a}from"../../../core/maybe.js";import{initial as n}from"../../../core/reactiveUtils.js";import{init as d}from"../../../core/watchUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{b as h}from"../../../chunks/vec3.js";import{f as c,c as p}from"../../../chunks/vec3f64.js";import{projectBuffer as g,projectVectorToVector as m,projectBoundingRect as f}from"../../../geometry/projection.js";import{create as y}from"../../../geometry/support/aaBoundingRect.js";import{extentContainsCoords3D as _}from"../../../geometry/support/contains.js";import{getGeometryZScaler as b}from"../../../geometry/support/zscale.js";import{makeDehydratedPoint as v,estimateSize as E}from"../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as x}from"../../../layers/graphics/hydratedFeatures.js";import I from"../../../layers/graphics/controllers/I3SOnDemandController.js";import w from"../../../layers/support/FeatureFilter.js";import S from"../../../rest/support/Query.js";import{I3SPointsWorkerHandle as D}from"./I3SPointsWorkerHandle.js";import{DrapeSourceType as F}from"./interfaces.js";import{LayerView3D as C}from"./LayerView3D.js";import A from"./graphics/Graphics3DFeatureProcessor.js";import O from"./graphics/QueryEngine.js";import{createInteractiveEditSession as j,processAttributeEdits as N}from"./i3s/attributeEditing.js";import{I3SAttributeOverrides as T}from"./i3s/I3SAttributeOverrides.js";import{checkSpatialReferences as V,containsDraco as G,whenGraphicAttributes as M,getCachedAttributeValue as P}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as R}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as L}from"./support/fieldProperties.js";import{PopupSceneLayerView as H}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as U}from"./support/SceneLayerViewRequiredFields.js";import q from"../support/debugFlags.js";import{GraphicsMap as Q}from"../support/GraphicsMap.js";import{compute as k}from"../support/orientedBoundingBox.js";import{updatingProgress as B}from"../support/updatingProperties.js";import{UpdatePolicy as z}from"../webgl-engine/lib/basicInterfaces.js";import W from"../../layers/SceneLayerView.js";import{TaskPriority as K}from"../../support/Scheduler.js";const Z=r.getLogger("esri.views.3d.layers.SceneLayerGraphicsView3D"),Y=L();let J=class extends(R(H(C(W)))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._nodesAddedToStage=new Map,this.drapeSourceType=F.Features,this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this.loadedGraphics=new Q,this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}initialize(){var e,t;const r=this.layer;this.addResolvingPromise(r.indexInfo),this._attributeOverrides=new T(this.layer,null==(e=this.view.resourceController)?void 0:e.memoryController),V(r,this.view.spatialReference,this.view.viewingMode),this.fieldsHelper=new U({layerView:this}),this.updatingHandles.add((()=>r.rangeInfos),(e=>this._rangeInfosChanged(e)),n),this.updatingHandles.add((()=>r.renderer),((e,t)=>this._rendererChange(e,t))),this.updatingHandles.add((()=>this.parsedDefinitionExpression),(()=>this._filterChange())),this.updatingHandles.add((()=>this.view.floors),(()=>this.processor.filterVisibility.filterChanged())),this.handles.add(d(q,"I3S_TREE_SHOW_TILES",(e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then((({I3STreeDebugger:t})=>{!this._treeDebugger&&q.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))}))}else e||!this._treeDebugger||q.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)}))),this._set("processor",new A({owner:this,preferredUpdatePolicy:z.ASYNC,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentVisibilityEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,dataExtent:r.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),null==(t=this.processor.elevationAlignment)||t.events.on("invalidate-elevation",(e=>this._invalidateElevation(e))),this.supportsHeightUnitConversion&&(this._verticalScale=b("point",r.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.setup()),this._memCache=this.view.resourceController.memoryController.newCache(r.uid),this._controller=new I({layerView:this,scaleVisibilityEnabled:!1}),G(this.layer.geometryDefinitions)&&(this._worker=new D((e=>this.view.resourceController.schedule(e)))),this.handles.add(this.layer.on("apply-edits",(e=>this.updatingHandles.addPromise(e.result)))),this.handles.add(this.layer.on("edits",(e=>this._handleEdits(e)))),this.when((()=>{this._queryEngine=new O({layerView:this,priority:K.FEATURE_QUERY_ENGINE}),this.updatingHandles.add((()=>this.maximumNumberOfFeatures),(e=>this._controller.featureTarget=e),n),this.updatingHandles.add((()=>this.suspended),(e=>{e&&this._removeAllNodeData()}))}))}destroy(){this._treeDebugger=i(this._treeDebugger),this._attributeOverrides=i(this._attributeOverrides),this._set("processor",i(this.processor)),this._controller=i(this._controller),this._queryEngine=i(this._queryEngine),this._worker=i(this._worker),this._memCache=i(this._memCache),this._nodesAddedToStage.clear(),this.fieldsHelper=i(this.fieldsHelper)}get requiredFields(){var e,t;return null!=(e=null==(t=this.fieldsHelper)?void 0:t.requiredFields)?e:[]}get maximumNumberOfFeatures(){var e,t,r;const i=null==(e=this.processor)||null==(t=e.graphicsCore)?void 0:t.displayFeatureLimit;return null!=(r=null==i?void 0:i.maximumNumberOfFeatures)?r:0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller&&!this._controller.leavesReached)}get hasM(){return!1}get hasZ(){return!0}async whenGraphicAttributes(e,t){return M(this.layer,e,this._getObjectIdField(),t,(()=>[...this._nodesAddedToStage.values()]))}getGraphicFromGraphicUid(e){if(!this.loadedGraphics)return null;const t=x(this.loadedGraphics.find((t=>t.uid===e)),this.layer),r=this._getObjectIdField();return t&&t.attributes&&t.attributes[r]?(t.layer=this.layer,t.sourceLayer=this.layer,t):null}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}canResume(){return super.canResume()&&(!this._controller||this._controller.rootNodeVisible)}isUpdating(){var e,t,r;return!!(null!=(e=this._controller)&&e.updating||null!=(t=this.processor)&&t.updating||null!=(r=this.fieldsHelper)&&r.updating)}highlight(e){return this.processor.highlight(e,this.layer.objectIdField)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return j(this.attributeEditingContext,e)}async _extractBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};return s(this._worker)&&(this._worker=new D((e=>this.view.resourceController.schedule(e)))),this._worker.invoke(r,t).then((e=>{if(o(e)){return{positionData:e.positions,featureIds:e.featureIds}}throw new Error("Failed to decompress Draco point data")}))}_checkExtent(e,t){e&&!_(e,t)&&(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&Z.error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&Z.error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++)}async addNode(e,t,r){if(!ee(t)&&!X(t))return Promise.reject();if(this._nodesAddedToStage.has(e.index))return void Z.error("I3S node "+e.id+" already added");const i=o(this.layer.fullExtent)?re(this.layer.fullExtent.clone(),.5):null,s=this._controller.crsVertex,a=[],n={graphics:null,featureIds:null,attributeInfo:t.attributeDataInfo,node:e};if(ee(t)?await this._addNodeBinaryPointData(e,n,t,i,a,r):X(t)&&this._addNodeLegacyPointData(e,n,t,i,a),await this._attributeOverrides.apply(n.featureIds,t.attributeDataInfo,r),e.numFeatures=n.graphics.length,this._updateNodeMemory(e),te(n),a.length>0&&(this._computeObb(e,a,s),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return this._cacheNodeData(n),Promise.resolve();if(o(this._verticalScale))for(const o of n.graphics)this._verticalScale(o.geometry);return this._nodesAddedToStage.set(e.index,n),this.loadedGraphics.addMany(n.graphics),this._filterNode(n),this._treeDebugger&&this._treeDebugger.update(),Promise.resolve()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;g(t,r,0,t,s,0,t.length/3);const o={data:t,size:3};e.serviceObb=k(o),i.isGeographic&&m(e.serviceObb.center,s,e.serviceObb.center,i)}isNodeLoaded(e){return this._nodesAddedToStage.has(e)}isNodeReloading(){return!1}updateNodeState(){}async _addNodeBinaryPointData(e,r,i,s,n,d){const l=await this._extractBinaryPointData(i,d);if(null==l)return Promise.reject();const u=this._getObjectIdField(),p=this._controller.crsVertex,m=this.view.spatialReference,f=this.processor.graphicsCore,{positionData:y,featureIds:_}=l,b=3,E=y.length/b,x=new Array;for(let I=0;I<E;I++){const r=o(e.serviceObb)?e.serviceObb.center:[0,0,0],i=I*b,d=c(y[i+0],y[i+1],y[i+2]);h(d,d,r),e.serviceObb||n.push(d[0],d[1],d[2]),o(s)&&this._checkExtent(s,d);const l=_[I],E={};null!=l&&(E[u]=l);const w=null==l?t.generateUID():l;g(d,p,0,se,m,0,1);const S=v(se[0],se[1],se[2],m),D=this.loadedGraphics.get(w);if(o(D))D.level<e.level&&(oe.property="geometry",oe.graphic=D,oe.oldValue=a(D.geometry),oe.newValue=S,D.geometry=S,f.graphicUpdateHandler(oe)),x.push(D);else{const r=t.generateUID();x.push({objectId:w,uid:r,geometry:S,attributes:E,visible:!0,level:e.level})}}r.graphics=x,r.featureIds=_}_addNodeLegacyPointData(e,r,i,s,a){const n=this._getObjectIdField(),d=this._controller.crsVertex,l=this.view.spatialReference,u=[0,0,0],h=new Array,c=new Array;for(const p of i.pointData){const r=p.featureDataPosition,i=r.length,m=p.geometries&&p.geometries[0]||ie[i],f=p.featureIds[0];if("points"!==m.params.type)continue;o(s)&&this._checkExtent(s,r);const y={};null!=f&&(y[n]=f);const _=null==f?t.generateUID():f;let b;"Embedded"===m.type&&(b=m.params.vertexAttributes.position);for(let s=0;s<b.length;s+=i){for(let e=0;e<i;e++)u[e]=r[e]+b[s+e];const n=3===i;e.serviceObb||a.push(u[0],u[1],n?u[2]:0),g(u,d,0,se,l,0,1);const h=v(se[0],se[1],n?se[2]:void 0,l),p=this.loadedGraphics.get(_);o(p)?c.push(p):c.push({objectId:_,uid:t.generateUID(),geometry:h,attributes:y,visible:!0})}h.push(f)}r.graphics=c,r.featureIds=h}_updateNodeMemory(e){e.memory=4096+(o(e.numFeatures)?e.numFeatures*this.processor.graphicsCore.usedMemoryPerGraphic:0)}_cacheNodeData(e){const t=e.graphics.reduce(((e,t)=>E(t)+e),512+8*e.featureIds.length+1024);this._memCache.put(this._getMemCacheKey(e.node),e,t)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this._nodesAddedToStage.forEach((e=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}})),this._nodesAddedToStage.clear(),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this._nodesAddedToStage.get(e);return t?(this.loadedGraphics.removeMany(t.graphics),this._nodesAddedToStage.delete(e),this._treeDebugger&&this._treeDebugger.update(),t):null}async loadCachedNodeData(e){return this._memCache.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,t,r,i){if(!this._nodesAddedToStage.has(e.index))return this.loadedGraphics.addMany(t.graphics),this._nodesAddedToStage.set(e.index,t),this._updateNodeMemory(e),await this.updateAttributes(e.index,r,i),this._filterNode(t),this._treeDebugger&&this._treeDebugger.update(),Promise.resolve();Z.error("I3S node "+e.id+" already added")}getLoadedNodeIds(){const e=[];return this._nodesAddedToStage.forEach((t=>e.push(t.node.id))),e.sort()}getVisibleNodes(){const e=new Array;return this._nodesAddedToStage.forEach((t=>e.push(t.node))),e}getLoadedNodeIndices(e){this._nodesAddedToStage.forEach(((t,r)=>e.push(r)))}getLoadedAttributes(e){const t=this._nodesAddedToStage.get(e);if(t&&o(t.attributeInfo))return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this._nodesAddedToStage.get(e);if(t&&o(t.attributeInfo))return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this._nodesAddedToStage.get(e);r&&!s(r.attributeInfo)&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this._nodesAddedToStage.get(e);i&&(await this._attributeOverrides.apply(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){if(te(e),this._filterNode(e),this.processor.graphicsCore.labelsEnabled){const t=e.graphics.map((e=>e.uid));this.processor.graphicsCore.updateLabelingInfo(t)}}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||"OBJECTID"}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every(((e,t)=>s[t]===o[t]))||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&Z.warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this._nodesAddedToStage.forEach((e=>this._filterNode(e)))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression;for(const r of e.graphics){const e=r.visible;r.visible=!t||this._evaluateClause(t,r),e!==r.visible&&(oe.graphic=r,oe.property="visible",oe.oldValue=e,oe.newValue=r.visible,this.processor.graphicsCore.graphicUpdateHandler(oe))}}_invalidateElevation(e){const t=this._controller.crsIndex;f(e.extent,e.spatialReference,ae,t),this._controller.updateElevationChanged(ae,t)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return o(this.filter)?this.filter.createQuery(e):new S(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),null==t?void 0:t.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),null==t?void 0:t.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),null==t?void 0:t.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),null==t?void 0:t.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(s(e)?this.createQuery():S.from(e))}getUsedMemory(){var e,t,r;return null!=(e=null==(t=this.processor)||null==(r=t.graphicsCore)?void 0:r.usedMemory)?e:0}getUnloadedMemory(){var e,t,r,i,s;return.8*((null!=(e=null==(t=this._controller)?void 0:t.unloadedMemoryEstimate)?e:0)+(null!=(r=null==(i=this.processor)||null==(s=i.graphicsCore)?void 0:s.unprocessedMemoryEstimate)?r:0))}ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}_handleEdits(e){N(this.attributeEditingContext,e)}get attributeEditingContext(){const e=this._getObjectIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,forEachNode:e=>this._nodesAddedToStage.forEach((t=>e(t.node,t.featureIds))),attributeStorageInfo:this.i3slayer.attributeStorageInfo,attributeOverrides:this._attributeOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this._nodesAddedToStage.get(t);if(o(i)){const t=this.loadedGraphics.get(i.attributes[e]);o(t)&&this.processor.graphicsCore.recreateGraphics([t])}else o(s)&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){const e={displayedNumberOfFeatures:this.loadedGraphics.length,maximumNumberOfFeatures:this.maximumNumberOfFeatures,totalNumberOfFeatures:-1,nodes:this._nodesAddedToStage.size,core:this.processor.graphicsCore.performanceInfo};return this._controller&&this._controller.updateStats(e),e}get test(){return{controller:this._controller,numNodes:this._nodesAddedToStage.size,numFeatures:this.loadedGraphics.length}}};e([l()],J.prototype,"processor",void 0),e([l({type:w})],J.prototype,"filter",void 0),e([l()],J.prototype,"loadedGraphics",void 0),e([l({aliasOf:"layer"})],J.prototype,"i3slayer",void 0),e([l()],J.prototype,"_controller",void 0),e([l()],J.prototype,"updating",void 0),e([l()],J.prototype,"suspended",void 0),e([l()],J.prototype,"holeFilling",void 0),e([l(B)],J.prototype,"updatingProgress",void 0),e([l({aliasOf:"_controller.updatingProgress"})],J.prototype,"updatingProgressValue",void 0),e([l(Y.requiredFields)],J.prototype,"requiredFields",null),e([l(Y.availableFields)],J.prototype,"availableFields",void 0),e([l()],J.prototype,"fieldsHelper",void 0),e([l({type:Number})],J.prototype,"maximumNumberOfFeatures",null),e([l({readOnly:!0})],J.prototype,"maximumNumberOfFeaturesExceeded",null),e([l({readOnly:!0,aliasOf:"view.qualitySettings.sceneService.point.lodFactor"})],J.prototype,"lodFactor",void 0),e([l({readOnly:!0})],J.prototype,"hasM",null),e([l({readOnly:!0})],J.prototype,"hasZ",null),J=e([u("esri.views.3d.layers.SceneLayerGraphicsView3D")],J);const $=J;function X(e){return"pointData"in e}function ee(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function te(e){const t=e.attributeInfo;for(let r=0;r<e.graphics.length;r++){const i=e.graphics[r];if(i.attributes||(i.attributes={}),o(t)&&o(t.loadedAttributes))for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(i.attributes[e]=P(t.attributeData[e],r))}}function re(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,e.hasZ&&(e.zmin-=t,e.zmax+=t),e.hasM&&(e.mmin-=t,e.mmax+=t),e}const ie={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},se=p(),oe={graphic:null,property:null,oldValue:null,newValue:null},ae=y();export{$ as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{isSome as s}from"../../../core/maybe.js";import{init as t}from"../../../core/watchUtils.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as a}from"../../../geometry/support/spatialReferenceUtils.js";import n from"../../../layers/VoxelWasmManager.js";import{LayerView3D as l}from"./LayerView3D.js";import d from"../../layers/LayerView.js";import{ContextType as m}from"../../webgl/context-util.js";let p=class extends(l(d)){constructor(){super(...arguments),this._usedMemory=0,this._futureMemory=0,this.type="voxel-3d",this._wasmLayerId=-1}initialize(){if("local"!==this.view.viewingMode)throw new r("voxel:unsupported-viewingMode","Voxel layers support local viewingMode only.",{});if(this.view._stage.renderView.renderingContext.type!==m.WEBGL2)throw new r("voxel:unsupported-context","Voxel layers are supported in WebGL2 rendering contexts only.",{});const e=this.layer.spatialReference;if(!a(e,this.view.spatialReference))throw new r("layerview:spatial-reference-incompatible","The spatial reference of this scene layer is incompatible with the spatial reference of the view",{});const i=this.layer.style.currentVariableId,o=this.layer.getVolume(i),l=this.layer.getVariable(i);if(s(o)&&s(l)){const e=o.dimensions[0],r=o.dimensions[1],s=o.getZDimension();if(s>1){const t=o.dimensions[s],i=e.size*r.size*t.size;let a=1;switch(l.renderingFormat.type){case"Int16":case"UInt16":a=2;break;case"Int32":case"UInt32":case"Float32":a=4}this._futureMemory=a*i}}const d=n.getInstance(),p=d.addLayer(this.view,this).then((e=>{this._wasmLayerId=e,this._suspendedHandle=t(this,"suspended",(e=>{n.getInstance().setLayerEnabled(this.view,this,!e)}))})).catch((e=>{if(d.removeLayer(this.view,this),this._wasmLayerId=-1,-1===e)throw new r("voxel:addLayer-failure","The voxel layer description was invalid.",{});if(-2===e)throw new r("voxel:addLayer-failure","The voxel layer web assembly module failed to download.",{})}));this.addResolvingPromise(p)}destroy(){n.getInstance().removeLayer(this.view,this),this._suspendedHandle&&(this._suspendedHandle.remove(),this._suspendedHandle=null)}isUpdating(){return!(this._wasmLayerId<0)&&n.getInstance().isUpdating(this.view,this._wasmLayerId)}updatingFlagChanged(){this.notifyChange("updating")}getUsedMemory(){return this._usedMemory}getUnloadedMemory(){return this._futureMemory}ignoresMemoryFactor(){return!0}get performanceInfo(){return{nodes:0,displayedNumberOfFeatures:0,maximumNumberOfFeatures:0,totalNumberOfFeatures:0,core:null}}setUsedMemory(e){this._usedMemory=e,this._futureMemory=0}};e([i()],p.prototype,"layer",void 0),e([i({readOnly:!0,aliasOf:"layer.parsedUrl.path"})],p.prototype,"baseUrl",void 0),p=e([o("esri.views.3d.layers.VoxelLayerView3D")],p);const c=p;export{c as default};
|