@arcgis/core 5.1.0-next.94 → 5.1.0-next.96

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 (449) hide show
  1. package/Graphic.d.ts +16 -1
  2. package/Graphic.js +1 -1
  3. package/applications/MapViewer/templateUtils.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/0175098da590a7109539.js +1 -0
  6. package/assets/esri/core/workers/chunks/02aaeaa988e9e7d65a7f.js +1 -0
  7. package/assets/esri/core/workers/chunks/03a4543b94f9adeb1852.js +1 -0
  8. package/assets/esri/core/workers/chunks/05c52e8f187740da9b36.js +1 -0
  9. package/assets/esri/core/workers/chunks/0630ce1975c91ae362d9.js +1 -0
  10. package/assets/esri/core/workers/chunks/{7f0f10946f05a09b5654.js → 07ddf1b1f7602063ceb0.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{f04b49d80f422708d98c.js → 0e6b24e8864940ed9877.js} +1 -1
  12. package/assets/esri/core/workers/chunks/0e6feed31340cf3c1966.js +1 -0
  13. package/assets/esri/core/workers/chunks/11a99ee68409a641810e.js +1 -0
  14. package/assets/esri/core/workers/chunks/11b0d3a825fe50dd1e84.js +1 -0
  15. package/assets/esri/core/workers/chunks/16006dc0cb95f7c291a5.js +1 -0
  16. package/assets/esri/core/workers/chunks/177472a6a9beb1590934.js +1 -0
  17. package/assets/esri/core/workers/chunks/19a9a555365a8363d34b.js +1 -0
  18. package/assets/esri/core/workers/chunks/{43f58604ba4a94a9167c.js → 1f3a676e7a4eae5ad566.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{8875e53097b25655ef67.js → 246253fbbb2ecea48f91.js} +1 -1
  20. package/assets/esri/core/workers/chunks/25d795a1697803d77e56.js +1 -0
  21. package/assets/esri/core/workers/chunks/268ed861c882740c805b.js +1 -0
  22. package/assets/esri/core/workers/chunks/26f28406056ddc0e159c.js +1 -0
  23. package/assets/esri/core/workers/chunks/27d6ad4ca5ab8c9d62cd.js +1 -0
  24. package/assets/esri/core/workers/chunks/{da008d6a3afb30d18392.js → 299b4eecd0288348c971.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{df8a3d3cac454d42e14d.js → 29aba121db7f00e0cf81.js} +1 -1
  26. package/assets/esri/core/workers/chunks/2b00229c238aae70b948.js +1 -0
  27. package/assets/esri/core/workers/chunks/2b52c1c01cf568ba01fb.js +1 -0
  28. package/assets/esri/core/workers/chunks/{9b869a8bda9384f25464.js → 308e1b0aea941958de44.js} +1 -1
  29. package/assets/esri/core/workers/chunks/3116a1c2b67a296ba86e.js +1 -0
  30. package/assets/esri/core/workers/chunks/3241e0ed26aff61ec213.js +1 -0
  31. package/assets/esri/core/workers/chunks/330da3828eefd8d72d3f.js +1 -0
  32. package/assets/esri/core/workers/chunks/34c11e7c8762fe0c19fb.js +1 -0
  33. package/assets/esri/core/workers/chunks/34e026549ba2822b8ebd.js +1 -0
  34. package/assets/esri/core/workers/chunks/359465b9726edcc70c83.js +1 -0
  35. package/assets/esri/core/workers/chunks/36ecb0082b8804b10fbf.js +1 -0
  36. package/assets/esri/core/workers/chunks/389e57aab12d52d72695.js +1 -0
  37. package/assets/esri/core/workers/chunks/38b1d2ffcc318ac0119d.js +1 -0
  38. package/assets/esri/core/workers/chunks/390717f079def83a0d9c.js +1 -0
  39. package/assets/esri/core/workers/chunks/{3397eae416622c64e628.js → 3f0483cbcd893acf240c.js} +1 -1
  40. package/assets/esri/core/workers/chunks/4020f95d8131493f799e.js +1 -0
  41. package/assets/esri/core/workers/chunks/{4378e544687fec4b06fb.js → 40afdb74517a7df59e0d.js} +1 -1
  42. package/assets/esri/core/workers/chunks/40bc7c65b708fcc80fab.js +1 -0
  43. package/assets/esri/core/workers/chunks/{c7b9df9a204f6206364a.js → 40e887e87ae24ace27a5.js} +1 -1
  44. package/assets/esri/core/workers/chunks/4255ad7601c7a7621b71.js +1 -0
  45. package/assets/esri/core/workers/chunks/{747e258f57f0543c836e.js → 43cc82373be791b7cb4c.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{1f141a007b1ef9b069c6.js → 4456bbb4b7dfe80c7477.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{fb75d4bce1e86eed017a.js → 44b5e4640fe547285e0c.js} +6 -6
  48. package/assets/esri/core/workers/chunks/453c3b265481c80fc625.js +1 -0
  49. package/assets/esri/core/workers/chunks/47dd2bfecc5c4b5f10f0.js +1 -0
  50. package/assets/esri/core/workers/chunks/4b19acf8bde5b2e80692.js +1 -0
  51. package/assets/esri/core/workers/chunks/4faaf61d20e20fcf6c18.js +1 -0
  52. package/assets/esri/core/workers/chunks/{82215d7a64b8be02eff1.js → 509beae195c900a85e0b.js} +1 -1
  53. package/assets/esri/core/workers/chunks/5217d676749bca59d90f.js +1 -0
  54. package/assets/esri/core/workers/chunks/{53750e85f3128993a43a.js → 545c38789267e3487dbd.js} +1 -1
  55. package/assets/esri/core/workers/chunks/54dad475dc806a38c287.js +1 -0
  56. package/assets/esri/core/workers/chunks/58579c53be1a44bd08d2.js +1 -0
  57. package/assets/esri/core/workers/chunks/58c15c42e6a618386a2f.js +1 -0
  58. package/assets/esri/core/workers/chunks/5ea0096a282e87a269bd.js +1 -0
  59. package/assets/esri/core/workers/chunks/63378b0b4265a547656b.js +1 -0
  60. package/assets/esri/core/workers/chunks/{3a691f848152e3818a48.js → 642be1619c0e76355cb6.js} +1 -1
  61. package/assets/esri/core/workers/chunks/65b0b4e808479187da00.js +1 -0
  62. package/assets/esri/core/workers/chunks/69a1cbf0af059548f96a.js +1 -0
  63. package/assets/esri/core/workers/chunks/6ae2408ac075b974e887.js +1 -0
  64. package/assets/esri/core/workers/chunks/6b79c254897ece95b7a3.js +1 -0
  65. package/assets/esri/core/workers/chunks/6d59a9cf533ebc590f70.js +1 -0
  66. package/assets/esri/core/workers/chunks/6d66dc77af8d112c33c6.js +1 -0
  67. package/assets/esri/core/workers/chunks/{0981fe06796060e50d40.js → 708bd77e6d723e3f0aa8.js} +1 -1
  68. package/assets/esri/core/workers/chunks/71119398ec91f1b209d7.js +1 -0
  69. package/assets/esri/core/workers/chunks/71e12db99589c98a4357.js +1 -0
  70. package/assets/esri/core/workers/chunks/7485d59d60d61737d662.js +1 -0
  71. package/assets/esri/core/workers/chunks/76589434d573111a8fb4.js +1 -0
  72. package/assets/esri/core/workers/chunks/7c2d2f22df057ba8cb50.js +1 -0
  73. package/assets/esri/core/workers/chunks/7d6299ab7b0db23ab961.js +1 -0
  74. package/assets/esri/core/workers/chunks/7dc9ff66e1eceadbae24.js +1 -0
  75. package/assets/esri/core/workers/chunks/82b2acc6f181927de89c.js +1 -0
  76. package/assets/esri/core/workers/chunks/85a200aecc7a844c9566.js +1 -0
  77. package/assets/esri/core/workers/chunks/89250d268dc2554a9ece.js +1 -0
  78. package/assets/esri/core/workers/chunks/8a23a62cbf1c5b4019c5.js +1 -0
  79. package/assets/esri/core/workers/chunks/8ac8ef856ed9592c433b.js +1 -0
  80. package/assets/esri/core/workers/chunks/{01af2a0611386df64cb1.js → 8f992ff87173a3ca1621.js} +28 -24
  81. package/assets/esri/core/workers/chunks/9954928d6430e2bfdb1a.js +1 -0
  82. package/assets/esri/core/workers/chunks/9a29b7f9e6281ee40c37.js +1 -0
  83. package/assets/esri/core/workers/chunks/9bb2251ba58932f85d13.js +1 -0
  84. package/assets/esri/core/workers/chunks/{d8ccc713c5ad93e7a0c3.js → 9bd713d96502ddc2ce25.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{8351012ceb466f01b8fd.js → 9d8e7839772029d83c93.js} +1 -1
  86. package/assets/esri/core/workers/chunks/9f4a9b193485f88d4461.js +1 -0
  87. package/assets/esri/core/workers/chunks/a001e7e8a39f27284d87.js +1 -0
  88. package/assets/esri/core/workers/chunks/a50fd0e66b01fe205033.js +1 -0
  89. package/assets/esri/core/workers/chunks/{51716e411fad624ac21c.js → a567d001fcfa1f1cdeea.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{3a6b8879702fb247328b.js → a68b5cb66c2c5e6b46e0.js} +1 -1
  91. package/assets/esri/core/workers/chunks/a93a058678c8c8996d54.js +1 -0
  92. package/assets/esri/core/workers/chunks/aad02c7417648d881129.js +1 -0
  93. package/assets/esri/core/workers/chunks/acb8cff06142f828fb78.js +1 -0
  94. package/assets/esri/core/workers/chunks/ad329226c8b579d0964c.js +1 -0
  95. package/assets/esri/core/workers/chunks/afdc6fc453157528cf9b.js +1 -0
  96. package/assets/esri/core/workers/chunks/{baea6f86b2dbe067940e.js → b06cc59068d32baaaa87.js} +1 -1
  97. package/assets/esri/core/workers/chunks/b63cbf6c2c9ec1b02b9a.js +1 -0
  98. package/assets/esri/core/workers/chunks/b7f5d51ac26f37837b3b.js +1 -0
  99. package/assets/esri/core/workers/chunks/b891d95b7858665cd6c1.js +1 -0
  100. package/assets/esri/core/workers/chunks/{359d3acb3953e64e5a78.js → ba7fe21a78ea37a02b7c.js} +1 -1
  101. package/assets/esri/core/workers/chunks/bd17ac2e6f1eb8cf7abf.js +1 -0
  102. package/assets/esri/core/workers/chunks/beba9f2213d8a850ddb6.js +1 -0
  103. package/assets/esri/core/workers/chunks/{d6f03f628ebfc28fdd23.js → bf6c6bc15b0d2d82d1a4.js} +2 -2
  104. package/assets/esri/core/workers/chunks/bf706a5d065a357de51b.js +1 -0
  105. package/assets/esri/core/workers/chunks/bfb417d72d0c90e116fe.js +1 -0
  106. package/assets/esri/core/workers/chunks/c0c693c2e0043ecba4a5.js +1 -0
  107. package/assets/esri/core/workers/chunks/c321bcda8e8893577948.js +1 -0
  108. package/assets/esri/core/workers/chunks/c452c74ba9de218c3e57.js +1 -0
  109. package/assets/esri/core/workers/chunks/{700f7aa9cf7b13acaf5d.js → c514135bf7703ba69a47.js} +1 -1
  110. package/assets/esri/core/workers/chunks/c798a40418e7ff38042a.js +1 -0
  111. package/assets/esri/core/workers/chunks/ca6c128940ddbebcaaab.js +1 -0
  112. package/assets/esri/core/workers/chunks/{268f203d2492a03165ac.js → ce2ed9405ff1b704d35c.js} +1 -1
  113. package/assets/esri/core/workers/chunks/ce3e51c799a80648e46d.js +1 -0
  114. package/assets/esri/core/workers/chunks/{e81afc8a058a8ecc9b24.js → ce4e09b623ebb640c46c.js} +1 -1
  115. package/assets/esri/core/workers/chunks/cf7acf5acb6d322fd996.js +1 -0
  116. package/assets/esri/core/workers/chunks/{e0b27bceb397482bd0e8.js → d122431f3b0b88dcb488.js} +1 -1
  117. package/assets/esri/core/workers/chunks/d8c4fb66c733ab2f66d3.js +1 -0
  118. package/assets/esri/core/workers/chunks/d8d338665fe00494c826.js +1 -0
  119. package/assets/esri/core/workers/chunks/d93a4ccf8f0208dc6ad7.js +1 -0
  120. package/assets/esri/core/workers/chunks/de11ebcea2b8f9dfe65d.js +1 -0
  121. package/assets/esri/core/workers/chunks/e133840540abf20262a4.js +1 -0
  122. package/assets/esri/core/workers/chunks/{3092184350d66c79f610.js → e5d969214d9eda5c0b4c.js} +1 -1
  123. package/assets/esri/core/workers/chunks/{fa869bfe4366f7f49cca.js → e5f8c73349407c25956b.js} +1 -1
  124. package/assets/esri/core/workers/chunks/e63e24101e7e92c62d98.js +1 -0
  125. package/assets/esri/core/workers/chunks/e8a885b576da3ec145d3.js +1 -0
  126. package/assets/esri/core/workers/chunks/eda51e512eff551ad858.js +1 -0
  127. package/assets/esri/core/workers/chunks/ee635172be7fdea69367.js +1 -0
  128. package/assets/esri/core/workers/chunks/f196ad0c7dbcbf632776.js +1 -0
  129. package/assets/esri/core/workers/chunks/f27397379c6c88bc6ef4.js +1 -0
  130. package/assets/esri/core/workers/chunks/f31deeedb2508e81293b.js +2 -0
  131. package/assets/esri/core/workers/chunks/f618ee43581e8de6ad0c.js +1 -0
  132. package/assets/esri/core/workers/chunks/f66262f8582909157f01.js +1 -0
  133. package/assets/esri/core/workers/chunks/{ea97619a4470f1540b99.js → f6ebec8d2248c719b89f.js} +1 -1
  134. package/assets/esri/core/workers/chunks/f91a2c69a93295cf4de6.js +1 -0
  135. package/assets/esri/core/workers/chunks/f948e4a80a7dbda70f2e.js +1 -0
  136. package/assets/esri/core/workers/chunks/fa9ab152ea785b5e97e0.js +1 -0
  137. package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +1 -0
  138. package/assets/esri/core/workers/chunks/fae79769df54eb4c4154.js +1 -0
  139. package/assets/esri/core/workers/chunks/{5a8fd2fd8a24f9290b7f.js → fd2afff07aaac8203c18.js} +1 -1
  140. package/assets/esri/core/workers/chunks/fdb7851e98e8d2ba48d3.js +1 -0
  141. package/assets/esri/core/workers/chunks/fec3fffcf854a6226df4.js +1 -0
  142. package/assets/esri/core/workers/chunks/ff7708aaa2de720e3a47.js +1 -0
  143. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  144. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  145. package/chunks/GaussianSplat.glsl.js +9 -9
  146. package/chunks/GlobalIllumination.glsl.js +31 -31
  147. package/chunks/NativeLine.glsl.js +4 -4
  148. package/chunks/OITBlend.glsl.js +3 -7
  149. package/chunks/OITBlendEmission.glsl.js +22 -0
  150. package/chunks/{OITDim.glsl.js → OITDimOpaque.glsl.js} +2 -2
  151. package/chunks/RibbonLine.glsl.js +57 -53
  152. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  153. package/chunks/arcgis-knowledge-client-core.js +1 -1
  154. package/config.js +1 -1
  155. package/core/has.js +1 -1
  156. package/geometry/support/heightModelInfoUtils.js +1 -1
  157. package/kernel.js +1 -1
  158. package/layers/DimensionFeatureLayer.d.ts +7 -0
  159. package/layers/DimensionFeatureLayer.js +2 -0
  160. package/layers/SceneLayer.d.ts +59 -32
  161. package/layers/catalog/CatalogFootprintLayer.js +1 -1
  162. package/layers/graphics/OptimizedFeature.js +1 -1
  163. package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
  164. package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
  165. package/layers/graphics/featureConversionUtils.js +1 -1
  166. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  167. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  168. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  169. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  170. package/layers/mixins/ArcGISImageService.js +1 -1
  171. package/layers/mixins/FeatureReductionLayer.js +1 -1
  172. package/layers/raster/formats/Lerc.js +1 -1
  173. package/layers/raster/formats/RasterCodec.js +1 -1
  174. package/layers/scene/ModelFileInfo.d.ts +6 -2
  175. package/layers/scene/ModelInfo.d.ts +16 -7
  176. package/layers/scene/types.d.ts +2 -0
  177. package/layers/support/ExportImageServiceParameters.js +1 -1
  178. package/layers/support/capabilities.js +1 -1
  179. package/layers/support/layerUtils.js +1 -1
  180. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  181. package/layers/types.d.ts +26 -3
  182. package/networks/support/CircuitPathConnectivityElement.js +1 -1
  183. package/networks/support/networkFieldUtils.js +1 -1
  184. package/package.json +2 -2
  185. package/popup/Features.js +1 -1
  186. package/portal/schemas/definitions.js +1 -1
  187. package/rest/knowledgeGraph/CreateReplicaResponse.d.ts +5 -4
  188. package/rest/knowledgeGraph/ReplicaDefinition.d.ts +0 -3
  189. package/rest/knowledgeGraph/types.d.ts +1 -1
  190. package/rest/knowledgeGraph/wasmInterface/queryToWasmEncodedFactories.js +1 -1
  191. package/rest/knowledgeGraph/wasmInterface/replicaToWasmEncodedFactories.js +1 -1
  192. package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +1 -1
  193. package/rest/query/operations/queryUtils.js +1 -1
  194. package/rest/support/OutDistance.js +1 -1
  195. package/rest/support/Query.d.ts +39 -1
  196. package/rest/support/Query.js +1 -1
  197. package/support/revision.js +1 -1
  198. package/symbols/cim/CIMEffects.js +1 -1
  199. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  200. package/symbols/cim/CIMSymbolHelper.js +1 -1
  201. package/symbols/cim/defaultCIMValues.js +1 -1
  202. package/symbols/cim/effects/EffectAddControlPoints.js +1 -1
  203. package/symbols/cim/effects/EffectArrow.js +1 -1
  204. package/symbols/cim/effects/EffectBuffer.js +1 -1
  205. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  206. package/symbols/cim/effects/EffectCut.js +1 -1
  207. package/symbols/cim/effects/EffectDashes.js +1 -1
  208. package/symbols/cim/effects/EffectDonut.js +1 -1
  209. package/symbols/cim/effects/EffectEnclosingPolygon.js +1 -1
  210. package/symbols/cim/effects/EffectHelper.js +1 -1
  211. package/symbols/cim/effects/EffectJog.js +1 -1
  212. package/symbols/cim/effects/EffectMove.js +1 -1
  213. package/symbols/cim/effects/EffectOffset.js +1 -1
  214. package/symbols/cim/effects/EffectRadial.js +1 -1
  215. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  216. package/symbols/cim/effects/EffectWave.js +1 -1
  217. package/symbols/cim/placements/PlacementAtRatioPositions.js +1 -1
  218. package/symbols/cim/types.d.ts +7 -1
  219. package/symbols/cim/utils.js +1 -1
  220. package/symbols/dimensions/effects/LinearDimensionArrowEffect.js +1 -1
  221. package/symbols/dimensions/effects/LinearDimensionExtensionLineEffect.js +1 -1
  222. package/symbols/dimensions/effects/LinearDimensionLeaderLineEffect.js +1 -1
  223. package/symbols/dimensions/effects/LinearDimensionLineEffect.js +1 -1
  224. package/symbols/dimensions/effects/LinearDimensionPointEffect.js +1 -1
  225. package/symbols/dimensions/effects/LinearDimensionTextEffect.js +1 -1
  226. package/symbols/types.d.ts +1 -1
  227. package/tables/AttributeTableTemplate.d.ts +1 -1
  228. package/tables/elements/AttributeTableGroupElement.d.ts +1 -1
  229. package/tables/support/tablesUtils.d.ts +2 -2
  230. package/tables/support/templateUtils.d.ts +136 -0
  231. package/tables/support/templateUtils.js +2 -0
  232. package/tables/support/types.d.ts +90 -0
  233. package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
  234. package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
  235. package/views/2d/engine/webgl/alignmentUtils.js +1 -1
  236. package/views/2d/engine/webgl/definitions.js +1 -1
  237. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  238. package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
  239. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  240. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
  241. package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +1 -1
  242. package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
  243. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
  244. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js +1 -1
  245. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
  246. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
  247. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js +1 -1
  248. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
  249. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js +1 -1
  250. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  251. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
  252. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
  253. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js +1 -1
  254. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  255. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  256. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js +1 -1
  257. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
  258. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  259. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  260. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  261. package/views/2d/layerViewModuleImportUtils.js +1 -1
  262. package/views/2d/layers/BaseLayerView2D.d.ts +2 -2
  263. package/views/2d/layers/BaseLayerViewGL2D.d.ts +2 -2
  264. package/views/2d/layers/DimensionLayerView2D.js +2 -0
  265. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  266. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  267. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +2 -0
  268. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  269. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  270. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  271. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  272. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  273. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  274. package/views/2d/layers/features/schema/SourceSchema.js +1 -1
  275. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  276. package/views/2d/layers/features/sources/strategies/AFeatureTileLoadStrategy.js +1 -1
  277. package/views/2d/layers/features/sources/strategies/FeatureHybridTileLoadStrategy.js +2 -0
  278. package/views/2d/layers/features/sources/strategies/chunks/ByReferenceTileSourceChunk.js +2 -0
  279. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  280. package/views/2d/layers/features/support/DisplayIdGenerator.js +1 -1
  281. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  282. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  283. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  284. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  285. package/views/2d/layers/features/support/RefCounted.js +2 -0
  286. package/views/2d/types.d.ts +2 -0
  287. package/views/3d/layerViewModuleImportUtils.js +1 -1
  288. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  289. package/views/3d/support/QualityProfile.js +1 -1
  290. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  291. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  292. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  293. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  294. package/views/3d/types.d.ts +2 -0
  295. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +6 -19
  296. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +1 -1
  297. package/views/3d/webgl-engine/core/shaderLibrary/util/{ComputeCovariance.glsl.js → GaussianSplatCovariance.glsl.js} +15 -9
  298. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +43 -0
  299. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +36 -0
  300. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  301. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
  302. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  303. package/views/3d/webgl-engine/effects/transparency/OITBlendEmission.glsl.js +2 -0
  304. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechnique.js +2 -0
  305. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechniqueConfiguration.js +2 -0
  306. package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
  307. package/views/3d/webgl-engine/effects/transparency/{OITDim.glsl.js → OITDimOpaque.glsl.js} +1 -1
  308. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +2 -0
  309. package/views/3d/webgl-engine/effects/transparency/{OITDimTechniqueConfiguration.js → OITDimOpaqueTechniqueConfiguration.js} +1 -1
  310. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  311. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  312. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  313. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
  314. package/views/PopupView.js +1 -1
  315. package/views/layers/FeatureLikeLayerView.d.ts +2 -1
  316. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +40 -1
  317. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  318. package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
  319. package/widgets/BatchAttributeForm/expressions/types.d.ts +1 -0
  320. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +52 -1
  321. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  322. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
  323. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  324. package/widgets/BatchAttributeForm/inputs/EditableInput.d.ts +2 -0
  325. package/widgets/BatchAttributeForm/inputs/EditableInput.js +1 -1
  326. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  327. package/widgets/BatchAttributeForm/types.d.ts +79 -0
  328. package/widgets/Editor/Edits.js +1 -1
  329. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  330. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +12 -12
  331. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  332. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  333. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  334. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  335. package/widgets/FeatureTable.d.ts +18 -3
  336. package/widgets/FeatureTable.js +1 -1
  337. package/widgets/Features/FeaturesViewModel.js +1 -1
  338. package/assets/esri/core/workers/chunks/015fc0a17b17d69cc3bb.js +0 -1
  339. package/assets/esri/core/workers/chunks/02e8fc598ee09cf1b678.js +0 -1
  340. package/assets/esri/core/workers/chunks/075a1e91a075efe59cd3.js +0 -1
  341. package/assets/esri/core/workers/chunks/0ab1384282afc8731857.js +0 -1
  342. package/assets/esri/core/workers/chunks/146424b5717d0a645ee1.js +0 -1
  343. package/assets/esri/core/workers/chunks/15a070d4ac2087b79e8b.js +0 -1
  344. package/assets/esri/core/workers/chunks/169ca3724053fc046d1b.js +0 -1
  345. package/assets/esri/core/workers/chunks/17445fd8048966617d49.js +0 -1
  346. package/assets/esri/core/workers/chunks/1765dfeac20e34ce25b7.js +0 -1
  347. package/assets/esri/core/workers/chunks/1768f1a7e3caa6074d91.js +0 -1
  348. package/assets/esri/core/workers/chunks/1906416c84bab369bbd6.js +0 -1
  349. package/assets/esri/core/workers/chunks/198864c107fa2b24518c.js +0 -1
  350. package/assets/esri/core/workers/chunks/1a35121a0c2595a41fdb.js +0 -1
  351. package/assets/esri/core/workers/chunks/1f85646936200a399c15.js +0 -1
  352. package/assets/esri/core/workers/chunks/1ff3c15a51c4dc991806.js +0 -1
  353. package/assets/esri/core/workers/chunks/206bdfd868a9ef88f3a8.js +0 -1
  354. package/assets/esri/core/workers/chunks/2343b1105bc4c1b4a086.js +0 -1
  355. package/assets/esri/core/workers/chunks/2387613b855771a3e537.js +0 -1
  356. package/assets/esri/core/workers/chunks/2b0b398180ed98c2c84c.js +0 -1
  357. package/assets/esri/core/workers/chunks/3469df5c4846b0cee012.js +0 -1
  358. package/assets/esri/core/workers/chunks/34b6b5dd415c68f0b0d1.js +0 -1
  359. package/assets/esri/core/workers/chunks/36f6673b23579b88d8f7.js +0 -1
  360. package/assets/esri/core/workers/chunks/384c235d36f32769e32b.js +0 -1
  361. package/assets/esri/core/workers/chunks/38c28189f273636e4017.js +0 -1
  362. package/assets/esri/core/workers/chunks/3a183259805638c25363.js +0 -1
  363. package/assets/esri/core/workers/chunks/3efbb684c0409955186d.js +0 -1
  364. package/assets/esri/core/workers/chunks/3feec3d08424b94e1bcf.js +0 -1
  365. package/assets/esri/core/workers/chunks/460e693ad19fa77ffdc2.js +0 -1
  366. package/assets/esri/core/workers/chunks/47b3a5213539548ff3a6.js +0 -1
  367. package/assets/esri/core/workers/chunks/48549d3d7bf0154c0afa.js +0 -1
  368. package/assets/esri/core/workers/chunks/52b3a11c962810bc6dbe.js +0 -1
  369. package/assets/esri/core/workers/chunks/54c6e870262469d0d702.js +0 -1
  370. package/assets/esri/core/workers/chunks/55fd201ca5e10c6e4761.js +0 -1
  371. package/assets/esri/core/workers/chunks/561d45dc9421f80feca5.js +0 -1
  372. package/assets/esri/core/workers/chunks/566f6319ded0634769e0.js +0 -1
  373. package/assets/esri/core/workers/chunks/56717ff315c6ec874142.js +0 -1
  374. package/assets/esri/core/workers/chunks/56941e8bbd2d49bf2656.js +0 -1
  375. package/assets/esri/core/workers/chunks/5fccb372b4d5ee2f64cc.js +0 -1
  376. package/assets/esri/core/workers/chunks/60cee9a44929decd2474.js +0 -1
  377. package/assets/esri/core/workers/chunks/6124141ac642e4ce1454.js +0 -1
  378. package/assets/esri/core/workers/chunks/61fada8942b65fa0b5e1.js +0 -1
  379. package/assets/esri/core/workers/chunks/64cf18ba2869171a5a7a.js +0 -1
  380. package/assets/esri/core/workers/chunks/65c61171e6c6be5c5c2f.js +0 -1
  381. package/assets/esri/core/workers/chunks/6a3d207308b29651f397.js +0 -1
  382. package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +0 -1
  383. package/assets/esri/core/workers/chunks/71cfab6305f275cfb04e.js +0 -1
  384. package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +0 -1
  385. package/assets/esri/core/workers/chunks/7531bbcb6613c87a344e.js +0 -1
  386. package/assets/esri/core/workers/chunks/7b505112c7e6d9b7a239.js +0 -1
  387. package/assets/esri/core/workers/chunks/7b6c8be59ed87e386aa4.js +0 -1
  388. package/assets/esri/core/workers/chunks/7c820c5f6f05480d5050.js +0 -1
  389. package/assets/esri/core/workers/chunks/7ef51b0ebd560113ae7e.js +0 -1
  390. package/assets/esri/core/workers/chunks/80f4f686ce403cb2693f.js +0 -1
  391. package/assets/esri/core/workers/chunks/81d761c837b7456ec99f.js +0 -1
  392. package/assets/esri/core/workers/chunks/83f1871d04c979fa23b7.js +0 -1
  393. package/assets/esri/core/workers/chunks/85da2987e17b6755a94e.js +0 -1
  394. package/assets/esri/core/workers/chunks/87f7a674957f734b1b42.js +0 -1
  395. package/assets/esri/core/workers/chunks/8a3bff0f58483c1665f9.js +0 -1
  396. package/assets/esri/core/workers/chunks/8a5a827ee557d9f9a66e.js +0 -1
  397. package/assets/esri/core/workers/chunks/8b046e28f879079caada.js +0 -1
  398. package/assets/esri/core/workers/chunks/8d738e9acc2f222235ea.js +0 -1
  399. package/assets/esri/core/workers/chunks/8e1140725a72038627c2.js +0 -1
  400. package/assets/esri/core/workers/chunks/915e2711d3a2cfa402b2.js +0 -1
  401. package/assets/esri/core/workers/chunks/928dac64e6ba401d391a.js +0 -1
  402. package/assets/esri/core/workers/chunks/992525afdf11b2fb16d4.js +0 -1
  403. package/assets/esri/core/workers/chunks/9a5ef33d99a8f89956ff.js +0 -1
  404. package/assets/esri/core/workers/chunks/9c402657f63a4d5668d0.js +0 -1
  405. package/assets/esri/core/workers/chunks/9f51a69b8f1937a8794a.js +0 -1
  406. package/assets/esri/core/workers/chunks/a015c2f54eb91e43a1f4.js +0 -1
  407. package/assets/esri/core/workers/chunks/a232d05c0a055f398c6e.js +0 -1
  408. package/assets/esri/core/workers/chunks/a242ec19a7508de436da.js +0 -1
  409. package/assets/esri/core/workers/chunks/a25acccda8febac71a3d.js +0 -1
  410. package/assets/esri/core/workers/chunks/a432219de6a873f88776.js +0 -1
  411. package/assets/esri/core/workers/chunks/a76e14fe5e8b2f7ef9de.js +0 -2
  412. package/assets/esri/core/workers/chunks/a7f9f478bd1493fc3c76.js +0 -1
  413. package/assets/esri/core/workers/chunks/aac6a57edd7494125204.js +0 -1
  414. package/assets/esri/core/workers/chunks/af074b5b4e1d6baf5219.js +0 -1
  415. package/assets/esri/core/workers/chunks/afc0baf86ece710ef867.js +0 -1
  416. package/assets/esri/core/workers/chunks/b2662bfdbd1e3623ceb9.js +0 -1
  417. package/assets/esri/core/workers/chunks/b73c146d3e550eaf07eb.js +0 -1
  418. package/assets/esri/core/workers/chunks/b7af0e6b9aadbcaf6a0b.js +0 -1
  419. package/assets/esri/core/workers/chunks/bc78937986854e500b8e.js +0 -1
  420. package/assets/esri/core/workers/chunks/bd10d21545bca9a49de0.js +0 -1
  421. package/assets/esri/core/workers/chunks/bea170f08f5261e22d29.js +0 -1
  422. package/assets/esri/core/workers/chunks/bec3ee5ea945e1e07a35.js +0 -1
  423. package/assets/esri/core/workers/chunks/bf4dd8e50704e4040966.js +0 -1
  424. package/assets/esri/core/workers/chunks/c31ee5617c61a933cb0e.js +0 -1
  425. package/assets/esri/core/workers/chunks/c3e89c7c7b677bd18557.js +0 -1
  426. package/assets/esri/core/workers/chunks/cb81d524f12edcadb9bb.js +0 -1
  427. package/assets/esri/core/workers/chunks/cc0f3b9b153a0c232afe.js +0 -1
  428. package/assets/esri/core/workers/chunks/cd0c232f4e3868d91a05.js +0 -1
  429. package/assets/esri/core/workers/chunks/ce7ef7c4ca14d66d96f6.js +0 -1
  430. package/assets/esri/core/workers/chunks/d55cef8199b8246fea3f.js +0 -1
  431. package/assets/esri/core/workers/chunks/d8decaee2c780e1b5e35.js +0 -1
  432. package/assets/esri/core/workers/chunks/dc54d4a9fe1691862356.js +0 -1
  433. package/assets/esri/core/workers/chunks/de99500b0fcedf2c8a5c.js +0 -1
  434. package/assets/esri/core/workers/chunks/e18badd11f360cc2912b.js +0 -1
  435. package/assets/esri/core/workers/chunks/e6f1ed5e56f1d9862821.js +0 -1
  436. package/assets/esri/core/workers/chunks/e6fe8b5fbe95de01453b.js +0 -1
  437. package/assets/esri/core/workers/chunks/eaab5ac049622986e3bc.js +0 -1
  438. package/assets/esri/core/workers/chunks/ee7e9bca57160694b3c4.js +0 -1
  439. package/assets/esri/core/workers/chunks/ef0085aa743b33cb549f.js +0 -1
  440. package/assets/esri/core/workers/chunks/f0250cecb243b32cdba7.js +0 -1
  441. package/assets/esri/core/workers/chunks/f2beb4267b8d4cddfa3e.js +0 -1
  442. package/assets/esri/core/workers/chunks/f468c6ea2818a1f97e19.js +0 -1
  443. package/assets/esri/core/workers/chunks/f6c8e93ca2987e83f925.js +0 -1
  444. package/assets/esri/core/workers/chunks/fa4265db06e2721754a0.js +0 -1
  445. package/tables/types.d.ts +0 -18
  446. package/views/3d/webgl-engine/effects/transparency/OITDimTechnique.js +0 -2
  447. package/widgets/FeatureTable/support/templateUtils.js +0 -2
  448. /package/assets/esri/core/workers/chunks/{d6f03f628ebfc28fdd23.js.LICENSE.txt → bf6c6bc15b0d2d82d1a4.js.LICENSE.txt} +0 -0
  449. /package/assets/esri/core/workers/chunks/{a76e14fe5e8b2f7ef9de.js.LICENSE.txt → f31deeedb2508e81293b.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../../core/Error.js";import"../../../../../core/has.js";import{assertIsSome as t}from"../../../../../core/maybe.js";import{baseObjectMemory as r}from"../../../../../core/memoryEstimations.js";import s from"../../../../../core/pbf.js";import a from"../../../../../layers/graphics/OptimizedGeometry.js";import{FeatureSetCache as n}from"./FeatureSetCache.js";import{FeatureSetReader as i}from"./FeatureSetReader.js";import{parseHeader as h}from"./FeatureSetReaderPBFHeader.js";const o=268435455,d=128,u=128e3,c={small:{delta:new Int32Array(d),decoded:new Int32Array(d)},small64:{delta:new Float64Array(0),decoded:new Float64Array(0)},large:{delta:new Int32Array(u),decoded:new Int32Array(u)},large64:{delta:new Float64Array(0),decoded:new Float64Array(0)}};function l(e,t){return t?e<=c.small64.delta.length?c.small64:(e<=c.large64.delta.length||(c.large64.delta=new Float64Array(Math.round(1.25*e)),c.large64.decoded=new Float64Array(Math.round(1.25*e))),c.large64):e<=c.small.delta.length?c.small:(e<=c.large.delta.length||(c.large.delta=new Int32Array(Math.round(1.25*e)),c.large.decoded=new Int32Array(Math.round(1.25*e))),c.large)}function _(t){try{const e=new s(new Uint8Array(t),new DataView(t));for(;e.next();){if(2===e.tag())return f(e.getMessage());e.skip()}}catch(r){throw new e("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:r})}return null}function f(e){for(;e.next();){if(1===e.tag())return e.getMessage();e.skip()}return null}function g(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}function y(e,t,r,s,a){if(!e)return!1;return 0===t*a-s*r&&t*s+r*a>0}class m extends i{static fromBuffer(e,t,r=!1){const s=t.geometryType,a=_(e),n=h(a,"esriGeometryPoint"===s,t.featureIdInfo);return new m(a,n,t,r)}constructor(e,t,r,s){super(r),this._use64Bit=s,this._hasNext=!1,this._isPoints=!1,this._featureIndex=-1,this._featureOffset=0,this._cache={area:0,unquantGeometry:void 0,geometry:void 0},this._parseCaches=new Array,this._geometryType=r.geometryType,this._reader=e,this._header=t,this._hasNext=t.hasFeatures,this._isPoints="esriGeometryPoint"===r.geometryType}get _size(){return this._header.featureCount}get fields(){return this._header.fields}get geometryType(){return this._geometryType}get hasZ(){return this._header.hasZ}get hasM(){return this._header.hasM}get hasFeatures(){return this._header.hasFeatures}get hasNext(){return this._hasNext}get exceededTransferLimit(){return this._header.exceededTransferLimit}getSize(){return this._size}getInTransform(){return this._header.transform}getCursor(){return this.copy()}getIndex(){return this._featureIndex}setIndex(e){this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0,this._featureIndex=e}getAttributeHash(){let e="";for(const t of this._header.fields.fields)e+=this._readAttributeAtIndex(t.index)+".";return e}getObjectId(){if(1===this._header.idFieldIndices.length)return this._readAttributeAtIndex(this._header.idFieldIndices[0]);const e=this._header.idFieldIndices.map(e=>this._readAttributeAtIndex(e));return JSON.stringify(e)}getDisplayId(){return this._header.displayIds[this._featureIndex]}setDisplayId(e){this._header.displayIds[this._featureIndex]=e}readGeometryArea(){return this._cache.area||this._readGeometry(!0),this._cache.area}copy(){const e=this._reader.clone(),t=new m(e,this._header,this.metadata,this._use64Bit);return this.copyInto(t),t}next(){for(this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0;++this._featureIndex<this._size&&!this._getExists(););return this._featureIndex<this._size}get usedMemory(){return r+(this._cache.geometry?.usedMemory??0)}get underlyingMemory(){return super.underlyingMemory+this._reader.usedMemory+this._header.usedMemory}_readX(){return this._header.centroid[this._featureIndex*this._header.stride]}_readY(){return this._header.centroid[this._featureIndex*this._header.stride+1]}_readServerCentroid(){const e=new a([],[],this.hasZ,this.hasM),{coords:t,stride:r}=e;for(let s=this._featureIndex*r,a=s+r;s<a;++s)t.push(this._header.centroid[s]);return t[0]===o?null:e}_readGeometry(e=!1){if((this.hasZ||this.hasM)&&(e=!1),void 0===this._cache.geometry){let r=null;if(this._isPoints)r=this._readServerCentroid();else{const s=this._header.offsets.geometry[this._featureIndex],a=this._reader;if(0===s)return null;a.move(s);try{r=e?this._parseGeometryForDisplay(a):this._parseGeometry(a)}catch(t){return null}}return 0===r?.coords.length&&(r=null),this._cache.geometry=r,r}return this._cache.geometry}_readAttribute(e,t){const r=this._header.fields.get(e);if(null==r)return;const s=this._readAttributeAtIndex(r.index),a=this._header.fields.isDateField(r.name);return t?null==s?s:a?new Date(s):s:s}_readAttributes(){const e={};for(const t of this._header.fields.fields)e[t.name]=this._readAttributeAtIndex(t.index);return e}copyInto(e){super.copyInto(e),e._featureIndex=this._featureIndex,e._featureOffset=this._featureOffset,e._hasNext=this._hasNext,e._parseCaches=this._parseCaches}_readAttributeAtIndex(e){let t=this._parseCaches[e];if(t||(t=new n(this.getSize()),this._parseCaches[e]=t),t.has(this._featureIndex))return t.get(this._featureIndex);const r=this._header.offsets.attributes[this._featureIndex*this._header.fieldCount+e],s=this._reader;s.move(r);const a=g(s);return t.set(this._featureIndex,a),a}_readGeometryDeltaDecoded(e){if(void 0===this._cache.unquantGeometry){const t=this._readGeometry(e);if(!t)return this._cache.unquantGeometry=void 0,null;const r=this.getInTransform();if(!r)return this._cache.unquantGeometry=t,t;const s=r.scale[2]??1,a=r.translate[2]??1,n=r.scale[3]??1,i=r.translate[3]??1,h=l(t.coords.length,this._use64Bit).decoded,o=t.clone(h);this._cache.unquantGeometry=o;const{lengths:d,coords:u,hasZ:c,hasM:_}=o,f=c&&(1!==s||0!==a),g=_&&(1!==n||0!==i);let y=0;for(const e of d){let t=u[y++],r=u[y++];if(f){const e=u[y];u[y++]=s*e+a}if(g){const e=u[y];u[y++]=n*e+i}for(let h=1;h<e;++h){if(t=u[y++]+=t,r=u[y++]+=r,f){const e=u[y];u[y++]=s*e+a}if(g){const e=u[y];u[y++]=n*e+i}}}return o}return this._cache.unquantGeometry}_parseGeometry(e){const t=e.asUnsafe(),r=t.getPackedEnd(),s=[],n=[];for(;t.pos()<r&&t.next();)switch(t.tag()){case 2:{const e=t.getPackedEnd();for(;t.pos()<e;)n.push(t.getUInt32());break}case 3:{const e=t.getPackedEnd();for(;t.pos()<e;)s.push(t.getSInt64());break}default:t.skip()}return new a(n,s,this.hasZ,this.hasM)}_parseGeometryForDisplay(e){const r=e.asUnsafe(),s=r.getLength(),n=r.pos()+s,i=[],h=[];let o=0,d=0,u=null,c=0;const _="esriGeometryPolygon"===this.geometryType,f="esriGeometryPolyline"===this.geometryType,g=_?3:f?2:1,m=_||f;for(;r.pos()<n&&r.next();)switch(r.tag()){case 2:{const e=r.getUInt32(),t=r.pos()+e;for(;r.pos()<t;){const e=r.getUInt32();i.push(e),o+=e}u=l(2*o,this._use64Bit).delta;break}case 3:{r.getUInt32();const e=2+(this.hasZ?1:0)+(this.hasM?1:0);t(u);for(const t of i){if(d+e*t>u.length){for(let e=0;e<t;e++)r.getSInt64(),r.getSInt64(),this.hasZ&&r.getSInt64(),this.hasM&&r.getSInt64();continue}let s=r.getSInt64(),a=r.getSInt64();this.hasZ&&r.getSInt64(),this.hasM&&r.getSInt64(),u[d++]=s,u[d++]=a;let n=1;for(let e=1;e<t;e++){const e=r.getSInt64(),t=r.getSInt64();this.hasZ&&r.getSInt64(),this.hasM&&r.getSInt64();const i=s+e,h=a+t;c+=-.5*(i-s)*(h+a),s=i,a=h,0===e&&0===t||y(m,u[d-2],u[d-1],e,t)?(u[d-2]+=e,u[d-1]+=t):(u[d++]=e,u[d++]=t,n+=1)}n>=g?h.push(n):d-=n*e}break}default:r.skip()}return this._cache.area=c,h.length?new a(h,u):null!=u?this._createDeltaQuantizedExtrudedGeometry(u[0],u[1]):null}}export{m as FeatureSetReaderPBF};
2
+ import e from"../../../../../core/Error.js";import"../../../../../core/has.js";import{assertIsSome as t}from"../../../../../core/maybe.js";import{baseObjectMemory as r}from"../../../../../core/memoryEstimations.js";import s from"../../../../../core/pbf.js";import a from"../../../../../layers/graphics/OptimizedGeometry.js";import{FeatureSetCache as n}from"./FeatureSetCache.js";import{FeatureSetReader as i}from"./FeatureSetReader.js";import{parseHeader as h}from"./FeatureSetReaderPBFHeader.js";const o=268435455,d=128,u=128e3,c={small:{delta:new Int32Array(d),decoded:new Int32Array(d)},small64:{delta:new Float64Array(0),decoded:new Float64Array(0)},large:{delta:new Int32Array(u),decoded:new Int32Array(u)},large64:{delta:new Float64Array(0),decoded:new Float64Array(0)}};function l(e,t){return t?e<=c.small64.delta.length?c.small64:(e<=c.large64.delta.length||(c.large64.delta=new Float64Array(Math.round(1.25*e)),c.large64.decoded=new Float64Array(Math.round(1.25*e))),c.large64):e<=c.small.delta.length?c.small:(e<=c.large.delta.length||(c.large.delta=new Int32Array(Math.round(1.25*e)),c.large.decoded=new Int32Array(Math.round(1.25*e))),c.large)}function _(t){try{const e=new s(new Uint8Array(t),new DataView(t));for(;e.next();){if(2===e.tag())return f(e.getMessage());e.skip()}}catch(r){throw new e("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:r})}return null}function f(e){for(;e.next();){if(1===e.tag())return e.getMessage();e.skip()}return null}function g(e){const t=e.getLength(),r=e.pos()+t;for(;e.pos()<r&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}function y(e,t,r,s,a){if(!e)return!1;return 0===t*a-s*r&&t*s+r*a>0}class m extends i{static fromBuffer(e,t,r=!1){const s=t.geometryType,a=_(e),n=h(a,"esriGeometryPoint"===s,t.featureIdInfo);return new m(a,n,t,r)}constructor(e,t,r,s){super(r),this._use64Bit=s,this._hasNext=!1,this._isPoints=!1,this._featureIndex=-1,this._featureOffset=0,this._cache={area:0,unquantGeometry:void 0,geometry:void 0},this._parseCaches=new Array,this._geometryType=r.geometryType,this._reader=e,this._header=t,this._hasNext=t.hasFeatures,this._isPoints="esriGeometryPoint"===r.geometryType}get _size(){return this._header.featureCount}get fields(){return this._header.fields}get geometryType(){return this._geometryType}get hasZ(){return this._header.hasZ}get hasM(){return this._header.hasM}get hasFeatures(){return this._header.hasFeatures}get hasNext(){return this._hasNext}get exceededTransferLimit(){return this._header.exceededTransferLimit}getByReferenceVertexCount(){return this._header.byReferenceVertexCounts.get(this._featureIndex)}getSize(){return this._size}getInTransform(){return this._header.transform}getCursor(){return this.copy()}getIndex(){return this._featureIndex}setIndex(e){this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0,this._featureIndex=e}getAttributeHash(){let e="";for(const t of this._header.fields.fields)e+=this._readAttributeAtIndex(t.index)+".";return e}getObjectId(){if(1===this._header.idFieldIndices.length)return this._readAttributeAtIndex(this._header.idFieldIndices[0]);const e=this._header.idFieldIndices.map(e=>this._readAttributeAtIndex(e));return JSON.stringify(e)}getDisplayId(){return this._header.displayIds[this._featureIndex]}setDisplayId(e){this._header.displayIds[this._featureIndex]=e}readGeometryArea(){return this._cache.area||this._readGeometry(!0),this._cache.area}copy(){const e=this._reader.clone(),t=new m(e,this._header,this.metadata,this._use64Bit);return this.copyInto(t),t}next(){for(this._cache.area=0,this._cache.unquantGeometry=void 0,this._cache.geometry=void 0;++this._featureIndex<this._size&&!this._getExists(););return this._featureIndex<this._size}get usedMemory(){return r+(this._cache.geometry?.usedMemory??0)}get underlyingMemory(){return super.underlyingMemory+this._reader.usedMemory+this._header.usedMemory}_readX(){return this._header.centroid[this._featureIndex*this._header.stride]}_readY(){return this._header.centroid[this._featureIndex*this._header.stride+1]}_readServerCentroid(){const e=new a([],[],this.hasZ,this.hasM),{coords:t,stride:r}=e;for(let s=this._featureIndex*r,a=s+r;s<a;++s)t.push(this._header.centroid[s]);return t[0]===o?null:e}_readGeometry(e=!1){if((this.hasZ||this.hasM)&&(e=!1),void 0===this._cache.geometry){let r=null;if(this._isPoints)r=this._readServerCentroid();else{const s=this._header.offsets.geometry[this._featureIndex],a=this._reader;if(0===s)return null;a.move(s);try{r=e?this._parseGeometryForDisplay(a):this._parseGeometry(a)}catch(t){return null}}return 0===r?.coords.length&&(r=null),this._cache.geometry=r,r}return this._cache.geometry}_readAttribute(e,t){const r=this._header.fields.get(e);if(null==r)return;const s=this._readAttributeAtIndex(r.index),a=this._header.fields.isDateField(r.name);return t?null==s?s:a?new Date(s):s:s}_readAttributes(){const e={};for(const t of this._header.fields.fields)e[t.name]=this._readAttributeAtIndex(t.index);return e}copyInto(e){super.copyInto(e),e._featureIndex=this._featureIndex,e._featureOffset=this._featureOffset,e._hasNext=this._hasNext,e._parseCaches=this._parseCaches}_readAttributeAtIndex(e){let t=this._parseCaches[e];if(t||(t=new n(this.getSize()),this._parseCaches[e]=t),t.has(this._featureIndex))return t.get(this._featureIndex);const r=this._header.offsets.attributes[this._featureIndex*this._header.fieldCount+e],s=this._reader;s.move(r);const a=g(s);return t.set(this._featureIndex,a),a}_readGeometryDeltaDecoded(e){if(void 0===this._cache.unquantGeometry){const t=this._readGeometry(e);if(!t)return this._cache.unquantGeometry=void 0,null;const r=this.getInTransform();if(!r)return this._cache.unquantGeometry=t,t;const s=r.scale[2]??1,a=r.translate[2]??1,n=r.scale[3]??1,i=r.translate[3]??1,h=l(t.coords.length,this._use64Bit).decoded,o=t.clone(h);this._cache.unquantGeometry=o;const{lengths:d,coords:u,hasZ:c,hasM:_}=o,f=c&&(1!==s||0!==a),g=_&&(1!==n||0!==i);let y=0;for(const e of d){let t=u[y++],r=u[y++];if(f){const e=u[y];u[y++]=s*e+a}if(g){const e=u[y];u[y++]=n*e+i}for(let h=1;h<e;++h){if(t=u[y++]+=t,r=u[y++]+=r,f){const e=u[y];u[y++]=s*e+a}if(g){const e=u[y];u[y++]=n*e+i}}}return o}return this._cache.unquantGeometry}_parseGeometry(e){const t=e.asUnsafe(),r=t.getPackedEnd(),s=[],n=[];for(;t.pos()<r&&t.next();)switch(t.tag()){case 2:{const e=t.getPackedEnd();for(;t.pos()<e;)n.push(t.getUInt32());break}case 3:{const e=t.getPackedEnd();for(;t.pos()<e;)s.push(t.getSInt64());break}default:t.skip()}return new a(n,s,this.hasZ,this.hasM)}_parseGeometryForDisplay(e){const r=e.asUnsafe(),s=r.getLength(),n=r.pos()+s,i=[],h=[];let o=0,d=0,u=null,c=0;const _="esriGeometryPolygon"===this.geometryType,f="esriGeometryPolyline"===this.geometryType,g=_?3:f?2:1,m=_||f;for(;r.pos()<n&&r.next();)switch(r.tag()){case 2:{const e=r.getUInt32(),t=r.pos()+e;for(;r.pos()<t;){const e=r.getUInt32();i.push(e),o+=e}u=l(2*o,this._use64Bit).delta;break}case 3:{r.getUInt32();const e=2+(this.hasZ?1:0)+(this.hasM?1:0);t(u);for(const t of i){if(d+e*t>u.length){for(let e=0;e<t;e++)r.getSInt64(),r.getSInt64(),this.hasZ&&r.getSInt64(),this.hasM&&r.getSInt64();continue}let s=r.getSInt64(),a=r.getSInt64();this.hasZ&&r.getSInt64(),this.hasM&&r.getSInt64(),u[d++]=s,u[d++]=a;let n=1;for(let e=1;e<t;e++){const e=r.getSInt64(),t=r.getSInt64();this.hasZ&&r.getSInt64(),this.hasM&&r.getSInt64();const i=s+e,h=a+t;c+=-.5*(i-s)*(h+a),s=i,a=h,0===e&&0===t||y(m,u[d-2],u[d-1],e,t)?(u[d-2]+=e,u[d-1]+=t):(u[d++]=e,u[d++]=t,n+=1)}n>=g?h.push(n):d-=n*e}break}default:r.skip()}return this._cache.area=c,h.length?new a(h,u):null!=u?this._createDeltaQuantizedExtrudedGeometry(u[0],u[1]):null}}export{m as FeatureSetReaderPBF};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{estimateNumberArrayMemory as e}from"../../../../../core/memoryEstimations.js";import{getFeatureIdInfoFieldNames as s}from"../../../../../layers/graphics/data/FeatureIdInfo.js";import t from"../../../../../layers/support/FieldsIndex.js";import{parseField as r,parseTransform as o}from"../../../../../rest/query/operations/pbfFeatureServiceParser.js";const a=268435455;class i{constructor(){this.hasFeatures=!1,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.fieldCount=0,this.featureCount=0,this.idFieldIndices=[],this.transform=null,this.vertexCount=0,this.offsets={attributes:new Array,geometry:new Array},this.centroid=new Array}get usedMemory(){let s=0;return s+=e(this.idFieldIndices),s+=e(this.offsets.attributes),s+=e(this.offsets.geometry),s+=e(this.centroid),this.displayIds&&(s+=e(this.displayIds)),this.groupIds&&(s+=e(this.groupIds)),s}get stride(){return 2+Number(this.hasZ)+Number(this.hasM)}}function n(e,n,c){const d=9,f=10,u=11,h=12,p=13,g=15,l=e.asUnsafe(),m=l.pos(),k=new i;let y=0,b=0;const I=1,x=2,w=4,C=3;let F=null;const L=[];for(;l.next();)switch(l.tag()){case h:F=l.processMessage(o);break;case d:k.exceededTransferLimit=l.getBool();break;case f:k.hasZ=l.getBool();break;case u:k.hasM=l.getBool();break;case p:{const e=l.processMessage(r);e.index=y++,L.push(e);break}case g:{const e=l.getPackedEnd(),s=k.offsets.geometry,t=k.centroid;s.push(0);const{stride:r}=k;for(t.push(a),t.push(a);l.pos()<e&&l.next();)switch(l.tag()){case I:{k.offsets.attributes.push(l.pos());const e=l.getLength();l.skipLen(e);break}case x:if(n){const e=l.getPackedEnd();for(;l.pos()<e&&l.next();)switch(l.tag()){case C:{const e=l.getPackedEnd();let s=b*r;for(;l.pos()<e;)k.centroid[s++]=l.getSInt64();break}default:l.skip()}}else{k.offsets.geometry[b]=l.pos();const e=l.getLength();k.vertexCount+=e,l.skipLen(e)}break;case w:{const e=l.getLength(),s=l.pos()+e;for(;l.pos()<s&&l.next();)switch(l.tag()){case C:{const e=l.getPackedEnd();let s=b*r;for(;l.pos()<e;)k.centroid[s++]=l.getSInt64();break}default:l.skip()}break}default:l.skip()}b++,k.hasFeatures=!0;break}default:l.skip()}k.fields=new t(L),k.featureCount=b,k.fieldCount=y;const A=s(c);return k.idFieldIndices=Array.from(A,e=>k.fields.get(e)?.index),k.transform=F,k.displayIds=new Uint32Array(k.featureCount),k.groupIds=new Uint16Array(k.featureCount),l.move(m),k}export{i as FeatureSetHeader,n as parseHeader};
2
+ import{estimateNumberArrayMemory as e}from"../../../../../core/memoryEstimations.js";import{getFeatureIdInfoFieldNames as t}from"../../../../../layers/graphics/data/FeatureIdInfo.js";import s from"../../../../../layers/support/FieldsIndex.js";import{parseField as r,parseTransform as o}from"../../../../../rest/query/operations/pbfFeatureServiceParser.js";const a=268435455;class n{constructor(){this.hasFeatures=!1,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.fieldCount=0,this.featureCount=0,this.idFieldIndices=[],this.transform=null,this.vertexCount=0,this.offsets={attributes:new Array,geometry:new Array},this.centroid=new Array,this.byReferenceVertexCounts=new Map}get usedMemory(){let t=0;return t+=e(this.idFieldIndices),t+=e(this.offsets.attributes),t+=e(this.offsets.geometry),t+=e(this.centroid),this.displayIds&&(t+=e(this.displayIds)),this.groupIds&&(t+=e(this.groupIds)),t}get stride(){return 2+Number(this.hasZ)+Number(this.hasM)}}function i(e,i,c){const d=9,f=10,u=11,h=12,p=13,g=15,l=e.asUnsafe(),m=l.pos(),k=new n;let b=0,y=0;const I=1,x=2,w=4,C=12,F=3;let L=null;const M=[];for(;l.next();)switch(l.tag()){case h:L=l.processMessage(o);break;case d:k.exceededTransferLimit=l.getBool();break;case f:k.hasZ=l.getBool();break;case u:k.hasM=l.getBool();break;case p:{const e=l.processMessage(r);e.index=b++,M.push(e);break}case g:{const e=l.getPackedEnd(),t=k.offsets.geometry,s=k.centroid;t.push(0);const{stride:r}=k;for(s.push(a),s.push(a);l.pos()<e&&l.next();)switch(l.tag()){case I:{k.offsets.attributes.push(l.pos());const e=l.getLength();l.skipLen(e);break}case x:if(i){const e=l.getPackedEnd();for(;l.pos()<e&&l.next();)switch(l.tag()){case F:{const e=l.getPackedEnd();let t=y*r;for(;l.pos()<e;)k.centroid[t++]=l.getSInt64();break}default:l.skip()}}else{k.offsets.geometry[y]=l.pos();const e=l.getLength();k.vertexCount+=e,l.skipLen(e)}break;case w:{const e=l.getLength(),t=l.pos()+e;for(;l.pos()<t&&l.next();)switch(l.tag()){case F:{const e=l.getPackedEnd();let t=y*r;for(;l.pos()<e;)k.centroid[t++]=l.getSInt64();break}default:l.skip()}break}case C:{const e=l.getUInt64();k.byReferenceVertexCounts.set(y,e);break}default:l.skip()}y++,k.hasFeatures=!0;break}default:l.skip()}k.fields=new s(M),k.featureCount=y,k.fieldCount=b;const A=t(c);return k.idFieldIndices=Array.from(A,e=>k.fields.get(e)?.index),k.transform=L,k.displayIds=new Uint32Array(k.featureCount),k.groupIds=new Uint16Array(k.featureCount),l.move(m),k}export{n as FeatureSetHeader,i as parseHeader};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ class e{constructor(e){this.data=e,this._referenceCount=0}static{this.estimatedMemory=20}increment(){this._referenceCount+=1}decrement(){this._referenceCount-=1}get empty(){return 0===this._referenceCount}}export{e as RefCounted};
@@ -96,6 +96,8 @@ export interface LayerView2DMap {
96
96
  "building-scene": never;
97
97
  /** @since 5.0 */
98
98
  dimension: never;
99
+ /** @since 5.1 */
100
+ "dimension-feature": FeatureLayerView;
99
101
  /** @since 5.0 */
100
102
  elevation: never;
101
103
  /** @since 5.0 */
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../core/Error.js";const r=()=>import("./layers/TileLayerView3D.js"),a=()=>import("./layers/ElevationLayerView3D.js"),i={"base-dynamic":()=>import("./layers/BaseDynamicLayerView3D.js"),"base-elevation":a,"base-tile":r,"bing-maps":r,"building-scene":()=>import("./layers/BuildingSceneLayerView3D.js"),catalog:()=>import("./layers/CatalogLayerView3D.js"),"catalog-dynamic-group":()=>import("./layers/CatalogDynamicGroupLayerView3D.js"),"catalog-footprint":()=>import("./layers/CatalogFootprintLayerView3D.js"),csv:()=>import("./layers/CSVLayerView3D.js"),dimension:()=>import("./layers/DimensionLayerView3D.js"),elevation:a,feature:()=>import("./layers/FeatureLayerView3D.js"),"gaussian-splat":()=>import("./layers/GaussianSplatLayerView3D.js"),geojson:()=>import("./layers/GeoJSONLayerView3D.js"),graphics:()=>import("./layers/GraphicsLayerView3D.js"),group:()=>import("./layers/GroupLayerView3D.js"),imagery:()=>import("./layers/ImageryLayerView3D.js"),"integrated-mesh":()=>import("./layers/IntegratedMeshLayerView3D.js"),"integrated-mesh-3dtiles":()=>import("./layers/IntegratedMesh3DTilesLayerView3D.js"),"line-of-sight":()=>import("./layers/LineOfSightLayerView3D.js"),"map-image":()=>import("./layers/MapImageLayerView3D.js"),media:()=>import("./layers/MediaLayerView3D.js"),"ogc-feature":()=>import("./layers/OGCFeatureLayerView3D.js"),"open-street-map":r,"oriented-imagery":()=>import("./layers/FeatureLayerView3D.js"),"point-cloud":()=>import("./layers/PointCloudLayerView3D.js"),viewshed:()=>import("./layers/ViewshedLayerView3D.js"),voxel:()=>import("./layers/VoxelLayerView3D.js"),route:()=>import("./layers/RouteLayerView3D.js"),scene:e=>null==e.profile||"mesh-pyramids"===e.profile?import("./layers/SceneLayerView3D.js"):import("./layers/SceneLayerGraphicsView3D.js"),stream:()=>import("./layers/StreamLayerView3D.js"),tile:r,"imagery-tile":()=>import("./layers/ImageryTileLayerView3D.js"),"vector-tile":()=>import("./layers/VectorTileLayerView3D.js"),wcs:()=>import("./layers/ImageryTileLayerView3D.js"),"web-tile":r,wfs:()=>import("./layers/WFSLayerView3D.js"),wms:()=>import("./layers/WMSLayerView3D.js"),wmts:()=>import("./layers/WMTSLayerView3D.js"),"geo-rss":null,kml:null,"knowledge-graph-sublayer":null,"knowledge-graph":null,"link-chart":null,"map-notes":null,parquet:null,"subtype-group":null,unknown:null,unsupported:null,video:null};function s(r){const a=r.declaredClass?r.declaredClass.slice(r.declaredClass.lastIndexOf(".")+1):"Unknown",i=a.replaceAll(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return new e(`${i}:view-not-supported`,`${a} is not supported in 3D`)}const t=new Map,l={hasLayerViewModule:e=>null!=i[e.type],importLayerView:e=>{const r=o(e),a=t.get(r);if(a)return a;const l=i[e.type];if(null==l)throw s(e);const y=l(e);return t.set(r,y),y}};function o(e){return"scene"===e.type?`${e.type}-${e.profile}`:e.type}export{l as layerView3DImporter};
2
+ import e from"../../core/Error.js";const r=()=>import("./layers/TileLayerView3D.js"),a=()=>import("./layers/ElevationLayerView3D.js"),i={"base-dynamic":()=>import("./layers/BaseDynamicLayerView3D.js"),"base-elevation":a,"base-tile":r,"bing-maps":r,"building-scene":()=>import("./layers/BuildingSceneLayerView3D.js"),catalog:()=>import("./layers/CatalogLayerView3D.js"),"catalog-dynamic-group":()=>import("./layers/CatalogDynamicGroupLayerView3D.js"),"catalog-footprint":()=>import("./layers/CatalogFootprintLayerView3D.js"),csv:()=>import("./layers/CSVLayerView3D.js"),dimension:()=>import("./layers/DimensionLayerView3D.js"),elevation:a,feature:()=>import("./layers/FeatureLayerView3D.js"),"gaussian-splat":()=>import("./layers/GaussianSplatLayerView3D.js"),geojson:()=>import("./layers/GeoJSONLayerView3D.js"),graphics:()=>import("./layers/GraphicsLayerView3D.js"),group:()=>import("./layers/GroupLayerView3D.js"),imagery:()=>import("./layers/ImageryLayerView3D.js"),"integrated-mesh":()=>import("./layers/IntegratedMeshLayerView3D.js"),"integrated-mesh-3dtiles":()=>import("./layers/IntegratedMesh3DTilesLayerView3D.js"),"line-of-sight":()=>import("./layers/LineOfSightLayerView3D.js"),"map-image":()=>import("./layers/MapImageLayerView3D.js"),media:()=>import("./layers/MediaLayerView3D.js"),"ogc-feature":()=>import("./layers/OGCFeatureLayerView3D.js"),"open-street-map":r,"oriented-imagery":()=>import("./layers/FeatureLayerView3D.js"),"point-cloud":()=>import("./layers/PointCloudLayerView3D.js"),viewshed:()=>import("./layers/ViewshedLayerView3D.js"),voxel:()=>import("./layers/VoxelLayerView3D.js"),route:()=>import("./layers/RouteLayerView3D.js"),scene:e=>null==e.profile||"mesh-pyramids"===e.profile?import("./layers/SceneLayerView3D.js"):import("./layers/SceneLayerGraphicsView3D.js"),stream:()=>import("./layers/StreamLayerView3D.js"),tile:r,"imagery-tile":()=>import("./layers/ImageryTileLayerView3D.js"),"vector-tile":()=>import("./layers/VectorTileLayerView3D.js"),wcs:()=>import("./layers/ImageryTileLayerView3D.js"),"web-tile":r,wfs:()=>import("./layers/WFSLayerView3D.js"),wms:()=>import("./layers/WMSLayerView3D.js"),wmts:()=>import("./layers/WMTSLayerView3D.js"),"geo-rss":null,kml:null,"knowledge-graph-sublayer":null,"knowledge-graph":null,"link-chart":null,"map-notes":null,parquet:null,"subtype-group":null,unknown:null,unsupported:null,video:null,"dimension-feature":null};function s(r){const a=r.declaredClass?r.declaredClass.slice(r.declaredClass.lastIndexOf(".")+1):"Unknown",i=a.replaceAll(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return new e(`${i}:view-not-supported`,`${a} is not supported in 3D`)}const t=new Map,l={hasLayerViewModule:e=>null!=i[e.type],importLayerView:e=>{const r=o(e),a=t.get(r);if(a)return a;const l=i[e.type];if(null==l)throw s(e);const y=l(e);return t.set(r,y),y}};function o(e){return"scene"===e.type?`${e.type}-${e.profile}`:e.type}export{l as layerView3DImporter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../core/Error.js";import{releaseMaybe as t}from"../../../../core/maybe.js";import{isPromiseLike as r}from"../../../../core/promiseUtils.js";import{pt2px as n}from"../../../../core/screenUtils.js";import{fromValues as s,ONES as i,ZEROS as a,create as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{freeze as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as c}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{hasCalloutSupport as m,textSymbolLayerSupportsVerticalOffset as h}from"../../../../symbols/callouts/calloutUtils.js";import{perObjectElevationAligner as f}from"./ElevationAligners.js";import{needsElevationUpdates2D as d}from"./elevationAlignmentUtils.js";import{Graphics3DObject3DGraphicLayer as p}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DObjectMetadata as u}from"./Graphics3DObjectMetadata.js";import{Graphics3DSymbolLayer as g}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as y}from"./graphicUtils.js";import{LabelPlacement as v,LabelParameters as x}from"./LabelParameters.js";import{verticalScreenOffsetFromAlignment as b,verticalPlacementFromAlignment as O,textRenderAlignmentFromHorizontalPlacement as P,horizontalPlacementToAnchorX as S,anchorFromPlacements as w,namedAnchorToHUDMaterialAnchorPos as j}from"./placementUtils.js";import{placePointOnGeometry as _,updateStageObjectGeometry as z,getLocalOriginForPoint as E,extendPointGraphicElevationContext as L,createStageObject as G}from"./pointUtils.js";import{getFontMetrics as C}from"../../webgl-engine/lib/FontMetrics.js";import{createPointGeometry as A}from"../../webgl-engine/lib/GeometryUtil.js";import{TextRenderParameters as U}from"../../webgl-engine/lib/TextRenderParameters.js";import D from"../../webgl-engine/lib/TextTextureFactory.js";import{HUDMaterial as F}from"../../webgl-engine/materials/HUDMaterial.js";const R=l(0,0,1);class V extends g{constructor(e,t,r,n){super(e,t,r,n),this._elevationOptions={supportsOffsetAdjustment:!0,supportsOnTheGround:!1},this.ensureDrapedStatus(!1)}async doLoad(){if(!this._drivenProperties.size){const t=y(this.symbolLayer.size);if(t)throw new e("graphics3dtextsymbollayer:invalid-size",t)}await this._createTextRenderParameters()}async _createTextRenderParameters(){const e=this._context.graphicsCoreOwner.view.state.rasterPixelRatio;this._textRenderParameters=await U.fromSymbol(this.symbolLayer,e)}destroy(){super.destroy()}createGraphics3DGraphic(e){const t=e.graphic,r=_(t.geometry);if(null==r)return this.logger.warn(`unsupported geometry type for text symbol: ${t.geometry.type}`),null;const n=this.view.focusAreasView?.containsGeometry(r)??!0,s=this.symbolLayer.text;if(null==s||""===s)return null;const i=m(this.symbol)&&this.symbol.hasVisibleVerticalOffset()?this.symbol.verticalOffset:null;if(null!=i&&!h(this.symbolLayer))return this.logger.errorOncePerTick(`Callouts and vertical offset on text symbols are currently only supported with 'center' horizontal alignment (not with '${this.symbolLayer.horizontalAlignment}' alignment)`),null;const{verticalAlignment:a}=this.symbolLayer,o=new v(i);b(a,o.screenOffset);const l=new x(o,this.symbolLayer.horizontalAlignment,O(a)),c=n?null:this._context.focusAreaStyle;return this._createAs3DShape(t,r,s,l,c)}get needsUpdateFocus(){return!0}createLabel(e,t,r,n,s){const i=e.graphic,a=_(i.geometry);if(null==a)return this.logger.warn(`unsupported geometry type for label: ${i.geometry.type}`),null;const o=this.view.focusAreasView?.containsGeometry(a)??!0,l=t.text;if(!l||/^\s+$/.test(l))return null;const c=o?null:this._context.focusAreaStyle;return this._createAs3DShape(i,a,l,t,c,r,n,s)}createElevationContextForGraphic(e,t=0){const r=super.createElevationContextForGraphic(e);return r.addOffsetRenderUnits(t),r}updateElevationContextForGraphic(e,t,r=0){super.updateElevationContextForGraphic(e,t),e.addOffsetRenderUnits(r)}layerOpacityChanged(){return this.logger.warn("layer opacity change not yet implemented in Graphics3DTextSymbolLayer"),!1}layerScreenSizePerspectiveChanged(e,t){const r=!this.draped&&this._context.screenSizePerspectiveEnabled,n=r?this.view.screenSizePerspective.labelParameters:null,s=r?this.view.screenSizePerspective.parameters:null;T(e,t,e=>{for(const t of e.stageObject.geometries)t.material.setParameters({screenSizePerspective:n,screenSizePerspectiveAlignment:s})})}layerElevationInfoChanged(e,t){return T(e,t,(e,t)=>{this.graphics3DGraphicLayerElevationInfoChanged(t,e)}),1}slicePlaneEnabledChanged(e,t){return T(e,t,e=>{for(const t of e.stageObject.geometries)t.material.setParameters({hasSlicePlane:this._context.slicePlaneEnabled})}),!0}terrainTransparencyChanged(){return this.draped}physicalBasedRenderingChanged(){return!0}get pixelRatioChanged(){return!1}graphics3DGraphicLayerElevationInfoChanged(e,t){const{elevationContext:r,metadata:n}=t;this.updateElevationContextForGraphic(r,e,n?.elevationOffset??0),t.needsElevationUpdates=d(r.mode)||"absolute-height"===r.mode}updateGeometry(e,t){const r=e.geometry;if(this.draped||!r||!this._validateGeometry(r))return!1;const{elevationContext:n,stageObject:s}=t;if(n.mode!==this.getGeometryElevationMode(r))return!1;const i=_(r);if(!i)return!1;n.updateFeatureExpressionFeature(e,this._context.layer);const a=z(s,this._context,i,n);if(null==a)return!1;const o=E(this._context,i);return s.geometries[0].localOrigin===o&&(t.alignedSampledElevation=a,L(t,i,this._context.elevationProvider),!0)}_defaultElevationInfoNoZ(){return H}_createAs3DShape(e,l,m,h,g,y,v=null,x=()=>h.placement.elevationOffset){const b=this.createElevationContextForGraphic(e,h.placement.elevationOffset),O=e.uid;let S=null,w=null;if(null==v){const e=P(h.horizontalPlacement);S=new D(m,e,this._textRenderParameters);let n=null;if(null!=this._context.sharedResources.textures){w=this._context.sharedResources.textures.fromData(S.key,()=>S.create()),w.managedTexture.events.on("unloaded",()=>n=t(n));const e=this._context.stage.renderView.textures.acquire(w.managedTexture.id);if(null==e||r(e))return w.release(),null;n=e}}const j=this.symbolLayer.occludedVisibility?.mode??"hidden",_=I(S,h),z=null!=v,E={occludedFragmentOpacity:"hidden"!==j?this.view.state.ensureOccludedFragmentOpacity():null,screenOffset:h.placement.screenOffset,anchorPosition:_,polygonOffset:2,color:[1,1,1,1],centerOffsetUnits:h.placement.centerOffsetUnits,depthEnabled:!1,drawAsLabel:!0,isLabel:!0,hasVertexSize:z,hasVertexUVi:z,hasVertexCenterOffset:z,size:S?s(S.displayWidth,S.displayHeight):i,focusAreaStyle:g};if("polyline"===e.geometry?.type&&(E.shaderPolygonOffset=1e-4),z?E.textureId=v.id:w&&(E.textureId=w.managedTexture.id),null!=h.placement.verticalOffset){const{screenLength:e,minWorldLength:t,maxWorldLength:r}=h.placement.verticalOffset;E.verticalOffset={screenLength:n(e),minWorldLength:t||0,maxWorldLength:null!=r?r:1/0}}const U={screenOffset:E.screenOffset,anchorPosition:_,centerOffsetUnits:E.centerOffsetUnits,verticalOffset:E.verticalOffset,shaderPolygonOffset:E.shaderPolygonOffset,focusAreaStyle:E.focusAreaStyle};if(this._context.screenSizePerspectiveEnabled){const{parameters:e,labelParameters:t}=this.view.screenSizePerspective,r=C(this._textRenderParameters);E.screenSizePerspective=t,E.screenSizePerspectiveMinPixelReferenceSize=r.maxHeight,E.screenSizePerspectiveAlignment=e,U.fontHeight=r.maxHeight}E.hasSlicePlane=this._context.slicePlaneEnabled;const V=y?JSON.stringify(U):"";let T=y?.get(V);null==T&&(T=new F(E,this._context.spherical),y?.set(V,T));const H=h.placement.translation,M=z?a:null,W=z?h.placement.centerOffset:null,$=h.placement.groundDistance,k=R,N=z?c(0,0,0,0):null,q=A(T,{normal:k,position:H,size:M,centerOffset:W,groundDistance:$,uvi:N}),B=G(this._context,l,q,b,O);if(null==B)return null;const J=(t,r,n,s,i,a)=>{const o=x()||h.placement.elevationOffset;return this.updateElevationContextForGraphic(r,e,o),f(t,r,n,s,i,a)},Y=new p(this,B.object,w,J,b);Y.setOccludedVisibilityMode(this.symbolLayer.occludedVisibility?.mode),Y.hiddenIfDeconflicted=!0,Y.alignedSampledElevation=B.sampledElevation,Y.needsElevationUpdates=d(b.mode)||"absolute-height"===b.mode,Y.getScreenSize=(e=o())=>(e[0]=S?S.displayWidth:h.displaySize[0],e[1]=S?S.displayHeight:h.displaySize[1],e);const Z=new u(h.placement.elevationOffset,m);return Y.metadata=Z,L(Y,l,this._context.elevationProvider),Y}}function T(e,t,r){e?.forEach(e=>{const n=t(e);null!=n&&r(n,e.graphic)})}function I(e,t){if("baseline"===t.verticalPlacement){const r=S[t.horizontalPlacement],n=null!=e?e.baselineAnchorY:0;return s(r,n)}const r=w(t.horizontalPlacement,t.verticalPlacement);return j[r]}const H={mode:"relative-to-ground",offset:0};export{V as Graphics3DTextSymbolLayer};
2
+ import e from"../../../../core/Error.js";import{releaseMaybe as t}from"../../../../core/maybe.js";import{isPromiseLike as r}from"../../../../core/promiseUtils.js";import{pt2px as n}from"../../../../core/screenUtils.js";import{fromValues as s,ONES as i,ZEROS as a,create as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{freeze as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as c}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{hasCalloutSupport as m,textSymbolLayerSupportsVerticalOffset as h}from"../../../../symbols/callouts/calloutUtils.js";import{perObjectElevationAligner as f}from"./ElevationAligners.js";import{needsElevationUpdates2D as d}from"./elevationAlignmentUtils.js";import{Graphics3DObject3DGraphicLayer as p}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DObjectMetadata as u}from"./Graphics3DObjectMetadata.js";import{Graphics3DSymbolLayer as g}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as y}from"./graphicUtils.js";import{LabelPlacement as v,LabelParameters as x}from"./LabelParameters.js";import{verticalScreenOffsetFromAlignment as b,verticalPlacementFromAlignment as O,textRenderAlignmentFromHorizontalPlacement as P,horizontalPlacementToAnchorX as S,anchorFromPlacements as w,namedAnchorToHUDMaterialAnchorPos as j}from"./placementUtils.js";import{placePointOnGeometry as _,updateStageObjectGeometry as E,getLocalOriginForPoint as z,extendPointGraphicElevationContext as L,createStageObject as G}from"./pointUtils.js";import{getFontMetrics as C}from"../../webgl-engine/lib/FontMetrics.js";import{createPointGeometry as A}from"../../webgl-engine/lib/GeometryUtil.js";import{TextRenderParameters as U}from"../../webgl-engine/lib/TextRenderParameters.js";import D from"../../webgl-engine/lib/TextTextureFactory.js";import{HUDMaterial as F}from"../../webgl-engine/materials/HUDMaterial.js";const R=l(0,0,1);class V extends g{constructor(e,t,r,n){super(e,t,r,n),this._elevationOptions={supportsOffsetAdjustment:!0,supportsOnTheGround:!1},this.ensureDrapedStatus(!1)}async doLoad(){if(!this._drivenProperties.size){const t=y(this.symbolLayer.size);if(t)throw new e("graphics3dtextsymbollayer:invalid-size",t)}await this._createTextRenderParameters()}async _createTextRenderParameters(){const e=this._context.graphicsCoreOwner.view.state.rasterPixelRatio;this._textRenderParameters=await U.fromSymbol(this.symbolLayer,e)}destroy(){super.destroy()}createGraphics3DGraphic(e){const t=e.graphic,r=_(t.geometry);if(null==r)return this.logger.warn(`unsupported geometry type for text symbol: ${t.geometry.type}`),null;const n=this.view.focusAreasView?.containsGeometry(r)??!0,s=this.symbolLayer.text;if(null==s||""===s)return null;const i=m(this.symbol)&&this.symbol.hasVisibleVerticalOffset()?this.symbol.verticalOffset:null;if(null!=i&&!h(this.symbolLayer))return this.logger.errorOncePerTick(`Callouts and vertical offset on text symbols are currently only supported with 'center' horizontal alignment (not with '${this.symbolLayer.horizontalAlignment}' alignment)`),null;const{verticalAlignment:a}=this.symbolLayer,o=new v(i);b(a,o.screenOffset);const l=new x(o,this.symbolLayer.horizontalAlignment,O(a)),c=n?null:this._context.focusAreaStyle;return this._createAs3DShape(t,r,s,l,c)}get needsUpdateFocus(){return!0}createLabel(e,t,r,n,s){const i=e.graphic,a=_(i.geometry);if(null==a)return this.logger.warn(`unsupported geometry type for label: ${i.geometry.type}`),null;const o=this.view.focusAreasView?.containsGeometry(a)??!0,l=t.text;if(!l||/^\s+$/.test(l))return null;const c=o?null:this._context.focusAreaStyle;return this._createAs3DShape(i,a,l,t,c,r,n,s)}createElevationContextForGraphic(e,t=0){const r=super.createElevationContextForGraphic(e);return r.addOffsetRenderUnits(t),r}updateElevationContextForGraphic(e,t,r=0){super.updateElevationContextForGraphic(e,t),e.addOffsetRenderUnits(r)}layerOpacityChanged(){return this.logger.warn("layer opacity change not yet implemented in Graphics3DTextSymbolLayer"),!1}layerScreenSizePerspectiveChanged(e,t){const r=!this.draped&&this._context.screenSizePerspectiveEnabled,n=r?this.view.screenSizePerspective.labelParameters:null,s=r?this.view.screenSizePerspective.parameters:null;T(e,t,e=>{for(const t of e.stageObject.geometries)t.material.setParameters({screenSizePerspective:n,screenSizePerspectiveAlignment:s})})}layerElevationInfoChanged(e,t){return T(e,t,(e,t)=>{this.graphics3DGraphicLayerElevationInfoChanged(t,e)}),1}slicePlaneEnabledChanged(e,t){return T(e,t,e=>{for(const t of e.stageObject.geometries)t.material.setParameters({hasSlicePlane:this._context.slicePlaneEnabled})}),!0}terrainTransparencyChanged(){return this.draped}physicalBasedRenderingChanged(){return!0}get pixelRatioChanged(){return!1}graphics3DGraphicLayerElevationInfoChanged(e,t){const{elevationContext:r,metadata:n}=t;this.updateElevationContextForGraphic(r,e,n?.elevationOffset??0),t.needsElevationUpdates=d(r.mode)||"absolute-height"===r.mode}updateGeometry(e,t){const r=e.geometry;if(this.draped||!r||!this._validateGeometry(r))return!1;const{elevationContext:n,stageObject:s}=t;if(n.mode!==this.getGeometryElevationMode(r))return!1;const i=_(r);if(!i)return!1;n.updateFeatureExpressionFeature(e,this._context.layer);const a=E(s,this._context,i,n);if(null==a)return!1;const o=z(this._context,i);return s.geometries[0].localOrigin===o&&(t.alignedSampledElevation=a,L(t,i,this._context.elevationProvider),!0)}_defaultElevationInfoNoZ(){return H}_createAs3DShape(e,l,m,h,g,y,v=null,x=()=>h.placement.elevationOffset){const b=this.createElevationContextForGraphic(e,h.placement.elevationOffset),O=e.uid;let S=null,w=null;if(null==v){const e=P(h.horizontalPlacement);S=new D(m,e,this._textRenderParameters);let n=null;if(null!=this._context.sharedResources.textures){w=this._context.sharedResources.textures.fromData(S.key,()=>S.create()),w.managedTexture.events.on("unloaded",()=>n=t(n));const e=this._context.stage.renderView.textures.acquire(w.managedTexture.id);if(null==e||r(e))return w.release(),null;n=e}}const j=this.symbolLayer.occludedVisibility?.mode??"hidden",_=I(S,h),E=null!=v,z={occludedFragmentOpacity:"hidden"!==j?this.view.state.ensureOccludedFragmentOpacity():null,screenOffset:h.placement.screenOffset,anchorPosition:_,polygonOffset:2,color:[1,1,1,1],centerOffsetUnits:h.placement.centerOffsetUnits,depthEnabled:!1,drawAsLabel:!0,isLabel:!0,hasVertexSize:E,hasVertexUVi:E,hasVertexCenterOffset:E,size:S?s(S.displayWidth,S.displayHeight):i,focusAreaStyle:g};if("polyline"===e.geometry?.type&&(z.shaderPolygonOffset=1e-4),E?z.textureId=v.id:w&&(z.textureId=w.managedTexture.id),null!=h.placement.verticalOffset){const{screenLength:e,minWorldLength:t,maxWorldLength:r}=h.placement.verticalOffset;z.verticalOffset={screenLength:n(e),minWorldLength:t||0,maxWorldLength:null!=r?r:1/0}}const U={screenOffset:z.screenOffset,anchorPosition:_,centerOffsetUnits:z.centerOffsetUnits,verticalOffset:z.verticalOffset,shaderPolygonOffset:z.shaderPolygonOffset,focusAreaStyle:z.focusAreaStyle};if(this._context.screenSizePerspectiveEnabled){const{parameters:e,labelParameters:t}=this.view.screenSizePerspective,r=C(this._textRenderParameters);z.screenSizePerspective=t,z.screenSizePerspectiveMinPixelReferenceSize=r.maxHeight,z.screenSizePerspectiveAlignment=e,U.fontHeight=r.maxHeight}z.hasSlicePlane=this._context.slicePlaneEnabled;const V=y?JSON.stringify(U):"";let T=y?.get(V);null==T&&(T=new F(z,this._context.spherical),y?.set(V,T));const H=h.placement.translation,M=E?a:null,W=E?h.placement.centerOffset:null,$=h.placement.groundDistance,k=R,N=E?c(0,0,0,0):null,q=A(T,{normal:k,position:H,size:M,centerOffset:W,groundDistance:$,uvi:N}),B=G(this._context,l,q,b,O);if(null==B)return null;const J=(t,r,n,s,i,a)=>{const o=x()||h.placement.elevationOffset;return this.updateElevationContextForGraphic(r,e,o),f(t,r,n,s,i,a)},Y=new p(this,B.object,w,J,b);Y.setOccludedVisibilityMode(this.symbolLayer.occludedVisibility?.mode),Y.hiddenIfDeconflicted=!0,Y.alignedSampledElevation=B.sampledElevation,Y.needsElevationUpdates=d(b.mode)||"absolute-height"===b.mode,Y.getScreenSize=(e=o())=>(e[0]=S?S.displayWidth:h.displaySize[0],e[1]=S?S.displayHeight:h.displaySize[1],e);const Z=new u(h.placement.elevationOffset,m);return Y.metadata=Z,L(Y,l,this._context.elevationProvider),Y}}function T(e,t,r){e?.forEach(e=>{const n=t(e);null!=n&&r(n,e.graphic)})}function I(e,t){const r=t.horizontalPlacement;if("baseline"===t.verticalPlacement){const t=S[r],n=null!=e?e.baselineAnchorY:0;return s(t,n)}const n=w(r,t.verticalPlacement);return j[n]}const H={mode:"relative-to-ground",offset:0};export{V as Graphics3DTextSymbolLayer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import has from"../../../core/has.js";import{Milliseconds as e}from"../../../core/time.js";function a(e){return t[e]}function i(){return has("esri-iPhone")?"low":"medium"}const o={reset(){const e=m();for(const a of Object.keys(e))t[a]=e[a]}},l={IPhone12Pro:120,GalaxyS20:200,FullHD:240,SurfacePro7:300,FullHDRetina:430},t=m();function m(){const a=!!has("esri-mobile"),i=!!has("ios"),o=e(400);return{low:{graphics3D:{maxTotalNumberOfFeatures:5e4,maxNumberOfDrawCalls:8e3,maxTotalNumberOfVertices:255e4,polygonLodFactor:.5,polylineLodFactor:1,snapshotAvailable:!1,skipHighSymbolLods:!0},heatmap:{pixelRatio:.125},sceneService:{objectLoDFactor:.2,pointLoDFactor:1,meshLoDFactor:.6,pointCloudLoDFactor:.5},gaussianSplat:{idleMinimumSplatPixelRadius:2,nonIdleMinimumSplatPixelRadius:4,idleMinimumOpacity:0,nonIdleMinimumOpacity:0,maximumNumberOfGaussians:1e6},flow:{maxTotalNumberOfStreamlines:5e3,maxTracingResolution:1024,transitionEnabled:!1},tiledSurface:{lodBias:-1,angledSplitBias:.5,vtlContentZoom:.75,elevationLevelDelta:3,reduceTileLevelDifferences:!0},fadeDuration:e(0),physicallyBasedRenderingEnabled:!1,maxTexturePixels:a?1048576:4194304,memoryLimit:200+l.IPhone12Pro,additionalCacheMemory:0,frameRate:0,maximumPixelRatio:1},medium:{graphics3D:{maxTotalNumberOfFeatures:15e4,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:625e4,polygonLodFactor:a?.8:1,polylineLodFactor:a?1.2:1.5,snapshotAvailable:!i,skipHighSymbolLods:!1},heatmap:{pixelRatio:.25},sceneService:{objectLoDFactor:1,pointLoDFactor:1,meshLoDFactor:1,pointCloudLoDFactor:1},gaussianSplat:{idleMinimumSplatPixelRadius:1,nonIdleMinimumSplatPixelRadius:2,idleMinimumOpacity:1,nonIdleMinimumOpacity:0,maximumNumberOfGaussians:2e6},flow:{maxTotalNumberOfStreamlines:2e4,maxTracingResolution:2048,transitionEnabled:!0},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:3,reduceTileLevelDifferences:!0},fadeDuration:o,physicallyBasedRenderingEnabled:!0,maxTexturePixels:a?4194304:4096**2,memoryLimit:a?600+l.GalaxyS20:750+l.FullHD,additionalCacheMemory:a?-100:150,frameRate:0,maximumPixelRatio:1},high:{graphics3D:{maxTotalNumberOfFeatures:3e5,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:125e5,polygonLodFactor:a?1.2:2,polylineLodFactor:a?1.2:2,snapshotAvailable:!i,skipHighSymbolLods:!1},heatmap:{pixelRatio:.5},sceneService:{objectLoDFactor:1,pointLoDFactor:1,meshLoDFactor:1,pointCloudLoDFactor:1},gaussianSplat:{idleMinimumSplatPixelRadius:.5,nonIdleMinimumSplatPixelRadius:1,idleMinimumOpacity:2,nonIdleMinimumOpacity:0,maximumNumberOfGaussians:4e6},flow:{maxTotalNumberOfStreamlines:2e4,maxTracingResolution:2048,transitionEnabled:!0},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:2,reduceTileLevelDifferences:!0},fadeDuration:o,physicallyBasedRenderingEnabled:!0,maxTexturePixels:a?4096**2:1/0,memoryLimit:a?900+l.SurfacePro7:1500+l.FullHDRetina,additionalCacheMemory:a?-150:0,frameRate:0,maximumPixelRatio:a?1:1/0}}}export{o as QualityProfileTest,i as getDefaultQualityProfileName,a as getQualityProfileSettings};
2
+ import has from"../../../core/has.js";import{Milliseconds as e}from"../../../core/time.js";function a(e){return t[e]}function i(){return has("esri-iPhone")?"low":"medium"}const o={reset(){const e=m();for(const a of Object.keys(e))t[a]=e[a]}},l={IPhone12Pro:120,GalaxyS20:200,FullHD:240,SurfacePro7:300,FullHDRetina:430},t=m();function m(){const a=!!has("esri-mobile"),i=!!has("ios"),o=e(400);return{low:{graphics3D:{maxTotalNumberOfFeatures:5e4,maxNumberOfDrawCalls:8e3,maxTotalNumberOfVertices:255e4,polygonLodFactor:.5,polylineLodFactor:1,snapshotAvailable:!1,skipHighSymbolLods:!0},heatmap:{pixelRatio:.125},sceneService:{objectLoDFactor:.2,pointLoDFactor:1,meshLoDFactor:.6,pointCloudLoDFactor:.5},gaussianSplat:{idleMinimumSplatPixelRadius:2,nonIdleMinimumSplatPixelRadius:4,idleMinimumOpacity:0,nonIdleMinimumOpacity:0,maximumNumberOfGaussians:1e6},flow:{maxTotalNumberOfStreamlines:5e3,maxTracingResolution:1024,transitionEnabled:!1},tiledSurface:{lodBias:-1,angledSplitBias:.5,vtlContentZoom:.75,elevationLevelDelta:3,reduceTileLevelDifferences:!0},fadeDuration:e(0),physicallyBasedRenderingEnabled:!1,maxTexturePixels:a?1048576:4194304,memoryLimit:200+l.IPhone12Pro,additionalCacheMemory:0,frameRate:0,maximumPixelRatio:1},medium:{graphics3D:{maxTotalNumberOfFeatures:15e4,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:625e4,polygonLodFactor:a?.8:1,polylineLodFactor:a?1.2:1.5,snapshotAvailable:!i,skipHighSymbolLods:!1},heatmap:{pixelRatio:.25},sceneService:{objectLoDFactor:1,pointLoDFactor:1,meshLoDFactor:1,pointCloudLoDFactor:1},gaussianSplat:{idleMinimumSplatPixelRadius:1,nonIdleMinimumSplatPixelRadius:1.5,idleMinimumOpacity:1,nonIdleMinimumOpacity:2,maximumNumberOfGaussians:2e6},flow:{maxTotalNumberOfStreamlines:2e4,maxTracingResolution:2048,transitionEnabled:!0},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:3,reduceTileLevelDifferences:!0},fadeDuration:o,physicallyBasedRenderingEnabled:!0,maxTexturePixels:a?4194304:4096**2,memoryLimit:a?600+l.GalaxyS20:750+l.FullHD,additionalCacheMemory:a?-100:150,frameRate:0,maximumPixelRatio:1},high:{graphics3D:{maxTotalNumberOfFeatures:3e5,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:125e5,polygonLodFactor:a?1.2:2,polylineLodFactor:a?1.2:2,snapshotAvailable:!i,skipHighSymbolLods:!1},heatmap:{pixelRatio:.5},sceneService:{objectLoDFactor:1,pointLoDFactor:1,meshLoDFactor:1,pointCloudLoDFactor:1},gaussianSplat:{idleMinimumSplatPixelRadius:.5,nonIdleMinimumSplatPixelRadius:1,idleMinimumOpacity:3,nonIdleMinimumOpacity:1,maximumNumberOfGaussians:4e6},flow:{maxTotalNumberOfStreamlines:2e4,maxTracingResolution:2048,transitionEnabled:!0},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:2,reduceTileLevelDifferences:!0},fadeDuration:o,physicallyBasedRenderingEnabled:!0,maxTexturePixels:a?4096**2:1/0,memoryLimit:a?900+l.SurfacePro7:1500+l.FullHDRetina,additionalCacheMemory:a?-150:0,frameRate:0,maximumPixelRatio:a?1:1/0}}}export{o as QualityProfileTest,i as getDefaultQualityProfileName,a as getQualityProfileSettings};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{reallocGrowthFactor as t}from"../../../../core/arrayUtils.js";import{abortMaybe as e}from"../../../../core/maybe.js";import{isAbortError as s}from"../../../../core/promiseUtils.js";import{signal as i}from"../../../../core/signal.js";import{Milliseconds as r,now as a}from"../../../../core/time.js";import{normalize as o}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersects as l}from"../../../../geometry/support/aaBoundingBox.js";import{makeScheduleFunction as h}from"../../layers/support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as d}from"../GaussianSplatWorkerHandle.js";import{GaussianSplatFadeTexture as u}from"./GaussianSplatFadeTexture.js";import{GaussianSplatOrderTexture as _}from"./GaussianSplatOrderTexture.js";import{GaussianSplatTextureAtlas as c}from"./GaussianSplatTextureAtlas.js";import{TaskPriority as f}from"../../../support/Scheduler.js";class m{constructor(t,e){this._updating=i(!1),this._useDeterministicSort=!1,this.visibleGaussians=0,this._bufferCapacity=0,this._requestedLyr3dVisibilityChange=0,this._latestCompletedLyr3dVisibilityChange=0,this._latestUpdatedGaussianTiles=new Array,this._latestSortedGaussianTiles=new Array,this._nextCommittedVisibleGaussianTiles=new Array,this._cameraDirectionNormalized=n(),this._frameTask=null,this._workerHandle=null,this._sortAbortController=null,this._isSorting=!1,this._pendingSortTask=!1,this._scheduledSortStartTimeout=null,this._lastSortStartTime=r(-1/0),this._sortInterval=r(80),this._renderer=t,this._onSortComplete=e,this._orderTexture=new _(this._renderer.renderingContext),this._fadingTexture=new u(this._renderer.renderingContext),this._textureAtlas=new c(this._renderer.renderingContext,this._renderer.view.resourceController.memoryController,this._renderer.fboCache);const{resourceController:s}=this._renderer.view;this._workerHandle=new d(h(s)),this._frameTask=s.scheduler.registerTask(f.GAUSSIAN_SPLAT_SORTING)}get textureAtlas(){return this._textureAtlas}get orderTexture(){return this._orderTexture}get fadingTexture(){return this._fadingTexture}forEachTile(t){for(const e of this._latestUpdatedGaussianTiles)t(e)}updateGaussianVisibility(t,e){this._latestUpdatedGaussianTiles=t,this._requestedLyr3dVisibilityChange=e,this.requestSort()}get updating(){return this._updating.value}destroy(){this._sortAbortController=e(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 t=a()-this._lastSortStartTime,e=this._sortInterval-t;e<=0?this._startSortIfRequired():null==this._scheduledSortStartTimeout&&(this._scheduledSortStartTimeout=setTimeout(()=>{this._scheduledSortStartTimeout=null,this._pendingSortTask&&!this._isSorting&&this._scheduleSortStart()},e))}_startSortIfRequired(){if(this._isSorting||!this._pendingSortTask)return;const t=new AbortController;this._sortAbortController=t,this._isSorting=!0,this._pendingSortTask=!1,this._lastSortStartTime=a(),this._sortOnWorker(t.signal).finally(()=>{this._sortAbortController===t&&(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._orderTexture.clear(),this._textureAtlas.clear()}_computeExpandedCapacity(e,s){let i=Math.max(1,e);for(;i<s;)i=Math.ceil(i*t);return i}_ensureSortBufferCapacities(t){if(this._bufferCapacity<t){const e=this._computeExpandedCapacity(this._bufferCapacity,t);this._atlasIndicesBuffer=new Uint32Array(e),this._sortedAtlasIndicesBuffer=new Uint32Array(e),this._distancesBuffer=new Float64Array(e),this._bufferCapacity=e}}_clearAllBuffersAndTextures(){this._clearBuffersAndTextures(),this._latestSortedGaussianTiles.length=0,this._nextCommittedVisibleGaussianTiles.length=0,this._workerHandle?.clear()}async _sortOnWorker(t){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((t,e)=>t.obb.centerX-e.obb.centerX||t.obb.centerY-e.obb.centerY||t.obb.centerZ-e.obb.centerZ);const e=this._latestUpdatedGaussianTiles,s=e.length,i=this._requestedLyr3dVisibilityChange;let r=0;for(let t=0;t<s;t++)r+=e[t].gaussianCount;this._ensureSortBufferCapacities(r),this._textureAtlas.ensureTextureAtlas(),o(this._cameraDirectionNormalized,this._renderer.camera.ray.direction);const a=this._cameraDirectionNormalized[0],n=this._cameraDirectionNormalized[1],h=this._cameraDirectionNormalized[2];let d=0;const u=this._atlasIndicesBuffer,_=this._distancesBuffer,c=this._renderer.clippingBox,f=this._nextCommittedVisibleGaussianTiles;f.length=0;let m=0;for(let t=0;t<s;t++){const s=e[t],{gaussianAtlasIndices:i,relativePositions:r,obb:o}=s,S=s.gaussianCount;if(null!=c&&null!=s.boundingBox&&!l(s.boundingBox,c))continue;const{centerX:p,centerY:T,centerZ:g}=o;u.set(i,d),f[m++]=s;const b=a*p+n*T+h*g,C=d+S;for(let t=d,e=0;t<C;t++,e+=3){const s=r[e],i=r[e+1],o=r[e+2];_[t]=s*a+i*n+o*h+b}d=C}if(f.length=m,0===d)return this.visibleGaussians=0,this._clearAllBuffersAndTextures(),this._latestCompletedLyr3dVisibilityChange=i,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),void this._renderer.requestRender(1);const S={distances:this._distancesBuffer,atlasIndices:this._atlasIndicesBuffer,sortedAtlasIndices:this._sortedAtlasIndicesBuffer,numGaussians:d,preciseSort:this._useDeterministicSort},p=await(this._workerHandle?.sort(S,t));if(t.aborted)return;p&&(this._distancesBuffer=p.distances,this._atlasIndicesBuffer=p.atlasIndices,this._sortedAtlasIndicesBuffer=p.sortedAtlasIndices);const T=async t=>{this._orderTexture.setData(this._sortedAtlasIndicesBuffer,d);const e=this._latestSortedGaussianTiles;this._latestSortedGaussianTiles=f,this._nextCommittedVisibleGaussianTiles=e,this._latestCompletedLyr3dVisibilityChange=i,this.visibleGaussians=d,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),this._renderer.requestRender(1),t.madeProgress()};await this._frameTask.schedule(T,t)}catch(e){if(s(e))return}}set useDeterministicSort(t){this._useDeterministicSort=t}}export{m as GaussianSplatDataStore};
2
+ import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{abortMaybe as t}from"../../../../core/maybe.js";import{isAbortError as s}from"../../../../core/promiseUtils.js";import{signal as i}from"../../../../core/signal.js";import{Milliseconds as r,now as a}from"../../../../core/time.js";import{exactEquals as n,copy as o,normalize as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as u,exactEquals as d,intersects as _,copy as c}from"../../../../geometry/support/aaBoundingBox.js";import{makeScheduleFunction as p}from"../../layers/support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as f}from"../GaussianSplatWorkerHandle.js";import{GaussianSplatFadeTexture as m}from"./GaussianSplatFadeTexture.js";import{GaussianSplatOrderTexture as g}from"./GaussianSplatOrderTexture.js";import{GaussianSplatTextureAtlas as T}from"./GaussianSplatTextureAtlas.js";import{DepthRange as b}from"../../webgl-engine/lib/DepthRange.js";import{TaskPriority as S}from"../../../support/Scheduler.js";class C{constructor(e,t){this._updating=i(!1),this._useDeterministicSort=!1,this.visibleGaussians=0,this._visibleTileDepthRange=new b,this._previousVisibleTileDepthRangeEye=h(),this._previousVisibleTileDepthRangeViewForward=h(),this._previousVisibleTileDepthRangeClippingBox=u(),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=h(),this._frameTask=null,this._workerHandle=null,this._sortAbortController=null,this._isSorting=!1,this._pendingSortTask=!1,this._scheduledSortStartTimeout=null,this._lastSortStartTime=r(-1/0),this._sortInterval=r(80),this._renderer=e,this._onSortComplete=t,this._orderTexture=new g(this._renderer.renderingContext),this._fadingTexture=new m(this._renderer.renderingContext),this._textureAtlas=new T(this._renderer.renderingContext,this._renderer.view.resourceController.memoryController,this._renderer.fboCache);const{resourceController:s}=this._renderer.view;this._workerHandle=new f(p(s)),this._frameTask=s.scheduler.registerTask(S.GAUSSIAN_SPLAT_SORTING)}get textureAtlas(){return this._textureAtlas}get orderTexture(){return this._orderTexture}get fadingTexture(){return this._fadingTexture}queryVisibleTileDepthRange(e,t){if(0===this.visibleGaussians)return null;const{eye:s,viewForward:i}=e,r=s[0],a=s[1],l=s[2],h=i[0],u=i[1],p=i[2],f=this._visibleTileDepthRange;if(this._previousVisibleTileDepthRangeTilesVersion===this._latestSortedGaussianTilesVersion&&n(this._previousVisibleTileDepthRangeEye,s)&&n(this._previousVisibleTileDepthRangeViewForward,i)&&(null==t?!this._previousVisibleTileDepthRangeHasClippingBox:this._previousVisibleTileDepthRangeHasClippingBox&&d(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(!_(s,t))continue}const s=h*(e.obbCenterX-r)+u*(e.obbCenterY-a)+p*(e.obbCenterZ-l),i=e.paddedMbsRadius,o=s-i;o<m&&(m=o);const d=s+i;d>g&&(g=d)}const b=m<=g;return b?f.set(m,g):f.set(1/0,-1/0),this._previousVisibleTileDepthRangeTilesVersion=this._latestSortedGaussianTilesVersion,this._previousVisibleTileDepthRangeHasClippingBox=null!=t,o(this._previousVisibleTileDepthRangeEye,s),o(this._previousVisibleTileDepthRangeViewForward,i),null!=t&&c(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._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}}_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(),l(this._cameraDirectionNormalized,this._renderer.camera.ray.direction);const a=this._cameraDirectionNormalized[0],n=this._cameraDirectionNormalized[1],o=this._cameraDirectionNormalized[2];let h=0;const u=this._atlasIndicesBuffer,d=this._distancesBuffer,c=this._renderer.clippingBox,p=this._nextCommittedVisibleGaussianTiles;p.length=0;let f=0;for(let e=0;e<s;e++){const s=t[e],{gaussianAtlasIndices:i,relativePositions:r,obb:l}=s,m=s.gaussianCount;if(null!=c&&!_(s.boundingBox,c))continue;const{centerX:g,centerY:T,centerZ:b}=l;u.set(i,h),p[f++]=s;const S=a*g+n*T+o*b,C=h+m;for(let e=h,t=0;e<C;e++,t+=3){const s=r[t],i=r[t+1],l=r[t+2];d[e]=s*a+i*n+l*o+S}h=C}if(p.length=f,0===h)return this.visibleGaussians=0,this._clearAllBuffersAndTextures(),this._latestCompletedLyr3dVisibilityChange=i,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),void this._renderer.requestRender(1);const m={distances:this._distancesBuffer,atlasIndices:this._atlasIndicesBuffer,sortedAtlasIndices:this._sortedAtlasIndicesBuffer,numGaussians:h,preciseSort:this._useDeterministicSort},g=await(this._workerHandle?.sort(m,e));if(e.aborted)return;g&&(this._distancesBuffer=g.distances,this._atlasIndicesBuffer=g.atlasIndices,this._sortedAtlasIndicesBuffer=g.sortedAtlasIndices);const T=async e=>{this._orderTexture.setData(this._sortedAtlasIndicesBuffer,h);const t=this._latestSortedGaussianTiles;this._latestSortedGaussianTiles=p,this._nextCommittedVisibleGaussianTiles=t,this._latestSortedGaussianTilesVersion++,this._latestCompletedLyr3dVisibilityChange=i,this.visibleGaussians=h,this._onSortComplete(this._latestSortedGaussianTiles,this._latestCompletedLyr3dVisibilityChange),this._renderer.requestRender(1),e.madeProgress()};await this._frameTask.schedule(T,e)}catch(t){if(s(t))return}}set useDeterministicSort(e){this._useDeterministicSort=e}}export{C as GaussianSplatDataStore};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{subtract as t,length as i,scale as e,negate as s,dot as n,transformQuatValues as o,set as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l,fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{set as c}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{project as u}from"../../../../geometry/projectionUtils.js";import{intersects as d,contains as p}from"../../../../geometry/support/aaBoundingBox.js";import{fromExtent as m}from"../../../../geometry/support/aaBoundingRect.js";import{create as f}from"../../../../geometry/support/plane.js";import{fromPoints as h}from"../../../../geometry/support/ray.js";import{GaussianSplatTarget as g}from"../../layers/i3s/Intersector.js";import{createTileBVH as y}from"../../layers/support/Tiles3DBVH.js";import{ElevationRange as w}from"../ElevationRange.js";import{IntersectorResult as b}from"../../webgl-engine/lib/IntersectorResult.js";class v{constructor(t){this.layerView=t,this.type=0,this.slicePlaneEnabled=!1,this.isGround=!1,this._ellipsoidLocalRayOrigin=l(),this._ellipsoidLocalRayDir=l(),this.intersectionNormal=l(),this.intersectionRayDir=l(),this.intersectionPlane=f(),this.layerViewUid=t.uid;const i=t.view.viewingMode,e=(t.useEsriCrs?t.fullExtentInLocalViewSpatialReference:t.layer.fullExtent?u(t.layer.fullExtent,t.view.renderSpatialReference):void 0)??t.view.extent,s=m(e);this._bvh=y(i,s)}destroy(){this._bvh.destroy()}addTile(t){this._bvh.addTile(t)}removeTile(t){this._bvh.removeTile(t)}intersect(o,l,u,m,f,y){const{intersectionRayDir:w,intersectionPlane:v,layerViewUid:_,intersectionNormal:j}=this,E=h(u,m);t(w,m,u);const S=1/i(w);e(w,w,S),s(j,w),c(v,w[0],w[1],w[2],-n(w,u));const V=new x,k=new x,T=o.options.store,B=0===T,D=!B,P=2===T,U=P?new Array:null,I=(t,i,e,s,n)=>(t.point=t.point?r(t.point,e,s,n):a(e,s,n),t.dist=i,t.normal=j,t.layerViewUid=_,t),L=u[0],M=u[1],G=u[2],q=w[0],C=w[1],A=w[2],N=this.layerView.clippingBox,O=t=>{const{relativePositions:i,packedRotations:e,packedScales:s,gaussianCount:n,obb:o,maxScaleSquared:r}=t,a=o.centerX,c=o.centerY,d=o.centerZ,p=N[0],f=N[1],h=N[2],g=N[3],y=N[4],w=N[5];for(let b=0,v=0;b<n;b++,v+=3){const t=i[v]+a,n=i[v+1]+c,o=i[v+2]+d;if(t<p||n<f||o<h||t>g||n>y||o>w)continue;const R=t-L,_=n-M,j=o-G,E=R*q+_*C+j*A;if(E<0)continue;if(R*R+_*_+j*j-E*E>r)continue;const T=E*S;if(B&&null!=V.dist&&T>=V.dist)continue;if((l?.(u,m,T)??!0)&&(this._intersectsGaussianEllipsoid(R,_,j,q,C,A,e[b],s[b])&&((null==V.dist||T<V.dist)&&I(V,T,t,n,o),D&&(null==k.dist||T>k.dist)&&I(k,T,t,n,o),P))){const i=new x;U.push(I(i,T,t,n,o))}}},X=t=>{const{relativePositions:i,packedRotations:e,packedScales:s,gaussianCount:n,obb:o,maxScaleSquared:r}=t,a=o.centerX,c=o.centerY,d=o.centerZ,p=L-a,f=M-c,h=G-d;for(let g=0,y=0;g<n;g++,y+=3){const t=i[y]-p,n=i[y+1]-f,o=i[y+2]-h,a=t*q+n*C+o*A;if(a<0)continue;if(t*t+n*n+o*o-a*a>r)continue;const c=a*S;if(B&&null!=V.dist&&c>=V.dist)continue;if(!(l?.(u,m,c)??!0))continue;if(!this._intersectsGaussianEllipsoid(t,n,o,q,C,A,e[g],s[g]))continue;const d=t+L,w=n+M,b=o+G;if((null==V.dist||c<V.dist)&&I(V,c,d,w,b),D&&(null==k.dist||c>k.dist)&&I(k,c,d,w,b),P){const t=new x;U.push(I(t,c,d,w,b))}}},Y=(t,i)=>{const{min:e,max:s}=t.obb.signedDistanceRangePlane(v);if(s<0)return;const n=e*S;if(!(B&&null!=V.dist&&V.dist<n)){if(null!=V.dist&&null!=k.dist){const t=s*S;if(V.dist<n&&k.dist>t)return}i?O(t):X(t)}},Z=t=>{Y(t,!1)},F=t=>{const i=t.boundingBox;null!=i&&d(i,N)&&Y(t,!p(N,i))};this._bvh.forEachTileIntersectingRay(u,m,null!=N?F:Z,y);const H=(t,i)=>{const{layerViewUid:e}=i,s=new g(i.point,e);t.set(0,s,i.dist,i.normal)};if(R(V)){const t=o.results.min;(null==t.distance||V.dist<t.distance)&&H(t,V)}if(R(k)&&D){const t=o.results.max;(null==t.distance||k.dist>t.distance)&&H(t,k)}if(P&&U?.length)for(const t of U){const i=new b(E);H(i,t),o.results.all.push(i)}}_intersectsGaussianEllipsoid(t,i,e,s,n,r,l,a){const c=l>>>30,u=1023&l,d=l>>>10&1023,p=l>>>20&1023,m=(u&_)*j*(1-2*(u>>>9&1)),f=(d&_)*j*(1-2*(d>>>9&1)),h=(p&_)*j*(1-2*(p>>>9&1));let g,y,w,b;const v=m*m+f*f+h*h,R=Math.sqrt(Math.max(0,1-v));switch(c){case 0:g=R,y=h,w=f,b=m;break;case 1:g=h,y=R,w=f,b=m;break;case 2:g=h,y=f,w=R,b=m;break;default:g=h,y=f,w=m,b=R}const x=this._ellipsoidLocalRayOrigin;x[0]=-t,x[1]=-i,x[2]=-e,o(x,x,-g,-y,-w,b);const E=this._ellipsoidLocalRayDir;E[0]=s,E[1]=n,E[2]=r,o(E,E,-g,-y,-w,b);const V=S[255&a],k=S[a>>>8&255],T=S[a>>>16],B=x[0]*V,D=x[1]*k,P=x[2]*T,U=B*B+D*D+P*P;if(U<=1)return!0;const I=E[0]*V,L=E[1]*k,M=E[2]*T,G=B*I+D*L+P*M;return!(G>0)&&G*G>=(I*I+L*L+M*M)*(U-1)}getElevationRange(t){return this._bvh.getElevationRangeIntersectingSphere(t)??new w(0,0)}}function R(t){return null!=t.dist&&null!=t.point}class x{constructor(){this.point=null,this.dist=null,this.normal=null,this.layerViewUid=""}}const _=511,j=Math.SQRT1_2/_,E=3,S=(()=>{const t=new Float64Array(256);for(let i=0;i<t.length;i++)t[i]=Math.exp(10-i/16)/E;return t})();export{v as GaussianSplatIntersectionHandler};
2
+ import{subtract as t,length as i,scale as e,negate as s,dot as n,transformQuatValues as o,set as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l,fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{set as c}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{project as u}from"../../../../geometry/projectionUtils.js";import{intersects as d,contains as p}from"../../../../geometry/support/aaBoundingBox.js";import{fromExtent as m}from"../../../../geometry/support/aaBoundingRect.js";import{create as f}from"../../../../geometry/support/plane.js";import{fromPoints as h}from"../../../../geometry/support/ray.js";import{GaussianSplatTarget as g}from"../../layers/i3s/Intersector.js";import{createTileBVH as y}from"../../layers/support/Tiles3DBVH.js";import{ElevationRange as w}from"../ElevationRange.js";import{IntersectorResult as b}from"../../webgl-engine/lib/IntersectorResult.js";class v{constructor(t){this.layerView=t,this.type=0,this.slicePlaneEnabled=!1,this.isGround=!1,this._ellipsoidLocalRayOrigin=l(),this._ellipsoidLocalRayDir=l(),this.intersectionNormal=l(),this.intersectionRayDir=l(),this.intersectionPlane=f(),this.layerViewUid=t.uid;const i=t.view.viewingMode,e=(t.useEsriCrs?t.fullExtentInLocalViewSpatialReference:t.layer.fullExtent?u(t.layer.fullExtent,t.view.renderSpatialReference):void 0)??t.view.extent,s=m(e);this._bvh=y(i,s)}destroy(){this._bvh.destroy()}addTile(t){this._bvh.addTile(t)}removeTile(t){this._bvh.removeTile(t)}intersect(o,l,u,m,f,y){const{intersectionRayDir:w,intersectionPlane:v,layerViewUid:_,intersectionNormal:j}=this,E=h(u,m);t(w,m,u);const S=1/i(w);e(w,w,S),s(j,w),c(v,w[0],w[1],w[2],-n(w,u));const V=new x,k=new x,T=o.options.store,B=0===T,D=!B,P=2===T,U=P?new Array:null,I=(t,i,e,s,n)=>(t.point=t.point?r(t.point,e,s,n):a(e,s,n),t.dist=i,t.normal=j,t.layerViewUid=_,t),L=u[0],M=u[1],G=u[2],q=w[0],C=w[1],A=w[2],N=this.layerView.clippingBox,O=t=>{const{relativePositions:i,packedRotations:e,packedScales:s,gaussianCount:n,obb:o,maxScaleSquared:r}=t,a=o.centerX,c=o.centerY,d=o.centerZ,p=N[0],f=N[1],h=N[2],g=N[3],y=N[4],w=N[5];for(let b=0,v=0;b<n;b++,v+=3){const t=i[v]+a,n=i[v+1]+c,o=i[v+2]+d;if(t<p||n<f||o<h||t>g||n>y||o>w)continue;const R=t-L,_=n-M,j=o-G,E=R*q+_*C+j*A;if(E<0)continue;if(R*R+_*_+j*j-E*E>r)continue;const T=E*S;if(B&&null!=V.dist&&T>=V.dist)continue;if((l?.(u,m,T)??!0)&&(this._intersectsGaussianEllipsoid(R,_,j,q,C,A,e[b],s[b])&&((null==V.dist||T<V.dist)&&I(V,T,t,n,o),D&&(null==k.dist||T>k.dist)&&I(k,T,t,n,o),P))){const i=new x;U.push(I(i,T,t,n,o))}}},X=t=>{const{relativePositions:i,packedRotations:e,packedScales:s,gaussianCount:n,obb:o,maxScaleSquared:r}=t,a=o.centerX,c=o.centerY,d=o.centerZ,p=L-a,f=M-c,h=G-d;for(let g=0,y=0;g<n;g++,y+=3){const t=i[y]-p,n=i[y+1]-f,o=i[y+2]-h,a=t*q+n*C+o*A;if(a<0)continue;if(t*t+n*n+o*o-a*a>r)continue;const c=a*S;if(B&&null!=V.dist&&c>=V.dist)continue;if(!(l?.(u,m,c)??!0))continue;if(!this._intersectsGaussianEllipsoid(t,n,o,q,C,A,e[g],s[g]))continue;const d=t+L,w=n+M,b=o+G;if((null==V.dist||c<V.dist)&&I(V,c,d,w,b),D&&(null==k.dist||c>k.dist)&&I(k,c,d,w,b),P){const t=new x;U.push(I(t,c,d,w,b))}}},Y=(t,i)=>{const{min:e,max:s}=t.obb.signedDistanceRangePlane(v);if(s<0)return;const n=e*S;if(!(B&&null!=V.dist&&V.dist<n)){if(null!=V.dist&&null!=k.dist){const t=s*S;if(V.dist<n&&k.dist>t)return}i?O(t):X(t)}},Z=t=>{Y(t,!1)},F=t=>{const i=t.boundingBox;d(i,N)&&Y(t,!p(N,i))};this._bvh.forEachTileIntersectingRay(u,m,null!=N?F:Z,y);const H=(t,i)=>{const{layerViewUid:e}=i,s=new g(i.point,e);t.set(0,s,i.dist,i.normal)};if(R(V)){const t=o.results.min;(null==t.distance||V.dist<t.distance)&&H(t,V)}if(R(k)&&D){const t=o.results.max;(null==t.distance||k.dist>t.distance)&&H(t,k)}if(P&&U?.length)for(const t of U){const i=new b(E);H(i,t),o.results.all.push(i)}}_intersectsGaussianEllipsoid(t,i,e,s,n,r,l,a){const c=l>>>30,u=1023&l,d=l>>>10&1023,p=l>>>20&1023,m=(u&_)*j*(1-2*(u>>>9&1)),f=(d&_)*j*(1-2*(d>>>9&1)),h=(p&_)*j*(1-2*(p>>>9&1));let g,y,w,b;const v=m*m+f*f+h*h,R=Math.sqrt(Math.max(0,1-v));switch(c){case 0:g=R,y=h,w=f,b=m;break;case 1:g=h,y=R,w=f,b=m;break;case 2:g=h,y=f,w=R,b=m;break;default:g=h,y=f,w=m,b=R}const x=this._ellipsoidLocalRayOrigin;x[0]=-t,x[1]=-i,x[2]=-e,o(x,x,-g,-y,-w,b);const E=this._ellipsoidLocalRayDir;E[0]=s,E[1]=n,E[2]=r,o(E,E,-g,-y,-w,b);const V=S[255&a],k=S[a>>>8&255],T=S[a>>>16],B=x[0]*V,D=x[1]*k,P=x[2]*T,U=B*B+D*D+P*P;if(U<=1)return!0;const I=E[0]*V,L=E[1]*k,M=E[2]*T,G=B*I+D*L+P*M;return!(G>0)&&G*G>=(I*I+L*L+M*M)*(U-1)}getElevationRange(t){return this._bvh.getElevationRangeIntersectingSphere(t)??new w(0,0)}}function R(t){return null!=t.dist&&null!=t.point}class x{constructor(){this.point=null,this.dist=null,this.normal=null,this.layerViewUid=""}}const _=511,j=Math.SQRT1_2/_,E=3,S=(()=>{const t=new Float64Array(256);for(let i=0;i<t.length;i++)t[i]=Math.exp(10-i/16)/E;return t})();export{v as GaussianSplatIntersectionHandler};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{estimateNumberArrayMemory as t}from"../../../../core/memoryEstimations.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as e}from"../../../../geometry/support/aaBoundingBox.js";import{splatPageSizeInU32 as i}from"./GaussianSplatAtlasPages.js";class o{constructor(o,n,r,a,h,b,c,u,d,l){this.handle=o,this.obb=n,this.gaussianAtlasIndices=r,this.pageIds=a,this.relativePositions=h,this.packedRotations=b,this.packedScales=c,this.gaussianCount=u,this.maxScaleSquared=d,this.elevationRange=l,this.bvhIntersectionGeneration=0,this.lifecycleState=0,this.fadeDirection=0,this.opacityModifier=0,this.boundingBox=null,this.usedMemory=t(this.gaussianAtlasIndices,this.relativePositions,this.packedRotations,this.packedScales)+this.pageIds.length*i*4;const f=s();n.getCenter(f),this._obbCenterX=f[0],this._obbCenterY=f[1],this._obbCenterZ=f[2];const m=n.radius??-1;this._obbRadius=m;const g=m<0?-1:m*m;this._obbRadiusSquared=g;const p=n.halfSize;this._obbShortestHalfsize=p?Math.min(p[0],p[1],p[2]):0;const _=e();n.toAaBoundingBox(_),this.boundingBox=_}boundingVolumeIntersectsRay(t,s){if(!this.obb)return!0;const{_obbCenterX:e,_obbCenterY:i,_obbCenterZ:o}=this,n=e-t[0],r=i-t[1],a=o-t[2],h=n*s[0]+r*s[1]+a*s[2],b=n*n+r*r+a*a-h*h;return(this._obbRadiusSquared<0||b<=this._obbRadiusSquared)&&this.obb.intersectRay(t,s)}boundingVolumeIntersectsSphere(t){const s=this._obbRadius;if(s<0)return!0;const e=t.center,i=t.radius,o=s+i,n=this._obbCenterX-e[0];if(n>o)return!1;const r=this._obbCenterY-e[1];if(r>o)return!1;const a=this._obbCenterZ-e[2];if(a>o)return!1;const h=n*n+r*r+a*a;if(h>o*o)return!1;if(h<=(this._obbShortestHalfsize+i)**2)return!0;return Math.sqrt(h)+s<=i||(this.obb?.intersectSphere(t)??!0)}}export{o as GaussianTile};
2
+ import{estimateNumberArrayMemory as t}from"../../../../core/memoryEstimations.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as e,diameter as i}from"../../../../geometry/support/aaBoundingBox.js";import{splatPageSizeInU32 as o}from"./GaussianSplatAtlasPages.js";class r{constructor(r,n,a,h,b,c,u,d,m,l){this.handle=r,this.obb=n,this.gaussianAtlasIndices=a,this.pageIds=h,this.relativePositions=b,this.packedRotations=c,this.packedScales=u,this.gaussianCount=d,this.maxScaleSquared=m,this.elevationRange=l,this.bvhIntersectionGeneration=0,this.lifecycleState=0,this.fadeDirection=0,this.opacityModifier=0,this.usedMemory=t(this.gaussianAtlasIndices,this.relativePositions,this.packedRotations,this.packedScales)+this.pageIds.length*o*4;const f=s();n.getCenter(f),this.obbCenterX=f[0],this.obbCenterY=f[1],this.obbCenterZ=f[2];const p=n.radius??-1;this._mbsRadius=p;const g=p<0?-1:p*p;this._mbsRadiusSquared=g;const S=n.halfSize;this._obbShortestHalfsize=S?Math.min(S[0],S[1],S[2]):0;const C=e();n.toAaBoundingBox(C),this.boundingBox=C;const R=p>=0?p:.5*i(C);this.paddedMbsRadius=R+Math.sqrt(Math.max(0,m))}boundingVolumeIntersectsRay(t,s){if(!this.obb)return!0;const{obbCenterX:e,obbCenterY:i,obbCenterZ:o}=this,r=e-t[0],n=i-t[1],a=o-t[2],h=r*s[0]+n*s[1]+a*s[2],b=r*r+n*n+a*a-h*h;return(this._mbsRadiusSquared<0||b<=this._mbsRadiusSquared)&&this.obb.intersectRay(t,s)}boundingVolumeIntersectsSphere(t){const s=this._mbsRadius;if(s<0)return!0;const e=t.center,i=t.radius,o=s+i,r=this.obbCenterX-e[0];if(r>o)return!1;const n=this.obbCenterY-e[1];if(n>o)return!1;const a=this.obbCenterZ-e[2];if(a>o)return!1;const h=r*r+n*n+a*a;if(h>o*o)return!1;if(h<=(this._obbShortestHalfsize+i)**2)return!0;return Math.sqrt(h)+s<=i||(this.obb?.intersectSphere(t)??!0)}}export{r as GaussianTile};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- function e(e){switch(e.type){case"building-scene":case"catalog":case"catalog-dynamic-group":case"catalog-footprint":case"csv":case"dimension":case"feature":case"gaussian-splat":case"geo-rss":case"geojson":case"graphics":case"group":case"integrated-mesh":case"integrated-mesh-3dtiles":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-notes":case"ogc-feature":case"oriented-imagery":case"point-cloud":case"route":case"scene":case"stream":case"viewshed":case"voxel":case"subtype-group":case"unknown":case"unsupported":case"wfs":case"parquet":case null:case"imagery":case"imagery-tile":return!1;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"elevation":case"map-image":case"media":case"open-street-map":case"tile":case"vector-tile":case"video":case"wcs":case"web-tile":case"wms":case"wmts":return!0;default:return e.type,!1}}export{e as isTerrainSurfaceLayer};
2
+ function e(e){switch(e.type){case"building-scene":case"catalog":case"catalog-dynamic-group":case"catalog-footprint":case"csv":case"dimension":case"dimension-feature":case"feature":case"gaussian-splat":case"geo-rss":case"geojson":case"graphics":case"group":case"integrated-mesh":case"integrated-mesh-3dtiles":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-notes":case"ogc-feature":case"oriented-imagery":case"point-cloud":case"route":case"scene":case"stream":case"viewshed":case"voxel":case"subtype-group":case"unknown":case"unsupported":case"wfs":case"parquet":case null:case"imagery":case"imagery-tile":return!1;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"elevation":case"map-image":case"media":case"open-street-map":case"tile":case"vector-tile":case"video":case"wcs":case"web-tile":case"wms":case"wmts":return!0;default:return e.type,!1}}export{e as isTerrainSurfaceLayer};
@@ -97,6 +97,8 @@ export interface LayerView3DMap {
97
97
  wms: never;
98
98
  /** @since 5.0 */
99
99
  wmts: never;
100
+ /** @since 5.1 */
101
+ "dimension-feature": never;
100
102
  /** @since 5.0 */
101
103
  "geo-rss": never;
102
104
  /** @since 5.0 */
@@ -1,31 +1,18 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ForwardLinearDepthToReadShadowMap as o}from"../ForwardLinearDepthToReadShadowMap.glsl.js";import{calculateUVZShadowPass as e,calculateUVZShadowDraw as t,ReadShadowMapOrigin as d}from"./calculateUVZShadow.glsl.js";import{ShadowmapFiltering as r}from"./ShadowmapFiltering.glsl.js";import{BooleanBindUniform as i}from"../../shaderModules/BooleanBindUniform.js";import{FloatBindUniform as n}from"../../shaderModules/FloatBindUniform.js";import{If as l,glsl as h}from"../../shaderModules/glsl.js";import{Texture2DBindUniform as s}from"../../shaderModules/Texture2DBindUniform.js";import{Texture2DShadowBindUniform as w}from"../../shaderModules/Texture2DShadowBindUniform.js";import{NoParameters as c}from"../../../../../webgl/NoParameters.js";class u extends d{}class f extends c{constructor(){super(...arguments),this.origin=a()}}function g(a,o){o.receiveShadows&&a.fragment.include(e),S(a,o)}function p(a,o){o.receiveShadows&&a.fragment.include(t),S(a,o)}function m(a,o){o.receiveShadows&&a.vertex.include(e),v(a,o)}function S(a,e){a.fragment.uniforms.add(new n("lightingGlobalFactor",a=>a.lighting.globalFactor));const{hasShadowHighlights:t,receiveShadows:d,spherical:r}=e;a.include(o,e),d&&M(a.fragment,t),a.fragment.code.add(h`
2
+ import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ForwardLinearDepthToReadShadowMap as o}from"../ForwardLinearDepthToReadShadowMap.glsl.js";import{calculateUVZShadowPass as e,calculateUVZShadowDraw as t,ReadShadowMapOrigin as r}from"./calculateUVZShadow.glsl.js";import{ShadowmapFiltering as d}from"./ShadowmapFiltering.glsl.js";import{FloatBindUniform as i}from"../../shaderModules/FloatBindUniform.js";import{If as n,glsl as s}from"../../shaderModules/glsl.js";import{Texture2DBindUniform as l}from"../../shaderModules/Texture2DBindUniform.js";import{Texture2DShadowBindUniform as h}from"../../shaderModules/Texture2DShadowBindUniform.js";import{NoParameters as c}from"../../../../../webgl/NoParameters.js";class u extends r{}class w extends c{constructor(){super(...arguments),this.origin=a()}}function f(a,o){o.receiveShadows&&a.fragment.include(e),g(a,o)}function m(a,o){o.receiveShadows&&a.fragment.include(t),g(a,o)}function g(a,e){a.fragment.uniforms.add(new i("lightingGlobalFactor",a=>a.lighting.globalFactor));const{hasShadowHighlights:t,receiveShadows:r,spherical:d}=e;a.include(o,e),r&&p(a.fragment,t),a.fragment.code.add(s`
3
3
  float readShadow(float additionalAmbientScale, vec3 vpos) {
4
- return ${d?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":l(r,"lightingGlobalFactor * (1.0 - additionalAmbientScale)","0.0")};
4
+ return ${r?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":n(d,"lightingGlobalFactor * (1.0 - additionalAmbientScale)","0.0")};
5
5
  }
6
- `)}function v(a,o){a.vertex.uniforms.add(new n("lightingGlobalFactor",a=>a.lighting.globalFactor));const{receiveShadows:e,spherical:t}=o;e&&x(a.vertex),a.vertex.code.add(h`
7
- float readShadowVertex(float additionalAmbientScale, vec3 vpos, float linearDepth) {
8
- return ${e?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":l(t,"lightingGlobalFactor * (1.0 - additionalAmbientScale)","0.0")};
9
- }
10
- `)}function M(a,o){F(a,o),b(a)}function x(a){z(a),b(a)}function b(a){a.code.add(h`float readShadowMap(const in vec3 _worldPos, float _linearDepth) {
6
+ `)}function p(a,o){v(a,o),S(a)}function S(a){a.code.add(s`float readShadowMap(const in vec3 _worldPos, float _linearDepth) {
11
7
  vec3 uvzShadow = calculateUVZShadow(_worldPos, _linearDepth, textureSize(shadowMap, 0));
12
8
  return readShadowMaps(uvzShadow);
13
- }`)}function F(a,o){a.include(r),a.uniforms.add(j()),o&&a.uniforms.add(new s("shadowHighlight",({shadowHighlight:a})=>a?.getTexture())),a.code.add(h`
9
+ }`)}function v(a,o){a.include(d),a.uniforms.add(M()),o&&a.uniforms.add(new l("shadowHighlight",({shadowHighlight:a})=>a?.getTexture())),a.code.add(s`
14
10
  float readShadowMaps(const in vec3 uvzShadow) {
15
11
  if (uvzShadow.z < 0.0) {
16
12
  return 0.0;
17
13
  }
18
14
 
19
15
  float shadow1 = readShadowMapUVZ(uvzShadow, shadowMap);
20
- ${l(o,"float shadow2 = texelFetch(shadowHighlight, ivec2(gl_FragCoord.xy), 0).r;\n return shadow1 > shadow2 ? shadow1 : shadow2;","return shadow1;")}
16
+ ${n(o,"float shadow2 = texelFetch(shadowHighlight, ivec2(gl_FragCoord.xy), 0).r;\n return shadow1 > shadow2 ? shadow1 : shadow2;","return shadow1;")}
21
17
  }
22
- `)}function z(a){a.include(r),a.uniforms.add(new i("singleShadowMap",({shadowMap:a})=>!!a.getOutput(5)),j(),new w("shadowMapHighlight",({shadowMap:a})=>a.getOutput(5)??a.getOutput(6))).code.add(h`float readShadowMaps(const in vec3 uvzShadow) {
23
- if (uvzShadow.z < 0.0) {
24
- return 0.0;
25
- }
26
- float shadow1 = readShadowMapUVZ(uvzShadow, shadowMap);
27
- if (singleShadowMap)
28
- return shadow1;
29
- float shadow2 = readShadowMapUVZ(uvzShadow, shadowMapHighlight);
30
- return shadow1 > shadow2 ? shadow1 : shadow2;
31
- }`)}function j(){return new w("shadowMap",({shadowMap:a})=>a.getOutput(5)??a.getOutput(7))}export{p as ReadShadowMapDrawFragment,u as ReadShadowMapDrawParameters,g as ReadShadowMapPassFragment,f as ReadShadowMapPassParameters,m as ReadShadowMapPassVertex,F as readShadowMapsFragment};
18
+ `)}function M(){return new h("shadowMap",({shadowMap:a})=>a.getOutput(5)??a.getOutput(7))}export{m as ReadShadowMapDrawFragment,u as ReadShadowMapDrawParameters,f as ReadShadowMapPassFragment,w as ReadShadowMapPassParameters,v as readShadowMapsFragment};
@@ -58,7 +58,7 @@ import{ReadDepth as e}from"../output/ReadDepth.glsl.js";import{Float2BindUniform
58
58
  vec2 projectedStep = clampedRayMarchDistance * projectedCoordDirection / (rayMarchMaxSteps * projectedCoordDirectionLength);
59
59
 
60
60
  // Normalize the homogeneous camera space coordinates
61
- vec3 homogeneousStep = clampedRayMarchDistance * (homogeneousEnd - homogeneousStart) / (rayMarchMaxSteps * projectedCoordDirectionLength);
61
+ vec3 homogeneousStep = clampedRayMarchDistance * (homogeneousEnd - homogeneousStart) / (rayMarchMaxSteps * projectedCoordDirectionLength);
62
62
  float inverseWStep = clampedRayMarchDistance * (inverseWEnd - inverseWStart) / (rayMarchMaxSteps * projectedCoordDirectionLength);
63
63
 
64
64
  // initialize the variables for ray marching
@@ -5,16 +5,16 @@ vec3(scale.x, 0.0, 0.0),
5
5
  vec3(0.0, scale.y, 0.0),
6
6
  vec3(0.0, 0.0, scale.z)
7
7
  );
8
- mat3 M = scaleMatrix * rotation;
9
- mat3 covariance3D = transpose(M) * M;
8
+ mat3 scaledRotation = scaleMatrix * rotation;
9
+ mat3 covariance3D = transpose(scaledRotation) * scaledRotation;
10
10
  covarianceA = vec3(covariance3D[0][0], covariance3D[0][1], covariance3D[0][2]);
11
11
  covarianceB = vec3(covariance3D[1][1], covariance3D[1][2], covariance3D[2][2]);
12
12
  }
13
- vec3 computeCovariance2D(vec3 center, float focalLength, vec2 tanFov, float[6] cov3D, mat4 view) {
14
- vec4 viewSpacePoint = vec4(center, 1);
15
- vec2 max = 1.3 * tanFov;
13
+ vec3 computeGaussianCovariance2D(vec3 viewSpaceCenter, float focalLength, vec2 tanFov, float[6] cov3D, mat4 view) {
14
+ vec4 viewSpacePoint = vec4(viewSpaceCenter, 1);
15
+ vec2 clampLimit = 1.3 * tanFov;
16
16
  vec2 normalized = viewSpacePoint.xy / viewSpacePoint.z;
17
- viewSpacePoint.xy = clamp(normalized, -max, max) * viewSpacePoint.z;
17
+ viewSpacePoint.xy = clamp(normalized, -clampLimit, clampLimit) * viewSpacePoint.z;
18
18
  float invZ = 1.0 / viewSpacePoint.z;
19
19
  float invZSquared = invZ * invZ;
20
20
  mat3 projectionJacobian = mat3(
@@ -23,15 +23,21 @@ focalLength * invZ, 0.0, -(focalLength * viewSpacePoint.x) *
23
23
  0.0, 0.0, 0.0
24
24
  );
25
25
  mat3 worldToView = transpose(mat3(view));
26
- mat3 T = worldToView * projectionJacobian;
26
+ mat3 covarianceProjection = worldToView * projectionJacobian;
27
27
  mat3 covariance3D = mat3(
28
28
  cov3D[0], cov3D[1], cov3D[2],
29
29
  cov3D[1], cov3D[3], cov3D[4],
30
30
  cov3D[2], cov3D[4], cov3D[5]
31
31
  );
32
- mat3 covariance2D = transpose(T) * transpose(covariance3D) * T;
32
+ mat3 covariance2D = transpose(covarianceProjection) * transpose(covariance3D) * covarianceProjection;
33
33
  const float regularization = 0.3;
34
34
  covariance2D[0][0] += regularization;
35
35
  covariance2D[1][1] += regularization;
36
36
  return vec3(covariance2D[0][0], covariance2D[0][1], covariance2D[1][1]);
37
- }`)}export{c as ComputeCovariance};
37
+ }
38
+ void computePackedGaussianCovariance3D(uvec4 packedGaussian, out vec3 covarianceA, out vec3 covarianceB) {
39
+ vec3 scale = unpackScale(packedGaussian);
40
+ vec4 quaternion = unpackQuaternion(packedGaussian);
41
+ mat3 rotation = quaternionToRotationMatrix(quaternion);
42
+ computeCovariance3D(rotation, scale.xyz, covarianceA, covarianceB);
43
+ }`)}export{c as GaussianSplatCovariance};
@@ -0,0 +1,43 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{glsl as e}from"../../shaderModules/glsl.js";function a(a){a.code.add(e`float computeGaussianCovarianceDeterminant(vec3 covariance2D) {
3
+ return covariance2D.x * covariance2D.z - covariance2D.y * covariance2D.y;
4
+ }
5
+ vec2 computeGaussianCovarianceEigenvalues(vec3 covariance2D) {
6
+ float mid = 0.5 * (covariance2D.x + covariance2D.z);
7
+ float radius = length(vec2((covariance2D.x - covariance2D.z) * 0.5, covariance2D.y));
8
+ return vec2(mid + radius, mid - radius);
9
+ }
10
+ vec2 computeGaussianAxisLengths(vec2 eigenvalues, float gaussianEllipseThreshold) {
11
+ return ceil(sqrt(eigenvalues * gaussianEllipseThreshold));
12
+ }
13
+ float computeGaussianEllipseThreshold(float gaussianLogAlphaCutoff) {
14
+ return max(0.0, -2.0 * gaussianLogAlphaCutoff);
15
+ }
16
+ bool rejectGaussianByMinimumRadius(float maxRadius, float opacity, float minSplatRadius) {
17
+ return minSplatRadius > 0.0 && maxRadius * opacity < minSplatRadius;
18
+ }
19
+ bool rejectGaussianByScreenBounds(vec2 ndcPosition, float maxRadius, vec2 clipSpacePixelScale) {
20
+ vec2 radiusNDC = maxRadius * clipSpacePixelScale;
21
+ return any(greaterThan(abs(ndcPosition) - radiusNDC, vec2(1.0)));
22
+ }
23
+ vec2 computeGaussianMajorAxisDirection(vec3 covariance2D, float majorEigenvalue) {
24
+ return normalize(vec2(covariance2D.y, majorEigenvalue - covariance2D.x));
25
+ }
26
+ vec2 computeGaussianUnitQuadCorner(int vertexID) {
27
+ return vec2((vertexID << 1) & 2, vertexID & 2) - 1.0;
28
+ }
29
+ vec2 computeGaussianQuadOffset(vec3 covariance2D, vec2 eigenvalues, vec2 axisLengths, int vertexID) {
30
+ vec2 majorAxisDirection = computeGaussianMajorAxisDirection(covariance2D, eigenvalues.x);
31
+ vec2 majorAxis = axisLengths.x * majorAxisDirection;
32
+ vec2 minorAxis = axisLengths.y * vec2(majorAxisDirection.y, -majorAxisDirection.x);
33
+ vec2 corner = computeGaussianUnitQuadCorner(vertexID);
34
+ return corner.x * majorAxis + corner.y * minorAxis;
35
+ }
36
+ vec3 computeGaussianConic(vec3 covariance2D, float determinant) {
37
+ return vec3(covariance2D.z, -covariance2D.y, covariance2D.x) * (1.0 / determinant);
38
+ }
39
+ float evaluateGaussianExponent(vec3 conic, vec2 offsetFromCenter) {
40
+ float x = offsetFromCenter.x;
41
+ float y = offsetFromCenter.y;
42
+ return -0.5 * dot(conic, vec3(x * x, 2.0 * x * y, y * y));
43
+ }`)}export{a as GaussianSplatEvaluation};
@@ -0,0 +1,36 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{splatAtlasTextureWidth as e,elementsPerSplatPage as a}from"../../../../support/gaussianSplatting/GaussianSplatAtlasPages.js";import{glsl as n}from"../../shaderModules/glsl.js";function i(e){e.code.add(n`
3
+ uint fetchOrderedGaussianIndex(uint instanceID) {
4
+ uint orderTextureWidth = uint(textureSize(splatOrderTexture, 0).x);
5
+ uint x = instanceID % orderTextureWidth;
6
+ uint y = instanceID / orderTextureWidth;
7
+
8
+ return texelFetch(splatOrderTexture, ivec2(x, y), 0).r;
9
+ }
10
+
11
+ uvec4 fetchPackedGaussian(uint gaussianIndex) {
12
+ uint gaussianIndexX = gaussianIndex & ${t}u;
13
+ uint gaussianIndexY = gaussianIndex >> ${s}u;
14
+
15
+ return texelFetch(splatAtlasTexture, ivec2(gaussianIndexX, gaussianIndexY), 0);
16
+ }
17
+
18
+ uvec4 fetchPackedGaussianHeader(uint gaussianIndex) {
19
+ uint headerIndex = gaussianIndex | ${u}u;
20
+ uint headerIndexX = headerIndex & ${t}u;
21
+ uint headerIndexY = headerIndex >> ${s}u;
22
+
23
+ return texelFetch(splatAtlasTexture, ivec2(headerIndexX, headerIndexY), 0);
24
+ }
25
+
26
+ vec3 fetchGaussianCameraRelativePosition(uint gaussianIndex, uvec4 packedGaussian) {
27
+ uvec4 packedHeader = fetchPackedGaussianHeader(gaussianIndex);
28
+ vec3 tileOriginRelativePosition = unpackTileOriginRelativePosition(packedGaussian);
29
+
30
+ return unpackCameraRelativeGaussianPosition(packedHeader, tileOriginRelativePosition);
31
+ }
32
+
33
+ uint fetchGaussianPageIndex(uint gaussianIndex) {
34
+ return gaussianIndex >> ${d}u;
35
+ }
36
+ `)}const t=""+(e-1),s=`${Math.log2(e)}`,u=""+(a-1),d=`${Math.log2(a)}`;export{i as GaussianSplatTextureFetch};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../../core/Logger.js";import{abortMaybe as r,disposeMaybe as s}from"../../../../../core/maybe.js";import{throwIfAborted as a,isAbortError as i}from"../../../../../core/promiseUtils.js";import{watch as o,syncAndInitial as n}from"../../../../../core/reactiveUtils.js";import{property as l,subclass as m}from"../../../../../core/accessorSupport/decorators.js";import{set as u}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{requestImage as h}from"../../../../../request/image.js";import{InternalRenderCategory as c}from"../../../webgl.js";import p from"../../../webgl/RenderNode.js";import{G as d}from"../../../../../chunks/GlobalIllumination.glsl.js";import{G as f}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as _}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as b}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as g}from"./GlobalIlluminationTechniqueConfiguration.js";import{G as w}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as P}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as x,ColorAttachment1 as T,SizedPixelFormat as I}from"../../../../webgl/enums.js";import C from"../../../../webgl/Texture.js";import{TextureDescriptor as q}from"../../../../webgl/TextureDescriptor.js";const j=1,A=.25;let B=class extends p{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=c.AMBIENT_ILLUMINATION,this._passParameters=new d,this._drawParameters=new f,this._drawParametersUpscale=new w,this._maxFrames=255,this._configuration=new g,this._resetBuffer=!1}async initialize(){this._abortController=new AbortController;const e=this._abortController.signal;try{const t=(await import("./BlueNoise.js")).data;a(e),await this._loadBlueNoiseTexture(t,e),a(e)}catch(r){i(r)||t.getLogger(this).errorOnce("Failed to load blue noise texture:",r)}this.addHandles(o(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this.resetAccumulation(),this.requestRender(1)},n))}destroy(){this._abortController=r(this._abortController),this._passParameters.noiseTexture=s(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),s=t?.getTexture(x),a=this._mode;if(!r||!s)return this._emptyOutput;if(this.view.stage.renderView.updating&&this.resetAccumulation(),0===a)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this.requestRender(1),this._emptyOutput;const i=this.bindParameters;this._configuration.hasEmission=i.hasEmission;const o=this.techniques.getCompiled(b,this._configuration),n=this.techniques.getCompiled(_),l=this._needsUpscalePass(a),m=l?A:1,h=l?this.techniques.getCompiled(P):null;if(!o||!n||l&&!h)return this.requestRender(1),this._emptyOutput;const p=this.renderingContext,{camera:d}=i;this._passParameters.normalTexture=r,this._passParameters.depthTexture=s,this._passParameters.projScale=1/d.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=m;const{fullWidth:f,fullHeight:g}=d,w=Math.max(1,Math.floor(f*m)),I=Math.max(1,Math.floor(g*m)),C=this.fboCache.acquire(w,I,"global illumination input").acquireColor(T,0);p.bindFramebuffer(C.fbo),p.setViewport(0,0,w,I),p.bindTechnique(o,i,this._passParameters,this._drawParameters),p.screen.draw();const q=C.obtainAttachment(T),B=Math.max(1,Math.round(w/j)),M=Math.max(1,Math.round(I/j)),G=this.fboCache.acquire(B,M,"global illumination blur horizontal");p.bindFramebuffer(G.fbo),this._drawParameters.texture=C.getTexture(),this._drawParameters.weightTexture=q.attachment,u(this._drawParameters.blurSize,0,j/I),p.bindTechnique(n,i,this._passParameters,this._drawParameters),p.setViewport(0,0,B,M),p.screen.draw(),C.release();const N=l?"global illumination blur vertical":c.AMBIENT_ILLUMINATION,F=this.fboCache.acquire(B,M,N);p.bindFramebuffer(F.fbo),p.setViewport(0,0,B,M),p.setClearColor(1,1,1,0),p.clear(16384),this._drawParameters.texture=G.getTexture(),this._drawParameters.weightTexture=q.attachment,u(this._drawParameters.blurSize,j/B,0),p.bindTechnique(n,i,this._passParameters,this._drawParameters),p.setViewport(0,0,B,M),p.screen.draw(),G.release(),F.attachColor(q,T),q.release();let y=F;return h&&(y=this.fboCache.acquire(f,g,c.AMBIENT_ILLUMINATION).acquireColor(T,0),p.bindFramebuffer(y.fbo),p.setViewport(0,0,f,g),p.setClearColor(1,1,1,0),p.clear(16384),this._drawParametersUpscale.colorTexture=F.getTexture(),this._drawParametersUpscale.weightTexture=F.getTexture(T),p.bindTechnique(h,i,this._passParameters,this._drawParametersUpscale),p.screen.draw(),F.release()),p.setViewport4fv(d.fullViewport),this._passParameters.frameCount=(this._passParameters.frameCount+1)%64,++this._passParameters.accumulatedFrames,this._passParameters.accumulatedFrames<this._maxFrames&&this.requestRender(1),y}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:r}=this.bindParameters.camera,s=this.fboCache.acquire(t,r,c.AMBIENT_ILLUMINATION).acquireColor(T,0);return e.bindFramebuffer(s.fbo),e.setViewport(0,0,t,r),e.clearBuffer(0,[0,0,0,1]),e.clearBuffer(1,[0,0,0,0]),s}async _loadBlueNoiseTexture(e,t){a(t);const r=await h(e,{signal:t});if(a(t),!r)return;const s=new q;s.internalFormat=I.RGBA8,s.wrapMode=10497,s.isImmutable=!0,this._passParameters.noiseTexture=new C(this.renderingContext,s,r)}get _canRender(){const e=this.bindParameters;return!(!this._passParameters.noiseTexture||!e.reprojection.lastFrameColor||e.hasEmission&&!e.reprojection.lastFrameEmission||!e.reprojection.lastFrameDepth||!e.globalIllumination||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}resetAccumulation(){this._passParameters.accumulatedFrames=0}_needsUpscalePass(e){return 1===e}get test(){return{passParameters:this._passParameters,configuration:this._configuration,restartAccumulation:()=>{this.resetAccumulation(),this._passParameters.frameCount=0,this._resetBuffer=!0,this.requestRender(1)}}}};e([l()],B.prototype,"consumes",void 0),e([l()],B.prototype,"produces",void 0),e([l()],B.prototype,"_abortController",void 0),B=e([m("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],B);export{B as GlobalIllumination,j as blurSizePixels};
2
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Logger.js";import{abortMaybe as r,disposeMaybe as s}from"../../../../../core/maybe.js";import{throwIfAborted as a,isAbortError as i}from"../../../../../core/promiseUtils.js";import{watch as o,syncAndInitial as l}from"../../../../../core/reactiveUtils.js";import{property as n,subclass as u}from"../../../../../core/accessorSupport/decorators.js";import{set as m}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{requestImage as h}from"../../../../../request/image.js";import{InternalRenderCategory as c}from"../../../webgl.js";import p from"../../../webgl/RenderNode.js";import{G as d}from"../../../../../chunks/GlobalIllumination.glsl.js";import{G as f}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as _}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as b}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as g}from"./GlobalIlluminationTechniqueConfiguration.js";import{G as w}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as x}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as P,ColorAttachment1 as T,SizedPixelFormat as I}from"../../../../webgl/enums.js";import C from"../../../../webgl/Texture.js";import{TextureDescriptor as q}from"../../../../webgl/TextureDescriptor.js";const j=1;let y=class extends p{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=c.AMBIENT_ILLUMINATION,this._passParameters=new d,this._drawParameters=new f,this._drawParametersUpscale=new w,this._maxFrames=255,this._lowQualityResolutionScale=.25,this._configuration=new g,this._resetBuffer=!1}async initialize(){this._abortController=new AbortController;const e=this._abortController.signal;try{const t=(await import("./BlueNoise.js")).data;a(e),await this._loadBlueNoiseTexture(t,e),a(e)}catch(r){i(r)||t.getLogger(this).errorOnce("Failed to load blue noise texture:",r)}this.addHandles(o(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this.resetAccumulation(),this.requestRender(1)},l))}destroy(){this._abortController=r(this._abortController),this._passParameters.noiseTexture=s(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),s=t?.getTexture(P),a=this._mode;if(!r||!s)return this._emptyOutput;if(this.view.stage.renderView.updating&&this.resetAccumulation(),0===a)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this.requestRender(1),this._emptyOutput;const i=this.bindParameters;this._configuration.hasEmission=i.hasEmission;const o=this.techniques.getCompiled(b,this._configuration),l=this.techniques.getCompiled(_),n=1===a,u=n?this._lowQualityResolutionScale:1,h=n?this.techniques.getCompiled(x):null;if(!o||!l||n&&!h)return this.requestRender(1),this._emptyOutput;const p=this.renderingContext,{camera:d}=i;this._passParameters.normalTexture=r,this._passParameters.depthTexture=s,this._passParameters.projScale=1/d.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=u;const{fullWidth:f,fullHeight:g}=d,w=Math.max(1,Math.floor(f*u)),I=Math.max(1,Math.floor(g*u)),C=this.fboCache.acquire(w,I,"global illumination input").acquireColor(T,0);p.bindFramebuffer(C.fbo),p.setViewport(0,0,w,I),p.bindTechnique(o,i,this._passParameters,this._drawParameters),p.screen.draw();const q=C.obtainAttachment(T),y=Math.max(1,Math.round(w/j)),F=Math.max(1,Math.round(I/j)),A=this.fboCache.acquire(y,F,"global illumination blur horizontal");p.bindFramebuffer(A.fbo),this._drawParameters.texture=C.getTexture(),this._drawParameters.weightTexture=q.attachment,m(this._drawParameters.blurSize,0,j/I),p.bindTechnique(l,i,this._passParameters,this._drawParameters),p.setViewport(0,0,y,F),p.screen.draw(),C.release();const B=n?"global illumination blur vertical":c.AMBIENT_ILLUMINATION,M=this.fboCache.acquire(y,F,B);p.bindFramebuffer(M.fbo),p.setViewport(0,0,y,F),p.setClearColor(1,1,1,0),p.clear(16384),this._drawParameters.texture=A.getTexture(),this._drawParameters.weightTexture=q.attachment,m(this._drawParameters.blurSize,j/y,0),p.bindTechnique(l,i,this._passParameters,this._drawParameters),p.setViewport(0,0,y,F),p.screen.draw(),A.release(),M.attachColor(q,T),q.release();let G=M;return h&&(G=this.fboCache.acquire(f,g,c.AMBIENT_ILLUMINATION).acquireColor(T,0),p.bindFramebuffer(G.fbo),p.setViewport(0,0,f,g),p.setClearColor(1,1,1,0),p.clear(16384),this._drawParametersUpscale.colorTexture=M.getTexture(),this._drawParametersUpscale.weightTexture=M.getTexture(T),p.bindTechnique(h,i,this._passParameters,this._drawParametersUpscale),p.screen.draw(),M.release()),p.setViewport4fv(d.fullViewport),this._passParameters.frameCount=(this._passParameters.frameCount+1)%64,++this._passParameters.accumulatedFrames,this._passParameters.accumulatedFrames<this._maxFrames&&this.requestRender(1),G}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:r}=this.bindParameters.camera,s=this.fboCache.acquire(t,r,c.AMBIENT_ILLUMINATION).acquireColor(T,0);return e.bindFramebuffer(s.fbo),e.setViewport(0,0,t,r),e.clearBuffer(0,[0,0,0,1]),e.clearBuffer(1,[0,0,0,0]),s}async _loadBlueNoiseTexture(e,t){a(t);const r=await h(e,{signal:t});if(a(t),!r)return;const s=new q;s.internalFormat=I.RGBA8,s.wrapMode=10497,s.isImmutable=!0,this._passParameters.noiseTexture=new C(this.renderingContext,s,r)}get _canRender(){const e=this.bindParameters;return!(!this._passParameters.noiseTexture||!e.reprojection.lastFrameColor||e.hasEmission&&!e.reprojection.lastFrameEmission||!e.reprojection.lastFrameDepth||!e.globalIllumination||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}resetAccumulation(){this._passParameters.accumulatedFrames=0}get test(){const e=this;return{passParameters:this._passParameters,configuration:this._configuration,get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},get mode(){return e._mode},restartAccumulation:()=>{this.resetAccumulation(),this._passParameters.frameCount=0,this._resetBuffer=!0,this.requestRender(1)}}}};e([n()],y.prototype,"consumes",void 0),e([n()],y.prototype,"produces",void 0),e([n()],y.prototype,"_abortController",void 0),y=e([u("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],y);export{y as GlobalIllumination,j as blurSizePixels};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../../chunks/OITDim.glsl.js";import"../../shaders/oitResolution.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{O as OITBlendPassParameters,b as build}from"../../../../../chunks/OITBlend.glsl.js";
2
+ import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../../chunks/OITDimOpaque.glsl.js";import"../../shaders/oitResolution.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{O as OITBlendPassParameters,b as build}from"../../../../../chunks/OITBlend.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{O as e}from"../../../../../chunks/OITBlend.glsl.js";import{OITBlendTechnique as i}from"./OITBlendTechnique.js";import{OITBlendTechniqueConfiguration as t}from"./OITBlendTechniqueConfiguration.js";import{OITDimTechnique as s}from"./OITDimTechnique.js";import{OITDimTechniqueConfiguration as n}from"./OITDimTechniqueConfiguration.js";import{ColorAttachment2 as o,ColorAttachment1 as r,DrawBufferNone as a}from"../../../../webgl/enums.js";class u{constructor(i){this._techniques=i,this._parameters=new e,this._configuration=new t,this._dimConfiguration=new n}precompile({useFloatBlend:e,hasEmission:t,emissions:n},o,r){this._configuration.useFloatBlend=e.value,this._configuration.hasEmission=t,this._configuration.computeHudOcclusion=o,this._configuration.frontFaceMask=1===r,this._techniques.precompile(i,this._configuration),0!==n&&2!==n&&1!==r&&(this._dimConfiguration.useFloatBlend=e.value,this._techniques.precompile(s,this._dimConfiguration))}blend(e,t,n,u,c,h,m){if(this._configuration.useFloatBlend=u.useFloatBlend.value,this._configuration.hasEmission=c,this._configuration.computeHudOcclusion=h,this._configuration.frontFaceMask=1===m,this._parameters.colorTexture=t.getTexture(),this._parameters.alphaTexture=t.getTexture(c?o:r),this._parameters.frontFaceTexture=n.getTexture(),c){if(this._dimConfiguration.useFloatBlend=u.useFloatBlend.value,1!==m&&2!==u.emissions){const i=this._techniques.get(s,this._dimConfiguration);e.bindTechnique(i,u,this._parameters);const t=e.setDrawBuffers([a,r]);e.screen.draw(),e.setDrawBuffers(t)}this._parameters.emissionTexture=t.getTexture(r),this._parameters.emissionFrontFaceTexture=n.getTexture(r)}const f=this._techniques.get(i,this._configuration);e.bindTechnique(f,u,this._parameters),e.screen.draw()}}export{u as OITBlend};
2
+ import{O as e}from"../../../../../chunks/OITBlend.glsl.js";import{OITBlendEmissionTechnique as i}from"./OITBlendEmissionTechnique.js";import{OITBlendEmissionTechniqueConfiguration as t}from"./OITBlendEmissionTechniqueConfiguration.js";import{OITBlendTechnique as s}from"./OITBlendTechnique.js";import{OITBlendTechniqueConfiguration as n}from"./OITBlendTechniqueConfiguration.js";import{OITDimOpaqueTechnique as r}from"./OITDimOpaqueTechnique.js";import{OITDimOpaqueTechniqueConfiguration as o}from"./OITDimOpaqueTechniqueConfiguration.js";import{ColorAttachment2 as a,ColorAttachment1 as u,DrawBufferNone as c,ColorAttachment0 as h}from"../../../../webgl/enums.js";class m{constructor(i){this._techniques=i,this._parameters=new e,this._configuration=new n,this._dimConfiguration=new o,this._dimTransparentConfiguration=new t}precompile({useFloatBlend:e,emissions:t},n,o){this._configuration.useFloatBlend=e.value,this._configuration.computeHudOcclusion=n,this._configuration.frontFaceMask=1===o,this._techniques.precompile(s,this._configuration),0!==t&&2!==t&&0===o&&(this._dimConfiguration.useFloatBlend=e.value,this._techniques.precompile(r,this._dimConfiguration)),0!==t&&0===o&&(this._dimTransparentConfiguration.useFloatBlend=e.value,this._techniques.precompile(i,this._dimTransparentConfiguration))}blend(e,t,n,o,m,f,l){if(this._configuration.useFloatBlend=o.useFloatBlend.value,this._configuration.computeHudOcclusion=f,this._configuration.frontFaceMask=1===l,this._parameters.colorTexture=t.getTexture(),this._parameters.alphaTexture=t.getTexture(m?a:u),this._parameters.frontFaceTexture=n.getTexture(),m&&(this._dimConfiguration.useFloatBlend=o.useFloatBlend.value,0===l&&2!==o.emissions)){const i=this._techniques.get(r,this._dimConfiguration);e.bindTechnique(i,o,this._parameters);const t=e.setDrawBuffers([c,u]);e.screen.draw(),e.setDrawBuffers(t)}const p=this._techniques.get(s,this._configuration);if(e.bindTechnique(p,o,this._parameters),m){const i=e.setDrawBuffers([h]);e.screen.draw(),e.setDrawBuffers(i)}else e.screen.draw();if(m&&0===l){this._parameters.emissionTexture=t.getTexture(u),this._parameters.emissionFrontFaceTexture=n.getTexture(u),this._dimTransparentConfiguration.useFloatBlend=o.useFloatBlend.value;const s=this._techniques.get(i,this._dimTransparentConfiguration);e.bindTechnique(s,o,this._parameters);const r=e.setDrawBuffers([c,u]);e.screen.draw(),e.setDrawBuffers(r)}}}export{m as OITBlend};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../../chunks/OITDimOpaque.glsl.js";import"../../shaders/oitResolution.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{a as OITBlendEmissionPassParameters,b as build}from"../../../../../chunks/OITBlendEmission.glsl.js";
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../../core/shaderTechnique/ShaderTechnique.js";import{O as o}from"../../../../../chunks/OITBlendEmission.glsl.js";import{makePipelineState as n,defaultColorWrite as t,unpremultipliedAlphaToPremultipliedAlpha as l}from"../../../../webgl/renderState.js";let c=class extends i{constructor(){super(...arguments),this.shader=new s(o,()=>import("./OITBlendEmission.glsl.js"))}initializePipeline(){return n({blending:l,colorWrite:t})}};c=e([r("esri.views.3d.webgl-engine.effects.transparency.OITBlendEmissionTechnique")],c);export{c as OITBlendEmissionTechnique};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{parameter as o,ShaderTechniqueConfiguration as r}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class t extends r{constructor(){super(...arguments),this.useFloatBlend=!0}}e([o()],t.prototype,"useFloatBlend",void 0);export{t as OITBlendEmissionTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as o}from"tslib";import{parameter as t,ShaderTechniqueConfiguration as s}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class e extends s{constructor(){super(...arguments),this.useFloatBlend=!0,this.hasEmission=!1,this.computeHudOcclusion=!1,this.frontFaceMask=!1}}o([t()],e.prototype,"useFloatBlend",void 0),o([t()],e.prototype,"hasEmission",void 0),o([t()],e.prototype,"computeHudOcclusion",void 0),o([t()],e.prototype,"frontFaceMask",void 0);export{e as OITBlendTechniqueConfiguration};
2
+ import{__decorate as o}from"tslib";import{parameter as t,ShaderTechniqueConfiguration as e}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends e{constructor(){super(...arguments),this.useFloatBlend=!0,this.computeHudOcclusion=!1,this.frontFaceMask=!1}}o([t()],r.prototype,"useFloatBlend",void 0),o([t()],r.prototype,"computeHudOcclusion",void 0),o([t()],r.prototype,"frontFaceMask",void 0);export{r as OITBlendTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/util/EmissionDimming.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../shaders/oitResolution.glsl.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{O as OITDimPassParameters,b as build}from"../../../../../chunks/OITDim.glsl.js";
2
+ import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/util/EmissionDimming.glsl.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../shaders/oitResolution.glsl.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{O as OITDimOpaquePassParameters,b as build}from"../../../../../chunks/OITDimOpaque.glsl.js";
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as i}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as o}from"../../../../../chunks/OITDimOpaque.glsl.js";import{makePipelineState as t,defaultColorWrite as a,modulateDestination as n}from"../../../../webgl/renderState.js";let c=class extends s{constructor(){super(...arguments),this.shader=new i(o,()=>import("./OITDimOpaque.glsl.js"))}initializePipeline(){return t({blending:n,colorWrite:a})}};c=e([r("esri.views.3d.webgl-engine.effects.transparency.OITDimOpaqueTechnique")],c);export{c as OITDimOpaqueTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as o,ShaderTechniqueConfiguration as r}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class t extends r{constructor(){super(...arguments),this.useFloatBlend=!0}}e([o()],t.prototype,"useFloatBlend",void 0);export{t as OITDimTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as o,ShaderTechniqueConfiguration as r}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class t extends r{constructor(){super(...arguments),this.useFloatBlend=!0}}e([o()],t.prototype,"useFloatBlend",void 0);export{t as OITDimOpaqueTechniqueConfiguration};