@arcgis/core 5.2.0-next.20 → 5.2.0-next.22

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 (271) hide show
  1. package/Graphic.d.ts +1 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0eb0ce43b4813cae968f.js +2 -0
  4. package/assets/esri/core/workers/chunks/{2dbd88566abac030e965.js → 162dada6a199d1efdf86.js} +2 -2
  5. package/assets/esri/core/workers/chunks/1a4bec464daa9662ab2a.js +1 -0
  6. package/assets/esri/core/workers/chunks/{b375abfb2a2d9c63e20a.js → 2255a21c7b959f04d941.js} +1 -1
  7. package/assets/esri/core/workers/chunks/292498a9c7d462d215c6.js +1 -0
  8. package/assets/esri/core/workers/chunks/2ef80e003b4f0393ac2e.js +1 -0
  9. package/assets/esri/core/workers/chunks/{4517630bf869205bab87.js → 38a76bc4ef5c10ab0488.js} +1 -1
  10. package/assets/esri/core/workers/chunks/3b4fc67f6cb7393fbd97.js +1 -0
  11. package/assets/esri/core/workers/chunks/{8ce4fe00328173224ed2.js → 44e32ed3a570593a7245.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{db26cf2c2735183294b8.js → 50345dfc00380b158c96.js} +1 -1
  13. package/assets/esri/core/workers/chunks/5468a65698931603656d.js +1 -0
  14. package/assets/esri/core/workers/chunks/5b42f8aa0247adc2d065.js +1 -0
  15. package/assets/esri/core/workers/chunks/{d7acbc2ddff4cee8a465.js → 5ee887fc6e1e0e70e02f.js} +1 -1
  16. package/assets/esri/core/workers/chunks/66c2cfe11161d5dc989a.js +1 -0
  17. package/assets/esri/core/workers/chunks/6c0c77de1934f35dc45f.js +1 -0
  18. package/assets/esri/core/workers/chunks/{f7f820483e45c05ab9e4.js → 75df436e6e9773bdcfc2.js} +1 -1
  19. package/assets/esri/core/workers/chunks/780519b60aa674a61a74.js +1 -0
  20. package/assets/esri/core/workers/chunks/{a2247f4c3116efb16c4f.js → 7e23de8d9b2d938808f6.js} +1 -1
  21. package/assets/esri/core/workers/chunks/7fc8516111bd869256fc.js +1 -0
  22. package/assets/esri/core/workers/chunks/8579eba21f40630d073d.js +1 -0
  23. package/assets/esri/core/workers/chunks/{72edd08a2ff08970ba38.js → 87011d2fe14c54e296af.js} +1 -1
  24. package/assets/esri/core/workers/chunks/928b18e13e015330d44b.js +1 -0
  25. package/assets/esri/core/workers/chunks/93b40245378ced43ca08.js +1 -0
  26. package/assets/esri/core/workers/chunks/9434c76ad39c936dba90.js +1 -0
  27. package/assets/esri/core/workers/chunks/98dfe31e8ed9b522eaff.js +1 -0
  28. package/assets/esri/core/workers/chunks/{4104a0585969f8cd524c.js → a40ede4d3375184f21fe.js} +1 -1
  29. package/assets/esri/core/workers/chunks/a533d066cac26124c5ce.js +1 -0
  30. package/assets/esri/core/workers/chunks/a536904fe6f3b16fdbdc.js +1 -0
  31. package/assets/esri/core/workers/chunks/a54773c9bbc751619b3f.js +2 -0
  32. package/assets/esri/core/workers/chunks/a8167ab9fd846d699be5.js +1 -0
  33. package/assets/esri/core/workers/chunks/{dd0c1cf921369e2bc48b.js → a90619adff41658f8057.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{ac16016964be3b684e98.js → aded4e704e09a28edc8f.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{eccbddaec4be44c86f79.js → b0b3c67b7d37bd854d95.js} +2 -2
  36. package/assets/esri/core/workers/chunks/b419fd36337e76e2d4a3.js +680 -0
  37. package/assets/esri/core/workers/chunks/{05d597dd117766beadd8.js → b91a15522692781560b4.js} +1 -1
  38. package/assets/esri/core/workers/chunks/be4275a4b8977ec3eb61.js +1 -0
  39. package/assets/esri/core/workers/chunks/{e8d65900eefff1152207.js → c593539c2cce7a2b9d44.js} +1 -1
  40. package/assets/esri/core/workers/chunks/c86d388d216adbb15a05.js +1 -0
  41. package/assets/esri/core/workers/chunks/{0b522e05668bef729b1b.js → ceb5bd9f2afaa2ea0808.js} +1 -1
  42. package/assets/esri/core/workers/chunks/d07068c44d560e4ce02e.js +1 -0
  43. package/assets/esri/core/workers/chunks/{595bc41ff36c77324d01.js → d4e0346209fabc58f929.js} +9 -9
  44. package/assets/esri/core/workers/chunks/{5809e70a8e57e9b05959.js → dd795c95cdc3812b5b49.js} +1 -1
  45. package/assets/esri/core/workers/chunks/e29c8c10331edfa83277.js +1 -0
  46. package/assets/esri/core/workers/chunks/{44b30bce8e9a75b9e1b3.js → ef94d25d1cceb25ea9fe.js} +2 -2
  47. package/assets/esri/core/workers/chunks/f02a9408ba3893484c6c.js +1 -0
  48. package/assets/esri/core/workers/chunks/f7344d855f1092383abe.js +1 -0
  49. package/assets/esri/core/workers/chunks/{5f63077ec5ba3560491b.js → fb9f8b6cc2b4ae5b60df.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{ecbf84a1f42e6188faab.js → fd629872b5c07853f695.js} +1 -1
  51. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  52. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +5 -1
  53. package/assets/esri/themes/dark/main.css +1 -1
  54. package/assets/esri/themes/light/main.css +1 -1
  55. package/assets/esri/themes/light/view.css +1 -1
  56. package/chunks/GaussianSplat.glsl.js +4 -4
  57. package/chunks/GaussianSplatShadow.glsl.js +1 -1
  58. package/chunks/Pattern.glsl.js +17 -17
  59. package/chunks/RibbonLine.glsl.js +45 -43
  60. package/chunks/bundle2.js +1 -1
  61. package/config.js +1 -1
  62. package/core/date.js +1 -1
  63. package/form/FormTemplate.d.ts +15 -20
  64. package/form/elements/AttachmentElement.d.ts +38 -11
  65. package/form/elements/Element.d.ts +9 -6
  66. package/form/elements/FieldElement.d.ts +0 -1
  67. package/form/elements/GroupElement.d.ts +4 -6
  68. package/form/elements/RelationshipElement.d.ts +8 -8
  69. package/form/elements/inputs/attachments/AttachmentInput.d.ts +34 -18
  70. package/form/elements/inputs/attachments/AudioInput.d.ts +4 -3
  71. package/form/elements/inputs/attachments/DocumentInput.d.ts +2 -6
  72. package/form/elements/inputs/attachments/ImageInput.d.ts +4 -3
  73. package/form/elements/inputs/attachments/Input.d.ts +6 -3
  74. package/form/elements/inputs/attachments/SignatureInput.d.ts +3 -3
  75. package/form/elements/inputs/attachments/VideoInput.d.ts +4 -3
  76. package/form/elements.d.ts +6 -12
  77. package/form/types.d.ts +0 -4
  78. package/geometry/support/geometryUtils.js +1 -1
  79. package/geometry/support/intersects.js +1 -1
  80. package/geometry/support/intersectsBase.js +1 -1
  81. package/kernel.js +1 -1
  82. package/layers/AnnotationFeatureLayer.d.ts +44 -0
  83. package/layers/AnnotationFeatureLayer.js +1 -1
  84. package/layers/DimensionFeatureLayer.d.ts +40 -0
  85. package/layers/DimensionFeatureLayer.js +1 -1
  86. package/layers/DimensionLayer.d.ts +1 -0
  87. package/layers/FeatureLayer.js +1 -1
  88. package/layers/IntegratedMesh3DTilesLayer.d.ts +9 -1
  89. package/layers/OrientedImageryLayer.js +1 -1
  90. package/layers/ParquetLayer.d.ts +6 -10
  91. package/layers/ParquetLayer.js +1 -1
  92. package/layers/graphics/data/attributeSupport.js +1 -1
  93. package/layers/graphics/data/queryValidationUtils.js +1 -1
  94. package/layers/graphics/sources/ParquetSource.js +1 -1
  95. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  96. package/layers/graphics/sources/geojson/geojson.js +1 -1
  97. package/layers/graphics/sources/parquet/FileProvider.js +1 -1
  98. package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +1 -1
  99. package/layers/graphics/sources/parquet/fileProviderChangedError.js +2 -0
  100. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  101. package/layers/mixins/ArcGISImageService.js +1 -1
  102. package/layers/mixins/EditBusLayer.js +1 -1
  103. package/layers/orientedImagery/core/utils.js +1 -1
  104. package/layers/raster/datasets/WCSRaster.js +1 -1
  105. package/layers/support/AnnotationFeatureSublayer.d.ts +5 -3
  106. package/layers/support/RasterBandInfo.js +1 -1
  107. package/layers/support/SymbolLayerDrawing.js +1 -1
  108. package/layers/types.d.ts +1 -0
  109. package/package.json +2 -2
  110. package/rest/support/AttachmentQuery.d.ts +13 -1
  111. package/rest/support/AttachmentQuery.js +1 -1
  112. package/rest/support/OutDistance.d.ts +5 -1
  113. package/rest/support/PrintParameters.d.ts +2 -1
  114. package/rest/support/Query.d.ts +2 -0
  115. package/support/basemapUtils.js +1 -1
  116. package/support/revision.js +1 -1
  117. package/symbols/SimpleMarkerSymbol.d.ts +2 -2
  118. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  119. package/views/2d/engine/AFeatureContainer.js +1 -1
  120. package/views/2d/engine/transitions/FadeTransition.js +1 -1
  121. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  122. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  123. package/views/2d/engine/webgl/TileCpuState.js +1 -1
  124. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  125. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  126. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  127. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  128. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  129. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  130. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  131. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  132. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  133. package/views/2d/layers/LayerView2D.js +1 -1
  134. package/views/2d/layers/MediaLayerView2D.js +1 -1
  135. package/views/2d/layers/features/FeatureContainer.js +1 -1
  136. package/views/2d/layers/features/RenderState.js +1 -1
  137. package/views/2d/layers/features/aggregation/GeohashSpatialIndex.js +1 -1
  138. package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
  139. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  140. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  141. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  142. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  143. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  144. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  145. package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
  146. package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
  147. package/views/3d/analysis/LineOfSight/LineOfSightDrawToolRenderer.js +1 -1
  148. package/views/3d/analysis/LineOfSight/LineOfSightInteractionVisuals.js +2 -0
  149. package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
  150. package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
  151. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
  152. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  153. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  154. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  155. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  156. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  157. package/views/3d/layers/GaussianSplatLayerViewPerformanceInfo.js +1 -1
  158. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  159. package/views/3d/layers/graphics/Graphics3DPathSymbolLayerConstants.js +1 -1
  160. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  161. package/views/3d/state/utils/navigationUtils.js +1 -1
  162. package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
  163. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  164. package/views/3d/support/gaussianSplatting/GaussianSplatHeaderTexture.js +2 -0
  165. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  166. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  167. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +11 -11
  168. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +6 -9
  169. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +46 -46
  170. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexInfo.glsl.js +46 -18
  171. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +22 -22
  172. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +4 -4
  173. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +13 -12
  174. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
  175. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  176. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  177. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  178. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  179. package/views/3d/webgl-engine/lib/GaussianSplatShadowRenderNode.js +1 -1
  180. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  181. package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
  182. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  183. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  184. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  185. package/views/3d/webgl-engine/lib/PathVertexInfo.js +1 -1
  186. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  187. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  188. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferUtils.js +1 -1
  189. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  190. package/views/3d/webgl-engine/materials/PathLayouts.js +1 -1
  191. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  192. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  193. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  194. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
  195. package/views/3d/webgl-engine/shaders/PatternTextureBuffer.glsl.js +1 -1
  196. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  197. package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +1 -1
  198. package/views/3d/webgl-engine/shaders/RibbonLineTextureBuffer.glsl.js +2 -0
  199. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +10 -10
  200. package/views/View2D.d.ts +2 -2
  201. package/views/analysis/ElevationProfile/ElevationProfileChart.js +1 -1
  202. package/views/layers/AnnotationFeatureLayerView.d.ts +9 -1
  203. package/views/layers/DimensionFeatureLayerView.d.ts +9 -1
  204. package/views/layers/FeatureLikeLayerView.js +1 -1
  205. package/views/webgl/ShaderBuilder.js +1 -1
  206. package/widgets/BasemapGallery.js +1 -1
  207. package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
  208. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  209. package/widgets/BatchAttributeForm/css.js +1 -1
  210. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  211. package/widgets/BatchAttributeForm.js +1 -1
  212. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  213. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  214. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  215. package/widgets/Editor/UpdateWorkflow.js +1 -1
  216. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  217. package/widgets/Editor/types.d.ts +12 -0
  218. package/widgets/Editor/workflowUtils.js +1 -1
  219. package/widgets/Editor.js +1 -1
  220. package/widgets/FeatureForm/FeatureFormViewModel.d.ts +16 -12
  221. package/widgets/FeatureForm.d.ts +14 -16
  222. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  223. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  224. package/widgets/FeatureTable/Grid/types.d.ts +20 -0
  225. package/widgets/FeatureTable.d.ts +14 -2
  226. package/widgets/FeatureTable.js +1 -1
  227. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  228. package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
  229. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  230. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  231. package/widgets/OrientedImageryViewer/components/VideoEnhancementTools.js +1 -1
  232. package/widgets/OrientedImageryViewer/constants.js +1 -1
  233. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  234. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  235. package/widgets/OrientedImageryViewer/support/panConstraint.js +2 -0
  236. package/widgets/OrientedImageryViewer.js +1 -1
  237. package/widgets/Print/CustomTemplate.d.ts +7 -0
  238. package/widgets/Search/LayerSearchSource.d.ts +3 -0
  239. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  240. package/assets/esri/core/workers/chunks/0a259137932211b80f0e.js +0 -1
  241. package/assets/esri/core/workers/chunks/26aa8190ac439f634c5b.js +0 -1
  242. package/assets/esri/core/workers/chunks/3192586ec7fc73ed1165.js +0 -1
  243. package/assets/esri/core/workers/chunks/35a508a9311689d8df52.js +0 -1
  244. package/assets/esri/core/workers/chunks/3e89f487c5851c954d8b.js +0 -1
  245. package/assets/esri/core/workers/chunks/4fdd38d7362bf09a994b.js +0 -1
  246. package/assets/esri/core/workers/chunks/501fa9b029df2e7b73c3.js +0 -2
  247. package/assets/esri/core/workers/chunks/5216dd0544e901039c84.js +0 -1
  248. package/assets/esri/core/workers/chunks/5f0bc019add4aff3130c.js +0 -1
  249. package/assets/esri/core/workers/chunks/630ad47857de3cf726d1.js +0 -1
  250. package/assets/esri/core/workers/chunks/6ac09f4e85c664a17365.js +0 -1
  251. package/assets/esri/core/workers/chunks/6e8b9c03240ec372b587.js +0 -1
  252. package/assets/esri/core/workers/chunks/74922daaedb479ec6f03.js +0 -1
  253. package/assets/esri/core/workers/chunks/764c8ba14ab74b66b391.js +0 -1
  254. package/assets/esri/core/workers/chunks/7ee76504e7fea389a1c9.js +0 -1
  255. package/assets/esri/core/workers/chunks/912a8743a02f467b63b0.js +0 -2
  256. package/assets/esri/core/workers/chunks/9def4619d102f1d41578.js +0 -1
  257. package/assets/esri/core/workers/chunks/a0876a52a3c2ad849370.js +0 -1
  258. package/assets/esri/core/workers/chunks/a3c5b754a6fa0f4250bf.js +0 -1
  259. package/assets/esri/core/workers/chunks/a98905bf6050ad3b8721.js +0 -633
  260. package/assets/esri/core/workers/chunks/bf67e0f6064fb9d94ac8.js +0 -1
  261. package/assets/esri/core/workers/chunks/c9e5d3f496cefb8e3934.js +0 -1
  262. package/assets/esri/core/workers/chunks/cd892f429d5ffe8de99e.js +0 -1
  263. package/assets/esri/core/workers/chunks/d34d41a350facfa9b7c0.js +0 -1
  264. package/assets/esri/core/workers/chunks/d5a0e3a73df827dc7b06.js +0 -1
  265. package/assets/esri/core/workers/chunks/e5471373f89fd7cb9844.js +0 -1
  266. package/assets/esri/core/workers/chunks/ff00ac01f0baaecaa890.js +0 -1
  267. /package/assets/esri/core/workers/chunks/{912a8743a02f467b63b0.js.LICENSE.txt → 0eb0ce43b4813cae968f.js.LICENSE.txt} +0 -0
  268. /package/assets/esri/core/workers/chunks/{2dbd88566abac030e965.js.LICENSE.txt → 162dada6a199d1efdf86.js.LICENSE.txt} +0 -0
  269. /package/assets/esri/core/workers/chunks/{44b30bce8e9a75b9e1b3.js.LICENSE.txt → a54773c9bbc751619b3f.js.LICENSE.txt} +0 -0
  270. /package/assets/esri/core/workers/chunks/{eccbddaec4be44c86f79.js.LICENSE.txt → b0b3c67b7d37bd854d95.js.LICENSE.txt} +0 -0
  271. /package/assets/esri/core/workers/chunks/{501fa9b029df2e7b73c3.js.LICENSE.txt → ef94d25d1cceb25ea9fe.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{cyclicalPI as t}from"../../../../core/Cyclical.js";import{deg2rad as e,clamp as n,acosClamped as r,asinClamped as o}from"../../../../core/mathUtils.js";import{createScreenPointArray as i}from"../../../../core/screenUtils.js";import{fromRotation as a,exactEquals as s,rotate as c,multiply as l}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as u,create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as f}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{length as h,dot as M,subtract as g,normalize as y,squaredDistance as d,copy as b,transformMat4 as x,add as j,distance as v,cross as P,scale as z,lerp as w,set as I}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as R}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as A,axis as H,fromPoints as S,wrapAxisAngle as T}from"../../../../geometry/support/axisAngle.js";import{coordinateSystemFromOneAxisAndNormalVector as U,vectorCoordinates as G}from"../../../../geometry/support/coordinateSystem.js";import{create as k,fromNormalAndOffset as E,intersectRay as q}from"../../../../geometry/support/plane.js";import{Sphere as C}from"../../../../geometry/support/sphere.js";import{sm4d as F,sv3d as O}from"../../../../geometry/support/vectorStacks.js";import{fromScreenAtEye as W,fromScreen as B}from"../../support/geometryUtils/ray.js";import{intersectScreen as D}from"../../support/geometryUtils/sphere.js";import J from"../../webgl/RenderCamera.js";import{terrainId as K}from"../../webgl-engine/lib/verticalOffsetUtils.js";const L=30,N=[1,3e8],Q=8,V=[200,1508e5],X=5,Y=50,Z=5,$=10,_=80,tt=90,et=1e-6,nt={exclude:new Set([K])};function rt(t,e,n){return n[0]=e[0]/(t.fullWidth/t.pixelRatio),n[1]=e[1]/(t.fullHeight/t.pixelRatio),n}function ot(t){for(;t>Math.PI;)t-=2*Math.PI;for(;t<-Math.PI;)t+=2*Math.PI;return t}function it(t,e,n){const r=a(F.get(),n[3],H(n));null==r||s(r,u)||(g(fe,t.eye,e),x(fe,fe,r),t.eye=j(fe,fe,e),g(fe,t.center,e),x(fe,fe,r),t.center=j(fe,fe,e),t.up=x(fe,t.up,r))}function at(t,e,n,r){return q(t,B(e,n,de),r)}function st(t,e,n,r){return q(t,W(e,n,de),r)}function ct(t,e,n,r){const o=O.get();let i=1-n;g(o,e,t.eye);const a=h(o);let s=a*(1-i);i>=0&&s<r&&(s=r,i=-(s-a)/a),Math.abs(a-s)<et||(z(o,o,i),t.eye=j(fe,t.eye,o),t.center=w(fe,t.center,e,i))}function lt(t,e,n){e.getScreenCenter(ut),D(t,e,ut,fe)&&(e.center=fe);const r=e.distance,o=r*n;if(Math.abs(r-o)<et)return;const i=z(O.get(),e.viewForward,o);e.eye=g(fe,e.center,i)}const ut=i();function mt(t,e){I(e,0,0,0);for(const n of t)j(e,e,n);z(e,e,1/t.length)}function ft(t,e,n,r){return Math.sin(t/h(e))*(n+r.radius)}function pt(t,e,n,r){return ft(Math.PI/2,e,n,r)+(t-Math.PI/2)}const ht={Elevation:3e4,Angle:e(16)},Mt=.05,gt=12,yt=12,dt=e(80);function bt(t,e,n,r,o,i){const a=R(),s=new C;let c=!0,l=!0;const{eye:u}=e;return t.intersectScreen(n,a,i)&&Zt(u,a,r)?s.radius=h(a):(l=!1,e.aboveGround&&0!==o?s.radius=Math.max(h(e.center),.9*r):s.radius=h(e.eye)-e.relativeElevation,1===o?Pt(s,e,n,a):c=D(s,e,n,a)),{sphere:s,scenePickPoint:c?a:null,hasGeometryIntersection:l}}function xt(t,e,n,r){const o=t.relativeElevation;if(o>ht.Elevation&&"global"===r)return 1;W(t,e,be);const i=Math.sign(o),a=n.worldUpAtPosition(t.eye,fe);return-i*M(a,be.direction)<Math.sin(ht.Angle)*h(be.direction)?0:1}function jt(t,e,n){g(vt,n,e),t.eye=g(fe,t.eye,vt),t.center=g(fe,t.center,vt)}const vt=R();function Pt(t,e,n,r){const o=W(e,n,de);return null!=o&&(t.closestPointOnSilhouette(o,zt),t.intersectRay(o,r)?!(d(zt,o.origin)<d(r,o.origin))||(b(r,zt),!1):(g(wt,e.eye,e.center),y(wt,wt),E(wt,-M(y(wt,wt),zt),It),q(It,o,r),!1))}const zt=R(),wt=R(),It=k();function Rt(t,e){const n=t.fullHeight/t.pixelRatio,r=e(0),o=e(n);if(r||!o)return null;let i=0,a=n;for(let s=0;s<yt;s++){const t=.5*(i+a);e(t)?a=t:i=t}return a}function At(t,e,n){return e?t>n:t<n}function Ht(t,e){const n=t.fullHeight/t.pixelRatio,r=Math.max(e,n-e);return Math.max(gt,Mt*r)}function St(t,e){const n=t.fullHeight/t.pixelRatio;return Math.min(n,e+Ht(t,e))}function Tt(t,e){return Math.max(0,e-Ht(t,e))}function Ut(t,e,n,r){return xe[0]=n,xe[1]=r,t.intersectRay(W(e,xe,de),fe)}function Gt(t,e,n,r){return xe[0]=n,xe[1]=r,q(t,W(e,xe,de),fe)}function kt(i,a,s,c,l,u){let m=0;if(P(Me,i,a),g(pe,i,a),h(i)<=l||!c.aboveGround){P(s,pe,c.eye);const f=M(i,a)/(h(i)*h(a));if(f<.9999)m=r(f);else{const t=h(P(R(),i,a))/(h(i)*h(a));m=o(t)}const p=Math.cos(n(t.normalize(e(u)),0,dt));m=-m-Math.max(0,h(a)-l)/(p*l)}else g(Et,c.eye,c.center),P(s,pe,Et),m=-h(pe)/l;return y(s,s),z(s,s,h(Me)),m}const Et=R();function qt(o,i,a,s){let c,l;const u=Math.cos(n(t.normalize(e(s)),0,dt));return c=i>a?-(i-a)/(u*a):i<-a?Math.PI-(i+a)/(u*a):r(i/a),l=o>a?-(o-a)/(u*a):o<-a?Math.PI-(o+a)/(u*a):r(o/a),(l-c)*a}function Ct(t,e,n,r,o,i,a,s,c,l){const u=qt(t[2],e[2],i.radius,s),m=c?qt(t[0],e[0],i.radius,180):e[0]-t[0],p=Math.sin(a)*m-Math.cos(a)*u,h=Math.cos(a)*m+Math.sin(a)*u;y(fe,o);const g=c?p/Math.sqrt(Math.abs(i.radius**2-M(n,fe)**2)):p/i.radius,d=h/Math.sqrt(Math.abs(i.radius**2-M(n,r)**2));f(l,g,d)}function Ft(t,e,n,r,o,i,a,s,c,l){P(Me,t,e),U(i.up,i.eye,ee,ne,re),U([0,0,1],i.eye,$t,_t,te),b(n,_t),b(r,$t),y(n,n),z(n,n,h(Me)),G(t,y(ne,ne),y(re,re),y(ee,ee),oe),G(e,ne,re,ee,ie),Ct(oe,ie,t,$t,_t,a,s,c,l,o)}function Ot(t,e,n,r,o,i,s){a(ce,o,r),a(le,s,i),l(ue,ce,le),g(e,t,n),x(e,e,ue),j(e,e,n)}function Wt(t,e,n,r,o,i){a(ce,r,n),a(le,i,o),l(ue,ce,le),g(fe,t.eye,e),x(fe,fe,ue),t.eye=j(fe,fe,e),g(fe,t.center,e),x(fe,fe,ue),t.center=j(fe,fe,e),g(fe,t.up,e),x(fe,fe,ue),t.up=j(fe,fe,e)}const Bt={Pole:.95,Angle:e(18),Tilt:45,TiltHysteresisMargin:1e-7};let Dt=!1;function Jt(t,e,n,r,o,i){const a=Math.abs(r)>Math.PI-Bt.Angle||Math.abs(r)<Bt.Angle,s=(Math.abs(t[2])<n*Bt.Pole||Math.abs(e)>n)&&i;return a&&s?!Dt&&o<Bt.Tilt-Bt.TiltHysteresisMargin?Dt=!0:Dt&&o>Bt.Tilt+Bt.TiltHysteresisMargin&&(Dt=!1):Dt=!1,Dt}function Kt(t,e,n,r,o,i){if(i)S(n,r,se),it(e,t.center,se);else{const i=kt(n,r,ge,e,t.radius,o);it(e,t.center,T(ge,i))}}function Lt(t,e,n,r,o,i,a){const s=a?20:1,c=1e-12;let l,u;b(me,r),he.copyFrom(e);for(let m=0;m<s&&d(n,me)>c&&(l=d(n,me),Ft(n,me,_t,$t,ae,he,t,o,i,a),Wt(he,t.center,$t,ae[1],_t,ae[0]),Ot(me,me,t.center,$t,ae[1],_t,ae[0]),u=d(n,me),u<l||0===m);m++)e.copyFrom(he)}function Nt(n,r,o,i,a,s,c){Jt(o,M(r.up,o),n.radius,-t.normalize(e(a)),s,r.aboveGround)?Lt(n,r,o,i,-t.normalize(e(a)),s,c):Kt(n,r,o,i,s,c)}function Qt(t,e,n,r,o,i){const{eye:a}=t;U([0,0,1],a,$t,_t,te);const s=e.translation[0]*n.pan,l="zoom"===o.mode?0:e.translation[1]*n.pan,u=Math.max(Math.sqrt(Math.abs(1-M(t.center,$t)**2/h(t.center)**2)),.5),m=(Math.sin(i)*l+Math.cos(i)*s)/u,f=-Math.cos(i)*l+Math.sin(i)*s;switch(c(r.pan.matrix,r.pan.matrix,m,$t),r.pan.enabled=!0,o.mode){case"pan":c(r.pan.matrix,r.pan.matrix,f,_t),r.pan.enabled=!0;break;case"zoom":r.zoom=-e.translation[1]*n.zoom}}function Vt(t,e,n,r,o){const{eye:i,viewRight:a}=t,s=P(O.get(),a,i),l=e.translation[0]*n.pan;switch(0!==l&&(c(r.pan.matrix,r.pan.matrix,-l,s),r.pan.enabled=!0),o.mode){case"pan":{const t=e.translation[1]*n.pan;0!==t&&(c(r.pan.matrix,r.pan.matrix,t,a),r.pan.enabled=!0);break}case"zoom":r.zoom=-e.translation[1]*n.zoom}}function Xt(n,r,o,i,a,s,c,l,u){Jt(n.center,M(n.up,n.center),h(n.center),-t.normalize(e(s)),c,r.aboveGround)?Qt(r,o,i,l,u,-t.normalize(e(a))):Vt(r,o,i,l,u)}function Yt(t,e,n=1/0){const r=Math.abs(M(t,e));return Math.min(n,1/r)}function Zt(t,e,n){const r=v(t,e),o=h(t);return r<Math.max(o,n)}const $t=R(),_t=R(),te=R(),ee=R(),ne=R(),re=R(),oe=R(),ie=R(),ae=p(),se=A(),ce=m(),le=m(),ue=m(),me=R(),fe=R(),pe=R();let he=new J;const Me=R(),ge=R();function ye(){he=new J}const de={origin:R(),direction:R()},be={origin:R(),direction:R()},xe=i();export{dt as TiltThresholdPanningSpeed,ht as VerticalPanTresholds,jt as applyPanPlanar,Kt as applyPanSphericalDirectRotation,Lt as applyPanSphericalPreserveHeading,it as applyRotation,Wt as applyRotationWithTwoAxes,lt as applyZoomOnSphere,ct as applyZoomToPoint,mt as centroid,ye as cleanupNavigationUtils,Tt as computeHorizonDownLimitScreenY,Ht as computeHorizonPadding,St as computeHorizonUpLimitScreenY,et as distanceComparisonTolerance,nt as excludeTerrain,Rt as findHorizonScreenY,Yt as getTiltScaleFactor,xt as inferNavigationMode,at as intersectPlaneFromScreenPoint,st as intersectPlaneFromScreenPointAtEye,Gt as intersectsPlaneAtScreenPoint,Ut as intersectsSphereAtScreenPoint,Zt as isHitOnSamePlanetSide,qt as lengthFromPoints,X as maxPanDistanceModifier,Z as maxRotatePivotDistanceModifier,L as maxZoomPivotDistanceModifier,Q as maxZoomStepDistanceModifier,Y as minPinchAndPanCameraHeight,$ as minRotatePivotDistance,rt as normalizeCoordinate,ot as normalizeRotationDelta,pt as offSurfaceTiltToEyeTiltGlobal,ft as onSurfaceTiltToEyeTiltGlobal,Xt as panMotionToRotationMatrix,Nt as panToPosition,bt as pickPointAndInitSphere,_ as pivotSearchAreaSize,Bt as preservingHeadingThresholds,Mt as relativeHorizonPanPadding,tt as rotatePivotSearchAreaSize,Ot as rotatePointAroundTwoAxes,kt as rotationAngleAndAxisDirectRotation,Ft as rotationAnglesAndAxesHeadingPreserving,Ct as rotationAnglesHeadingPreserving,At as shouldClampScreenY,Jt as shouldPreserveHeading,Pt as sphereOrPlanePointFromScreenPoint,N as zoomPivotDistanceClamp,V as zoomStepDistanceClamp};
2
+ import{cyclicalPI as t}from"../../../../core/Cyclical.js";import{deg2rad as e,clamp as n,acosClamped as r,asinClamped as o}from"../../../../core/mathUtils.js";import{createScreenPointArray as i}from"../../../../core/screenUtils.js";import{fromRotation as a,exactEquals as s,rotate as c,multiply as l}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as u,create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as f}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{length as h,dot as M,subtract as g,normalize as y,squaredDistance as d,copy as b,transformMat4 as x,add as j,distance as v,cross as P,scale as w,lerp as z,set as I}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as R}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as A,axis as H,fromPoints as S,wrapAxisAngle as T}from"../../../../geometry/support/axisAngle.js";import{coordinateSystemFromOneAxisAndNormalVector as U,vectorCoordinates as G}from"../../../../geometry/support/coordinateSystem.js";import{create as k,fromNormalAndOffset as E,intersectRay as F,projectVector as q}from"../../../../geometry/support/plane.js";import{Sphere as C}from"../../../../geometry/support/sphere.js";import{sm4d as O,sv3d as W}from"../../../../geometry/support/vectorStacks.js";import{fromScreenAtEye as B,fromScreen as D}from"../../support/geometryUtils/ray.js";import{intersectScreen as J}from"../../support/geometryUtils/sphere.js";import K from"../../webgl/RenderCamera.js";import{terrainId as L}from"../../webgl-engine/lib/verticalOffsetUtils.js";const N=30,Q=[1,3e8],V=8,X=[200,1508e5],Y=5,Z=50,$=5,_=10,tt=80,et=90,nt=1e-6,rt={exclude:new Set([L])};function ot(t,e,n){return n[0]=e[0]/(t.fullWidth/t.pixelRatio),n[1]=e[1]/(t.fullHeight/t.pixelRatio),n}function it(t){for(;t>Math.PI;)t-=2*Math.PI;for(;t<-Math.PI;)t+=2*Math.PI;return t}function at(t,e,n){const r=a(O.get(),n[3],H(n));null==r||s(r,u)||(g(ye,t.eye,e),x(ye,ye,r),t.eye=j(ye,ye,e),g(ye,t.center,e),x(ye,ye,r),t.center=j(ye,ye,e),t.up=x(ye,t.up,r))}function st(t,e,n,r){return F(t,D(e,n,Pe),r)}function ct(t,e,n,r){return F(t,B(e,n,Pe),r)}function lt(t,e,n,r){const o=W.get();let i=1-n;g(o,e,t.eye);const a=h(o);let s=a*(1-i);i>=0&&s<r&&(s=r,i=-(s-a)/a),Math.abs(a-s)<nt||(w(o,o,i),t.eye=j(ye,t.eye,o),t.center=z(ye,t.center,e,i))}function ut(t,e,n){e.getScreenCenter(mt),J(t,e,mt,ye)&&(e.center=ye);const r=e.distance,o=r*n;if(Math.abs(r-o)<nt)return;const i=w(W.get(),e.viewForward,o);e.eye=g(ye,e.center,i)}const mt=i();function ft(t,e){I(e,0,0,0);for(const n of t)j(e,e,n);w(e,e,1/t.length)}function pt(t,e,n,r){return Math.sin(t/h(e))*(n+r.radius)}function ht(t,e,n,r){return pt(Math.PI/2,e,n,r)+(t-Math.PI/2)}const Mt={Elevation:3e4,Angle:e(16)},gt=.05,yt=12,dt=12,bt=e(80);function xt(t,e,n,r,o,i){const a=R(),s=new C;let c=!0,l=!0;const{eye:u}=e;return t.intersectScreen(n,a,i)&&ne(u,a,r)?s.radius=h(a):(l=!1,e.aboveGround&&0!==o?s.radius=Math.max(h(e.center),.9*r):s.radius=h(e.eye)-e.relativeElevation,1===o?wt(s,e,n,a):c=J(s,e,n,a)),{sphere:s,scenePickPoint:c?a:null,hasGeometryIntersection:l}}function jt(t,e,n,r){const o=t.relativeElevation;if(o>Mt.Elevation&&"global"===r)return 1;B(t,e,we);const i=Math.sign(o),a=n.worldUpAtPosition(t.eye,ye);return-i*M(a,we.direction)<Math.sin(Mt.Angle)*h(we.direction)?0:1}function vt(t,e,n){g(Pt,n,e),t.eye=g(ye,t.eye,Pt),t.center=g(ye,t.center,Pt)}const Pt=R();function wt(t,e,n,r){const o=B(e,n,Pe);return null!=o&&(t.closestPointOnSilhouette(o,zt),t.intersectRay(o,r)?!(d(zt,o.origin)<d(r,o.origin))||(b(r,zt),!1):(g(It,e.eye,e.center),y(It,It),E(It,-M(y(It,It),zt),Rt),F(Rt,o,r),!1))}const zt=R(),It=R(),Rt=k();function At(t,e){const n=t.fullHeight/t.pixelRatio,r=e(0),o=e(n);if(r||!o)return null;let i=0,a=n;for(let s=0;s<dt;s++){const t=.5*(i+a);e(t)?a=t:i=t}return a}const Ht=R(),St=R(),Tt=i();function Ut(t,e){return q(e,t.viewForward,Ht),j(St,t.eye,Ht),t.projectToScreen(St,Tt),Tt[1]}function Gt(t,e,n){return e?t>n:t<n}function kt(t,e){const n=t.fullHeight/t.pixelRatio,r=Math.max(e,n-e);return Math.max(yt,gt*r)}function Et(t,e){const n=t.fullHeight/t.pixelRatio;return Math.min(n,e+kt(t,e))}function Ft(t,e){return Math.max(0,e-kt(t,e))}function qt(t,e,n,r){return ze[0]=n,ze[1]=r,t.intersectRay(B(e,ze,Pe),ye)}function Ct(t,e,n,r){return ze[0]=n,ze[1]=r,F(t,B(e,ze,Pe),ye)}function Ot(i,a,s,c,l,u){let m=0;if(P(xe,i,a),g(de,i,a),h(i)<=l||!c.aboveGround){P(s,de,c.eye);const f=M(i,a)/(h(i)*h(a));if(f<.9999)m=r(f);else{const t=h(P(R(),i,a))/(h(i)*h(a));m=o(t)}const p=Math.cos(n(t.normalize(e(u)),0,bt));m=-m-Math.max(0,h(a)-l)/(p*l)}else g(Wt,c.eye,c.center),P(s,de,Wt),m=-h(de)/l;return y(s,s),w(s,s,h(xe)),m}const Wt=R();function Bt(o,i,a,s){let c,l;const u=Math.cos(n(t.normalize(e(s)),0,bt));return c=i>a?-(i-a)/(u*a):i<-a?Math.PI-(i+a)/(u*a):r(i/a),l=o>a?-(o-a)/(u*a):o<-a?Math.PI-(o+a)/(u*a):r(o/a),(l-c)*a}function Dt(t,e,n,r,o,i,a,s,c,l){const u=Bt(t[2],e[2],i.radius,s),m=c?Bt(t[0],e[0],i.radius,180):e[0]-t[0],p=Math.sin(a)*m-Math.cos(a)*u,h=Math.cos(a)*m+Math.sin(a)*u;y(ye,o);const g=c?p/Math.sqrt(Math.abs(i.radius**2-M(n,ye)**2)):p/i.radius,d=h/Math.sqrt(Math.abs(i.radius**2-M(n,r)**2));f(l,g,d)}function Jt(t,e,n,r,o,i,a,s,c,l){P(xe,t,e),U(i.up,i.eye,ae,se,ce),U([0,0,1],i.eye,re,oe,ie),b(n,oe),b(r,re),y(n,n),w(n,n,h(xe)),G(t,y(se,se),y(ce,ce),y(ae,ae),le),G(e,se,ce,ae,ue),Dt(le,ue,t,re,oe,a,s,c,l,o)}function Kt(t,e,n,r,o,i,s){a(pe,o,r),a(he,s,i),l(Me,pe,he),g(e,t,n),x(e,e,Me),j(e,e,n)}function Lt(t,e,n,r,o,i){a(pe,r,n),a(he,i,o),l(Me,pe,he),g(ye,t.eye,e),x(ye,ye,Me),t.eye=j(ye,ye,e),g(ye,t.center,e),x(ye,ye,Me),t.center=j(ye,ye,e),g(ye,t.up,e),x(ye,ye,Me),t.up=j(ye,ye,e)}const Nt={Pole:.95,Angle:e(18),Tilt:45,TiltHysteresisMargin:1e-7};let Qt=!1;function Vt(t,e,n,r,o,i){const a=Math.abs(r)>Math.PI-Nt.Angle||Math.abs(r)<Nt.Angle,s=(Math.abs(t[2])<n*Nt.Pole||Math.abs(e)>n)&&i;return a&&s?!Qt&&o<Nt.Tilt-Nt.TiltHysteresisMargin?Qt=!0:Qt&&o>Nt.Tilt+Nt.TiltHysteresisMargin&&(Qt=!1):Qt=!1,Qt}function Xt(t,e,n,r,o,i){if(i)S(n,r,fe),at(e,t.center,fe);else{const i=Ot(n,r,je,e,t.radius,o);at(e,t.center,T(je,i))}}function Yt(t,e,n,r,o,i,a){const s=a?20:1,c=1e-12;let l,u;b(ge,r),be.copyFrom(e);for(let m=0;m<s&&d(n,ge)>c&&(l=d(n,ge),Jt(n,ge,oe,re,me,be,t,o,i,a),Lt(be,t.center,re,me[1],oe,me[0]),Kt(ge,ge,t.center,re,me[1],oe,me[0]),u=d(n,ge),u<l||0===m);m++)e.copyFrom(be)}function Zt(n,r,o,i,a,s,c){Vt(o,M(r.up,o),n.radius,-t.normalize(e(a)),s,r.aboveGround)?Yt(n,r,o,i,-t.normalize(e(a)),s,c):Xt(n,r,o,i,s,c)}function $t(t,e,n,r,o,i){const{eye:a}=t;U([0,0,1],a,re,oe,ie);const s=e.translation[0]*n.pan,l="zoom"===o.mode?0:e.translation[1]*n.pan,u=Math.max(Math.sqrt(Math.abs(1-M(t.center,re)**2/h(t.center)**2)),.5),m=(Math.sin(i)*l+Math.cos(i)*s)/u,f=-Math.cos(i)*l+Math.sin(i)*s;switch(c(r.pan.matrix,r.pan.matrix,m,re),r.pan.enabled=!0,o.mode){case"pan":c(r.pan.matrix,r.pan.matrix,f,oe),r.pan.enabled=!0;break;case"zoom":r.zoom=-e.translation[1]*n.zoom}}function _t(t,e,n,r,o){const{eye:i,viewRight:a}=t,s=P(W.get(),a,i),l=e.translation[0]*n.pan;switch(0!==l&&(c(r.pan.matrix,r.pan.matrix,-l,s),r.pan.enabled=!0),o.mode){case"pan":{const t=e.translation[1]*n.pan;0!==t&&(c(r.pan.matrix,r.pan.matrix,t,a),r.pan.enabled=!0);break}case"zoom":r.zoom=-e.translation[1]*n.zoom}}function te(n,r,o,i,a,s,c,l,u){Vt(n.center,M(n.up,n.center),h(n.center),-t.normalize(e(s)),c,r.aboveGround)?$t(r,o,i,l,u,-t.normalize(e(a))):_t(r,o,i,l,u)}function ee(t,e,n=1/0){const r=Math.abs(M(t,e));return Math.min(n,1/r)}function ne(t,e,n){const r=v(t,e),o=h(t);return r<Math.max(o,n)}const re=R(),oe=R(),ie=R(),ae=R(),se=R(),ce=R(),le=R(),ue=R(),me=p(),fe=A(),pe=m(),he=m(),Me=m(),ge=R(),ye=R(),de=R();let be=new K;const xe=R(),je=R();function ve(){be=new K}const Pe={origin:R(),direction:R()},we={origin:R(),direction:R()},ze=i();export{bt as TiltThresholdPanningSpeed,Mt as VerticalPanTresholds,vt as applyPanPlanar,Xt as applyPanSphericalDirectRotation,Yt as applyPanSphericalPreserveHeading,at as applyRotation,Lt as applyRotationWithTwoAxes,ut as applyZoomOnSphere,lt as applyZoomToPoint,ft as centroid,ve as cleanupNavigationUtils,Ft as computeHorizonDownLimitScreenY,kt as computeHorizonPadding,Et as computeHorizonUpLimitScreenY,nt as distanceComparisonTolerance,rt as excludeTerrain,At as findHorizonScreenY,Ut as findPlaneHorizonY,ee as getTiltScaleFactor,jt as inferNavigationMode,st as intersectPlaneFromScreenPoint,ct as intersectPlaneFromScreenPointAtEye,Ct as intersectsPlaneAtScreenPoint,qt as intersectsSphereAtScreenPoint,ne as isHitOnSamePlanetSide,Bt as lengthFromPoints,Y as maxPanDistanceModifier,$ as maxRotatePivotDistanceModifier,N as maxZoomPivotDistanceModifier,V as maxZoomStepDistanceModifier,Z as minPinchAndPanCameraHeight,_ as minRotatePivotDistance,ot as normalizeCoordinate,it as normalizeRotationDelta,ht as offSurfaceTiltToEyeTiltGlobal,pt as onSurfaceTiltToEyeTiltGlobal,te as panMotionToRotationMatrix,Zt as panToPosition,xt as pickPointAndInitSphere,tt as pivotSearchAreaSize,Nt as preservingHeadingThresholds,gt as relativeHorizonPanPadding,et as rotatePivotSearchAreaSize,Kt as rotatePointAroundTwoAxes,Ot as rotationAngleAndAxisDirectRotation,Jt as rotationAnglesAndAxesHeadingPreserving,Dt as rotationAnglesHeadingPreserving,Gt as shouldClampScreenY,Vt as shouldPreserveHeading,wt as sphereOrPlanePointFromScreenPoint,Q as zoomPivotDistanceClamp,X as zoomStepDistanceClamp};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const t=4096,s=64,e=1023,i=e+1,n=t*s/i,r=4,o=i*r,h=e*r,a=t*s;class c{constructor(t=n){this._pageCount=t;const s=Math.ceil(t/32);this._bitset=new Uint32Array(s)}get pageCount(){return this._pageCount}isAllocated(t){const s=t/32|0,e=t%32;return!!(this._bitset[s]&1<<e)}allocate(t){const s=t/32|0,e=t%32;this._bitset[s]|=1<<e}free(t){const s=t/32|0,e=t%32;this._bitset[s]&=~(1<<e)}findFirstFreePage(){for(let t=0;t<this._bitset.length;t++)if(4294967295!==this._bitset[t])for(let s=0;s<32;s++){const e=32*t+s;if(e>=this._pageCount)break;if(!(this._bitset[t]&1<<s))return e}return null}resize(t){this._pageCount=t;const s=Math.ceil(t/32),e=this._bitset.length;if(s!==e){const t=new Uint32Array(s),i=Math.min(e,s);t.set(this._bitset.subarray(0,i)),this._bitset=t}this._clearExcessBits(this._bitset,t)}_clearExcessBits(t,s){const e=Math.floor((s-1)/32),i=(s-1)%32;if(s>0&&i<31){const s=(1<<i+1)-1;t[e]&=s}e+1<t.length&&t.fill(0,e+1)}}export{c as GaussianSplatAtlasPages,i as elementsPerSplatPage,e as gaussiansPerSplatPage,s as initialSplatAtlasTextureHeight,n as initialSplatAtlasTexturePages,a as minExpectedGaussianCount,r as packedGaussianSizeInU32,t as splatAtlasTextureWidth,o as splatPageSizeInU32,h as splatPageSizeInU32WithoutHeader};
2
+ const t=4096,s=64,e=1024,i=t*s/e,n=4,r=e*n,o=t*s;class h{constructor(t=i){this._pageCount=t;const s=Math.ceil(t/32);this._bitset=new Uint32Array(s)}get pageCount(){return this._pageCount}isAllocated(t){const s=t/32|0,e=t%32;return!!(this._bitset[s]&1<<e)}allocate(t){const s=t/32|0,e=t%32;this._bitset[s]|=1<<e}free(t){const s=t/32|0,e=t%32;this._bitset[s]&=~(1<<e)}findFirstFreePage(){for(let t=0;t<this._bitset.length;t++)if(4294967295!==this._bitset[t])for(let s=0;s<32;s++){const e=32*t+s;if(e>=this._pageCount)break;if(!(this._bitset[t]&1<<s))return e}return null}resize(t){this._pageCount=t;const s=Math.ceil(t/32),e=this._bitset.length;if(s!==e){const t=new Uint32Array(s),i=Math.min(e,s);t.set(this._bitset.subarray(0,i)),this._bitset=t}this._clearExcessBits(this._bitset,t)}_clearExcessBits(t,s){const e=Math.floor((s-1)/32),i=(s-1)%32;if(s>0&&i<31){const s=(1<<i+1)-1;t[e]&=s}e+1<t.length&&t.fill(0,e+1)}}export{h as GaussianSplatAtlasPages,e as gaussiansPerPage,s as initialSplatAtlasTextureHeight,i as initialSplatAtlasTexturePages,o as minExpectedGaussianCount,n as packedGaussianSizeInU32,t as splatAtlasTextureWidth,r as splatPageSizeInU32};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{abortMaybe as t}from"../../../../core/maybe.js";import{estimateNumberArrayMemory as s}from"../../../../core/memoryEstimations.js";import{isAbortError as i}from"../../../../core/promiseUtils.js";import{signal as r}from"../../../../core/signal.js";import{Milliseconds as o,now as a}from"../../../../core/time.js";import{exactEquals as n,copy as l,normalize as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as d,exactEquals as _,intersects as c,copy as p}from"../../../../geometry/support/aaBoundingBox.js";import{makeScheduleFunction as f}from"../../layers/support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as m}from"../GaussianSplatWorkerHandle.js";import{GaussianSplatFadeTexture as g}from"./GaussianSplatFadeTexture.js";import{GaussianSplatOrderTexture as T}from"./GaussianSplatOrderTexture.js";import{GaussianSplatTextureAtlas as b}from"./GaussianSplatTextureAtlas.js";import{DepthRange as S}from"../../webgl-engine/lib/DepthRange.js";import{TaskPriority as y}from"../../../support/Scheduler.js";class C{constructor(e,t,s){this._updating=r(!1),this._useDeterministicSort=!1,this._sortBufferMemory=0,this.visibleGaussians=0,this._visibleTileDepthRange=new S,this._previousVisibleTileDepthRangeEye=u(),this._previousVisibleTileDepthRangeViewForward=u(),this._previousVisibleTileDepthRangeClippingBox=d(),this._latestSortedGaussianTilesVersion=0,this._previousVisibleTileDepthRangeTilesVersion=-1,this._previousVisibleTileDepthRangeHasClippingBox=!1,this._bufferCapacity=0,this._requestedLyr3dVisibilityChange=0,this._latestCompletedLyr3dVisibilityChange=0,this._latestUpdatedGaussianTiles=new Array,this._latestSortedGaussianTiles=new Array,this._nextCommittedVisibleGaussianTiles=new Array,this._cameraDirectionNormalized=u(),this._frameTask=null,this._workerHandle=null,this._sortAbortController=null,this._isSorting=!1,this._pendingSortTask=!1,this._scheduledSortStartTimeout=null,this._lastSortStartTime=o(-1/0),this._sortInterval=o(80),this._renderer=e,this._onSortComplete=t,this._orderTexture=new T(this._renderer.renderingContext),this._fadingTexture=new g(this._renderer.renderingContext),this._textureAtlas=new b(this._renderer.renderingContext,this._renderer.view.resourceController.memoryController,this._renderer.fboCache,s);const{resourceController:i}=this._renderer.view;this._workerHandle=new m(f(i)),this._frameTask=i.scheduler.registerTask(y.GAUSSIAN_SPLAT_SORTING)}get textureAtlas(){return this._textureAtlas}get orderTexture(){return this._orderTexture}get fadingTexture(){return this._fadingTexture}get textureAtlasMemory(){return this._textureAtlas.usedMemory}get orderTextureMemory(){return this._orderTexture.usedMemory}get fadingTextureMemory(){return this._fadingTexture.usedMemory}get sortBufferMemory(){return this._sortBufferMemory}get usedMemory(){return this.textureAtlasMemory+this.orderTextureMemory+this.fadingTextureMemory+this.sortBufferMemory}queryVisibleTileDepthRange(e,t){if(0===this.visibleGaussians)return null;const{eye:s,viewForward:i}=e,r=s[0],o=s[1],a=s[2],h=i[0],u=i[1],d=i[2],f=this._visibleTileDepthRange;if(this._previousVisibleTileDepthRangeTilesVersion===this._latestSortedGaussianTilesVersion&&n(this._previousVisibleTileDepthRangeEye,s)&&n(this._previousVisibleTileDepthRangeViewForward,i)&&(null==t?!this._previousVisibleTileDepthRangeHasClippingBox:this._previousVisibleTileDepthRangeHasClippingBox&&_(this._previousVisibleTileDepthRangeClippingBox,t)))return f.near<=f.far?f:null;let m=1/0,g=-1/0;const T=this._latestSortedGaussianTiles;for(let n=0;n<T.length;n++){const e=T[n];if(null!=t){const s=e.boundingBox;if(!c(s,t))continue}const s=h*(e.obbCenterX-r)+u*(e.obbCenterY-o)+d*(e.obbCenterZ-a),i=e.paddedMbsRadius,l=s-i;l<m&&(m=l);const _=s+i;_>g&&(g=_)}const b=m<=g;return b?f.set(m,g):f.set(1/0,-1/0),this._previousVisibleTileDepthRangeTilesVersion=this._latestSortedGaussianTilesVersion,this._previousVisibleTileDepthRangeHasClippingBox=null!=t,l(this._previousVisibleTileDepthRangeEye,s),l(this._previousVisibleTileDepthRangeViewForward,i),null!=t&&p(this._previousVisibleTileDepthRangeClippingBox,t),b?f:null}updateGaussianVisibility(e,t){this._latestUpdatedGaussianTiles=e,this._requestedLyr3dVisibilityChange=t,this.requestSort()}get updating(){return this._updating.value}destroy(){this._sortAbortController=t(this._sortAbortController),this._pendingSortTask=!1,this._updating.value=!1,null!=this._scheduledSortStartTimeout&&(clearTimeout(this._scheduledSortStartTimeout),this._scheduledSortStartTimeout=null),this._frameTask.remove(),this._workerHandle?.destroyWorkerAndSelf(),this._textureAtlas.destroy(),this._orderTexture.destroy(),this._fadingTexture.destroy()}requestSort(){return this._updating.value=!0,!this._pendingSortTask&&(this._pendingSortTask=!0,this._scheduleSortStart(),!0)}_scheduleSortStart(){if(this._isSorting)return;const e=a()-this._lastSortStartTime,t=this._sortInterval-e;t<=0?this._startSortIfRequired():null==this._scheduledSortStartTimeout&&(this._scheduledSortStartTimeout=setTimeout(()=>{this._scheduledSortStartTimeout=null,this._pendingSortTask&&!this._isSorting&&this._scheduleSortStart()},t))}_startSortIfRequired(){if(this._isSorting||!this._pendingSortTask)return;const e=new AbortController;this._sortAbortController=e,this._isSorting=!0,this._pendingSortTask=!1,this._lastSortStartTime=a(),this._sortOnWorker(e.signal).finally(()=>{this._sortAbortController===e&&(this._sortAbortController=null),this._handleSortComplete()})}_handleSortComplete(){this._isSorting=!1,this._pendingSortTask?this._scheduleSortStart():this._updating.value=!1}_clearBuffersAndTextures(){this._atlasIndicesBuffer=void 0,this._sortedAtlasIndicesBuffer=void 0,this._distancesBuffer=void 0,this._bufferCapacity=0,this._sortBufferMemory=0,this._orderTexture.clear(),this._textureAtlas.clear()}_computeExpandedCapacity(t,s){let i=Math.max(1,t);for(;i<s;)i=Math.ceil(i*e);return i}_ensureSortBufferCapacities(e){if(this._bufferCapacity<e){const t=this._computeExpandedCapacity(this._bufferCapacity,e);this._atlasIndicesBuffer=new Uint32Array(t),this._sortedAtlasIndicesBuffer=new Uint32Array(t),this._distancesBuffer=new Float64Array(t),this._bufferCapacity=t,this._sortBufferMemory=s(this._atlasIndicesBuffer,this._sortedAtlasIndicesBuffer,this._distancesBuffer)}}_clearAllBuffersAndTextures(){this._clearBuffersAndTextures(),this._latestSortedGaussianTiles.length=0,this._nextCommittedVisibleGaussianTiles.length=0,this._previousVisibleTileDepthRangeTilesVersion=-1,this._workerHandle?.clear()}async _sortOnWorker(e){try{if(0===this._latestUpdatedGaussianTiles.length)return this.visibleGaussians=0,this._clearAllBuffersAndTextures(),this._latestCompletedLyr3dVisibilityChange=this._requestedLyr3dVisibilityChange,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),void this._renderer.requestRender(1);this._useDeterministicSort&&this._latestUpdatedGaussianTiles.sort((e,t)=>e.obb.centerX-t.obb.centerX||e.obb.centerY-t.obb.centerY||e.obb.centerZ-t.obb.centerZ);const t=this._latestUpdatedGaussianTiles,s=t.length,i=this._requestedLyr3dVisibilityChange;let r=0;for(let e=0;e<s;e++)r+=t[e].gaussianCount;this._ensureSortBufferCapacities(r),this._textureAtlas.ensureTextureAtlas();const o=this._renderer.camera;h(this._cameraDirectionNormalized,o.ray.direction);const a=this._cameraDirectionNormalized[0],n=this._cameraDirectionNormalized[1],l=this._cameraDirectionNormalized[2];let u=0;const d=this._atlasIndicesBuffer,_=this._distancesBuffer,p=this._renderer.clippingBox,f=this._nextCommittedVisibleGaussianTiles;f.length=0;let m=0;const{frustum:g}=o,T=this._renderer.tileCullingRevision,b=g[0],S=g[1],y=g[2],C=g[3],x=g[4],V=g[5];for(let e=0;e<s;e++){const s=t[e],{gaussianAtlasIndices:i,relativePositions:r,obbCenterX:o,obbCenterY:h,obbCenterZ:g,paddedMbsRadius:v}=s,A=s.gaussianCount;if(s.cullingRevision!==T){let e=null==p||c(s.boundingBox,p);if(e){const t=1.5*v;e=b[0]*o+b[1]*h+b[2]*g+b[3]<t&&S[0]*o+S[1]*h+S[2]*g+S[3]<t&&y[0]*o+y[1]*h+y[2]*g+y[3]<t&&C[0]*o+C[1]*h+C[2]*g+C[3]<t&&x[0]*o+x[1]*h+x[2]*g+x[3]<t&&V[0]*o+V[1]*h+V[2]*g+V[3]<t}s.cullingRevision=T,s.cullingVisible=e}if(!s.cullingVisible)continue;d.set(i,u),f[m++]=s;const B=a*o+n*h+l*g,G=u+A;for(let e=u,t=0;e<G;e++,t+=3){const s=r[t],i=r[t+1],o=r[t+2];_[e]=s*a+i*n+o*l+B}u=G}if(f.length=m,0===u)return this.visibleGaussians=0,this._clearAllBuffersAndTextures(),this._latestCompletedLyr3dVisibilityChange=i,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),void this._renderer.requestRender(1);const v={distances:this._distancesBuffer,atlasIndices:this._atlasIndicesBuffer,sortedAtlasIndices:this._sortedAtlasIndicesBuffer,numGaussians:u,preciseSort:this._useDeterministicSort},A=await(this._workerHandle?.sort(v,e));if(e.aborted)return;A&&(this._distancesBuffer=A.distances,this._atlasIndicesBuffer=A.atlasIndices,this._sortedAtlasIndicesBuffer=A.sortedAtlasIndices);const B=async e=>{this._orderTexture.setData(this._sortedAtlasIndicesBuffer,u);const t=this._latestSortedGaussianTiles;this._latestSortedGaussianTiles=f,this._nextCommittedVisibleGaussianTiles=t,this._latestSortedGaussianTilesVersion++,this._latestCompletedLyr3dVisibilityChange=i,this.visibleGaussians=u,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),this._renderer.requestRender(1),e.madeProgress()};await this._frameTask.schedule(B,e)}catch(t){if(i(t))return}}set useDeterministicSort(e){this._useDeterministicSort=e}}export{C as GaussianSplatDataStore};
2
+ import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{abortMaybe as t}from"../../../../core/maybe.js";import{estimateNumberArrayMemory as s}from"../../../../core/memoryEstimations.js";import{isAbortError as i}from"../../../../core/promiseUtils.js";import{signal as r}from"../../../../core/signal.js";import{Milliseconds as a,now as o}from"../../../../core/time.js";import{exactEquals as n,copy as l,normalize as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as d,exactEquals as _,intersects as c,copy as p}from"../../../../geometry/support/aaBoundingBox.js";import{makeScheduleFunction as f}from"../../layers/support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as m}from"../GaussianSplatWorkerHandle.js";import{GaussianSplatFadeTexture as g}from"./GaussianSplatFadeTexture.js";import{GaussianSplatHeaderTexture as T}from"./GaussianSplatHeaderTexture.js";import{GaussianSplatOrderTexture as b}from"./GaussianSplatOrderTexture.js";import{GaussianSplatTextureAtlas as S}from"./GaussianSplatTextureAtlas.js";import{DepthRange as y}from"../../webgl-engine/lib/DepthRange.js";import{TaskPriority as x}from"../../../support/Scheduler.js";class C{constructor(e,t,s){this._updating=r(!1),this._useDeterministicSort=!1,this._sortBufferMemory=0,this.visibleGaussians=0,this._visibleTileDepthRange=new y,this._previousVisibleTileDepthRangeEye=u(),this._previousVisibleTileDepthRangeViewForward=u(),this._previousVisibleTileDepthRangeClippingBox=d(),this._latestSortedGaussianTilesVersion=0,this._previousVisibleTileDepthRangeTilesVersion=-1,this._previousVisibleTileDepthRangeHasClippingBox=!1,this._bufferCapacity=0,this._requestedLyr3dVisibilityChange=0,this._latestCompletedLyr3dVisibilityChange=0,this._latestUpdatedGaussianTiles=new Array,this._latestSortedGaussianTiles=new Array,this._nextCommittedVisibleGaussianTiles=new Array,this._cameraDirectionNormalized=u(),this._frameTask=null,this._workerHandle=null,this._sortAbortController=null,this._isSorting=!1,this._pendingSortTask=!1,this._scheduledSortStartTimeout=null,this._lastSortStartTime=a(-1/0),this._sortInterval=a(80),this._renderer=e,this._onSortComplete=t,this._orderTexture=new b(this._renderer.renderingContext),this._fadingTexture=new g(this._renderer.renderingContext),this._headerTexture=new T(this._renderer.renderingContext),this._textureAtlas=new S(this._renderer.renderingContext,this._renderer.view.resourceController.memoryController,this._renderer.fboCache,s);const{resourceController:i}=this._renderer.view;this._workerHandle=new m(f(i)),this._frameTask=i.scheduler.registerTask(x.GAUSSIAN_SPLAT_SORTING)}get textureAtlas(){return this._textureAtlas}get orderTexture(){return this._orderTexture}get fadingTexture(){return this._fadingTexture}get headerTexture(){return this._headerTexture}get textureAtlasMemory(){return this._textureAtlas.usedMemory}get orderTextureMemory(){return this._orderTexture.usedMemory}get fadingTextureMemory(){return this._fadingTexture.usedMemory}get headerTextureMemory(){return this._headerTexture.usedMemory}get sortBufferMemory(){return this._sortBufferMemory}get usedMemory(){return this.textureAtlasMemory+this.headerTextureMemory+this.orderTextureMemory+this.fadingTextureMemory+this.sortBufferMemory}queryVisibleTileDepthRange(e,t){if(0===this.visibleGaussians)return null;const{eye:s,viewForward:i}=e,r=s[0],a=s[1],o=s[2],h=i[0],u=i[1],d=i[2],f=this._visibleTileDepthRange;if(this._previousVisibleTileDepthRangeTilesVersion===this._latestSortedGaussianTilesVersion&&n(this._previousVisibleTileDepthRangeEye,s)&&n(this._previousVisibleTileDepthRangeViewForward,i)&&(null==t?!this._previousVisibleTileDepthRangeHasClippingBox:this._previousVisibleTileDepthRangeHasClippingBox&&_(this._previousVisibleTileDepthRangeClippingBox,t)))return f.near<=f.far?f:null;let m=1/0,g=-1/0;const T=this._latestSortedGaussianTiles;for(let n=0;n<T.length;n++){const e=T[n];if(null!=t){const s=e.boundingBox;if(!c(s,t))continue}const s=h*(e.obbCenterX-r)+u*(e.obbCenterY-a)+d*(e.obbCenterZ-o),i=e.paddedMbsRadius,l=s-i;l<m&&(m=l);const _=s+i;_>g&&(g=_)}const b=m<=g;return b?f.set(m,g):f.set(1/0,-1/0),this._previousVisibleTileDepthRangeTilesVersion=this._latestSortedGaussianTilesVersion,this._previousVisibleTileDepthRangeHasClippingBox=null!=t,l(this._previousVisibleTileDepthRangeEye,s),l(this._previousVisibleTileDepthRangeViewForward,i),null!=t&&p(this._previousVisibleTileDepthRangeClippingBox,t),b?f:null}updateGaussianVisibility(e,t){this._latestUpdatedGaussianTiles=e,this._requestedLyr3dVisibilityChange=t,this.requestSort()}get updating(){return this._updating.value}destroy(){this._sortAbortController=t(this._sortAbortController),this._pendingSortTask=!1,this._updating.value=!1,null!=this._scheduledSortStartTimeout&&(clearTimeout(this._scheduledSortStartTimeout),this._scheduledSortStartTimeout=null),this._frameTask.remove(),this._workerHandle?.destroyWorkerAndSelf(),this._textureAtlas.destroy(),this._headerTexture.destroy(),this._orderTexture.destroy(),this._fadingTexture.destroy()}requestSort(){return this._updating.value=!0,!this._pendingSortTask&&(this._pendingSortTask=!0,this._scheduleSortStart(),!0)}_scheduleSortStart(){if(this._isSorting)return;const e=o()-this._lastSortStartTime,t=this._sortInterval-e;t<=0?this._startSortIfRequired():null==this._scheduledSortStartTimeout&&(this._scheduledSortStartTimeout=setTimeout(()=>{this._scheduledSortStartTimeout=null,this._pendingSortTask&&!this._isSorting&&this._scheduleSortStart()},t))}_startSortIfRequired(){if(this._isSorting||!this._pendingSortTask)return;const e=new AbortController;this._sortAbortController=e,this._isSorting=!0,this._pendingSortTask=!1,this._lastSortStartTime=o(),this._sortOnWorker(e.signal).finally(()=>{this._sortAbortController===e&&(this._sortAbortController=null),this._handleSortComplete()})}_handleSortComplete(){this._isSorting=!1,this._pendingSortTask?this._scheduleSortStart():this._updating.value=!1}_clearBuffersAndTextures(){this._atlasIndicesBuffer=void 0,this._sortedAtlasIndicesBuffer=void 0,this._distancesBuffer=void 0,this._bufferCapacity=0,this._sortBufferMemory=0,this._orderTexture.clear(),this._textureAtlas.clear(),this._headerTexture.clear()}_computeExpandedCapacity(t,s){let i=Math.max(1,t);for(;i<s;)i=Math.ceil(i*e);return i}_ensureSortBufferCapacities(e){if(this._bufferCapacity<e){const t=this._computeExpandedCapacity(this._bufferCapacity,e);this._atlasIndicesBuffer=new Uint32Array(t),this._sortedAtlasIndicesBuffer=new Uint32Array(t),this._distancesBuffer=new Float64Array(t),this._bufferCapacity=t,this._sortBufferMemory=s(this._atlasIndicesBuffer,this._sortedAtlasIndicesBuffer,this._distancesBuffer)}}_clearAllBuffersAndTextures(){this._clearBuffersAndTextures(),this._latestSortedGaussianTiles.length=0,this._nextCommittedVisibleGaussianTiles.length=0,this._previousVisibleTileDepthRangeTilesVersion=-1,this._workerHandle?.clear()}async _sortOnWorker(e){try{if(0===this._latestUpdatedGaussianTiles.length)return this.visibleGaussians=0,this._clearAllBuffersAndTextures(),this._latestCompletedLyr3dVisibilityChange=this._requestedLyr3dVisibilityChange,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),void this._renderer.requestRender(1);this._useDeterministicSort&&this._latestUpdatedGaussianTiles.sort((e,t)=>e.obb.centerX-t.obb.centerX||e.obb.centerY-t.obb.centerY||e.obb.centerZ-t.obb.centerZ);const t=this._latestUpdatedGaussianTiles,s=t.length,i=this._requestedLyr3dVisibilityChange;let r=0;for(let e=0;e<s;e++)r+=t[e].gaussianCount;this._ensureSortBufferCapacities(r),this._textureAtlas.ensureTextureAtlas(),this._headerTexture.ensureCapacity(this._textureAtlas.pageAllocator.pageCount);const a=this._renderer.camera;h(this._cameraDirectionNormalized,a.ray.direction);const o=this._cameraDirectionNormalized[0],n=this._cameraDirectionNormalized[1],l=this._cameraDirectionNormalized[2];let u=0;const d=this._atlasIndicesBuffer,_=this._distancesBuffer,p=this._renderer.clippingBox,f=this._nextCommittedVisibleGaussianTiles;f.length=0;let m=0;const{frustum:g}=a,T=this._renderer.tileCullingRevision,b=g[0],S=g[1],y=g[2],x=g[3],C=g[4],A=g[5];for(let e=0;e<s;e++){const s=t[e],{gaussianAtlasIndices:i,relativePositions:r,obbCenterX:a,obbCenterY:h,obbCenterZ:g,paddedMbsRadius:V}=s,v=s.gaussianCount;if(s.cullingRevision!==T){let e=null==p||c(s.boundingBox,p);if(e){const t=1.5*V;e=b[0]*a+b[1]*h+b[2]*g+b[3]<t&&S[0]*a+S[1]*h+S[2]*g+S[3]<t&&y[0]*a+y[1]*h+y[2]*g+y[3]<t&&x[0]*a+x[1]*h+x[2]*g+x[3]<t&&C[0]*a+C[1]*h+C[2]*g+C[3]<t&&A[0]*a+A[1]*h+A[2]*g+A[3]<t}s.cullingRevision=T,s.cullingVisible=e}if(!s.cullingVisible)continue;d.set(i,u),f[m++]=s;const B=o*a+n*h+l*g,G=u+v;for(let e=u,t=0;e<G;e++,t+=3){const s=r[t],i=r[t+1],a=r[t+2];_[e]=s*o+i*n+a*l+B}u=G}if(f.length=m,0===u)return this.visibleGaussians=0,this._clearAllBuffersAndTextures(),this._latestCompletedLyr3dVisibilityChange=i,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),void this._renderer.requestRender(1);const V={distances:this._distancesBuffer,atlasIndices:this._atlasIndicesBuffer,sortedAtlasIndices:this._sortedAtlasIndicesBuffer,numGaussians:u,preciseSort:this._useDeterministicSort},v=await(this._workerHandle?.sort(V,e));if(e.aborted)return;v&&(this._distancesBuffer=v.distances,this._atlasIndicesBuffer=v.atlasIndices,this._sortedAtlasIndicesBuffer=v.sortedAtlasIndices);const B=async e=>{this._orderTexture.setData(this._sortedAtlasIndicesBuffer,u);const t=this._latestSortedGaussianTiles;this._latestSortedGaussianTiles=f,this._nextCommittedVisibleGaussianTiles=t,this._latestSortedGaussianTilesVersion++,this._latestCompletedLyr3dVisibilityChange=i,this.visibleGaussians=u,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),this._renderer.requestRender(1),e.madeProgress()};await this._frameTask.schedule(B,e)}catch(t){if(i(t))return}}set useDeterministicSort(e){this._useDeterministicSort=e}}export{C as GaussianSplatDataStore};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{estimateNumberArrayMemory as t}from"../../../../core/memoryEstimations.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../webgl/BufferObject.js";import"../../../webgl/FramebufferObject.js";import"../../../webgl/Program.js";import"../../../../core/has.js";import"../../../webgl/Renderbuffer.js";import s from"../../../webgl/Texture.js";import"../../../../core/Logger.js";import{PixelType as i,SizedPixelFormat as a}from"../../../webgl/enums.js";import"../../../webgl/Util.js";import{initialSplatAtlasTexturePages as o,packedGaussianSizeInU32 as h}from"./GaussianSplatAtlasPages.js";import{TextureDescriptor as u}from"../../../webgl/TextureDescriptor.js";class m{constructor(e){this.texture=null,this._headerTextureCapacity=0,this._rctx=e}get usedMemory(){return(this.texture?.usedMemory??0)+t(this._headerBuffer)}ensureCapacity(t){const r=this.texture;if(this._headerTextureCapacity>=t&&r?.hasWebGLTextureObject)return;const m=Math.max(Math.ceil(t*e),o,this._headerTextureCapacity),[c,p]=this._evalTextureSize(m),l=c*p,f=this._headerBuffer,d=new Uint32Array(l*h);f&&d.set(f.subarray(0,Math.min(f.length,d.length))),this._headerBuffer=d,this._headerTextureCapacity=l,this.texture?.dispose();const n=new u;n.width=c,n.height=p,n.pixelFormat=36249,n.dataType=i.UNSIGNED_INT,n.internalFormat=a.RGBA32UI,n.wrapMode=33071,n.samplingMode=9728,n.isImmutable=!0,this.texture=new s(this._rctx,n),this.texture.updateData(0,0,0,c,p,this._headerBuffer)}update(e,t){this.ensureCapacity(e+1);const r=e*h;this._headerBuffer.set(t,r);const s=this.texture,i=s.descriptor.width,a=e%i,o=Math.floor(e/i);s.updateData(0,a,o,1,1,this._headerBuffer.subarray(r,r+4))}clear(){this.texture?.dispose(),this.texture=null}destroy(){this._headerBuffer=void 0,this._headerTextureCapacity=0,this.clear()}_evalTextureSize(e){const t=Math.ceil(Math.sqrt(e)),s=Math.ceil(e/t);return r(t,s)}}export{m as GaussianSplatHeaderTexture};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{reallocGrowthFactor as t}from"../../../../core/arrayUtils.js";import{initialSplatAtlasTextureHeight as e,GaussianSplatAtlasPages as s,splatAtlasTextureWidth as r,elementsPerSplatPage as a}from"./GaussianSplatAtlasPages.js";import{PixelType as i,SizedPixelFormat as l}from"../../../webgl/enums.js";import{DisposableFramebufferObject as h}from"../../../webgl/FramebufferObject.js";import o from"../../../webgl/Texture.js";import{TextureDescriptor as u}from"../../../webgl/TextureDescriptor.js";class c{constructor(t,r,a,i){this._splatAtlasTextureHeight=e,this.texture=null,this._rctx=t,this._fboCache=a,this._onCachedTextureEvicted=i,this.pageAllocator=new s,this._cache=r.newCache("gaussian texture cache",t=>{t.dispose(),this._onCachedTextureEvicted()})}get usedMemory(){return this.texture?.usedMemory??0}ensureTextureAtlas(){if(this.texture?.hasWebGLTextureObject)return;this.texture=null;const t=this._cache.pop("splatTextureAtlas");if(t)return void(this.texture=t);const e=new u;e.height=this._splatAtlasTextureHeight,e.width=r,e.pixelFormat=36249,e.dataType=i.UNSIGNED_INT,e.internalFormat=l.RGBA32UI,e.samplingMode=9728,e.wrapMode=33071,e.isImmutable=!0,this.texture=new o(this._rctx,e),this._updatePageAllocator()}grow(){if(!this.texture)return this.ensureTextureAtlas(),!1;const e=Math.floor(this._splatAtlasTextureHeight*t);if(e*r>this._rctx.parameters.maxPreferredTexturePixels)return!1;const s=new h(this._rctx,this.texture),a=this._fboCache.acquire(r,e,"gaussian splat atlas resize",12);return this._rctx.blitFramebuffer(s,a.fbo,16384,9728,0,0,r,this._splatAtlasTextureHeight,0,0,r,this._splatAtlasTextureHeight),this.texture=a.fbo?.detachColorTexture(),s.dispose(),a.dispose(),this._splatAtlasTextureHeight=e,this._updatePageAllocator(),!0}requestPage(){let t=this.pageAllocator.findFirstFreePage();return null===t&&this.grow()&&(t=this.pageAllocator.findFirstFreePage()),null!==t&&this.pageAllocator.allocate(t),t}freePage(t){this.pageAllocator.free(t)}update(t,e,s){this.ensureTextureAtlas(),this.texture.updateData(0,t,e,a,1,s)}_updatePageAllocator(){const t=r*this._splatAtlasTextureHeight/a;this.pageAllocator.pageCount!==t&&this.pageAllocator.resize(t)}clear(){this.texture&&(this._cache.put("splatTextureAtlas",this.texture),this.texture=null)}destroy(){this._onCachedTextureEvicted=()=>{},this._cache.destroy(),this.texture?.dispose(),this.texture=null}}export{c as GaussianSplatTextureAtlas};
2
+ import{has}from"../../../../applications/Components/baUtils.js";import{reallocGrowthFactor as t}from"../../../../core/arrayUtils.js";import{initialSplatAtlasTextureHeight as e,GaussianSplatAtlasPages as s,splatAtlasTextureWidth as r,gaussiansPerPage as a}from"./GaussianSplatAtlasPages.js";import{PixelType as i,SizedPixelFormat as l}from"../../../webgl/enums.js";import{DisposableFramebufferObject as o}from"../../../webgl/FramebufferObject.js";import h from"../../../webgl/Texture.js";import{TextureDescriptor as u}from"../../../webgl/TextureDescriptor.js";class c{constructor(t,r,a,i){this._splatAtlasTextureHeight=e,this.texture=null,this._rctx=t,this._fboCache=a,this._onCachedTextureEvicted=i,this.pageAllocator=new s,this._cache=r.newCache("gaussian texture cache",t=>{t.dispose(),this._onCachedTextureEvicted()})}get usedMemory(){return this.texture?.usedMemory??0}ensureTextureAtlas(){if(this.texture?.hasWebGLTextureObject)return;this.texture=null;const t=this._cache.pop("splatTextureAtlas");if(t)return void(this.texture=t);const e=new u;e.height=this._splatAtlasTextureHeight,e.width=r,e.pixelFormat=36249,e.dataType=i.UNSIGNED_INT,e.internalFormat=l.RGBA32UI,e.samplingMode=9728,e.wrapMode=33071,e.isImmutable=!0,this.texture=new h(this._rctx,e),this._updatePageAllocator()}grow(){if(!this.texture)return this.ensureTextureAtlas(),!1;const e=Math.floor(this._splatAtlasTextureHeight*t);if(e>Math.min(has("esri-mobile")?4096:16384,this._rctx.parameters.maxTextureSize))return!1;const s=new o(this._rctx,this.texture),a=this._fboCache.acquire(r,e,"gaussian splat atlas resize",12);return this._rctx.blitFramebuffer(s,a.fbo,16384,9728,0,0,r,this._splatAtlasTextureHeight,0,0,r,this._splatAtlasTextureHeight),this.texture=a.fbo?.detachColorTexture(),s.dispose(),a.dispose(),this._splatAtlasTextureHeight=e,this._updatePageAllocator(),!0}requestPage(){let t=this.pageAllocator.findFirstFreePage();return null===t&&this.grow()&&(t=this.pageAllocator.findFirstFreePage()),null!==t&&this.pageAllocator.allocate(t),t}freePage(t){this.pageAllocator.free(t)}update(t,e,s){this.ensureTextureAtlas(),this.texture.updateData(0,t,e,a,1,s)}_updatePageAllocator(){const t=r*this._splatAtlasTextureHeight/a;this.pageAllocator.pageCount!==t&&this.pageAllocator.resize(t)}clear(){this.texture&&(this._cache.put("splatTextureAtlas",this.texture),this.texture=null)}destroy(){this._onCachedTextureEvicted=()=>{},this._cache.destroy(),this.texture?.dispose(),this.texture=null}}export{c as GaussianSplatTextureAtlas};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{clamp as e}from"../../../../core/mathUtils.js";import{removeMaybe as r,destroyMaybe as i}from"../../../../core/maybe.js";import{property as s,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{copy as a,distance as n,scale as c,add as u,exactEquals as l,squaredLength as d}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as h}from"../../../../geometry/ellipsoidUtils.js";import f from"../../../../geometry/Point.js";import{projectBoundingRect as m}from"../../../../geometry/projection/projectBoundingRect.js";import{create as _}from"../../../../geometry/support/aaBoundingRect.js";import{debugFlags as g}from"../debugFlags.js";import{PointOfInterest as y}from"./PointOfInterest.js";import{PropertiesPool as S}from"../../../support/PropertiesPool.js";import{Yield as A}from"../../../support/Yield.js";let j=class extends y{constructor(t){super(t),this._propertiesPool=new S({location:()=>new f,renderLocation:()=>p()},this),this._currentSurfaceAltitude=0,this._latestSurfaceAltitude=0,this.distance=0,this.renderLocation=p(),this.updating=!1}initialize(){this._frameWorker=this.scheduler.registerTask(this.task,this),this.runTask()}destroy(){this._frameWorker=r(this._frameWorker),this._propertiesPool=i(this._propertiesPool)}get _camera(){return this.state.contentCamera}get location(){const t=this._propertiesPool?.get("location");return t?(t.spatialReference=this.state.spatialReference,this.renderCoordsHelper.fromRenderCoords(this.renderLocation,t),t):new f}updateRenderLocation(){this.updating=!0,this._updateRenderLocation()}get estimatedSurfaceAltitude(){return this._latestSurfaceAltitude}get readyToRun(){return this.updating}runTask(){return this._latestSurfaceAltitude=this.estimateSurfaceAltitudeAtCenter(),this._updateRenderLocation(),this.updating=!1,A}_updateRenderLocation(){const t=L;let e=this._calculateSurfaceIntersection(this._currentSurfaceAltitude,t);const r=this._currentSurfaceAltitude!==this._latestSurfaceAltitude;!e&&r&&(e=this._calculateSurfaceIntersection(this._latestSurfaceAltitude,t),e&&(this._currentSurfaceAltitude=this._latestSurfaceAltitude));const i=v;e&&this._latestSurfaceAltitudeChangesDistanceSignificantly(t,i)&&(a(t,i),this._currentSurfaceAltitude=this._latestSurfaceAltitude),e?this.distance=n(this._camera.eye,t):(c(t,this._camera.viewForward,this._get("distance")),u(t,t,this._camera.eye)),l(this._get("renderLocation"),t)||this._set("renderLocation",a(this._propertiesPool.get("renderLocation"),t))}_calculateSurfaceIntersection(t,r){const i=this._camera;if(!this.renderCoordsHelper.intersectInfiniteManifold(i.ray,t,r))return!1;if(this.state.isGlobal){const e=h(this.renderCoordsHelper.spatialReference).radius,s=e+t,o=d(i.eye),a=o<s*s,l=n(i.eye,r);if(a&&l>e/4){const t=s-Math.sqrt(o);return c(r,i.viewForward,t),u(r,r,i.eye),!0}}else{const t=this.surface?.ready?this.surface.groundExtent:null;null!=t&&m(t,this.surface?.spatialReference,C,this.renderCoordsHelper.spatialReference)&&(r[0]=e(r[0],C[0],C[2]),r[1]=e(r[1],C[1],C[3]))}return!0}_latestSurfaceAltitudeChangesDistanceSignificantly(t,e){if(this._latestSurfaceAltitude===this._currentSurfaceAltitude||null==t)return!1;if(this._calculateSurfaceIntersection(this._latestSurfaceAltitude,e)){if(!g.ENABLE_OPTIMIZATIONS)return!0;const r=this._camera.eye,i=n(r,t),s=n(r,e);if(Math.abs(s-i)/i>R)return!0}return!1}};t([s({constructOnly:!0})],j.prototype,"scheduler",void 0),t([s({constructOnly:!0})],j.prototype,"task",void 0),t([s()],j.prototype,"distance",void 0),t([s({constructOnly:!0})],j.prototype,"estimateSurfaceAltitudeAtCenter",void 0),t([s({readOnly:!0})],j.prototype,"location",null),t([s({readOnly:!0})],j.prototype,"renderLocation",void 0),t([s()],j.prototype,"updating",void 0),j=t([o("esri.views.3d.support.pointsOfInterest.CenterOnSurface")],j);const R=.05,L=p(),v=p(),C=_();export{j as CenterOnSurface};
2
+ import{__decorate as t}from"tslib";import{clamp as e}from"../../../../core/mathUtils.js";import{removeMaybe as r,destroyMaybe as i}from"../../../../core/maybe.js";import{property as s,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{copy as a,distance as n,scale as c,add as u,exactEquals as l,squaredLength as d}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as h}from"../../../../geometry/ellipsoidUtils.js";import f from"../../../../geometry/Point.js";import{projectBoundingRect as m}from"../../../../geometry/projection/projectBoundingRect.js";import{create as _}from"../../../../geometry/support/aaBoundingRect.js";import{debugFlags as g}from"../debugFlags.js";import{PointOfInterest as y}from"./PointOfInterest.js";import{PropertiesPool as S}from"../../../support/PropertiesPool.js";import{Yield as A}from"../../../support/Yield.js";let j=class extends y{constructor(t){super(t),this._propertiesPool=new S({location:()=>new f,renderLocation:()=>p()},this),this._currentSurfaceAltitude=0,this._latestSurfaceAltitude=0,this.distance=0,this.renderLocation=p(),this.updating=!1}initialize(){this._frameWorker=this.scheduler.registerTask(this.task,this),this.runTask()}destroy(){this._frameWorker=r(this._frameWorker),this._propertiesPool=i(this._propertiesPool)}get _camera(){return this.state.contentCamera}get location(){const t=this._propertiesPool?.get("location");return t?(t.spatialReference=this.state.spatialReference,this.renderCoordsHelper.fromRenderCoords(this.renderLocation,t),t):new f}updateRenderLocation(){this.updating=!0,this._updateRenderLocation()}get estimatedSurfaceAltitude(){return this._latestSurfaceAltitude}get readyToRun(){return this.updating}runTask(){return this._latestSurfaceAltitude=this.estimateSurfaceAltitudeAtCenter(),this._updateRenderLocation(),this.updating=!1,A}_updateRenderLocation(){const t=R;let e=this._calculateSurfaceIntersection(this._currentSurfaceAltitude,t);const r=this._currentSurfaceAltitude!==this._latestSurfaceAltitude;!e&&r&&(e=this._calculateSurfaceIntersection(this._latestSurfaceAltitude,t),e&&(this._currentSurfaceAltitude=this._latestSurfaceAltitude));const i=L;e&&this._latestSurfaceAltitudeChangesDistance(t,i)&&(a(t,i),this._currentSurfaceAltitude=this._latestSurfaceAltitude),e?this.distance=n(this._camera.eye,t):(c(t,this._camera.viewForward,this._get("distance")),u(t,t,this._camera.eye)),l(this._get("renderLocation"),t)||this._set("renderLocation",a(this._propertiesPool.get("renderLocation"),t))}_calculateSurfaceIntersection(t,r){const i=this._camera;if(!this.renderCoordsHelper.intersectInfiniteManifold(i.ray,t,r))return!1;if(this.state.isGlobal){const e=h(this.renderCoordsHelper.spatialReference).radius,s=e+t,o=d(i.eye),a=o<s*s,l=n(i.eye,r);if(a&&l>e/4){const t=s-Math.sqrt(o);return c(r,i.viewForward,t),u(r,r,i.eye),!0}}else{const t=this.surface?.ready?this.surface.groundExtent:null;null!=t&&m(t,this.surface?.spatialReference,v,this.renderCoordsHelper.spatialReference)&&(r[0]=e(r[0],v[0],v[2]),r[1]=e(r[1],v[1],v[3]))}return!0}_latestSurfaceAltitudeChangesDistance(t,e){if(this._latestSurfaceAltitude===this._currentSurfaceAltitude||null==t)return!1;if(this._calculateSurfaceIntersection(this._latestSurfaceAltitude,e)){if(!g.ENABLE_OPTIMIZATIONS)return!0;const r=this._camera.eye;if(n(r,t)!==n(r,e))return!0}return!1}};t([s({constructOnly:!0})],j.prototype,"scheduler",void 0),t([s({constructOnly:!0})],j.prototype,"task",void 0),t([s()],j.prototype,"distance",void 0),t([s({constructOnly:!0})],j.prototype,"estimateSurfaceAltitudeAtCenter",void 0),t([s({readOnly:!0})],j.prototype,"location",null),t([s({readOnly:!0})],j.prototype,"renderLocation",void 0),t([s()],j.prototype,"updating",void 0),j=t([o("esri.views.3d.support.pointsOfInterest.CenterOnSurface")],j);const R=p(),L=p(),v=_();export{j as CenterOnSurface};
@@ -1,16 +1,16 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{DecodeSymbolColor as o}from"./DecodeSymbolColor.glsl.js";import{TextureBackedBufferModule as e}from"../../../core/shaderLibrary/TextureBackedBuffer.glsl.js";import{Float4DrawUniform as r}from"../../../core/shaderModules/Float4DrawUniform.js";import{FloatDrawUniform as t}from"../../../core/shaderModules/FloatDrawUniform.js";import{glsl as d,If as n}from"../../../core/shaderModules/glsl.js";import{IntegerDrawUniform as a}from"../../../core/shaderModules/IntegerDrawUniform.js";import{Texture2DUintDrawUniform as l}from"../../../core/shaderModules/Texture2DUintDrawUniform.js";import{olidEnabled as i}from"../../../effects/geometry/olidUtils.js";import{componentDataLayout as s,componentDataOlidLayout as c}from"../../../materials/DefaultLayouts.js";import{oitResolution as u}from"../../../shaders/oitResolution.glsl.js";function m(o,e){switch(e.componentDataType){case 1:return M(o,e);case 0:return h(o,e);case 2:return;default:e.componentDataType}}const f=(o,e)=>"emissiveSourceMode"===o||"emissiveStrength"===o?e.hasEmission:"olidColor"!==o||11===e.output,v=new l("componentTextureBuffer",o=>o.textureBackedBuffer?.texture),C=new e({layout:s,itemIndexAttribute:"componentIndex",bufferUniform:v,fieldFilter:f}),x=new e({layout:c,itemIndexAttribute:"componentIndex",bufferUniform:v,fieldFilter:f});function p(){return i()?x:C}function M(e,r){const{vertex:t,fragment:a}=e,{output:l,hasEmission:i}=r,s=11===l,{getTextureAttribute:c,TextureBackedBufferModule:m}=p();e.include(m,r),e.attributes.add("componentIndex","uint"),e.varyings.add("vExternalColorMixMode","mediump float"),e.varyings.add("vExternalColor","vec4"),s&&e.varyings.add("vObjectAndLayerIdColor","vec4"),i&&(e.varyings.add("emissiveStrength","float"),e.varyings.add("emissiveSource","int")),e.include(o),t.include(u,r),t.code.add(d`
2
+ import{DecodeSymbolColor as o}from"./DecodeSymbolColor.glsl.js";import{TextureBackedBufferModule as e}from"../../../core/shaderLibrary/TextureBackedBuffer.glsl.js";import{Float4DrawUniform as r}from"../../../core/shaderModules/Float4DrawUniform.js";import{FloatDrawUniform as t}from"../../../core/shaderModules/FloatDrawUniform.js";import{glsl as n,If as d}from"../../../core/shaderModules/glsl.js";import{IntegerDrawUniform as a}from"../../../core/shaderModules/IntegerDrawUniform.js";import{Texture2DUintDrawUniform as l}from"../../../core/shaderModules/Texture2DUintDrawUniform.js";import{olidEnabled as i}from"../../../effects/geometry/olidUtils.js";import{componentDataLayout as s,componentDataOlidLayout as c}from"../../../materials/DefaultLayouts.js";import{oitResolution as u}from"../../../shaders/oitResolution.glsl.js";function m(o,e){switch(e.componentDataType){case 1:return p(o,e);case 0:return M(o,e);case 2:return;default:e.componentDataType}}const f=new l("componentTextureBuffer",o=>o.textureBackedBuffer?.texture),v=new e({layout:s,itemIndexExpression:"componentIndex",bufferUniform:f}),x=new e({layout:c,itemIndexExpression:"componentIndex",bufferUniform:f});function C(){return i()?x:v}function p(e,r){const{vertex:t,fragment:a}=e,{output:l,hasEmission:i}=r,s=11===l,c=C().createBuilder(e,r);e.attributes.add("componentIndex","uint"),e.varyings.add("vExternalColorMixMode","mediump float"),e.varyings.add("vExternalColor","vec4"),s&&e.varyings.add("vObjectAndLayerIdColor","vec4"),i&&(e.varyings.add("emissiveStrength","float"),e.varyings.add("emissiveSource","int")),e.include(o),t.include(u,r),t.code.add(n`
3
3
  float readElevationOffset() {
4
- return ${c("elevationOffset")};
4
+ return ${c.getTextureAttribute("elevationOffset")};
5
5
  }
6
6
 
7
7
  void forwardEmissiveStrength() {
8
- ${n(i,d`emissiveStrength = clamp(${c("emissiveStrength")}, 0.0, maxEmissiveStrength);
9
- emissiveSource = ${c("emissiveSourceMode")} == 0u ? 0 : 1;`)}
8
+ ${d(i,n`emissiveStrength = clamp(${c.getTextureAttribute("emissiveStrength")}, 0.0, maxEmissiveStrength);
9
+ emissiveSource = ${c.getTextureAttribute("emissiveSourceMode")} == 0u ? 0 : 1;`)}
10
10
  }
11
11
 
12
12
  void forwardObjectAndLayerIdColor() {
13
- ${n(s,d`vObjectAndLayerIdColor = vec4(${c("olidColor")})/255.0;`)}
13
+ ${d(s,n`vObjectAndLayerIdColor = vec4(${c.getTextureAttribute("olidColor")})/255.0;`)}
14
14
  }
15
15
 
16
16
  void decodeColorAndCastShadow(uvec4 colorAndCastShadowEncoded, out vec4 color, out bool castShadow) {
@@ -22,7 +22,7 @@ import{DecodeSymbolColor as o}from"./DecodeSymbolColor.glsl.js";import{TextureBa
22
22
 
23
23
  vec4 forwardExternalColor(out bool castShadows) {
24
24
  vec4 componentColor;
25
- decodeColorAndCastShadow(${c("colorAndCastShadows")}, componentColor, castShadows);
25
+ decodeColorAndCastShadow(${c.getTextureAttribute("colorAndCastShadows")}, componentColor, castShadows);
26
26
 
27
27
  int decodedColorMixMode;
28
28
  vExternalColor = decodeSymbolColor(componentColor, decodedColorMixMode) * 0.003921568627451; // = 1/255;
@@ -30,16 +30,16 @@ import{DecodeSymbolColor as o}from"./DecodeSymbolColor.glsl.js";import{TextureBa
30
30
 
31
31
  return vExternalColor;
32
32
  }
33
- `),a.code.add(d`
33
+ `),a.code.add(n`
34
34
  void readExternalColor(out vec4 externalColor, out int externalColorMixMode) {
35
35
  externalColor = vExternalColor;
36
36
  externalColorMixMode = int(vExternalColorMixMode);
37
37
  }
38
38
 
39
39
  void outputObjectAndLayerIdColor() {
40
- ${s?d`fragColor = vObjectAndLayerIdColor;`:""}
40
+ ${s?n`fragColor = vObjectAndLayerIdColor;`:""}
41
41
  }
42
- `)}function h(o,e){const{vertex:l,fragment:i}=o;o.varyings.add("vExternalColor","vec4"),i.uniforms.add(new t("emissiveStrength",o=>o.componentParameters.emissiveStrength)),l.uniforms.add(new r("externalColor",o=>o.componentParameters.externalColor)).code.add(d`float readElevationOffset() {
42
+ `)}function M(o,e){const{vertex:l,fragment:i}=o;o.varyings.add("vExternalColor","vec4"),i.uniforms.add(new t("emissiveStrength",o=>o.componentParameters.emissiveStrength)),l.uniforms.add(new r("externalColor",o=>o.componentParameters.externalColor)).code.add(n`float readElevationOffset() {
43
43
  return 0.0;
44
44
  }
45
45
  void forwardObjectAndLayerIdColor() {}
@@ -48,13 +48,13 @@ vec4 forwardExternalColor(out bool castShadows) {
48
48
  vExternalColor = externalColor;
49
49
  castShadows = true;
50
50
  return externalColor;
51
- }`);const s=11===e.output;i.uniforms.add(new a("externalColorMixMode",o=>o.componentParameters.externalColorMixMode)).code.add(d`
51
+ }`);const s=11===e.output;i.uniforms.add(new a("externalColorMixMode",o=>o.componentParameters.externalColorMixMode)).code.add(n`
52
52
  void readExternalColor(out vec4 color, out int colorMixMode) {
53
53
  color = vExternalColor;
54
54
  colorMixMode = externalColorMixMode;
55
55
  }
56
56
 
57
57
  void outputObjectAndLayerIdColor() {
58
- ${n(s,"fragColor = vec4(0, 0, 0, 0);")}
58
+ ${d(s,"fragColor = vec4(0, 0, 0, 0);")}
59
59
  }
60
60
  `)}export{m as ComponentData};
@@ -1,11 +1,8 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{generateUID as e}from"../../../../../core/uid.js";import{TextureBufferNaNSupportConfiguration as t,unpackFloat1x32 as n,unpackHalf as o,unpackInt1x16 as d,glslType as i,glslDecodeField as r}from"./TextureBackedBufferFields.glsl.js";import{glsl as a}from"../shaderModules/glsl.js";import{assert as c}from"../../lib/Util.js";const s=new t(!0),u=new t(!1);class f{constructor(t){this.moduleId=e(),this.namespace=`_tbb_${this.moduleId}_`;const{itemIndexAttribute:n,bufferUniform:o,layout:d}=t,i=t.fieldFilter??(()=>!0),r=t.enableNaNSupport?s:u;this.TextureBackedBufferModule=(e,t)=>l(this.namespace,e,t,n,o,d,i,r),this.getTextureAttribute=m(this.namespace)}}function l(e,t,s,u,f,l,m,p){const{vertex:g}=t,{texelFormatInfo:I}=l;g.include(n,p),g.include(o,p),g.include(d);const b=`${e}tbbStride`,B=`${e}TextureBackedBufferItemData`,v=`${e}fetchTextureBackedBufferItemData`,T=h(e);for(const n of[b,B,v,T])c(n.length<1024,"Identifiers do not have a valid length");g.constants.add(b,"uint",l.texelStride),g.uniforms.add(f);const w=new Array;for(const n of l.fields.values())m(n.name,s)&&w.push(n);if(0===w.length)return;const D=[];for(let n=0;n<l.texelStride;++n)D.push(!1);for(const n of w)for(let e=0;e<n.numTexels;++e)D[n.startTexel+e]=!0;g.code.add(a`
3
- struct ${B} {`);for(const n of w)g.code.add(a`\t${i(n)} ${n.name};`);g.code.add(a`};`),g.code.add(a`
4
- ${B} ${v}(highp uint itemIndex) {
5
- ${B} itemData;
6
- highp uint index = itemIndex * ${b};
7
- highp uint rowWidth = uint(textureSize(${f.name}, 0).x);
2
+ import{generateUID as e}from"../../../../../core/uid.js";import{unpackFloat1x32 as t,TextureBufferNaNSupportConfiguration as r,unpackHalf as n,unpackInt1x16 as a,glslType as s,glslDecodeField as i}from"./TextureBackedBufferFields.glsl.js";import{glsl as d}from"../shaderModules/glsl.js";import{assert as o}from"../../lib/Util.js";import{Code as u}from"../../../../webgl/ShaderBuilder.js";const c=new r(!0),h=new r(!1);class l{constructor(e,t){this._shader=e,this._namespace=t,this._used=new Map}getItemSuffix(e){if(0===e)return"";return`${e<0?"Minus":"Plus"}${Math.abs(e)}`}getItemDataName(e=0){return`${this._namespace}ItemData${this.getItemSuffix(e)}`}getStructName(e=0){return`${this._namespace}TextureBackedBufferItemData${this.getItemSuffix(e)}`}getFetchName(e=0){return`${this._namespace}fetchTextureBackedBufferItemData${this.getItemSuffix(e)}`}getStrideName(){return`${this._namespace}tbbStride`}getTextureAttribute(e,t=0){const r=this._used,n=this.getItemDataName(t);let a=r.get(t);return null==a&&(a=new Set,r.set(t,a)),a.add(e),d`${n}.${e}`}generateVertexCode(e){const{_shader:t,_used:r}=this,n=new u(t.vertex);for(const a of r.keys())this._generateFetchFunction(a,n,e);return n.generateSource()}generateVertexMainCode(e){const{_shader:t,_used:r}=this,n=new u(t.vertex);for(const a of r.keys())this._generateFetchFunctionCall(a,n,e);return n.generateSource()}_generateFetchFunctionCall(e,t,r){const{itemIndexExpression:n}=r,a=this._used.get(e);if(null==a||0===a.size)return;const s=this.getItemDataName(e),i=this.getFetchName(e);t.add(d`${s} = ${i}(${n});`)}_getIndexOffset(e=0){if(0===e)return d``;return d`${e<0?"-":"+"}${d.uint(Math.abs(e))}`}_generateFetchFunction(e,t,r){const{bufferUniform:n,layout:a}=r,{texelFormatInfo:o}=a,u=this._used.get(e);if(null==u||0===u.size)return;const c=this.getStrideName(),h=this.getStructName(e),l=this.getItemDataName(e),m=this.getFetchName(e),x=this._getIndexOffset(e),$=new Array;for(const s of a.fields.values())u.has(s.name)&&$.push(s);if(0===$.length)return;const _=[];for(let s=0;s<a.texelStride;++s)_.push(!1);for(const s of $)for(let e=0;e<s.numTexels;++e)_[s.startTexel+e]=!0;t.add(d`
3
+ struct ${h} {`);for(const i of $)t.add(d`\t${s(i)} ${i.name};`);t.add(d`};`),t.add(d`\n${h} ${m}( highp uint baseIndex ) {
4
+ ${h} itemData;
5
+ highp uint index = (baseIndex${x}) * ${c};
6
+ highp uint rowWidth = uint(textureSize(${n.name}, 0).x);
8
7
  int coordX = int(index % rowWidth);
9
- int coordY = int(index / rowWidth);
10
- `);const S=$[I.channels],j=x[I.channels];for(let n=0;n<D.length;++n)!1!==D[n]&&g.code.add(a`highp ${S} texel${a.int(n)} = texelFetch(${f.name}, ivec2(coordX + ${a.int(n)}, coordY), 0)${j};`);for(const n of w)g.code.add(a`itemData.${n.name} = ${r(n,I)};`);g.code.add(a`return itemData;
11
- }`),g.code.add(a`${B} ${T};`),g.main.add(a`${T} = ${v}(${u});`)}function m(e){const t=h(e);return e=>a`${t}.${e}`}function h(e){return`${e}ItemData`}const $={1:a`uint`,2:a`uvec2`,4:a`uvec4`},x={1:a`.x`,2:a`.xy`,4:""};export{f as TextureBackedBufferModule};
8
+ int coordY = int(index / rowWidth);\n`);const p=f[o.channels],I=g[o.channels];for(let s=0;s<_.length;++s)!1!==_[s]&&t.add(d`highp ${p} texel${d.int(s)} = texelFetch(${n.name}, ivec2(coordX + ${d.int(s)}, coordY), 0)${I};`);for(const s of $)t.add(d`itemData.${s.name} = ${i(s,o)};`);t.add(d`return itemData;\n}`),t.add(d`${h} ${l};`)}}class m{constructor(t){this._parameters=t,this.moduleId=e(),this.namespace=`_tbb_${this.moduleId}_`}createBuilder(e,t){let r=null;const n=e=>{r=this._buildTextureBackedBufferShaderCode(e)};return t?e.include(n,t):e.include(n),o(null!=r,"Valid builder expected."),r}_buildTextureBackedBufferShaderCode(e){const{namespace:r,_parameters:s}=this,{bufferUniform:i,layout:d}=s,u=s.enableNaNSupport?c:h,{vertex:m}=e,f=new l(e,r);m.include(t,u),m.include(n,u),m.include(a);const g=f.getStrideName(),x=f.getStructName(),$=f.getFetchName(),_=f.getItemDataName();for(const t of[g,x,$,_])o(t.length<1024,"Identifiers do not have a valid length");return m.constants.add(g,"uint",d.texelStride),m.uniforms.add(i),m.code.add(()=>f.generateVertexCode(s)),m.main.add(()=>f.generateVertexMainCode(s)),f}}const f={1:d`uint`,2:d`uvec2`,4:d`uvec4`},g={1:d`.x`,2:d`.xy`,4:""};export{m as TextureBackedBufferModule};
@@ -1,8 +1,8 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{freeze as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{pathNumRoundCapExtrusionSubdivisions as t}from"../../../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{PathVertexInfo as o}from"./PathVertexInfo.glsl.js";import{PiUtils as r}from"../shading/PiUtils.glsl.js";import{Float2sPassUniform as a}from"../../shaderModules/Float2sPassUniform.js";import{Float4sPassUniform as n}from"../../shaderModules/Float4sPassUniform.js";import{FloatPassUniform as i}from"../../shaderModules/FloatPassUniform.js";import{glsl as l,If as f}from"../../shaderModules/glsl.js";import{IntegerPassUniform as s}from"../../shaderModules/IntegerPassUniform.js";import{IntegersPassUniform as p}from"../../shaderModules/IntegersPassUniform.js";import{pathProfileUniformLayout as d}from"../../../lib/PathProfile.js";function x(e,x){const{vertex:m}=e;e.include(o);const u=1===x.upVectorAlignment;m.uniforms.add(new i("angleCutoff",e=>e.cutoffAngle)),m.code.add(l`float reciprocalClamped(float value) {
2
+ import{freeze as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{pathNumRoundCapExtrusionSubdivisions as t}from"../../../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{PathVertexInfo as r}from"./PathVertexInfo.glsl.js";import{PiUtils as o}from"../shading/PiUtils.glsl.js";import{Float2sPassUniform as a}from"../../shaderModules/Float2sPassUniform.js";import{Float4sPassUniform as i}from"../../shaderModules/Float4sPassUniform.js";import{FloatPassUniform as l}from"../../shaderModules/FloatPassUniform.js";import{glsl as n,If as s}from"../../shaderModules/glsl.js";import{IntegerPassUniform as f}from"../../shaderModules/IntegerPassUniform.js";import{IntegersPassUniform as p}from"../../shaderModules/IntegersPassUniform.js";import{pathProfileUniformLayout as c}from"../../../lib/PathProfile.js";function d(e,d){const{vertex:m}=e;e.include(r,d);const u=1===d.upVectorAlignment;m.uniforms.add(new l("angleCutoff",e=>e.cutoffAngle)),m.code.add(n`float reciprocalClamped(float value) {
3
3
  float signValue = value < 0.0 ? -1.0 : 1.0;
4
4
  return signValue / max(abs(value), 1e-6);
5
- }`),u?m.code.add(l`vec2 applyMiterStretch(vec2 vertex, float rotationAngle, vec2 rotationRight) {
5
+ }`),u?m.code.add(n`vec2 applyMiterStretch(vec2 vertex, float rotationAngle, vec2 rotationRight) {
6
6
  if (rotationAngle == 0.0) {
7
7
  return vertex;
8
8
  }
@@ -14,13 +14,13 @@ mat2 miterStretch = mat2(
14
14
  1. + (k - 1.) * rotationRight.y * rotationRight.y
15
15
  );
16
16
  return miterStretch * vertex;
17
- }`):m.code.add(l`vec2 applyMiterStretch(vec2 vertex, float rotationAngle) {
17
+ }`):m.code.add(n`vec2 applyMiterStretch(vec2 vertex, float rotationAngle) {
18
18
  if (rotationAngle == 0.0) {
19
19
  return vertex;
20
20
  }
21
21
  float k = reciprocalClamped(cos(0.5 * rotationAngle));
22
22
  return vec2(k, 1.) * vertex;
23
- }`);const{vertexCount:v,indexCount:h,poleCount:g}=d[x.pathProfileType];switch(m.uniforms.add(new a("pathProfileVertices",v,e=>e.profile.vertices.flat()),new a("pathProfileNormals",v,e=>e.profile.normals.flat())),m.code.add(l`mat3 mat3FromRotation(float angle, vec3 axis) {
23
+ }`);const{vertexCount:v,indexCount:h,poleCount:g}=c[d.pathProfileType];switch(m.uniforms.add(new a("pathProfileVertices",v,e=>e.profile.vertices.flat()),new a("pathProfileNormals",v,e=>e.profile.normals.flat())),m.code.add(n`mat3 mat3FromRotation(float angle, vec3 axis) {
24
24
  float x = axis.x;
25
25
  float y = axis.y;
26
26
  float z = axis.z;
@@ -32,7 +32,7 @@ x * x * t + c, y * x * t + z * s, z * x * t - y * s,
32
32
  x * y * t - z * s, y * y * t + c, z * y * t + x * s,
33
33
  x * z * t + y * s, y * z * t - x * s, z * z * t + c
34
34
  );
35
- }`),m.code.add(l`struct ExtrusionFrame {
35
+ }`),m.code.add(n`struct ExtrusionFrame {
36
36
  vec3 up;
37
37
  vec3 right;
38
38
  };
@@ -45,20 +45,20 @@ float maxDistance;
45
45
  float capPositionOffset;
46
46
  float capNormalOffset;
47
47
  bool isCap;
48
- };`),u?m.code.add(l`vec2 getPathRotationRight(ExtrusionFrame frame) {
48
+ };`),u?m.code.add(n`vec2 getPathRotationRight(ExtrusionFrame frame) {
49
49
  vec3 rotationUp = getFrameRotationUp();
50
50
  float a = dot(rotationUp, frame.up);
51
51
  float b = dot(rotationUp, frame.right);
52
52
  vec3 vertex = normalize(frame.up * -b + frame.right * a);
53
53
  return vec2(dot(vertex, frame.right), dot(vertex, frame.up));
54
- }`):m.code.add(l`vec2 getPathRotationRight() {
54
+ }`):m.code.add(n`vec2 getPathRotationRight() {
55
55
  return vec2(1., 0.);
56
- }`),m.constants.add("pathVertexTypeJoin","uint",0),m.uniforms.add(new s("numJoinSubdivisions",e=>e.numJoinSubdivisions)),m.code.add(l`
57
- ExtrudedVertex evaluateJoinVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
58
- vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
59
- vec2 profileNormal = pathProfileNormals[vertexInfo.sourceIndex];
56
+ }`),m.uniforms.add(new f("numJoinSubdivisions",e=>e.numJoinSubdivisions)),m.code.add(n`
57
+ ExtrudedVertex evaluateJoinVertex(PathVertexDescriptor vertexDescriptor, ExtrusionFrame frame) {
58
+ vec2 profileVertex = pathProfileVertices[vertexDescriptor.sourceIndex];
59
+ vec2 profileNormal = pathProfileNormals[vertexDescriptor.sourceIndex];
60
60
  float profileRotation = getProfileRotation();
61
- vec2 rotationRight = getPathRotationRight(${f(u,l`frame`)});
61
+ vec2 rotationRight = getPathRotationRight(${s(u,n`frame`)});
62
62
  bool isBevel = abs(profileRotation) >= angleCutoff;
63
63
 
64
64
  // determine if the current profile vertex is on the inside or outside of the rotationAxis
@@ -69,20 +69,20 @@ return vec2(1., 0.);
69
69
  bool isBevelBend = isBevel && isBend;
70
70
 
71
71
  if (isBevelBend) {
72
- float k = vertexInfo.subdivision;
72
+ float k = vertexDescriptor.subdivision;
73
73
  // rotate half rotation angle backwards to where the rotation starts
74
74
  // and then rotate a couple of times depending on the current subdivision segment
75
75
  float bendRotation = -profileRotation * 0.5 + (k * profileRotation) / float(numJoinSubdivisions);
76
76
  if (bendRotation != 0.) {
77
77
  vec3 rotationUp = getFrameRotationUp();
78
78
  mat3 transform = mat3FromRotation(bendRotation, rotationUp);
79
- ${f(u,l`frame.up = normalize(transform * frame.up);`)}
79
+ ${s(u,n`frame.up = normalize(transform * frame.up);`)}
80
80
  frame.right = normalize(transform * frame.right);
81
81
  }
82
82
  } else {
83
83
  profileVertex = applyMiterStretch(
84
84
  profileVertex,
85
- profileRotation${f(u,l`,
85
+ profileRotation${s(u,n`,
86
86
  rotationRight`)}
87
87
  );
88
88
  }
@@ -103,12 +103,12 @@ return vec2(1., 0.);
103
103
  false
104
104
  );
105
105
  }
106
- `),m.constants.add("pathVertexTypeCapConnectingProfile","uint",1),m.code.add(l`
107
- ExtrudedVertex evaluateConnectingVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
108
- vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
109
- vec2 profileNormal = pathProfileNormals[vertexInfo.sourceIndex];
106
+ `),m.code.add(n`
107
+ ExtrudedVertex evaluateConnectingVertex(PathVertexDescriptor vertexDescriptor, ExtrusionFrame frame) {
108
+ vec2 profileVertex = pathProfileVertices[vertexDescriptor.sourceIndex];
109
+ vec2 profileNormal = pathProfileNormals[vertexDescriptor.sourceIndex];
110
110
 
111
- float profilePlaneVertexOffset = ${f(2===x.pathCapType,l`vertexInfo.isEnd ? 0.5 : -0.5`,l`0.`)};
111
+ float profilePlaneVertexOffset = ${s(2===d.pathCapType,n`vertexDescriptor.isEnd ? 0.5 : -0.5`,n`0.`)};
112
112
 
113
113
  return ExtrudedVertex(
114
114
  frame,
@@ -121,12 +121,12 @@ return vec2(1., 0.);
121
121
  true
122
122
  );
123
123
  }
124
- `),x.pathCapType){case 1:case 2:m.constants.add("pathVertexTypeFlatCapProfile","uint",2),m.code.add(l`
125
- ExtrudedVertex evaluateFlatCapVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
126
- vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
127
- bool isEnd = vertexInfo.isEnd;
124
+ `),d.pathCapType){case 1:case 2:m.code.add(n`
125
+ ExtrudedVertex evaluateFlatCapVertex(PathVertexDescriptor vertexDescriptor, ExtrusionFrame frame) {
126
+ vec2 profileVertex = pathProfileVertices[vertexDescriptor.sourceIndex];
127
+ bool isEnd = vertexDescriptor.isEnd;
128
128
  float normalOffset = isEnd ? 1. : -1.;
129
- float profilePlaneOffset = ${f(2===x.pathCapType,l`isEnd ? 0.5 : -0.5`,l`0.0`)};
129
+ float profilePlaneOffset = ${s(2===d.pathCapType,n`isEnd ? 0.5 : -0.5`,n`0.0`)};
130
130
  vec2 normal = vec2(0.);
131
131
 
132
132
  return ExtrudedVertex(
@@ -140,11 +140,11 @@ return vec2(1., 0.);
140
140
  true
141
141
  );
142
142
  }
143
- `);break;case 3:m.uniforms.add(new n("pathProfilePoles",g,e=>e.profile.poles.flatMap(({position:e,normal:t})=>[...e,...t??c]),{supportsNaN:!0}),new p("pathProfilePoleIndices",h,e=>e.profile.poleIndices)),m.include(r),m.constants.add("pathVertexTypeRoundCapPole","uint",3),m.constants.add("pathVertexTypeRoundCapInnerProfile","uint",4),m.constants.add("pathNumRoundCapExtrusionSubdivisions","float",t),m.code.add(l`ExtrudedVertex evaluateRoundCapPoleVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
144
- bool isEnd = vertexInfo.isEnd;
143
+ `);break;case 3:m.uniforms.add(new i("pathProfilePoles",g,e=>e.profile.poles.flatMap(({position:e,normal:t})=>[...e,...t??x]),{supportsNaN:!0}),new p("pathProfilePoleIndices",h,e=>e.profile.poleIndices)),m.include(o),m.constants.add("pathNumRoundCapExtrusionSubdivisions","float",t),m.code.add(n`ExtrudedVertex evaluateRoundCapPoleVertex(PathVertexDescriptor vertexDescriptor, ExtrusionFrame frame) {
144
+ bool isEnd = vertexDescriptor.isEnd;
145
145
  float capSign = isEnd ? 1. : -1.;
146
146
  float offsetScale = capSign * 0.5;
147
- vec4 pole = pathProfilePoles[vertexInfo.sourceIndex];
147
+ vec4 pole = pathProfilePoles[vertexDescriptor.sourceIndex];
148
148
  vec2 polePosition = pole.xy;
149
149
  bool hasPoleNormal = !isnan(pole.z);
150
150
  vec2 poleNormal = hasPoleNormal ? pole.zw : vec2(0.);
@@ -160,20 +160,20 @@ normalOffset,
160
160
  true
161
161
  );
162
162
  }
163
- ExtrudedVertex evaluateRoundCapInnerVertex(PathVertexInfo vertexInfo, ExtrusionFrame frame) {
164
- bool isEnd = vertexInfo.isEnd;
163
+ ExtrudedVertex evaluateRoundCapInnerVertex(PathVertexDescriptor vertexDescriptor, ExtrusionFrame frame) {
164
+ bool isEnd = vertexDescriptor.isEnd;
165
165
  float capSign = isEnd ? 1. : -1.;
166
166
  float offsetScale = capSign * 0.5;
167
- float subdivision = vertexInfo.subdivision;
167
+ float subdivision = vertexDescriptor.subdivision;
168
168
  float t = 1. - (subdivision + 1.) / pathNumRoundCapExtrusionSubdivisions;
169
169
  float theta = t * HALF_PI;
170
170
  float t1 = sin(theta);
171
171
  float t2 = cos(theta);
172
- int poleIndex = pathProfilePoleIndices[vertexInfo.sourceIndex];
172
+ int poleIndex = pathProfilePoleIndices[vertexDescriptor.sourceIndex];
173
173
  vec4 pole = pathProfilePoles[poleIndex];
174
174
  vec2 polePosition = pole.xy;
175
175
  bool hasPoleNormal = !isnan(pole.z);
176
- vec2 profileVertex = pathProfileVertices[vertexInfo.sourceIndex];
176
+ vec2 profileVertex = pathProfileVertices[vertexDescriptor.sourceIndex];
177
177
  vec2 poleOffsetScaled = (profileVertex - polePosition) * t1;
178
178
  vec2 poleVertex = poleOffsetScaled + polePosition;
179
179
  vec2 profileNormal = hasPoleNormal
@@ -190,31 +190,31 @@ offsetScale * t2,
190
190
  normalOffset,
191
191
  true
192
192
  );
193
- }`)}m.code.add(l`
193
+ }`)}m.code.add(n`
194
194
  ExtrudedVertex evaluateVertex() {
195
- PathVertexInfo vertexInfo = decodePathVertexInfo();
195
+ PathVertexDescriptor vertexDescriptor = getDescriptor();
196
196
  ExtrusionFrame frame = ExtrusionFrame(
197
197
  getFrameUp(),
198
198
  getFrameRight()
199
199
  );
200
200
 
201
- switch (vertexInfo.type) {
201
+ switch (vertexDescriptor.type) {
202
202
  case pathVertexTypeJoin:
203
- return evaluateJoinVertex(vertexInfo, frame);
203
+ return evaluateJoinVertex(vertexDescriptor, frame);
204
204
 
205
205
  case pathVertexTypeCapConnectingProfile:
206
- return evaluateConnectingVertex(vertexInfo, frame);
206
+ return evaluateConnectingVertex(vertexDescriptor, frame);
207
207
 
208
- ${f(1===x.pathCapType||2===x.pathCapType,l`
209
- case pathVertexTypeFlatCapProfile:
210
- return evaluateFlatCapVertex(vertexInfo, frame);
208
+ ${s(1===d.pathCapType||2===d.pathCapType,n`
209
+ case pathVertexTypeCapProfile:
210
+ return evaluateFlatCapVertex(vertexDescriptor, frame);
211
211
  `)}
212
212
 
213
- ${f(3===x.pathCapType,l`
214
- case pathVertexTypeRoundCapPole:
215
- return evaluateRoundCapPoleVertex(vertexInfo, frame);
213
+ ${s(3===d.pathCapType,n`
214
+ case pathVertexTypeCapProfile:
215
+ return evaluateRoundCapPoleVertex(vertexDescriptor, frame);
216
216
  case pathVertexTypeRoundCapInnerProfile:
217
- return evaluateRoundCapInnerVertex(vertexInfo, frame);
217
+ return evaluateRoundCapInnerVertex(vertexDescriptor, frame);
218
218
  `)}
219
219
 
220
220
  default:
@@ -230,4 +230,4 @@ true
230
230
  );
231
231
  }
232
232
  }
233
- `)}const c=e(NaN,NaN);export{x as PathEvaluate};
233
+ `)}const x=e(NaN,NaN);export{d as PathEvaluate};
@@ -1,19 +1,47 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{glsl as t}from"../../shaderModules/glsl.js";import{pathVertexInfoSourceIndexShift as e,pathVertexInfoSourceIndexMask as n,pathVertexInfoSubdivisionShift as a,pathVertexInfoSubdivisionMask as o,pathVertexInfoTypeShift as i,pathVertexInfoTypeMask as d,pathVertexInfoCapSideShift as s,pathVertexInfoCapSideMask as r}from"../../../lib/PathVertexInfo.js";function p(p){const{attributes:f,vertex:h}=p;f.add("pathVertexInfo","uint"),h.constants.add("pathVertexInfoSourceIndexShift","uint",e),h.constants.add("pathVertexInfoSourceIndexMask","uint",n),h.constants.add("pathVertexInfoSubdivisionShift","uint",a),h.constants.add("pathVertexInfoSubdivisionMask","uint",o),h.constants.add("pathVertexInfoTypeShift","uint",i),h.constants.add("pathVertexInfoTypeMask","uint",d),h.constants.add("pathVertexInfoCapSideShift","uint",s),h.constants.add("pathVertexInfoCapSideMask","uint",r),h.constants.add("pathVertexCapSideEnd","uint",1),h.code.add(t`struct PathVertexInfo {
3
- uint sourceIndex;
4
- float subdivision;
5
- uint type;
6
- bool isEnd;
7
- };
8
- PathVertexInfo decodePathVertexInfo() {
9
- uint sourceIndex = (pathVertexInfo >> pathVertexInfoSourceIndexShift) & pathVertexInfoSourceIndexMask;
10
- uint subdivision = (pathVertexInfo >> pathVertexInfoSubdivisionShift) & pathVertexInfoSubdivisionMask;
11
- uint type = (pathVertexInfo >> pathVertexInfoTypeShift) & pathVertexInfoTypeMask;
12
- uint capSide = (pathVertexInfo >> pathVertexInfoCapSideShift) & pathVertexInfoCapSideMask;
13
- return PathVertexInfo(
14
- sourceIndex,
15
- float(subdivision),
16
- type,
17
- capSide == pathVertexCapSideEnd
18
- );
19
- }`)}export{p as PathVertexInfo};
2
+ import{If as t,glsl as e}from"../../shaderModules/glsl.js";import{sourceIndexMask as a,descriptorDataShift as r,descriptorDataMask as i,descriptorTypeShift as n,descriptorCapSideShift as p,descriptorCapSubdivisionMask as s,descriptorShift as o,frameIndexMask as d}from"../../../lib/PathVertexInfo.js";function c(c,h){const{attributes:x,vertex:u}=c;x.add("pathVertexInfo","uint"),u.constants.add("pathVertexDescriptorSourceIndexMask","uint",a),u.constants.add("pathVertexDescriptorDataShift","uint",r),u.constants.add("pathVertexDescriptorDataMask","uint",i),u.constants.add("pathVertexDescriptorTypeShift","uint",n),u.constants.add("pathVertexDescriptorCapSideShift","uint",p),u.constants.add("pathVertexDescriptorCapSubdivisionMask","uint",s),u.constants.add("pathVertexInfoDescriptorShift","uint",o),u.constants.add("pathVertexInfoFrameIndexMask","uint",d),u.constants.add("pathVertexCapSideEnd","uint",1),u.constants.add("pathVertexTypeJoin","uint",0),u.constants.add("pathVertexTypeCapConnectingProfile","uint",1),u.constants.add("pathVertexTypeCapProfile","uint",2),3===h.pathCapType&&u.constants.add("pathVertexTypeRoundCapInnerProfile","uint",3),u.code.add(e`
3
+ struct PathVertexDescriptor {
4
+ uint sourceIndex;
5
+ float subdivision;
6
+ uint type;
7
+ bool isEnd;
8
+ };
9
+
10
+ uint getFrameIndex() {
11
+ return pathVertexInfo & pathVertexInfoFrameIndexMask;
12
+ }
13
+
14
+ PathVertexDescriptor getDescriptor() {
15
+ uint descriptor = pathVertexInfo >> pathVertexInfoDescriptorShift;
16
+ uint sourceIndex = descriptor & pathVertexDescriptorSourceIndexMask;
17
+ uint descriptorData = (descriptor >> pathVertexDescriptorDataShift) & pathVertexDescriptorDataMask;
18
+ uint type = descriptor >> pathVertexDescriptorTypeShift;
19
+ float subdivision = 0.;
20
+ bool isEnd = false;
21
+
22
+ switch (type) {
23
+ case pathVertexTypeJoin:
24
+ subdivision = float(descriptorData);
25
+ break;
26
+
27
+ ${t(3===h.pathCapType,e`
28
+ case pathVertexTypeRoundCapInnerProfile:
29
+ subdivision = float(descriptorData & pathVertexDescriptorCapSubdivisionMask);
30
+ `)}
31
+ case pathVertexTypeCapConnectingProfile:
32
+ ${t(0!==h.pathCapType,e`
33
+ case pathVertexTypeCapProfile:
34
+ `)}
35
+ isEnd = (descriptorData >> pathVertexDescriptorCapSideShift) == pathVertexCapSideEnd;
36
+ break;
37
+
38
+ }
39
+
40
+ return PathVertexDescriptor(
41
+ sourceIndex,
42
+ subdivision,
43
+ type,
44
+ isEnd
45
+ );
46
+ }
47
+ `)}export{c as PathVertexInfo};