@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.
Files changed (310) hide show
  1. package/Map.d.ts +3 -1
  2. package/analysis/Analysis.d.ts +1 -0
  3. package/analysis/Dimension/types.d.ts +1 -0
  4. package/analysis/DimensionAnalysis.d.ts +10 -10
  5. package/analysis/DimensionSimpleStyle.d.ts +14 -13
  6. package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
  7. package/analysis/DistanceMeasurementAnalysis.d.ts +2 -1
  8. package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +3 -3
  9. package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +1 -1
  10. package/analysis/ElevationProfile/types.d.ts +2 -0
  11. package/analysis/LengthDimension.d.ts +22 -21
  12. package/analysis/LineOfSightAnalysis.d.ts +2 -2
  13. package/analysis/ShadowCast/MinDurationOptions.d.ts +2 -2
  14. package/analysis/ShadowCast/types.d.ts +6 -2
  15. package/analysis/Slice/types.d.ts +1 -0
  16. package/analysis/Viewshed.d.ts +22 -20
  17. package/analysis/ViewshedAnalysis.d.ts +13 -13
  18. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -2
  19. package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +2 -2
  20. package/analysis/VolumeMeasurement/types.d.ts +1 -0
  21. package/analysis/VolumeMeasurementAnalysis.d.ts +1 -0
  22. package/analysis/types.d.ts +5 -0
  23. package/arcade.d.ts +2 -2
  24. package/assets/esri/core/workers/RemoteClient.js +1 -1
  25. package/assets/esri/core/workers/chunks/04364f3dd7578c2acb71.js +1 -0
  26. package/assets/esri/core/workers/chunks/18ed69d563986dc2eb21.js +1 -0
  27. package/assets/esri/core/workers/chunks/{4c04c54330b693892cfc.js → 1a45b4b4803337f4b99f.js} +2 -2
  28. package/assets/esri/core/workers/chunks/{60c7f896f2246a8aa6d7.js → 244006d4b0547d574401.js} +53 -53
  29. package/assets/esri/core/workers/chunks/329b10897c6965948b84.js +1 -0
  30. package/assets/esri/core/workers/chunks/4387aaf9d5e8f6d1833d.js +1 -0
  31. package/assets/esri/core/workers/chunks/{944dfa9309da8f49a616.js → 6a3d66d7c92f90cc2a17.js} +1 -1
  32. package/assets/esri/core/workers/chunks/760a759f9697adde6dd4.js +1 -0
  33. package/assets/esri/core/workers/chunks/798d227205bd958de6a7.js +1 -0
  34. package/assets/esri/core/workers/chunks/{9d88b4ba8e511da64583.js → 98d68b145226e7527c84.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{8ad6595ad44c2d60c1ce.js → a79fad422d41019c8232.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{10e474d664b20adcd917.js → db4661fd82dc61162115.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{1d1e25bb61eeeee8ee94.js → df2ba5f9d57080fca183.js} +1 -1
  38. package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +5 -3
  39. package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +15 -11
  40. package/assets/esri/themes/dark/main.css +1 -1
  41. package/assets/esri/themes/light/main.css +1 -1
  42. package/assets/esri/themes/light/view.css +1 -1
  43. package/chunks/ComponentShader.glsl.js +43 -43
  44. package/chunks/DefaultMaterial.glsl.js +1 -1
  45. package/config.js +1 -1
  46. package/form/elements/inputs/attachments/Input.d.ts +6 -6
  47. package/geometry/Mesh.d.ts +20 -21
  48. package/geometry/Polygon.d.ts +1 -8
  49. package/geometry/Polygon.js +1 -1
  50. package/geometry/geometryEngine.d.ts +19 -19
  51. package/geometry/support/MeshComponent.d.ts +3 -3
  52. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +2 -2
  53. package/geometry/support/MeshLocalVertexSpace.d.ts +2 -2
  54. package/geometry/support/MeshMaterial.d.ts +8 -8
  55. package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
  56. package/geometry/support/MeshTexture.d.ts +3 -3
  57. package/geometry/support/MeshTextureTransform.d.ts +3 -3
  58. package/geometry/support/MeshTransform.d.ts +1 -1
  59. package/geometry/support/MeshVertexAttributes.d.ts +13 -5
  60. package/geometry/support/intersects.js +1 -1
  61. package/geometry/support/intersectsBase.js +1 -1
  62. package/geometry/support/meshUtils/centerAt.js +1 -1
  63. package/geometry/support/meshUtils/geographicUtils.js +1 -1
  64. package/geometry/support/meshUtils/georeference.js +1 -1
  65. package/geometry/support/meshUtils/rotate.js +1 -1
  66. package/geometry/support/meshUtils/scale.js +1 -1
  67. package/geometry/support/meshUtils/types.d.ts +44 -52
  68. package/geometry/support/meshUtils.d.ts +6 -50
  69. package/geometry/support/meshUtils.js +1 -1
  70. package/interfaces.d.ts +5 -151
  71. package/kernel.js +1 -1
  72. package/layers/BaseDynamicLayer.d.ts +2 -2
  73. package/layers/BaseElevationLayer.d.ts +2 -2
  74. package/layers/BuildingSceneLayer.d.ts +2 -2
  75. package/layers/CSVLayer.d.ts +2 -2
  76. package/layers/CatalogLayer.d.ts +2 -2
  77. package/layers/DimensionLayer.d.ts +2 -2
  78. package/layers/ElevationLayer.d.ts +2 -2
  79. package/layers/FeatureLayer.d.ts +2 -2
  80. package/layers/GeoJSONLayer.d.ts +2 -2
  81. package/layers/GeoRSSLayer.d.ts +2 -2
  82. package/layers/GraphicsLayer.d.ts +2 -2
  83. package/layers/GroupLayer.d.ts +2 -2
  84. package/layers/ImageryLayer.d.ts +2 -2
  85. package/layers/ImageryTileLayer.d.ts +2 -2
  86. package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -2
  87. package/layers/IntegratedMeshLayer.d.ts +2 -2
  88. package/layers/KMLLayer.d.ts +2 -2
  89. package/layers/Layer.d.ts +9 -7
  90. package/layers/LineOfSightLayer.d.ts +3 -3
  91. package/layers/MapImageLayer.d.ts +2 -2
  92. package/layers/MapNotesLayer.d.ts +2 -2
  93. package/layers/MediaLayer.d.ts +2 -2
  94. package/layers/OGCFeatureLayer.d.ts +2 -2
  95. package/layers/OrientedImageryLayer.d.ts +2 -2
  96. package/layers/ParquetLayer.d.ts +2 -2
  97. package/layers/PointCloudLayer.d.ts +2 -2
  98. package/layers/RouteLayer.d.ts +2 -2
  99. package/layers/SceneLayer.d.ts +2 -2
  100. package/layers/SubtypeGroupLayer.d.ts +2 -2
  101. package/layers/TileLayer.d.ts +2 -2
  102. package/layers/UnknownLayer.d.ts +2 -2
  103. package/layers/UnsupportedLayer.d.ts +2 -2
  104. package/layers/VectorTileLayer.d.ts +2 -2
  105. package/layers/VideoLayer.d.ts +2 -2
  106. package/layers/ViewshedLayer.d.ts +2 -2
  107. package/layers/VoxelLayer.d.ts +2 -2
  108. package/layers/WCSLayer.d.ts +2 -2
  109. package/layers/WFSLayer.d.ts +2 -2
  110. package/layers/WMSLayer.d.ts +2 -2
  111. package/layers/WMTSLayer.d.ts +2 -2
  112. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -2
  113. package/layers/catalog/CatalogFootprintLayer.d.ts +2 -2
  114. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  115. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  116. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  117. package/layers/orientedImagery/transformations/utils.js +1 -1
  118. package/layers/raster/types.d.ts +8 -1
  119. package/layers/support/PixelBlock.d.ts +7 -7
  120. package/layers/support/RasterInfo.d.ts +2 -9
  121. package/layers/types.d.ts +77 -2
  122. package/networks/support/CircuitSection.d.ts +20 -2
  123. package/networks/support/CircuitSection.js +1 -1
  124. package/networks/support/Subcircuit.d.ts +12 -10
  125. package/networks/support/Subcircuit.js +1 -1
  126. package/networks/support/typeUtils.d.ts +2 -0
  127. package/networks/support/typeUtils.js +1 -1
  128. package/package.json +2 -2
  129. package/rest/support/AttributeBinsQuery.d.ts +7 -1
  130. package/rest/support/NormalizationBinParametersMixin.d.ts +29 -9
  131. package/support/revision.js +1 -1
  132. package/symbols/patterns/LinePattern3D.d.ts +3 -3
  133. package/symbols/patterns/Pattern3D.d.ts +3 -3
  134. package/unionTypes.d.ts +17 -17
  135. package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +6 -5
  136. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +7 -6
  137. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  138. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  139. package/views/2d/types.d.ts +1 -1
  140. package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +2 -2
  141. package/views/3d/analysis/DirectLineMeasurement/types.d.ts +1 -0
  142. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  143. package/views/3d/analysis/VolumeMeasurement/types.d.ts +1 -0
  144. package/views/3d/analysis/types.d.ts +2 -0
  145. package/views/3d/constraints/Constraints.d.ts +2 -2
  146. package/views/3d/environment/ChapmanApproximation.glsl.js +1 -1
  147. package/views/3d/environment/CloudsComposition.js +1 -1
  148. package/views/3d/environment/Fog.js +1 -1
  149. package/views/3d/layers/DimensionLayerView3D.js +1 -1
  150. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  151. package/views/3d/layers/I3SMeshView3D.js +1 -1
  152. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  153. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  154. package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
  155. package/views/3d/layers/ViewshedLayerView3D.js +1 -1
  156. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  157. package/views/3d/support/LayerPerformanceInfo.d.ts +1 -1
  158. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  159. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  160. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  161. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  162. package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
  163. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  164. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  165. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  166. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js +1 -1
  167. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  168. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
  169. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +7 -7
  170. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  171. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  172. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  173. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  174. package/views/3d/webgl-engine/materials/ViewingModeConfiguration.js +5 -0
  175. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +2 -2
  176. package/views/BreakpointsOwner.d.ts +9 -10
  177. package/views/MapView.d.ts +18 -17
  178. package/views/SceneView.d.ts +30 -89
  179. package/views/SceneView.js +1 -1
  180. package/views/View2D.d.ts +0 -37
  181. package/views/View2D.js +1 -1
  182. package/views/ViewAnimation.d.ts +2 -3
  183. package/views/analysis/ElevationProfile/types.d.ts +7 -6
  184. package/views/analysis/types.d.ts +1 -0
  185. package/views/animation/types.d.ts +3 -1
  186. package/views/layers/DimensionLayerView.d.ts +97 -4
  187. package/views/layers/DimensionLayerView.js +1 -1
  188. package/views/layers/HighlightLayerViewMixin.d.ts +1 -59
  189. package/views/layers/HighlightLayerViewMixin.js +1 -1
  190. package/views/layers/ImageryLayerViewMixin.d.ts +1 -55
  191. package/views/layers/LineOfSightLayerView.d.ts +77 -4
  192. package/views/layers/LineOfSightLayerView.js +1 -1
  193. package/views/layers/ViewshedLayerView.d.ts +96 -5
  194. package/views/layers/ViewshedLayerView.js +1 -1
  195. package/views/navigation/Navigation.d.ts +1 -22
  196. package/views/navigation/Navigation.js +1 -1
  197. package/views/support/Scheduler.js +1 -1
  198. package/views/types.d.ts +75 -5
  199. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +4 -4
  200. package/widgets/AreaMeasurement3D.d.ts +2 -2
  201. package/widgets/BasemapGallery.d.ts +1 -1
  202. package/widgets/BasemapToggle.d.ts +1 -1
  203. package/widgets/Bookmarks.d.ts +1 -1
  204. package/widgets/BuildingExplorer/BuildingExplorerViewModel.d.ts +2 -2
  205. package/widgets/BuildingExplorer/BuildingLevel.d.ts +2 -2
  206. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.d.ts +2 -2
  207. package/widgets/BuildingExplorer/BuildingPhase.d.ts +2 -2
  208. package/widgets/BuildingExplorer.d.ts +3 -3
  209. package/widgets/Compass.d.ts +1 -1
  210. package/widgets/CoordinateConversion.d.ts +1 -1
  211. package/widgets/Daylight/DaylightViewModel.d.ts +3 -3
  212. package/widgets/Daylight/VisibleElements.d.ts +2 -2
  213. package/widgets/Daylight/types.d.ts +2 -2
  214. package/widgets/Daylight.d.ts +3 -3
  215. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +4 -4
  216. package/widgets/DirectLineMeasurement3D.d.ts +2 -2
  217. package/widgets/DirectionalPad.d.ts +1 -1
  218. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
  219. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
  220. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
  221. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
  222. package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +3 -3
  223. package/widgets/ElevationProfile/ElevationProfileViewModel.d.ts +2 -2
  224. package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +2 -2
  225. package/widgets/ElevationProfile/types.d.ts +9 -9
  226. package/widgets/ElevationProfile.d.ts +2 -2
  227. package/widgets/Expand/ExpandViewModel.d.ts +1 -1
  228. package/widgets/Expand.d.ts +1 -1
  229. package/widgets/Feature.d.ts +1 -1
  230. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
  231. package/widgets/Features.d.ts +1 -1
  232. package/widgets/Fullscreen/FullscreenViewModel.d.ts +1 -1
  233. package/widgets/Fullscreen.d.ts +1 -1
  234. package/widgets/Home.d.ts +1 -1
  235. package/widgets/LayerList.d.ts +12 -0
  236. package/widgets/Legend.d.ts +1 -1
  237. package/widgets/LineOfSight/LineOfSightTarget.d.ts +2 -2
  238. package/widgets/LineOfSight/LineOfSightViewModel.d.ts +2 -2
  239. package/widgets/LineOfSight.d.ts +2 -2
  240. package/widgets/Locate/LocateViewModel.d.ts +1 -1
  241. package/widgets/Locate.d.ts +1 -1
  242. package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
  243. package/widgets/NavigationToggle.d.ts +1 -1
  244. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  245. package/widgets/OrientedImageryViewer/components/Arrow.js +1 -1
  246. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  247. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  248. package/widgets/OrientedImageryViewer/components/NavigationNode.js +1 -1
  249. package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
  250. package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
  251. package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
  252. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  253. package/widgets/OrientedImageryViewer/constants.js +1 -1
  254. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  255. package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +1 -1
  256. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  257. package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +5 -0
  258. package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
  259. package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +1 -1
  260. package/widgets/OrientedImageryViewer/support/resolveMediaProps.js +5 -0
  261. package/widgets/OrientedImageryViewer/utils.js +1 -1
  262. package/widgets/OrientedImageryViewer.js +1 -1
  263. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  264. package/widgets/PanoramicViewer.js +1 -1
  265. package/widgets/Print/CustomTemplate.d.ts +1 -1
  266. package/widgets/Print/PrintViewModel.d.ts +1 -1
  267. package/widgets/Print.d.ts +1 -1
  268. package/widgets/ScaleBar.d.ts +1 -1
  269. package/widgets/Search.d.ts +1 -1
  270. package/widgets/ShadowCast/DiscreteOptions.d.ts +2 -2
  271. package/widgets/ShadowCast/DurationOptions.d.ts +2 -2
  272. package/widgets/ShadowCast/ShadowCastViewModel.d.ts +3 -3
  273. package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +2 -2
  274. package/widgets/ShadowCast/ThresholdOptions.d.ts +2 -2
  275. package/widgets/ShadowCast/types.d.ts +2 -2
  276. package/widgets/ShadowCast.d.ts +1 -1
  277. package/widgets/Slice/SliceViewModel.d.ts +2 -2
  278. package/widgets/Slice.d.ts +2 -2
  279. package/widgets/Swipe.d.ts +1 -1
  280. package/widgets/TimeZoneLabel.d.ts +1 -1
  281. package/widgets/Track.d.ts +1 -1
  282. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  283. package/widgets/VideoPlayer.d.ts +1 -1
  284. package/widgets/VideoPlayer.js +1 -1
  285. package/widgets/Weather/VisibleElements.d.ts +2 -2
  286. package/widgets/Weather/WeatherViewModel.d.ts +2 -2
  287. package/widgets/Weather/types.d.ts +1 -1
  288. package/widgets/Weather.d.ts +2 -2
  289. package/widgets/Zoom.d.ts +1 -1
  290. package/widgets/support/GridControls.d.ts +1 -1
  291. package/assets/esri/core/workers/chunks/35961e71f69ae1d24b9e.js +0 -1
  292. package/assets/esri/core/workers/chunks/3cce8e894bf37c3e598e.js +0 -1
  293. package/assets/esri/core/workers/chunks/7ee68f67f9cc48a328f0.js +0 -1
  294. package/assets/esri/core/workers/chunks/a931515a2569713e743b.js +0 -1
  295. package/assets/esri/core/workers/chunks/bb4574a87ca21e719f0d.js +0 -1
  296. package/assets/esri/core/workers/chunks/c9f868f85d740ee32715.js +0 -1
  297. package/geometry.d.ts +0 -136
  298. package/geometry.js +0 -5
  299. package/pointCloudRenderers.d.ts +0 -112
  300. package/pointCloudRenderers.js +0 -5
  301. package/rasterRenderers.d.ts +0 -151
  302. package/rasterRenderers.js +0 -5
  303. package/renderers.d.ts +0 -166
  304. package/renderers.js +0 -5
  305. package/views/layers/DimensionLayerViewMixin.d.ts +0 -1
  306. package/views/layers/DimensionLayerViewMixin.js +0 -5
  307. package/views/layers/LineOfSightLayerViewMixin.d.ts +0 -1
  308. package/views/layers/LineOfSightLayerViewMixin.js +0 -5
  309. package/views/layers/ViewshedLayerViewMixin.d.ts +0 -98
  310. 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{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as o,mars as r,moon as a}from"../geometry/support/Ellipsoid.js";import{ComponentData as i}from"../views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js";import{ForwardLinearDepthToWriteShadowMap as l}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{isColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as d}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{VertexPosition as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as m}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as v}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{ReadDepth as h}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{computeFragmentNormals as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as b,addLightingGlobalFactor as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as C,addMainLightDirection as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRenderingParameters as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{PiUtils as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{ReadBaseColorTexture as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{OverlayIM as N}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{DiscardOrAdjustAlphaDraw as T}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{BooleanDrawUniform as D}from"../views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js";import{If as M,glsl as R}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as P}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{SnowCover as W}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{outputColorHighlightOLID as A}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{sphereDepthInterpolate as F}from"../views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js";import{ShaderBuilder as U}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as V}from"../webscene/support/AlphaCutoff.js";function z(z){const B=new U,{vertex:E,fragment:_}=B;B.include(c,z),B.include(g,z),B.include(d,z),B.include(s,z),B.include(i,z),B.include(T,z),_.include(n,z),B.include(O,z),B.include($,z);const{output:I,pbrMode:G,hasNormalTexture:H,snowCover:k,receiveShadows:q,shadeNormals:J,spherical:K,sphericalSR:Q,ellipsoidMode:X,overlayEnabled:Y,componentData:Z,vertexDiscardMode:ee,renderOccluded:oe,isGroundSlice:re}=z,ae=1===G||2===G;ae&&(B.include(L,z),H&&B.include(f,z));const ie=3===I||4===I||5===I,le=ie&&1===Z,te=1===X,ne=1===X?o.radius:te?r.radius:a.radius;Y&&(_.include(b,z),B.include(N,z),E.include(j),E.uniforms.add(new D("useENUForGlobalOverlayUV",e=>e.useENUForGlobalOverlayUV)),_.uniforms.add(new D("useENUForGlobalOverlayUV",e=>e.useENUForGlobalOverlayUV)),E.code.add(`\n ${M(K,`const float invRadius = ${R.float(1/ne)};`)}\n vec2 projectOverlay(vec3 pos) { return pos.xy ${M(K,"/ (1.0 + invRadius * pos.z);")}; }\n `));const se=Y&&t(I)&&4===G;se&&(B.varyings.add("tbnTangent","vec3"),B.varyings.add("tbnBiTangent","vec3"),B.varyings.add("groundNormal","vec3"));const de=0===ee,ge=2===ee,ce=1-1/255;if(B.include(S,z),B.include(l,z),E.main.add(R`
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
- ${M(le,"if(!castShadows) { gl_Position = vec4(vec3(1e38), 1.0); return; }")}
9
- ${M(!de,`{ if (externalColor.a ${ge?">":"<="} ${R.float(ce)}) { gl_Position = vec4(vec3(1e38), 1.0); return; } }`)}
10
- ${M(9===I,"externalColor.a = 1.0;")}
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
- ${M(se,K?R`
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));`:R`
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
- ${M(Y,M(K,"\n if (useENUForGlobalOverlayUV) {\n setOverlayVTC(projectOverlay(position));\n } else {\n vtcOverlay = vec4(0.0); // Definite assignment\n }\n ","setOverlayVTC(projectOverlay(position));"))}
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 < ${R.float(V)}) {
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
- `),t(I))return B.include(p,z),B.include(w,z),_.include(b,z),B.include(A,z),_.include(W,z),_.code.add(R`
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 ${q?"readShadowMap(vPositionWorldCameraRelative, linearDepth)":"0.0"};
38
- }`),_.main.add(R`
39
- ${M(!re,"discardBySlice(vPositionWorldCameraRelative);")}
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
- ${M(oe,R`textureColor = vec4(0);`)}
49
+ ${$(Y,T`textureColor = vec4(0);`)}
49
50
 
50
- ${M(Y,R`
51
- ${M(K,R`
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
- ${M(1===Q,R`
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
- `,R`
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
- `,R`vec4 overlayUVs = vtcOverlay;`)}
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
- ${M(oe,R`if (overlayColor.a < ${R.float(V)}) { discard; }`)}
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
- `),ae?(C(_),K&&y(_),_.main.add(R`
93
+ `),ee?(b(B),q&&p(B),B.main.add(T`
94
94
  applyPBRFactors();
95
- ${M(1===G,R`if (externalColorMixMode == 3) {
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
- ${M(H,"mat3 tangentSpace = computeTangentSpace(fragmentFaceNormal, vPositionWorldCameraRelative, vuv0);")}
100
- vec3 shadingNormal = ${H?"computeTextureNormal(tangentSpace, vuv0)":"fragmentShadingNormal"};
101
- vec3 groundNormal = ${K?R`normalize(positionWorld())`:R`vec3(0.0, 0.0, 1.0)`};
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
- ${M(k,R`float snow = getSnow(fragmentFaceNormal, normalize(positionWorld()));
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
- ${M(Y,"materialColor = materialColor * (1.0 - overlayColor.a) + overlayColor;")}
109
+ ${$(K,"materialColor = materialColor * (1.0 - overlayColor.a) + overlayColor;")}
110
110
 
111
111
  vec3 additionalLight = evaluateAdditionalLighting(ssao, positionWorld());
112
- ${M(K,"float additionalAmbientScale = additionalDirectedAmbientLight(positionWorld());")}
113
- ${K?R`float shadow = max(lightingGlobalFactor * (1.0 - additionalAmbientScale), evaluateShadow());`:"float shadow = evaluateShadow();"}
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
- `)):(x(_),K&&y(_),se&&_.uniforms.add(new P("ovNormalTex",e=>e.overlay?.getTexture(3))),_.main.add(R`
116
- ${M(K,"float additionalAmbientScale = additionalDirectedAmbientLight(positionWorld());")}
117
- float shadow = ${q?K?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), evaluateShadow())":"evaluateShadow()":K?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
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
- ${M(q&&!J,R`
119
+ ${$(H&&!k,T`
120
120
  float dotFL = dot(fragmentFaceNormal, mainLightDirection);
121
121
  if( dotFL <= 0.0) shadow = 1.0;
122
122
  `)}
123
- ${M(k,R`float snow = getSnow(fragmentFaceNormal, normalize(positionWorld()));
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
- ${M(Y,"materialColor = materialColor * (1.0 - overlayColor.a) + overlayColor;")}
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
- ${M(se,R`vec4 overlayWaterMask = getOverlayColor(ovNormalTex, vtcOverlay);
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
- `)),_.main.add(`\n ${M(re,"if(rejectBySlice(vPositionWorldCameraRelative)) shadedColor.a *= groundSliceOpacity;")}\n\n outputColorHighlightOLID(shadedColor, vPositionWorldCameraRelative, materialColor.rgb ${M(k,", snow")});\n `),z.sphereDepthInterpolate&&(B.include(F,{radius:ne*e}),B.fragment.include(h),_.main.add(R`if (sphereFade()>0.0) {
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
- }`)),B;const me=2===I,ve=9===I,ue=8===I,he=ie||6===I||7===I;return he&&B.include(m,z),me&&B.include(w,z),Y&&B.include(u,z),B.include(v,z),_.main.add(R`
149
- ${M(!re,"discardBySlice(vPositionWorldCameraRelative);")}
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
- ${M(he,"outputDepth(linearDepth);")}
155
- ${M(me,R`fragColor = vec4(vec3(0.5) + 0.5 * fragmentFaceNormalView, 1.0);`)}
156
- ${M(ve,Y?"fragColor = getOverlayColorTexel();":"outputObjectAndLayerIdColor();")}
157
- ${M(ue,M(Y,R`calculateOcclusionAndOutputHighlight(getAllOverlayHighlightValuesEncoded());`,R`calculateOcclusionAndOutputHighlight();`))}`),B}const B=Object.freeze(Object.defineProperty({__proto__:null,build:z},Symbol.toStringTag,{value:"Module"}));export{B as C,z as b};
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{ComputeNormalTexture 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`
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.69";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
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 {@link module:esri/form/elements/AttachmentElement#input input} used in {@link module:esri/form/elements/AttachmentElement attachment elements}. These elements are set within a {@link module:esri/layers/FeatureLayer#formTemplate feature layer's} or {@link module:esri/widgets/FeatureForm#formTemplate form's} `formTemplate`. The configured `formTemplate` automatically displays within the {@link module:esri/widgets/Editor} widget when editing attribute features.
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 {@link module:esri/form/elements/inputs/attachments/AudioInput audio} input.
14
- * document | The user interface for a {@link module:esri/form/elements/inputs/attachments/DocumentInput document} input.
15
- * image | The user interface for an {@link module:esri/form/elements/inputs/attachments/ImageInput image} input.
16
- * signature | The user interface for a {@link module:esri/form/elements/inputs/attachments/SignatureInput signature} input.
17
- * video | The user interface for a {@link module:esri/form/elements/inputs/attachments/VideoInput video} input.
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
  */
@@ -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 uv (used for mapping material images to the
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. Uv coordinates are setup to cover the square
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 uv coordinates that
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 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.
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 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".
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 WebMercator, 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.
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 coordinates systems. This is a simplification we use as we render on a perfect sphere in global viewing mode.
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 WebMercator 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.
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 GLTF) and displayed in local viewing mode where a projected coordinate system (PCS) is used:
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 defacto 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.
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 references with a geographic coordinate system can be supported in global viewing mode.
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 javascript debugger. If the API rejects display of meshes, a warning message is printed.
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 Obj file for example, then one would need use the `"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 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 uv nor normal vertex attributes.
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 uv (used for mapping material images to the
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. Uv coordinates are setup to cover the square
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 adjust the mesh
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 arraybuffer could be uploaded
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.
@@ -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
@@ -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 p from"./Point.js";import c from"./SpatialReference.js";import{polygonCentroidPoint as h}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{isSelfIntersecting as g}from"./support/intersectsBase.js";import{project as y}from"./support/webMercatorUtils.js";import{updateSupportFromPoint as R}from"./support/zmUtils.js";import{writer as d}from"../core/accessorSupport/decorators/writer.js";var w;function v(t){return!Array.isArray(t[0])}function x(t){return"number"==typeof t[0]?.[0]}function j(t){if(!t)return;let{rings:e,hasM:r,hasZ:i,spatialReference:s}=t;switch(e??=[],x(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 P=w=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 w(n)}constructor(t){super(j(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=h(this);return t?p.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}get isSelfIntersecting(){return r(s.getLogger(this),"isSelfIntersecting",{replacement:"Please use simplifyOperator.isSimple() instead.",version:"4.33",warnOnce:!0}),g(this.rings)}writeRings(t,e){e.rings=i(this.rings)}addRing(t){if(!t)return;const e=this.rings,r=e.length;if(v(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 w;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=y(t,this.spatialReference);return u(this,null!=e?e:t)}isClockwise(t){const e=v(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 p(r[0],r[1],r[2],void 0,this.spatialReference):s&&!i?new p(r[0],r[1],void 0,r[2],this.spatialReference):i&&s?new p(r[0],r[1],r[2],r[3],this.spatialReference):new p(r[0],r[1],this.spatialReference)}insertPoint(t,e,r){return this._validateInputs(t,e,!0)?(R(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 p(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 p(t,r));return this.notifyChange("rings"),i}setPoint(t,e,r){return this._validateInputs(t,e)?(R(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})],P.prototype,"cache",null),t([n({readOnly:!0})],P.prototype,"centroid",null),t([n({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],P.prototype,"curveRings",void 0),t([d("curveRings")],P.prototype,"writeCurveRings",null),t([n({readOnly:!0})],P.prototype,"extent",null),t([n({readOnly:!0})],P.prototype,"isSelfIntersecting",null),t([n({type:[[[Number]]],json:{write:{isRequired:!0}}})],P.prototype,"rings",void 0),t([d("rings")],P.prototype,"writeRings",null),P=w=t([o("esri.geometry.Polygon")],P),P.prototype.toJSON.isDefaultToJSON=!0;export{P as default};
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};