@arcgis/core 5.0.0-next.69 → 5.0.0-next.70
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/Map.d.ts +3 -1
- package/analysis/Analysis.d.ts +1 -0
- package/analysis/Dimension/types.d.ts +1 -0
- package/analysis/DimensionAnalysis.d.ts +10 -10
- package/analysis/DimensionSimpleStyle.d.ts +14 -13
- package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
- package/analysis/DistanceMeasurementAnalysis.d.ts +2 -1
- package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +3 -3
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +1 -1
- package/analysis/ElevationProfile/types.d.ts +2 -0
- package/analysis/LengthDimension.d.ts +22 -21
- package/analysis/LineOfSightAnalysis.d.ts +2 -2
- package/analysis/ShadowCast/MinDurationOptions.d.ts +2 -2
- package/analysis/ShadowCast/types.d.ts +6 -2
- package/analysis/Slice/types.d.ts +1 -0
- package/analysis/Viewshed.d.ts +22 -20
- package/analysis/ViewshedAnalysis.d.ts +13 -13
- package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -2
- package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +2 -2
- package/analysis/VolumeMeasurement/types.d.ts +1 -0
- package/analysis/VolumeMeasurementAnalysis.d.ts +1 -0
- package/analysis/types.d.ts +5 -0
- package/arcade.d.ts +2 -2
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/04364f3dd7578c2acb71.js +1 -0
- package/assets/esri/core/workers/chunks/18ed69d563986dc2eb21.js +1 -0
- package/assets/esri/core/workers/chunks/{4c04c54330b693892cfc.js → 1a45b4b4803337f4b99f.js} +2 -2
- package/assets/esri/core/workers/chunks/{60c7f896f2246a8aa6d7.js → 244006d4b0547d574401.js} +53 -53
- package/assets/esri/core/workers/chunks/329b10897c6965948b84.js +1 -0
- package/assets/esri/core/workers/chunks/4387aaf9d5e8f6d1833d.js +1 -0
- package/assets/esri/core/workers/chunks/{944dfa9309da8f49a616.js → 6a3d66d7c92f90cc2a17.js} +1 -1
- package/assets/esri/core/workers/chunks/760a759f9697adde6dd4.js +1 -0
- package/assets/esri/core/workers/chunks/798d227205bd958de6a7.js +1 -0
- package/assets/esri/core/workers/chunks/{9d88b4ba8e511da64583.js → 98d68b145226e7527c84.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ad6595ad44c2d60c1ce.js → a79fad422d41019c8232.js} +1 -1
- package/assets/esri/core/workers/chunks/{10e474d664b20adcd917.js → db4661fd82dc61162115.js} +1 -1
- package/assets/esri/core/workers/chunks/{1d1e25bb61eeeee8ee94.js → df2ba5f9d57080fca183.js} +1 -1
- package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +5 -3
- package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +15 -11
- 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/ComponentShader.glsl.js +43 -43
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/config.js +1 -1
- package/form/elements/inputs/attachments/Input.d.ts +6 -6
- package/geometry/Mesh.d.ts +20 -21
- package/geometry/Polygon.d.ts +1 -8
- package/geometry/Polygon.js +1 -1
- package/geometry/geometryEngine.d.ts +19 -19
- package/geometry/support/MeshComponent.d.ts +3 -3
- package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +2 -2
- package/geometry/support/MeshLocalVertexSpace.d.ts +2 -2
- package/geometry/support/MeshMaterial.d.ts +8 -8
- package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
- package/geometry/support/MeshTexture.d.ts +3 -3
- package/geometry/support/MeshTextureTransform.d.ts +3 -3
- package/geometry/support/MeshTransform.d.ts +1 -1
- package/geometry/support/MeshVertexAttributes.d.ts +13 -5
- package/geometry/support/intersects.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/geometry/support/meshUtils/centerAt.js +1 -1
- package/geometry/support/meshUtils/geographicUtils.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/geometry/support/meshUtils/types.d.ts +44 -52
- package/geometry/support/meshUtils.d.ts +6 -50
- package/geometry/support/meshUtils.js +1 -1
- package/interfaces.d.ts +5 -151
- package/kernel.js +1 -1
- package/layers/BaseDynamicLayer.d.ts +2 -2
- package/layers/BaseElevationLayer.d.ts +2 -2
- package/layers/BuildingSceneLayer.d.ts +2 -2
- package/layers/CSVLayer.d.ts +2 -2
- package/layers/CatalogLayer.d.ts +2 -2
- package/layers/DimensionLayer.d.ts +2 -2
- package/layers/ElevationLayer.d.ts +2 -2
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/GeoJSONLayer.d.ts +2 -2
- package/layers/GeoRSSLayer.d.ts +2 -2
- package/layers/GraphicsLayer.d.ts +2 -2
- package/layers/GroupLayer.d.ts +2 -2
- package/layers/ImageryLayer.d.ts +2 -2
- package/layers/ImageryTileLayer.d.ts +2 -2
- package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -2
- package/layers/IntegratedMeshLayer.d.ts +2 -2
- package/layers/KMLLayer.d.ts +2 -2
- package/layers/Layer.d.ts +9 -7
- package/layers/LineOfSightLayer.d.ts +3 -3
- package/layers/MapImageLayer.d.ts +2 -2
- package/layers/MapNotesLayer.d.ts +2 -2
- package/layers/MediaLayer.d.ts +2 -2
- package/layers/OGCFeatureLayer.d.ts +2 -2
- package/layers/OrientedImageryLayer.d.ts +2 -2
- package/layers/ParquetLayer.d.ts +2 -2
- package/layers/PointCloudLayer.d.ts +2 -2
- package/layers/RouteLayer.d.ts +2 -2
- package/layers/SceneLayer.d.ts +2 -2
- package/layers/SubtypeGroupLayer.d.ts +2 -2
- package/layers/TileLayer.d.ts +2 -2
- package/layers/UnknownLayer.d.ts +2 -2
- package/layers/UnsupportedLayer.d.ts +2 -2
- package/layers/VectorTileLayer.d.ts +2 -2
- package/layers/VideoLayer.d.ts +2 -2
- package/layers/ViewshedLayer.d.ts +2 -2
- package/layers/VoxelLayer.d.ts +2 -2
- package/layers/WCSLayer.d.ts +2 -2
- package/layers/WFSLayer.d.ts +2 -2
- package/layers/WMSLayer.d.ts +2 -2
- package/layers/WMTSLayer.d.ts +2 -2
- package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -2
- package/layers/catalog/CatalogFootprintLayer.d.ts +2 -2
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/raster/types.d.ts +8 -1
- package/layers/support/PixelBlock.d.ts +7 -7
- package/layers/support/RasterInfo.d.ts +2 -9
- package/layers/types.d.ts +77 -2
- package/networks/support/CircuitSection.d.ts +20 -2
- package/networks/support/CircuitSection.js +1 -1
- package/networks/support/Subcircuit.d.ts +12 -10
- package/networks/support/Subcircuit.js +1 -1
- package/networks/support/typeUtils.d.ts +2 -0
- package/networks/support/typeUtils.js +1 -1
- package/package.json +2 -2
- package/rest/support/AttributeBinsQuery.d.ts +7 -1
- package/rest/support/NormalizationBinParametersMixin.d.ts +29 -9
- package/support/revision.js +1 -1
- package/symbols/patterns/LinePattern3D.d.ts +3 -3
- package/symbols/patterns/Pattern3D.d.ts +3 -3
- package/unionTypes.d.ts +17 -17
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +6 -5
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +7 -6
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/types.d.ts +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +2 -2
- package/views/3d/analysis/DirectLineMeasurement/types.d.ts +1 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/types.d.ts +1 -0
- package/views/3d/analysis/types.d.ts +2 -0
- package/views/3d/constraints/Constraints.d.ts +2 -2
- package/views/3d/environment/ChapmanApproximation.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/layers/DimensionLayerView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
- package/views/3d/layers/ViewshedLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/support/LayerPerformanceInfo.d.ts +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +7 -7
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.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/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ViewingModeConfiguration.js +5 -0
- package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +2 -2
- package/views/BreakpointsOwner.d.ts +9 -10
- package/views/MapView.d.ts +18 -17
- package/views/SceneView.d.ts +30 -89
- package/views/SceneView.js +1 -1
- package/views/View2D.d.ts +0 -37
- package/views/View2D.js +1 -1
- package/views/ViewAnimation.d.ts +2 -3
- package/views/analysis/ElevationProfile/types.d.ts +7 -6
- package/views/analysis/types.d.ts +1 -0
- package/views/animation/types.d.ts +3 -1
- package/views/layers/DimensionLayerView.d.ts +97 -4
- package/views/layers/DimensionLayerView.js +1 -1
- package/views/layers/HighlightLayerViewMixin.d.ts +1 -59
- package/views/layers/HighlightLayerViewMixin.js +1 -1
- package/views/layers/ImageryLayerViewMixin.d.ts +1 -55
- package/views/layers/LineOfSightLayerView.d.ts +77 -4
- package/views/layers/LineOfSightLayerView.js +1 -1
- package/views/layers/ViewshedLayerView.d.ts +96 -5
- package/views/layers/ViewshedLayerView.js +1 -1
- package/views/navigation/Navigation.d.ts +1 -22
- package/views/navigation/Navigation.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/types.d.ts +75 -5
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +4 -4
- package/widgets/AreaMeasurement3D.d.ts +2 -2
- package/widgets/BasemapGallery.d.ts +1 -1
- package/widgets/BasemapToggle.d.ts +1 -1
- package/widgets/Bookmarks.d.ts +1 -1
- package/widgets/BuildingExplorer/BuildingExplorerViewModel.d.ts +2 -2
- package/widgets/BuildingExplorer/BuildingLevel.d.ts +2 -2
- package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.d.ts +2 -2
- package/widgets/BuildingExplorer/BuildingPhase.d.ts +2 -2
- package/widgets/BuildingExplorer.d.ts +3 -3
- package/widgets/Compass.d.ts +1 -1
- package/widgets/CoordinateConversion.d.ts +1 -1
- package/widgets/Daylight/DaylightViewModel.d.ts +3 -3
- package/widgets/Daylight/VisibleElements.d.ts +2 -2
- package/widgets/Daylight/types.d.ts +2 -2
- package/widgets/Daylight.d.ts +3 -3
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +4 -4
- package/widgets/DirectLineMeasurement3D.d.ts +2 -2
- package/widgets/DirectionalPad.d.ts +1 -1
- package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +3 -3
- package/widgets/ElevationProfile/ElevationProfileViewModel.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +2 -2
- package/widgets/ElevationProfile/types.d.ts +9 -9
- package/widgets/ElevationProfile.d.ts +2 -2
- package/widgets/Expand/ExpandViewModel.d.ts +1 -1
- package/widgets/Expand.d.ts +1 -1
- package/widgets/Feature.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
- package/widgets/Features.d.ts +1 -1
- package/widgets/Fullscreen/FullscreenViewModel.d.ts +1 -1
- package/widgets/Fullscreen.d.ts +1 -1
- package/widgets/Home.d.ts +1 -1
- package/widgets/LayerList.d.ts +12 -0
- package/widgets/Legend.d.ts +1 -1
- package/widgets/LineOfSight/LineOfSightTarget.d.ts +2 -2
- package/widgets/LineOfSight/LineOfSightViewModel.d.ts +2 -2
- package/widgets/LineOfSight.d.ts +2 -2
- package/widgets/Locate/LocateViewModel.d.ts +1 -1
- package/widgets/Locate.d.ts +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
- package/widgets/NavigationToggle.d.ts +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/Arrow.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationNode.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
- package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +5 -0
- package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
- package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +1 -1
- package/widgets/OrientedImageryViewer/support/resolveMediaProps.js +5 -0
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer.js +1 -1
- package/widgets/Print/CustomTemplate.d.ts +1 -1
- package/widgets/Print/PrintViewModel.d.ts +1 -1
- package/widgets/Print.d.ts +1 -1
- package/widgets/ScaleBar.d.ts +1 -1
- package/widgets/Search.d.ts +1 -1
- package/widgets/ShadowCast/DiscreteOptions.d.ts +2 -2
- package/widgets/ShadowCast/DurationOptions.d.ts +2 -2
- package/widgets/ShadowCast/ShadowCastViewModel.d.ts +3 -3
- package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +2 -2
- package/widgets/ShadowCast/ThresholdOptions.d.ts +2 -2
- package/widgets/ShadowCast/types.d.ts +2 -2
- package/widgets/ShadowCast.d.ts +1 -1
- package/widgets/Slice/SliceViewModel.d.ts +2 -2
- package/widgets/Slice.d.ts +2 -2
- package/widgets/Swipe.d.ts +1 -1
- package/widgets/TimeZoneLabel.d.ts +1 -1
- package/widgets/Track.d.ts +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/VideoPlayer.d.ts +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/widgets/Weather/VisibleElements.d.ts +2 -2
- package/widgets/Weather/WeatherViewModel.d.ts +2 -2
- package/widgets/Weather/types.d.ts +1 -1
- package/widgets/Weather.d.ts +2 -2
- package/widgets/Zoom.d.ts +1 -1
- package/widgets/support/GridControls.d.ts +1 -1
- package/assets/esri/core/workers/chunks/35961e71f69ae1d24b9e.js +0 -1
- package/assets/esri/core/workers/chunks/3cce8e894bf37c3e598e.js +0 -1
- package/assets/esri/core/workers/chunks/7ee68f67f9cc48a328f0.js +0 -1
- package/assets/esri/core/workers/chunks/a931515a2569713e743b.js +0 -1
- package/assets/esri/core/workers/chunks/bb4574a87ca21e719f0d.js +0 -1
- package/assets/esri/core/workers/chunks/c9f868f85d740ee32715.js +0 -1
- package/geometry.d.ts +0 -136
- package/geometry.js +0 -5
- package/pointCloudRenderers.d.ts +0 -112
- package/pointCloudRenderers.js +0 -5
- package/rasterRenderers.d.ts +0 -151
- package/rasterRenderers.js +0 -5
- package/renderers.d.ts +0 -166
- package/renderers.js +0 -5
- package/views/layers/DimensionLayerViewMixin.d.ts +0 -1
- package/views/layers/DimensionLayerViewMixin.js +0 -5
- package/views/layers/LineOfSightLayerViewMixin.d.ts +0 -1
- package/views/layers/LineOfSightLayerViewMixin.js +0 -5
- package/views/layers/ViewshedLayerViewMixin.d.ts +0 -98
- package/views/layers/ViewshedLayerViewMixin.js +0 -5
|
@@ -2,12 +2,12 @@
|
|
|
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{
|
|
5
|
+
import{ComponentData as e}from"../views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js";import{ForwardLinearDepthToWriteShadowMap as o}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{isColor as r,isShadow as a}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as l}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as d}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as g}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as c}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{ReadDepth as m}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{computeFragmentNormals as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTextureDraw as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as w,addLightingGlobalFactor as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as b,addMainLightDirection as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRenderingParameters as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{PiUtils as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{ReadBaseColorTexture as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{OverlayIM as S}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{DiscardOrAdjustAlphaDraw as j}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{BooleanDrawUniform as N}from"../views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js";import{If as $,glsl as T}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as D}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{SnowCover as R}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{outputColorHighlightOLID as M}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{getPlanetRadius as P,sphereDepthInterpolate as W}from"../views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js";import{ShaderBuilder as A}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as F}from"../webscene/support/AlphaCutoff.js";function U(U){const V=new A,{vertex:z,fragment:B}=V;V.include(s,U),V.include(n,U),V.include(t,U),V.include(i,U),V.include(e,U),V.include(j,U),B.include(l,U),V.include(x,U),V.include(O,U);const{output:E,pbrMode:_,hasNormalTexture:I,snowCover:G,receiveShadows:H,shadeNormals:k,spherical:q,sphericalSR:J,overlayEnabled:K,componentData:Q,vertexDiscardMode:X,renderOccluded:Y,isGroundSlice:Z}=U,ee=1===_||2===_;ee&&(V.include(y,U),I&&V.include(h,U));const oe=a(E),re=oe&&1===Q,ae=P(U);K&&(B.include(w,U),V.include(S,U),z.include(C),z.uniforms.add(new N("useENUForGlobalOverlayUV",e=>e.useENUForGlobalOverlayUV)),B.uniforms.add(new N("useENUForGlobalOverlayUV",e=>e.useENUForGlobalOverlayUV)),z.constants.add("invRadius","float",1/ae).code.add(`vec2 projectOverlay(vec3 pos) { return pos.xy ${$(q,"/ (1.0 + invRadius * pos.z)")}; }`));const le=K&&r(E)&&4===_;le&&(V.varyings.add("tbnTangent","vec3"),V.varyings.add("tbnBiTangent","vec3"),V.varyings.add("groundNormal","vec3"));const ie=0===X,te=2===X,ne=1-1/255;if(V.include(L,U),V.include(o,U),z.main.add(T`
|
|
6
6
|
bool castShadows;
|
|
7
7
|
vec4 externalColor = forwardExternalColor(castShadows);
|
|
8
|
-
${
|
|
9
|
-
${
|
|
10
|
-
${
|
|
8
|
+
${$(re,"if(!castShadows) { gl_Position = vec4(vec3(1e38), 1.0); return; }")}
|
|
9
|
+
${$(!ie,`{ if (externalColor.a ${te?">":"<="} ${T.float(ne)}) { gl_Position = vec4(vec3(1e38), 1.0); return; } }`)}
|
|
10
|
+
${$(9===E,"externalColor.a = 1.0;")}
|
|
11
11
|
|
|
12
12
|
forwardPosition(readElevationOffset());
|
|
13
13
|
forwardViewPosDepth(vPosition_view);
|
|
@@ -18,25 +18,26 @@ import{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as o
|
|
|
18
18
|
forwardLinearDepthToWriteShadowMap();
|
|
19
19
|
forwardEmissiveStrength();
|
|
20
20
|
forwardObjectAndLayerIdColor();
|
|
21
|
-
${
|
|
21
|
+
${$(le,q?T`
|
|
22
22
|
groundNormal = normalize(positionWorld());
|
|
23
23
|
tbnTangent = normalize(cross(vec3(0.0, 0.0, 1.0), groundNormal));
|
|
24
|
-
tbnBiTangent = normalize(cross(groundNormal, tbnTangent));`:
|
|
24
|
+
tbnBiTangent = normalize(cross(groundNormal, tbnTangent));`:T`
|
|
25
25
|
groundNormal = vec3(0.0, 0.0, 1.0);
|
|
26
26
|
tbnTangent = vec3(1.0, 0.0, 0.0);
|
|
27
27
|
tbnBiTangent = vec3(0.0, 1.0, 0.0);`)}
|
|
28
|
-
${
|
|
28
|
+
${$(K,$(q,"\n if (useENUForGlobalOverlayUV) {\n setOverlayVTC(projectOverlay(position));\n } else {\n vtcOverlay = vec4(0.0); // Definite assignment\n }\n ","setOverlayVTC(projectOverlay(position));"))}
|
|
29
29
|
|
|
30
|
-
if (externalColor.a < ${
|
|
30
|
+
if (externalColor.a < ${T.float(F)}) {
|
|
31
31
|
// Discard this vertex
|
|
32
32
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
`),
|
|
35
|
+
`),r(E))return V.include(u,U),V.include(v,U),B.include(w,U),V.include(M,U),B.include(R,U),B.constants.add("pRadius","float",ae).code.add(T`
|
|
36
36
|
float evaluateShadow() {
|
|
37
|
-
return ${
|
|
38
|
-
}
|
|
39
|
-
|
|
37
|
+
return ${H?"readShadowMap(vPositionWorldCameraRelative, linearDepth)":"0.0"};
|
|
38
|
+
}
|
|
39
|
+
`).main.add(T`
|
|
40
|
+
${$(!Z,"discardBySlice(vPositionWorldCameraRelative);")}
|
|
40
41
|
discardByTerrainDepth();
|
|
41
42
|
|
|
42
43
|
vec4 textureColor = readBaseColorTexture();
|
|
@@ -45,15 +46,14 @@ import{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as o
|
|
|
45
46
|
// When rendering the occluded overlay, we still need to read the base color texture because we need to use the
|
|
46
47
|
// same discard logic. However after that to render only the draped overlay, we simply set the base texture color
|
|
47
48
|
// to zero.
|
|
48
|
-
${
|
|
49
|
+
${$(Y,T`textureColor = vec4(0);`)}
|
|
49
50
|
|
|
50
|
-
${
|
|
51
|
-
${
|
|
51
|
+
${$(K,T`
|
|
52
|
+
${$(q,T`
|
|
52
53
|
vec4 overlayUVs;
|
|
53
54
|
if (useENUForGlobalOverlayUV) {
|
|
54
55
|
overlayUVs = vtcOverlay;
|
|
55
56
|
} else {
|
|
56
|
-
const float pRadius = ${R.float(ne)};
|
|
57
57
|
const float rad2deg1 = 180.0 / PI;
|
|
58
58
|
|
|
59
59
|
vec3 wPos = positionWorld();
|
|
@@ -62,7 +62,7 @@ import{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as o
|
|
|
62
62
|
float oLonRad = atan(wPos.y, wPos.x);
|
|
63
63
|
float sinLat = wPos.z / oRadius;
|
|
64
64
|
|
|
65
|
-
${
|
|
65
|
+
${$(1===J,T`
|
|
66
66
|
const float halfSemiMajorAxis = 0.5 * pRadius;
|
|
67
67
|
vec2 posWM = vec2(
|
|
68
68
|
oLonRad * pRadius,
|
|
@@ -70,19 +70,19 @@ import{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as o
|
|
|
70
70
|
);
|
|
71
71
|
|
|
72
72
|
vec2 overlayUV = posWM;
|
|
73
|
-
`,
|
|
73
|
+
`,T`
|
|
74
74
|
float oLatRad = asin(clamp(sinLat,-1.0,1.0));
|
|
75
75
|
vec2 posWgs84 = vec2(rad2deg1 * oLonRad, rad2deg1 * oLatRad);
|
|
76
76
|
vec2 overlayUV = posWgs84;
|
|
77
77
|
`)}
|
|
78
78
|
overlayUVs = vec4(overlayUV, overlayUV) * overlayTexScale + overlayTexOffset;
|
|
79
79
|
}
|
|
80
|
-
`,
|
|
80
|
+
`,T`vec4 overlayUVs = vtcOverlay;`)}
|
|
81
81
|
|
|
82
82
|
vec4 overlayColor = getOverlayColor(ovColorTex, overlayUVs);
|
|
83
83
|
|
|
84
84
|
/* Early discard to only emit when we have overlay */
|
|
85
|
-
${
|
|
85
|
+
${$(Y,T`if (overlayColor.a < ${T.float(F)}) { discard; }`)}
|
|
86
86
|
`)}
|
|
87
87
|
|
|
88
88
|
vec4 externalColor;
|
|
@@ -90,47 +90,47 @@ import{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as o
|
|
|
90
90
|
readExternalColor(externalColor, externalColorMixMode);
|
|
91
91
|
|
|
92
92
|
vec4 materialColor = computeMaterialColor(textureColor, externalColor, externalColorMixMode);
|
|
93
|
-
`),
|
|
93
|
+
`),ee?(b(B),q&&p(B),B.main.add(T`
|
|
94
94
|
applyPBRFactors();
|
|
95
|
-
${
|
|
95
|
+
${$(1===_,T`if (externalColorMixMode == 3) {
|
|
96
96
|
mrr = vec3(0.0, 0.6, 0.2);
|
|
97
97
|
}`)}
|
|
98
98
|
float additionalIrradiance = 0.02 * mainLightIntensity[2];
|
|
99
|
-
${
|
|
100
|
-
vec3 shadingNormal = ${
|
|
101
|
-
vec3 groundNormal = ${
|
|
99
|
+
${$(I,"mat3 tangentSpace = computeTangentSpace(fragmentFaceNormal, vPositionWorldCameraRelative, vuv0);")}
|
|
100
|
+
vec3 shadingNormal = ${I?"computeTextureNormal(tangentSpace, vuv0)":"fragmentShadingNormal"};
|
|
101
|
+
vec3 groundNormal = ${q?T`normalize(positionWorld())`:T`vec3(0.0, 0.0, 1.0)`};
|
|
102
102
|
|
|
103
103
|
vec3 viewDir = normalize(vPositionWorldCameraRelative);
|
|
104
104
|
float ssao = 1.0 - occlusion * evaluateAmbientOcclusionInverse();
|
|
105
|
-
${
|
|
105
|
+
${$(G,T`float snow = getSnow(fragmentFaceNormal, normalize(positionWorld()));
|
|
106
106
|
materialColor.rgb = mix(materialColor.rgb, vec3(1.1), snow);
|
|
107
107
|
ssao = mix(ssao, 0.5 * ssao, snow);
|
|
108
108
|
shadingNormal = mix(shadingNormal, fragmentFaceNormal, snow);`)}
|
|
109
|
-
${
|
|
109
|
+
${$(K,"materialColor = materialColor * (1.0 - overlayColor.a) + overlayColor;")}
|
|
110
110
|
|
|
111
111
|
vec3 additionalLight = evaluateAdditionalLighting(ssao, positionWorld());
|
|
112
|
-
${
|
|
113
|
-
${
|
|
112
|
+
${$(q,"float additionalAmbientScale = additionalDirectedAmbientLight(positionWorld());")}
|
|
113
|
+
${q?T`float shadow = max(lightingGlobalFactor * (1.0 - additionalAmbientScale), evaluateShadow());`:"float shadow = evaluateShadow();"}
|
|
114
114
|
vec4 shadedColor = vec4(evaluateSceneLightingPBR(shadingNormal, materialColor.rgb, shadow, ssao, additionalLight, viewDir, groundNormal, mrr, additionalIrradiance), materialColor.a);
|
|
115
|
-
`)):(
|
|
116
|
-
${
|
|
117
|
-
float shadow = ${q?
|
|
115
|
+
`)):(f(B),q&&p(B),le&&B.uniforms.add(new D("ovNormalTex",e=>e.overlay?.getTexture(3))),B.main.add(T`
|
|
116
|
+
${$(q,"float additionalAmbientScale = additionalDirectedAmbientLight(positionWorld());")}
|
|
117
|
+
float shadow = ${H?q?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), evaluateShadow())":"evaluateShadow()":q?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
|
|
118
118
|
|
|
119
|
-
${
|
|
119
|
+
${$(H&&!k,T`
|
|
120
120
|
float dotFL = dot(fragmentFaceNormal, mainLightDirection);
|
|
121
121
|
if( dotFL <= 0.0) shadow = 1.0;
|
|
122
122
|
`)}
|
|
123
|
-
${
|
|
123
|
+
${$(G,T`float snow = getSnow(fragmentFaceNormal, normalize(positionWorld()));
|
|
124
124
|
materialColor.rgb = mix(materialColor.rgb, vec3(1), snow);`)}
|
|
125
125
|
|
|
126
126
|
// At global scale we create some additional ambient light based on the main light to simulate global illumination
|
|
127
127
|
float ssao = evaluateAmbientOcclusion();
|
|
128
128
|
vec3 additionalLight = evaluateAdditionalLighting(ssao, positionWorld());
|
|
129
129
|
|
|
130
|
-
${
|
|
130
|
+
${$(K,"materialColor = materialColor * (1.0 - overlayColor.a) + overlayColor;")}
|
|
131
131
|
|
|
132
132
|
vec4 shadedColor = vec4(evaluateSceneLighting(fragmentShadingNormal, materialColor.rgb, shadow, ssao, additionalLight), materialColor.a);
|
|
133
|
-
${
|
|
133
|
+
${$(le,T`vec4 overlayWaterMask = getOverlayColor(ovNormalTex, vtcOverlay);
|
|
134
134
|
float waterNormalLength = length(overlayWaterMask);
|
|
135
135
|
if (waterNormalLength > 0.95) {
|
|
136
136
|
mat3 tbnMatrix = mat3(tbnTangent, tbnBiTangent, groundNormal);
|
|
@@ -139,19 +139,19 @@ import{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as o
|
|
|
139
139
|
// un-gamma the ground color to mix in linear space
|
|
140
140
|
shadedColor = mix(shadedColor, waterColorNonLinear, waterColorLinear.w);
|
|
141
141
|
}`)}
|
|
142
|
-
`)),
|
|
142
|
+
`)),B.main.add(`\n ${$(Z,"if(rejectBySlice(vPositionWorldCameraRelative)) shadedColor.a *= groundSliceOpacity;")}\n\n outputColorHighlightOLID(shadedColor, vPositionWorldCameraRelative, materialColor.rgb ${$(G,", snow")});\n `),U.sphereDepthInterpolate&&(V.include(W,U),V.fragment.include(m),B.main.add(T`if (sphereFade()>0.0) {
|
|
143
143
|
vec3 worldRay = normalize(vPositionWorldCameraRelative);
|
|
144
144
|
vec3 viewRay = normalize(vPosition_view);
|
|
145
145
|
gl_FragDepth = delinearizeDepth(sphereDepthInterpolate(worldRay, viewRay, linearizeDepth(gl_FragCoord.z)));
|
|
146
146
|
} else {
|
|
147
147
|
gl_FragDepth = gl_FragCoord.z;
|
|
148
|
-
}`)),
|
|
149
|
-
${
|
|
148
|
+
}`)),V;const se=2===E,de=9===E,ge=8===E,ce=oe||6===E||7===E;return ce&&V.include(d,U),se&&V.include(v,U),K&&V.include(c,U),V.include(g,U),B.main.add(T`
|
|
149
|
+
${$(!Z,"discardBySlice(vPositionWorldCameraRelative);")}
|
|
150
150
|
|
|
151
151
|
vec4 textureColor = readBaseColorTexture();
|
|
152
152
|
discardOrAdjustAlpha(textureColor);
|
|
153
153
|
|
|
154
|
-
${
|
|
155
|
-
${
|
|
156
|
-
${
|
|
157
|
-
${
|
|
154
|
+
${$(ce,"outputDepth(linearDepth);")}
|
|
155
|
+
${$(se,T`fragColor = vec4(vec3(0.5) + 0.5 * fragmentFaceNormalView, 1.0);`)}
|
|
156
|
+
${$(de,K?"fragColor = getOverlayColorTexel();":"outputObjectAndLayerIdColor();")}
|
|
157
|
+
${$(ge,$(K,T`calculateOcclusionAndOutputHighlight(getAllOverlayHighlightValuesEncoded());`,T`calculateOcclusionAndOutputHighlight();`))}`),V}const V=Object.freeze(Object.defineProperty({__proto__:null,build:U},Symbol.toStringTag,{value:"Module"}));export{V as C,U as b};
|
|
@@ -2,7 +2,7 @@
|
|
|
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{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstanceColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstanceColor.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{MaskedColorDefinition as s,CreateMaskedFromNaNColor as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/MaskedColor.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VerticalOffset as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as v}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{
|
|
5
|
+
import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstanceColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstanceColor.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{MaskedColorDefinition as s,CreateMaskedFromNaNColor as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/MaskedColor.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VerticalOffset as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as v}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{ComputeNormalTexturePass as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateAmbientOcclusion as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as b,addAmbientBoostFactor as f,addLightingGlobalFactor as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{PhysicallyBasedRendering as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as j,ReadShadowMapDraw as P}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{colorTextureUV as N,normalTextureUV as T,emissiveTextureUV as O,occlusionTextureUV as S,metallicRoughnessTextureUV as V}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as A}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as U,addCameraPosition as I}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as B}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as E}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as k}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{If as _,glsl as R}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as F}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{SnowCover as z}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{colorMixModes as W}from"../views/3d/webgl-engine/materials/internal/MaterialUtil.js";import{outputColorHighlightOLID as G}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as H}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as q}from"../webscene/support/AlphaCutoff.js";function J(J){const K=new H,{attributes:Q,vertex:X,fragment:Y,varyings:Z}=K,{output:ee,normalType:re,offsetBackfaces:oe,spherical:ie,snowCover:ae,pbrMode:le,textureAlphaPremultiplied:se,instancedDoublePrecision:ne,hasVertexColors:te,hasVertexTangents:de,hasColorTexture:ce,hasNormalTexture:me,hasNormalTextureTransform:ge,hasColorTextureTransform:ue}=J;if(U(X,J),Q.add("position","vec3"),Z.add("vpos","vec3",{invariant:!0}),K.include($,J),K.include(l,J),K.include(u,J),K.include(N,J),!r(ee))return K.include(v,J),K;K.include(T,J),K.include(O,J),K.include(S,J),K.include(V,J),I(X,J),K.include(t,J),K.include(i);const ve=0===re||1===re;return ve&&oe&&K.include(e),K.include(w,J),K.include(g,J),K.include(a,J),Z.add("vPositionLocal","vec3"),K.include(c,J),K.include(d,J),K.include(m,J),X.uniforms.add(new E("externalColor",e=>e.externalColor,{supportsNaN:!0})),Z.add("vcolorExt","vec4"),K.include(M,J),X.include(s),X.include(n),K.include(ne?j:P,J),X.main.add(R`
|
|
6
6
|
forwardNormalizedVertexColor();
|
|
7
7
|
|
|
8
8
|
MaskedColor maskedColor =
|
package/config.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"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.0.0-next.
|
|
5
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.0.0-next.70";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|
|
@@ -5,16 +5,16 @@ import type { AttachmentInputType } from "./types.js";
|
|
|
5
5
|
/** @experimental */
|
|
6
6
|
export default abstract class Input extends InputSuperclass {
|
|
7
7
|
/**
|
|
8
|
-
* The type of
|
|
8
|
+
* The type of [input](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-AttachmentElement.html#input) used in [attachment elements](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-AttachmentElement.html). These elements are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#formTemplate) or [form's](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm.html#formTemplate) `formTemplate`. The configured `formTemplate` automatically displays within the [Editor](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html) widget when editing attribute features.
|
|
9
9
|
*
|
|
10
10
|
* Possible Value | Description
|
|
11
11
|
* ---------------|-------------
|
|
12
12
|
* attachment | The user interface for an input to attach multiple different types of files.
|
|
13
|
-
* audio | The user interface for an
|
|
14
|
-
* document | The user interface for a
|
|
15
|
-
* image | The user interface for an
|
|
16
|
-
* signature | The user interface for a
|
|
17
|
-
* video | The user interface for a
|
|
13
|
+
* audio | The user interface for an [audio](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-inputs-attachments-AudioInput.html) input.
|
|
14
|
+
* document | The user interface for a [document](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-inputs-attachments-DocumentInput.html) input.
|
|
15
|
+
* image | The user interface for an [image](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-inputs-attachments-ImageInput.html) input.
|
|
16
|
+
* signature | The user interface for a [signature](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-inputs-attachments-SignatureInput.html) input.
|
|
17
|
+
* video | The user interface for a [video](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-inputs-attachments-VideoInput.html) input.
|
|
18
18
|
*
|
|
19
19
|
* @experimental
|
|
20
20
|
*/
|
package/geometry/Mesh.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export interface MeshProperties extends BaseGeometryProperties, EsriPromiseMixin
|
|
|
45
45
|
/**
|
|
46
46
|
* Object describing the attributes of each vertex of the mesh. Vertex attributes
|
|
47
47
|
* are flat numerical arrays that describe the position (mandatory), normal (used for
|
|
48
|
-
* lighting calculations and shading) and
|
|
48
|
+
* lighting calculations and shading) and UV (used for mapping material images to the
|
|
49
49
|
* mesh surface) for each vertex.
|
|
50
50
|
*
|
|
51
51
|
* Vertex attributes can be addressed by indices specified in the components
|
|
@@ -58,7 +58,7 @@ export interface MeshProperties extends BaseGeometryProperties, EsriPromiseMixin
|
|
|
58
58
|
* let mesh = new Mesh({ spatialReference: SpatialReference.WebMercator });
|
|
59
59
|
*
|
|
60
60
|
* // Specify vertices for two triangles that make up a square
|
|
61
|
-
* // around a provided point.
|
|
61
|
+
* // around a provided point. UV coordinates are set up to cover the square
|
|
62
62
|
* // from (0, 0) to (1, 1) from corner to corner.
|
|
63
63
|
* mesh.vertexAttributes = {
|
|
64
64
|
* position: [
|
|
@@ -89,7 +89,7 @@ export interface MeshProperties extends BaseGeometryProperties, EsriPromiseMixin
|
|
|
89
89
|
/**
|
|
90
90
|
* A mesh is a general, client-side 3D [Geometry](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Geometry.html) type
|
|
91
91
|
* composed of [vertices with attributes](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexAttributes). The vertices include
|
|
92
|
-
* geographic position, normals that affect lighting/shading and
|
|
92
|
+
* geographic position, normals that affect lighting/shading and UV coordinates that
|
|
93
93
|
* can be used to map images to the mesh. Vertices are combined into 3D primitives
|
|
94
94
|
* to render the mesh in the scene (only triangle primitives are currently supported).
|
|
95
95
|
*
|
|
@@ -115,7 +115,7 @@ export interface MeshProperties extends BaseGeometryProperties, EsriPromiseMixin
|
|
|
115
115
|
* <details>
|
|
116
116
|
* <summary>Read More</summary>
|
|
117
117
|
*
|
|
118
|
-
* It is typical for modern 3D GIS workflows that 3D geometry data be represented by 3D models, which can be stored in different file formats like
|
|
118
|
+
* It is typical for modern 3D GIS workflows that 3D geometry data be represented by 3D models, which can be stored in different file formats like glTF, OBJ, FBX, IFC, etc. These models can come from different sources, such as 3D modeling software like SketchUp or Blender, CAD software like Revit, or even custom mesh generation code.
|
|
119
119
|
*
|
|
120
120
|
* While some of the software may work in a georeferenced space and some of the file formats, such as IFC, may be georeferenced, much of the software and most of the model file formats are not georeferenced. This presents the challenge of expressing different georeferencing scenarios while maintaining a fast and efficient experience when displaying and editing 3D model content. In the Maps SDK we strive to strike a good balance between allowing our users to work with different scenarios while preventing situations in which good display and editing experience cannot be provided.
|
|
121
121
|
*
|
|
@@ -140,23 +140,23 @@ export interface MeshProperties extends BaseGeometryProperties, EsriPromiseMixin
|
|
|
140
140
|
*
|
|
141
141
|
* #### Mesh local vertex space
|
|
142
142
|
*
|
|
143
|
-
* Most popular 3D model formats, such as
|
|
143
|
+
* Most popular 3D model formats, such as glTF, are not georeferenced and represent the mesh vertex coordinates in a plain **local cartesian** space with some length unit (e.g. `meters` for glTF). The coordinate (0,0,0) is the origin. We call this coordinate system "local" and represent it using the [MeshLocalVertexSpace](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshLocalVertexSpace.html). The units in this vertex space are always "meters".
|
|
144
144
|
*
|
|
145
145
|
* <img src="https://developers.arcgis.com/javascript/latest/assets/img/apiref/geometry/mesh-local-vertex-space.png" style="width:300px;"/>
|
|
146
146
|
*
|
|
147
147
|
* *local vertex space*
|
|
148
148
|
*
|
|
149
|
-
* Georeferencing local coordinates is done by "putting them on the map" using a georeferenced cartesian reference frame. This frame is found by using the [local tangent plane](https://en.wikipedia.org/wiki/Local_tangent_plane_coordinates) at the georeferenced origin of the mesh. When the spatial reference uses a geographic coordinate system (GCS) or
|
|
149
|
+
* Georeferencing local coordinates is done by "putting them on the map" using a georeferenced cartesian reference frame. This frame is found by using the [local tangent plane](https://en.wikipedia.org/wiki/Local_tangent_plane_coordinates) at the georeferenced origin of the mesh. When the spatial reference uses a geographic coordinate system (GCS) or Web Mercator, the tangent plane is aligned such that the local Y tangent vector is always pointing to the north pole resulting in the east, north, up (ENU) frame.
|
|
150
150
|
*
|
|
151
|
-
* Currently we use the tangent plane of the sphere even for ellipsoidal geographic
|
|
151
|
+
* Currently we use the tangent plane of the sphere even for ellipsoidal geographic coordinate systems. This is a simplification we use as we render on a perfect sphere in global viewing mode.
|
|
152
152
|
*
|
|
153
153
|
* <img src="https://developers.arcgis.com/javascript/latest/assets/img/apiref/geometry/mesh-local-vertex-space-on-GCS-or-WM.png" style="width:300px;"/>
|
|
154
154
|
*
|
|
155
155
|
* *local vertex space on GCS or Web Mercator (ENU)*
|
|
156
156
|
*
|
|
157
|
-
* A [local vertex space](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshLocalVertexSpace.html) with a spatial reference which is a GCS or
|
|
157
|
+
* A [local vertex space](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshLocalVertexSpace.html) with a spatial reference which is a GCS or Web Mercator is efficient to work with as the tangent plane is easy to find and we can simply move the vertices to its georeferenced location using efficient linear transformations. This comes at the cost of an approximation error between the tangent plane and the actual surface. Consequently for larger models, this error increases while it decreases as the models get smaller.
|
|
158
158
|
*
|
|
159
|
-
* There is an important element to consider when a mesh is created with a [local vertex space](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshLocalVertexSpace.html) (e.g. by creating it from a
|
|
159
|
+
* There is an important element to consider when a mesh is created with a [local vertex space](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-support-MeshLocalVertexSpace.html) (e.g. by creating it from a glTF) and displayed in local viewing mode where a projected coordinate system (PCS) is used:
|
|
160
160
|
*
|
|
161
161
|
* The projection introduces a warping and distortion of the space in order to allow mapping of surface coordinates to a plane. This produces a mismatch between the linear coordinates of the local vertex space and the warped, non-linear coordinates of the underlying spatial reference. While steps along a line in the local vertex space are of same length, steps along a line in the underlying spatial reference are not. This means that measuring the same line in local space and the underlying spatial reference will produce different measurements. This difference further depends on the origin location of the mesh. It is important to realize that this scenario cannot be used when correct georeferencing is required.
|
|
162
162
|
*
|
|
@@ -180,9 +180,9 @@ export interface MeshProperties extends BaseGeometryProperties, EsriPromiseMixin
|
|
|
180
180
|
*
|
|
181
181
|
* ## Web Mercator
|
|
182
182
|
*
|
|
183
|
-
* Web Mercator is a spatial reference with a projected coordinate system and the
|
|
183
|
+
* Web Mercator is a spatial reference with a projected coordinate system and the de facto standard for web mapping applications. This is due to its suitability for efficient map tiling. Even though it uses a projected coordinate system, we still support using Web Mercator in global viewing mode. This is because of its importance for web mapping and also because projecting Web Mercator on the globe cancels out the strong distortions near the poles. It is the only PCS based spatial reference we support in global viewing mode.
|
|
184
184
|
*
|
|
185
|
-
* Web Mercator support for global viewing mode naturally extends to supporting efficient display and editing for meshes with a Web Mercator spatial reference and a local vertex space, even though it is based on a projected coordinate system. Since Web Mercator is a spatial reference based on a PCS, we also support efficient display and editing for Web Mercator with meshes using a georeferenced vertex space. Web Mercator is the only exception to the rule of only meshes with a spatial
|
|
185
|
+
* Web Mercator support for global viewing mode naturally extends to supporting efficient display and editing for meshes with a Web Mercator spatial reference and a local vertex space, even though it is based on a projected coordinate system. Since Web Mercator is a spatial reference based on a PCS, we also support efficient display and editing for Web Mercator with meshes using a georeferenced vertex space. Web Mercator is the only exception to the rule of only meshes with a spatial reference with a geographic coordinate system can be supported in global viewing mode.
|
|
186
186
|
*
|
|
187
187
|
* <span id="limitations"></span>
|
|
188
188
|
* ## Limitations
|
|
@@ -191,12 +191,12 @@ export interface MeshProperties extends BaseGeometryProperties, EsriPromiseMixin
|
|
|
191
191
|
*
|
|
192
192
|
* ## Troubleshooting mesh georeferencing
|
|
193
193
|
*
|
|
194
|
-
* If meshes are not being displayed, then chances are that this is due a configuration which the API does not support for display and editing.
|
|
194
|
+
* If meshes are not being displayed, then chances are that this is due to a configuration which the API does not support for display and editing.
|
|
195
195
|
*
|
|
196
|
-
* - First check the [SceneView#viewingMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#viewingMode), [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#spatialReference) and [vertex space](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexSpace) of the problematic mesh and consult the console of the
|
|
196
|
+
* - First check the [SceneView#viewingMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#viewingMode), [spatial reference](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#spatialReference) and [vertex space](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Mesh.html#vertexSpace) of the problematic mesh and consult the console of the JavaScript debugger. If the API rejects display of meshes, a warning message is printed.
|
|
197
197
|
* - If it is determined that an unsupported configuration is used, consider switching the [SceneView#viewingMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#viewingMode) in your application.
|
|
198
198
|
* - If there is no other option, consider changing the data by switching to a supported spatial reference for the required [SceneView#viewingMode](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#viewingMode) or by converting the mesh vertex data between local and georeferenced vertex space.
|
|
199
|
-
* - If meshes are displayed wrongly, then this could also be due to the vertex space not being correct. If applications export geometry with georeferenced coordinates as
|
|
199
|
+
* - If meshes are displayed wrongly, then this could also be due to the vertex space not being correct. If applications export geometry with georeferenced coordinates as OBJ file for example, then one would need to use the `"georeferenced"` vertex space.
|
|
200
200
|
*
|
|
201
201
|
* </details>
|
|
202
202
|
*
|
|
@@ -354,8 +354,7 @@ export default class Mesh extends MeshSuperclass {
|
|
|
354
354
|
* contain a z-value, z is assumed to be `0`.
|
|
355
355
|
* @param url - The URL of the glTF model. The URL should point to a glTF file (.gltf or .glb) which can
|
|
356
356
|
* reference additional binary (.bin) and image files (.jpg, .png).
|
|
357
|
-
* @param parameters - Parameters to configure the mesh from
|
|
358
|
-
* gltf creation.
|
|
357
|
+
* @param parameters - Parameters to configure the mesh from glTF creation.
|
|
359
358
|
* @returns A promise that resolves to a mesh geometry representing the loaded
|
|
360
359
|
* glTF model.
|
|
361
360
|
* @since 4.11
|
|
@@ -365,7 +364,7 @@ export default class Mesh extends MeshSuperclass {
|
|
|
365
364
|
* Creates a new mesh geometry from a polygon geometry. The resulting mesh contains only
|
|
366
365
|
* a position vertex attribute and a single component with faces. The default shading will be
|
|
367
366
|
* set to `flat`. The spatial reference of the resulting mesh is the same
|
|
368
|
-
* as the input polygon. The resulting mesh will not contain any
|
|
367
|
+
* as the input polygon. The resulting mesh will not contain any UV nor normal vertex attributes.
|
|
369
368
|
*
|
|
370
369
|
* @param polygon - The input polygon.
|
|
371
370
|
* @param parameters - Optional parameters.
|
|
@@ -451,7 +450,7 @@ export default class Mesh extends MeshSuperclass {
|
|
|
451
450
|
/**
|
|
452
451
|
* Object describing the attributes of each vertex of the mesh. Vertex attributes
|
|
453
452
|
* are flat numerical arrays that describe the position (mandatory), normal (used for
|
|
454
|
-
* lighting calculations and shading) and
|
|
453
|
+
* lighting calculations and shading) and UV (used for mapping material images to the
|
|
455
454
|
* mesh surface) for each vertex.
|
|
456
455
|
*
|
|
457
456
|
* Vertex attributes can be addressed by indices specified in the components
|
|
@@ -464,7 +463,7 @@ export default class Mesh extends MeshSuperclass {
|
|
|
464
463
|
* let mesh = new Mesh({ spatialReference: SpatialReference.WebMercator });
|
|
465
464
|
*
|
|
466
465
|
* // Specify vertices for two triangles that make up a square
|
|
467
|
-
* // around a provided point.
|
|
466
|
+
* // around a provided point. UV coordinates are set up to cover the square
|
|
468
467
|
* // from (0, 0) to (1, 1) from corner to corner.
|
|
469
468
|
* mesh.vertexAttributes = {
|
|
470
469
|
* position: [
|
|
@@ -498,7 +497,7 @@ export default class Mesh extends MeshSuperclass {
|
|
|
498
497
|
*/
|
|
499
498
|
addComponent(component: MeshComponentProperties): void;
|
|
500
499
|
/**
|
|
501
|
-
* Centers the mesh at the specified location without changing its scale. This effectively
|
|
500
|
+
* Centers the mesh at the specified location without changing its scale. This effectively adjusts the mesh
|
|
502
501
|
* origin and mesh vertices such that vertices are given relative to the new location and the new location
|
|
503
502
|
* is the new origin. The effective georeferenced vertex positions will not change.
|
|
504
503
|
*
|
|
@@ -564,7 +563,7 @@ export default class Mesh extends MeshSuperclass {
|
|
|
564
563
|
*/
|
|
565
564
|
scale(factor: number, parameters?: ScaleParameters): this;
|
|
566
565
|
/**
|
|
567
|
-
* Export a mesh to a binary glTF (glb) representation. The resulting
|
|
566
|
+
* Export a mesh to a binary glTF (glb) representation. The resulting ArrayBuffer could be uploaded
|
|
568
567
|
* to a service or give an application the option to download a representation of the mesh.
|
|
569
568
|
*
|
|
570
569
|
* @param options - Additional options.
|
package/geometry/Polygon.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export default class Polygon extends BaseGeometry {
|
|
|
51
51
|
/**
|
|
52
52
|
* The centroid of the polygon. For a polygon with multiple rings, it represents the centroid of the largest ring.
|
|
53
53
|
*
|
|
54
|
-
* @deprecated since 4.34. Please use [execute()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-centroidOperator.html#execute) instead.
|
|
54
|
+
* @deprecated since version 4.34. Please use [execute()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-centroidOperator.html#execute) instead.
|
|
55
55
|
*/
|
|
56
56
|
get centroid(): Point | null | undefined;
|
|
57
57
|
/**
|
|
@@ -79,13 +79,6 @@ export default class Polygon extends BaseGeometry {
|
|
|
79
79
|
* });
|
|
80
80
|
*/
|
|
81
81
|
accessor curveRings: object[][] | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* Checks to see if polygon rings cross each other and indicates if the polygon is
|
|
84
|
-
* self-intersecting, which means the ring of the polygon crosses itself.
|
|
85
|
-
*
|
|
86
|
-
* @deprecated since 4.33. Please use [isSimple()](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-simplifyOperator.html#isSimple) instead.
|
|
87
|
-
*/
|
|
88
|
-
get isSelfIntersecting(): boolean;
|
|
89
82
|
/**
|
|
90
83
|
* An array of rings. Each ring is a two-dimensional array of numbers representing the coordinates of
|
|
91
84
|
* each vertex in the ring in the spatial reference of the view. The first vertex of each ring should always be
|
package/geometry/Polygon.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{__decorate as t}from"tslib";import{equals as e}from"../core/arrayUtils.js";import{deprecatedProperty as r}from"../core/deprecate.js";import{clone as i}from"../core/lang.js";import s from"../core/Logger.js";import{property as n,subclass as o}from"../core/accessorSupport/decorators.js";import a from"./Extent.js";import l from"./Geometry.js";import
|
|
5
|
+
import{__decorate as t}from"tslib";import{equals as e}from"../core/arrayUtils.js";import{deprecatedProperty as r}from"../core/deprecate.js";import{clone as i}from"../core/lang.js";import s from"../core/Logger.js";import{property as n,subclass as o}from"../core/accessorSupport/decorators.js";import a from"./Extent.js";import l from"./Geometry.js";import h from"./Point.js";import c from"./SpatialReference.js";import{polygonCentroidPoint as p}from"./support/centroid.js";import{polygonContainsPoint as u}from"./support/contains.js";import{isClockwise as m}from"./support/coordsUtils.js";import{getPolygonExtent as f}from"./support/extentUtils.js";import{project as g}from"./support/webMercatorUtils.js";import{updateSupportFromPoint as y}from"./support/zmUtils.js";import{writer as R}from"../core/accessorSupport/decorators/writer.js";var d;function w(t){return!Array.isArray(t[0])}function v(t){return"number"==typeof t[0]?.[0]}function x(t){if(!t)return;let{rings:e,hasM:r,hasZ:i,spatialReference:s}=t;switch(e??=[],v(e)&&(e=[e]),e[0]?.[0]?.length){case 4:i??=!0,r??=!0;break;case 3:i??=!0!==r,r??=!i;break;default:i??=!1,r??=!1}return s??=c.WGS84,{...t,hasM:r,hasZ:i,rings:e,spatialReference:s}}let j=d=class extends l{static fromExtent(t){const e=t.clone().normalize(),{spatialReference:r}=t;let i=!1,s=!1;for(const o of e)o.hasZ&&(i=!0),o.hasM&&(s=!0);const n={rings:e.map(t=>{const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(i&&t.hasZ){const r=t.zmin+.5*(t.zmax-t.zmin);for(let t=0;t<e.length;t++)e[t].push(r)}if(s&&t.hasM){const r=t.mmin+.5*(t.mmax-t.mmin);for(let t=0;t<e.length;t++)e[t].push(r)}return e}),spatialReference:r};return i&&(n.hasZ=!0),s&&(n.hasM=!0),new d(n)}constructor(t){super(x(t)),this.curveRings=void 0,this.rings=[],this.type="polygon"}get cache(){return this.commitProperty("curveRings"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("rings"),this.commitProperty("spatialReference"),{}}get centroid(){r(s.getLogger(this),"centroid",{replacement:"Please use centroidOperator.execute() instead.",version:"4.34",warnOnce:!0});const t=p(this);return t?h.fromJSON(t):null}writeCurveRings(t,e){e.curveRings=i(t)}get extent(){const t=f(this),{spatialReference:e}=this;return t?new a({...t,spatialReference:e}):null}writeRings(t,e){e.rings=i(this.rings)}addRing(t){if(!t)return;const e=this.rings,r=e.length;if(w(t)){const i=[];for(let e=0,r=t.length;e<r;e++)i[e]=t[e].toArray();e[r]=i}else e[r]=t.slice();return this.notifyChange("rings"),this}clone(){const t=new d;return t.spatialReference=this.spatialReference,t.rings=i(this.rings),t.curveRings=i(this.curveRings),t.hasZ=this.hasZ,t.hasM=this.hasM,t}equals(t){if(this===t)return!0;if(null==t)return!1;const r=this.spatialReference,i=t.spatialReference;if(null!=r!=(null!=i))return!1;if(null!=r&&null!=i&&!r.equals(i))return!1;if(this.rings.length!==t.rings.length)return!1;const s=([t,e,r,i],[s,n,o,a])=>t===s&&e===n&&(null==r&&null==o||r===o)&&(null==i&&null==a||i===a);for(let n=0;n<this.rings.length;n++){const r=this.rings[n],i=t.rings[n];if(!e(r,i,s))return!1}return!0}contains(t){if(!t)return!1;const e=g(t,this.spatialReference);return u(this,null!=e?e:t)}isClockwise(t){const e=w(t)?t.map(t=>this.hasZ?this.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y]):t;return m(e)}getPoint(t,e){if(!this._validateInputs(t,e))return null;const r=this.rings[t][e],i=this.hasZ,s=this.hasM;return i&&!s?new h(r[0],r[1],r[2],void 0,this.spatialReference):s&&!i?new h(r[0],r[1],void 0,r[2],this.spatialReference):i&&s?new h(r[0],r[1],r[2],r[3],this.spatialReference):new h(r[0],r[1],this.spatialReference)}insertPoint(t,e,r){return this._validateInputs(t,e,!0)?(y(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[t].splice(e,0,r),this.notifyChange("rings"),this):this}removePoint(t,e){if(!this._validateInputs(t,e))return null;const r=new h(this.rings[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("rings"),r}removeRing(t){if(!this._validateInputs(t,null))return null;const e=this.rings.splice(t,1)[0],r=this.spatialReference,i=e.map(t=>new h(t,r));return this.notifyChange("rings"),i}setPoint(t,e,r){return this._validateInputs(t,e)?(y(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[t][e]=r,this.notifyChange("rings"),this):this}_validateInputs(t,e,r=!1){if(null==t||t<0||t>=this.rings.length)return!1;if(null!=e){const i=this.rings[t];if(r&&(e<0||e>i.length))return!1;if(!r&&(e<0||e>=i.length))return!1}return!0}toJSON(t){return this.write({},t)}};t([n({readOnly:!0})],j.prototype,"cache",null),t([n({readOnly:!0})],j.prototype,"centroid",null),t([n({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],j.prototype,"curveRings",void 0),t([R("curveRings")],j.prototype,"writeCurveRings",null),t([n({readOnly:!0})],j.prototype,"extent",null),t([n({type:[[[Number]]],json:{write:{isRequired:!0}}})],j.prototype,"rings",void 0),t([R("rings")],j.prototype,"writeRings",null),j=d=t([o("esri.geometry.Polygon")],j),j.prototype.toJSON.isDefaultToJSON=!0;export{j as default};
|