@arcgis/core 4.25.0-next.20220705 → 4.25.0-next.20220708
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/TimeExtent.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0703495557b0df6878c5.js +1 -0
- package/assets/esri/core/workers/chunks/1570676351a313f1841b.js +1 -0
- package/assets/esri/core/workers/chunks/{695f90305478f5024fa7.js → 1ecbf642debc2207b762.js} +1 -1
- package/assets/esri/core/workers/chunks/{30dbdf2aa1bc8e61cad4.js → 268e7b46202fc1decf9f.js} +1 -1
- package/assets/esri/core/workers/chunks/{47d78b4f7117554acecf.js → 357a27203f5d8fa152de.js} +1 -1
- package/assets/esri/core/workers/chunks/35dfba25a9077ab5dbaf.js +982 -0
- package/assets/esri/core/workers/chunks/377354a81e402edf3077.js +1 -0
- package/assets/esri/core/workers/chunks/3a42d96ea3b59d33bfe8.js +1 -0
- package/assets/esri/core/workers/chunks/3a61e4ab83183f5526a7.js +1 -0
- package/assets/esri/core/workers/chunks/{3790f0362b6f27ee798b.js → 3ee5e8d00cd3bc47a9fa.js} +1 -1
- package/assets/esri/core/workers/chunks/425d1fabc713a598139c.js +1 -0
- package/assets/esri/core/workers/chunks/425e16862feccb467191.js +1 -0
- package/assets/esri/core/workers/chunks/{bbe51b49fe7093e47306.js → 48c8ac9a22190c2b890c.js} +1 -1
- package/assets/esri/core/workers/chunks/4a364bc073fdc7c1b563.js +1 -0
- package/assets/esri/core/workers/chunks/4ca6ada7a4ccde5b5a24.js +1 -0
- package/assets/esri/core/workers/chunks/{905130ff0118962c8140.js → 61b71b8e028eda10ccab.js} +1 -1
- package/assets/esri/core/workers/chunks/{b34cffd5c45d3a8134bc.js → 69f57ad2227e59b323e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{290899b47a52f8b28a9c.js → 791220164501a791b2cd.js} +1 -1
- package/assets/esri/core/workers/chunks/792b4b0a43b4bbbc14ab.js +1 -0
- package/assets/esri/core/workers/chunks/7b32b8e8ebe48ae0dae2.js +1 -0
- package/assets/esri/core/workers/chunks/7f00125b02bb7211de43.js +1 -0
- package/assets/esri/core/workers/chunks/81074accfce5f109f909.js +1 -0
- package/assets/esri/core/workers/chunks/{594d7fdb80ad9cdedb85.js → 823e25dbc70e71257b6e.js} +1 -1
- package/assets/esri/core/workers/chunks/92e43e05265dfc8173a0.js +1 -0
- package/assets/esri/core/workers/chunks/{40fa9b28ca882a70813a.js → 92f7415c2e40e320addc.js} +1 -1
- package/assets/esri/core/workers/chunks/{9520b32d5d53ea9cd0d3.js → 9341e9e1fe0f6800aa44.js} +1 -1
- package/assets/esri/core/workers/chunks/95451d6405729a9f50c7.js +1 -0
- package/assets/esri/core/workers/chunks/{910a2ffb4328f8ee7a0d.js → 95cb9cd08941c28ebd85.js} +1 -1
- package/assets/esri/core/workers/chunks/{97f32af5893c86f6444c.js → 9b9a40b84640f00a1dcb.js} +1 -1
- package/assets/esri/core/workers/chunks/{77c6ba5ea85915d9078c.js → ac07c732aca6e67232f8.js} +1 -1
- package/assets/esri/core/workers/chunks/ae8e87da97411cff3783.js +1 -0
- package/assets/esri/core/workers/chunks/{65161a874595b0a34aa1.js → b312dd3027492007d75e.js} +1 -1
- package/assets/esri/core/workers/chunks/{83c9da68d6dbc77f60e5.js → beead2b06c994b4e61af.js} +1 -1
- package/assets/esri/core/workers/chunks/{5e20fd8b7c9497f2da1f.js → bfb08d3e2208c6178af9.js} +1 -1
- package/assets/esri/core/workers/chunks/{04e5486f0d8d4c6bd8a2.js → c3236a7058e64ea3b939.js} +1 -1
- package/assets/esri/core/workers/chunks/c4e9c71be6299c60c539.js +1 -0
- package/assets/esri/core/workers/chunks/c705f907ce60a646d9aa.js +1 -0
- package/assets/esri/core/workers/chunks/ce6abfafa0171b9c8d81.js +1 -0
- package/assets/esri/core/workers/chunks/{08a5c5a33a7c7c6852e5.js → d00b0f8236f1526099d4.js} +1 -1
- package/assets/esri/core/workers/chunks/d13951412a57e1af6208.js +1 -0
- package/assets/esri/core/workers/chunks/ecaf8f030026e41e1d1a.js +1 -0
- package/assets/esri/core/workers/chunks/f328a6cd4b7d8c653fc7.js +1 -0
- package/assets/esri/core/workers/chunks/f6a6178d4df029ff010d.js +1 -0
- package/assets/esri/core/workers/chunks/fde2301c6cd97a3cfb86.js +1 -0
- package/assets/esri/core/workers/chunks/fe84bcdfd9028b5e7ef6.js +1 -0
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +4 -0
- package/assets/esri/themes/base/widgets/_LayerList.scss +4 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/CheckerBoard.glsl.js +2 -2
- package/chunks/ColorMaterial.glsl.js +9 -9
- package/chunks/ComponentShader.glsl.js +33 -33
- package/chunks/DefaultMaterial.glsl.js +35 -35
- package/chunks/HUDMaterial.glsl.js +11 -11
- package/chunks/ImageMaterial.glsl.js +5 -5
- package/chunks/LineMarker.glsl.js +17 -17
- package/chunks/NativeLine.glsl.js +3 -3
- package/chunks/Path.glsl.js +28 -28
- package/chunks/Pattern.glsl.js +9 -9
- package/chunks/PointRenderer.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +4 -4
- package/chunks/RibbonLine.glsl.js +1 -1
- package/chunks/ShadedColorMaterial.glsl.js +1 -1
- package/chunks/SimpleAtmosphere.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +92 -92
- package/chunks/WaterSurface.glsl.js +22 -22
- package/chunks/common.js +1 -1
- package/chunks/mat2.js +1 -1
- package/chunks/mat2d.js +1 -1
- package/chunks/mat3.js +1 -1
- package/chunks/mat4.js +1 -1
- package/chunks/quat.js +1 -1
- package/chunks/quat2.js +1 -1
- package/chunks/vec2.js +1 -1
- package/chunks/vec3.js +1 -1
- package/chunks/vec4.js +1 -1
- package/core/Message.js +1 -1
- package/core/accessorSupport/tracking.js +1 -1
- package/core/libs/gl-matrix-2/math/common.js +1 -1
- package/core/libs/gl-matrix-2/math/vec2.js +1 -1
- package/core/pbf.js +1 -1
- package/core/quantity.js +0 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/urlUtils.js +1 -1
- package/geometry/support/scaleUtils.js +1 -1
- package/identity/IdentityForm.js +1 -1
- package/identity/IdentityModal.js +1 -1
- package/identity/OAuthCredential.js +1 -1
- package/interfaces.d.ts +3347 -190
- package/intl/date.js +1 -1
- package/intl/duration.js +1 -1
- package/intl/messages.js +1 -1
- package/intl/substitute.js +1 -1
- package/kernel.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/support/ControlPointsGeoreference.d.ts +4 -0
- package/layers/support/ControlPointsGeoreference.js +5 -0
- package/layers/support/CornersGeoreference.js +1 -1
- package/layers/support/ElevationSamplerData.js +5 -0
- package/layers/support/ElevationTile.js +1 -1
- package/layers/support/ExportImageServiceParameters.js +1 -1
- package/layers/support/MediaElementBase.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
- package/package.json +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/request.js +1 -1
- package/rest/route/utils.js +1 -1
- package/rest/serviceArea.js +1 -1
- package/rest/support/ServiceAreaParameters.js +1 -1
- package/rest/support/ServiceAreaSolveResult.js +1 -1
- package/smartMapping/raster/renderers/classBreaks.js +1 -1
- package/smartMapping/raster/renderers/uniqueValue.js +1 -1
- package/support/apiKeyUtils.js +1 -1
- package/support/requestUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/navigation/actions/Pinch.js +1 -1
- package/views/2d/tiling/TileCache.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
- package/views/3d/environment/CloudsCompositionTechnique.js +1 -1
- package/views/3d/environment/CloudsTechnique.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/FogTechnique.js +1 -1
- package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/environment/Precipitation.js +1 -1
- package/views/3d/environment/PrecipitationTechnique.js +1 -1
- package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
- package/views/3d/environment/SimpleAtmosphereTechniqueConfiguration.js +1 -1
- package/views/3d/environment/StarsTechnique.js +1 -1
- package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/FeatureVisibilityFilter.js +5 -0
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/LaserlinePathData.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/terrain/BlendLayersTechnique.js +1 -1
- package/views/3d/terrain/ElevationData.js +1 -1
- package/views/3d/terrain/GeometryState.js +1 -1
- package/views/3d/terrain/OverlayRenderTarget.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
- package/views/3d/terrain/TerrainConst.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/tileUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutputConfiguration.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +11 -11
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +55 -55
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/BlendWeightsTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/BlurTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/EdgeDetectTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterials.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/RenderContext.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/SSAOTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/TransparencyPassType.js +5 -0
- package/views/3d/webgl-engine/lib/basicInterfaces.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterGLMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightApplyTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightDownsampleTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlinePathTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRendererTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
- package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
- package/views/interactive/snapping/SnappingConstraint.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/RightAngleTriangleSnappingCandidate.js +1 -1
- package/views/interactive/snapping/snappingUtils.js +1 -1
- package/views/interactive/support/viewUtils.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/support/geometry2dUtils.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/Zoom/ZoomConditions3D.js +1 -1
- package/widgets/Zoom/ZoomViewModel.js +1 -1
- package/widgets/Zoom.js +1 -1
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/06a7f58260225f52f8e6.js +0 -1
- package/assets/esri/core/workers/chunks/0e00741d35cdbf48e72d.js +0 -1
- package/assets/esri/core/workers/chunks/1ebb29ceabc81509646c.js +0 -1
- package/assets/esri/core/workers/chunks/24f7a3df08c3a2d3795c.js +0 -1
- package/assets/esri/core/workers/chunks/39a754713a48d46618bd.js +0 -1
- package/assets/esri/core/workers/chunks/462163f31fa134b7b216.js +0 -1
- package/assets/esri/core/workers/chunks/4bfcb7350ca492767a45.js +0 -1
- package/assets/esri/core/workers/chunks/5470cb0c3f670957c22c.js +0 -1
- package/assets/esri/core/workers/chunks/6889d698a2c796ed1ce6.js +0 -1
- package/assets/esri/core/workers/chunks/869310ef4c98542bf9df.js +0 -1
- package/assets/esri/core/workers/chunks/8ebaad46e2fe8925e3b0.js +0 -1
- package/assets/esri/core/workers/chunks/98c519ac806cc55bc19b.js +0 -1
- package/assets/esri/core/workers/chunks/9d07969fbea13aa5b03c.js +0 -1
- package/assets/esri/core/workers/chunks/9e6ce879ec0da884b9b8.js +0 -1
- package/assets/esri/core/workers/chunks/abd1bd74ba571e39ab5a.js +0 -1
- package/assets/esri/core/workers/chunks/b26ea76e3f41b45756e0.js +0 -1
- package/assets/esri/core/workers/chunks/c2286d97539066c8549a.js +0 -1
- package/assets/esri/core/workers/chunks/c495a66978d67c7e17f3.js +0 -1
- package/assets/esri/core/workers/chunks/c7fa92daca3f6e91734e.js +0 -987
- package/assets/esri/core/workers/chunks/c9e890b4be9d01c13efe.js +0 -1
- package/assets/esri/core/workers/chunks/dda5ea7f8d35e257815c.js +0 -1
- package/assets/esri/core/workers/chunks/e153e89c8a15c2f036ef.js +0 -1
- package/assets/esri/core/workers/chunks/e201ffcca7321771ee20.js +0 -1
- package/assets/esri/core/workers/chunks/e5b5b93e707173a4c883.js +0 -1
- package/assets/esri/core/workers/chunks/f7d1f75b6aa3ef566d74.js +0 -1
- package/assets/esri/core/workers/chunks/fde9e9683335fa6c8236.js +0 -1
- package/core/queryUtils.js +0 -5
- package/views/3d/layers/graphics/Graphics3DFilterVisibility.js +0 -5
- package/views/3d/layers/support/HeatmapFilterVisibility.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutputOptions.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/util/HeaderComment.glsl.js +0 -10
- package/views/3d/webgl-engine/lib/RenderPass.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.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{lerp as r}from"../../../core/mathUtils.js";import{releaseMaybe as i,disposeMaybe as s,isNone as n,isSome as o}from"../../../core/maybe.js";import{secondsFromMilliseconds as a}from"../../../core/time.js";import{property as c}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{WatchUpdatingTracking as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{lerp as r}from"../../../core/mathUtils.js";import{releaseMaybe as i,disposeMaybe as s,isNone as n,isSome as o}from"../../../core/maybe.js";import{secondsFromMilliseconds as a}from"../../../core/time.js";import{property as c}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{WatchUpdatingTracking as p}from"../../../core/support/WatchUpdatingTracking.js";import{getReferenceEllipsoid as u}from"../../../geometry/projectionEllipsoid.js";import{PrecipitationPassParameters as m,PrecipitationTechnique as d,attributeLocations as _}from"./PrecipitationTechnique.js";import{PrecipitationTechniqueConfiguration as f,PrecipitationType as T}from"./PrecipitationTechniqueConfiguration.js";import{glLayout as l}from"../support/buffer/glUtil.js";import{newLayout as y}from"../support/buffer/InterleavedLayout.js";import{AnimationTimer as g}from"../webgl-engine/lib/AnimationTimer.js";import{VertexAttribute as w}from"../webgl-engine/lib/VertexAttribute.js";import{BufferObject as j}from"../../webgl/BufferObject.js";import{PrimitiveType as b,Usage as q}from"../../webgl/enums.js";import{bindVertexBufferLayout as I,unbindVertexBufferLayout as A}from"../../webgl/Util.js";import{VertexArrayObject as v}from"../../webgl/VertexArrayObject.js";let P=class extends t{constructor(e){super(e),this._numParticles=25e4,this._rainSpeed=.1,this._snowSpeed=.01,this._passParameters=new m,this._animation=new g,this._updatingTracking=new p,this._passParameters.time=0,this._passParameters.radius=u(e.view.spatialReference).radius,this._shaderTechniqueRepository=e.context.shaderTechniqueRepository}destroy(){this._updatingTracking.destroy(),this._numParticles=0,this._snowTechniqueCached=i(this._snowTechniqueCached),this._rainTechniqueCached=i(this._rainTechniqueCached),this._vao=s(this._vao),this._instanceIdBuffer=s(this._instanceIdBuffer)}get updating(){return this._updatingTracking.updating}get _rainTechnique(){if(n(this._rainTechniqueCached)){const e=new f;e.type=T.Rain,this._rainTechniqueCached=this._shaderTechniqueRepository.acquire(d,e)}return this._rainTechniqueCached}get _snowTechnique(){if(n(this._snowTechniqueCached)){const e=new f;e.type=T.Snow,this._snowTechniqueCached=this._shaderTechniqueRepository.acquire(d,e)}return this._snowTechniqueCached}update(e){return this._animation.advance(e)}render(e,t,i){const s="rainy"===i?this._rainTechnique:this._snowTechnique;if(!s.compiled)return void this.context.requestRender();const c=e.rctx;if(this._ensureResources(c),n(s)||n(this._vao)||n(this._instanceIdBuffer))return;if(o(e.bindParameters.clouds.data)&&(this._passParameters.opacity=1-e.bindParameters.clouds.fadeInOutHeight.factor),this._passParameters.opacity<=0)return;const h=.35;t=t<.5?r(0,h,2*t):r(h,1,2*(t-.5)),this._passParameters.time=("rainy"===i?this._rainSpeed:this._snowSpeed)*a(this._animation.time)%1e5;const p=c.bindTechnique(s,this._passParameters,e.bindParameters);c.bindVAO(this._vao),p.assertCompatibleVertexAttributeLocations(this._vao),I(c,_,this._instanceIdBuffer,R,0),c.capabilities.instancing.drawArraysInstanced(b.TRIANGLES,0,3,this._numParticles*t),A(c,_,this._instanceIdBuffer,R)}_ensureResources(e){n(this._vao)&&(this._vao=this._createVertexArrayObject(e)),n(this._instanceIdBuffer)&&(this._instanceIdBuffer=this._createInstanceIndices(e))}_createInstanceIndices(e){const t=[];for(let r=0;r<this._numParticles;r++)t.push(r);return j.createVertex(e,q.STATIC_DRAW,new Float32Array(t))}_createVertexArrayObject(e){const t=new Float32Array([-1,0,1,1,0,-1,1,0,1]);return new v(e,_,{geometry:l(C)},{geometry:j.createVertex(e,q.STATIC_DRAW,t)})}};e([c({constructOnly:!0})],P.prototype,"context",void 0),e([c({constructOnly:!0})],P.prototype,"view",void 0),e([c({readOnly:!0})],P.prototype,"updating",null),e([c()],P.prototype,"_updatingTracking",void 0),P=e([h("esri.views.3d.environment.Precipitation")],P);const C=y().vec3f(w.POSITION),R=l(y().f32(w.INSTANCEFEATUREATTRIBUTE),1);export{P as Precipitation};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{P as e}from"../../../chunks/Precipitation.glsl.js";import{NoParameters as i}from"../webgl-engine/core/shaderModules/interfaces.js";import{ReloadableShaderModule as r}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Program as
|
|
5
|
+
import{P as e}from"../../../chunks/Precipitation.glsl.js";import{NoParameters as i}from"../webgl-engine/core/shaderModules/interfaces.js";import{ReloadableShaderModule as r}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Program as s}from"../webgl-engine/lib/Program.js";import{VertexAttribute as n}from"../webgl-engine/lib/VertexAttribute.js";import{BlendFactor as o,CompareFunction as l}from"../../webgl/enums.js";import{makePipelineState as a,separateBlendingParams as m,defaultColorWriteParams as c}from"../../webgl/renderState.js";class g extends i{constructor(){super(...arguments),this.time=0,this.radius=1,this.width=500,this.opacity=1}}class d extends t{initializeProgram(e){return new s(e.rctx,d.shader.get().build(this.configuration),h)}initializePipeline(){return a({blending:m(o.ONE,o.ONE,o.ONE_MINUS_SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),depthTest:{func:l.LEQUAL},colorWrite:c})}}d.shader=new r(e,(()=>import("./Precipitation.glsl.js")));const h=new Map([[n.POSITION,0],[n.INSTANCEFEATUREATTRIBUTE,1]]);export{g as PrecipitationPassParameters,d as PrecipitationTechnique,h as attributeLocations};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{a as e}from"../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereGeometry as r}from"./SimpleAtmosphereTechniqueConfiguration.js";import{ReloadableShaderModule as i}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as o}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Default3D as t}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{Program as n}from"../webgl-engine/lib/Program.js";import{BlendFactor as l,CompareFunction as s}from"../../webgl/enums.js";import{makePipelineState as m,separateBlendingParams as g,backFaceCullingParams as a,defaultColorWriteParams as p}from"../../webgl/renderState.js";class
|
|
5
|
+
import{a as e}from"../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereGeometry as r}from"./SimpleAtmosphereTechniqueConfiguration.js";import{ReloadableShaderModule as i}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as o}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Default3D as t}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{Program as n}from"../webgl-engine/lib/Program.js";import{BlendFactor as l,CompareFunction as s}from"../../webgl/enums.js";import{makePipelineState as m,separateBlendingParams as g,backFaceCullingParams as a,defaultColorWriteParams as p}from"../../webgl/renderState.js";class h extends o{initializeProgram(e){return new n(e.rctx,h.shader.get().build(this.configuration),t)}initializePipeline(){return this.configuration.geometry===r.Cylinder?m({blending:g(l.SRC_ALPHA,l.ONE,l.ONE_MINUS_SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA),culling:a,depthTest:{func:s.LEQUAL},colorWrite:p}):m({blending:g(l.SRC_ALPHA,l.ONE,l.ONE_MINUS_SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA),depthTest:{func:s.LEQUAL},colorWrite:p})}}h.shader=new i(e,(()=>import("./SimpleAtmosphere.glsl.js")));export{h as SimpleAtmosphereTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import{parameter as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{parameter as n}from"../webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../webgl-engine/materials/DefaultTechniqueConfiguration.js";var r;!function(e){e[e.Cone=0]="Cone",e[e.Cylinder=1]="Cylinder",e[e.Underground=2]="Underground",e[e.COUNT=3]="COUNT"}(r||(r={}));class i extends o{constructor(){super(...arguments),this.geometry=r.Cone}}e([n({count:r.COUNT})],i.prototype,"geometry",void 0);export{r as SimpleAtmosphereGeometry,i as SimpleAtmosphereTechniqueConfiguration};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{c as e}from"../../../chunks/mat4f64.js";import{S as r}from"../../../chunks/Stars.glsl.js";import{NoParameters as
|
|
5
|
+
import{c as e}from"../../../chunks/mat4f64.js";import{S as r}from"../../../chunks/Stars.glsl.js";import{NoParameters as i}from"../webgl-engine/core/shaderModules/interfaces.js";import{ReloadableShaderModule as t}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as o}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{ShaderTechniqueConfiguration as s}from"../webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js";import{Default3D as n}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import{Program as a}from"../webgl-engine/lib/Program.js";import{BlendFactor as l,CompareFunction as m}from"../../webgl/enums.js";import{makePipelineState as c,separateBlendingParams as g,defaultColorWriteParams as u}from"../../webgl/renderState.js";class d extends i{constructor(){super(...arguments),this.modelMatrix=e()}}class h extends o{constructor(e){super(e,new s,(()=>this.destroy()))}initializeProgram(e){return new a(e.rctx,h.shader.get().build(),n)}initializePipeline(){return c({blending:g(l.SRC_ALPHA,l.ONE,l.ONE_MINUS_SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA),depthTest:{func:m.LEQUAL},colorWrite:u})}}h.shader=new t(r,(()=>import("./Stars.glsl.js")));export{d as StarPassParameters,h as StarsTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Collection.js";import t from"../../../core/Logger.js";import{watch as r,initial as n}from"../../../core/reactiveUtils.js";import{c as s}from"../../../chunks/vec3.js";import i from"./RenderContext.js";import{
|
|
5
|
+
import e from"../../../core/Collection.js";import t from"../../../core/Logger.js";import{watch as r,initial as n}from"../../../core/reactiveUtils.js";import{c as s}from"../../../chunks/vec3.js";import i from"./RenderContext.js";import{ShaderOutput as d}from"../webgl-engine/core/shaderLibrary/ShaderOutput.js";import{RenderSlot as o}from"../webgl-engine/lib/RenderSlot.js";class a{constructor(){this._renderers=new e}add(e,t){this._findOrCreateStageRenderer(e).add(t)}remove(e,t){const r=this._findStageRenderer(e);r&&r.remove(t),0===r.renderers.length&&(r.destroy(),this._renderers.remove(r))}_findStageRenderer(e){return this._renderers.find((t=>t.view===e))}_findOrCreateStageRenderer(e){let t=this._findStageRenderer(e);return t||(t=new h(e),this._renderers.add(t)),t}}class h{constructor(t){this.view=t,this.canRender=!0,this.renderers=new e,this._readyWatchHandle=r((()=>t.ready),(e=>{e?(this.context=new i(this.view),this.view._stage.addRenderPlugin([o.OPAQUE_MATERIAL,o.TRANSPARENT_MATERIAL],this)):(this.renderers.forEach((e=>c(e,"dispose",this.context))),this.context=null)}),n)}destroy(){this.renderers.drain((e=>{this.context&&c(e,"dispose",this.context)})),this.view._stage&&this.view._stage.removeRenderPlugin(this),this._readyWatchHandle&&(this._readyWatchHandle.remove(),this._readyWatchHandle=null),this.context=null}add(e){this.renderers.includes(e)?t.getLogger("esri.views.3d.externalRenderers.ExternalRendererStore").warn("add(): Cannot add external renderer: renderer has already been added"):(this.renderers.add(e),this.context&&(this._webglStateReset(),c(e,"setup",this.context),this.view._stage.renderView.requestRender()))}remove(e){const t=this.renderers.indexOf(e);-1!==t&&(this.renderers.removeAt(t),this.context&&(c(e,"dispose",this.context),this.view._stage.renderView.requestRender()))}initializeRenderContext(e){this.context.rctx=e.renderContext.rctx,this.renderers.length>0&&this._webglStateReset(),this.renderers.forEach((e=>c(e,"setup",this.context)))}uninitializeRenderContext(){}render(e){0===this.renderers.length||e.output!==d.Color||e.bindParameters.slot!==o.OPAQUE_MATERIAL&&e.bindParameters.slot!==o.TRANSPARENT_MATERIAL||(this._updateContext(e),this._webglStateReset(),this.renderers.forEach((t=>{switch(e.bindParameters.slot){case o.OPAQUE_MATERIAL:c(t,"render",this.context);break;case o.TRANSPARENT_MATERIAL:c(t,"renderTransparent",this.context)}})))}_updateContext(e){this.context.camera.copyFrom(e.bindParameters.camera),s(this.context.sunLight.direction,e.bindParameters.lighting.old.direction),s(this.context.sunLight.diffuse.color,e.bindParameters.lighting.old.diffuse.color),s(this.context.sunLight.ambient.color,e.bindParameters.lighting.old.ambient.color),this.context._renderTargetHelper=e.offscreenRenderingHelper}_webglStateReset(){this.context.rctx.resetState(),this.context._renderTargetHelper?.bindFramebuffer()}get needsTransparentPass(){return this.renderers.some((e=>"function"==typeof e.renderTransparent))}}function c(e,t,r){"function"==typeof e[t]&&e[t](r)}export{a 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.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../geometry.js";import{neverReached as e}from"../../../core/compilerUtils.js";import t from"../../../core/Evented.js";import{deg2rad as i}from"../../../core/mathUtils.js";import{isSome as s,isNone as o,unwrapOr as n,unwrap as r}from"../../../core/maybe.js";import{createScreenPointArray as a,createRenderScreenPointArray3 as c,screenPointObjectToArray as l,castRenderScreenPointArray as h}from"../../../core/screenUtils.js";import{once as d}from"../../../core/accessorSupport/utils.js";import{f as _}from"../../../chunks/mat3.js";import{c as u}from"../../../chunks/mat3f64.js";import{c as g,s as m,m as f,i as p}from"../../../chunks/mat4.js";import{c as b}from"../../../chunks/mat4f64.js";import{j as v}from"../../../chunks/vec2.js";import{a as y,t as j,m as L,g as S,c as R,d as w,s as O,b as T}from"../../../chunks/vec3.js";import{c as A,Z as E}from"../../../chunks/vec3f64.js";import{canProjectWithoutEngine as D,projectPoint as F,sphericalPCPFtoLonLatElevation as z,computeENUToSphericalPCPFLocalRotation as k}from"../../../geometry/projection.js";import{getReferenceEllipsoid as I}from"../../../geometry/projectionEllipsoid.js";import{containsPointObject as P}from"../../../geometry/support/aaBoundingRect.js";import{create as M,distance2 as C,fromPoints as x,closestRayDistance2 as B}from"../../../geometry/support/lineSegment.js";import{create as W,fromPositionAndNormal as U,intersectRay as V}from"../../../geometry/support/plane.js";import{create as N}from"../../../geometry/support/ray.js";import{sv3d as G}from"../../../geometry/support/vectorStacks.js";import{clonePoint as H,hydratedSpatialReference as Y}from"../../../layers/graphics/hydratedFeatures.js";import{getElevationAtPoint as Z}from"../support/ElevationProvider.js";import{fromScreen as q}from"../support/geometryUtils/ray.js";import{UpdatePolicy as J}from"../webgl-engine/lib/basicInterfaces.js";import{Camera as K}from"../webgl-engine/lib/Camera.js";import{Object3D as Q}from"../webgl-engine/lib/Object3D.js";import{WebGLLayer as X}from"../webgl-engine/lib/WebGLLayer.js";import{ManipulatorStateCustomFlags as $,ManipulatorStateFlags as ee}from"../../interactive/interfaces.js";import te from"../../../geometry/Point.js";class ie{constructor(e){this.camera=new K,this._elevation={offset:0,override:null},this.collisionType={type:"point"},this.collisionPriority=0,this._renderObjects=[],this.autoScaleRenderObjects=!0,this._available=!0,this._noDisplayCount=0,this._radius=10,this._worldSized=!1,this.focusMultiplier=2,this.touchMultiplier=2.5,this.worldOriented=!1,this._modelTransform=b(),this._worldFrame=null,this._renderLocation=A(),this._renderLocationDirty=!0,this._location=new te({x:0,y:0,z:0}),this._elevationAlignedLocation=new te,this._elevationAlignedLocationDirty=!0,this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.cursor=null,this._grabbing=!1,this.dragging=!1,this._hovering=!1,this._selected=!1,this._state=$.None,this._focused=!1,this.events=new t.EventEmitter,this._screenLocation={screenPointArray:a(),renderScreenPointArray:c(),pixelSize:0},this._screenLocationDirty=!0,this._applyObjectTransform=null,this._engineResourcesAddedToStage=!1,this._engineResources=null,this._attached=!1,this._engineLayer=null,this._materialIdReferences=null,this._location.spatialReference=e.view.spatialReference;for(const t in e)this[t]=e[t];this.view.state&&this.view.state.camera&&this.camera.copyFrom(this.view.state.camera)}destroy(){this._removeResourcesFromStage(),this._engineResources=null,this.view=null,this.camera=null}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this._elevationAlignedLocationDirty=!0,this._renderLocationDirty=!0,this._updateEngineObject()}get renderObjects(){return this._renderObjects}set renderObjects(e){this._removeResourcesFromStage(),this._engineResources=null,this._renderObjects=e.slice(),this._updateEngineObject()}set available(e){e!==this._available&&(this._available=e,this._updateEngineObject())}get available(){return this._available}disableDisplay(){return this._noDisplayCount++,1===this._noDisplayCount&&this._updateEngineObject(),{remove:d((()=>{this._noDisplayCount--,0===this._noDisplayCount&&this._updateEngineObject()}))}}set radius(e){e!==this._radius&&(this._radius=e,this._updateEngineObject())}get radius(){return this._radius}set worldSized(e){e!==this._worldSized&&(this._worldSized=e,this._updateEngineObject())}get worldSized(){return this._worldSized}get modelTransform(){return this._modelTransform}set modelTransform(e){se(e)&&(this._screenLocationDirty=!0),g(this._modelTransform,e),this._updateEngineObject()}get renderLocation(){return this._renderLocationDirty&&(this._renderLocationDirty=!1,this.view.renderCoordsHelper.toRenderCoords(this.elevationAlignedLocation,this._renderLocation),this.worldOriented?(this._worldFrame||(this._worldFrame=b()),oe(this.view,this._renderLocation,this._worldFrame)):this._worldFrame&&(this._worldFrame=null)),this._renderLocation}set renderLocation(e){this.view.renderCoordsHelper.fromRenderCoords(e,this._location),this.elevationAlignedLocation=this._location}get location(){return this._location}set location(e){H(e,this._location),this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!0,this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}get elevationAlignedLocation(){return this._elevationAlignedLocationDirty?(this._evaluateElevationAlignment(),this._updateElevationAlignedLocation(),this._elevationAlignedLocation):this._elevationAlignedLocation}set elevationAlignedLocation(e){H(e,this._location),this._evaluateElevationAlignment(),this._location.z-=this._elevation.offset,this._updateElevationAlignedLocation(),this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}_updateElevationAlignedLocation(){this._elevationAlignedLocation.x=this.location.x,this._elevationAlignedLocation.y=this.location.y;const e=s(this._elevation.override)?this._elevation.override:this.location.z||0;this._elevationAlignedLocation.z=e+this._elevation.offset,this._elevationAlignedLocation.spatialReference=Y(this.location.spatialReference),this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!1}grabbableForEvent(){return!0}get grabbing(){return this._grabbing}set grabbing(e){e!==this._grabbing&&(this._grabbing=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get hovering(){return this._hovering}set hovering(e){e!==this._hovering&&(this._hovering=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get selected(){return this._selected}set selected(e){e!==this._selected&&(this._selected=e,this._updateEngineObject(),this.events.emit("select-changed",{action:e?"select":"deselect"}))}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,this._updateEngineObject())}updateStateEnabled(e,t){t?this.state|=e:this.state&=~e}_setFocused(e){e!==this._focused&&(this._focused=e,this.events.emit("focus-changed",{action:!0===e?"focus":"unfocus"}))}get focused(){return this._focused}get screenLocation(){return this._ensureScreenLocation(),this._screenLocation}_ensureScreenLocation(){if(!this._screenLocationDirty)return;this._screenLocation.pixelSize=this.camera.computeScreenPixelSizeAt(this.renderLocation),this._screenLocationDirty=!1;let e;if(se(this._modelTransform)){const t=this._calculateModelTransformOffset(pe);e=y(t,t,this.renderLocation)}else e=this.renderLocation;this.camera.projectToRenderScreen(e,this._screenLocation.renderScreenPointArray),this.camera.renderToScreen(this._screenLocation.renderScreenPointArray,this._screenLocation.screenPointArray)}get applyObjectTransform(){return this._applyObjectTransform}set applyObjectTransform(e){this._applyObjectTransform=e,this._screenLocationDirty=!0,this._updateEngineObject()}intersectionDistance(t,i){if(!this.available)return null;const s=l(t,ne),n=this._getCollisionRadius(i),r=-1*this.collisionPriority;switch(this.collisionType.type){case"point":if(v(this.screenLocation.screenPointArray,s)<n*n)return this.screenLocation.renderScreenPointArray[2]+r;break;case"line":{const e=this.collisionType.paths,t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,he),a=n*this.screenLocation.pixelSize,c=q(this.camera,s,ae);if(o(c))return null;for(const s of e){if(0===s.length)continue;const e=L(_e,s[0],i);for(let t=1;t<s.length;t++){const o=L(ue,s[t],i),n=B(x(e,o,re),c);if(null!=n&&n<a*a){const t=y(G.get(),e,o);S(t,t,.5);const i=h(G.get());return this.camera.projectToRenderScreen(t,i),i[2]+r}R(e,o)}}break}case"disc":{const e=this.collisionType.direction,t=this.collisionType.offset??E,i=this._getWorldToScreenObjectScale(),a=this._calculateObjectTransform(i,he),c=n*this.screenLocation.pixelSize,l=q(this.camera,s,ae);if(o(l))return null;const h=_(ce,a),d=j(me,e,h),u=L(fe,t,a);U(u,d,de);const g=ge;if(V(de,l,g)&&w(g,u)<c*c)return this.screenLocation.renderScreenPointArray[2]+r;break}case"ribbon":{const{paths:e,direction:t}=this.collisionType,i=this._getWorldToScreenObjectScale(),a=this._calculateObjectTransform(i,he),c=n*this.camera.computeScreenPixelSizeAt(this.renderLocation),l=q(this.camera,s,ae);if(o(l))return null;const d=_(ce,a),u=j(me,t,d),g=this._calculateModelTransformPosition(fe);U(g,u,de);const m=ge;if(!V(de,l,m))break;for(const s of e){if(0===s.length)continue;const e=L(_e,s[0],a);for(let t=1;t<s.length;t++){const i=L(ue,s[t],a),o=C(x(e,i,re),m);if(null!=o&&o<c*c){const t=y(G.get(),e,i);S(t,t,.5);const s=h(G.get());return this.camera.projectToRenderScreen(t,s),s[2]+r}R(e,i)}}break}default:e(this.collisionType)}return null}attach(e={manipulator3D:{}}){if(!this.view._stage)return;const t=e.manipulator3D;if(o(t.engineLayerId)){const e=new X({isPickable:!1,updatePolicy:J.SYNC});this.view._stage.add(e),t.engineLayerId=e.id,this._engineLayer=e}else this.view._stage?.getObject&&(this._engineLayer=this.view._stage.getObject(t.engineLayerId));t.engineLayerReferences=(t.engineLayerReferences||0)+1,this._materialIdReferences=t.materialIdReferences,o(this._materialIdReferences)&&(this._materialIdReferences=new Map,t.materialIdReferences=this._materialIdReferences),this.camera.copyFrom(this.view.state.camera),this._attached=!0,this._updateEngineObject(),D(this._location.spatialReference,this.view.spatialReference)||(this.location=new te({x:0,y:0,z:0,spatialReference:this.view.spatialReference}))}detach(e={manipulator3D:{}}){const t=e.manipulator3D;t.engineLayerReferences--;const i=0===t.engineLayerReferences;i&&(t.engineLayerId=null),this._removeResourcesFromStage(i),this._engineResources=null,this._engineLayer=null,this._materialIdReferences=null,this._attached=!1}onViewChange(){this.camera.copyFrom(this.view.state.camera),this._screenLocationDirty=!0,this._updateEngineObject()}onElevationChange(e){F(this.location,be,e.spatialReference),P(e.extent,be)&&(this.location=this._location)}_evaluateElevationAlignment(e=this.location){if(o(this.elevationInfo))return!1;let t=null,i=0;const s=n(this.elevationInfo.offset,0);switch(this.elevationInfo.mode){case"on-the-ground":t=n(Z(this.view.elevationProvider,e,"ground"),0);break;case"relative-to-ground":i=n(Z(this.view.elevationProvider,e,"ground"),0)+s;break;case"relative-to-scene":i=n(Z(this.view.elevationProvider,e,"scene"),0)+s;break;case"absolute-height":i=s}return(i!==this._elevation.offset||t!==this._elevation.override)&&(this._elevation.offset=i,this._elevation.override=t,!0)}_updateEngineObject(){if(!this._attached)return;if(!this.available)return void this._removeResourcesFromStage();const e=this._getWorldToScreenObjectScale(),t=he;if(!0===this.autoScaleRenderObjects){const i=this._getFocusedSize(this._radius,this.focused)*e;this._calculateObjectTransform(i,t)}else this._calculateObjectTransform(e,t);const{objectsByState:i}=this._ensureEngineResources(),s=(this.focused?ee.Focused:ee.Unfocused)|(this.selected?ee.Selected:ee.Unselected),o=this._noDisplayCount>0;for(const{stateMask:n,objects:r}of i){if(o){for(const e of r)e.setVisible(!1);continue}const e=(n&ee.All)!==ee.None,i=(n&$.All)!==$.None,a=!e||(s&n)==(n&ee.All),c=!i||(this.state&n)==(n&$.All);if(a&&c)for(const s of r)s.setVisible(!0),s.transformation=t;else for(const t of r)t.setVisible(!1)}}_ensureEngineResources(){if(o(this._engineResources)){const e=r(this._engineLayer),t=[],i=new Set;this.renderObjects.forEach((({material:e})=>{i.has(e)||(t.push(e),i.add(e))}));const s=(e,t)=>{const{geometry:i,material:s,transform:o}=t;Array.isArray(i)?i.forEach((t=>e.addGeometry(t,s,o))):e.addGeometry(i,s,o)},o=new Map;this._renderObjects.forEach((e=>{const t=new Q({castShadow:!1});s(t,e);const i=e.stateMask||0,n=o.get(i)||[];n.push(t),o.set(i,n)}));const n=[];o.forEach(((e,t)=>n.push({stateMask:t,objects:e}))),this._engineResources={objectsByState:n,layer:e,materials:t}}return this._addResourcesToStage(),this._engineResources}_addResourcesToStage(){if(this._engineResourcesAddedToStage||o(this._engineResources))return;const{objectsByState:e,layer:t,materials:i}=this._engineResources;i.forEach((e=>{const t=r(this._materialIdReferences),i=t.get(e.id)||0;0===i&&this.view._stage.add(e),t.set(e.id,i+1)})),e.forEach((({objects:e})=>{t.addMany(e),this.view._stage.addMany(e)})),this._engineResourcesAddedToStage=!0}_removeResourcesFromStage(e=!1){if(!this._engineResourcesAddedToStage||o(this._engineResources)||!this.view._stage)return;const{objectsByState:t,layer:i,materials:s}=this._engineResources;t.forEach((({objects:e})=>{i.removeMany(e),this.view._stage.removeMany(e)})),s.forEach((e=>{const t=r(this._materialIdReferences),i=t.get(e.id);1===i?(this.view._stage.remove(e),t.delete(e.id)):t.set(e.id,i-1)})),e&&this.view._stage.remove(i),this._engineResourcesAddedToStage=!1}_getCollisionRadius(e){return this._getFocusedSize(this.radius,!0)*("touch"===e?this.touchMultiplier:1)}_getFocusedSize(e,t){return e*(t?this.focusMultiplier:1)}_getWorldToScreenObjectScale(){return this._worldSized?1:this.screenLocation.pixelSize}_calculateModelTransformPosition(e){const t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,le);return O(e,i[12],i[13],i[14])}_calculateModelTransformOffset(e){const t=this._calculateModelTransformPosition(e);return T(e,t,this.renderLocation)}_calculateObjectTransform(e,t){return m(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1),this._worldFrame&&f(t,t,this._worldFrame),f(t,t,this._modelTransform),t[12]+=this.renderLocation[0],t[13]+=this.renderLocation[1],t[14]+=this.renderLocation[2],t[15]=1,s(this._applyObjectTransform)&&this._applyObjectTransform(t),t}get test(){let e=!1;if(s(this._engineResources))for(const t in this._engineResources.objectsByState){const i=this._engineResources.objectsByState[t];for(const t of i.objects)if(t.isVisible){e=!0;break}if(e)break}return{areAnyResourcesVisible:e}}}function se(e){return 0!==e[12]||0!==e[13]||0!==e[14]}function oe(e,t,s){switch(e.viewingMode){case"local":return p(s),!0;case"global":{const o=I(e.renderCoordsHelper.spatialReference);return z(t,0,_e,0,o.radius),k(i(_e[0]),i(_e[1]),s),!0}}}const ne=a(),re=M(),ae=N(),ce=u(),le=b(),he=b(),de=W(),_e=A(),ue=A(),ge=A(),me=A(),fe=A(),pe=A(),be=new te({x:0,y:0,z:0,spatialReference:null});export{ie as Manipulator3D};
|
|
5
|
+
import"../../../geometry.js";import{neverReached as e}from"../../../core/compilerUtils.js";import t from"../../../core/Evented.js";import{deg2rad as i}from"../../../core/mathUtils.js";import{isSome as s,isNone as o,unwrapOr as n,unwrap as r}from"../../../core/maybe.js";import{createScreenPointArray as a,createRenderScreenPointArray3 as c,screenPointObjectToArray as l,castRenderScreenPointArray as h}from"../../../core/screenUtils.js";import{once as d}from"../../../core/accessorSupport/utils.js";import{f as _}from"../../../chunks/mat3.js";import{c as u}from"../../../chunks/mat3f64.js";import{c as g,s as m,m as f,i as p}from"../../../chunks/mat4.js";import{c as b}from"../../../chunks/mat4f64.js";import{k as v}from"../../../chunks/vec2.js";import{a as y,t as j,m as L,g as S,c as R,d as w,s as O,b as T}from"../../../chunks/vec3.js";import{c as A,Z as E}from"../../../chunks/vec3f64.js";import{canProjectWithoutEngine as D,projectPoint as F,sphericalPCPFtoLonLatElevation as k,computeENUToSphericalPCPFLocalRotation as z}from"../../../geometry/projection.js";import{getReferenceEllipsoid as I}from"../../../geometry/projectionEllipsoid.js";import{containsPointObject as P}from"../../../geometry/support/aaBoundingRect.js";import{create as M,distance2 as C,fromPoints as x,closestRayDistance2 as B}from"../../../geometry/support/lineSegment.js";import{create as W,fromPositionAndNormal as U,intersectRay as V}from"../../../geometry/support/plane.js";import{create as N}from"../../../geometry/support/ray.js";import{sv3d as G}from"../../../geometry/support/vectorStacks.js";import{clonePoint as H,hydratedSpatialReference as Y}from"../../../layers/graphics/hydratedFeatures.js";import{getElevationAtPoint as Z}from"../support/ElevationProvider.js";import{fromScreen as q}from"../support/geometryUtils/ray.js";import{UpdatePolicy as J}from"../webgl-engine/lib/basicInterfaces.js";import{Camera as K}from"../webgl-engine/lib/Camera.js";import{Object3D as Q}from"../webgl-engine/lib/Object3D.js";import{WebGLLayer as X}from"../webgl-engine/lib/WebGLLayer.js";import{ManipulatorStateCustomFlags as $,ManipulatorStateFlags as ee}from"../../interactive/interfaces.js";import te from"../../../geometry/Point.js";class ie{constructor(e){this.camera=new K,this._elevation={offset:0,override:null},this.collisionType={type:"point"},this.collisionPriority=0,this._renderObjects=[],this.autoScaleRenderObjects=!0,this._available=!0,this._noDisplayCount=0,this._radius=10,this._worldSized=!1,this.focusMultiplier=2,this.touchMultiplier=2.5,this.worldOriented=!1,this._modelTransform=b(),this._worldFrame=null,this._renderLocation=A(),this._renderLocationDirty=!0,this._location=new te({x:0,y:0,z:0}),this._elevationAlignedLocation=new te,this._elevationAlignedLocationDirty=!0,this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.cursor=null,this._grabbing=!1,this.dragging=!1,this._hovering=!1,this._selected=!1,this._state=$.None,this._focused=!1,this.events=new t.EventEmitter,this._screenLocation={screenPointArray:a(),renderScreenPointArray:c(),pixelSize:0},this._screenLocationDirty=!0,this._applyObjectTransform=null,this._engineResourcesAddedToStage=!1,this._engineResources=null,this._attached=!1,this._engineLayer=null,this._materialIdReferences=null,this._location.spatialReference=e.view.spatialReference;for(const t in e)this[t]=e[t];this.view.state&&this.view.state.camera&&this.camera.copyFrom(this.view.state.camera)}destroy(){this._removeResourcesFromStage(),this._engineResources=null,this.view=null,this.camera=null}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this._elevationAlignedLocationDirty=!0,this._renderLocationDirty=!0,this._updateEngineObject()}get renderObjects(){return this._renderObjects}set renderObjects(e){this._removeResourcesFromStage(),this._engineResources=null,this._renderObjects=e.slice(),this._updateEngineObject()}set available(e){e!==this._available&&(this._available=e,this._updateEngineObject())}get available(){return this._available}disableDisplay(){return this._noDisplayCount++,1===this._noDisplayCount&&this._updateEngineObject(),{remove:d((()=>{this._noDisplayCount--,0===this._noDisplayCount&&this._updateEngineObject()}))}}set radius(e){e!==this._radius&&(this._radius=e,this._updateEngineObject())}get radius(){return this._radius}set worldSized(e){e!==this._worldSized&&(this._worldSized=e,this._updateEngineObject())}get worldSized(){return this._worldSized}get modelTransform(){return this._modelTransform}set modelTransform(e){se(e)&&(this._screenLocationDirty=!0),g(this._modelTransform,e),this._updateEngineObject()}get renderLocation(){return this._renderLocationDirty&&(this._renderLocationDirty=!1,this.view.renderCoordsHelper.toRenderCoords(this.elevationAlignedLocation,this._renderLocation),this.worldOriented?(this._worldFrame||(this._worldFrame=b()),oe(this.view,this._renderLocation,this._worldFrame)):this._worldFrame&&(this._worldFrame=null)),this._renderLocation}set renderLocation(e){this.view.renderCoordsHelper.fromRenderCoords(e,this._location),this.elevationAlignedLocation=this._location}get location(){return this._location}set location(e){H(e,this._location),this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!0,this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}get elevationAlignedLocation(){return this._elevationAlignedLocationDirty?(this._evaluateElevationAlignment(),this._updateElevationAlignedLocation(),this._elevationAlignedLocation):this._elevationAlignedLocation}set elevationAlignedLocation(e){H(e,this._location),this._evaluateElevationAlignment(),this._location.z-=this._elevation.offset,this._updateElevationAlignedLocation(),this._updateEngineObject(),this.events.emit("location-update",{location:this._location})}_updateElevationAlignedLocation(){this._elevationAlignedLocation.x=this.location.x,this._elevationAlignedLocation.y=this.location.y;const e=s(this._elevation.override)?this._elevation.override:this.location.z||0;this._elevationAlignedLocation.z=e+this._elevation.offset,this._elevationAlignedLocation.spatialReference=Y(this.location.spatialReference),this._renderLocationDirty=!0,this._screenLocationDirty=!0,this._elevationAlignedLocationDirty=!1}grabbableForEvent(){return!0}get grabbing(){return this._grabbing}set grabbing(e){e!==this._grabbing&&(this._grabbing=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get hovering(){return this._hovering}set hovering(e){e!==this._hovering&&(this._hovering=e,this._setFocused(this._hovering||this._grabbing),this._updateEngineObject())}get selected(){return this._selected}set selected(e){e!==this._selected&&(this._selected=e,this._updateEngineObject(),this.events.emit("select-changed",{action:e?"select":"deselect"}))}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,this._updateEngineObject())}updateStateEnabled(e,t){t?this.state|=e:this.state&=~e}_setFocused(e){e!==this._focused&&(this._focused=e,this.events.emit("focus-changed",{action:!0===e?"focus":"unfocus"}))}get focused(){return this._focused}get screenLocation(){return this._ensureScreenLocation(),this._screenLocation}_ensureScreenLocation(){if(!this._screenLocationDirty)return;this._screenLocation.pixelSize=this.camera.computeScreenPixelSizeAt(this.renderLocation),this._screenLocationDirty=!1;let e;if(se(this._modelTransform)){const t=this._calculateModelTransformOffset(pe);e=y(t,t,this.renderLocation)}else e=this.renderLocation;this.camera.projectToRenderScreen(e,this._screenLocation.renderScreenPointArray),this.camera.renderToScreen(this._screenLocation.renderScreenPointArray,this._screenLocation.screenPointArray)}get applyObjectTransform(){return this._applyObjectTransform}set applyObjectTransform(e){this._applyObjectTransform=e,this._screenLocationDirty=!0,this._updateEngineObject()}intersectionDistance(t,i){if(!this.available)return null;const s=l(t,ne),n=this._getCollisionRadius(i),r=-1*this.collisionPriority;switch(this.collisionType.type){case"point":if(v(this.screenLocation.screenPointArray,s)<n*n)return this.screenLocation.renderScreenPointArray[2]+r;break;case"line":{const e=this.collisionType.paths,t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,he),a=n*this.screenLocation.pixelSize,c=q(this.camera,s,ae);if(o(c))return null;for(const s of e){if(0===s.length)continue;const e=L(_e,s[0],i);for(let t=1;t<s.length;t++){const o=L(ue,s[t],i),n=B(x(e,o,re),c);if(null!=n&&n<a*a){const t=y(G.get(),e,o);S(t,t,.5);const i=h(G.get());return this.camera.projectToRenderScreen(t,i),i[2]+r}R(e,o)}}break}case"disc":{const e=this.collisionType.direction,t=this.collisionType.offset??E,i=this._getWorldToScreenObjectScale(),a=this._calculateObjectTransform(i,he),c=n*this.screenLocation.pixelSize,l=q(this.camera,s,ae);if(o(l))return null;const h=_(ce,a),d=j(me,e,h),u=L(fe,t,a);U(u,d,de);const g=ge;if(V(de,l,g)&&w(g,u)<c*c)return this.screenLocation.renderScreenPointArray[2]+r;break}case"ribbon":{const{paths:e,direction:t}=this.collisionType,i=this._getWorldToScreenObjectScale(),a=this._calculateObjectTransform(i,he),c=n*this.camera.computeScreenPixelSizeAt(this.renderLocation),l=q(this.camera,s,ae);if(o(l))return null;const d=_(ce,a),u=j(me,t,d),g=this._calculateModelTransformPosition(fe);U(g,u,de);const m=ge;if(!V(de,l,m))break;for(const s of e){if(0===s.length)continue;const e=L(_e,s[0],a);for(let t=1;t<s.length;t++){const i=L(ue,s[t],a),o=C(x(e,i,re),m);if(null!=o&&o<c*c){const t=y(G.get(),e,i);S(t,t,.5);const s=h(G.get());return this.camera.projectToRenderScreen(t,s),s[2]+r}R(e,i)}}break}default:e(this.collisionType)}return null}attach(e={manipulator3D:{}}){if(!this.view._stage)return;const t=e.manipulator3D;if(o(t.engineLayerId)){const e=new X({isPickable:!1,updatePolicy:J.SYNC});this.view._stage.add(e),t.engineLayerId=e.id,this._engineLayer=e}else this.view._stage?.getObject&&(this._engineLayer=this.view._stage.getObject(t.engineLayerId));t.engineLayerReferences=(t.engineLayerReferences||0)+1,this._materialIdReferences=t.materialIdReferences,o(this._materialIdReferences)&&(this._materialIdReferences=new Map,t.materialIdReferences=this._materialIdReferences),this.camera.copyFrom(this.view.state.camera),this._attached=!0,this._updateEngineObject(),D(this._location.spatialReference,this.view.spatialReference)||(this.location=new te({x:0,y:0,z:0,spatialReference:this.view.spatialReference}))}detach(e={manipulator3D:{}}){const t=e.manipulator3D;t.engineLayerReferences--;const i=0===t.engineLayerReferences;i&&(t.engineLayerId=null),this._removeResourcesFromStage(i),this._engineResources=null,this._engineLayer=null,this._materialIdReferences=null,this._attached=!1}onViewChange(){this.camera.copyFrom(this.view.state.camera),this._screenLocationDirty=!0,this._updateEngineObject()}onElevationChange(e){F(this.location,be,e.spatialReference),P(e.extent,be)&&(this.location=this._location)}_evaluateElevationAlignment(e=this.location){if(o(this.elevationInfo))return!1;let t=null,i=0;const s=n(this.elevationInfo.offset,0);switch(this.elevationInfo.mode){case"on-the-ground":t=n(Z(this.view.elevationProvider,e,"ground"),0);break;case"relative-to-ground":i=n(Z(this.view.elevationProvider,e,"ground"),0)+s;break;case"relative-to-scene":i=n(Z(this.view.elevationProvider,e,"scene"),0)+s;break;case"absolute-height":i=s}return(i!==this._elevation.offset||t!==this._elevation.override)&&(this._elevation.offset=i,this._elevation.override=t,!0)}_updateEngineObject(){if(!this._attached)return;if(!this.available)return void this._removeResourcesFromStage();const e=this._getWorldToScreenObjectScale(),t=he;if(!0===this.autoScaleRenderObjects){const i=this._getFocusedSize(this._radius,this.focused)*e;this._calculateObjectTransform(i,t)}else this._calculateObjectTransform(e,t);const{objectsByState:i}=this._ensureEngineResources(),s=(this.focused?ee.Focused:ee.Unfocused)|(this.selected?ee.Selected:ee.Unselected),o=this._noDisplayCount>0;for(const{stateMask:n,objects:r}of i){if(o){for(const e of r)e.setVisible(!1);continue}const e=(n&ee.All)!==ee.None,i=(n&$.All)!==$.None,a=!e||(s&n)==(n&ee.All),c=!i||(this.state&n)==(n&$.All);if(a&&c)for(const s of r)s.setVisible(!0),s.transformation=t;else for(const t of r)t.setVisible(!1)}}_ensureEngineResources(){if(o(this._engineResources)){const e=r(this._engineLayer),t=[],i=new Set;this.renderObjects.forEach((({material:e})=>{i.has(e)||(t.push(e),i.add(e))}));const s=(e,t)=>{const{geometry:i,material:s,transform:o}=t;Array.isArray(i)?i.forEach((t=>e.addGeometry(t,s,o))):e.addGeometry(i,s,o)},o=new Map;this._renderObjects.forEach((e=>{const t=new Q({castShadow:!1});s(t,e);const i=e.stateMask||0,n=o.get(i)||[];n.push(t),o.set(i,n)}));const n=[];o.forEach(((e,t)=>n.push({stateMask:t,objects:e}))),this._engineResources={objectsByState:n,layer:e,materials:t}}return this._addResourcesToStage(),this._engineResources}_addResourcesToStage(){if(this._engineResourcesAddedToStage||o(this._engineResources))return;const{objectsByState:e,layer:t,materials:i}=this._engineResources;i.forEach((e=>{const t=r(this._materialIdReferences),i=t.get(e.id)||0;0===i&&this.view._stage.add(e),t.set(e.id,i+1)})),e.forEach((({objects:e})=>{t.addMany(e),this.view._stage.addMany(e)})),this._engineResourcesAddedToStage=!0}_removeResourcesFromStage(e=!1){if(!this._engineResourcesAddedToStage||o(this._engineResources)||!this.view._stage)return;const{objectsByState:t,layer:i,materials:s}=this._engineResources;t.forEach((({objects:e})=>{i.removeMany(e),this.view._stage.removeMany(e)})),s.forEach((e=>{const t=r(this._materialIdReferences),i=t.get(e.id);1===i?(this.view._stage.remove(e),t.delete(e.id)):t.set(e.id,i-1)})),e&&this.view._stage.remove(i),this._engineResourcesAddedToStage=!1}_getCollisionRadius(e){return this._getFocusedSize(this.radius,!0)*("touch"===e?this.touchMultiplier:1)}_getFocusedSize(e,t){return e*(t?this.focusMultiplier:1)}_getWorldToScreenObjectScale(){return this._worldSized?1:this.screenLocation.pixelSize}_calculateModelTransformPosition(e){const t=this._getWorldToScreenObjectScale(),i=this._calculateObjectTransform(t,le);return O(e,i[12],i[13],i[14])}_calculateModelTransformOffset(e){const t=this._calculateModelTransformPosition(e);return T(e,t,this.renderLocation)}_calculateObjectTransform(e,t){return m(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1),this._worldFrame&&f(t,t,this._worldFrame),f(t,t,this._modelTransform),t[12]+=this.renderLocation[0],t[13]+=this.renderLocation[1],t[14]+=this.renderLocation[2],t[15]=1,s(this._applyObjectTransform)&&this._applyObjectTransform(t),t}get test(){let e=!1;if(s(this._engineResources))for(const t in this._engineResources.objectsByState){const i=this._engineResources.objectsByState[t];for(const t of i.objects)if(t.isVisible){e=!0;break}if(e)break}return{areAnyResourcesVisible:e}}}function se(e){return 0!==e[12]||0!==e[13]||0!==e[14]}function oe(e,t,s){switch(e.viewingMode){case"local":return p(s),!0;case"global":{const o=I(e.renderCoordsHelper.spatialReference);return k(t,0,_e,0,o.radius),z(i(_e[0]),i(_e[1]),s),!0}}}const ne=a(),re=M(),ae=N(),ce=u(),le=b(),he=b(),de=W(),_e=A(),ue=A(),ge=A(),me=A(),fe=A(),pe=A(),be=new te({x:0,y:0,z:0,spatialReference:null});export{ie as Manipulator3D};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../../../core/Handles.js";import{isSome as e}from"../../../../core/maybe.js";import{watch as i}from"../../../../core/reactiveUtils.js";import{createRenderScreenPointArray as s,createRenderScreenPointArray3 as o,createScreenPointArray as r}from"../../../../core/screenUtils.js";import{
|
|
5
|
+
import t from"../../../../core/Handles.js";import{isSome as e}from"../../../../core/maybe.js";import{watch as i}from"../../../../core/reactiveUtils.js";import{createRenderScreenPointArray as s,createRenderScreenPointArray3 as o,createScreenPointArray as r}from"../../../../core/screenUtils.js";import{j as a,s as n,b as h,n as c,f as l,i as m,a as _}from"../../../../chunks/vec2.js";import{a as u}from"../../../../chunks/vec3.js";import{c as p}from"../../../../chunks/vec3f64.js";import{VisualElement as d}from"./VisualElement.js";import{renderScreenSpaceTangent as f}from"../../../interactive/support/viewUtils.js";import b from"../../../overlay/LineOverlayItem.js";import x from"../../../overlay/TextOverlayItem.js";class v extends d{constructor(e){super(e.view),this._handles=new t,this._textItem=null,this._calloutItem=null,this._showCallout=!0,this._showText=!0,this._geometry=null,this._text="-",this._fontSize=14,this._distance=25,this._anchor="right",this.applyProps(e)}get geometry(){return this._geometry}set geometry(t){this._geometry=t,this._updateLabelPosition()}get textItem(){return this._textItem}get text(){return this._text}set text(t){this._text=t,this.attached&&(this._textItem.text=this._text)}get fontSize(){return this._fontSize}set fontSize(t){this._fontSize=t,this.attached&&(this._textItem.fontSize=this._fontSize)}get distance(){return this._distance}set distance(t){this._distance!==t&&(this._distance=t,this._updateLabelPosition())}get anchor(){return this._anchor}set anchor(t){this._anchor!==t&&(this._anchor=t,this._updateLabelPosition())}overlaps(t){return!!this.attached&&(this.textItem.visible&&t.textItem.visible&&this.view.overlay.overlaps(this._textItem,t.textItem))}_updateLabelPosition(){if(!this.attached)return;this._showText=!1,this._showCallout=!1;const{geometry:t,view:i,visible:s}=this;if(e(t)&&i._stage)switch(t.type){case"point":if(!this._computeLabelPositionFromPoint(t.point,R))break;if(t.callout){const e=i.state.camera,s=t.callout.distance;a(L,L,[0,t.callout.offset]),e.renderToScreen(L,R),n(j,0,1),h(j,j,s*e.pixelRatio),a(j,j,L),e.renderToScreen(j,z),this._showCallout=this._updatePosition(R,z)}else this._textItem.position=[R[0],R[1]],this._textItem.anchor="center";this._showText=!0;break;case"corner":if(!this._computeLabelPositionFromCorner(t,this._distance,R,z))break;this._showCallout=this._updatePosition(R,z),this._showText=!0;break;case"segment":{if(!this._computeLabelPositionFromSegment(t,this._distance,this._anchor,R,z))break;this._showText=!0;const e=this._updatePosition(R,z);this._showCallout=!1!==t.callout&&e,this._showCallout||(this._textItem.anchor="center")}}this.updateVisibility(s)}_computeLabelPositionFromPoint(t,e){const i=this.view.state.camera;return i.projectToRenderScreen(t,L),!(L[2]<0||L[2]>1)&&(i.renderToScreen(L,e),!0)}_computeLabelPositionFromCorner(t,e,i,s){if(!t)return!1;const o=this.view.state.camera;return w(t.left,1,o,P),c(P,P),w(t.right,0,o,T),a(j,P,T),c(j,j),l(j,j),o.projectToRenderScreen(t.left.endRenderSpace,L),!(L[2]<0||L[2]>1)&&(o.renderToScreen(L,i),h(j,j,e*o.pixelRatio),a(j,j,L),o.renderToScreen(j,s),!0)}_computeLabelPositionFromSegment(t,e,i,s,o){if(!t)return!1;const r=t.segment,l=this.view.state.camera;f(r.startRenderSpace,r.endRenderSpace,l,P),n(j,-P[1],P[0]);let _=!1;switch(i){case"top":_=j[1]<0;break;case"bottom":_=j[1]>0;break;case"left":_=j[0]>0;break;case"right":_=j[0]<0}if(_&&c(j,j),0===m(j))switch(i){case"top":j[1]=1;break;case"bottom":j[1]=-1;break;case"left":j[0]=-1;break;case"right":j[0]=1}return r.eval(V[t.sampleLocation],k),l.projectToRenderScreen(k,L),!(L[2]<0||L[2]>1)&&(l.renderToScreen(L,s),h(j,j,e*l.pixelRatio),a(j,j,L),l.renderToScreen(j,o),!0)}_updatePosition(t,e){if(e){const i=e[0]-t[0],s=e[1]-t[1];return this._textItem.position=[e[0],e[1]],this._textItem.anchor=Math.abs(i)>Math.abs(s)?i>0?"left":"right":s>0?"top":"bottom",this._calloutItem.startPosition=[t[0],t[1]],this._calloutItem.endPosition=[e[0],e[1]],!0}return this._textItem.position=[t[0],t[1]],this._textItem.anchor="center",!1}createResources(){this._textItem=new x({visible:!0,text:this._text,fontSize:this._fontSize}),this._calloutItem=new b({visible:!0,width:2}),this._updateLabelPosition(),this.view.overlay.items.addMany([this._textItem,this._calloutItem]),this._handles.add(i((()=>this.view.state.camera),(()=>this._updateLabelPosition())))}destroyResources(){this.view.overlay&&!this.view.overlay.destroyed&&this.view.overlay.items.removeMany([this._textItem,this._calloutItem]),this._handles.removeAll()}updateVisibility(t){this._textItem.visible=this._showText&&t,this._calloutItem.visible=this._showCallout&&t}}function w(t,e,i,s){t.eval(e,S,y),u(g,S,y),i.projectToRenderScreen(S,C),i.projectToRenderScreen(g,M),_(s,U,F),l(s,s)}function I(t){switch(t){case"top":return"bottom";case"right":return"left";case"bottom":return"top";case"left":return"right"}}const S=p(),g=p(),y=p(),P=s(),T=s(),j=s(),k=p(),L=o(),R=r(),z=r(),C=o(),F=C,M=o(),U=M,V={start:0,center:.5,end:1};export{v as LabelVisualElement,I as mirrorPosition,w as screenSpaceTangent};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../core/Handles.js";import{unwrap as t,isSome as r,isNone as s}from"../../../../core/maybe.js";import{watch as i}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as o}from"../../../../core/screenUtils.js";import{f as a,a as c,b as n,s as h,
|
|
5
|
+
import e from"../../../../core/Handles.js";import{unwrap as t,isSome as r,isNone as s}from"../../../../core/maybe.js";import{watch as i}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as o}from"../../../../core/screenUtils.js";import{f as a,a as c,b as n,s as h,j as l}from"../../../../chunks/vec2.js";import{k as d,c as m,n as u,b as _,a as p}from"../../../../chunks/vec3.js";import{c as f,f as g}from"../../../../chunks/vec3f64.js";import{g as j,c as b}from"../../../../chunks/vec4.js";import{f as y}from"../../../../chunks/vec4f32.js";import{Object3DVisualElement as w}from"./Object3DVisualElement.js";import x from"../../webgl-engine/lib/GeometryUtil.js";import{RenderOccludedFlag as G}from"../../webgl-engine/lib/Material.js";import{VertexAttribute as O}from"../../webgl-engine/lib/VertexAttribute.js";import{RibbonLineMaterial as R}from"../../webgl-engine/materials/RibbonLineMaterial.js";class v extends w{constructor(t){super(t),this._handles=new e,this._location=f(),this._direction=g(1,0,0),this._width=1,this._offset=1,this._length=18,this._color=y(1,0,1,1),this._renderOccluded=G.OccludeAndTransparent,this.applyProps(t)}get location(){return this._location}set location(e){d(this._location,e)||(m(this._location,e),this._updateGeometry())}get direction(){return this._direction}set direction(e){d(this._direction,e)||(m(this._direction,e),this._updateGeometry())}setDirectionFromPoints(e,t){u(this._direction,_(this._direction,t,e)),this._updateGeometry()}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get offset(){return this._offset}set offset(e){e!==this._offset&&(this._offset=e,this._updateGeometry())}get length(){return this._length}set length(e){e!==this._length&&(this._length=e,this._updateGeometry())}get color(){return this._color}set color(e){j(e,this._color)||(b(this._color,e),this._updateMaterial())}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}createExternalResources(){const e=new R(this.materialParameters);this._handles.add(i((()=>this.view.state.camera),(()=>{this._updateGeometry()}))),this._externalResources={material:e}}destroyExternalResources(){this._handles.removeAll(),this._externalResources=null}createGeometries(e){const r=x.createPolylineGeometry([f(),f()]),s=x.createPolylineGeometry([f(),f()]),i=t(this._externalResources).material;e.addGeometry(r,i),e.addGeometry(s,i),this._updateVertices(e)}forEachExternalMaterial(e){r(this._externalResources)&&e(this._externalResources.material)}_updateMaterial(){if(s(this._externalResources))return;this._externalResources.material.setParameters(this.materialParameters)}get materialParameters(){return{width:this._width,color:this._color,renderOccluded:this._renderOccluded}}_updateGeometry(){const e=this.object;s(e)||this._updateVertices(e)}_updateVertices(e){const t=this.view.state.camera;t.projectToScreen(this.location,V),p(P,this.location,this.direction),t.projectToScreen(P,A),a(A,c(A,A,V)),this._updateVertexAttributes(t,e,0,V,A,1),this._updateVertexAttributes(t,e,1,V,A,-1)}_updateVertexAttributes(e,t,r,s,i,o){const a=t.geometryRecords[r],c=a.geometry.getMutableAttribute(O.POSITION).data,d=n(M,h(M,i[1]*o,i[0]*-o),this.offset+this.width/2),m=l(k,l(k,l(k,s,n(k,i,this.length/2)),d),d),u=l(E,m,n(E,i,-this.length));e.unprojectFromScreen(m,P),c[0]=P[0],c[1]=P[1],c[2]=P[2],e.unprojectFromScreen(u,P),c[3]=P[0],c[4]=P[1],c[5]=P[2],t.geometryVertexAttrsUpdated(a)}}const P=f(),V=o(),A=o(),M=o(),k=o(),E=o();export{v as ParallelLineVisualElement};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.25/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,isNone as s,isSome as o}from"../../../core/maybe.js";import{watch as i,initial as a,when as l,syncAndInitial as n}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 p}from"../../../core/accessorSupport/decorators/subclass.js";import{hydrateGeometry as c}from"../../../layers/graphics/hydratedFeatures.js";import{FeatureTileController3D as m}from"../../../layers/graphics/controllers/FeatureTileController3D.js";import{FeatureLikeLayerView3D as h}from"./FeatureLikeLayerView3D.js";import{LayerView3D as d}from"./LayerView3D.js";import{FeatureTileFetcher3DLayerViewContext as y}from"./support/FeatureTileFetcher3DLayerViewContext.js";import{EventedSet as f}from"../support/EventedSet.js";import{updatingProgress as g}from"../support/updatingProperties.js";import{UpdatePolicy as F}from"../webgl-engine/lib/basicInterfaces.js";import x from"../../layers/FeatureLayerView.js";import b from"../../layers/LayerView.js";import M from"../../layers/RefreshableLayerView.js";let j=class extends(M(h(x(d(b))))){constructor(e){super(e),this._controllerTotal=0,this._processorTotal=0,this.suspendResumeExtentMode="data"}initialize(){this.handles.add(i((()=>this._updatingRequiredFieldsPromise),(e=>this.updatingHandles.addPromise(e)),n))}destroy(){this.updatingHandles.removeAll(),this.handles.removeAll(),this.fetcherContext=t(this.fetcherContext)}get maximumNumberOfFeatures(){return this.controller?.maximumNumberOfFeatures??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(){let e=0;if(this.controller?.updating){const r=this.controller.updatingRemaining,t=Math.max(this.controller.updatingTotal,this._controllerTotal);t>0&&(e=(t-r)/t,this._controllerTotal=t)}let r=0;if(this.processor?.updating){const e=this.processor.updatingRemaining,t=Math.max(e,this._processorTotal);t>0&&(r=(t-e)/t,this._processorTotal=t)}return.5*(e+r)}get updatePolicy(){if(!this.controller)return F.ASYNC;switch(this.controller.mode){case"snapshot":{const e=O[this.layer.geometryType];return null==e||this.controller.serviceDataCount>e?F.ASYNC:F.SYNC}case"tiles":return F.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){this.processor?.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 y({layerView:this,returnZ:this.hasZ,returnM:this.hasM});const e=new m({layerView:this,context:this.fetcherContext,graphics:new f,extent:this.clippingExtent});return this.updatingHandles.add((()=>e.serviceDataExtent),(e=>{this.processor&&(this.processor.dataExtent=e)}),a),this.handles.add(i((()=>this.suspended),(r=>{r?e.suspend():e.resume()}),n)),this.updatingHandles.add((()=>this.processor?.displayFeatureLimit),(r=>e.displayFeatureLimit=r),a),this.handles.add(l((()=>!this.updating),(()=>{this._controllerTotal=0,this._processorTotal=0}))),e}async doRefresh(e){e&&!this.suspended&&this.controller&&this.controller.refetch(),this.processor.refreshFilter()}getUsedMemory(){return(this.processor?.usedMemory??0)+(this.controller?.memoryForUnusedFeatures??0)}getUnloadedMemory(){return(this.processor?.unprocessedMemoryEstimate??0)+(this.controller?.expectedFeatureDiff*this.processor?.usedMemoryPerFeature??0)}ignoresMemoryFactor(){return this.controller?.hasMaximumNumberOfFeaturesOverride}async _queryFeaturesMesh(e,r){await this._validateQueryFeaturesMesh(e);const t=await r();if(e&&e.outStatistics||s(this.graphics3DProcessor))return t;const o=this.layer.objectIdField,i=this.graphics3DProcessor.graphics3DGraphicsByObjectID,a=[];for(const s of t.features)if(s.geometry){const e=i.get(s.attributes[o]);e&&(s.geometry=c(e.graphic.geometry),a.push(s))}else a.push(s);return t.features=a,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}'`)},s=["quantizationParameters","geometryPrecision","maxAllowableOffset"];for(const r of s)null!=e[r]&&t(r);"returnM"in e&&e.returnM&&t("returnM"),"returnCentroid"in e&&e.returnCentroid&&t("returnCentroid"),o(e.outSpatialReference)&&!e.outSpatialReference.equals(this.view.spatialReference)&&t("outSpatialReference")}get performanceInfo(){const e=this.controller?.displayFeatureLimit,r=o(e)&&e.averageSymbolComplexity,t=o(r)?`f:${r.primitivesPerFeature},v:${r.primitivesPerCoordinate}`:"n/a",s={...this._getResourceInfo(),storedFeatures:0,totalVertices:0,partial:this.maximumNumberOfFeaturesExceeded,mode:this.controller?.mode??"n/a",symbolComplexity:t,nodes:this.controller?.tileDescriptors.length??0};if(this.controller&&s.displayedNumberOfFeatures){const e=this.controller.debug;s.storedFeatures=e.storedFeatures,s.totalVertices=e.totalVertices}return s}get test(){return{updatePolicy:this.updatePolicy,controller:this.controller,loadedGraphics:this.controller?.graphics}}};e([u()],j.prototype,"layer",void 0),e([u()],j.prototype,"controller",void 0),e([u()],j.prototype,"_controllerTotal",void 0),e([u()],j.prototype,"_processorTotal",void 0),e([u()],j.prototype,"maximumNumberOfFeatures",null),e([u()],j.prototype,"maximumNumberOfFeaturesExceeded",null),e([u(g)],j.prototype,"updatingProgress",void 0),e([u({readOnly:!0})],j.prototype,"updatingProgressValue",null),e([u({readOnly:!0})],j.prototype,"updatePolicy",null),e([u({readOnly:!0})],j.prototype,"hasZ",null),e([u({readOnly:!0})],j.prototype,"hasM",null),e([u()],j.prototype,"suspendResumeExtentMode",void 0),j=e([p("esri.views.3d.layers.FeatureLayerViewBase3D")],j);const O={point:5e3,polygon:500,polyline:1e3},v=j;export{v 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.25/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,get as s,isNone as i}from"../../../core/maybe.js";import{initial as o,whenOnce as n}from"../../../core/reactiveUtils.js";import{property as a}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 p}from"../../../layers/graphics/hydratedFeatures.js";import{FeatureTileController3D as u}from"../../../layers/graphics/controllers/FeatureTileController3D.js";import c from"../../../rest/support/Query.js";import h from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as d}from"./graphics/QueryEngine.js";import{HeatmapFeatureProcessor as y}from"./support/HeatmapFeatureProcessor.js";import{toViewIfLocal as m}from"./support/projectExtentUtils.js";import{UpdatePolicy as g}from"../webgl-engine/lib/basicInterfaces.js";import{TaskPriority as f}from"../../support/Scheduler.js";const E=E=>{let b=class extends E{constructor(){super(...arguments),this.controller=null,this.updatePolicy=g.SYNC,this.suspendResumeExtentMode="computed",this.slicePlaneEnabled=!1,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;"isTable"in e&&e.isTable?this.addResolvingPromise(Promise.reject(new r("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e}))):(this.addResolvingPromise(this._validateGeometryType()),this.updatingHandles.add((()=>this.layer.renderer),(e=>this._recreateProcessor(e)),o),this.addResolvingPromise((async()=>{const e=await m(this);this.fullExtentInLocalViewSpatialReference=e,await this._initializeController()})()),this.updatingHandles.add((()=>this.updatePolicy),(e=>this.processor.preferredUpdatePolicy=e)),this.queryEngine=new d({layerView:this,priority:f.FEATURE_QUERY_ENGINE}),this.notifyChange("updating"))}destroy(){this._destroyPendingController(),this.controller=t(this.controller),this._set("processor",t(this.processor)),this.queryEngine=t(this.queryEngine),this.loadedGraphics=null}_destroyPendingController(){this.pendingController=t(this.pendingController)}get legendEnabled(){return this.canResume()&&this.processor?.legendEnabled}get graphics3DProcessor(){return"graphics-3d"===this.processor?.type?this.processor:null}get heatmapProcessor(){return"heatmap"===this.processor?.type?this.processor:null}getHit(e){let r=null;return this.loadedGraphics?.forEach((t=>{t.uid===e&&(r=p(t,this.layer))})),r?{type:"graphic",graphic:r,layer:r.layer}:null}whenGraphicBounds(e,r){return this.processor?.whenGraphicBounds(e,r)}computeAttachmentOrigin(e,r){return this.processor?.computeAttachmentOrigin(e,r)}queryFeatures(e,r){return this.queryEngine.executeQuery(this._ensureQuery(e),s(r,"signal"))}queryObjectIds(e,r){return this.queryEngine.executeQueryForIds(this._ensureQuery(e),s(r,"signal"))}queryFeatureCount(e,r){return this.queryEngine.executeQueryForCount(this._ensureQuery(e),s(r,"signal"))}queryExtent(e,r){return this.queryEngine.executeQueryForExtent(this._ensureQuery(e),s(r,"signal"))}_ensureQuery(e){return i(e)?this.createQuery():c.from(e)}highlight(e){return this.processor.highlight(e,this.layer.objectIdField)}maskOccludee(e){return this.processor.maskOccludee(e)}canResume(){return super.canResume()&&!this.processor?.scaleVisibilitySuspended}getSuspendInfo(){const e=super.getSuspendInfo();return this.processor?{...e,...this.processor.suspendInfo}:e}isUpdating(){return!(!this.processor||this.processor.destroyed)&&!(this._controllerCreated&&!this.controller?.updating&&this.view?.basemapTerrain?.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(r){}this._controllerCreated=!0,this.notifyChange("updating"),this.isResolved()&&!this.destroyed?(await n((()=>this.view?.basemapTerrain?.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":throw new r("featurelayerview3d:unsupported-geometry-type","Unsupported geometry type ${geometryType}",{geometryType:this.layer.geometryType})}}_recreateProcessor(e){const r="heatmap"===e?.type,t="heatmap"===this.processor?.type,s=this.processor;if(s&&r===t)return;const i=r?new y({owner:this}):new h({owner:this,frustumVisibilityEnabled:!0,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentEnabled:!0,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!0,preferredUpdatePolicy:this.updatePolicy,updateClippingExtent:e=>this._updateClippingExtent(e)});this._set("processor",i),s?.destroy(),this.queryEngine?.clear(),this.addResolvingPromise(i.initializePromise)}_getResourceInfo(){const e=this.controller instanceof u?this.controller:null;return{displayedNumberOfFeatures:this.loadedGraphics.length,maximumNumberOfFeatures:e?.maximumNumberOfFeatures??-1,totalNumberOfFeatures:e?.serviceDataCount??-1,nodes:0,...this.processor.performanceInfo}}get performanceInfo(){return this._getResourceInfo()}};return e([a()],b.prototype,"loadedGraphics",void 0),e([a()],b.prototype,"suspended",void 0),e([a({readOnly:!0})],b.prototype,"legendEnabled",null),e([a()],b.prototype,"updating",void 0),e([a()],b.prototype,"controller",void 0),e([a()],b.prototype,"processor",void 0),e([a({readOnly:!0})],b.prototype,"updatePolicy",void 0),e([a({readOnly:!0})],b.prototype,"suspendResumeExtentMode",void 0),e([a({type:Boolean})],b.prototype,"slicePlaneEnabled",void 0),e([a({readOnly:!0})],b.prototype,"suspendInfo",void 0),e([a()],b.prototype,"graphics3DProcessor",null),e([a()],b.prototype,"heatmapProcessor",null),b=e([l("esri.views.3d.layers.FeatureLikeLayerView3D")],b),b};export{E 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.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import{isNone as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{isSome as t,isNone as a}from"../../../core/maybe.js";import{debounce as i}from"../../../core/promiseUtils.js";import{when as r}from"../../../core/reactiveUtils.js";import"../../../core/Logger.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/Error.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import o from"./DynamicLayerView3D.js";import n from"../../layers/ImageryLayerView.js";let m=class extends(n(o)){constructor(){super(...arguments),this.type="imagery-3d",this.redrawDebounced=i((async e=>{this.redraw(((e,t)=>this._redrawImage(e,t)),e)}),2e3)}initialize(){this.handles.add([r((()=>this.view.basemapTerrain.ready),(()=>this._initializeMaximumDataResolution()),{once:!0,initial:!0}),this.layer.on("redraw",(()=>this.updatingHandles.addPromise(this.redrawDebounced())))]),this.updatingHandles.add((()=>this.layer?.exportImageServiceParameters?.version),(()=>{this.updatingHandles.addPromise(this.refreshDebounced())})),this.updatingHandles.add((()=>this.timeExtent),(()=>this.updatingHandles.addPromise(this.refreshDebounced())))}_initializeMaximumDataResolution(){this.maximumDataResolution=t(this.layer.serviceRasterInfo)?this.layer.serviceRasterInfo.pixelSize:null}getFetchOptions(){return{timeExtent:this.timeExtent}}async processResult(e,t,a){t.imageElement?e.image=t.imageElement:(e.image=document.createElement("canvas"),e.pixelData=t.pixelData,await this._redrawImage(e,a))}async _redrawImage(e,t){if(!(e.image instanceof HTMLCanvasElement)||a(e.pixelData))throw new Error;const i=e.image,r=i.getContext("2d"),s=await this.layer.applyRenderer(e.pixelData,{signal:t}),o=this.layer.applyFilter(s).pixelBlock;if(a(o))throw new Error;i.width=o.width,i.height=o.height;const n=r.createImageData(o.width,o.height);n.data.set(o.getAsRGBA()),r.putImageData(n,0,0)}};m=e([s("esri.views.3d.layers.ImageryLayerView3D")],m);const d=m;export{d as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import{binaryIndexOf as r}from"../../../core/arrayUtils.js";import s from"../../../core/Logger.js";import{destroyMaybe as i,isNone as o,isSome as a,unwrap as n}from"../../../core/maybe.js";import{initial as d,watch as l}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{a as c}from"../../../chunks/vec3.js";import{f as p,c as g}from"../../../chunks/vec3f64.js";import{projectBuffer as m,projectVectorToVector as _,projectBoundingRect as y}from"../../../geometry/projection.js";import{create as f}from"../../../geometry/support/aaBoundingRect.js";import{extentContainsCoords3D as b}from"../../../geometry/support/contains.js";import{getGeometryZScaler as v}from"../../../geometry/support/zscale.js";import{makeDehydratedPoint as E,estimateSize as x}from"../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as I}from"../../../layers/graphics/hydratedFeatures.js";import S from"../../../layers/graphics/controllers/I3SOnDemandController.js";import w from"../../../layers/support/FeatureFilter.js";import D from"../../../rest/support/Query.js";import{I3SPointsWorkerHandle as C}from"./I3SPointsWorkerHandle.js";import{LayerView3D as F}from"./LayerView3D.js";import O from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as A}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 L,containsDraco as V,whenGraphicAttributes as G,getCachedAttributeValue as M}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as R}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as H}from"./support/fieldProperties.js";import{PopupSceneLayerView as P}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as q}from"./support/SceneLayerViewRequiredFields.js";import U 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=H();let Y=class extends(R(P(F(W)))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._nodesAddedToStage=new Map,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(){const e=this.layer;this.addResolvingPromise(e.indexInfo),this._attributeOverrides=new T(this.layer,this.view.resourceController?.memoryController),L(e,this.view.spatialReference,this.view.viewingMode),this.fieldsHelper=new q({layerView:this}),this.updatingHandles.add((()=>e.rangeInfos),(e=>this._rangeInfosChanged(e)),d),this.updatingHandles.add((()=>e.renderer),((e,t)=>this._rendererChange(e,t))),this.updatingHandles.add((()=>[this.parsedDefinitionExpression,this._excludeObjectIdsSorted]),(()=>this._filterChange())),this.updatingHandles.add((()=>this.view.floors),(()=>this.processor.notifyFilterChanged())),this.handles.add(l((()=>U.I3S_TREE_SHOW_TILES),(e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then((({I3STreeDebugger:t})=>{!this._treeDebugger&&U.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))}))}else e||!this._treeDebugger||U.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)}),d)),this._set("processor",new O({owner:this,preferredUpdatePolicy:z.ASYNC,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,dataExtent:e.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",(e=>this._invalidateElevation(e))),this.supportsHeightUnitConversion&&(this._verticalScale=v("point",e.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.setup()),this._memCache=this.view.resourceController.memoryController.newCache(e.uid),this._controller=new S({layerView:this,scaleVisibilityEnabled:!1}),V(this.layer.geometryDefinitions)&&(this._worker=new C((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 A({layerView:this,priority:K.FEATURE_QUERY_ENGINE}),this.updatingHandles.add((()=>this.maximumNumberOfFeatures),(e=>this._controller.featureTarget=e),d),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(){return this.fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return 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?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds;return e.length?e.toArray().sort(((e,t)=>e-t)):null}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.point.lodFactor}get hasM(){return!1}get hasZ(){return!0}async whenGraphicAttributes(e,t){return G(this.layer,e,this._getObjectIdField(),t,(()=>[...this._nodesAddedToStage.values()]))}getHit(e){if(!this.loadedGraphics)return null;const t=I(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,{type:"graphic",graphic:t,layer:t.layer}):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(){return!!(this._controller?.updating||this.processor?.updating||this.fieldsHelper?.updating||this.layerFilterUpdating)}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 o(this._worker)&&(this._worker=new C((e=>this.view.resourceController.schedule(e)))),this._worker.invoke(r,t).then((e=>{if(a(e)){return{positionData:e.positions,featureIds:e.featureIds}}throw new Error("Failed to decompress Draco point data")}))}_checkExtent(e,t){e&&!b(e,t)&&(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&s.getLogger(this.declaredClass).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&s.getLogger(this.declaredClass).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++)}async addNode(e,t,r){if(!X(t)&&!$(t))throw new Error;if(this._nodesAddedToStage.has(e.index))return void s.getLogger(this.declaredClass).error("I3S node "+e.id+" already added");const i=a(this.layer.fullExtent)?te(this.layer.fullExtent.clone(),.5):null,o=this._controller.crsVertex,n=[],d={graphics:null,featureIds:null,attributeInfo:t.attributeDataInfo,node:e};if(X(t)?await this._addNodeBinaryPointData(e,d,t,i,n,r):$(t)&&this._addNodeLegacyPointData(e,d,t,i,n),await this._attributeOverrides.apply(d.featureIds,t.attributeDataInfo,r),e.numFeatures=d.graphics.length,this._updateNodeMemory(e),ee(d),n.length>0&&(this._computeObb(e,n,o),this._controller.updateVisibility(e.index)),this._controller.isGeometryVisible(e)){if(a(this._verticalScale))for(const e of d.graphics)this._verticalScale(e.geometry);this._nodesAddedToStage.set(e.index,d),this.loadedGraphics.addMany(d.graphics),this._controller.updateLoadStatus(e.index,!0),this._filterNode(d),this._treeDebugger&&this._treeDebugger.update()}else this._cacheNodeData(d)}_computeObb(e,t,r){const s=this._controller.crsIndex,i=s.isGeographic?this.view.renderSpatialReference:s;m(t,r,0,t,i,0,t.length/3);const o={data:t,size:3};e.serviceObb=k(o),s.isGeographic&&_(e.serviceObb.center,i,e.serviceObb.center,s)}isNodeLoaded(e){return this._nodesAddedToStage.has(e)}isNodeReloading(){return!1}updateNodeState(){}async _addNodeBinaryPointData(e,r,s,i,o,d){const l=await this._extractBinaryPointData(s,d);if(null==l)throw new Error;const h=this._getObjectIdField(),u=this._controller.crsVertex,g=this.view.spatialReference,_=this.processor.graphicsCore,{positionData:y,featureIds:f}=l,b=3,v=y.length/b,x=new Array;for(let I=0;I<v;I++){const r=a(e.serviceObb)?e.serviceObb.center:[0,0,0],s=I*b,d=p(y[s+0],y[s+1],y[s+2]);c(d,d,r),e.serviceObb||o.push(d[0],d[1],d[2]),a(i)&&this._checkExtent(i,d);const l=f[I],v={};null!=l&&(v[h]=l);const S=l??t.generateUID();m(d,u,0,se,g,0,1);const w=E(se[0],se[1],se[2],g),D=this.loadedGraphics.get(S);if(a(D))D.level<e.level&&(ie.property="geometry",ie.graphic=D,ie.oldValue=n(D.geometry),ie.newValue=w,D.geometry=w,_.graphicUpdateHandler(ie)),x.push(D);else{const r=t.generateUID();x.push({objectId:S,uid:r,geometry:w,attributes:v,visible:!0,level:e.level})}}r.graphics=x,r.featureIds=Array.from(f)}_addNodeLegacyPointData(e,r,s,i,o){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 s.pointData){const r=p.featureDataPosition,s=r.length,g=p.geometries&&p.geometries[0]||re[s],_=p.featureIds[0];if("points"!==g.params.type)continue;a(i)&&this._checkExtent(i,r);const y={};null!=_&&(y[n]=_);const f=_??t.generateUID();let b;"Embedded"===g.type&&(b=g.params.vertexAttributes.position);for(let i=0;i<b.length;i+=s){for(let e=0;e<s;e++)h[e]=r[e]+b[i+e];const n=3===s;e.serviceObb||o.push(h[0],h[1],n?h[2]:0),m(h,d,0,se,l,0,1);const u=E(se[0],se[1],n?se[2]:void 0,l),p=this.loadedGraphics.get(f);a(p)?c.push(p):c.push({objectId:f,uid:t.generateUID(),geometry:u,attributes:y,visible:!0})}u.push(_)}r.graphics=c,r.featureIds=u}_updateNodeMemory(e){e.memory=4096+(a(e.numFeatures)?e.numFeatures*this.processor.graphicsCore.usedMemoryPerGraphic:0)}_cacheNodeData(e){const t=e.graphics.reduce(((e,t)=>x(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,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)})),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._controller.updateLoadStatus(e,!1),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){this._nodesAddedToStage.has(e.index)?s.getLogger(this.declaredClass).error("I3S node "+e.id+" already added"):(this.loadedGraphics.addMany(t.graphics),this._nodesAddedToStage.set(e.index,t),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),await this.updateAttributes(e.index,r,i),this._filterNode(t),this._treeDebugger&&this._treeDebugger.update())}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&&a(t.attributeInfo))return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this._nodesAddedToStage.get(e);if(t&&a(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 s=this._nodesAddedToStage.get(e);s&&(await this._attributeOverrides.apply(s.featureIds,t,r),s.attributeInfo=t,this._attributeValuesChanged(s))}_attributeValuesChanged(e){if(ee(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,s=new Set;let i,o;e?(await e.collectRequiredFields(s,r),i=Array.from(s).sort()):i=[],s.clear(),t?(await t.collectRequiredFields(s,r),o=Array.from(s).sort()):o=[],i.length===o.length&&i.every(((e,t)=>i[t]===o[t]))||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&s.getLogger(this.declaredClass).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,s=this._excludeObjectIdsSorted,i=this._getObjectIdField();for(const a of e.graphics){const e=a.visible,n=!t||this._evaluateClause(t,a),d=o(s)||r(s,a.attributes[i])<0;a.visible=n&&d,e!==a.visible&&(ie.graphic=a,ie.property="visible",ie.oldValue=e,ie.newValue=a.visible,this.processor.graphicsCore.graphicUpdateHandler(ie))}}_invalidateElevation(e){const t=this._controller.crsIndex;y(e.extent,e.spatialReference,oe,t),this._controller.updateElevationChanged(oe,t)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return a(this.filter)?this.filter.createQuery(e):new D(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(o(e)?this.createQuery():D.from(e))}getUsedMemory(){return this.processor?.graphicsCore?.usedMemory??0}getUnloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??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,s)=>{this._setAttributeData(t,r);const i=this._nodesAddedToStage.get(t);if(a(s)){const t=this.loadedGraphics.get(s.attributes[e]);a(t)&&this.processor.graphicsCore.recreateGraphics([t])}else a(i)&&this.processor.graphicsCore.recreateGraphics(i.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,loadedGraphics:this.loadedGraphics}}};e([h()],Y.prototype,"processor",void 0),e([h({type:w})],Y.prototype,"filter",void 0),e([h()],Y.prototype,"loadedGraphics",void 0),e([h({aliasOf:"layer"})],Y.prototype,"i3slayer",void 0),e([h()],Y.prototype,"_controller",void 0),e([h()],Y.prototype,"updating",void 0),e([h()],Y.prototype,"suspended",void 0),e([h()],Y.prototype,"holeFilling",void 0),e([h(B)],Y.prototype,"updatingProgress",void 0),e([h({aliasOf:"_controller.updatingProgress"})],Y.prototype,"updatingProgressValue",void 0),e([h(Z.requiredFields)],Y.prototype,"requiredFields",null),e([h(Z.availableFields)],Y.prototype,"availableFields",void 0),e([h()],Y.prototype,"fieldsHelper",void 0),e([h({type:Number})],Y.prototype,"maximumNumberOfFeatures",null),e([h({readOnly:!0})],Y.prototype,"maximumNumberOfFeaturesExceeded",null),e([h()],Y.prototype,"_excludeObjectIdsSorted",null),e([h({readOnly:!0})],Y.prototype,"lodFactor",null),e([h({readOnly:!0})],Y.prototype,"hasM",null),e([h({readOnly:!0})],Y.prototype,"hasZ",null),Y=e([u("esri.views.3d.layers.SceneLayerGraphicsView3D")],Y);const J=Y;function $(e){return"pointData"in e}function X(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function ee(e){const t=e.attributeInfo;for(let r=0;r<e.graphics.length;r++){const s=e.graphics[r];if(s.attributes||(s.attributes={}),a(t)&&a(t.loadedAttributes))for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=M(t.attributeData[e],r))}}function te(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 re={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},se=g(),ie={graphic:null,property:null,oldValue:null,newValue:null},oe=f();export{J as default};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import{binaryIndexOf as r}from"../../../core/arrayUtils.js";import s from"../../../core/Logger.js";import{destroyMaybe as i,isNone as o,isSome as a,unwrap as n}from"../../../core/maybe.js";import{initial as d,watch as l}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{a as c}from"../../../chunks/vec3.js";import{f as p,c as g}from"../../../chunks/vec3f64.js";import{projectBuffer as m,projectVectorToVector as _,projectBoundingRect as y}from"../../../geometry/projection.js";import{create as f}from"../../../geometry/support/aaBoundingRect.js";import{extentContainsCoords3D as b}from"../../../geometry/support/contains.js";import{getGeometryZScaler as v}from"../../../geometry/support/zscale.js";import{makeDehydratedPoint as E,estimateSize as x}from"../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as I}from"../../../layers/graphics/hydratedFeatures.js";import S from"../../../layers/graphics/controllers/I3SOnDemandController.js";import w from"../../../layers/support/FeatureFilter.js";import D from"../../../rest/support/Query.js";import{I3SPointsWorkerHandle as C}from"./I3SPointsWorkerHandle.js";import{LayerView3D as O}from"./LayerView3D.js";import F from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as A}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 L,containsDraco as V,whenGraphicAttributes as G,getCachedAttributeValue as M}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as R}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as P}from"./support/fieldProperties.js";import{PopupSceneLayerView as H}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as q}from"./support/SceneLayerViewRequiredFields.js";import U 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=P();let Y=class extends(R(H(O(W)))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._nodesAddedToStage=new Map,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(){const e=this.layer;this.addResolvingPromise(e.indexInfo),this._attributeOverrides=new T(this.layer,this.view.resourceController?.memoryController),L(e,this.view.spatialReference,this.view.viewingMode),this.fieldsHelper=new q({layerView:this}),this.updatingHandles.add((()=>e.rangeInfos),(e=>this._rangeInfosChanged(e)),d),this.updatingHandles.add((()=>e.renderer),((e,t)=>this._rendererChange(e,t))),this.updatingHandles.add((()=>[this.parsedDefinitionExpression,this._excludeObjectIdsSorted]),(()=>this._filterChange())),this.handles.add(l((()=>U.I3S_TREE_SHOW_TILES),(e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then((({I3STreeDebugger:t})=>{!this._treeDebugger&&U.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))}))}else e||!this._treeDebugger||U.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)}),d)),this._set("processor",new F({owner:this,preferredUpdatePolicy:z.ASYNC,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,dataExtent:e.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",(e=>this._invalidateElevation(e))),this.supportsHeightUnitConversion&&(this._verticalScale=v("point",e.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.initializePromise),this._memCache=this.view.resourceController.memoryController.newCache(e.uid),this._controller=new S({layerView:this,scaleVisibilityEnabled:!1}),V(this.layer.geometryDefinitions)&&(this._worker=new C((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 A({layerView:this,priority:K.FEATURE_QUERY_ENGINE}),this.updatingHandles.add((()=>this.maximumNumberOfFeatures),(e=>this._controller.featureTarget=e),d),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(){return this.fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return 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?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds;return e.length?e.toArray().sort(((e,t)=>e-t)):null}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.point.lodFactor}get hasM(){return!1}get hasZ(){return!0}async whenGraphicAttributes(e,t){return G(this.layer,e,this._getObjectIdField(),t,(()=>[...this._nodesAddedToStage.values()]))}getHit(e){if(!this.loadedGraphics)return null;const t=I(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,{type:"graphic",graphic:t,layer:t.layer}):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(){return!!(this._controller?.updating||this.processor?.updating||this.fieldsHelper?.updating||this.layerFilterUpdating)}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 o(this._worker)&&(this._worker=new C((e=>this.view.resourceController.schedule(e)))),this._worker.invoke(r,t).then((e=>{if(a(e)){return{positionData:e.positions,featureIds:e.featureIds}}throw new Error("Failed to decompress Draco point data")}))}_checkExtent(e,t){e&&!b(e,t)&&(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&s.getLogger(this.declaredClass).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&s.getLogger(this.declaredClass).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++)}async addNode(e,t,r){if(!X(t)&&!$(t))throw new Error;if(this._nodesAddedToStage.has(e.index))return void s.getLogger(this.declaredClass).error("I3S node "+e.id+" already added");const i=a(this.layer.fullExtent)?te(this.layer.fullExtent.clone(),.5):null,o=this._controller.crsVertex,n=[],d={graphics:null,featureIds:null,attributeInfo:t.attributeDataInfo,node:e};if(X(t)?await this._addNodeBinaryPointData(e,d,t,i,n,r):$(t)&&this._addNodeLegacyPointData(e,d,t,i,n),await this._attributeOverrides.apply(d.featureIds,t.attributeDataInfo,r),e.numFeatures=d.graphics.length,this._updateNodeMemory(e),ee(d),n.length>0&&(this._computeObb(e,n,o),this._controller.updateVisibility(e.index)),this._controller.isGeometryVisible(e)){if(a(this._verticalScale))for(const e of d.graphics)this._verticalScale(e.geometry);this._nodesAddedToStage.set(e.index,d),this.loadedGraphics.addMany(d.graphics),this._controller.updateLoadStatus(e.index,!0),this._filterNode(d),this._treeDebugger&&this._treeDebugger.update()}else this._cacheNodeData(d)}_computeObb(e,t,r){const s=this._controller.crsIndex,i=s.isGeographic?this.view.renderSpatialReference:s;m(t,r,0,t,i,0,t.length/3);const o={data:t,size:3};e.serviceObb=k(o),s.isGeographic&&_(e.serviceObb.center,i,e.serviceObb.center,s)}isNodeLoaded(e){return this._nodesAddedToStage.has(e)}isNodeReloading(){return!1}updateNodeState(){}async _addNodeBinaryPointData(e,r,s,i,o,d){const l=await this._extractBinaryPointData(s,d);if(null==l)throw new Error;const h=this._getObjectIdField(),u=this._controller.crsVertex,g=this.view.spatialReference,_=this.processor.graphicsCore,{positionData:y,featureIds:f}=l,b=3,v=y.length/b,x=new Array;for(let I=0;I<v;I++){const r=a(e.serviceObb)?e.serviceObb.center:[0,0,0],s=I*b,d=p(y[s+0],y[s+1],y[s+2]);c(d,d,r),e.serviceObb||o.push(d[0],d[1],d[2]),a(i)&&this._checkExtent(i,d);const l=f[I],v={};null!=l&&(v[h]=l);const S=l??t.generateUID();m(d,u,0,se,g,0,1);const w=E(se[0],se[1],se[2],g),D=this.loadedGraphics.get(S);if(a(D))D.level<e.level&&(ie.property="geometry",ie.graphic=D,ie.oldValue=n(D.geometry),ie.newValue=w,D.geometry=w,_.graphicUpdateHandler(ie)),x.push(D);else{const r=t.generateUID();x.push({objectId:S,uid:r,geometry:w,attributes:v,visible:!0,level:e.level})}}r.graphics=x,r.featureIds=Array.from(f)}_addNodeLegacyPointData(e,r,s,i,o){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 s.pointData){const r=p.featureDataPosition,s=r.length,g=p.geometries&&p.geometries[0]||re[s],_=p.featureIds[0];if("points"!==g.params.type)continue;a(i)&&this._checkExtent(i,r);const y={};null!=_&&(y[n]=_);const f=_??t.generateUID();let b;"Embedded"===g.type&&(b=g.params.vertexAttributes.position);for(let i=0;i<b.length;i+=s){for(let e=0;e<s;e++)h[e]=r[e]+b[i+e];const n=3===s;e.serviceObb||o.push(h[0],h[1],n?h[2]:0),m(h,d,0,se,l,0,1);const u=E(se[0],se[1],n?se[2]:void 0,l),p=this.loadedGraphics.get(f);a(p)?c.push(p):c.push({objectId:f,uid:t.generateUID(),geometry:u,attributes:y,visible:!0})}u.push(_)}r.graphics=c,r.featureIds=u}_updateNodeMemory(e){e.memory=4096+(a(e.numFeatures)?e.numFeatures*this.processor.graphicsCore.usedMemoryPerGraphic:0)}_cacheNodeData(e){const t=e.graphics.reduce(((e,t)=>x(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,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)})),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._controller.updateLoadStatus(e,!1),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){this._nodesAddedToStage.has(e.index)?s.getLogger(this.declaredClass).error("I3S node "+e.id+" already added"):(this.loadedGraphics.addMany(t.graphics),this._nodesAddedToStage.set(e.index,t),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),await this.updateAttributes(e.index,r,i),this._filterNode(t),this._treeDebugger&&this._treeDebugger.update())}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&&a(t.attributeInfo))return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this._nodesAddedToStage.get(e);if(t&&a(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 s=this._nodesAddedToStage.get(e);s&&(await this._attributeOverrides.apply(s.featureIds,t,r),s.attributeInfo=t,this._attributeValuesChanged(s))}_attributeValuesChanged(e){if(ee(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,s=new Set;let i,o;e?(await e.collectRequiredFields(s,r),i=Array.from(s).sort()):i=[],s.clear(),t?(await t.collectRequiredFields(s,r),o=Array.from(s).sort()):o=[],i.length===o.length&&i.every(((e,t)=>i[t]===o[t]))||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&s.getLogger(this.declaredClass).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,s=this._excludeObjectIdsSorted,i=this._getObjectIdField();for(const a of e.graphics){const e=a.visible,n=!t||this._evaluateClause(t,a),d=o(s)||r(s,a.attributes[i])<0;a.visible=n&&d,e!==a.visible&&(ie.graphic=a,ie.property="visible",ie.oldValue=e,ie.newValue=a.visible,this.processor.graphicsCore.graphicUpdateHandler(ie))}}_invalidateElevation(e){const t=this._controller.crsIndex;y(e.extent,e.spatialReference,oe,t),this._controller.updateElevationChanged(oe,t)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return a(this.filter)?this.filter.createQuery(e):new D(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(o(e)?this.createQuery():D.from(e))}getUsedMemory(){return this.processor?.graphicsCore?.usedMemory??0}getUnloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??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,s)=>{this._setAttributeData(t,r);const i=this._nodesAddedToStage.get(t);if(a(s)){const t=this.loadedGraphics.get(s.attributes[e]);a(t)&&this.processor.graphicsCore.recreateGraphics([t])}else a(i)&&this.processor.graphicsCore.recreateGraphics(i.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,loadedGraphics:this.loadedGraphics}}};e([h()],Y.prototype,"processor",void 0),e([h({type:w})],Y.prototype,"filter",void 0),e([h()],Y.prototype,"loadedGraphics",void 0),e([h({aliasOf:"layer"})],Y.prototype,"i3slayer",void 0),e([h()],Y.prototype,"_controller",void 0),e([h()],Y.prototype,"updating",void 0),e([h()],Y.prototype,"suspended",void 0),e([h()],Y.prototype,"holeFilling",void 0),e([h(B)],Y.prototype,"updatingProgress",void 0),e([h({aliasOf:"_controller.updatingProgress"})],Y.prototype,"updatingProgressValue",void 0),e([h(Z.requiredFields)],Y.prototype,"requiredFields",null),e([h(Z.availableFields)],Y.prototype,"availableFields",void 0),e([h()],Y.prototype,"fieldsHelper",void 0),e([h({type:Number})],Y.prototype,"maximumNumberOfFeatures",null),e([h({readOnly:!0})],Y.prototype,"maximumNumberOfFeaturesExceeded",null),e([h()],Y.prototype,"_excludeObjectIdsSorted",null),e([h({readOnly:!0})],Y.prototype,"lodFactor",null),e([h({readOnly:!0})],Y.prototype,"hasM",null),e([h({readOnly:!0})],Y.prototype,"hasZ",null),Y=e([u("esri.views.3d.layers.SceneLayerGraphicsView3D")],Y);const J=Y;function $(e){return"pointData"in e}function X(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function ee(e){const t=e.attributeInfo;for(let r=0;r<e.graphics.length;r++){const s=e.graphics[r];if(s.attributes||(s.attributes={}),a(t)&&a(t.loadedAttributes))for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=M(t.attributeData[e],r))}}function te(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 re={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},se=g(),ie={graphic:null,property:null,oldValue:null,newValue:null},oe=f();export{J as default};
|