@arcgis/core 5.0.0-next.35 → 5.0.0-next.37
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/WebLinkChart.js +1 -1
- package/analysis/ShadowCast/types.d.ts +2 -0
- package/applications/Components/analysisUtils.d.ts +1 -0
- package/applications/Components/analysisUtils.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/actions/AttributeFilter.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
- package/arcade/featureset/sources/FeatureLayerOGC.js +1 -1
- package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/FeatureSetIterator.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/014dbe6fa93a277b08f7.js +1 -0
- package/assets/esri/core/workers/chunks/06462b267ff8d5984882.js +1 -0
- package/assets/esri/core/workers/chunks/{b48bb38e5d60fc7a9097.js → 08ef90e3fcfd4eda4301.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa01d1813fa78034526e.js → 0a5427127634738aa239.js} +1 -1
- package/assets/esri/core/workers/chunks/0a58b57e1777a8b0ea23.js +1 -0
- package/assets/esri/core/workers/chunks/{7115c52e22b7becff8de.js → 103153951ba312dc5e9e.js} +1 -1
- package/assets/esri/core/workers/chunks/{c7c721de93bc8688e13c.js → 1d4ea8db272655c0608c.js} +1 -1
- package/assets/esri/core/workers/chunks/1d566539ff6fb6ac798c.js +1 -0
- package/assets/esri/core/workers/chunks/1de216d9850c39c1735d.js +1 -0
- package/assets/esri/core/workers/chunks/20e4243ea563d05a5256.js +1 -0
- package/assets/esri/core/workers/chunks/262232437d37a7460b11.js +1 -0
- package/assets/esri/core/workers/chunks/{fafbacf2467e6883b6c9.js → 28db329528def851efd7.js} +1 -1
- package/assets/esri/core/workers/chunks/{2367bd1cb34799a3f08a.js → 30184e39129d9c66ea54.js} +1 -1
- package/assets/esri/core/workers/chunks/{f55328aabf84770c8e6a.js → 328106e181e5957ceaa5.js} +1 -1
- package/assets/esri/core/workers/chunks/48e2737182c75005fb8f.js +1 -0
- package/assets/esri/core/workers/chunks/{d3db7244fac7398cc700.js → 4b6a44c6265c8959abd8.js} +1 -1
- package/assets/esri/core/workers/chunks/{a372d9af43ade7c6314c.js → 52c8687b473c9953c2f2.js} +1 -1
- package/assets/esri/core/workers/chunks/{63933cbcb5c12df09715.js → 59ce992d3a5e7c32b9fb.js} +1 -1
- package/assets/esri/core/workers/chunks/{c9c2e00fed979c21e2f0.js → 5e30acfda04f7fc2b676.js} +1 -1
- package/assets/esri/core/workers/chunks/6330d8767ba1d5329daa.js +1 -0
- package/assets/esri/core/workers/chunks/640085b5ade5c7f16228.js +1 -0
- package/assets/esri/core/workers/chunks/690a40d2eef52bfc149f.js +1 -0
- package/assets/esri/core/workers/chunks/727804cf901094b1d620.js +1 -0
- package/assets/esri/core/workers/chunks/{dd34d56caafa38d4b8e4.js → 7aa730e5ac7b268e3c98.js} +1 -1
- package/assets/esri/core/workers/chunks/8c271e9272e4eaf1325a.js +1 -0
- package/assets/esri/core/workers/chunks/{2a0fe1aede5c68374ccf.js → 8ec238b5b59ef18a1713.js} +1 -1
- package/assets/esri/core/workers/chunks/{f1dfb1323d50247e80f9.js → 9110287f272141f60c35.js} +1 -1
- package/assets/esri/core/workers/chunks/951a3442d4342539f2ea.js +1 -0
- package/assets/esri/core/workers/chunks/9664d9e679abc41f6c42.js +1 -0
- package/assets/esri/core/workers/chunks/{2921f05a40fda12f9f81.js → a00bba1c7cbf8cd7892c.js} +1 -1
- package/assets/esri/core/workers/chunks/a716b8fdeda4e16f03ab.js +1 -0
- package/assets/esri/core/workers/chunks/aead7c9830fa310e5b53.js +1 -0
- package/assets/esri/core/workers/chunks/{1fa55d4c4b092a98bdd7.js → b56c07c0b43cb1999070.js} +1 -1
- package/assets/esri/core/workers/chunks/b59be95949445ff5afab.js +1 -0
- package/assets/esri/core/workers/chunks/b6dec5dfdeca54bae88d.js +1 -0
- package/assets/esri/core/workers/chunks/{6afd59412bfc134bdf75.js → c052fb8c952cda0b5d13.js} +1 -1
- package/assets/esri/core/workers/chunks/c5967133f3ba34a883f8.js +1 -0
- package/assets/esri/core/workers/chunks/{4356274cfa477eb6d749.js → cda5c95fd49b8901f7d4.js} +1 -1
- package/assets/esri/core/workers/chunks/{82cc758bddd9f8397b9f.js → ce8fc1ca229d53a4b68d.js} +8 -8
- package/assets/esri/core/workers/chunks/{f2ebd6471e1259a6eac0.js → ce99abfdcd71ff9e4e36.js} +1 -1
- package/assets/esri/core/workers/chunks/{726a797f5df7eeee0b3d.js → d786b17cc9062b1450ac.js} +1 -1
- package/assets/esri/core/workers/chunks/dd105d6e0fcedee32644.js +1 -0
- package/assets/esri/core/workers/chunks/{2e76fbd3c874300fc4a7.js → de3da4d31a7529761565.js} +1 -1
- package/assets/esri/core/workers/chunks/e1148067ceae7d9eaaf8.js +1 -0
- package/assets/esri/core/workers/chunks/{b536fdb655ad293d9024.js → e501d68a1464805c4b4e.js} +1 -1
- package/assets/esri/core/workers/chunks/{33431e8131f6017de2f9.js → e7f4d135ef9665de1468.js} +1 -1
- package/assets/esri/core/workers/chunks/{97650ee3d0eecb69ccbb.js → e9bc3c6482ba778c9349.js} +39 -39
- package/assets/esri/core/workers/chunks/{7804be2f5b3d86188a24.js → edc3d98f33d7bf959154.js} +1 -1
- package/assets/esri/core/workers/chunks/{0446562aee0639c61485.js → ee67c8a7c1f8b482cd99.js} +1 -1
- package/assets/esri/core/workers/chunks/eefad79be500667af96e.js +1 -0
- package/assets/esri/core/workers/chunks/{2b7f9a57a2cfbc108673.js → f1b99529e2055873b65a.js} +1 -1
- package/assets/esri/core/workers/chunks/{abb05a903440d97a6a74.js → f441fc74451330384fb0.js} +1 -1
- package/assets/esri/core/workers/chunks/f609b256df9eb3803464.js +1 -0
- package/assets/esri/core/workers/chunks/f693a4d97b2762d0e6ff.js +1 -0
- package/assets/esri/core/workers/chunks/f8caceeaa14d99c35526.js +1 -0
- package/assets/esri/core/workers/chunks/f97a7cb367634353177d.js +1 -0
- package/assets/esri/core/workers/chunks/febce0d80f019dc2a427.js +1 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Attribution.scss +1 -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/CloudsComposition.glsl.js +1 -1
- package/chunks/ComponentShader.glsl.js +2 -2
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/chunks/Laserlines.glsl.js +1 -1
- package/chunks/Magnifier.glsl.js +1 -1
- package/chunks/Path.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +34 -36
- package/chunks/WaterSurface.glsl.js +1 -1
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/chunks/boundedPlane.js +1 -1
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/vec32.js +1 -1
- package/chunks/vec42.js +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/core/iteratorUtils.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/buffer/internals/Vec4.js +1 -1
- package/geometry/support/lineSegment.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +143 -5
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/orientedImagery/transformations/worldToImage.js +1 -1
- package/layers/support/csvUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/voxel/VoxelVolume.js +1 -1
- package/package.json +5 -5
- package/rest/knowledgeGraph/DataModel.js +1 -1
- package/rest/knowledgeGraph/GraphDataModelSingletonOperationResult.d.ts +4 -0
- package/rest/knowledgeGraph/GraphDataModelSingletonOperationResult.js +5 -0
- package/rest/knowledgeGraph/GraphProperty.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
- package/rest/knowledgeGraphService.d.ts +3 -0
- package/rest/knowledgeGraphService.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
- package/views/2d/interactive/SegmentLabels2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/animation/pointToPoint/Camera.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/CloudsParameters.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/MarsAtmosphere.js +1 -1
- package/views/3d/interactive/SegmentLabels3D.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImagerySubView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/Frustum.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/FovController.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/support/intersectionUtils.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/Overlay.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/ScaleRangeQueries.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TextureFader.js +1 -1
- package/views/3d/terrain/TextureReference.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.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/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +4 -7
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +19 -15
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +14 -14
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +16 -37
- package/views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js +2 -2
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Normals.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.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/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
- package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
- package/views/3d/webgl-engine/lib/triangleIntersectionUtils.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/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/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +9 -10
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.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/ensureColor4.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +5 -5
- package/views/GroundView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileVisualizationUtils.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
- package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/views/layers/LayerView.js +1 -1
- package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
- package/views/support/GroundElevationSampler.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/euclideanAreaMeasurementUtils.js +1 -1
- package/views/support/euclideanLengthMeasurementUtils.js +1 -1
- package/views/support/geodesicLengthMeasurementUtils.js +1 -1
- package/views/support/geometry3dUtils.js +1 -1
- package/webmap/utils.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/assets/esri/core/workers/chunks/032444974011118127d7.js +0 -1
- package/assets/esri/core/workers/chunks/05e55118dc0023d500fc.js +0 -1
- package/assets/esri/core/workers/chunks/089221bac1f019692f48.js +0 -1
- package/assets/esri/core/workers/chunks/11687718c8635eb7bf37.js +0 -1
- package/assets/esri/core/workers/chunks/15c1a48e8cd2a8882d85.js +0 -1
- package/assets/esri/core/workers/chunks/1b9e7d416c9f00e020bb.js +0 -1
- package/assets/esri/core/workers/chunks/1bfe0b2bf38d4dee7fd6.js +0 -1
- package/assets/esri/core/workers/chunks/27bd88e1101873d4ce12.js +0 -1
- package/assets/esri/core/workers/chunks/483dc4ee5d73cdfe6229.js +0 -1
- package/assets/esri/core/workers/chunks/53d95ba86d010231fc4e.js +0 -1
- package/assets/esri/core/workers/chunks/7d3e665613927904ba4f.js +0 -1
- package/assets/esri/core/workers/chunks/a5f2da24497349239648.js +0 -1
- package/assets/esri/core/workers/chunks/a7b1b42bdb9cb9ecac45.js +0 -1
- package/assets/esri/core/workers/chunks/acaaefd4997316d319b8.js +0 -1
- package/assets/esri/core/workers/chunks/ad138b989c2c7a1168ac.js +0 -1
- package/assets/esri/core/workers/chunks/cc7c37f9ed3f831fd25c.js +0 -1
- package/assets/esri/core/workers/chunks/d14bd320f72d8e8a0ad8.js +0 -1
- package/assets/esri/core/workers/chunks/d86e59da76eea888ba86.js +0 -1
- package/assets/esri/core/workers/chunks/d8975dd7b85b5d065ee4.js +0 -1
- package/assets/esri/core/workers/chunks/de99c4fd1582a8e610cf.js +0 -1
- package/assets/esri/core/workers/chunks/ded3ef385d5a3a2ec8ca.js +0 -1
- package/assets/esri/core/workers/chunks/e3a994587f9b2e88db85.js +0 -1
- package/assets/esri/core/workers/chunks/eab0938d4ad7d7cc7309.js +0 -1
- package/assets/esri/core/workers/chunks/ed1dabed10ff9f4e0369.js +0 -1
- package/assets/esri/core/workers/chunks/ef5b13ee3362763c1096.js +0 -1
- package/assets/esri/core/workers/chunks/effbc4d240752e8ba0ab.js +0 -1
- package/assets/esri/core/workers/chunks/f403d8e414766fab2936.js +0 -1
- package/assets/esri/core/workers/chunks/f43e1e1a1b2eb737e00c.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clamp as t}from"../../core/mathUtils.js";import{ObjectStack as r}from"../../core/ObjectStack.js";import{d as n,e as o,g as e,
|
|
5
|
+
import{clamp as t}from"../../core/mathUtils.js";import{ObjectStack as r}from"../../core/ObjectStack.js";import{d as n,e as o,g as e,E as i,j as c,i as s,s as u}from"../../chunks/vec32.js";import{create as a,clone as g}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{sv3d as f}from"./vectorStacks.js";function v(t){return t?{origin:g(t.origin),vector:g(t.vector)}:{origin:a(),vector:a()}}function m(t,r){const n=S.get();return n.origin=t,n.vector=r,n}function p(t,r=v()){return b(t.origin,t.vector,r)}function b(t,r,o=v()){return n(o.origin,t),n(o.vector,r),o}function h(t,r,e=v()){return n(e.origin,t),o(e.vector,r,t),e}function j(r,n){const i=o(f.get(),n,r.origin),s=e(r.vector,i),u=e(r.vector,r.vector),a=t(s/u,0,1),g=o(f.get(),c(f.get(),r.vector,a),i);return e(g,g)}function M(t,r,n){return A(t,r,0,1,n)}function l(t,r,n){return s(n,t.origin,c(n,t.vector,r))}function A(r,n,u,a,g){const{vector:v,origin:m}=r,p=o(f.get(),n,m),b=e(v,p)/i(v);return c(g,v,t(b,u,a)),s(g,g,r.origin)}function d(t,r){if(k(t,m(r.origin,r.direction),!1,x)){const{tA:r,pB:n,distance2:o}=x;if(r>=0&&r<=1)return o;if(r<0)return u(t.origin,n);if(r>1)return u(s(f.get(),t.origin,t.vector),n)}return null}function B(t,r,o){return!!k(t,r,!0,x)&&(n(o,x.pA),!0)}function k(r,n,o,e){const i=1e-6,c=r.origin,a=s(f.get(),c,r.vector),g=n.origin,v=s(f.get(),g,n.vector),m=f.get(),p=f.get();if(m[0]=c[0]-g[0],m[1]=c[1]-g[1],m[2]=c[2]-g[2],p[0]=v[0]-g[0],p[1]=v[1]-g[1],p[2]=v[2]-g[2],Math.abs(p[0])<i&&Math.abs(p[1])<i&&Math.abs(p[2])<i)return!1;const b=f.get();if(b[0]=a[0]-c[0],b[1]=a[1]-c[1],b[2]=a[2]-c[2],Math.abs(b[0])<i&&Math.abs(b[1])<i&&Math.abs(b[2])<i)return!1;const h=m[0]*p[0]+m[1]*p[1]+m[2]*p[2],j=p[0]*b[0]+p[1]*b[1]+p[2]*b[2],M=m[0]*b[0]+m[1]*b[1]+m[2]*b[2],l=p[0]*p[0]+p[1]*p[1]+p[2]*p[2],A=(b[0]*b[0]+b[1]*b[1]+b[2]*b[2])*l-j*j;if(Math.abs(A)<i)return!1;let d=(h*j-M*l)/A,B=(h+j*d)/l;o&&(d=t(d,0,1),B=t(B,0,1));const k=f.get(),x=f.get();return k[0]=c[0]+d*b[0],k[1]=c[1]+d*b[1],k[2]=c[2]+d*b[2],x[0]=g[0]+B*p[0],x[1]=g[1]+B*p[1],x[2]=g[2]+B*p[2],e.tA=d,e.tB=B,e.pA=k,e.pB=x,e.distance2=u(k,x),!0}const x={tA:0,tB:0,pA:a(),pB:a(),distance2:0},S=new r(()=>v());export{B as closestLineSegmentPoint,d as closestRayDistance2,p as copy,v as create,j as distance2,h as fromPoints,b as fromValues,l as pointAt,M as projectPoint,A as projectPointClamp,m as wrap};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Logger.js";import{
|
|
5
|
+
import e from"../../../core/Logger.js";import{F as t,i as r,j as o}from"../../../chunks/vec32.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import s from"../MeshComponent.js";import{MeshVertexAttributes as i}from"../MeshVertexAttributes.js";import{addMeshMaterialCloneContext as l,addMeshTextureCloneContext as a,getMeshMaterialCloneContext as c}from"./meshCloneUtils.js";import{convertVertexSpace as u}from"./vertexSpaceConversion.js";const f=()=>e.getLogger("esri.geometry.support.triangleMeshMerge");function p(e,t){if(0===e.length)return f().error("merge()","Must specify one more geometries to merge"),null;const r=e[0].spatialReference;for(const l of e){if(!l.spatialReference.equals(r))return f().error("merge()","Geometries must all be in the same spatial reference"),null;if(!l.loaded)return f().error("merge()","Geometries must all be loaded before merging"),null}const o=m(e);if(null==o)return null;const n=w(e),s=[],i={position:0,uv:0,normal:0,tangent:0,color:0},p=l(a()),g=c(p);for(const l of e){const e=o.rebake?u(l,o.vertexSpace,{allowBufferReuse:!0}):l.vertexAttributes;if(!e)return f().error("merge()","Failed to convert vertex space due to projection errors"),null;if(t&&t.reuseMaterials&&l.components)for(const t of l.components)t.material&&g?.materialMap?.set(t.material,t.material);h(l,i,p,s),x("position",e,n,i,0),x("normal",e,n,i,0),x("tangent",e,n,i,0),x("uv",l.vertexAttributes,n,i,0),x("color",l.vertexAttributes,n,i,255)}return{vertexAttributes:n,components:s,vertexSpace:o.vertexSpace,transform:o.rebake?null:o.transform,spatialReference:r}}function m(e){let s=null,i=null,l=!0,a=!0,c=null;const u=n();let p=0;for(const o of e){const{vertexSpace:e,transform:n}=o;if(null==i){i=e;const t=i.origin;t&&(c=t)}if(i.type!==e.type)return f().error("merge()",`Inconsistent mesh vertex space for provided geometries. One was ${i.type} while another is ${e.type}. Unable to merge geometries.`),null;null==s||null!=n&&n.equals(s)||(l=!1),null!=n&&null==s&&(s=n);const m=e.origin;m&&(c&&!t(m,c)&&(a=!1),p++,r(u,u,m))}if(null==i)throw new Error;const m=i.clone();if(null==m.origin)return{rebake:!1,vertexSpace:m};if(a&&l)return{rebake:!1,vertexSpace:m,transform:s?.clone()};const g=o(u,u,1/p);return m.origin=g,{rebake:!0,vertexSpace:m}}function g(e,t){return t.normal>0&&!e.vertexAttributes.normal}function v(e,t,r){g(e,t)&&"source"===r.shading&&(r.shading="flat")}function h(e,t,r,o){if(e.components)for(const n of e.components){const s=n.clone(r),i=t.position/3;if(s.faces)for(let e=0;e<s.faces.length;e++)s.faces[e]+=i;else{s.faces=new Uint32Array(e.vertexAttributes.position.length/3);for(let e=0;e<s.faces.length;e++)s.faces[e]=e+i}v(e,t,s),o.push(s)}else if(e.vertexAttributes&&e.vertexAttributes.position){const r=e.vertexAttributes.position.length/3,n=new Uint32Array(r),i=t.position/3;for(let e=0;e<r;e++)n[e]=e+i;const l=new s({faces:n});v(e,t,l),o.push(l)}}function x(e,t,r,o,n){if(!t)return;const s=t.position;if(!s)return;const i=t[e],l=r[e];if(null==i){let t=o[e];const r=y[e];if(null!=l){for(let e=0;e<s.length;e+=3)for(let o=0;o<r;o++)l[t++]=n;o[e]=t}}else null!=l&&null!=i&&(b(i,0,l,o[e],i.length),o[e]+=i.length)}function b(e,t,r,o,n){for(let s=0;s<n;s++)r[o++]=e[t++];return r}function A(e){let t=!1,r=!1,o=!1,n=!1;for(const s of e){const e=s.vertexAttributes;if(e?.position&&(e.uv&&(t=!0),e.normal&&(r=!0),e.tangent&&(n=!0),e.color&&(o=!0),r&&t&&o&&n))break}return{normal:r,uv:t,color:o,tangent:n}}function w(e){let t=0,r=0,o=0,n=0,s=0;const l=A(e);for(const i of e){const e=i.vertexAttributes;e?.position&&(t+=e.position.length,l.uv&&(r+=e.position.length/y.position*y.uv),l.normal&&(o+=e.position.length/y.position*y.normal),l.color&&(n+=e.position.length/y.position*y.color),l.tangent&&(s+=e.position.length/y.position*y.tangent))}return new i({position:new Float64Array(t),uv:r?new Float32Array(r):null,normal:o?new Float32Array(o):null,tangent:s?new Float32Array(s):null,color:n?new Uint8Array(n):null})}const y={position:3,normal:3,tangent:4,uv:2,color:4};export{p as merge};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../core/has.js";import"../../core/Logger.js";import{acosClamped as t}from"../../core/mathUtils.js";import{getEpsilon as e}from"../../core/libs/gl-matrix-2/math/common.js";import{fromRotation as r}from"../../core/libs/gl-matrix-2/math/mat4.js";import{d as s,
|
|
5
|
+
import"../../core/has.js";import"../../core/Logger.js";import{acosClamped as t}from"../../core/mathUtils.js";import{getEpsilon as e}from"../../core/libs/gl-matrix-2/math/common.js";import{fromRotation as r}from"../../core/libs/gl-matrix-2/math/mat4.js";import{d as s,F as i,s as n,e as o,j as c,b as a,i as h,f as u,p as l,C as m,l as d,c as g,E as f,n as p,h as M}from"../../chunks/vec32.js";import{fromValues as j,fromArray as y,clone as _,create as x}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as b}from"../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isVec3 as S}from"../../core/libs/gl-matrix-2/types/vec3.js";import{isVec4 as v}from"../../core/libs/gl-matrix-2/types/vec4.js";import{fromPoints as P,closestPoint as A}from"./ray.js";import{cartesianToSpherical as R}from"./sphereUtils.js";import{angle as q}from"./vector.js";import{sv3d as O,sm4d as w}from"./vectorStacks.js";class E{constructor(t=0,e=0,r=0,s=0){this.radius=s,"number"==typeof t?this._center=j(t,e,r):S(t)||v(t)?(this._center=y(t),this.radius=4===t.length?t[3]:e):(this._center=_(t.center),this.radius=t.radius)}get center(){return this._center}set center(t){s(this.center,t)}exactEquals(t){return i(this._center,t.center)&&this.radius===t.radius}copy(t){return t!==this&&(s(this._center,t.center),this.radius=t.radius),this}clone(){return new E(this.center,this.radius)}toVec4(){return b(this.center[0],this.center[1],this.center[2],this.radius)}contains(t){return n(this.center,t)<=this.radius**2}intersectRay(t,e){if(null==t)return!1;if(!this._intersect(t,k))return!1;let{t0:r,t1:s}=k;if((r<0||s<r&&s>0)&&(r=s),r<0)return!1;if(e){const{origin:s,direction:i}=t;e[0]=s[0]+i[0]*r,e[1]=s[1]+i[1]*r,e[2]=s[2]+i[2]*r}return!0}intersectLine(t,r){const s=P(t,r);if(!this._intersect(s,k))return[];const{origin:i,direction:n}=s,{t0:o,t1:c}=k,a=t=>{const e=x();return g(e,i,n,t),this.projectPoint(e,e)};return Math.abs(o-c)<e()?[a(o)]:[a(o),a(c)]}_intersect(t,e){const{origin:r,direction:s}=t,i=L;i[0]=r[0]-this.center[0],i[1]=r[1]-this.center[1],i[2]=r[2]-this.center[2];const n=s[0]*s[0]+s[1]*s[1]+s[2]*s[2];if(0===n)return!1;const o=2*(s[0]*i[0]+s[1]*i[1]+s[2]*i[2]),c=o*o-4*n*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-this.radius**2);if(c<0)return!1;const a=Math.sqrt(c);return e.t0=(-o-a)/(2*n),e.t1=(-o+a)/(2*n),!0}projectPoint(t,e){const r=o(O.get(),t,this.center),s=c(O.get(),r,this.radius/a(r));return h(e,s,this.center)}closestPointOnSilhouette(t,e){const s=O.get(),i=w.get();u(s,t.origin,t.direction),u(e,s,t.origin),c(e,e,1/a(e)*this.radius);const n=this._angleToSilhouette(t.origin),o=q(t.origin,e);return r(i,o+n,s),l(e,e,i),e}frustumCoverage(t,e,r){const s=this.radius,i=s*s,n=t+.5*Math.PI,o=e*e+i-2*Math.cos(n)*e*s,c=Math.sqrt(o),a=o-i;if(a<=0)return.5;const h=Math.sqrt(a),u=Math.acos(h/c)-Math.asin(s/(c/Math.sin(n)));return Math.min(1,(u+.5*r)/r)}_angleToSilhouette(e){const r=o(O.get(),e,this.center),s=a(r),i=this.radius,n=i+Math.abs(i-s);return t(i/n)}union(t){const e=m(this._center,t.center),r=this.radius,s=t.radius;return e+s<r?this:e+r<s?(this.copy(t),this):(d(this._center,this._center,t.center,(e+s-r)/(2*e)),this.radius=(e+r+s)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}}const C={create:t=>new E(t),copy:(t,e)=>e.copy(t),setExtent:(t,e,r)=>r.copy(t),getExtent:(t,e)=>e,elevate:(t,e,r)=>(r.copy(t),r.radius+=e,r),axisAt(t,e,r,s){const i=o(U,e,t.center);switch(r){case 0:{const t=R(i,U)[2];return M(s,-Math.sin(t),Math.cos(t),0)}case 1:{const t=R(i,U),e=t[1],r=t[2],n=Math.sin(e);return M(s,-n*Math.cos(r),-n*Math.sin(r),Math.cos(e))}case 2:return p(s,i);default:return}},altitudeAt(t,e){const r=o(V,e,t.center);return a(r)-t.radius},setAltitudeAt(t,e,r,s){const i=C.altitudeAt(t,e),n=C.axisAt(t,e,2,V),o=c(V,n,r-i);return h(s,e,o)},intersectRay:(t,e,r)=>t.intersectRay(e,r),closestPoint:(t,e,r)=>t.intersectRay(e,r)?r:(A(e,t.center,r),t.projectPoint(r,r)),intersectRayClosestSilhouette(t,e,r){if(t.intersectRay(e,r))return r;const s=t.closestPointOnSilhouette(e,O.get());return h(r,e.origin,c(O.get(),e.direction,m(e.origin,s)/a(e.direction))),r},closestPointOnSilhouette:(t,e,r)=>t.closestPointOnSilhouette(e,r),distanceToSilhouette(t,e){const r=o(O.get(),e,t.center),s=f(r),i=t.radius**2;return Math.sqrt(Math.abs(s-i))}},T=new E,k={t0:0,t1:0},L=x(),U=x(),V=x();export{T as NullSphere,E as Sphere,C as sphereCSO};
|
package/interfaces.d.ts
CHANGED
|
@@ -1645,8 +1645,13 @@ declare namespace __esri {
|
|
|
1645
1645
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCast-types.html Read more...}
|
|
1646
1646
|
*/
|
|
1647
1647
|
namespace types {
|
|
1648
|
+
export type ShadowCastMode = "duration" | "discrete" | "threshold";
|
|
1649
|
+
export type ShadowCastDurationMode = "continuous" | "hourly";
|
|
1648
1650
|
}
|
|
1649
1651
|
|
|
1652
|
+
export type ShadowCastDurationMode = "continuous" | "hourly";
|
|
1653
|
+
export type ShadowCastMode = "duration" | "discrete" | "threshold";
|
|
1654
|
+
|
|
1650
1655
|
export class ShadowCastAnalysis extends Analysis {
|
|
1651
1656
|
/**
|
|
1652
1657
|
* Time (in milliseconds from midnight of the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ShadowCastAnalysis.html#date date}) when the shadow cast computation should stop.
|
|
@@ -2396,6 +2401,12 @@ declare namespace __esri {
|
|
|
2396
2401
|
* @param length The length to check.
|
|
2397
2402
|
*/
|
|
2398
2403
|
isAboveGeodesicDistanceThreshold(length: Length): boolean;
|
|
2404
|
+
/**
|
|
2405
|
+
* Note: reserved for internal use only, this is not part of the stable public API.
|
|
2406
|
+
*
|
|
2407
|
+
* Sets the elevation profile to a test configuration which removes timeouts, throtting, etc to make tests faster.
|
|
2408
|
+
*/
|
|
2409
|
+
setElevationProfileTestConfig(): WatchHandle;
|
|
2399
2410
|
}
|
|
2400
2411
|
|
|
2401
2412
|
export const analysisUtils: analysisUtils;
|
|
@@ -65412,6 +65423,13 @@ declare namespace __esri {
|
|
|
65412
65423
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-DataModel.html Read more...}
|
|
65413
65424
|
*/
|
|
65414
65425
|
constructor(properties?: DataModelProperties);
|
|
65426
|
+
/**
|
|
65427
|
+
* Specifies a default value for the object type.
|
|
65428
|
+
*
|
|
65429
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-DataModel.html#domains Read more...}
|
|
65430
|
+
*/
|
|
65431
|
+
get domains(): Domain[];
|
|
65432
|
+
set domains(value: DomainProperties[]);
|
|
65415
65433
|
/**
|
|
65416
65434
|
* Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
|
|
65417
65435
|
*
|
|
@@ -65431,6 +65449,12 @@ declare namespace __esri {
|
|
|
65431
65449
|
}
|
|
65432
65450
|
|
|
65433
65451
|
interface DataModelProperties {
|
|
65452
|
+
/**
|
|
65453
|
+
* Specifies a default value for the object type.
|
|
65454
|
+
*
|
|
65455
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-DataModel.html#domains Read more...}
|
|
65456
|
+
*/
|
|
65457
|
+
domains?: DomainProperties[];
|
|
65434
65458
|
}
|
|
65435
65459
|
|
|
65436
65460
|
export interface DataModelIdentifierInfo {
|
|
@@ -66001,6 +66025,37 @@ declare namespace __esri {
|
|
|
66001
66025
|
error?: Error | nullish;
|
|
66002
66026
|
}
|
|
66003
66027
|
|
|
66028
|
+
export class GraphDataModelSingletonOperationResult extends Accessor {
|
|
66029
|
+
/**
|
|
66030
|
+
* Any errors encountered while decoding the results.
|
|
66031
|
+
*
|
|
66032
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphDataModelSingletonOperationResult.html#decoderError Read more...}
|
|
66033
|
+
*/
|
|
66034
|
+
decoderError: Error | nullish;
|
|
66035
|
+
/**
|
|
66036
|
+
* The updated knowledge graph with the applied additions, updates, and deletions.
|
|
66037
|
+
*
|
|
66038
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphDataModelSingletonOperationResult.html#updatedKnowledgeGraph Read more...}
|
|
66039
|
+
*/
|
|
66040
|
+
updatedKnowledgeGraph: KnowledgeGraph | nullish;
|
|
66041
|
+
constructor(properties?: GraphDataModelSingletonOperationResultProperties);
|
|
66042
|
+
}
|
|
66043
|
+
|
|
66044
|
+
interface GraphDataModelSingletonOperationResultProperties {
|
|
66045
|
+
/**
|
|
66046
|
+
* Any errors encountered while decoding the results.
|
|
66047
|
+
*
|
|
66048
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphDataModelSingletonOperationResult.html#decoderError Read more...}
|
|
66049
|
+
*/
|
|
66050
|
+
decoderError?: Error | nullish;
|
|
66051
|
+
/**
|
|
66052
|
+
* The updated knowledge graph with the applied additions, updates, and deletions.
|
|
66053
|
+
*
|
|
66054
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphDataModelSingletonOperationResult.html#updatedKnowledgeGraph Read more...}
|
|
66055
|
+
*/
|
|
66056
|
+
updatedKnowledgeGraph?: KnowledgeGraph | nullish;
|
|
66057
|
+
}
|
|
66058
|
+
|
|
66004
66059
|
export class GraphDeleteFieldIndexResult extends GraphDataModelOperationResult {
|
|
66005
66060
|
/**
|
|
66006
66061
|
* Result returned when {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraphService.html#executeDeleteGraphFieldIndex deleting a field index} from a knowledge graph data model.
|
|
@@ -66238,6 +66293,12 @@ declare namespace __esri {
|
|
|
66238
66293
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphProperty.html#defaultVisibility Read more...}
|
|
66239
66294
|
*/
|
|
66240
66295
|
defaultVisibility: boolean;
|
|
66296
|
+
/**
|
|
66297
|
+
* The name of the domain for values of this property, if applicable.
|
|
66298
|
+
*
|
|
66299
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphProperty.html#domain Read more...}
|
|
66300
|
+
*/
|
|
66301
|
+
domain: string | nullish;
|
|
66241
66302
|
/**
|
|
66242
66303
|
* Specifies whether the property is editable.
|
|
66243
66304
|
*
|
|
@@ -66379,6 +66440,12 @@ declare namespace __esri {
|
|
|
66379
66440
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphProperty.html#defaultVisibility Read more...}
|
|
66380
66441
|
*/
|
|
66381
66442
|
defaultVisibility?: boolean;
|
|
66443
|
+
/**
|
|
66444
|
+
* The name of the domain for values of this property, if applicable.
|
|
66445
|
+
*
|
|
66446
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphProperty.html#domain Read more...}
|
|
66447
|
+
*/
|
|
66448
|
+
domain?: string | nullish;
|
|
66382
66449
|
/**
|
|
66383
66450
|
* Specifies whether the property is editable.
|
|
66384
66451
|
*
|
|
@@ -67848,6 +67915,23 @@ declare namespace __esri {
|
|
|
67848
67915
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraphService.html Read more...}
|
|
67849
67916
|
*/
|
|
67850
67917
|
interface knowledgeGraphService {
|
|
67918
|
+
executeAddDomain(graph: KnowledgeGraph, domain: RangeDomain | CodedValueDomain, fieldType: | "esriFieldTypeSmallInteger"
|
|
67919
|
+
| "esriFieldTypeInteger"
|
|
67920
|
+
| "esriFieldTypeSingle"
|
|
67921
|
+
| "esriFieldTypeDouble"
|
|
67922
|
+
| "esriFieldTypeString"
|
|
67923
|
+
| "esriFieldTypeDate"
|
|
67924
|
+
| "esriFieldTypeOID"
|
|
67925
|
+
| "esriFieldTypeGeometry"
|
|
67926
|
+
| "esriFieldTypeBlob"
|
|
67927
|
+
| "esriFieldTypeRaster"
|
|
67928
|
+
| "esriFieldTypeGUID"
|
|
67929
|
+
| "esriFieldTypeGlobalID"
|
|
67930
|
+
| "esriFieldTypeXML"
|
|
67931
|
+
| "esriFieldTypeBigInteger"
|
|
67932
|
+
| "esriFieldTypeDateOnly"
|
|
67933
|
+
| "esriFieldTypeTimeOnly"
|
|
67934
|
+
| "esriFieldTypeTimestampOffset", domainOptions?: DomainOptions, requestOptions?: RequestOptions): Promise<GraphDataModelSingletonOperationResult>;
|
|
67851
67935
|
/**
|
|
67852
67936
|
* Adds a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-FieldIndex.html field index} for a particular property on an
|
|
67853
67937
|
* entity type or relationship type in a graph.
|
|
@@ -67893,6 +67977,7 @@ declare namespace __esri {
|
|
|
67893
67977
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraphService.html#executeApplyEdits Read more...}
|
|
67894
67978
|
*/
|
|
67895
67979
|
executeApplyEdits(graph: KnowledgeGraph, edits: GraphApplyEdits, requestOptions?: RequestOptions): Promise<GraphApplyEditsResult>;
|
|
67980
|
+
executeDeleteDomain(graph: KnowledgeGraph, domainName: string, requestOptions?: RequestOptions): Promise<GraphDataModelSingletonOperationResult>;
|
|
67896
67981
|
/**
|
|
67897
67982
|
* Deletes the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-FieldIndex.html field index} for a particular property on an
|
|
67898
67983
|
* entity type or relationship type in a graph.
|
|
@@ -67987,6 +68072,23 @@ declare namespace __esri {
|
|
|
67987
68072
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraphService.html#executeSearchStreaming Read more...}
|
|
67988
68073
|
*/
|
|
67989
68074
|
executeSearchStreaming(graph: KnowledgeGraph, searchArguments: GraphSearchStreaming, requestOptions?: RequestOptions): Promise<GraphQueryStreamingResult>;
|
|
68075
|
+
executeUpdateDomain(graph: KnowledgeGraph, updatedDomain: RangeDomain | CodedValueDomain, fieldType: | "esriFieldTypeSmallInteger"
|
|
68076
|
+
| "esriFieldTypeInteger"
|
|
68077
|
+
| "esriFieldTypeSingle"
|
|
68078
|
+
| "esriFieldTypeDouble"
|
|
68079
|
+
| "esriFieldTypeString"
|
|
68080
|
+
| "esriFieldTypeDate"
|
|
68081
|
+
| "esriFieldTypeOID"
|
|
68082
|
+
| "esriFieldTypeGeometry"
|
|
68083
|
+
| "esriFieldTypeBlob"
|
|
68084
|
+
| "esriFieldTypeRaster"
|
|
68085
|
+
| "esriFieldTypeGUID"
|
|
68086
|
+
| "esriFieldTypeGlobalID"
|
|
68087
|
+
| "esriFieldTypeXML"
|
|
68088
|
+
| "esriFieldTypeBigInteger"
|
|
68089
|
+
| "esriFieldTypeDateOnly"
|
|
68090
|
+
| "esriFieldTypeTimeOnly"
|
|
68091
|
+
| "esriFieldTypeTimestampOffset", domainOptions?: DomainOptions, requestOptions?: RequestOptions): Promise<GraphDataModelSingletonOperationResult>;
|
|
67990
68092
|
/**
|
|
67991
68093
|
* Update a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphProperty.html GraphProperty} for a particular entity type or relationship type in the graph.
|
|
67992
68094
|
*
|
|
@@ -68141,6 +68243,22 @@ declare namespace __esri {
|
|
|
68141
68243
|
countWaypointsExpansionQueries?: number;
|
|
68142
68244
|
}
|
|
68143
68245
|
|
|
68246
|
+
/**
|
|
68247
|
+
* Options for adding or updating a domain on a knowledge graph service.
|
|
68248
|
+
*
|
|
68249
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraphService.html#DomainOptions Read more...}
|
|
68250
|
+
*/
|
|
68251
|
+
export interface DomainOptions {
|
|
68252
|
+
splitPolicy: | "esriSplitPolicyTypeDefaultValue"
|
|
68253
|
+
| "esriSplitPolicyType_UNSPECIFIED"
|
|
68254
|
+
| "esriSplitPolicyTypeGeometryRatio"
|
|
68255
|
+
| "esriSplitPolicyTypeDuplicate";
|
|
68256
|
+
mergePolicy: | "esriMergePolicyTypeDefaultValue"
|
|
68257
|
+
| "esriMergePolicyType_UNSPECIFIED"
|
|
68258
|
+
| "esriMergePolicyTypeSumValues"
|
|
68259
|
+
| "esriMergePolicyTypeAreaWeighted";
|
|
68260
|
+
}
|
|
68261
|
+
|
|
68144
68262
|
export interface knowledgeGraphServiceExecuteAddNamedTypesNamedTypes {
|
|
68145
68263
|
newEntityTypes: EntityType[];
|
|
68146
68264
|
newRelationshipTypes: RelationshipType[];
|
|
@@ -68166,6 +68284,7 @@ declare namespace __esri {
|
|
|
68166
68284
|
editable?: boolean;
|
|
68167
68285
|
required?: boolean;
|
|
68168
68286
|
defaultVisibility?: boolean;
|
|
68287
|
+
domain?: any;
|
|
68169
68288
|
defaultValue?: any;
|
|
68170
68289
|
}
|
|
68171
68290
|
|
|
@@ -99985,9 +100104,6 @@ declare namespace __esri {
|
|
|
99985
100104
|
constructor();
|
|
99986
100105
|
}
|
|
99987
100106
|
|
|
99988
|
-
export type ShadowCastDurationMode = "continuous" | "hourly";
|
|
99989
|
-
export type ShadowCastMode = "duration" | "discrete" | "threshold";
|
|
99990
|
-
|
|
99991
100107
|
/**
|
|
99992
100108
|
* Types for the various interactive analyses.
|
|
99993
100109
|
*
|
|
@@ -109736,6 +109852,28 @@ declare namespace __esri {
|
|
|
109736
109852
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-WebLinkChart.html#removeRecords Read more...}
|
|
109737
109853
|
*/
|
|
109738
109854
|
removeRecords(records: IdTypePair[], options?: WebLinkChartRemoveRecordsOptions): Promise<IdTypePair[]>;
|
|
109855
|
+
/**
|
|
109856
|
+
* Creates a WebLinkChart from a Cypher query against a knowledge graph service.
|
|
109857
|
+
*
|
|
109858
|
+
* @param kg The knowledge graph service to query.
|
|
109859
|
+
* @param queryArguments The cypher query and parameters to execute against the knowledge graph service.
|
|
109860
|
+
* @param initializationLinkChartConfig Configuration options for initializing the link chart layer.
|
|
109861
|
+
* @param requestOptions Additional options for the request.
|
|
109862
|
+
*
|
|
109863
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-WebLinkChart.html#fromCypherQuery Read more...}
|
|
109864
|
+
*/
|
|
109865
|
+
static fromCypherQuery(kg: KnowledgeGraph, queryArguments: GraphQueryStreaming, initializationLinkChartConfig?: InitializationLinkChartConfig, requestOptions?: RequestOptions): Promise<WebLinkChart>;
|
|
109866
|
+
/**
|
|
109867
|
+
* Creates a WebLinkChart from an array of id-type pairs against a knowledge graph service.
|
|
109868
|
+
*
|
|
109869
|
+
* @param kg The knowledge graph service to query.
|
|
109870
|
+
* @param idTypePairs An array of objects with an id and named type for each record to include in the link chart.
|
|
109871
|
+
* @param initializationLinkChartConfig Configuration options for initializing the link chart layer.
|
|
109872
|
+
* @param requestOptions Additional options for the request.
|
|
109873
|
+
*
|
|
109874
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-WebLinkChart.html#fromIdTypePairs Read more...}
|
|
109875
|
+
*/
|
|
109876
|
+
static fromIdTypePairs(kg: KnowledgeGraph, idTypePairs: IdTypePair[], initializationLinkChartConfig?: InitializationLinkChartConfig, requestOptions?: RequestOptions): Promise<WebLinkChart>;
|
|
109739
109877
|
}
|
|
109740
109878
|
|
|
109741
109879
|
interface WebLinkChartProperties extends WebDocument2DProperties {
|
|
@@ -119221,7 +119359,7 @@ declare namespace __esri {
|
|
|
119221
119359
|
/**
|
|
119222
119360
|
* Returns the instance of `Edits` corresponding to the given feature.
|
|
119223
119361
|
*
|
|
119224
|
-
* @param feature Either of the two Graphics created by the workflow.
|
|
119362
|
+
* @param feature Either of the two {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html Graphics} created by the workflow.
|
|
119225
119363
|
*
|
|
119226
119364
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-SplitFeatureWorkflowData.html#getEditsForFeature Read more...}
|
|
119227
119365
|
*/
|
|
@@ -119230,7 +119368,7 @@ declare namespace __esri {
|
|
|
119230
119368
|
* Identifies whether the given {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html Graphic} represents
|
|
119231
119369
|
* the feature to be updated or the feature to be created.
|
|
119232
119370
|
*
|
|
119233
|
-
* @param feature Either of the two Graphics created by the workflow.
|
|
119371
|
+
* @param feature Either of the two {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Graphic.html Graphics} created by the workflow.
|
|
119234
119372
|
*
|
|
119235
119373
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-SplitFeatureWorkflowData.html#getRoleForFeature Read more...}
|
|
119236
119374
|
*/
|
package/kernel.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.0";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.0.0-next.
|
|
5
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.0";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.0.0-next.37",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Error.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Error.js";import r from"../core/Logger.js";import{MultiOriginJSONMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o}from"../core/promiseUtils.js";import{property as a,subclass as l}from"../core/accessorSupport/decorators.js";import n from"../geometry/Extent.js";import p from"../geometry/SpatialReference.js";import m from"./Layer.js";import{APIKeyMixin as c}from"./mixins/APIKeyMixin.js";import{ArcGISService as u}from"./mixins/ArcGISService.js";import{CustomParametersMixin as y}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as f}from"./mixins/OperationalLayer.js";import{PortalLayer as h}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as d}from"./mixins/ScaleRangeLayer.js";import{url as S,elevationInfo as x}from"./support/commonProperties.js";import{hasEsriCrs as v,initFullExtent as g}from"./support/tiles3DUtils.js";import{logInvalidElevationInfoWarning as j,elevationModeRequiredMessage as w,featureExpressionUnsupportedMessage as E}from"../support/elevationInfoUtils.js";let R=class extends(u(f(h(d(s(y(c(m)))))))){constructor(e){super(e),this.operationalLayerType="GaussianSplatLayer",this.type="gaussian-splat",this.opacity=1,this.minScale=0,this.maxScale=0,this.url=null,this.rootTilesetJSON=null,this.fullExtent=new n(-180,-90,180,90,this.spatialReference),this.spatialReference=new p({wkid:4326,vcsWkid:115700}),this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[this.spatialReference,this.esriCrsSpatialReference]:[this.spatialReference]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[this.fullExtent,this.esriCrsFullExtent]:[this.fullExtent]}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const r=null!=e?e.signal:null;try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("GaussianSplat"))return!0;throw new i("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service"})}},e)}catch(s){o(s)}if(this.url){const e=t(this.url,{query:{...this.customParameters,token:this.apiKey},responseType:"json",signal:r}).then(e=>{this.rootTilesetJSON=e.data;const t=v(this.rootTilesetJSON);this.fullExtent=g(this.rootTilesetJSON,!1),this.spatialReference=this.fullExtent.spatialReference,t&&(this.esriCrsFullExtent=g(this.rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference)},e=>{o(e)});await e}}_validateElevationInfo(e){const t="Gaussian Splat layers";j(r.getLogger(this),w(t,"absolute-height",e)),j(r.getLogger(this),E(t,e))}};e([a({type:["GaussianSplatLayer"]})],R.prototype,"operationalLayerType",void 0),e([a({readOnly:!0})],R.prototype,"type",void 0),e([a({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],R.prototype,"opacity",void 0),e([a({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],R.prototype,"minScale",void 0),e([a({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],R.prototype,"maxScale",void 0),e([a(S)],R.prototype,"url",void 0),e([a({type:n})],R.prototype,"fullExtent",void 0),e([a({type:p})],R.prototype,"spatialReference",void 0),e([a({readOnly:!0})],R.prototype,"supportedSpatialReferences",null),e([a({type:[n]})],R.prototype,"fullExtents",null),e([a({type:["show","hide"]})],R.prototype,"listMode",void 0),e([a(x)],R.prototype,"elevationInfo",null),R=e([l("esri.layers.GaussianSplatLayer")],R);const L=R;export{L 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../request.js";import r from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as s}from"../core/promiseUtils.js";import{on as a,sync as n}from"../core/reactiveUtils.js";import{property as l,subclass as p}from"../core/accessorSupport/decorators.js";import{persistable as m}from"../core/accessorSupport/decorators/persistable.js";import d from"../geometry/Extent.js";import u from"../geometry/SpatialReference.js";import c from"./Layer.js";import{APIKeyMixin as h}from"./mixins/APIKeyMixin.js";import{ArcGISService as f}from"./mixins/ArcGISService.js";import{CustomParametersMixin as y}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import r from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as s}from"../core/promiseUtils.js";import{on as a,sync as n}from"../core/reactiveUtils.js";import{property as l,subclass as p}from"../core/accessorSupport/decorators.js";import{persistable as m}from"../core/accessorSupport/decorators/persistable.js";import d from"../geometry/Extent.js";import u from"../geometry/SpatialReference.js";import c from"./Layer.js";import{APIKeyMixin as h}from"./mixins/APIKeyMixin.js";import{ArcGISService as f}from"./mixins/ArcGISService.js";import{CustomParametersMixin as y}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as S}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as _}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as j,url as T}from"./support/commonProperties.js";import v from"./support/SceneModifications.js";import{initFullExtent as w}from"./support/tiles3DUtils.js";import b from"../portal/Portal.js";import{logInvalidElevationInfoWarning as x,elevationModeRequiredMessage as L,featureExpressionUnsupportedMessage as P}from"../support/elevationInfoUtils.js";import{f as I}from"../chunks/persistableUrlUtils.js";import{isBasemap as k}from"../support/userTypeGuards/isBasemap.js";import{reader as R}from"../core/accessorSupport/decorators/reader.js";let U=class extends(f(g(S(_(i(y(h(c)))))))){readModifications(e,t,r){this._modificationsSource={url:I(e,r),context:r}}initialize(){this.addHandles(a(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,n))}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=new u({wkid:4326,vcsWkid:115700}),this.fullExtent=new d(-180,-90,180,90,this.spatialReference),this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(e){const t=[e];for(;t?.length>0;){const e=t.pop();if(!e)return;for(const[o,i]of Object.entries(e)){if("uri"===o)try{const e=new URL("https://tmp"+i).searchParams.get("session");if(e)return e}catch(r){}"object"==typeof i&&null!==i&&t.push(i)}}return null}async requestRootAndSession(e){const i=(e,t)=>new r("3dtiles-init:"+e,t);return this._rootRequestPromise||(this._rootRequestPromise=new Promise((r,a)=>{this.url||a(i("url-missing","Layer url missing")),this._key=this.customParameters?this.customParameters.key:null;new Promise((e,r)=>{if(this.replacesTerrain&&!this._key){const o=this.portalItem?.portal||this.parent?.portalItem?.portal||b.getDefault();o.signIn().then(()=>{o.g3dTilesEnabled?t(o.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(t=>{this._key=t.data.keyString,e()},()=>r(i("g3dtiles-key-error","Error fetching Google 3D Tiles key from portal"))):r(i("g3dTilesEnabled-false","Google 3D Tiles are not enabled on Portal "+o.url))},()=>r(i("sign-in-failed","Error signing in to Portal")))}else e()}).then(()=>{t(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",signal:e}).then(e=>{try{this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(e.data))}catch(t){return void a(i("root-parse-failed","Error parsing root tile, details: "+t))}this._rootTilesetJSON?(this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=e.data,this.fullExtent=w(this._rootTilesetJSON),r(),this._rootRequestPromise=null):a(i("root-is-null","Root tile is null."))},e=>{s(e),a(i("root-load-failed","Error loading root tile")),this._rootRequestPromise=null,o.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})},e=>a(e))})),this._rootRequestPromise}async _doLoad(e){const t=null!=e?e.signal:null;if(this.isUsedAsGroundLayer&&!has("enable-feature:basemap-groundlayers"))throw new r("3dtiles-init:not-supported-in-groundlayers","Layer is not supported in basemap.");try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new r("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(o){s(o)}if(null!=this._modificationsSource){const t=await v.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}get hasAttributionData(){return!1}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";x(o.getLogger(this),L(t,"absolute-height",e)),x(o.getLogger(this),P(t,e))}get replacesTerrain(){return!!has("enable-feature:basemap-groundlayers")&&this.hasGoogleUrl&&this.isUsedAsGroundLayer}get isUsedAsGroundLayer(){return k(this.parent)}get hasGoogleUrl(){return!!this.url?.match(/.+\.googleapis.com/)}};e([l({type:["IntegratedMesh3DTilesLayer"]})],U.prototype,"operationalLayerType",void 0),e([l({type:v,clonable:e=>e.clone()}),m({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],U.prototype,"modifications",void 0),e([R(["web-scene","portal-item"],"modifications")],U.prototype,"readModifications",null),e([l({type:u})],U.prototype,"spatialReference",void 0),e([l({type:d})],U.prototype,"fullExtent",void 0),e([l(j)],U.prototype,"elevationInfo",null),e([l({type:["show","hide"]})],U.prototype,"listMode",void 0),e([l(T)],U.prototype,"url",void 0),e([l({readOnly:!0})],U.prototype,"type",void 0),e([l({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],U.prototype,"path",void 0),e([l({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],U.prototype,"minScale",void 0),e([l({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],U.prototype,"maxScale",void 0),e([l({readOnly:!0})],U.prototype,"hasAttributionData",null),e([l()],U.prototype,"replacesTerrain",null),e([l()],U.prototype,"isUsedAsGroundLayer",null),e([l()],U.prototype,"hasGoogleUrl",null),U=e([p("esri.layers.IntegratedMesh3DTilesLayer")],U);const D=U;export{D as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../core/Clonable.js";import
|
|
5
|
+
import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../core/Clonable.js";import o from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as r}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as s}from"../core/promiseUtils.js";import{on as n,sync as a}from"../core/reactiveUtils.js";import{property as p,subclass as l}from"../core/accessorSupport/decorators.js";import{persistable as m}from"../core/accessorSupport/decorators/persistable.js";import d from"./Layer.js";import{APIKeyMixin as c}from"./mixins/APIKeyMixin.js";import{ArcGISService as y}from"./mixins/ArcGISService.js";import{CustomParametersMixin as h}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as f}from"./mixins/OperationalLayer.js";import{PortalLayer as u}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as v}from"./mixins/ScaleRangeLayer.js";import{SceneService as g}from"./mixins/SceneService.js";import{elevationInfo as S}from"./support/commonProperties.js";import{I3SNodePageDefinition as j,I3SMaterialDefinition as w,I3STextureSetDefinition as x,I3SGeometryDefinition as L}from"./support/I3SLayerDefinitions.js";import I from"./support/SceneModifications.js";import{logInvalidElevationInfoWarning as T,elevationModeRequiredMessage as _,featureExpressionUnsupportedMessage as b}from"../support/elevationInfoUtils.js";import{f as M}from"../chunks/persistableUrlUtils.js";import{reader as O}from"../core/accessorSupport/decorators/reader.js";let P=class extends(g(y(f(u(v(r(h(c(t(d)))))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this.path=null,this.definitionExpression=null}initialize(){this.addHandles(n(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,a))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,o){this._modificationsSource={url:M(e,o),context:o}}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(o){s(o)}if(await this._fetchService(t),null!=this._modificationsSource){const t=await I.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new o("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new o("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}_validateElevationInfo(e){const t="Integrated mesh layers";T(i.getLogger(this),_(t,"absolute-height",e)),T(i.getLogger(this),b(t,e))}};e([p({type:String,readOnly:!0})],P.prototype,"geometryType",void 0),e([p({type:["show","hide"]})],P.prototype,"listMode",void 0),e([p({type:["IntegratedMeshLayer"]})],P.prototype,"operationalLayerType",void 0),e([p({json:{read:!1},readOnly:!0})],P.prototype,"type",void 0),e([p({type:j,readOnly:!0,clonable:!1})],P.prototype,"nodePages",void 0),e([p({type:[w],readOnly:!0,clonable:!1})],P.prototype,"materialDefinitions",void 0),e([p({type:[x],readOnly:!0,clonable:!1})],P.prototype,"textureSetDefinitions",void 0),e([p({type:[L],readOnly:!0,clonable:!1})],P.prototype,"geometryDefinitions",void 0),e([p({readOnly:!0})],P.prototype,"serviceUpdateTimeStamp",void 0),e([p({type:I,clonable:e=>e?.clone()??e}),m({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],P.prototype,"modifications",void 0),e([O(["web-scene","portal-item"],"modifications")],P.prototype,"readModifications",null),e([p(S)],P.prototype,"elevationInfo",null),e([p({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],P.prototype,"path",void 0),P=e([l("esri.layers.IntegratedMeshLayer")],P);const U=P;export{U 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Accessor.js";import s from"../core/Logger.js";import{isAbortError as r}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{addFrameTask as n}from"../core/scheduling.js";import{property as o,subclass as l}from"../core/accessorSupport/decorators.js";import{clone as d}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{B as h}from"../chunks/vec32.js";import{canProjectWithoutEngine as _}from"../geometry/projectionUtils.js";import{projectBuffer as u}from"../geometry/projection/projectBuffer.js";import{containsXY as y}from"../geometry/support/aaBoundingRect.js";import{earth as c}from"../geometry/support/Ellipsoid.js";import{isGeographic as g}from"../geometry/support/spatialReferenceUtils.js";import m from"../geometry/support/WKIDUnitConversion.js";import{wasmFailedToInit as w,invalidLayerView as p}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as f}from"./Lyr3DWorkerHandle.js";import{loadLyr3DMainWASM as b}from"../libs/lyr3d/Lyr3DModule.js";import{getElevationOffsetInMeters as v}from"../support/elevationInfoUtils.js";import{makeScheduleFunction as M}from"../views/3d/layers/support/makeScheduleFunction.js";const D=3857,L=32662,k=4326,R=5773,S=115700;let C=class extends i{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._viewSR=null,this._lyr3DBusyCount=0,this._updateCameraElevation=0,this._debugFlags=new Set,this._debugLevel=2,this._wasmNotLoaded="method requiring WASM was called when WASM isn't loaded",this._pulseTaskHandle=null,this._debugFlags.add(0),this._debugFlags.add(1),this._debugFlags.add(2)}_debugLog(e,t,i,r=!0){if(this._debugFlags.has(e)&&this._debugLevel>=t){const e=r?`[js] ${i}`:`${i}`;0===t||1===t?s.getLogger(this).error(e):2===t&&s.getLogger(this).warn(e),s.getLogger(this).info(e)}}initialize(){this._debugLevel>2&&(s.getLogger(this).level="info"),this._debugLog(0,3,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([this._createElevationUpdateHandle(),a(()=>this.view.state?.contentCamera,()=>this._updateWasmCamera())]),this._pulseTaskHandle=n({preRender:()=>this._pulseTask()})}destroy(){this._debugLog(0,3,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach(e=>{e.abortController.abort()}),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null);const e=this._workerHandle;e&&e.destroyWasm().then(()=>{this._workerHandle?.destroy(),this._workerHandle=null}),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}addLayerView(e){return this._lyr3DMain?this._addLayerView(e):(this._debugLog(0,1,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),{wasmLayerId:w})}removeLayerView(e){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;this._doRemoveLayerView(e);const t=this._layers.size;return 0===t&&(this._debugLog(0,3,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),t}getValidLayerViewCount(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;let e=0;return this._layers.forEach(t=>{t.layerView.wasmLayerId>=0&&++e}),e}setEnabled(e,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const i=this._layers.get(e.wasmLayerId);if(i){this._lyr3DMain.set_enabled(e.wasmLayerId,t),i.needMemoryUsageUpdate=!0;const s=this._isUpdating(i);i.needFrame=!0,s||i.layerView.updatingFlagChanged()}}setLayerOffset(e,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,t)}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,t,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,t,i)}setMeshModifications(e,t,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const s=this._layers.get(e.wasmLayerId);if(s){const r=this._lyr3DMain._malloc(8*t.length),a=new Float64Array(this._lyr3DMain.HEAPF64.buffer,r,t.length);for(let e=0;e<t.length;++e)a[e]=t[e];this._lyr3DMain.set_mesh_modification_polygons(e.wasmLayerId,r,t.length,i),this._lyr3DMain._free(r);const n=this._isUpdating(s);s.needFrame=!0,n||s.layerView.updatingFlagChanged()}}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const t=this._layers.get(e);return!!t&&(t.outstandingJobCount>0||t.outstandingRenderableCount>0||t.needFrame||this._lyr3DBusyCount>0)}initializeWasm(e,t){return this._lyr3DMain?Promise.resolve():this.view.renderSpatialReference?(this._debugLog(0,3,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=b().then(i=>{this._lyr3DMain=i,this._lyr3DMainPromise=null;const s=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),r=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),a=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),n=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),o=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii");if(!this.view.renderSpatialReference)return void(this._lyr3DMain=null);this._viewSR=this.view.renderSpatialReference?.toJSON();const l="global"===this.view.viewingMode?5:3;if(5===l)this._viewSR.wkid=this._viewSR.latestWkid=k,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=R;else if(this.view.renderSpatialReference?.isWebMercator)this._viewSR.wkid=this._viewSR.latestWkid=D,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=R;else if(this.view.renderSpatialReference?.wkid===L)this._viewSR.wkid=this._viewSR.latestWkid=k,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=R;else if(!this._viewSR.latestVcsWkid&&!this._viewSR.vcsWkid){const e=this.view.heightModelInfo?.heightModel,t=!e||"gravity-related-height"===e;this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=t?R:S}return this._lyr3DMain.initialize_lyr3d_wasm(o,s,r,a,n,e,t,l,this._cleanUpSR(this._makeSRWasmSerializable(this._viewSR)),Math.max(this._debugLevel,0))?(this._workerHandle=new f(M(this.view.resourceController)),this._workerHandle.promise?this._workerHandle.promise:void 0):(this._lyr3DMain=null,void this._debugLog(0,0,"Lyr3d Main WASM failed to initialize",!1))}).catch(e=>{this._debugLog(0,0,`Lyr3d WASM failed to download error = ${e}`,!1)})),this._lyr3DMainPromise):Promise.reject()}setLodPixelThreshold(e,t){this._lyr3DMain?.set_lod_pixel_threshold(t);const i=this._layers.get(e.wasmLayerId);i&&(i.needFrame=!0)}_pulseTask(){if(this._lyr3DMain){if(this._updateCameraElevation>0){let e=null;const t=this.view.state?.contentCamera;if(t&&this.view.renderSpatialReference){const{eye:i}=t,s=this.view.groundView.getElevation(i[0],i[1],i[2],this.view.renderSpatialReference);if(s){const t=h(i);e="global"===this.view.viewingMode?t-(c.radius+s):i[2]-s}}e?(this._lyr3DMain.set_camera_altitude(e),this._updateCameraElevation=0):(this._updateCameraElevation-=1,this._updateCameraElevation<=0&&(this._lyr3DMain.set_camera_altitude(0),this._updateCameraElevation=0))}let e=0,t=0;this._layers.forEach(i=>{e+=i.layerView.usedMemory,t+=i.layerView.cachedMemory}),e/=1048576,t/=1048576;const i=this.view.resourceController.memoryController,s=i.usedMemory*i.maxMemory-e;this._lyr3DBusyCount=this._lyr3DMain.frame_pulse(i.memoryFactor,e,t,s,i.maxMemory),this._layers.forEach(e=>{0===this._updateCameraElevation&&(e.needFrame=!1),e.layerView.updatingFlagChanged()})}}_isUpdating(e){return e.outstandingJobCount>0||e.outstandingRenderableCount>0||e.needFrame||this._lyr3DBusyCount>0}_incrementJobCount(e){const t=this._isUpdating(e);e.outstandingJobCount+=1,t||e.layerView.updatingFlagChanged()}_decrementJobCount(e){const t=this._isUpdating(e);e.outstandingJobCount-=1;t!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){const t=this._isUpdating(e);e.outstandingRenderableCount+=1,t||e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){const t=this._isUpdating(e);e.outstandingRenderableCount-=1;t!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_onJobFailed(e,t,i){t.error.length&&this._debugLog(1,1,t.error,!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(i.jobId,i.desc),this._decrementJobCount(e)}_onJobSucceeded(e,t,i){if(this._lyr3DMain){if(e.layerView.destroyed)return void this._lyr3DMain.on_job_failed(i.jobId,i.desc);const s=t.data.byteLength,r=this._lyr3DMain._malloc(s);new Uint8Array(this._lyr3DMain.HEAPU8.buffer,r,s).set(t.data),this._lyr3DMain.on_job_completed(i.jobId,t.jobDescJson,r,s),this._lyr3DMain._free(r)}this._decrementJobCount(e)}_getRequestPromises(e,i,s,r){const a=[];for(const n of e){const e=new URL(n);if("integrated-mesh-3dtiles"===r.type){if(e.origin===s.origin&&e.pathname===s.pathname){if(r.rootTileset){a.push(Promise.resolve(r.rootTileset.slice()));continue}}else r.session&&e.searchParams.append("session",r.session)}a.push(t(e.toString(),i).then(e=>e.data))}return a}_getInitialPromise(e,t,i,s,a,n,o){const l=this._getRequestPromises(e.urls,t,i,s);return Promise.all(l).then(e=>(a.inputs=e,this._workerHandle.invoke(a,n))).then(e=>e).catch(t=>{let i=1;return r(t)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):o&&400===t.details?.httpStatus?(i=3,this._debugLog(1,2,"Session expired, trying to create new Session.")):this._debugLog(1,1,`job ${e.jobId} failed with error ${t}.`),{status:i,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]}})}async _onNewJob(){const e=this._lyr3DMain.get_next_job(),t=this._layers.get(e.layerId);if(!t)return;this._incrementJobCount(t);const i=t.abortController.signal,s=t.layerView.layer,a="integrated-mesh-3dtiles"===s.type?s.key:null,n="integrated-mesh-3dtiles"===s.type?s.session:null,o={responseType:"array-buffer",signal:i,query:{...t.customParameters,token:t.apiKey,key:a}},l={id:e.jobId,inputs:[],jobDescJson:e.desc.slice(),isMissingResourceCase:!1},d=new URL(s.url),h=a=>{if(1===a.status)this._onJobFailed(t,a,e);else if(0===a.status)this._onJobSucceeded(t,a,e);else if(2===a.status){const n=this._getRequestPromises(a.missingInputUrls,o,d,s);Promise.all(n).then(e=>{l.jobDescJson=a.jobDescJson,a.originalInputs?l.inputs=a.originalInputs:l.inputs=[],l.isMissingResourceCase=!0;for(const t of e)l.inputs.push(t);return this._workerHandle.invoke(l,i)}).then(i=>{1===i.status?this._onJobFailed(t,i,e):0===i.status&&this._onJobSucceeded(t,i,e)}).catch(i=>{this._decrementJobCount(t),r(i)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):this._debugLog(1,1,`job ${e.jobId} failed with error2 ${i}.`),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc)})}};try{const t=await this._getInitialPromise(e,o,d,s,l,i,n);if(3===t.status&&"integrated-mesh-3dtiles"===s.type){n===s.session&&null!==s.session&&await s.requestRootAndSession(i);h(await this._getInitialPromise(e,o,d,s,l,i,s.session))}else h(t)}catch(_){_&&this._debugLog(1,1,_.toString(),!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc),this._decrementJobCount(t)}}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),{meshData:t}=e;if(t.data&&t.data.byteLength>0){const e=t.data.slice();t.data=e}const i=this._layers.get(e.layerId);i&&(this._incrementRenderableCount(i),i.layerView.createRenderable(e).then(t=>{this._lyr3DMain?.on_renderable_created(!0,e.layerId,e.handle,t.memUsageBytes),this._decrementRenderableCount(i)}).catch(t=>{r(t)||this._debugLog(2,1,`createRenderable failed with error ${t}.`),this._lyr3DMain?.on_renderable_created(!1,e.layerId,e.handle,0),this._decrementRenderableCount(i)}))}_freeRenderables(e,t,i){if(i<1)return;const s=this._layers.get(e);if(!s)return;const r=s.layerView,a=[],n=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,i);for(let o=0;o<i;++o)a.push(n[o]);for(let o=0;o<i;++o)r.freeRenderable(a[o])}_setRenderableVisibility(e,t,i,s){if(s<1)return;const r=this._layers.get(e);if(!r)return;const a=r.layerView,n=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,s),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,i,s);for(let h=0;h<s;++h)n.push(l[h]),o.push(1===d[h]);a.setRenderableVisibility(n,o,s)}_onWasmError(e,t,i,s){this._lyr3DMain&&this._debugLog(i,s,this._lyr3DMain.UTF8ToString(e,t),!1)}_doRemoveLayerView(e){const t=this._layers.get(e.wasmLayerId);return!!t&&(t.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._layers.delete(e.wasmLayerId),!0)}_isGaussianSplatLayerView(e){return"gaussian-splat"===e.layer.type}_isGaussianSplatLayer(e){return"gaussian-splat"===e.type}_toWasmQuality(e){switch(e){case"low":return 1;case"medium":return 2;case"high":return 3}}_addLayerView(e){const t=e.layer;if(!t.url||!t.rootTilesetJSON)return{wasmLayerId:p};const i="integrated-mesh-3dtiles"===t.type?0:2,r=this._lyr3DMain.validate_root_tileset(JSON.stringify(t.rootTilesetJSON),i);if(0!==r.errorCode)return{wasmLayerId:p,check:r};const a=this._lyr3DMain.get_next_layer_id(),n=new AbortController;this._layers.set(a,{layerView:e,abortController:n,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:t.customParameters,apiKey:t.apiKey,needFrame:!0});const o=v(t.elevationInfo),l=this._toWasmQuality(this.view?.qualityProfile),d=e=>s.getLogger(this).error("add-spatial-reference-error","Error when adding SR:",e);let h=!1;if(this._isGaussianSplatLayerView(e)&&this._isGaussianSplatLayer(t)){let i=t.spatialReference;if(e.useEsriCrs&&t.esriCrsSpatialReference){i=t.esriCrsSpatialReference;const s=g(i);let r=1,a=1;!s&&i.wkid&&-1!==i.wkid&&(r=m.values[m[i.wkid]],a=e.metersPerVCSUnit),this._workerHandle.addSpatialReferenceInfo(this._cleanUpSR(this._makeSRWasmSerializable(i)),s,r,a).catch(d)}h=this._lyr3DMain.add_gaussian_splat_layer(l,t.url,a,o)}else h=this._lyr3DMain.add_3dtiles_layer(l,t.url,a,o);return h?(this._updateWasmCamera(),e.updatingFlagChanged(),{wasmLayerId:a}):(this._layers.delete(a),{wasmLayerId:p})}_createElevationUpdateHandle(){const e=(e,t)=>{const i=this.view.state?.contentCamera;if(!i||!this._lyr3DMain)return;const s=d(i.eye);if(!_(this.view.renderSpatialReference,t))return;u(s,this.view.renderSpatialReference,0,s,t,0,1);y(e,s[0],s[1])&&(this._updateCameraElevation=5,this._layers.forEach(e=>{const t=this._isUpdating(e);e.needFrame=!0,t||e.layerView.updatingFlagChanged()}))};return this.view.groundView.on("elevation-change",({extent:t,spatialReference:i})=>e(t,i))}_updateWasmCamera(){const e=this.view.state?.contentCamera;if(!e||!this._lyr3DMain)return;const{eye:t,center:i,up:s,near:r,far:a,fovY:n}=e,o=[e.viewport[2],e.viewport[3]],l=e.width/e.height;this._lyr3DMain.set_camera_parameters({eye:t,center:i,up:s,near:r,far:a,fov:n,aspectRatio:l,viewport:o}),this._layers.forEach(e=>{const t=this._isUpdating(e);e.needFrame=!0,t||e.layerView.updatingFlagChanged()})}_makeSRWasmSerializable(e){return{wkid:e?.wkid??-1,latestWkid:e?.latestWkid??-1,vcsWkid:e?.vcsWkid??-1,latestVcsWkid:e?.latestVcsWkid??-1,wkt:e?.wkt??""}}_cleanUpSR(e){return-1===e?.wkid&&e.latestWkid&&-1!==e.latestWkid?e.wkid=e.latestWkid:-1===e?.latestWkid&&e.wkid&&-1!==e.wkid&&(e.latestWkid=e.wkid),-1===e?.vcsWkid&&e.latestVcsWkid&&-1!==e.latestVcsWkid?e.vcsWkid=e.latestVcsWkid:-1===e?.latestVcsWkid&&e.vcsWkid&&-1!==e.vcsWkid&&(e.latestVcsWkid=e.vcsWkid),e}};e([o({constructOnly:!0})],C.prototype,"view",void 0),C=e([l("esri.layers.Lyr3DWasmPerSceneView")],C);const W=C;export{W as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import i from"../core/Accessor.js";import s from"../core/Logger.js";import{isAbortError as r}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{addFrameTask as n}from"../core/scheduling.js";import{property as o,subclass as l}from"../core/accessorSupport/decorators.js";import{isGeographic as d}from"../geometry/support/spatialReferenceUtils.js";import h from"../geometry/support/WKIDUnitConversion.js";import{wasmFailedToInit as _,invalidLayerView as y}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as u}from"./Lyr3DWorkerHandle.js";import{loadLyr3DMainWASM as c}from"../libs/lyr3d/Lyr3DModule.js";import{getElevationOffsetInMeters as g}from"../support/elevationInfoUtils.js";import{makeScheduleFunction as m}from"../views/3d/layers/support/makeScheduleFunction.js";const w=3857,b=32662,p=4326,f=5773,v=115700;let D=class extends i{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._viewSR=null,this._lyr3DBusyCount=0,this._debugFlags=new Set,this._debugLevel=2,this._wasmNotLoaded="method requiring WASM was called when WASM isn't loaded",this._pulseTaskHandle=null,this._cameraElevationDirty=!0,this._debugFlags.add(0),this._debugFlags.add(1),this._debugFlags.add(2)}_debugLog(e,t,i,r=!0){if(this._debugFlags.has(e)&&this._debugLevel>=t){const e=r?`[js] ${i}`:`${i}`;0===t||1===t?s.getLogger(this).error(e):2===t&&s.getLogger(this).warn(e),s.getLogger(this).info(e)}}initialize(){this._debugLevel>2&&(s.getLogger(this).level="info"),this._debugLog(0,3,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([a(()=>this.view.state?.contentCamera,()=>this._updateWasmCamera()),a(()=>this.view.state?.contentCamera.relativeElevation,()=>{this._cameraElevationDirty=!0,this._markAllLayerViewsUpdating()})]),this._pulseTaskHandle=n({preRender:()=>this._pulseTask()})}destroy(){this._debugLog(0,3,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach(e=>{e.abortController.abort()}),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null);const e=this._workerHandle;e&&e.destroyWasm().then(()=>{this._workerHandle?.destroy(),this._workerHandle=null}),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}addLayerView(e){return this._lyr3DMain?this._addLayerView(e):(this._debugLog(0,1,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),{wasmLayerId:_})}removeLayerView(e){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;this._doRemoveLayerView(e);const t=this._layers.size;return 0===t&&(this._debugLog(0,3,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),t}getValidLayerViewCount(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;let e=0;return this._layers.forEach(t=>{t.layerView.wasmLayerId>=0&&++e}),e}setEnabled(e,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const i=this._layers.get(e.wasmLayerId);if(i){this._lyr3DMain.set_enabled(e.wasmLayerId,t),i.needMemoryUsageUpdate=!0;const s=this._isUpdating(i);i.needFrame=!0,s||i.layerView.updatingFlagChanged()}}setLayerOffset(e,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,t)}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,t,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,t,i)}setMeshModifications(e,t,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const s=this._layers.get(e.wasmLayerId);if(s){const r=this._lyr3DMain._malloc(8*t.length),a=new Float64Array(this._lyr3DMain.HEAPF64.buffer,r,t.length);for(let e=0;e<t.length;++e)a[e]=t[e];this._lyr3DMain.set_mesh_modification_polygons(e.wasmLayerId,r,t.length,i),this._lyr3DMain._free(r);const n=this._isUpdating(s);s.needFrame=!0,n||s.layerView.updatingFlagChanged()}}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const t=this._layers.get(e);return!!t&&(t.outstandingJobCount>0||t.outstandingRenderableCount>0||t.needFrame||this._lyr3DBusyCount>0)}initializeWasm(e,t){return this._lyr3DMain?Promise.resolve():this.view.renderSpatialReference?(this._debugLog(0,3,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=c().then(i=>{this._lyr3DMain=i,this._lyr3DMainPromise=null;const s=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),r=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),a=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),n=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),o=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii");if(!this.view.renderSpatialReference)return void(this._lyr3DMain=null);this._viewSR=this.view.renderSpatialReference?.toJSON();const l="global"===this.view.viewingMode?5:3;if(5===l)this._viewSR.wkid=this._viewSR.latestWkid=p,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=f;else if(this.view.renderSpatialReference?.isWebMercator)this._viewSR.wkid=this._viewSR.latestWkid=w,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=f;else if(this.view.renderSpatialReference?.wkid===b)this._viewSR.wkid=this._viewSR.latestWkid=p,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=f;else if(!this._viewSR.latestVcsWkid&&!this._viewSR.vcsWkid){const e=this.view.heightModelInfo?.heightModel,t=!e||"gravity-related-height"===e;this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=t?f:v}return this._lyr3DMain.initialize_lyr3d_wasm(o,s,r,a,n,e,t,l,this._cleanUpSR(this._makeSRWasmSerializable(this._viewSR)),Math.max(this._debugLevel,0))?(this._workerHandle=new u(m(this.view.resourceController)),this._workerHandle.promise?this._workerHandle.promise:void 0):(this._lyr3DMain=null,void this._debugLog(0,0,"Lyr3d Main WASM failed to initialize",!1))}).catch(e=>{this._debugLog(0,0,`Lyr3d WASM failed to download error = ${e}`,!1)})),this._lyr3DMainPromise):Promise.reject()}setLodPixelThreshold(e,t){this._lyr3DMain?.set_lod_pixel_threshold(t);const i=this._layers.get(e.wasmLayerId);i&&(i.needFrame=!0)}_pulseTask(){if(this._lyr3DMain){if(this._cameraElevationDirty){const e=this.view.state?.contentCamera.relativeElevation;this._lyr3DMain.set_camera_altitude(e)}let e=0,t=0;this._layers.forEach(i=>{e+=i.layerView.usedMemory,t+=i.layerView.cachedMemory}),e/=1048576,t/=1048576;const i=this.view.resourceController.memoryController,s=i.usedMemory*i.maxMemory-e;this._lyr3DBusyCount=this._lyr3DMain.frame_pulse(i.memoryFactor,e,t,s,i.maxMemory),this._layers.forEach(e=>{this._cameraElevationDirty||(e.needFrame=!1),e.layerView.updatingFlagChanged()}),this._cameraElevationDirty=!1}}_isUpdating(e){return e.outstandingJobCount>0||e.outstandingRenderableCount>0||e.needFrame||this._lyr3DBusyCount>0}_incrementJobCount(e){const t=this._isUpdating(e);e.outstandingJobCount+=1,t||e.layerView.updatingFlagChanged()}_decrementJobCount(e){const t=this._isUpdating(e);e.outstandingJobCount-=1;t!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){const t=this._isUpdating(e);e.outstandingRenderableCount+=1,t||e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){const t=this._isUpdating(e);e.outstandingRenderableCount-=1;t!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_onJobFailed(e,t,i){t.error.length&&this._debugLog(1,1,t.error,!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(i.jobId,i.desc),this._decrementJobCount(e)}_onJobSucceeded(e,t,i){if(this._lyr3DMain){if(e.layerView.destroyed)return void this._lyr3DMain.on_job_failed(i.jobId,i.desc);const s=t.data.byteLength,r=this._lyr3DMain._malloc(s);new Uint8Array(this._lyr3DMain.HEAPU8.buffer,r,s).set(t.data),this._lyr3DMain.on_job_completed(i.jobId,t.jobDescJson,r,s),this._lyr3DMain._free(r)}this._decrementJobCount(e)}_getRequestPromises(e,i,s,r){const a=[];for(const n of e){const e=new URL(n);if("integrated-mesh-3dtiles"===r.type){if(e.origin===s.origin&&e.pathname===s.pathname){if(r.rootTileset){a.push(Promise.resolve(r.rootTileset.slice()));continue}}else r.session&&e.searchParams.append("session",r.session)}a.push(t(e.toString(),i).then(e=>e.data))}return a}_getInitialPromise(e,t,i,s,a,n,o){const l=this._getRequestPromises(e.urls,t,i,s);return Promise.all(l).then(e=>(a.inputs=e,this._workerHandle.invoke(a,n))).then(e=>e).catch(t=>{let i=1;return r(t)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):o&&400===t.details?.httpStatus?(i=3,this._debugLog(1,2,"Session expired, trying to create new Session.")):this._debugLog(1,1,`job ${e.jobId} failed with error ${t}.`),{status:i,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]}})}async _onNewJob(){const e=this._lyr3DMain.get_next_job(),t=this._layers.get(e.layerId);if(!t)return;this._incrementJobCount(t);const i=t.abortController.signal,s=t.layerView.layer,a="integrated-mesh-3dtiles"===s.type?s.key:null,n="integrated-mesh-3dtiles"===s.type?s.session:null,o={responseType:"array-buffer",signal:i,query:{...t.customParameters,token:t.apiKey,key:a}},l={id:e.jobId,inputs:[],jobDescJson:e.desc.slice(),isMissingResourceCase:!1},d=new URL(s.url),h=a=>{if(1===a.status)this._onJobFailed(t,a,e);else if(0===a.status)this._onJobSucceeded(t,a,e);else if(2===a.status){const n=this._getRequestPromises(a.missingInputUrls,o,d,s);Promise.all(n).then(e=>{l.jobDescJson=a.jobDescJson,a.originalInputs?l.inputs=a.originalInputs:l.inputs=[],l.isMissingResourceCase=!0;for(const t of e)l.inputs.push(t);return this._workerHandle.invoke(l,i)}).then(i=>{1===i.status?this._onJobFailed(t,i,e):0===i.status&&this._onJobSucceeded(t,i,e)}).catch(i=>{this._decrementJobCount(t),r(i)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):this._debugLog(1,1,`job ${e.jobId} failed with error2 ${i}.`),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc)})}};try{const t=await this._getInitialPromise(e,o,d,s,l,i,n);if(3===t.status&&"integrated-mesh-3dtiles"===s.type){n===s.session&&null!==s.session&&await s.requestRootAndSession(i);h(await this._getInitialPromise(e,o,d,s,l,i,s.session))}else h(t)}catch(_){_&&this._debugLog(1,1,_.toString(),!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc),this._decrementJobCount(t)}}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),{meshData:t}=e;if(t.data&&t.data.byteLength>0){const e=t.data.slice();t.data=e}const i=this._layers.get(e.layerId);i&&(this._incrementRenderableCount(i),i.layerView.createRenderable(e).then(t=>{this._lyr3DMain?.on_renderable_created(!0,e.layerId,e.handle,t.memUsageBytes),this._decrementRenderableCount(i)}).catch(t=>{r(t)||this._debugLog(2,1,`createRenderable failed with error ${t}.`),this._lyr3DMain?.on_renderable_created(!1,e.layerId,e.handle,0),this._decrementRenderableCount(i)}))}_freeRenderables(e,t,i){if(i<1)return;const s=this._layers.get(e);if(!s)return;const r=s.layerView,a=[],n=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,i);for(let o=0;o<i;++o)a.push(n[o]);for(let o=0;o<i;++o)r.freeRenderable(a[o])}_setRenderableVisibility(e,t,i,s){if(s<1)return;const r=this._layers.get(e);if(!r)return;const a=r.layerView,n=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,t,s),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,i,s);for(let h=0;h<s;++h)n.push(l[h]),o.push(1===d[h]);a.setRenderableVisibility(n,o,s)}_onWasmError(e,t,i,s){this._lyr3DMain&&this._debugLog(i,s,this._lyr3DMain.UTF8ToString(e,t),!1)}_doRemoveLayerView(e){const t=this._layers.get(e.wasmLayerId);return!!t&&(t.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._layers.delete(e.wasmLayerId),!0)}_isGaussianSplatLayerView(e){return"gaussian-splat"===e.layer.type}_isGaussianSplatLayer(e){return"gaussian-splat"===e.type}_toWasmQuality(e){switch(e){case"low":return 1;case"medium":return 2;case"high":return 3}}_addLayerView(e){const t=e.layer;if(!t.url||!t.rootTilesetJSON)return{wasmLayerId:y};const i="integrated-mesh-3dtiles"===t.type?0:2,r=this._lyr3DMain.validate_root_tileset(JSON.stringify(t.rootTilesetJSON),i);if(0!==r.errorCode)return{wasmLayerId:y,check:r};const a=this._lyr3DMain.get_next_layer_id(),n=new AbortController;this._layers.set(a,{layerView:e,abortController:n,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:t.customParameters,apiKey:t.apiKey,needFrame:!0});const o=g(t.elevationInfo),l=this._toWasmQuality(this.view?.qualityProfile),_=e=>s.getLogger(this).error("add-spatial-reference-error","Error when adding SR:",e);let u=!1;if(this._isGaussianSplatLayerView(e)&&this._isGaussianSplatLayer(t)){let i=t.spatialReference;if(e.useEsriCrs&&t.esriCrsSpatialReference){i=t.esriCrsSpatialReference;const s=d(i);let r=1,a=1;!s&&i.wkid&&-1!==i.wkid&&(r=h.values[h[i.wkid]],a=e.metersPerVCSUnit),this._workerHandle.addSpatialReferenceInfo(this._cleanUpSR(this._makeSRWasmSerializable(i)),s,r,a).catch(_)}u=this._lyr3DMain.add_gaussian_splat_layer(l,t.url,a,o)}else u=this._lyr3DMain.add_3dtiles_layer(l,t.url,a,o);return u?(this._updateWasmCamera(),e.updatingFlagChanged(),{wasmLayerId:a}):(this._layers.delete(a),{wasmLayerId:y})}_updateWasmCamera(){const e=this.view.state?.contentCamera;if(!e||!this._lyr3DMain)return;const{eye:t,center:i,up:s,near:r,far:a,fovY:n}=e,o=[e.viewport[2],e.viewport[3]],l=e.width/e.height;this._lyr3DMain.set_camera_parameters({eye:t,center:i,up:s,near:r,far:a,fov:n,aspectRatio:l,viewport:o}),this._markAllLayerViewsUpdating()}_markAllLayerViewsUpdating(){this._layers.forEach(e=>{const t=this._isUpdating(e);e.needFrame=!0,t||e.layerView.updatingFlagChanged()})}_makeSRWasmSerializable(e){return{wkid:e?.wkid??-1,latestWkid:e?.latestWkid??-1,vcsWkid:e?.vcsWkid??-1,latestVcsWkid:e?.latestVcsWkid??-1,wkt:e?.wkt??""}}_cleanUpSR(e){return-1===e?.wkid&&e.latestWkid&&-1!==e.latestWkid?e.wkid=e.latestWkid:-1===e?.latestWkid&&e.wkid&&-1!==e.wkid&&(e.latestWkid=e.wkid),-1===e?.vcsWkid&&e.latestVcsWkid&&-1!==e.latestVcsWkid?e.vcsWkid=e.latestVcsWkid:-1===e?.latestVcsWkid&&e.vcsWkid&&-1!==e.vcsWkid&&(e.latestVcsWkid=e.vcsWkid),e}};e([o({constructOnly:!0})],D.prototype,"view",void 0),D=e([l("esri.layers.Lyr3DWasmPerSceneView")],D);const L=D;export{L as default};
|