@arcgis/core 5.2.0-next.12 → 5.2.0-next.14

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 (347) hide show
  1. package/arcgisGlobal.d.ts +3 -3
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/03354e9256b2f77fd4f2.js +1 -0
  4. package/assets/esri/core/workers/chunks/0826d36dfbfa28442b70.js +1 -0
  5. package/assets/esri/core/workers/chunks/{8103d06f760a2c79773d.js → 0a8ba5cb857f61de40fb.js} +15 -15
  6. package/assets/esri/core/workers/chunks/152f1c08197955224ad3.js +1 -0
  7. package/assets/esri/core/workers/chunks/1a0903b1d2d5101977c6.js +1 -0
  8. package/assets/esri/core/workers/chunks/{de541ad390a8d258d2e6.js → 1d5db8746a4f1ed1d18f.js} +1 -1
  9. package/assets/esri/core/workers/chunks/1effde6a39ef0d4af525.js +1 -0
  10. package/assets/esri/core/workers/chunks/{2a5176533e78a92d8e5b.js → 20c729fca2e4b4c6b28d.js} +1 -1
  11. package/assets/esri/core/workers/chunks/23d50c4478f40a7d62bf.js +1 -0
  12. package/assets/esri/core/workers/chunks/2623cd08487fdc9a94f1.js +1 -0
  13. package/assets/esri/core/workers/chunks/2c3fc2805f6de0963789.js +1 -0
  14. package/assets/esri/core/workers/chunks/2c4f10eaf02ef090ee8f.js +1 -0
  15. package/assets/esri/core/workers/chunks/314bc1b356d43bfa72a8.js +1 -0
  16. package/assets/esri/core/workers/chunks/{34544c79ce568f30a094.js → 31762eb20a9a0ed3f8b0.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{26dca1d387183282276a.js → 318a2702632aaa4d3a63.js} +1 -1
  18. package/assets/esri/core/workers/chunks/3526ab3b1f87c24ae6f8.js +1 -0
  19. package/assets/esri/core/workers/chunks/{0b169bb1969f86232a1a.js → 35b3ff25f5fe24fe15e2.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{81808c3aead7dfac3049.js → 38cfedce779dd75bd217.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{5075e85e1eafd431a8c0.js → 39c994536ce6c1e5c956.js} +1 -1
  22. package/assets/esri/core/workers/chunks/3b74749db78bcba2bc16.js +1 -0
  23. package/assets/esri/core/workers/chunks/3d83ac791212b81c9d11.js +1 -0
  24. package/assets/esri/core/workers/chunks/3ecb906322a6a5c8c93b.js +1 -0
  25. package/assets/esri/core/workers/chunks/3f67162456a1f02190fa.js +1 -0
  26. package/assets/esri/core/workers/chunks/{ef46ef4f0ee9f2aeaa4a.js → 426b8e1e2eef2460851d.js} +1 -1
  27. package/assets/esri/core/workers/chunks/4376bc2934a996d8bc27.js +1 -0
  28. package/assets/esri/core/workers/chunks/44d0ca9d4c5f1722688c.js +1 -0
  29. package/assets/esri/core/workers/chunks/{c187bc997bad61b6c6e9.js → 47f21b65065558d583ca.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{e25bcfdd8f20f8a08b19.js → 4d57c771af4137f74bfb.js} +1 -1
  31. package/assets/esri/core/workers/chunks/4e4419282c4bf7ee4678.js +1 -0
  32. package/assets/esri/core/workers/chunks/4e788fc6cb2ea936f676.js +1 -0
  33. package/assets/esri/core/workers/chunks/4f51963815b0d53ffbd9.js +1 -0
  34. package/assets/esri/core/workers/chunks/5100b5a6a506c704dfaf.js +1 -0
  35. package/assets/esri/core/workers/chunks/52afd43bbe23e358efb5.js +1 -0
  36. package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +1 -0
  37. package/assets/esri/core/workers/chunks/{d3c760109a70a71448c5.js → 67773a9f031d9f1d672f.js} +1 -1
  38. package/assets/esri/core/workers/chunks/6f7193b9ff5942c0d354.js +1 -0
  39. package/assets/esri/core/workers/chunks/70737052bab29fcaa120.js +1 -0
  40. package/assets/esri/core/workers/chunks/718d2d430c1a5a940b83.js +1 -0
  41. package/assets/esri/core/workers/chunks/71c996e1ae84d9daddf2.js +1 -0
  42. package/assets/esri/core/workers/chunks/753e0b21e57c12c742ee.js +1 -0
  43. package/assets/esri/core/workers/chunks/764c8ba14ab74b66b391.js +1 -0
  44. package/assets/esri/core/workers/chunks/{1996f0a930abdd97b855.js → 7a8ed08cd173963b3112.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{4a20f7a0700fd14a129f.js → 7dcf804e1918b94fa4e1.js} +3 -10
  46. package/assets/esri/core/workers/chunks/{cc697c4d9cdc116373dc.js → 81726d997a2d34449bb2.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{74e1826ad9e2c4fd3b42.js → 81883bca8a79ee2ddb00.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{9fee0110dc7fee4c95e2.js → 854c320af09b6afc4b80.js} +2 -2
  49. package/assets/esri/core/workers/chunks/85505a8b8b0794656d06.js +1 -0
  50. package/assets/esri/core/workers/chunks/859bc873e7af911a518f.js +1 -0
  51. package/assets/esri/core/workers/chunks/{8407c91cce31e087b41b.js → 886ae23a1d8fa21e531f.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{3ff7aa216cd794d951e8.js → 8e99f937fd36cf2cd05f.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{c357c0a08b99c1e7f290.js → 9331969046f2b277d620.js} +1 -1
  54. package/assets/esri/core/workers/chunks/93d08d82ceab19e314f8.js +1 -0
  55. package/assets/esri/core/workers/chunks/97a654e8054302582a3b.js +1 -0
  56. package/assets/esri/core/workers/chunks/97d2bdbea39cbcf8fd0f.js +1 -0
  57. package/assets/esri/core/workers/chunks/a0208e35b217808777c4.js +1 -0
  58. package/assets/esri/core/workers/chunks/{f25bb204cf6727f6fdef.js → a0876a52a3c2ad849370.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{7ad09ac5793e8d47b4b2.js → a4b970a841b3085500fc.js} +1 -1
  60. package/assets/esri/core/workers/chunks/aa5f36d7ed59c625ba78.js +1 -0
  61. package/assets/esri/core/workers/chunks/b045bffb4f2eb9203183.js +1 -0
  62. package/assets/esri/core/workers/chunks/b590402170ae289290d7.js +1 -0
  63. package/assets/esri/core/workers/chunks/b9935cc8e2bd4045058a.js +1 -0
  64. package/assets/esri/core/workers/chunks/{1a527c0740d9f4fa0791.js → bc547cf814d6703cef59.js} +1 -1
  65. package/assets/esri/core/workers/chunks/bcc097271f5cdf0a97a7.js +1 -0
  66. package/assets/esri/core/workers/chunks/bdc66ef2b6ed783047d5.js +1 -0
  67. package/assets/esri/core/workers/chunks/be1d2c3a61e6447fbbc7.js +1 -0
  68. package/assets/esri/core/workers/chunks/bf6ae205fbfbfcd1a0ee.js +1 -0
  69. package/assets/esri/core/workers/chunks/bfd1aef8ac795e1ce227.js +1 -0
  70. package/assets/esri/core/workers/chunks/c148ad0ea9258046ac1f.js +1 -0
  71. package/assets/esri/core/workers/chunks/{0f75c19d8e296a32e329.js → c2cd80b712f29e8cbb8d.js} +1 -1
  72. package/assets/esri/core/workers/chunks/cc0efa716b8414a44398.js +1 -0
  73. package/assets/esri/core/workers/chunks/{8f6833671c071b522923.js → cd66bd30f654fe571e57.js} +1 -1
  74. package/assets/esri/core/workers/chunks/cf41a66fb97c1076fb34.js +1 -0
  75. package/assets/esri/core/workers/chunks/cf8ce21dc649021e97f6.js +1 -0
  76. package/assets/esri/core/workers/chunks/d2f47f21ce0b0ab4da17.js +262 -0
  77. package/assets/esri/core/workers/chunks/d3be4d914fc99a1d686c.js +1 -0
  78. package/assets/esri/core/workers/chunks/dbd2bfcbf3e0f86f07b8.js +1 -0
  79. package/assets/esri/core/workers/chunks/{6675d56f49d07a97dc40.js → dd0c1cf921369e2bc48b.js} +1 -1
  80. package/assets/esri/core/workers/chunks/df18b0a653b328d8d052.js +1 -0
  81. package/assets/esri/core/workers/chunks/df54e741db40b308c2dd.js +2 -0
  82. package/assets/esri/core/workers/chunks/{89e09276086745aa21fa.js → e4e2f479c0c45ae1b2c3.js} +1 -1
  83. package/assets/esri/core/workers/chunks/e656fd5ecf9ac059a87b.js +1 -0
  84. package/assets/esri/core/workers/chunks/{58a7cdebc3d182c15ec6.js → e77df11aee136d64ff0f.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{7a474ce61cf484df87b4.js → e80376832050a4b6d28a.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{f75295cdd5e84eb97d5a.js → e8d65900eefff1152207.js} +1 -1
  87. package/assets/esri/core/workers/chunks/f116331c6eca937aac8e.js +1 -0
  88. package/assets/esri/core/workers/chunks/{3b837b512999e6ab24bc.js → f148666308071bdb185a.js} +1 -1
  89. package/assets/esri/core/workers/chunks/f23e995320674b32e142.js +1 -0
  90. package/assets/esri/core/workers/chunks/f334bf192dff5af10a70.js +1 -0
  91. package/assets/esri/core/workers/chunks/f76b1fc36f5606cac2c8.js +1 -0
  92. package/assets/esri/core/workers/chunks/{893c0d28a5bf3f9f29f1.js → f93facf47aba9b128fcc.js} +1 -1
  93. package/assets/esri/core/workers/chunks/fa1336b60278017d2525.js +1 -0
  94. package/assets/esri/core/workers/chunks/{c911f0b5bdd43b66b731.js → fa3faec65882c5b6f1a0.js} +1 -1
  95. package/assets/esri/core/workers/chunks/fccc34b86454c56f27ab.js +1 -0
  96. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  97. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  98. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  99. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +5 -1
  100. package/assets/esri/themes/dark/main.css +1 -1
  101. package/assets/esri/themes/light/main.css +1 -1
  102. package/assets/esri/themes/light/view.css +1 -1
  103. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis.json +1 -1
  104. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_en.json +1 -1
  105. package/chunks/{ComponentShader.glsl.js → Component.glsl.js} +11 -11
  106. package/chunks/GlobalIlluminationBlur.glsl.js +7 -7
  107. package/chunks/GlowBlur.glsl.js +5 -6
  108. package/chunks/LineMarker.glsl.js +27 -26
  109. package/chunks/MeasurementArrow.glsl.js +5 -4
  110. package/chunks/RibbonLine.glsl.js +1 -8
  111. package/chunks/Terrain.glsl.js +24 -26
  112. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  113. package/chunks/arcgis-knowledge-client-core.js +1 -1
  114. package/chunks/bundle2.js +1 -1
  115. package/config.js +1 -1
  116. package/core/promiseUtils.d.ts +1 -1
  117. package/core/promiseUtils.js +1 -1
  118. package/core/units.js +1 -1
  119. package/form/types.d.ts +1 -1
  120. package/geometry/Mesh.d.ts +220 -95
  121. package/geometry/operators/support/projectionZScaling.js +1 -1
  122. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +35 -13
  123. package/geometry/support/MeshLocalVertexSpace.d.ts +32 -8
  124. package/geometry/support/MeshVertexAttributes.d.ts +6 -2
  125. package/geometry/support/heightModelInfoUtils.js +1 -1
  126. package/geometry/support/zscale.js +1 -1
  127. package/graphic/{AnnotationGraphicOrigin.d.ts → AnnotationFeatureGraphicOrigin.d.ts} +9 -9
  128. package/graphic/{AnnotationGraphicOrigin.js → AnnotationFeatureGraphicOrigin.js} +1 -1
  129. package/interfaces.d.ts +3 -3
  130. package/kernel.js +1 -1
  131. package/layers/{AnnotationLayer.d.ts → AnnotationFeatureLayer.d.ts} +24 -24
  132. package/layers/AnnotationFeatureLayer.js +2 -0
  133. package/layers/GaussianSplatLayer.d.ts +4 -1
  134. package/layers/graphics/data/QueryEngine.js +1 -1
  135. package/layers/graphics/data/queryUtils.js +1 -1
  136. package/layers/graphics/sources/parquet/ParquetFileStatistics.js +1 -1
  137. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  138. package/layers/graphics/sources/support/parquetIdUtils.js +1 -1
  139. package/layers/save/featureLayerUtils.js +1 -1
  140. package/layers/support/AnnotationSublayer.d.ts +7 -7
  141. package/layers/support/FeatureEffect.d.ts +3 -2
  142. package/layers/support/arcgisLayers.js +1 -1
  143. package/layers/support/fetchService.js +1 -1
  144. package/layers/support/layerUtils.js +1 -1
  145. package/layers/support/layersLoader.js +1 -1
  146. package/layers/support/parquetUtils.js +1 -1
  147. package/layers/support/schemaValidator.js +1 -1
  148. package/layers/types.d.ts +1 -1
  149. package/networks/Network.js +1 -1
  150. package/networks/UtilityNetwork.js +1 -1
  151. package/networks/support/networkFieldUtils.js +1 -1
  152. package/package.json +2 -2
  153. package/portal/schemas/definitions.js +1 -1
  154. package/portal/schemas/gaussianSplatLayerItem.js +2 -0
  155. package/portal/schemas/integratedMesh3DTilesLayerItem.js +1 -1
  156. package/portal/support/loadUtils.js +1 -1
  157. package/renderers/support/types.d.ts +1 -1
  158. package/renderers/visualVariables/RotationVariable.d.ts +1 -16
  159. package/renderers/visualVariables/RotationVariable.js +1 -1
  160. package/rest/knowledgeGraph/ReplicaDefinition.d.ts +0 -2
  161. package/rest/knowledgeGraph/ServiceDefinition.d.ts +1 -1
  162. package/rest/knowledgeGraph/wasmInterface/replicaToWasmEncodedFactories.js +1 -1
  163. package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +1 -1
  164. package/rest/knowledgeGraphService.js +1 -1
  165. package/rest/networks/support/QueryAssociationsParameters.d.ts +2 -2
  166. package/rest/networks/support/SynthesizeAssociationGeometriesParameters.d.ts +2 -2
  167. package/rest/networks/support/TraceParameters.d.ts +2 -2
  168. package/rest/support/AttributeBinsQuery.js +1 -1
  169. package/rest/support/Query.js +1 -1
  170. package/rest/support/TopFeaturesQuery.js +1 -1
  171. package/support/revision.js +1 -1
  172. package/views/2d/engine/webgl/TextureManager.js +1 -1
  173. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  174. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  175. package/views/2d/layerViewModuleImportUtils.js +1 -1
  176. package/views/2d/layers/AnnotationFeatureLayerView2D.js +2 -0
  177. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  178. package/views/2d/layers/TileLayerView2D.js +1 -1
  179. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  180. package/views/2d/layers/support/annodime/annotationSchema.js +1 -1
  181. package/views/2d/types.d.ts +2 -2
  182. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  183. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  184. package/views/3d/analysis/Viewshed/ViewshedTool2.js +1 -1
  185. package/views/3d/layerViewModuleImportUtils.js +1 -1
  186. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  187. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  188. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  189. package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
  190. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  191. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  192. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  193. package/views/3d/terrain/Tile.js +1 -1
  194. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  195. package/views/3d/types.d.ts +1 -1
  196. package/views/3d/webgl-engine/collections/Component/Material/{ComponentShader.glsl.js → Component.glsl.js} +1 -1
  197. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  198. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  199. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +7 -7
  200. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +29 -20
  201. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
  202. package/views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js +1 -1
  203. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +6 -8
  204. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  205. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  206. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TexelFormatInfo.js +2 -0
  207. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  208. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
  209. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  210. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  211. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  212. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  213. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  214. package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
  215. package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
  216. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  217. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  218. package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
  219. package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
  220. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  221. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  222. package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
  223. package/views/3d/webgl-engine/shaders/MeasurementArrowTechniqueConfiguration.js +1 -1
  224. package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +1 -1
  225. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +10 -10
  226. package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
  227. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  228. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
  229. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechniqueConfiguration.js +1 -1
  230. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  231. package/views/3d/webgl-engine/shaders/alphaCutoff.glsl.js +1 -1
  232. package/views/SceneView.d.ts +1 -1
  233. package/views/layers/{AnnotationLayerView.d.ts → AnnotationFeatureLayerView.d.ts} +6 -6
  234. package/views/layers/FeatureLikeLayerView.d.ts +2 -2
  235. package/views/layers/FeatureLikeLayerView.js +1 -1
  236. package/webdoc/widgets/FloorFilter.d.ts +14 -1
  237. package/webdoc/widgets/FloorFilter.js +1 -1
  238. package/webscene/support/AlphaCutoff.js +1 -1
  239. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  240. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +12 -4
  241. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  242. package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
  243. package/widgets/BatchAttributeForm/ValueChangeTransaction.js +2 -0
  244. package/widgets/BatchAttributeForm/VisibleElements.d.ts +8 -1
  245. package/widgets/BatchAttributeForm/VisibleElements.js +1 -1
  246. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  247. package/widgets/BatchAttributeForm/css.js +1 -1
  248. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  249. package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
  250. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
  251. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  252. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  253. package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
  254. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  255. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  256. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  257. package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
  258. package/widgets/BatchAttributeForm/stringUtils.js +2 -0
  259. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  260. package/widgets/BatchAttributeForm/types.d.ts +19 -3
  261. package/widgets/BatchAttributeForm.js +1 -1
  262. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  263. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  264. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  265. package/widgets/Editor/EditorViewModel.d.ts +1 -1
  266. package/widgets/Editor/EditorViewModel.js +1 -1
  267. package/widgets/Editor/MergeFeaturesWorkflow.d.ts +3 -3
  268. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  269. package/widgets/Editor/SplitFeatureWorkflow.d.ts +3 -3
  270. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  271. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  272. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  273. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  274. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  275. package/widgets/Editor/UpdateWorkflow.js +1 -1
  276. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  277. package/widgets/Editor/support/SketchController.js +1 -1
  278. package/widgets/Editor/workflowUtils.js +1 -1
  279. package/widgets/Editor.js +1 -1
  280. package/widgets/FloorFilter/FloorFilterViewModel.d.ts +10 -0
  281. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  282. package/assets/esri/core/workers/chunks/07cc5743cb6a9fd68adb.js +0 -1
  283. package/assets/esri/core/workers/chunks/0bb159ba0226122465cf.js +0 -1
  284. package/assets/esri/core/workers/chunks/160e5b99f1097a473e6b.js +0 -1
  285. package/assets/esri/core/workers/chunks/17e68828ca6ff6912d3e.js +0 -1
  286. package/assets/esri/core/workers/chunks/1e340536d3c5f94920b5.js +0 -1
  287. package/assets/esri/core/workers/chunks/24810c36ae09bb4e83dc.js +0 -1
  288. package/assets/esri/core/workers/chunks/274b82cb183ddd0042f3.js +0 -1
  289. package/assets/esri/core/workers/chunks/297ae764445e6f73a5ea.js +0 -1
  290. package/assets/esri/core/workers/chunks/29aba121db7f00e0cf81.js +0 -1
  291. package/assets/esri/core/workers/chunks/2a3145a595d19391bb8a.js +0 -1
  292. package/assets/esri/core/workers/chunks/3297658ccd8d4b9ce733.js +0 -1
  293. package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +0 -1
  294. package/assets/esri/core/workers/chunks/3c5534c576528c1921d2.js +0 -1
  295. package/assets/esri/core/workers/chunks/40b3cdf81c79bbc44527.js +0 -2
  296. package/assets/esri/core/workers/chunks/41f12eb7c9b7086528d5.js +0 -1
  297. package/assets/esri/core/workers/chunks/426156137f279d979ddd.js +0 -1
  298. package/assets/esri/core/workers/chunks/4714241189c13d0db897.js +0 -1
  299. package/assets/esri/core/workers/chunks/537c5dd4cd0a067199d1.js +0 -1
  300. package/assets/esri/core/workers/chunks/538537f9bc866d9caa75.js +0 -1
  301. package/assets/esri/core/workers/chunks/5437a1c05c1bd2175981.js +0 -1
  302. package/assets/esri/core/workers/chunks/58ac245ff7fb57c1004f.js +0 -1
  303. package/assets/esri/core/workers/chunks/5c7aff9604b4576a0e1d.js +0 -1
  304. package/assets/esri/core/workers/chunks/5d3ddbf94539cb4f493e.js +0 -1
  305. package/assets/esri/core/workers/chunks/5eb9fdb076488de9cd83.js +0 -1
  306. package/assets/esri/core/workers/chunks/603177137eb680afe371.js +0 -1
  307. package/assets/esri/core/workers/chunks/629099f05ca5c9ca1973.js +0 -1
  308. package/assets/esri/core/workers/chunks/62f78fa455d556008f6a.js +0 -1
  309. package/assets/esri/core/workers/chunks/686c51fd2144e132783e.js +0 -1
  310. package/assets/esri/core/workers/chunks/6f0341cfa4c68e6e60b3.js +0 -1
  311. package/assets/esri/core/workers/chunks/70229007d594536ba6a3.js +0 -1
  312. package/assets/esri/core/workers/chunks/7e89cb9ff615742e0894.js +0 -1
  313. package/assets/esri/core/workers/chunks/890b7a1153b7f65eba9a.js +0 -1
  314. package/assets/esri/core/workers/chunks/9660ae52fb3951a19e9c.js +0 -1
  315. package/assets/esri/core/workers/chunks/a4245bd4e67a428fd835.js +0 -1
  316. package/assets/esri/core/workers/chunks/ac33b10fe65f9e9e824f.js +0 -1
  317. package/assets/esri/core/workers/chunks/b5937ce657c1fff3864f.js +0 -1
  318. package/assets/esri/core/workers/chunks/b895674c0550826ecb28.js +0 -262
  319. package/assets/esri/core/workers/chunks/c3cf9e6e91f71c9cc5f3.js +0 -1
  320. package/assets/esri/core/workers/chunks/c80fc1b3048e8d58a1f8.js +0 -1
  321. package/assets/esri/core/workers/chunks/cc3e895cff019e811c07.js +0 -1
  322. package/assets/esri/core/workers/chunks/d122431f3b0b88dcb488.js +0 -1
  323. package/assets/esri/core/workers/chunks/d24e027bb8b2c09f25c8.js +0 -1
  324. package/assets/esri/core/workers/chunks/d2df8c328054dc6cb7b7.js +0 -1
  325. package/assets/esri/core/workers/chunks/d41caf20c26f80385265.js +0 -1
  326. package/assets/esri/core/workers/chunks/d468994822f9bc3d6279.js +0 -1
  327. package/assets/esri/core/workers/chunks/d63f532dd7d60ee8ef2c.js +0 -1
  328. package/assets/esri/core/workers/chunks/d64613209a9eb1eafb11.js +0 -1
  329. package/assets/esri/core/workers/chunks/d7be278aed1fb37ad5ec.js +0 -1
  330. package/assets/esri/core/workers/chunks/d8ec0afb2b91ccf32e55.js +0 -1
  331. package/assets/esri/core/workers/chunks/da1e8b338ab9fe9e0a8e.js +0 -1
  332. package/assets/esri/core/workers/chunks/dd920a6f6422fa213eba.js +0 -1
  333. package/assets/esri/core/workers/chunks/e279bcbe4f10e87bde6c.js +0 -1
  334. package/assets/esri/core/workers/chunks/e2de13810dce01b98520.js +0 -1
  335. package/assets/esri/core/workers/chunks/e5837e5ac6ef761f26a2.js +0 -1
  336. package/assets/esri/core/workers/chunks/e82488b9b3bb0c1dedb4.js +0 -1
  337. package/assets/esri/core/workers/chunks/f274a8e8c7ca4294e876.js +0 -1
  338. package/assets/esri/core/workers/chunks/f292c2c22a3822343118.js +0 -1
  339. package/assets/esri/core/workers/chunks/f4f642ddd4d5db7cbbb4.js +0 -1
  340. package/assets/esri/core/workers/chunks/f6d047358d14328f3622.js +0 -1
  341. package/assets/esri/core/workers/chunks/fb6605be0c5e36785543.js +0 -1
  342. package/assets/esri/core/workers/chunks/fd70a25ffdf2cc6c5be2.js +0 -1
  343. package/layers/AnnotationLayer.js +0 -2
  344. package/views/2d/layers/AnnotationLayerView2D.js +0 -2
  345. /package/assets/esri/core/workers/chunks/{9fee0110dc7fee4c95e2.js.LICENSE.txt → 854c320af09b6afc4b80.js.LICENSE.txt} +0 -0
  346. /package/assets/esri/core/workers/chunks/{40b3cdf81c79bbc44527.js.LICENSE.txt → df54e741db40b308c2dd.js.LICENSE.txt} +0 -0
  347. /package/views/layers/{AnnotationLayerView.js → AnnotationFeatureLayerView.js} +0 -0
@@ -1,32 +1,41 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{maxInt16 as n,maxUint8 as e}from"../../../../../core/typedArrayUtil.js";import{hasNativeFloat16Array as i}from"../../../../../geometry/support/float16.js";import{FloatBindUniform as o}from"../shaderModules/FloatBindUniform.js";import{glsl as u,If as s}from"../shaderModules/glsl.js";import{ShaderTechniqueConfiguration as a,parameter as r}from"../shaderTechnique/ShaderTechniqueConfiguration.js";function c(t){switch(t.elementType){case"float":switch(t.elementCount){case 1:return u`float`;case 2:return u`vec2`;case 3:return u`vec3`;case 4:return u`vec4`;case 9:return u`mat3`;default:t.elementCount}break;case"int":switch(t.elementCount){case 1:return u`int`;case 2:return u`ivec2`;case 3:return u`ivec3`;case 4:return u`ivec4`;case 9:throw new Error("Invalid element count 9 for type int");default:t.elementCount}break;case"uint":switch(t.elementCount){case 1:return u`uint`;case 2:return u`uvec2`;case 3:return u`uvec3`;case 4:return u`uvec4`;case 9:throw new Error("Invalid element count 9 for type uint");default:t.elementCount}break;default:t.elementType}throw new Error("unsupported field")}const p=new o("const_NaN",()=>NaN,{supportsNaN:!0});class f extends a{constructor(t){super(),this.supportNaN=t}}function l(t,n){const e=n?.supportNaN;e&&(t.uniforms.add(p),t.code.add(u`bool bitsEncodeFloat16NaN(highp uint bits) {
2
+ import{__decorate as t}from"tslib";import{maxUint8 as n}from"../../../../../core/typedArrayUtil.js";import{hasNativeFloat16Array as e}from"../../../../../geometry/support/float16.js";import{FloatBindUniform as o}from"../shaderModules/FloatBindUniform.js";import{glsl as i,If as u}from"../shaderModules/glsl.js";import{ShaderTechniqueConfiguration as a,parameter as r}from"../shaderTechnique/ShaderTechniqueConfiguration.js";function s(t){switch(t.elementType){case"float":switch(t.elementCount){case 1:return i`float`;case 2:return i`vec2`;case 3:return i`vec3`;case 4:return i`vec4`;case 9:return i`mat3`;default:t.elementCount}break;case"int":switch(t.elementCount){case 1:return i`int`;case 2:return i`ivec2`;case 3:return i`ivec3`;case 4:return i`ivec4`;case 9:throw new Error("Invalid element count 9 for type int");default:t.elementCount}break;case"uint":switch(t.elementCount){case 1:return i`uint`;case 2:return i`uvec2`;case 3:return i`uvec3`;case 4:return i`uvec4`;case 9:throw new Error("Invalid element count 9 for type uint");default:t.elementCount}break;default:t.elementType}throw new Error("unsupported field")}const c=new o("constNaN",()=>NaN,{supportsNaN:!0});class p extends a{constructor(t){super(),this.supportNaN=t}}function f(t,n){const e=n?.supportNaN;e&&(t.uniforms.add(c),t.code.add(i`bool bitsEncodeFloat16NaN(highp uint bits) {
3
3
  const highp uint nanExponent = 0x00007c00u;
4
4
  highp uint exponent = bits & nanExponent;
5
5
  highp uint mantissa = bits & 0x000003ffu;
6
6
  return exponent == nanExponent && mantissa != 0u;
7
- }`)),t.code.add(u`
8
- mediump float unpackHalf1x16(highp uint bits0, highp uint bits1) {
9
- highp uint halfBits = (bits1 << 8u) | bits0;
10
- ${s(e,u`
11
- if (bitsEncodeFloat16NaN(halfBits)) {
12
- return const_NaN;
7
+ }`)),t.code.add(i`
8
+ mediump float unpackHalf1x16(highp uint bits) {
9
+ ${u(e,i`
10
+ if (bitsEncodeFloat16NaN(bits)) {
11
+ return constNaN;
13
12
  }`)}
14
- return unpackHalf2x16(halfBits).x;
15
- }`)}function h(t,n){const e=n?.supportNaN;e&&(t.uniforms.add(p),t.code.add(u`bool bitsEncodeFloat32NaN(highp uint bits) {
13
+ return unpackHalf2x16(bits).x;
14
+ }`),t.code.add(i`
15
+ mediump vec2 unpackHalf2x16NaNSupport(highp uint bits) {
16
+ vec2 result = unpackHalf2x16(bits);
17
+ ${u(e,i`
18
+ if (bitsEncodeFloat16NaN(bits)) {
19
+ result.x = constNaN;
20
+ }
21
+ if (bitsEncodeFloat16NaN(bits >> ${i.uint(k[2])})) {
22
+ result.y = constNaN;
23
+ }
24
+ `)}
25
+ return result;
26
+ }`)}function l(t,n){const e=n?.supportNaN;e&&(t.uniforms.add(c),t.code.add(i`bool bitsEncodeFloat32NaN(highp uint bits) {
16
27
  const highp uint nanExponent = 0x7f800000u;
17
28
  highp uint exponent = bits & nanExponent;
18
29
  highp uint mantissa = bits & 0x007fffffu;
19
30
  return exponent == nanExponent && mantissa != 0u;
20
- }`)),t.code.add(u`
21
- highp float unpackFloat1x32(highp uint bits0, highp uint bits1, highp uint bits2, highp uint bits3) {
22
- highp uint floatBits = (bits3 << 24u) |(bits2 << 16u) | (bits1 << 8u) | bits0;
23
- ${s(e,u`
24
- if (bitsEncodeFloat32NaN(floatBits)) {
25
- return const_NaN;
31
+ }`)),t.code.add(i`
32
+ highp float unpackFloat1x32(highp uint bits) {
33
+ ${u(e,i`
34
+ if (bitsEncodeFloat32NaN(bits)) {
35
+ return constNaN;
26
36
  }`)}
27
- return uintBitsToFloat(floatBits);
28
- }`)}function $(t){t.code.add(u`mediump int unpackInt1x16(highp uint bits0, highp uint bits1) {
29
- highp uint rawBits = (bits1 << 8u) | bits0;
30
- highp uint signExtendedBits = (rawBits & 0x8000u) != 0u ? (rawBits | 0xffff0000u) : rawBits;
37
+ return uintBitsToFloat(bits);
38
+ }`)}function d(t){t.code.add(i`mediump int unpackInt1x16(highp uint bits) {
39
+ highp uint signExtendedBits = (bits & 0x8000u) != 0u ? (bits | 0xffff0000u) : bits;
31
40
  return int(signExtendedBits);
32
- }`)}function d(t){const{fieldType:n}=t;return`${(0,N[n])(v(t))}`}function m(t,n){const e=[];for(let i=0;i<t.length;i+=4){const n=t[i],o=t[i+1],s=t[i+2],a=t[i+3],r=u`unpackFloat1x32(${`${n}, ${o}, ${s}, ${a}`})`;e.push(r)}return e.join(n)}function x(t){return u`vec2(${m(t,", ")})`}function b(t){return u`vec3(${m(t,",\n\t")})`}function g(t){return u`mat3(${m(t,",\n")})`}t([r()],f.prototype,"supportNaN",void 0);const N={u8:t=>u`${t[0]}`,unorm8:t=>u`float(${t[0]})/${u.float(e)}`,vec4unorm8:t=>u`vec4(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})/${u.float(e)}`,snorm16:t=>u`max(float(unpackInt1x16(${`${t[0]}, ${t[1]}`}))/${u.float(n)}, -1.0)`,vec2snorm16:t=>u`max(vec2(unpackInt1x16(${`${t[0]}, ${t[1]}`}), unpackInt1x16(${`${t[2]}, ${t[3]}`}))/${u.float(n)}, vec2(-1.0))`,f16:i?t=>u`unpackHalf1x16(${`${t[0]}, ${t[1]}`})`:t=>u`unpackFloat1x32(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})`,f32:t=>u`unpackFloat1x32(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})`,vec4u8:t=>u`uvec4(${`${t[0]}, ${t[1]}, ${t[2]}, ${t[3]}`})`,vec2f32:t=>x(t),vec3f32:t=>b(t),mat3f32:t=>g(t)};function v(t){const{startTexel:n,byteOffset:e,texelByteStride:i,byteSize:o}=t;let s=n,a=e%i;const r=new Array;for(let c=0;c<o;++c){const t=u`texel${u.int(s)}.${w[a]}`;r.push(t),++a,a>=i&&(a=0,++s)}return r}const w=["x","y","z","w"];export{f as TextureBufferNaNSupportConfiguration,d as glslDecodeField,c as glslType,h as unpackFloat1x32,l as unpackHalf1x16,$ as unpackInt1x16};
41
+ }`)}function h(t,n){const{fieldType:e}=t;return`${(0,g[e])(y(t,n))}`}function m(t,n){const e=[];for(const o of t){const t=i`unpackFloat1x32(${o})`;e.push(t)}return e.join(n)}t([r()],p.prototype,"supportNaN",void 0);const x=t=>i`${t[0]}`,N=t=>{const n=t[0],e=i`uvec4(${i.uint(k[0])}, ${i.uint(k[1])}, ${i.uint(k[2])}, ${i.uint(k[3])})`,o=i`uvec4(${i.hexuint(w[1])})`;return i`((uvec4(${n}) >> ${e}) & ${o})`},$=t=>i`(float(${x(t)})/${i.float(n)})`,b=t=>i`unpackFloat1x32(${t[0]})`,v=t=>i`vec4(${m(t,", ")})`,g={u8:x,unorm8:$,vec4unorm8:t=>i`(vec4(${N(t)})/${i.float(n)})`,snorm16:t=>i`unpackSnorm2x16(${t[0]}).x`,vec2snorm16:t=>i`unpackSnorm2x16(${t[0]})`,f16:e?t=>i`unpackHalf1x16(${t[0]})`:b,vec4f16:e?t=>i`vec4(unpackHalf2x16NaNSupport(${t[0]}), unpackHalf2x16NaNSupport(${t[1]}))`:v,f32:b,vec4u8:N,vec2f32:t=>i`vec2(${m(t,", ")})`,vec3f32:t=>i`vec3(${m(t,", ")})`,vec4f32:v,mat3f32:t=>i`mat3(${m(t,",\n")})`};function y(t,n){const{byteOffset:e,byteSize:o}=t,u=n.channelByteStride,a=n.byteStride,r=Math.ceil(o/E),s=F[n.channels],c=new Array;for(let p=0;p<r;++p){const t=p*E,n=e+t,r=o-t,f=Math.min(r,E);let l=0;const d=new Array;for(;l<f;){const t=n+l,e=Math.floor(t/a),o=t%a,r=Math.floor(o/u),c=o%u,p=u-c,h=f-l,m=Math.min(p,h),x=i`texel${i.int(e)}${s[r]}`,N=4===m?"":i` & ${i.hexuint(w[m])}`,$=0===c?"":i` >> ${i.uint(k[c])}`,b=i`((${x}${$})${N})`,v=0===l?"":i` << ${i.uint(k[l])}`,g=i`(${b})${v}`;d.push(g),l+=m}c.push(i`(${d.join(" | ")})`)}return c}const E=4,k=[0,8,16,24],w=[0,255,65535,16777215,4294967295],F={1:[i``],2:[i`.x`,i`.y`],4:[i`.x`,i`.y`,i`.z`,i`.w`]};export{p as TextureBufferNaNSupportConfiguration,h as glslDecodeField,s as glslType,l as unpackFloat1x32,f as unpackHalf,d as unpackInt1x16};
@@ -24,7 +24,7 @@ forwardObjectAndLayerIdColor();`),f.include(c,g),O.main.add(p`
24
24
  forwardTextureCoordinates();`),O.include(r,g),f.include(c,g),O.main.add(p`
25
25
  discardBySlice(vpos);
26
26
  ${v(V,p`vec4 texColor = texture(tex, ${A?"colorUV":"vuv0"});
27
- discardOrAdjustAlpha(texColor);`)}
27
+ discardOrAdjustAlpha(texColor);`)}
28
28
 
29
29
  ${2===b?p`vec3 normal = screenDerivativeNormal(vPositionView);`:p`vec3 normal = normalize(vNormalWorld);
30
30
  if (gl_FrontFacing == false){
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{FloatDrawUniform as a}from"../../shaderModules/FloatDrawUniform.js";import{FloatPassUniform as o}from"../../shaderModules/FloatPassUniform.js";import{alphaCutoff as d}from"../../../shaders/alphaCutoff.glsl.js";function e(a,d){t(a,d,new o("textureAlphaCutoff",a=>a.textureAlphaCutoff))}function r(o,d){t(o,d,new a("textureAlphaCutoff",a=>a.textureAlphaCutoff))}function t(a,o,e){const r=a.fragment;switch(r.code.add("void discardOrAdjustAlpha(inout vec4 color) {"),o.alphaDiscardMode){case 1:r.code.add("color.a = 1.0;");break;case 0:r.include(d),r.code.add("if (color.a < alphaCutoff) discard;");break;case 3:r.uniforms.add(e).code.add("if (color.a < textureAlphaCutoff) discard;");break;case 2:r.uniforms.add(e).code.add("\n if (color.a < textureAlphaCutoff) discard;\n color.a = 1.0;\n ");break;case 4:break;default:o.alphaDiscardMode}r.code.add("}")}export{r as DiscardOrAdjustAlphaDraw,e as DiscardOrAdjustAlphaPass};
2
+ import{ShaderOutputConfiguration as a}from"../ShaderOutputConfiguration.js";import{FloatDrawUniform as o}from"../../shaderModules/FloatDrawUniform.js";import{FloatPassUniform as r}from"../../shaderModules/FloatPassUniform.js";import{alphaCutoff as d}from"../../../shaders/alphaCutoff.glsl.js";class e extends a{constructor(){super(...arguments),this.alphaDiscardMode=0}}function t(a,o){c(a,o,new r("textureAlphaCutoff",a=>a.textureAlphaCutoff))}function s(a,r){c(a,r,new o("textureAlphaCutoff",a=>a.textureAlphaCutoff))}function c(a,o,r){const e=a.fragment;switch(e.code.add("void discardOrAdjustAlpha(inout vec4 color) {"),o.alphaDiscardMode){case 1:e.code.add("color.a = 1.0;");break;case 0:0!==o.output&&(e.include(d),e.code.add("if (color.a < alphaCutoff) discard;"));break;case 3:0!==o.output&&e.uniforms.add(r).code.add("if (color.a < textureAlphaCutoff) discard;");break;case 2:e.uniforms.add(r).code.add("\n if (color.a < textureAlphaCutoff) discard;\n color.a = 1.0;\n ");break;case 4:break;default:o.alphaDiscardMode}e.code.add("}")}export{e as DiscardOrAdjustAlphaConfiguration,s as DiscardOrAdjustAlphaDraw,t as DiscardOrAdjustAlphaPass};
@@ -5,22 +5,20 @@ import{splatAtlasTextureWidth as e,elementsPerSplatPage as a}from"../../../../su
5
5
  uint x = instanceID % orderTextureWidth;
6
6
  uint y = instanceID / orderTextureWidth;
7
7
 
8
- uvec4 packedGaussianIndex = texelFetch(splatOrderTexture, ivec2(x, y), 0);
9
-
10
- return packedGaussianIndex.r | (packedGaussianIndex.g << 8u) | (packedGaussianIndex.b << 16u);
8
+ return texelFetch(splatOrderTexture, ivec2(x, y), 0).r;
11
9
  }
12
10
 
13
11
  uvec4 fetchPackedGaussian(uint gaussianIndex) {
14
- uint gaussianIndexX = gaussianIndex & ${s}u;
15
- uint gaussianIndexY = gaussianIndex >> ${t}u;
12
+ uint gaussianIndexX = gaussianIndex & ${t}u;
13
+ uint gaussianIndexY = gaussianIndex >> ${s}u;
16
14
 
17
15
  return texelFetch(splatAtlasTexture, ivec2(gaussianIndexX, gaussianIndexY), 0);
18
16
  }
19
17
 
20
18
  uvec4 fetchPackedGaussianHeader(uint gaussianIndex) {
21
19
  uint headerIndex = gaussianIndex | ${u}u;
22
- uint headerIndexX = headerIndex & ${s}u;
23
- uint headerIndexY = headerIndex >> ${t}u;
20
+ uint headerIndexX = headerIndex & ${t}u;
21
+ uint headerIndexY = headerIndex >> ${s}u;
24
22
 
25
23
  return texelFetch(splatAtlasTexture, ivec2(headerIndexX, headerIndexY), 0);
26
24
  }
@@ -35,4 +33,4 @@ import{splatAtlasTextureWidth as e,elementsPerSplatPage as a}from"../../../../su
35
33
  uint fetchGaussianPageIndex(uint gaussianIndex) {
36
34
  return gaussianIndex >> ${d}u;
37
35
  }
38
- `)}const s=""+(e-1),t=`${Math.log2(e)}`,u=""+(a-1),d=`${Math.log2(a)}`;export{i as GaussianSplatTextureFetch};
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.2/LICENSE.txt */
2
- import{C as i}from"../../../../chunks/Compositing.glsl.js";import{CompositingTechnique as s}from"../shaders/CompositingTechnique.js";import{CompositingTechniqueConfiguration as t}from"../shaders/CompositingTechniqueConfiguration.js";class o{constructor(s,o){this._rctx=s,this._techniques=o,this._configuration=new t,this._passParameters=new i}precompile(i,t,o){this._configuration.blendEmissive=o,i&&(this._configuration.mode=2,this._techniques.precompile(s,this._configuration)),t&&(this._configuration.mode=1,this._techniques.precompile(s,this._configuration)),this._configuration.mode=3,this._techniques.getCompiled(s,this._configuration)}compositePreMultipliedAlpha(i,s,t=i.hasEmission){this._composite(i,s,2,t)}composite(i,s){this._composite(i,s,1,i.hasEmission)}blitDepthToLinearDepth(i,s){this._composite(i,s,3)}_composite(i,t,o,e=!1){this._configuration.mode=o,this._configuration.blendEmissive=e,this._passParameters.texture=t;const n=this._techniques.get(s,this._configuration);this._rctx.bindTechnique(n,i,this._passParameters),this._rctx.screen.draw()}}export{o as Compositor};
2
+ import{C as i}from"../../../../chunks/Compositing.glsl.js";import{CompositingTechnique as s}from"../shaders/CompositingTechnique.js";import{CompositingTechniqueConfiguration as t}from"../shaders/CompositingTechniqueConfiguration.js";class o{constructor(s,o){this._rctx=s,this._techniques=o,this._configuration=new t,this._passParameters=new i}precompile(i,t,{hasOpaqueEmission:o,hasTransparentEmission:e}){i&&(this._configuration.blendEmissive=o||e,this._configuration.mode=2,this._techniques.precompile(s,this._configuration)),this._configuration.blendEmissive=o,t&&(this._configuration.mode=1,this._techniques.precompile(s,this._configuration)),this._configuration.mode=3,this._techniques.getCompiled(s,this._configuration)}compositePreMultipliedAlpha(i,s,t=i.hasEmission){this._composite(i,s,2,t)}composite(i,s){this._composite(i,s,1,i.hasEmission)}blitDepthToLinearDepth(i,s){this._composite(i,s,3)}_composite(i,t,o,e=!1){this._configuration.mode=o,this._configuration.blendEmissive=e,this._passParameters.texture=t;const n=this._techniques.get(s,this._configuration);this._rctx.bindTechnique(n,i,this._passParameters),this._rctx.screen.draw()}}export{o as Compositor};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as s}from"../../../../core/asyncUtils.js";import has from"../../../../core/has.js";import{removeMaybe as i,abortMaybe as r,destroyMaybe as a,releaseMaybe as n,releaseReferencedMaybe as h}from"../../../../core/maybe.js";import{throwIfAborted as o}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as l,initial as u,sync as m}from"../../../../core/reactiveUtils.js";import{signal as _}from"../../../../core/signal.js";import{property as p,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{equals as f,invert as g,multiply as b,copy as P}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as I,create as E}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as w}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as A,ZEROS as C}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as S}from"../../../../geometry/support/Indices.js";import{RenderNodeOutput as T,InternalRenderCategory as R,AllRenderNodeOutputs as O,AllInternalRenderNodeOutputs as D}from"../../webgl.js";import{minNearDistanceInMeters as F}from"../../state/NearFarHeuristic.js";import{debugFlags as G}from"../../support/debugFlags.js";import{computeShadowsEnabled as N}from"../../support/sunUtils.js";import{FBOCache as H}from"../core/FBOCache.js";import{RenderPassManager as x}from"../core/renderPasses/RenderPassManager.js";import{isColor as y}from"../core/shaderLibrary/ShaderOutput.js";import{distanceFadeEnd as v}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as M}from"../effects/RenderNodes.js";import{RenderPluginManager as L}from"../effects/RenderPluginManager.js";import{WeatherFader as q}from"../effects/WeatherFader.js";import{innerAtmosphereFadeStart as U}from"../effects/atmosphere/atmosphereUtils.js";import{Blit as j}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as B,renderHighlightBuffer as V}from"../effects/highlight/Highlight.js";import{OITBlend as k}from"../effects/transparency/OITBlend.js";import{AnimationTimer as W}from"./AnimationTimer.js";import{AnimationTimeStep as Q}from"./AnimationTimeStep.js";import{BoundingInfo as z}from"./BoundingInfo.js";import{Compositor as Y}from"./Compositor.js";import{DepthRange as X}from"./DepthRange.js";import{depthRangeFromScene as $}from"./depthRangeUtils.js";import{MainFramebuffer as J}from"./MainFramebuffer.js";import{RenderContext as K,defaultRenderOccludedMask as Z}from"./RenderContext.js";import{RendererBase as ee}from"./RendererBase.js";import{setupFeatureDefaults as te}from"./RenderFeature.js";import{RenderPluginInput as se}from"./RenderPluginInput.js";import{ShadowAccumulator as ie}from"./ShadowAccumulator.js";import{ShadowMap as re}from"./ShadowMap.js";import ae from"./SliceHelper.js";import{MergedRenderer as ne}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as he}from"../parts/renderUtils.js";import{RendererPerformanceInfo as oe,PerformanceCategory as de}from"../statistics/RendererPerformanceInfo.js";import{ColorAttachment1 as le,PixelType as ue,ColorAttachment2 as me,ColorAttachment0 as _e,DrawBufferNone as pe}from"../../../webgl/enums.js";let ce=class extends ee{constructor(e,t,s,i,r){super({stage:e}),this._techniques=s,this._rctx=i,this._requestRender=r,this._pluginsHas={occludedHudElements:!1,hudElements:!1,water:!1},this.renderPassManager=new x,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=A(0,0,0,1),this._sliceHelper=new ae,this.sceneDepthRange=_(X.Infinite),this._state=_(2),this._hasGlobalIlluminationFlag=!!has("global-illumination"),this._hasAnimations=!1,this._animationTimestep=new Q,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=_(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new se,this._hasTransparentGeometry=!1,this._releaseNodeInputs=e=>{for(const t of Re)e.some(({name:e})=>e===t)&&this._pluginInput.release(t)},this._testsNeedsDepth=!1,this._fboCache=new H(i),this._compositor=new Y(i,s),this._renderStateFeatures=_(te(e.view.qualityProfile));const a=new re(this._fboCache,e.viewingMode);this._renderContext=new K(this._rctx,a,s),this._framebuffer=new J(this._fboCache,this._bindParameters),this._performanceInfo=new oe(this._rctx),this._blit=new j(s),this._shadowAccumulator=new ie(this.fboCache,s,e,e=>{const t=this.shadowsEnabled;a.enabled=!0,this._ensureBindParametersCamera(e.camera,e.contentCamera),this._plugins.prepareRender(),a.enabled=t},(t,s,i)=>{const r=e.view.qualitySettings.maximumPixelRatio;t.shadowMap.start(t.camera,s,i,!0,r),this._renderShadowCascades(5,t.shadowMap),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera)},r),this._nodes=new M(this._renderContext),this._plugins=new L({renderContext:this._renderContext,techniques:s,materials:t,requestRender:r,controller:e}),this._plugins.add(this.renderPassManager),this.weatherFader=new q({view:e.view,context:this._renderContext}),this.addHandles([d(()=>e.view.state.camera,()=>r(),l),d(()=>G.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},r()},u),d(()=>e.view.environment.background?.color,e=>{const t=e?e.toUnitRGBA():C;w(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),r()},l),d(()=>e.view.state.camera.relativeElevation,e=>this._inGlobeView=(e??1/0)>=v,l),d(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},m),d(()=>this._bindParameters.clouds.data?.state,()=>r(),m),d(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,r()},u),d(()=>"sun"===e.view.environment.lighting?.type,e=>{this._bindParameters.enableFillLights=e,this._requestRender()},l)])}destroy(){this._gpuTimerHandle=i(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowAccumulator.destroy(),this._shadowAccumulator=null,this._loadEdgeViewTask=r(this._loadEdgeViewTask),this._edgeView=a(this._edgeView),this.renderPassManager.dispose(),this.weatherFader=a(this.weatherFader),this._releaseFBOs(),this._disposeOffscreenBuffers(),this._fboCache.destroy(),this._fboCache=null,this._renderContext.destroy(),this._plugins.destroy(),this._pluginInput=null,this._oitBlendOrNil=null,this._nodes=null,this._framebuffer=null,this._performanceInfo=null,z.prune(),ne.prune(),S()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _oitBlend(){return this._oitBlendOrNil??=new k(this._techniques),this._oitBlendOrNil}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=te(e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,s){this._renderStateFeatures.mutate(i=>i.set(t,e,s)),this._requestRender()}setTime(e){this._renderContext.time=e}get hasReflections(){return this._bindParameters.screenSpaceReflections.enabled=this._pluginsHas.water&&this.isFeatureEnabled(4),this._bindParameters.screenSpaceReflections.enabled}get _hasHighlights(){return this._plugins.produces(10,2,4,18,12,13,14)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(10,12,13,14)}get hasAmbientIllumination(){return this.isFeatureEnabled(3)&&!this._inGlobeView}get hasGlobalIllumination(){return this._hasGlobalIlluminationFlag&&this.hasAmbientIllumination}get hasGlobalIlluminationHighQuality(){return this.hasGlobalIllumination&&this.isFeatureEnabled(10)}get _keepGlobalIlluminationShadingAlive(){return this._hasGlobalIlluminationFlag&&!this._inGlobeView}get hasSMAA(){return this.isFeatureEnabled(0)}get _emissions(){return this._plugins.emissions}get hasFloatBlend(){return this._rctx.driverTest.floatBufferBlend.result&&this.isFeatureEnabled(9)}get highResolutionAtmosphere(){return this.isFeatureEnabled(2)}get fboCache(){return this._fboCache}_releaseFBOs(){this._bindParameters.hudOcclusion=n(this._bindParameters.hudOcclusion),this._bindParameters.depth=null}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._bindParameters.globalIllumination=n(this._bindParameters.globalIllumination),this._bindParameters.reprojection.lastFrameDepth=n(this._bindParameters.reprojection.lastFrameDepth),this._bindParameters.reprojection.lastFrameEmission=n(this._bindParameters.reprojection.lastFrameEmission),this._disposeBindBuffers()}_disposeBindBuffers(){this._bindParameters.shadowMap.disposeOutputs()}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._shadowAccumulator.readyToRun||this._plugins.updating||this.weatherFader?.readyToRun||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=s(async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");o(e);const s=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:Ne(this.stage.view.resourceController)});return this.addHandles(d(()=>s.updating,()=>this._requestRender(),m)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(s)),this._edgeViewCallbacks.length=0,s})),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&f(this._bindParameters.reprojection.matrix,I)}set _reprojectionMatrix(e){t(this._bindParameters.reprojection.matrix,e)&&this._reprojectionMatrixVersion.value++}modifyShadowsEnabled(){const e=this.stage.view.environmentManager.referencePositionGeographic,t=null==e||N(e[2],this.stage.viewingMode),s=this.stage.view.environment.lighting.directShadowsEnabled&&t;this._bindParameters.shadowMap.enabled!==s&&(this._bindParameters.shadowMap.enabled=s,this._requestRender(1))}get shadowsEnabled(){return!!this._bindParameters.shadowMap.enabled}setParameters(e){e.shadowCast&&this._shadowAccumulator.setParameters(e.shadowCast)}set slice(e){this._sliceHelper.update(e)&&this._requestRender()}get plugins(){return this._plugins}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}addRenderer(e){this._plugins.add(e)}removeRenderer(e){this._plugins.remove(e)}get occludedRequiresStencil(){return this._occludedRequiresOccludeeStencil||this.occludedRequiresIntegratedMeshStencil}get _occludedRequiresOccludeeStencil(){return this._bindParameters.hasOccludees&&!!(8&this.plugins.renderOccludedFlags)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,9)}updateHasFlags(){const has=this._pluginsHas;has.occludedHudElements=this._plugins.produces(0,13),has.hudElements=has.occludedHudElements||this._plugins.produces(0,...we),has.water=this._plugins.produces(4,19),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new W(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const s=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==s&&(this._gpuTimerHandle=s?i(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,s=!1){try{return this._isRendering=!0,this._render(e,t,s)}catch(i){console.error(`Exception during rendering: ${i}:\n${i.stack}`)}finally{this._isRendering=!1}return new he(this._pluginInput.get(T.FINAL),null)}_render(e,t,s){const i=0===t;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=i,this._disposeBindBuffers();const{camera:r,contentCamera:a,mode:o,alignPixelEnabled:d}=e;this._state.value=o,this._bindParameters.output=0,this._bindParameters.emissions=this._emissions,this._bindParameters.alignPixelEnabled=d,this._bindParameters.decorations=!s,this._bindParameters.mainDepth=null,this._bindParameters.useFloatBlend.value=this.hasFloatBlend;const l=!s||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=l?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(R.VIEWSHED),this._bindParameters.cutFillComputationEnabled=this._nodes.produces(R.CUTFILL_COMPUTATION),this._bindParameters.cutFillVisualizationEnabled=this._nodes.produces(R.CUTFILL_COLOR),this._renderOverlay(),r.setGLViewport(this._rctx);const u=this._framebuffer,m=u.initialize(r.fullWidth,r.fullHeight,this._backgroundColor),_=this._needsLastFrameColor;_?(m?.retain(_-1),m?.setName("last frame color"),this._bindParameters.reprojection.lastFrameColor=m):m?.release(),this._ensureBindParameters(r,a),this._plugins.sortTestsTransparentOrderedSlots(Ce),this._plugins.prepareRender(),this._bindParameters.hasShadowHighlights=this._needsShadowHighlight&&!s,this._hasTransparentGeometry=this._plugins.produces(0,...ge),this._precompilePrepasses(),this.performanceInfo.advance(de.PREPARE);const p=this._computeShadowDepthRange(r);this._pluginInput.set("normals",this._renderNormals()),this._renderAmbientIlluminationAndDepth(),this._renderShadowMap(r,a,this._bindParameters.lighting.mainLight.direction,p),this._renderShadowAccumulation(p,!i),u.bind(),this._bindParameters.mainDepth=u.depth.attachment,this._precompileShaders(i),this._bindParameters.output=0,this._renderOpaque(),this._renderPreTransparent(),this._renderTransparent(),this.hasReflections&&(this._bindParameters.depth=h(this._bindParameters.depth),this._bindParameters.reprojection.lastFrameColor=h(this._bindParameters.reprojection.lastFrameColor)),this._bindParameters.shadowMap.disposeOutput(5),this._renderCutFillComputation(),this._pluginInput.set(R.FOCUSAREA,this._renderFocusAreaGeometry()),u.update(e=>this._renderNodes(R.TRANSPARENT_ENVIRONMENT,e)),u.update(e=>this._renderNodes(R.VIEWSHED,e)),u.update(e=>this._renderNodes(R.LASERLINES,e)),this._nodes.requireGeometryDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),u.update(e=>this._renderNodes(R.FOCUSAREA_COLOR,e)),u.update(e=>this._renderNodes(R.CUTFILL_COLOR,e)),this._pluginInput.release(R.FOCUSAREA),this._pluginInput.release(R.GROUND_DEPTH),u.update(e=>this._renderNodes(R.OCCLUDED,e)),this._pluginInput.set("highlights",this._renderHighlightPrepass());const c=2===t?this._renderObjectAndLayerIdColor():null;u.update(e=>this._renderNodes(T.COMPOSITE,e)),this._bindParameters.shadowMap.disposeOutputs(),this._bindParameters.shadowHighlight=n(this._bindParameters.shadowHighlight),this.hasGlobalIllumination&&0!==this._emissions&&(this._bindParameters.reprojection.lastFrameEmission=u.color.obtainAttachment(le)),u.update(e=>this._renderNodes(R.ANTIALIASING,e));const f=this._hasTransparentGeometry?2:1,g=this._bindParameters.emissions;let b;return this._bindParameters.emissions=0,this._hasHUDHighlights&&u.update(e=>this._renderHUD(f,e)),u.update(e=>this._renderNodes(R.HIGHLIGHT_COLOR,e)),this._hasHUDHighlights||u.update(e=>this._renderHUD(f,e)),this._bindParameters.emissions=g,u.update(e=>this._renderNodes(R.MAGNIFIER,e)),u.update(e=>this._renderNodes(T.FINAL,e)),i&&this._blit.toFramebuffer(u.color,this._bindParameters),this.hasGlobalIllumination&&(this._bindParameters.reprojection.lastFrameDepth=this._bindParameters.depth),this._testsNeedsDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),this._releaseFBOs(),u.releaseDepth(),this._bindParameters.reprojection.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),i||(b=u.color,b.retain(),this._releaseFBOs(),this._disposeOffscreenBuffers()),this.performanceInfo.finishFrame(),new he(b,c)}_precompileShaders(e){++this._plugins.context.techniques.precompiling;const t=this._bindParameters;t.output=0;const s=t.emissions;if(this._precompileOpaqueGeometry(),this._nodes.precompile(t.hasOpaqueEmission,R.OPAQUE_ENVIRONMENT,R.GAUSSIAN_SPLAT,R.OPAQUE_OCCLUSION_QUERY,R.VOXEL),this._precompileOpaqueGeometry(),t.output=3,this._plugins.precompile(...be),t.output=0,this._plugins.precompile(...be),this._hasTransparentGeometry){const e=this._pluginsHas.occludedHudElements;this._oitBlend.precompile(t,e,0),this._pluginsHas.hudElements&&this._oitBlend.precompile(t,!1,1),this._precompileTransparentGeometry(),t.hasTransparentEmission&&(t.emissions=3)}this._nodes.precompile(t.hasOpaqueEmission,R.FOCUSAREA),this._compositor.precompile(this._usesPremultipliedAlphaBlit,!!this._needsEdges,t.hasOpaqueEmission),this._hasTransparentGeometry||this._plugins.precompile(15),this._nodes.precompile(t.hasOpaqueEmission,R.TRANSPARENT_ENVIRONMENT,R.VIEWSHED,R.CUTFILL_COMPUTATION,R.CUTFILL_COLOR,R.LASERLINES,R.FOCUSAREA_COLOR,R.OCCLUDED,R.ANTIALIASING),t.highlightMixTexture=t.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(0),t.emissions=0,this._precompileHUD(0),this._precompileHUD(1),t.emissions=s,this._hasHighlights&&(t.highlights.forEach((e,s)=>{t.highlightLevel=s,this._precompileAllGeometry(10),this._hasHUDHighlights&&this._plugins.precompile(13,12)}),t.highlightLevel=null,this._nodes.precompile(t.hasOpaqueEmission,R.HIGHLIGHT_COLOR)),t.highlightMixTexture=null,this._nodes.precompile(t.hasOpaqueEmission,T.COMPOSITE,R.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(8),t.hasOpaqueEmission&&(t.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.precompile(8),t.transparentWithoutDepthEmissionDimmingPass=!1),e&&this._blit.precompile(),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){const e=this._nodes.produce(R.FOCUSAREA,this._pluginInput);return e&&this.performanceInfo.advance(de.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces("olid"))return null;const e=this._bindParameters.output;++this._techniques.precompiling;const{width:t,height:s}=this._framebuffer.size;let i=this.fboCache.acquire(t,s,"olid");return i.acquireDepth(14),i=this._nodes.render(i,this._pluginInput),--this._techniques.precompiling,this.performanceInfo.advance(de.OBJECT_AND_LAYER_ID_COLOR),this._bindParameters.output=e,i}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,s=0===e;if(s||t){const e=s?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const r=Math.max(e,i);this._animationTimestep.frame(r,s)}}readMainDepth(e,t){const{mainDepth:s,camera:i}=this._bindParameters;if(!s)return;const r=this.fboCache.acquire(this._framebuffer.size.width,this._framebuffer.size.height,"linear depth");this._rctx.bindFramebuffer(r.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(C),this._compositor.blitDepthToLinearDepth(this._bindParameters,s),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),r.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,ue.UNSIGNED_BYTE,t),r.release()}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}get _needsEdges(){return this._edgeView?.shouldRender()?this._edgeView:null}_renderEdges(e){const t=this._needsEdges;if(!t)return;const{width:s,height:i}=this._framebuffer.size,r=this.fboCache.acquire(s,i,"edges");r.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(C),t.render(this._bindParameters,e),r.detachDepth(),this._framebuffer.bind(),this._compositor.composite(this._bindParameters,r.getTexture()),r.release(),this.performanceInfo.advance(1===e?de.OPAQUE_EDGES:de.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(de.OVERLAY)}_renderShadowMap(e,t,s,i){if(!this.shadowsEnabled)return;const r=this._bindParameters.shadowMap;if(r.start(e,s,i,this.isFeatureEnabled(5),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight){this._renderShadowCascades(6,r),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t);const s=this._bindParameters.output;this._bindParameters.output=0,this._bindParameters.shadowHighlight=this._nodes.produce(R.SHADOW_HIGHLIGHT,this._pluginInput),this._bindParameters.output=s,r.disposeOutput(6),r.clear(),this._renderShadowCascades(7,r)}else this._renderShadowCascades(5);e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this._needsShadowHighlight&&(this._bindParameters.depth=h(this._bindParameters.depth)),this.performanceInfo.advance(de.SHADOW_MAP)}_renderCutFillComputation(){this._nodes.produce(R.CUTFILL_COMPUTATION,this._pluginInput)?.release()}_precompileShadowCascades(e){0!==this._bindParameters.shadowMap.cascades.length&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._bindParameters.shadowMap){const s=this._bindParameters.output,i=t===this._bindParameters.shadowMap&&6!==e;t.bindFramebuffer();for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e),i&&this._renderShadowCasterNodes();t.finish(e),this._bindParameters.output=s}_renderShadowCasterNodes(){if(!this._nodes.produces(R.SHADOW_CASTERS))return;const e=this._bindParameters.shadowMap.renderTarget;if(!e)return;const t=e.name;e.setName(R.SHADOW_CASTERS),this._pluginInput.set(R.SHADOW_CASTERS,e);try{this._nodes.render(e,this._pluginInput,this._releaseNodeInputs)}finally{e.setName(t),this._pluginInput.set(R.SHADOW_CASTERS,null)}}get _needsLastFrameColor(){return+this.hasReflections+ +this.hasGlobalIllumination}get _needsDepth(){return+this._nodes.requireGeometryDepth+ +this.hasReflections+ +this.hasGlobalIllumination+ +this._shadowAccumulator.requiresDepth+ +this._testsNeedsDepth}get _usesPremultipliedAlphaBlit(){return this._pluginsHas.hudElements}_renderAmbientIlluminationAndDepth(){this._bindParameters.depth=n(this._bindParameters.depth);const e=this._pluginInput.get("normals");if(e){this._pluginInput.set(R.AMBIENT_ILLUMINATION,this._hasGlobalIlluminationFlag?this._renderGlobalIllumination():this._renderSSAO());const t=this._needsDepth;t?(this._rctx.bindFramebuffer(e.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(3),this._bindParameters.depth=e.obtainDepthTexture(),this._bindParameters.depth?.retain(t-1),this.performanceInfo.advance(de.DEPTH)):e.detachDepth(),this.hasAmbientIllumination&&this._pluginInput.release("normals")}else this._hasGlobalIlluminationFlag&&(this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive),this._renderAllGeometryDepth()}_renderAllGeometryDepth(){const e=this._needsDepth;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"geometry depth",14);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(1280),this.renderAllGeometry(3),this._bindParameters.depth=i.obtainDepthTexture(),this._bindParameters.depth?.retain(e-1),i.release(),this.performanceInfo.advance(de.DEPTH)}get _needsShadowDepthRange(){return this._bindParameters.shadowMap.enabled||this._shadowAccumulator.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return X.Zero;const t=$(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),this._bindParameters.shadowMap.enabled&&t.union(this._nodes.queryDepthRange(R.SHADOW_CASTERS,e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}updateSceneDepthRange(e){if(!this.stage.view.state.isGlobal)return void(this.sceneDepthRange.value=X.Infinite);if((this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<U)return void(this.sceneDepthRange.value=X.Infinite);const t=e.clone();t.near=F,t.far=1e10;const s=$(t,this._plugins.plugins,this.stage.layers,1);s.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(s)||(this.sceneDepthRange.value=s)}get _normalsRequired(){return this._nodes.require("normals",...O,R.VIEWSHED,R.LASERLINES)+(this.hasAmbientIllumination?1:0)}_precompilePrepasses(){this._normalsRequired?(this._precompilePlugins(4,Pe),this._needsDepth&&this._precompilePlugins(3,Ie)):this._needsDepth&&this._precompileAllGeometry(3),this.shadowsEnabled&&(this._needsShadowHighlight?(this._nodes.precompile(this._bindParameters.hasEmission,R.SHADOW_HIGHLIGHT),this._precompileShadowCascades(6),this._precompileShadowCascades(7)):this._precompileShadowCascades(5)),this._shadowAccumulator.active&&(this._shadowAccumulator.precompilePrepass(),this._precompileAllGeometry(5)),this.hasAmbientIllumination&&this._normalsRequired&&this._nodes.precompile(this._bindParameters.hasEmission,R.AMBIENT_ILLUMINATION)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"normals",5);i.acquireDepth(14),this._rctx.bindFramebuffer(i.fbo),this._rctx.clearFramebuffer(C,!0,!0),this._bindParameters.output=4,this._plugins.render(...Pe);const r=this._nodes.optional("normals",...O,R.VIEWSHED);return i.retain(e+r-1),this.performanceInfo.advance(de.NORMALS),i}_renderSSAO(){this._bindParameters.globalIlluminationEnabled=!1;const e=this._pluginInput.get("normals");return this.hasAmbientIllumination&&e?(this._bindParameters.ssao=this._nodes.produce(R.AMBIENT_ILLUMINATION,this._pluginInput),this._bindParameters.ssao&&this.performanceInfo.advance(this.hasGlobalIlluminationHighQuality?de.AMBIENT_ILLUMINATION_HIGH_QUALITY:de.AMBIENT_ILLUMINATION),this._bindParameters.ssao):null}_renderGlobalIllumination(){if(!this.hasGlobalIllumination)return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive,null;const e=this._nodes.produce(R.AMBIENT_ILLUMINATION,this._pluginInput);return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIllumination=e,this._bindParameters.globalIlluminationEnabled=!0,this.performanceInfo.advance(de.AMBIENT_ILLUMINATION),e}_releaseGlobalIlluminationBuffers(){const e=this._bindParameters;e.reprojection.lastFrameColor=h(e.reprojection.lastFrameColor),e.reprojection.lastFrameDepth=h(e.reprojection.lastFrameDepth),e.reprojection.lastFrameEmission=h(e.reprojection.lastFrameEmission),e.globalIllumination=h(e.globalIllumination),e.globalIlluminationEnabled=!1}_precompileAllGeometry(e){const t=this._bindParameters.output;this._bindParameters.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...be),this._bindParameters.output=t}renderAllGeometry(e){this._bindParameters.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const s of t)this._renderContext.renderOccludedMask=s,this.precompileSlots(e,...Ee);this._renderContext.renderOccludedMask=Z}renderSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.forAll(e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t)})}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>1&&this._plugins.render(9),this.renderSlots(e,...Ee),this._renderContext.renderOccludedMask=Z}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...Se[e])}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(16),this.renderHUD(e),this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){this._precompileAllGeometry(8)}precompileCutFillOrthographicReferenceDepth(){this._precompilePlugins(9,Te)}_precompilePlugins(e,t){const s=this._bindParameters.output;this._bindParameters.output=e,this._plugins.precompile(...t),this._bindParameters.output=s}renderViewshedShadowMap(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(8),this._ensureBindParametersCamera(t,s),this._bindParameters.camera.setGLViewport(this._rctx),this._bindParameters.output=i}renderCutFillOrthographicReferenceDepth(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._bindParameters.output=9,this._plugins.render(...Te),this._ensureBindParametersCamera(t,s),t.setGLViewport(this._rctx),this._bindParameters.output=i}get _needsGroundDepth(){return this._bindParameters.cutFillVisualizationEnabled}_blitGroundDepth(){if(!this._needsGroundDepth)return null;const{width:e,height:t}=this._framebuffer.size,s=this.fboCache.acquire(e,t,R.GROUND_DEPTH,14);return this._rctx.blitFramebuffer(this._framebuffer.color.fbo,s.fbo,256),this._framebuffer.bind(),s}_renderOpaqueAndTransparentGeometry(e){this._bindParameters.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._bindParameters.output=e,this._plugins.render(...Ie)}_precompileOpaqueGeometry(){this._needsOpaquePass&&(this._plugins.precompile(...fe),this._nodes.precompile(this._bindParameters.hasEmission,"opaque-color"))}_renderOpaqueGeometry(){this._plugins.render(...fe)}_renderTransparentGeometry(){this._plugins.render(...ge),this._hasTransparentGeometry&&this._plugins.render(15)}_renderTransparentGround(){this._plugins.render(...be)}_precompileHUD(e){if(!this._pluginsHas.hudElements)return;const t=this._bindParameters.output,s=this._bindParameters.hudRenderStyle;this._bindParameters.hudRenderStyle=e,this._bindParameters.output=1,this._plugins.precompile(...we),this._bindParameters.output=2,this._plugins.precompile(...we),this._bindParameters.output=0,this._oitBlend.precompile(this._bindParameters,!1,1),this._hasHighlights&&(this._bindParameters.output=10,this._plugins.precompile(...we)),this._bindParameters.output=t,this._bindParameters.hudRenderStyle=s}_renderHUD(e,t){if(!this._pluginsHas.hudElements)return t;const s=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo);const i=!!t.getTexture(le);return this._compositor.compositePreMultipliedAlpha(this._bindParameters,s.getTexture(),i),s.release(),this.performanceInfo.advance(0===e?de.HUD_OCCLUDED:de.HUD),t}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(6,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:s}=this,{width:i,height:r}=this._framebuffer.size,{highlights:a}=s,n=a.length>B?3:1,h=e.acquire(i,r,"highlights",n);h.acquireDepth(14);const o=this._plugins.produces(10,0);return o&&this._framebuffer.color.fbo&&h.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,h.fbo,1024),t.bindFramebuffer(h.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),o||t.clear(1024),this._bindParameters.output=10,t.bindFramebuffer(h.fbo),V(t,e,i,r,s,()=>this._renderHighlightGeometries()),h.detachDepth(),this.performanceInfo.advance(de.HIGHLIGHTS),h.retain(this._nodes.require("highlights",...D)+this._nodes.optional("highlights",...D)-1),h}_renderHighlightGeometries(){this._plugins.render(...Ae),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e,t){this._shadowAccumulator.updateDepthRange(e);const s=this._shadowAccumulator.requiresDepth;this._bindParameters.output=0,this._shadowAccumulator.renderAccumulation(this._bindParameters,t)&&this.performanceInfo.advance(de.ACCUMULATED_SHADOWS),s&&(this._bindParameters.depth=h(this._bindParameters.depth))}_precompileTransparentGeometry(){y(this._bindParameters.output)?(this._bindParameters.output=1,this._plugins.precompile(...ge),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=2,this._plugins.precompile(...ge),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=0):this._plugins.precompile(...ge)}_renderOIT(e,t=2){const s=1===e,{width:i,height:r}=this._framebuffer.size,a=s?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=h.useFloatBlend.value?8:5,d=h.output;h.output=1;const l=s?"oit hud":"oit",u=this.fboCache.acquire(i,r,l,o).acquireColor(le,this.hasFloatBlend?7:0,"oit alpha"),m=h.hasEmission&&(0===e||1!==t);m&&u.acquireColor(me,o,"oit emissive"),s||u.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(u.fbo),this._rctx.clearFramebuffer([0,0,0,1]),m&&this._rctx.clearBuffer(1,C),a(),u.detachDepth(),h.output=2;const _=this.fboCache.acquire(i,r,s?"oit front hud":"oit front");m&&_.acquireColor(le,o,"oit front emissive"),s?_.acquireDepth(this._hudDepthFormat):_.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(_.fbo),this._rctx.clearFramebuffer(C,s),a(),_.detachDepth();const p=this._pluginsHas.occludedHudElements&&!s,c=m?me:le;let f;return h.hudOcclusion=n(this._bindParameters.hudOcclusion),h.output=0,s?(f=this.fboCache.acquire(i,r,"oit composite hud"),this._rctx.bindFramebuffer(f.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):(0!==h.emissions&&this._framebuffer.ensureEmissionAttachment(),p&&(this._framebuffer.color.acquireColor(c,0,"hud occlusion"),this._rctx.clearBuffer(c-_e,C)),this._framebuffer.bind()),this._oitBlend.blend(this._rctx,u,_,h,p,e),f?.detachDepth(),s||(m&&(this._bindParameters.emissions=3),p&&(h.hudOcclusion=this._framebuffer.color.obtainAttachment(c))),_.release(),u.release(),h.output=d,f}get _hudDepthFormat(){return this.isFeatureEnabled(7)?14:13}get _needsOpaquePass(){return this.plugins.produces(0,...fe)||this.plugins.produces(5,...fe)||this.plugins.produces(3,3)}_renderOpaque(){const e=this._needsOpaquePass;e&&(this._plugins.render(0,1),this._pluginInput.set(R.GROUND_DEPTH,this._blitGroundDepth()),this._plugins.render(2,3));const t=this._framebuffer;t.update(t=>this._renderNodes(T.OPAQUE,t,e)),this.fboCache.debugCallback?.(T.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(R.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(R.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderPreTransparent(){this._framebuffer.update(e=>this._renderNodes(R.GAUSSIAN_SPLAT,e)),this.fboCache.debugCallback?.(R.GAUSSIAN_SPLAT,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(R.OPAQUE_OCCLUSION_QUERY,e)),this.fboCache.debugCallback?.(R.OPAQUE_OCCLUSION_QUERY,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(R.VOXEL,e)),this.fboCache.debugCallback?.(R.VOXEL,this._framebuffer.color.fbo)}_renderTransparent(){const e=this._framebuffer;this._renderHiddenTransparentEdges(),this._hasTransparentGeometry&&this._renderOIT(0),e.update(e=>this._renderNodes(T.TRANSPARENT,e,this._hasTransparentGeometry)),this.fboCache.debugCallback?.(T.TRANSPARENT,e.color.fbo),this._hasTransparentGeometry||this._plugins.render(15),this._renderEdges(0),this._bindParameters.ssao=n(this._bindParameters.ssao),this._renderTransparentEnvironment()}_renderTransparentEnvironment(){if(this._shadowAccumulator.render(this._bindParameters),this.performanceInfo.advance(de.APPLY_ACCUMULATED_SHADOWS),this._framebuffer.bind(),this._plugins.render(8),this._bindParameters.hasEmission){const e=this._rctx.setDrawBuffers([pe,le]);this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.render(8),this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!1,this._rctx.setDrawBuffers(e)}this.performanceInfo.advance(de.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderNodes(e,t,s=!1){const i=t.name;if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return s&&this.performanceInfo.advance(e),t;this._fboCache.debugCallback?.(i,t.fbo);const r=this._nodes.render(t,this._pluginInput,this._releaseNodeInputs);return this.performanceInfo.advance(e),r}_ensureBindParameters(e,t){this._ensureBindParametersCamera(e,t),this._ensureBindParametersWeatherFader(),this._ensureBindParametersScreenSpaceReflections(),this._ensureBindParametersReprojection()}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersWeatherFader(){1===this.stage.viewingMode&&(this._bindParameters.clouds.data&&(this._bindParameters.clouds.fade(this._bindParameters.camera,this.renderContext.time,this.stage.view.qualitySettings.fadeDuration),this.weatherFader?.cleanupCubemap()),this._bindParameters.snowCover=this.weatherFader?.snowCover??0)}_ensureBindParametersScreenSpaceReflections(){const{time:e}=this.renderContext,{screenSpaceReflections:t}=this._bindParameters;if(this.hasReflections){null==this._ssrEnableTime&&(this._ssrEnableTime=e);const s=this.stage.view.qualitySettings.fadeDuration;t.fadeFactor=s>0?Math.min(s,e-this._ssrEnableTime)/s:1,t.fadeFactor<1&&this._requestRender()}else this._ssrEnableTime=null}_ensureBindParametersReprojection(){if(!(this.hasReflections||this.hasGlobalIllumination))return void(this._reprojectionMatrix=I);const{reprojection:e,camera:t}=this._bindParameters,{lastFrameCamera:s}=e,i=!s.equals(t);if(i?(g(De,t.viewMatrix),g(Oe,t.projectionMatrix),b(Fe,De,Oe),b(Fe,s.viewMatrix,Fe),b(Fe,s.projectionMatrix,Fe),this._reprojectionMatrix=Fe):this._reprojectionMatrix=I,this.hasGlobalIllumination){const{viewMatrix:t}=e;i?(b(Ge,s.viewMatrix,De),P(t,Ge)):P(t,I)}}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,s,i){this._bindParameters.updateLighting(e,t,s,i),this._requestRender(1)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0,clouds:this.weatherFader?.usedMemory??0}}get test(){}};e([p()],ce.prototype,"_inGlobeView",void 0),e([p({readOnly:!0})],ce.prototype,"highResolutionAtmosphere",null),e([p()],ce.prototype,"_edgeView",void 0),e([p()],ce.prototype,"updating",null),ce=e([c("esri.views.3d.webgl-engine.lib.Renderer")],ce);const fe=[0,1,2,3],ge=[7,6,4,5],be=[7,6],Pe=[0,1,2,4,...be],Ie=[3,5],Ee=[2,4,8],we=[16,12,14,13],Ae=[4,5,2,3,0,1,...be],Ce=[4,8,5,11],Se={0:[13],1:[12],2:[13,12],3:[13,12]},Te=[0,1,...be],Re=["normals","highlights"],Oe=E(),De=E(),Fe=E(),Ge=E();function Ne(e){return t=>e.immediate.schedule(t)}export{ce as Renderer};
2
+ import{__decorate as e}from"tslib";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as s}from"../../../../core/asyncUtils.js";import has from"../../../../core/has.js";import{removeMaybe as i,abortMaybe as r,destroyMaybe as a,releaseMaybe as n,releaseReferencedMaybe as h}from"../../../../core/maybe.js";import{throwIfAborted as o}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as l,initial as u,sync as m}from"../../../../core/reactiveUtils.js";import{signal as _}from"../../../../core/signal.js";import{property as p,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{equals as f,invert as g,multiply as b,copy as P}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as I,create as w}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as E}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as A,ZEROS as C}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as S}from"../../../../geometry/support/Indices.js";import{RenderNodeOutput as T,InternalRenderCategory as R,AllRenderNodeOutputs as O,AllInternalRenderNodeOutputs as D}from"../../webgl.js";import{minNearDistanceInMeters as F}from"../../state/NearFarHeuristic.js";import{debugFlags as G}from"../../support/debugFlags.js";import{computeShadowsEnabled as N}from"../../support/sunUtils.js";import{FBOCache as H}from"../core/FBOCache.js";import{RenderPassManager as x}from"../core/renderPasses/RenderPassManager.js";import{isColor as y}from"../core/shaderLibrary/ShaderOutput.js";import{distanceFadeEnd as v}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as M}from"../effects/RenderNodes.js";import{RenderPluginManager as L}from"../effects/RenderPluginManager.js";import{WeatherFader as q}from"../effects/WeatherFader.js";import{innerAtmosphereFadeStart as U}from"../effects/atmosphere/atmosphereUtils.js";import{Blit as j}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as B,renderHighlightBuffer as V}from"../effects/highlight/Highlight.js";import{OITBlend as k}from"../effects/transparency/OITBlend.js";import{AnimationTimer as W}from"./AnimationTimer.js";import{AnimationTimeStep as Q}from"./AnimationTimeStep.js";import{BoundingInfo as z}from"./BoundingInfo.js";import{Compositor as Y}from"./Compositor.js";import{DepthRange as X}from"./DepthRange.js";import{depthRangeFromScene as $}from"./depthRangeUtils.js";import{MainFramebuffer as J}from"./MainFramebuffer.js";import{RenderContext as K,defaultRenderOccludedMask as Z}from"./RenderContext.js";import{RendererBase as ee}from"./RendererBase.js";import{setupFeatureDefaults as te}from"./RenderFeature.js";import{RenderPluginInput as se}from"./RenderPluginInput.js";import{ShadowAccumulator as ie}from"./ShadowAccumulator.js";import{ShadowMap as re}from"./ShadowMap.js";import ae from"./SliceHelper.js";import{MergedRenderer as ne}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as he}from"../parts/renderUtils.js";import{RendererPerformanceInfo as oe,PerformanceCategory as de}from"../statistics/RendererPerformanceInfo.js";import{ColorAttachment1 as le,PixelType as ue,ColorAttachment2 as me,ColorAttachment0 as _e,DrawBufferNone as pe}from"../../../webgl/enums.js";let ce=class extends ee{constructor(e,t,s,i,r){super({stage:e}),this._techniques=s,this._rctx=i,this._requestRender=r,this._pluginsHas={occludedHudElements:!1,hudElements:!1,water:!1},this.renderPassManager=new x,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=A(0,0,0,1),this._sliceHelper=new ae,this.sceneDepthRange=_(X.Infinite),this._state=_(2),this._hasGlobalIlluminationFlag=!!has("global-illumination"),this._hasAnimations=!1,this._animationTimestep=new Q,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=_(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new se,this._hasTransparentGeometry=!1,this._releaseNodeInputs=e=>{for(const t of Re)e.some(({name:e})=>e===t)&&this._pluginInput.release(t)},this._testsNeedsDepth=!1,this._fboCache=new H(i),this._compositor=new Y(i,s),this._renderStateFeatures=_(te(e.view.qualityProfile));const a=new re(this._fboCache,e.viewingMode);this._renderContext=new K(this._rctx,a,s),this._framebuffer=new J(this._fboCache,this._bindParameters),this._performanceInfo=new oe(this._rctx),this._blit=new j(s),this._shadowAccumulator=new ie(this.fboCache,s,e,e=>{const t=this.shadowsEnabled;a.enabled=!0,this._ensureBindParametersCamera(e.camera,e.contentCamera),this._plugins.prepareRender(),a.enabled=t},(t,s,i)=>{const r=e.view.qualitySettings.maximumPixelRatio;t.shadowMap.start(t.camera,s,i,!0,r),this._renderShadowCascades(5,t.shadowMap),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera)},r),this._nodes=new M(this._renderContext),this._plugins=new L({renderContext:this._renderContext,techniques:s,materials:t,requestRender:r,controller:e}),this._plugins.add(this.renderPassManager),this.weatherFader=new q({view:e.view,context:this._renderContext}),this.addHandles([d(()=>e.view.state.camera,()=>r(),l),d(()=>G.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},r()},u),d(()=>e.view.environment.background?.color,e=>{const t=e?e.toUnitRGBA():C;E(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),r()},l),d(()=>e.view.state.camera.relativeElevation,e=>this._inGlobeView=(e??1/0)>=v,l),d(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},m),d(()=>this._bindParameters.clouds.data?.state,()=>r(),m),d(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,r()},u),d(()=>"sun"===e.view.environment.lighting?.type,e=>{this._bindParameters.enableFillLights=e,this._requestRender()},l)])}destroy(){this._gpuTimerHandle=i(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowAccumulator.destroy(),this._shadowAccumulator=null,this._loadEdgeViewTask=r(this._loadEdgeViewTask),this._edgeView=a(this._edgeView),this.renderPassManager.dispose(),this.weatherFader=a(this.weatherFader),this._releaseFBOs(),this._disposeOffscreenBuffers(),this._fboCache.destroy(),this._fboCache=null,this._renderContext.destroy(),this._plugins.destroy(),this._pluginInput=null,this._oitBlendOrNil=null,this._nodes=null,this._framebuffer=null,this._performanceInfo=null,z.prune(),ne.prune(),S()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _oitBlend(){return this._oitBlendOrNil??=new k(this._techniques),this._oitBlendOrNil}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=te(e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,s){this._renderStateFeatures.mutate(i=>i.set(t,e,s)),this._requestRender()}setTime(e){this._renderContext.time=e}get hasReflections(){return this._bindParameters.screenSpaceReflections.enabled=this._pluginsHas.water&&this.isFeatureEnabled(4),this._bindParameters.screenSpaceReflections.enabled}get _hasHighlights(){return this._plugins.produces(10,2,4,18,12,13,14)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(10,12,13,14)}get hasAmbientIllumination(){return this.isFeatureEnabled(3)&&!this._inGlobeView}get hasGlobalIllumination(){return this._hasGlobalIlluminationFlag&&this.hasAmbientIllumination}get hasGlobalIlluminationHighQuality(){return this.hasGlobalIllumination&&this.isFeatureEnabled(10)}get _keepGlobalIlluminationShadingAlive(){return this._hasGlobalIlluminationFlag&&!this._inGlobeView}get hasSMAA(){return this.isFeatureEnabled(0)}get _emissions(){return this._plugins.emissions}get hasFloatBlend(){return this._rctx.driverTest.floatBufferBlend.result&&this.isFeatureEnabled(9)}get highResolutionAtmosphere(){return this.isFeatureEnabled(2)}get fboCache(){return this._fboCache}_releaseFBOs(){this._bindParameters.hudOcclusion=n(this._bindParameters.hudOcclusion),this._bindParameters.depth=null}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._bindParameters.globalIllumination=n(this._bindParameters.globalIllumination),this._bindParameters.reprojection.lastFrameDepth=n(this._bindParameters.reprojection.lastFrameDepth),this._bindParameters.reprojection.lastFrameEmission=n(this._bindParameters.reprojection.lastFrameEmission),this._disposeBindBuffers()}_disposeBindBuffers(){this._bindParameters.shadowMap.disposeOutputs()}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._shadowAccumulator.readyToRun||this._plugins.updating||this.weatherFader?.readyToRun||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=s(async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");o(e);const s=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:Ne(this.stage.view.resourceController)});return this.addHandles(d(()=>s.updating,()=>this._requestRender(),m)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(s)),this._edgeViewCallbacks.length=0,s})),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&f(this._bindParameters.reprojection.matrix,I)}set _reprojectionMatrix(e){t(this._bindParameters.reprojection.matrix,e)&&this._reprojectionMatrixVersion.value++}modifyShadowsEnabled(){const e=this.stage.view.environmentManager.referencePositionGeographic,t=null==e||N(e[2],this.stage.viewingMode),s=this.stage.view.environment.lighting.directShadowsEnabled&&t;this._bindParameters.shadowMap.enabled!==s&&(this._bindParameters.shadowMap.enabled=s,this._requestRender(1))}get shadowsEnabled(){return!!this._bindParameters.shadowMap.enabled}setParameters(e){e.shadowCast&&this._shadowAccumulator.setParameters(e.shadowCast)}set slice(e){this._sliceHelper.update(e)&&this._requestRender()}get plugins(){return this._plugins}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}addRenderer(e){this._plugins.add(e)}removeRenderer(e){this._plugins.remove(e)}get occludedRequiresStencil(){return this._occludedRequiresOccludeeStencil||this.occludedRequiresIntegratedMeshStencil}get _occludedRequiresOccludeeStencil(){return this._bindParameters.hasOccludees&&!!(8&this.plugins.renderOccludedFlags)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,9)}updateHasFlags(){const has=this._pluginsHas;has.occludedHudElements=this._plugins.produces(0,13),has.hudElements=has.occludedHudElements||this._plugins.produces(0,...Ee),has.water=this._plugins.produces(4,19),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new W(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const s=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==s&&(this._gpuTimerHandle=s?i(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,s=!1){try{return this._isRendering=!0,this._render(e,t,s)}catch(i){console.error(`Exception during rendering: ${i}:\n${i.stack}`)}finally{this._isRendering=!1}return new he(this._pluginInput.get(T.FINAL),null)}_render(e,t,s){const i=0===t;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=i,this._disposeBindBuffers();const{camera:r,contentCamera:a,mode:o,alignPixelEnabled:d}=e;this._state.value=o,this._bindParameters.output=0,this._bindParameters.emissions=this._emissions,this._bindParameters.alignPixelEnabled=d,this._bindParameters.decorations=!s,this._bindParameters.mainDepth=null,this._bindParameters.useFloatBlend.value=this.hasFloatBlend;const l=!s||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=l?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(R.VIEWSHED),this._bindParameters.cutFillComputationEnabled=this._nodes.produces(R.CUTFILL_COMPUTATION),this._bindParameters.cutFillVisualizationEnabled=this._nodes.produces(R.CUTFILL_COLOR),this._renderOverlay(),r.setGLViewport(this._rctx);const u=this._framebuffer,m=u.initialize(r.fullWidth,r.fullHeight,this._backgroundColor),_=this._needsLastFrameColor;_?(m?.retain(_-1),m?.setName("last frame color"),this._bindParameters.reprojection.lastFrameColor=m):m?.release(),this._ensureBindParameters(r,a),this._plugins.sortTestsTransparentOrderedSlots(Ce),this._plugins.prepareRender(),this._bindParameters.hasShadowHighlights=this._needsShadowHighlight&&!s,this._hasTransparentGeometry=this._plugins.produces(0,...ge),this._precompilePrepasses(),this.performanceInfo.advance(de.PREPARE);const p=this._computeShadowDepthRange(r);this._pluginInput.set("normals",this._renderNormals()),this._renderAmbientIlluminationAndDepth(),this._renderShadowMap(r,a,this._bindParameters.lighting.mainLight.direction,p),this._renderShadowAccumulation(p,!i),u.bind(),this._bindParameters.mainDepth=u.depth.attachment,this._precompileShaders(i),this._bindParameters.output=0,this._renderOpaque(),this._renderPreTransparent(),this._renderTransparent(),this.hasReflections&&(this._bindParameters.depth=h(this._bindParameters.depth),this._bindParameters.reprojection.lastFrameColor=h(this._bindParameters.reprojection.lastFrameColor)),this._bindParameters.shadowMap.disposeOutput(5),this._renderCutFillComputation(),this._pluginInput.set(R.FOCUSAREA,this._renderFocusAreaGeometry()),u.update(e=>this._renderNodes(R.TRANSPARENT_ENVIRONMENT,e)),u.update(e=>this._renderNodes(R.VIEWSHED,e)),u.update(e=>this._renderNodes(R.LASERLINES,e)),this._nodes.requireGeometryDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),u.update(e=>this._renderNodes(R.FOCUSAREA_COLOR,e)),u.update(e=>this._renderNodes(R.CUTFILL_COLOR,e)),this._pluginInput.release(R.FOCUSAREA),this._pluginInput.release(R.GROUND_DEPTH),u.update(e=>this._renderNodes(R.OCCLUDED,e)),this._pluginInput.set("highlights",this._renderHighlightPrepass());const c=2===t?this._renderObjectAndLayerIdColor():null;u.update(e=>this._renderNodes(T.COMPOSITE,e)),this._bindParameters.shadowMap.disposeOutputs(),this._bindParameters.shadowHighlight=n(this._bindParameters.shadowHighlight),this.hasGlobalIllumination&&0!==this._emissions&&(this._bindParameters.reprojection.lastFrameEmission=u.color.obtainAttachment(le)),u.update(e=>this._renderNodes(R.ANTIALIASING,e));const f=this._hasTransparentGeometry?2:1,g=this._bindParameters.emissions;let b;return this._bindParameters.emissions=0,this._hasHUDHighlights&&u.update(e=>this._renderHUD(f,e)),u.update(e=>this._renderNodes(R.HIGHLIGHT_COLOR,e)),this._hasHUDHighlights||u.update(e=>this._renderHUD(f,e)),this._bindParameters.emissions=g,u.update(e=>this._renderNodes(R.MAGNIFIER,e)),u.update(e=>this._renderNodes(T.FINAL,e)),i&&this._blit.toFramebuffer(u.color,this._bindParameters),this.hasGlobalIllumination&&(this._bindParameters.reprojection.lastFrameDepth=this._bindParameters.depth),this._testsNeedsDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),this._releaseFBOs(),u.releaseDepth(),this._bindParameters.reprojection.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),i||(b=u.color,b.retain(),this._releaseFBOs(),this._disposeOffscreenBuffers()),this.performanceInfo.finishFrame(),new he(b,c)}_precompileShaders(e){++this._plugins.context.techniques.precompiling;const t=this._bindParameters;t.output=0;const s=t.emissions;if(this._precompileOpaqueGeometry(),this._nodes.precompile(t.hasOpaqueEmission,R.OPAQUE_ENVIRONMENT,R.GAUSSIAN_SPLAT,R.OPAQUE_OCCLUSION_QUERY,R.VOXEL),this._precompileOpaqueGeometry(),t.output=3,this._plugins.precompile(...be),t.output=0,this._plugins.precompile(...be),this._hasTransparentGeometry){const e=this._pluginsHas.occludedHudElements;this._oitBlend.precompile(t,e,0),this._pluginsHas.hudElements&&this._oitBlend.precompile(t,!1,1),this._precompileTransparentGeometry(),t.hasTransparentEmission&&(t.emissions=3)}this._nodes.precompile(t.hasOpaqueEmission,R.FOCUSAREA),this._compositor.precompile(this._usesPremultipliedAlphaBlit,!!this._needsEdges,t),this._hasTransparentGeometry||this._plugins.precompile(15),this._nodes.precompile(t.hasOpaqueEmission,R.TRANSPARENT_ENVIRONMENT,R.VIEWSHED,R.CUTFILL_COMPUTATION,R.CUTFILL_COLOR,R.LASERLINES,R.FOCUSAREA_COLOR,R.OCCLUDED,R.ANTIALIASING),t.highlightMixTexture=t.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(0),t.emissions=0,this._precompileHUD(0),this._precompileHUD(1),t.emissions=s,this._hasHighlights&&(t.highlights.forEach((e,s)=>{t.highlightLevel=s,this._precompileAllGeometry(10),this._hasHUDHighlights&&this._plugins.precompile(13,12)}),t.highlightLevel=null,this._nodes.precompile(t.hasOpaqueEmission,R.HIGHLIGHT_COLOR)),t.highlightMixTexture=null,this._nodes.precompile(t.hasOpaqueEmission,T.COMPOSITE,R.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(8),t.hasOpaqueEmission&&(t.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.precompile(8),t.transparentWithoutDepthEmissionDimmingPass=!1),e&&this._blit.precompile(),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){const e=this._nodes.produce(R.FOCUSAREA,this._pluginInput);return e&&this.performanceInfo.advance(de.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces("olid"))return null;const e=this._bindParameters.output;++this._techniques.precompiling;const{width:t,height:s}=this._framebuffer.size;let i=this.fboCache.acquire(t,s,"olid");return i.acquireDepth(14),i=this._nodes.render(i,this._pluginInput),--this._techniques.precompiling,this.performanceInfo.advance(de.OBJECT_AND_LAYER_ID_COLOR),this._bindParameters.output=e,i}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,s=0===e;if(s||t){const e=s?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const r=Math.max(e,i);this._animationTimestep.frame(r,s)}}readMainDepth(e,t){const{mainDepth:s,camera:i}=this._bindParameters;if(!s)return;const r=this.fboCache.acquire(this._framebuffer.size.width,this._framebuffer.size.height,"linear depth");this._rctx.bindFramebuffer(r.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(C),this._compositor.blitDepthToLinearDepth(this._bindParameters,s),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),r.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,ue.UNSIGNED_BYTE,t),r.release()}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}get _needsEdges(){return this._edgeView?.shouldRender()?this._edgeView:null}_renderEdges(e){const t=this._needsEdges;if(!t)return;const{width:s,height:i}=this._framebuffer.size,r=this.fboCache.acquire(s,i,"edges");r.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(C),t.render(this._bindParameters,e),r.detachDepth(),this._framebuffer.bind(),this._compositor.composite(this._bindParameters,r.getTexture()),r.release(),this.performanceInfo.advance(1===e?de.OPAQUE_EDGES:de.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(de.OVERLAY)}_renderShadowMap(e,t,s,i){if(!this.shadowsEnabled)return;const r=this._bindParameters.shadowMap;if(r.start(e,s,i,this.isFeatureEnabled(5),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight){this._renderShadowCascades(6,r),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t);const s=this._bindParameters.output;this._bindParameters.output=0,this._bindParameters.shadowHighlight=this._nodes.produce(R.SHADOW_HIGHLIGHT,this._pluginInput),this._bindParameters.output=s,r.disposeOutput(6),r.clear(),this._renderShadowCascades(7,r)}else this._renderShadowCascades(5);e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this._needsShadowHighlight&&(this._bindParameters.depth=h(this._bindParameters.depth)),this.performanceInfo.advance(de.SHADOW_MAP)}_renderCutFillComputation(){this._nodes.produce(R.CUTFILL_COMPUTATION,this._pluginInput)?.release()}_precompileShadowCascades(e){0!==this._bindParameters.shadowMap.cascades.length&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._bindParameters.shadowMap){const s=this._bindParameters.output,i=t===this._bindParameters.shadowMap&&6!==e;t.bindFramebuffer();for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e),i&&this._renderShadowCasterNodes();t.finish(e),this._bindParameters.output=s}_renderShadowCasterNodes(){if(!this._nodes.produces(R.SHADOW_CASTERS))return;const e=this._bindParameters.shadowMap.renderTarget;if(!e)return;const t=e.name;e.setName(R.SHADOW_CASTERS),this._pluginInput.set(R.SHADOW_CASTERS,e);try{this._nodes.render(e,this._pluginInput,this._releaseNodeInputs)}finally{e.setName(t),this._pluginInput.set(R.SHADOW_CASTERS,null)}}get _needsLastFrameColor(){return+this.hasReflections+ +this.hasGlobalIllumination}get _needsDepth(){return+this._nodes.requireGeometryDepth+ +this.hasReflections+ +this.hasGlobalIllumination+ +this._shadowAccumulator.requiresDepth+ +this._testsNeedsDepth}get _usesPremultipliedAlphaBlit(){return this._pluginsHas.hudElements}_renderAmbientIlluminationAndDepth(){this._bindParameters.depth=n(this._bindParameters.depth);const e=this._pluginInput.get("normals");if(e){this._pluginInput.set(R.AMBIENT_ILLUMINATION,this._hasGlobalIlluminationFlag?this._renderGlobalIllumination():this._renderSSAO());const t=this._needsDepth;t?(this._rctx.bindFramebuffer(e.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(3),this._bindParameters.depth=e.obtainDepthTexture(),this._bindParameters.depth?.retain(t-1),this.performanceInfo.advance(de.DEPTH)):e.detachDepth(),this.hasAmbientIllumination&&this._pluginInput.release("normals")}else this._hasGlobalIlluminationFlag&&(this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive),this._renderAllGeometryDepth()}_renderAllGeometryDepth(){const e=this._needsDepth;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"geometry depth",14);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(1280),this.renderAllGeometry(3),this._bindParameters.depth=i.obtainDepthTexture(),this._bindParameters.depth?.retain(e-1),i.release(),this.performanceInfo.advance(de.DEPTH)}get _needsShadowDepthRange(){return this._bindParameters.shadowMap.enabled||this._shadowAccumulator.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return X.Zero;const t=$(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),this._bindParameters.shadowMap.enabled&&t.union(this._nodes.queryDepthRange(R.SHADOW_CASTERS,e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}updateSceneDepthRange(e){if(!this.stage.view.state.isGlobal)return void(this.sceneDepthRange.value=X.Infinite);if((this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<U)return void(this.sceneDepthRange.value=X.Infinite);const t=e.clone();t.near=F,t.far=1e10;const s=$(t,this._plugins.plugins,this.stage.layers,1);s.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(s)||(this.sceneDepthRange.value=s)}get _normalsRequired(){return this._nodes.require("normals",...O,R.VIEWSHED,R.LASERLINES)+(this.hasAmbientIllumination?1:0)}_precompilePrepasses(){this._normalsRequired?(this._precompilePlugins(4,Pe),this._needsDepth&&this._precompilePlugins(3,Ie)):this._needsDepth&&this._precompileAllGeometry(3),this.shadowsEnabled&&(this._needsShadowHighlight?(this._nodes.precompile(this._bindParameters.hasEmission,R.SHADOW_HIGHLIGHT),this._precompileShadowCascades(6),this._precompileShadowCascades(7)):this._precompileShadowCascades(5)),this._shadowAccumulator.active&&(this._shadowAccumulator.precompilePrepass(),this._precompileAllGeometry(5)),this.hasAmbientIllumination&&this._normalsRequired&&this._nodes.precompile(this._bindParameters.hasEmission,R.AMBIENT_ILLUMINATION)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"normals",5);i.acquireDepth(14),this._rctx.bindFramebuffer(i.fbo),this._rctx.clearFramebuffer(C,!0,!0),this._bindParameters.output=4,this._plugins.render(...Pe);const r=this._nodes.optional("normals",...O,R.VIEWSHED);return i.retain(e+r-1),this.performanceInfo.advance(de.NORMALS),i}_renderSSAO(){this._bindParameters.globalIlluminationEnabled=!1;const e=this._pluginInput.get("normals");return this.hasAmbientIllumination&&e?(this._bindParameters.ssao=this._nodes.produce(R.AMBIENT_ILLUMINATION,this._pluginInput),this._bindParameters.ssao&&this.performanceInfo.advance(this.hasGlobalIlluminationHighQuality?de.AMBIENT_ILLUMINATION_HIGH_QUALITY:de.AMBIENT_ILLUMINATION),this._bindParameters.ssao):null}_renderGlobalIllumination(){if(!this.hasGlobalIllumination)return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive,null;const e=this._nodes.produce(R.AMBIENT_ILLUMINATION,this._pluginInput);return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIllumination=e,this._bindParameters.globalIlluminationEnabled=!0,this.performanceInfo.advance(de.AMBIENT_ILLUMINATION),e}_releaseGlobalIlluminationBuffers(){const e=this._bindParameters;e.reprojection.lastFrameColor=h(e.reprojection.lastFrameColor),e.reprojection.lastFrameDepth=h(e.reprojection.lastFrameDepth),e.reprojection.lastFrameEmission=h(e.reprojection.lastFrameEmission),e.globalIllumination=h(e.globalIllumination),e.globalIlluminationEnabled=!1}_precompileAllGeometry(e){const t=this._bindParameters.output;this._bindParameters.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...be),this._bindParameters.output=t}renderAllGeometry(e){this._bindParameters.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const s of t)this._renderContext.renderOccludedMask=s,this.precompileSlots(e,...we);this._renderContext.renderOccludedMask=Z}renderSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.forAll(e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t)})}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>1&&this._plugins.render(9),this.renderSlots(e,...we),this._renderContext.renderOccludedMask=Z}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...Se[e])}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(16),this.renderHUD(e),this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){this._precompileAllGeometry(8)}precompileCutFillOrthographicReferenceDepth(){this._precompilePlugins(9,Te)}_precompilePlugins(e,t){const s=this._bindParameters.output;this._bindParameters.output=e,this._plugins.precompile(...t),this._bindParameters.output=s}renderViewshedShadowMap(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(8),this._ensureBindParametersCamera(t,s),this._bindParameters.camera.setGLViewport(this._rctx),this._bindParameters.output=i}renderCutFillOrthographicReferenceDepth(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._bindParameters.output=9,this._plugins.render(...Te),this._ensureBindParametersCamera(t,s),t.setGLViewport(this._rctx),this._bindParameters.output=i}get _needsGroundDepth(){return this._bindParameters.cutFillVisualizationEnabled}_blitGroundDepth(){if(!this._needsGroundDepth)return null;const{width:e,height:t}=this._framebuffer.size,s=this.fboCache.acquire(e,t,R.GROUND_DEPTH,14);return this._rctx.blitFramebuffer(this._framebuffer.color.fbo,s.fbo,256),this._framebuffer.bind(),s}_renderOpaqueAndTransparentGeometry(e){this._bindParameters.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._bindParameters.output=e,this._plugins.render(...Ie)}_precompileOpaqueGeometry(){this._needsOpaquePass&&(this._plugins.precompile(...fe),this._nodes.precompile(this._bindParameters.hasEmission,"opaque-color"))}_renderOpaqueGeometry(){this._plugins.render(...fe)}_renderTransparentGeometry(){this._plugins.render(...ge),this._hasTransparentGeometry&&this._plugins.render(15)}_renderTransparentGround(){this._plugins.render(...be)}_precompileHUD(e){if(!this._pluginsHas.hudElements)return;const t=this._bindParameters.output,s=this._bindParameters.hudRenderStyle;this._bindParameters.hudRenderStyle=e,this._bindParameters.output=1,this._plugins.precompile(...Ee),this._bindParameters.output=2,this._plugins.precompile(...Ee),this._bindParameters.output=0,this._oitBlend.precompile(this._bindParameters,!1,1),this._hasHighlights&&(this._bindParameters.output=10,this._plugins.precompile(...Ee)),this._bindParameters.output=t,this._bindParameters.hudRenderStyle=s}_renderHUD(e,t){if(!this._pluginsHas.hudElements)return t;const s=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo);const i=!!t.getTexture(le);return this._compositor.compositePreMultipliedAlpha(this._bindParameters,s.getTexture(),i),s.release(),this.performanceInfo.advance(0===e?de.HUD_OCCLUDED:de.HUD),t}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(6,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:s}=this,{width:i,height:r}=this._framebuffer.size,{highlights:a}=s,n=a.length>B?3:1,h=e.acquire(i,r,"highlights",n);h.acquireDepth(14);const o=this._plugins.produces(10,0);return o&&this._framebuffer.color.fbo&&h.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,h.fbo,1024),t.bindFramebuffer(h.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),o||t.clear(1024),this._bindParameters.output=10,t.bindFramebuffer(h.fbo),V(t,e,i,r,s,()=>this._renderHighlightGeometries()),h.detachDepth(),this.performanceInfo.advance(de.HIGHLIGHTS),h.retain(this._nodes.require("highlights",...D)+this._nodes.optional("highlights",...D)-1),h}_renderHighlightGeometries(){this._plugins.render(...Ae),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e,t){this._shadowAccumulator.updateDepthRange(e);const s=this._shadowAccumulator.requiresDepth;this._bindParameters.output=0,this._shadowAccumulator.renderAccumulation(this._bindParameters,t)&&this.performanceInfo.advance(de.ACCUMULATED_SHADOWS),s&&(this._bindParameters.depth=h(this._bindParameters.depth))}_precompileTransparentGeometry(){y(this._bindParameters.output)?(this._bindParameters.output=1,this._plugins.precompile(...ge),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=2,this._plugins.precompile(...ge),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=0):this._plugins.precompile(...ge)}_renderOIT(e,t=2){const s=1===e,{width:i,height:r}=this._framebuffer.size,a=s?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=h.useFloatBlend.value?8:5,d=h.output;h.output=1;const l=s?"oit hud":"oit",u=this.fboCache.acquire(i,r,l,o).acquireColor(le,this.hasFloatBlend?7:0,"oit alpha"),m=h.hasEmission&&(0===e||1!==t);m&&u.acquireColor(me,o,"oit emissive"),s||u.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(u.fbo),this._rctx.clearFramebuffer([0,0,0,1]),m&&this._rctx.clearBuffer(1,C),a(),u.detachDepth(),h.output=2;const _=this.fboCache.acquire(i,r,s?"oit front hud":"oit front");m&&_.acquireColor(le,o,"oit front emissive"),s?_.acquireDepth(this._hudDepthFormat):_.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(_.fbo),this._rctx.clearFramebuffer(C,s),a(),_.detachDepth();const p=this._pluginsHas.occludedHudElements&&!s,c=m?me:le;let f;return h.hudOcclusion=n(this._bindParameters.hudOcclusion),h.output=0,s?(f=this.fboCache.acquire(i,r,"oit composite hud"),this._rctx.bindFramebuffer(f.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):(0!==h.emissions&&this._framebuffer.ensureEmissionAttachment(),p&&(this._framebuffer.color.acquireColor(c,0,"hud occlusion"),this._rctx.clearBuffer(c-_e,C)),this._framebuffer.bind()),this._oitBlend.blend(this._rctx,u,_,h,p,e),f?.detachDepth(),s||(m&&(this._bindParameters.emissions=3),p&&(h.hudOcclusion=this._framebuffer.color.obtainAttachment(c))),_.release(),u.release(),h.output=d,f}get _hudDepthFormat(){return this.isFeatureEnabled(7)?14:13}get _needsOpaquePass(){return this.plugins.produces(0,...fe)||this.plugins.produces(5,...fe)||this.plugins.produces(3,3)}_renderOpaque(){const e=this._needsOpaquePass;e&&(this._plugins.render(0,1),this._pluginInput.set(R.GROUND_DEPTH,this._blitGroundDepth()),this._plugins.render(2,3));const t=this._framebuffer;t.update(t=>this._renderNodes(T.OPAQUE,t,e)),this.fboCache.debugCallback?.(T.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(R.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(R.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderPreTransparent(){this._framebuffer.update(e=>this._renderNodes(R.GAUSSIAN_SPLAT,e)),this.fboCache.debugCallback?.(R.GAUSSIAN_SPLAT,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(R.OPAQUE_OCCLUSION_QUERY,e)),this.fboCache.debugCallback?.(R.OPAQUE_OCCLUSION_QUERY,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(R.VOXEL,e)),this.fboCache.debugCallback?.(R.VOXEL,this._framebuffer.color.fbo)}_renderTransparent(){const e=this._framebuffer;this._renderHiddenTransparentEdges(),this._hasTransparentGeometry&&this._renderOIT(0),e.update(e=>this._renderNodes(T.TRANSPARENT,e,this._hasTransparentGeometry)),this.fboCache.debugCallback?.(T.TRANSPARENT,e.color.fbo),this._hasTransparentGeometry||this._plugins.render(15),this._renderEdges(0),this._bindParameters.ssao=n(this._bindParameters.ssao),this._renderTransparentEnvironment()}_renderTransparentEnvironment(){if(this._shadowAccumulator.render(this._bindParameters),this.performanceInfo.advance(de.APPLY_ACCUMULATED_SHADOWS),this._framebuffer.bind(),this._plugins.render(8),this._bindParameters.hasEmission){const e=this._rctx.setDrawBuffers([pe,le]);this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.render(8),this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!1,this._rctx.setDrawBuffers(e)}this.performanceInfo.advance(de.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderNodes(e,t,s=!1){const i=t.name;if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return s&&this.performanceInfo.advance(e),t;this._fboCache.debugCallback?.(i,t.fbo);const r=this._nodes.render(t,this._pluginInput,this._releaseNodeInputs);return this.performanceInfo.advance(e),r}_ensureBindParameters(e,t){this._ensureBindParametersCamera(e,t),this._ensureBindParametersWeatherFader(),this._ensureBindParametersScreenSpaceReflections(),this._ensureBindParametersReprojection()}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersWeatherFader(){1===this.stage.viewingMode&&(this._bindParameters.clouds.data&&(this._bindParameters.clouds.fade(this._bindParameters.camera,this.renderContext.time,this.stage.view.qualitySettings.fadeDuration),this.weatherFader?.cleanupCubemap()),this._bindParameters.snowCover=this.weatherFader?.snowCover??0)}_ensureBindParametersScreenSpaceReflections(){const{time:e}=this.renderContext,{screenSpaceReflections:t}=this._bindParameters;if(this.hasReflections){null==this._ssrEnableTime&&(this._ssrEnableTime=e);const s=this.stage.view.qualitySettings.fadeDuration;t.fadeFactor=s>0?Math.min(s,e-this._ssrEnableTime)/s:1,t.fadeFactor<1&&this._requestRender()}else this._ssrEnableTime=null}_ensureBindParametersReprojection(){if(!(this.hasReflections||this.hasGlobalIllumination))return void(this._reprojectionMatrix=I);const{reprojection:e,camera:t}=this._bindParameters,{lastFrameCamera:s}=e,i=!s.equals(t);if(i?(g(De,t.viewMatrix),g(Oe,t.projectionMatrix),b(Fe,De,Oe),b(Fe,s.viewMatrix,Fe),b(Fe,s.projectionMatrix,Fe),this._reprojectionMatrix=Fe):this._reprojectionMatrix=I,this.hasGlobalIllumination){const{viewMatrix:t}=e;i?(b(Ge,s.viewMatrix,De),P(t,Ge)):P(t,I)}}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,s,i){this._bindParameters.updateLighting(e,t,s,i),this._requestRender(1)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0,clouds:this.weatherFader?.usedMemory??0}}get test(){}};e([p()],ce.prototype,"_inGlobeView",void 0),e([p({readOnly:!0})],ce.prototype,"highResolutionAtmosphere",null),e([p()],ce.prototype,"_edgeView",void 0),e([p()],ce.prototype,"updating",null),ce=e([c("esri.views.3d.webgl-engine.lib.Renderer")],ce);const fe=[0,1,2,3],ge=[7,6,4,5],be=[7,6],Pe=[0,1,2,4,...be],Ie=[3,5],we=[2,4,8],Ee=[16,12,14,13],Ae=[4,5,2,3,0,1,...be],Ce=[4,8,5,11],Se={0:[13],1:[12],2:[13,12],3:[13,12]},Te=[0,1,...be],Re=["normals","highlights"],Oe=w(),De=w(),Fe=w(),Ge=w();function Ne(e){return t=>e.immediate.schedule(t)}export{ce as Renderer};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{SizedPixelFormat as t,PixelType as e}from"../../../../webgl/enums.js";class n{constructor(t){this.internalFormat=t,this.channelByteStride=4,this.dataType=e.UNSIGNED_INT,this.elementArrayConstructor=Uint32Array,this.pixelFormat=s[t],this.channels=r[this.pixelFormat],this.byteStride=this.channelByteStride*this.channels}}const r={36244:1,33320:2,36249:4},s={[t.R32UI]:36244,[t.RG32UI]:33320,[t.RGBA32UI]:36249},i=[new n(t.RGBA32UI),new n(t.RG32UI),new n(t.R32UI)];function o(t){let e=1/0,n=null;for(const r of i){const s=r.byteStride,i=(s-t%s)%s;i<e&&(e=i,n=r)}return n??i[2]}export{n as TexelFormatInfo,o as pickFormat,i as texelSizeFormats};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{hasNativeFloat16Array as e}from"../../../../../geometry/support/float16.js";import{BufferViewMat3f as t,BufferViewVec3f as o,BufferViewVec2f as n,BufferViewFloat as f,BufferViewFloat16 as r,BufferViewVec2Snorm16 as u,BufferViewSnorm16 as m,BufferViewVec4Unorm8 as s,BufferViewUnorm8 as l,BufferViewVec4u8 as i,BufferViewUint8 as p}from"../../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as w}from"../../../../../geometry/support/buffer/types.js";class a{constructor(e,t,o){this.elementCount=e,this.elementType=t,this.bufferViewConstructor=o,this.byteSize=c(o)}}function c(e){return w(e.ElementType)*e.ElementCount}const y={u8:new a(1,"uint",p),vec4u8:new a(4,"uint",i),unorm8:new a(1,"float",l),vec4unorm8:new a(4,"float",s),snorm16:new a(1,"float",m),vec2snorm16:new a(2,"float",u),f16:new a(1,"float",e?r:f),f32:new a(1,"float",f),vec2f32:new a(2,"float",n),vec3f32:new a(3,"float",o),mat3f32:new a(9,"float",t)};export{a as FieldCreationInfo,y as typeToCreationInfoMap};
2
+ import{hasNativeFloat16Array as e}from"../../../../../geometry/support/float16.js";import{BufferViewMat3f as t,BufferViewVec4f as o,BufferViewVec3f as f,BufferViewVec2f as n,BufferViewFloat as r,BufferViewVec4f16 as u,BufferViewFloat16 as m,BufferViewVec2Snorm16 as s,BufferViewSnorm16 as l,BufferViewVec4Unorm8 as w,BufferViewUnorm8 as a,BufferViewVec4u8 as c,BufferViewUint8 as i}from"../../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as p}from"../../../../../geometry/support/buffer/types.js";class v{constructor(e,t,o){this.elementCount=e,this.elementType=t,this.bufferViewConstructor=o,this.byteSize=y(o)}}function y(e){return p(e.ElementType)*e.ElementCount}const b={u8:new v(1,"uint",i),vec4u8:new v(4,"uint",c),unorm8:new v(1,"float",a),vec4unorm8:new v(4,"float",w),snorm16:new v(1,"float",l),vec2snorm16:new v(2,"float",s),f16:new v(1,"float",e?m:r),vec4f16:new v(4,"float",e?u:o),f32:new v(1,"float",r),vec2f32:new v(2,"float",n),vec3f32:new v(3,"float",f),vec4f32:new v(4,"float",o),mat3f32:new v(9,"float",t)};export{v as FieldCreationInfo,b as typeToCreationInfoMap};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{typeToCreationInfoMap as e}from"./TextureBackedBufferFieldCreation.js";import{LayoutField as t}from"./TextureBackedBufferLayoutField.js";import{TextureBufferView as r}from"./TextureBufferView.js";class i{constructor(r){this._fields=new Map,this.texelByteStride=4,this.texelElementArrayConstructor=Uint8Array;let i=0;const n=[];for(let t=0;t<r.length;++t){const s=r[t],{type:o}=s,f=e[o];n.push({declaration:s,byteOffset:i,creationInfo:f}),i+=f.byteSize}i=s(i);const o=i,f=this._fields,{texelByteStride:l}=this;for(const{declaration:e,byteOffset:s,creationInfo:a}of n)f.set(e.name,new t(e,s,l,a));this.byteStride=o,this.texelStride=Math.ceil(o/l)}get stride(){return this.byteStride}get fields(){return this._fields}createBuffer(e){return new r(this,e,this.texelElementArrayConstructor)}createView(e,t){return new r(this,e,this.texelElementArrayConstructor,t)}}function s(e){return e+3&-4}export{i as TextureBackedBufferLayout};
2
+ import{pickFormat as e}from"./TexelFormatInfo.js";import{typeToCreationInfoMap as t}from"./TextureBackedBufferFieldCreation.js";import{LayoutField as r}from"./TextureBackedBufferLayoutField.js";import{TextureBufferView as o}from"./TextureBufferView.js";class i{constructor(o){this._fields=new Map;let i=0;const s=[];for(let e=0;e<o.length;++e){const r=o[e],{type:n}=r,f=t[n];s.push({declaration:r,byteOffset:i,creationInfo:f}),i+=f.byteSize}this.texelFormatInfo=e(i);const{texelByteStride:n}=this;i=Math.ceil(i/n)*n;const f=i,l=this._fields;for(const{declaration:e,byteOffset:t,creationInfo:a}of s)l.set(e.name,new r(e,t,n,a));this.byteStride=f,this.texelStride=Math.ceil(f/n)}get texelByteStride(){return this.texelFormatInfo.byteStride}get texelElementArrayConstructor(){return this.texelFormatInfo.elementArrayConstructor}get stride(){return this.byteStride}get fields(){return this._fields}createBuffer(e){return new o(this,e,this.texelElementArrayConstructor)}createView(e,t){return new o(this,e,this.texelElementArrayConstructor,t)}}export{i as TextureBackedBufferLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{getMaxItemCount as t,getItemsRectangle as e}from"./TextureBackedBufferUtils.js";import{SizedPixelFormat as r,PixelType as o}from"../../../../webgl/enums.js";import i from"../../../../webgl/Texture.js";import{TextureDescriptor as s}from"../../../../webgl/TextureDescriptor.js";class n{constructor(n,a,u){this.layout=a;const l="number"!=typeof u,h=l?Math.floor(u.byteLength/a.byteStride):u;if(h>t(n,a))throw new Error(`Cannot allocate TextureBuffer for ${h}. Exceeding hardware texture limits`);const{itemCount:m,itemWidth:f,itemHeight:d}=e(h),{texelStride:c,byteStride:p}=this.layout,y=f*c,x=d;this.itemCount=m,this.byteLength=m*p;const b=new s(y,x);b.samplingMode=9728,b.wrapMode=33071,b.internalFormat=r.RGBA8UI,b.pixelFormat=36249,b.dataType=o.UNSIGNED_BYTE,b.isImmutable=!0,b.hasMipmap=!1,this.texture=new i(n,b),l&&this.setSubData(u)}get sizeBytes(){return this.byteLength}get usedMemory(){return this.byteLength}setSubData(t,e=0,r=0,o=Math.floor((t.byteLength-r)/this.layout.byteStride)){if(0===o)return;const{layout:i,texture:s}=this,{texelStride:n,texelByteStride:a}=i,{width:u}=s.descriptor;if(e+o>this.itemCount)throw new Error("Upload range is outside of texture");const l=o*n;if(l<=0)return;let h=r,m=e*n,f=l;const d=m%u;if(0!==d){const e=new i.texelElementArrayConstructor(t,h),r=d,o=Math.floor(m/u),n=Math.min(f,u-d);s.updateData(0,r,o,n,1,e),m+=n,h+=n*a,f-=n}const c=Math.floor(f/u);if(c>0){const e=new i.texelElementArrayConstructor(t,h),r=0,o=Math.floor(m/u);s.updateData(0,r,o,u,c,e);const n=c*u;m+=n,h+=n*a,f-=n}if(f>0){const e=new i.texelElementArrayConstructor(t,h),r=m%u,o=Math.floor(m/u);s.updateData(0,r,o,f,1,e)}}dispose(){this.texture.dispose()}}export{n as TextureBuffer};
2
+ import{getMaxItemCount as t,getItemsRectangle as e}from"./TextureBackedBufferUtils.js";import r from"../../../../webgl/Texture.js";import{TextureDescriptor as o}from"../../../../webgl/TextureDescriptor.js";class i{constructor(i,a,s){this.layout=a;const n="number"!=typeof s,l=n?Math.floor(s.byteLength/a.byteStride):s;if(l>t(i,a))throw new Error(`Cannot allocate TextureBuffer for ${l}. Exceeding hardware texture limits`);const{itemCount:u,itemWidth:h,itemHeight:m}=e(l),{texelStride:d,byteStride:f}=this.layout,c=h*d,p=m;this.itemCount=u,this.byteLength=u*f;const y=a.texelFormatInfo,x=new o(c,p);x.samplingMode=9728,x.wrapMode=33071,x.internalFormat=y.internalFormat,x.pixelFormat=y.pixelFormat,x.dataType=y.dataType,x.isImmutable=!0,x.hasMipmap=!1,this.texture=new r(i,x),n&&this.setSubData(s)}get sizeBytes(){return this.byteLength}get usedMemory(){return this.byteLength}setSubData(t,e=0,r=0,o=Math.floor((t.byteLength-r)/this.layout.byteStride)){if(0===o)return;const{layout:i,texture:a}=this,{texelStride:s,texelByteStride:n}=i,{width:l}=a.descriptor;if(e+o>this.itemCount)throw new Error("Upload range is outside of texture");const u=o*s;if(u<=0)return;let h=r,m=e*s,d=u;const f=m%l;if(0!==f){const e=new i.texelElementArrayConstructor(t,h),r=f,o=Math.floor(m/l),s=Math.min(d,l-f);a.updateData(0,r,o,s,1,e),m+=s,h+=s*n,d-=s}const c=Math.floor(d/l);if(c>0){const e=new i.texelElementArrayConstructor(t,h),r=0,o=Math.floor(m/l);a.updateData(0,r,o,l,c,e);const s=c*l;m+=s,h+=s*n,d-=s}if(d>0){const e=new i.texelElementArrayConstructor(t,h),r=m%l,o=Math.floor(m/l);a.updateData(0,r,o,d,1,e)}}dispose(){this.texture.dispose()}}export{i as TextureBuffer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColorOrOLID as s,isDepth as e,is2DGeometryOutput as r,isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import a from"../lib/GLMaterial.js";import{DefaultBufferWriter as o}from"./DefaultBufferWriter.js";import{TriangleMaterial as n}from"./TriangleMaterial.js";import{VisualVariablePassParameters as h}from"./VisualVariablePassParameters.js";import{getLayout as p,ColorMaterialTechnique as u}from"../shaders/ColorMaterialTechnique.js";import{ColorMaterialTechniqueConfiguration as c}from"../shaders/ColorMaterialTechniqueConfiguration.js";import{alphaCutoff as l}from"../../../../webscene/support/AlphaCutoff.js";class m extends n{constructor(t){super(t,d),this._configuration=new c,this.supportsEdges=!0,this.produces=new Map([[2,t=>this._isOpaqueMaterialPass(t)],[3,t=>this._isOpaqueNoSSAODepthPass(t)],[4,t=>s(t)&&this.transparent&&this.parameters.writeDepth],[5,t=>e(t)&&this.transparent&&this.parameters.writeDepth],[8,t=>s(t)&&this.transparent&&!this.parameters.writeDepth],[18,t=>r(t)]])}updateConfiguration(t){super.updateConfiguration(t),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.discardInvisibleFragments=this.transparent&&!this._isOpaquePass(t.output)&&this.parameters.discardInvisibleFragments,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasOccludees=t.hasOccludees,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.draped=this.parameters.draped,this._configuration.emissionSource=this.hasEmissions?1:0}get visible(){return this.parameters.color[3]>=l}get transparent(){return this.parameters.color[3]<1||this.parameters.forceTransparentMode}get hasEmissions(){return this.parameters.emissiveStrength>0?this.transparent?2:1:0}_isOpaquePass(t){return i(t)||this._isOpaqueMaterialPass(t)||this._isOpaqueNoSSAODepthPass(t)}_isOpaqueMaterialPass(t){return 10===t||s(t)&&!this.transparent}_isOpaqueNoSSAODepthPass(t){return e(t)&&this.parameters.writeDepth&&!this.transparent}createGLMaterial(t){return new f(t)}createBufferWriter(){return new o(p(this.parameters))}}class f extends a{beginSlot(t){return this.getTechnique(u,t)}}class d extends h{constructor(){super(...arguments),this.color=t,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasVertexColors=!1,this.polygonOffset=0,this.hasSlicePlane=!1,this.cullFace=0,this.draped=!1,this.discardInvisibleFragments=!1,this.emissiveStrength=0,this.useIndexing=!1}}export{m as ColorMaterial,d as Parameters};
2
+ import{ZEROS as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColorOrOLID as t,isDepth as r,is2DGeometryOutput as s}from"../core/shaderLibrary/ShaderOutput.js";import a from"../lib/GLMaterial.js";import{DefaultBufferWriter as i}from"./DefaultBufferWriter.js";import{TriangleMaterial as o}from"./TriangleMaterial.js";import{VisualVariablePassParameters as h}from"./VisualVariablePassParameters.js";import{getLayout as n,ColorMaterialTechnique as p}from"../shaders/ColorMaterialTechnique.js";import{ColorMaterialTechniqueConfiguration as u}from"../shaders/ColorMaterialTechniqueConfiguration.js";import{alphaCutoff as c}from"../../../../webscene/support/AlphaCutoff.js";class l extends o{constructor(e){super(e,f),this._configuration=new u,this.supportsEdges=!0,this.produces=new Map([[2,e=>this._isOpaqueMaterialPass(e)],[3,e=>this._isOpaqueNoSSAODepthPass(e)],[4,e=>t(e)&&this.transparent&&this.parameters.writeDepth],[5,e=>r(e)&&this.transparent&&this.parameters.writeDepth],[8,e=>t(e)&&this.transparent&&!this.parameters.writeDepth],[18,e=>s(e)]])}updateConfiguration(e){super.updateConfiguration(e),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasOccludees=e.hasOccludees,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.draped=this.parameters.draped,this._configuration.emissionSource=this.hasEmissions?1:0}get visible(){return this.parameters.color[3]>=c}get transparent(){return this.parameters.color[3]<1||this.parameters.forceTransparentMode}get hasEmissions(){return this.parameters.emissiveStrength>0?this.transparent?2:1:0}_isOpaqueMaterialPass(e){return 10===e||t(e)&&!this.transparent}_isOpaqueNoSSAODepthPass(e){return r(e)&&this.parameters.writeDepth&&!this.transparent}createGLMaterial(e){return new m(e)}createBufferWriter(){return new i(n(this.parameters))}}class m extends a{beginSlot(e){return this.getTechnique(p,e)}}class f extends h{constructor(){super(...arguments),this.color=e,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasVertexColors=!1,this.polygonOffset=0,this.hasSlicePlane=!1,this.cullFace=0,this.draped=!1,this.emissiveStrength=0,this.useIndexing=!1}}export{l as ColorMaterial,f as Parameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{exactEquals as e,set as t,copy as r,normalize as s,subtract as i,length as a,scale as o,dot as n,transformMat3 as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as u,create as h,fromValues as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{is3DGeometryOrShadowLike as m,isColor as p}from"../core/shaderLibrary/ShaderOutput.js";import{GLTextureMaterial as d}from"../lib/GLTextureMaterial.js";import{Material as f}from"../lib/Material.js";import{intersectTriangleGeometry as x}from"../lib/RayIntersections.js";import{getVerticalOffsetObject3D as T}from"../lib/verticalOffsetUtils.js";import{DefaultBufferWriter as g}from"./DefaultBufferWriter.js";import{intersectWithPolygonOffset as v}from"./PolygonOffset.js";import{verticalOffsetAtDistance as S}from"./internal/MaterialUtil.js";import{getLayout as b,DefaultMaterialPassParameters as M,DefaultMaterialTechnique as O}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as w}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as C}from"../shaders/RealisticTreeTechnique.js";import{hasShadowHighlights as y}from"../shaders/ReceiveShadowsConfiguration.js";import{alphaCutoff as R}from"../../../../webscene/support/AlphaCutoff.js";class P extends f{constructor(e,t){super(e,I),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>m(e)&&!this.transparent],[4,e=>m(e)&&this.transparent&&this.parameters.writeDepth],[8,e=>m(e)&&this.transparent&&!this.parameters.writeDepth]]),this._layout=b(this.parameters),this._configuration=new w(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:s}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(s[3])?1:s[3])>=R}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!e(this.parameters.emissiveBaseColor,u)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:s,doubleSided:i,doubleSidedType:a}=t;r.hasVertexTangents=!s&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=s?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.writeDepth=t.writeDepth,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!s&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=s?2:i&&"normal"===a?1:i&&"winding-order"===a?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,p(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=y(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersect(e,u,h,c,m,p){if(null!=this.parameters.verticalOffset){const e=h.camera;t(z,u[12],u[13],u[14]);let p=null;switch(h.viewingMode){case 1:p=s(B,z);break;case 2:p=r(B,_)}const d=i(E,z,e.eye),f=a(d),x=o(d,d,1/f);let T=null;this.parameters.screenSizePerspective&&(T=n(p,x));const g=S(e,f,this.parameters.verticalOffset,T??0,this.parameters.screenSizePerspective,null);o(p,p,g),l(N,p,h.transform.inverseRotation),c=i(A,c,N),m=i(V,m,N)}p=v(p,this._configuration,c,m),x(e,h,c,m,T(h.verticalOffset),p)}createGLMaterial(e){return new j(e)}createBufferWriter(){return new g(this._layout)}get transparent(){return D(this.parameters)}}class j extends d{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const r=this._material.parameters;this.updateTexture(r.textureId);const s=e.camera.viewInverseTransposeMatrix;return t(r.origin,s[3],s[7],s[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(r.treeRendering?C:O,e)}}class I extends M{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}function D(e){const{drivenOpacity:t,opacity:r,externalColor:s,layerOpacity:i,texture:a,textureId:o,textureAlphaMode:n,colorMixMode:l}=e,u=s[3];return t||r<1&&"replace"!==l||u<1&&"ignore"!==l||i<1||(null!=a||null!=o)&&1!==n&&2!==n&&"replace"!==l}const A=h(),V=h(),_=c(0,0,1),B=h(),N=h(),z=h(),E=h();export{j as DefaultGLMaterial,P as DefaultMaterial,I as DefaultMaterialParameters,D as isTransparent};
2
+ import{exactEquals as e,set as t,copy as r,normalize as s,subtract as i,length as a,scale as o,dot as n,transformMat3 as l}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as u,create as h,fromValues as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{is3DGeometryOrShadowLike as m,isColor as p}from"../core/shaderLibrary/ShaderOutput.js";import{GLTextureMaterial as d}from"../lib/GLTextureMaterial.js";import{Material as f}from"../lib/Material.js";import{intersectTriangleGeometry as x}from"../lib/RayIntersections.js";import{getVerticalOffsetObject3D as T}from"../lib/verticalOffsetUtils.js";import{DefaultBufferWriter as g}from"./DefaultBufferWriter.js";import{intersectWithPolygonOffset as v}from"./PolygonOffset.js";import{verticalOffsetAtDistance as S}from"./internal/MaterialUtil.js";import{getLayout as b,DefaultMaterialPassParameters as M,DefaultMaterialTechnique as O}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as w}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as C}from"../shaders/RealisticTreeTechnique.js";import{hasShadowHighlights as y}from"../shaders/ReceiveShadowsConfiguration.js";import{alphaCutoff as R}from"../../../../webscene/support/AlphaCutoff.js";class P extends f{constructor(e,t){super(e,I),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>m(e)&&!this.transparent],[4,e=>m(e)&&this.transparent&&this.parameters.writeDepth],[8,e=>m(e)&&this.transparent&&!this.parameters.writeDepth]]),this._layout=b(this.parameters),this._configuration=new w(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:s}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(s[3])?1:s[3])>=R}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!e(this.parameters.emissiveBaseColor,u)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:s,doubleSided:i,doubleSidedType:a}=t;r.hasVertexTangents=!s&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=s?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.writeDepth=t.writeDepth,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!s&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=s?2:i&&"normal"===a?1:i&&"winding-order"===a?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,p(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=y(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersect(e,u,h,c,m,p){if(null!=this.parameters.verticalOffset){const e=h.camera;t(z,u[12],u[13],u[14]);let p=null;switch(h.viewingMode){case 1:p=s(B,z);break;case 2:p=r(B,_)}const d=i(E,z,e.eye),f=a(d),x=o(d,d,1/f);let T=null;this.parameters.screenSizePerspective&&(T=n(p,x));const g=S(e,f,this.parameters.verticalOffset,T??0,this.parameters.screenSizePerspective,null);o(p,p,g),l(N,p,h.transform.inverseRotation),c=i(A,c,N),m=i(V,m,N)}p=v(p,this._configuration,c,m),x(e,h,c,m,T(h.verticalOffset),p)}createGLMaterial(e){return new j(e)}createBufferWriter(){return new g(this._layout)}get transparent(){return D(this.parameters)}}class j extends d{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const r=this._material.parameters;this.updateTexture(r.textureId);const s=e.camera.viewInverseTransposeMatrix;return t(r.origin,s[3],s[7],s[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(r.treeRendering?C:O,e)}}class I extends M{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}function D(e){const{drivenOpacity:t,opacity:r,externalColor:s,layerOpacity:i,texture:a,textureId:o,textureAlphaMode:n,colorMixMode:l}=e,u=s[3];return t||r<1&&"replace"!==l||u<1&&"ignore"!==l||i<1||(null!=a||null!=o)&&1!==n&&2!==n&&"replace"!==l}const A=h(),V=h(),_=c(0,0,1),B=h(),N=h(),z=h(),E=h();export{j as DefaultGLMaterial,P as DefaultMaterial,I as DefaultMaterialParameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as e}from"./TriangleTechniqueConfiguration.js";class i extends e{constructor(t){super(),this.spherical=t,this.offsetBackfaces=!1,this.cullFace=0,this.pbrMode=0,this.emissionSource=0,this.upVectorAlignment=0,this.pathCapType=3,this.pathProfileType=0,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.hasOccludees=!1,this.snowCover=!1,this.receiveGlobalIllumination=!1,this.supportNaN=!0,this.textureCoordinateType=0,this.hasVVInstancing=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.draped=!1,this.overlayEnabled=!1,this.doubleSidedMode=0}get discardInvisibleFragments(){return this.transparent}}t([o()],i.prototype,"offsetBackfaces",void 0),t([o({count:3})],i.prototype,"cullFace",void 0),t([o({count:7})],i.prototype,"pbrMode",void 0),t([o({count:8})],i.prototype,"emissionSource",void 0),t([o({count:2})],i.prototype,"upVectorAlignment",void 0),t([o({count:4})],i.prototype,"pathCapType",void 0),t([o({count:2})],i.prototype,"pathProfileType",void 0),t([o()],i.prototype,"receiveShadows",void 0),t([o()],i.prototype,"hasShadowHighlights",void 0),t([o()],i.prototype,"receiveAmbientOcclusion",void 0),t([o()],i.prototype,"hasVVSize",void 0),t([o()],i.prototype,"hasVVColor",void 0),t([o()],i.prototype,"hasVVOpacity",void 0),t([o()],i.prototype,"hasOccludees",void 0),t([o()],i.prototype,"snowCover",void 0),t([o()],i.prototype,"receiveGlobalIllumination",void 0);export{i as PathTechniqueConfiguration};
2
+ import{__decorate as o}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as e}from"./TriangleTechniqueConfiguration.js";class i extends e{constructor(o){super(),this.spherical=o,this.offsetBackfaces=!1,this.cullFace=0,this.pbrMode=0,this.emissionSource=0,this.upVectorAlignment=0,this.pathCapType=3,this.pathProfileType=0,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.hasOccludees=!1,this.snowCover=!1,this.receiveGlobalIllumination=!1,this.supportNaN=!0,this.textureCoordinateType=0,this.hasVVInstancing=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.draped=!1,this.overlayEnabled=!1,this.doubleSidedMode=0,this.renderOccluded=!1}}o([t()],i.prototype,"offsetBackfaces",void 0),o([t({count:3})],i.prototype,"cullFace",void 0),o([t({count:7})],i.prototype,"pbrMode",void 0),o([t({count:8})],i.prototype,"emissionSource",void 0),o([t({count:2})],i.prototype,"upVectorAlignment",void 0),o([t({count:4})],i.prototype,"pathCapType",void 0),o([t({count:2})],i.prototype,"pathProfileType",void 0),o([t()],i.prototype,"receiveShadows",void 0),o([t()],i.prototype,"hasShadowHighlights",void 0),o([t()],i.prototype,"receiveAmbientOcclusion",void 0),o([t()],i.prototype,"hasVVSize",void 0),o([t()],i.prototype,"hasVVColor",void 0),o([t()],i.prototype,"hasVVOpacity",void 0),o([t()],i.prototype,"hasOccludees",void 0),o([t()],i.prototype,"snowCover",void 0),o([t()],i.prototype,"receiveGlobalIllumination",void 0);export{i as PathTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as i}from"./TriangleTechniqueConfiguration.js";class o extends i{constructor(e){super(),this.spherical=e,this.receiveGlobalIllumination=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.writeDepth=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.draped=!1,this.textureCoordinateType=0,this.emissionSource=0,this.pbrMode=3,this.occlusionPass=!1,this.useCustomDTRExponentForWater=!0,this.rayMarchMaxReach=1,this.rayMarchMaxSteps=150,this.useProjectedRayLength=!1,this.clampRayToScreen=!0,this.useFillLights=!1,this.overlayEnabled=!1,this.snowCover=!1}get discardInvisibleFragments(){return this.transparent&&this.writeDepth}}e([t()],o.prototype,"receiveGlobalIllumination",void 0),e([t()],o.prototype,"receiveShadows",void 0),e([t()],o.prototype,"hasShadowHighlights",void 0),e([t()],o.prototype,"writeDepth",void 0),e([t()],o.prototype,"screenSpaceReflections",void 0),e([t()],o.prototype,"cloudReflections",void 0),e([t()],o.prototype,"draped",void 0);export{o as WaterTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as i}from"./TriangleTechniqueConfiguration.js";class o extends i{constructor(e){super(),this.spherical=e,this.receiveGlobalIllumination=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.writeDepth=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.draped=!1,this.textureCoordinateType=0,this.emissionSource=0,this.pbrMode=3,this.occlusionPass=!1,this.useCustomDTRExponentForWater=!0,this.rayMarchMaxReach=1,this.rayMarchMaxSteps=150,this.useProjectedRayLength=!1,this.clampRayToScreen=!0,this.useFillLights=!1,this.overlayEnabled=!1,this.snowCover=!1,this.renderOccluded=!1}}e([t()],o.prototype,"receiveGlobalIllumination",void 0),e([t()],o.prototype,"receiveShadows",void 0),e([t()],o.prototype,"hasShadowHighlights",void 0),e([t()],o.prototype,"writeDepth",void 0),e([t()],o.prototype,"screenSpaceReflections",void 0),e([t()],o.prototype,"cloudReflections",void 0),e([t()],o.prototype,"draped",void 0);export{o as WaterTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{parameter as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as i}from"../materials/TriangleTechniqueConfiguration.js";class r extends i{constructor(){super(...arguments),this.writeDepth=!0,this.textureCoordinateType=0,this.emissionSource=0,this.output=0,this.olidColorInstanced=!1,this.overlayEnabled=!1,this.draped=!1,this.snowCover=!1}get discardInvisibleFragments(){return this.transparent&&this.writeDepth}}t([e()],r.prototype,"writeDepth",void 0);export{r as CheckerBoardTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as i}from"../materials/TriangleTechniqueConfiguration.js";class r extends i{constructor(){super(...arguments),this.writeDepth=!0,this.textureCoordinateType=0,this.emissionSource=0,this.output=0,this.olidColorInstanced=!1,this.overlayEnabled=!1,this.draped=!1,this.snowCover=!1,this.renderOccluded=!1}}e([t()],r.prototype,"writeDepth",void 0);export{r as CheckerBoardTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as o}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as e}from"../materials/TriangleTechniqueConfiguration.js";class i extends e{constructor(){super(...arguments),this.cullFace=0,this.emissionSource=0,this.hasVertexColors=!1,this.discardInvisibleFragments=!1,this.writeDepth=!0,this.hasOccludees=!1,this.hasVVColor=!1,this.draped=!1,this.textureCoordinateType=0,this.olidColorInstanced=!1,this.hasVVInstancing=!1,this.hasVVSize=!1,this.hasVVOpacity=!1,this.snowCover=!1}}o([t({count:3})],i.prototype,"cullFace",void 0),o([t({count:8})],i.prototype,"emissionSource",void 0),o([t()],i.prototype,"hasVertexColors",void 0),o([t()],i.prototype,"discardInvisibleFragments",void 0),o([t()],i.prototype,"writeDepth",void 0),o([t()],i.prototype,"hasOccludees",void 0),o([t()],i.prototype,"hasVVColor",void 0),o([t()],i.prototype,"draped",void 0);export{i as ColorMaterialTechniqueConfiguration};
2
+ import{__decorate as o}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as e}from"../materials/TriangleTechniqueConfiguration.js";class i extends e{constructor(){super(...arguments),this.cullFace=0,this.emissionSource=0,this.hasVertexColors=!1,this.writeDepth=!0,this.hasOccludees=!1,this.hasVVColor=!1,this.draped=!1,this.textureCoordinateType=0,this.olidColorInstanced=!1,this.hasVVInstancing=!1,this.hasVVSize=!1,this.hasVVOpacity=!1,this.snowCover=!1,this.renderOccluded=!1}}o([t({count:3})],i.prototype,"cullFace",void 0),o([t({count:8})],i.prototype,"emissionSource",void 0),o([t()],i.prototype,"hasVertexColors",void 0),o([t()],i.prototype,"writeDepth",void 0),o([t()],i.prototype,"hasOccludees",void 0),o([t()],i.prototype,"hasVVColor",void 0),o([t()],i.prototype,"draped",void 0);export{i as ColorMaterialTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as o}from"../materials/TriangleTechniqueConfiguration.js";class s extends o{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}e([t({count:4})],s.prototype,"alphaDiscardMode",void 0),e([t({count:3})],s.prototype,"doubleSidedMode",void 0),e([t({count:7})],s.prototype,"pbrMode",void 0),e([t({count:3})],s.prototype,"cullFace",void 0),e([t({count:3})],s.prototype,"normalType",void 0),e([t({count:3})],s.prototype,"customDepthTest",void 0),e([t({count:8})],s.prototype,"emissionSource",void 0),e([t()],s.prototype,"hasVertexColors",void 0),e([t()],s.prototype,"hasSymbolColors",void 0),e([t()],s.prototype,"hasVerticalOffset",void 0),e([t()],s.prototype,"hasColorTexture",void 0),e([t()],s.prototype,"hasMetallicRoughnessTexture",void 0),e([t()],s.prototype,"hasOcclusionTexture",void 0),e([t()],s.prototype,"hasNormalTexture",void 0),e([t()],s.prototype,"hasScreenSizePerspective",void 0),e([t()],s.prototype,"hasVertexTangents",void 0),e([t()],s.prototype,"hasOccludees",void 0),e([t()],s.prototype,"instanced",void 0),e([t()],s.prototype,"instancedDoublePrecision",void 0),e([t()],s.prototype,"hasModelTransformation",void 0),e([t()],s.prototype,"offsetBackfaces",void 0),e([t()],s.prototype,"hasVVSize",void 0),e([t()],s.prototype,"hasVVColor",void 0),e([t()],s.prototype,"receiveShadows",void 0),e([t()],s.prototype,"hasShadowHighlights",void 0),e([t()],s.prototype,"receiveAmbientOcclusion",void 0),e([t()],s.prototype,"receiveGlobalIllumination",void 0),e([t()],s.prototype,"textureAlphaPremultiplied",void 0),e([t()],s.prototype,"instancedFeatureAttribute",void 0),e([t()],s.prototype,"instancedColor",void 0),e([t()],s.prototype,"writeDepth",void 0),e([t()],s.prototype,"snowCover",void 0),e([t()],s.prototype,"hasColorTextureTransform",void 0),e([t()],s.prototype,"hasEmissionTextureTransform",void 0),e([t()],s.prototype,"hasNormalTextureTransform",void 0),e([t()],s.prototype,"hasOcclusionTextureTransform",void 0),e([t()],s.prototype,"hasMetallicRoughnessTextureTransform",void 0);export{s as DefaultMaterialTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as o}from"../materials/TriangleTechniqueConfiguration.js";class s extends o{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1,this.renderOccluded=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}}e([t({count:4})],s.prototype,"alphaDiscardMode",void 0),e([t({count:3})],s.prototype,"doubleSidedMode",void 0),e([t({count:7})],s.prototype,"pbrMode",void 0),e([t({count:3})],s.prototype,"cullFace",void 0),e([t({count:3})],s.prototype,"normalType",void 0),e([t({count:3})],s.prototype,"customDepthTest",void 0),e([t({count:8})],s.prototype,"emissionSource",void 0),e([t()],s.prototype,"hasVertexColors",void 0),e([t()],s.prototype,"hasSymbolColors",void 0),e([t()],s.prototype,"hasVerticalOffset",void 0),e([t()],s.prototype,"hasColorTexture",void 0),e([t()],s.prototype,"hasMetallicRoughnessTexture",void 0),e([t()],s.prototype,"hasOcclusionTexture",void 0),e([t()],s.prototype,"hasNormalTexture",void 0),e([t()],s.prototype,"hasScreenSizePerspective",void 0),e([t()],s.prototype,"hasVertexTangents",void 0),e([t()],s.prototype,"hasOccludees",void 0),e([t()],s.prototype,"instanced",void 0),e([t()],s.prototype,"instancedDoublePrecision",void 0),e([t()],s.prototype,"hasModelTransformation",void 0),e([t()],s.prototype,"offsetBackfaces",void 0),e([t()],s.prototype,"hasVVSize",void 0),e([t()],s.prototype,"hasVVColor",void 0),e([t()],s.prototype,"receiveShadows",void 0),e([t()],s.prototype,"hasShadowHighlights",void 0),e([t()],s.prototype,"receiveAmbientOcclusion",void 0),e([t()],s.prototype,"receiveGlobalIllumination",void 0),e([t()],s.prototype,"textureAlphaPremultiplied",void 0),e([t()],s.prototype,"instancedFeatureAttribute",void 0),e([t()],s.prototype,"instancedColor",void 0),e([t()],s.prototype,"writeDepth",void 0),e([t()],s.prototype,"snowCover",void 0),e([t()],s.prototype,"hasColorTextureTransform",void 0),e([t()],s.prototype,"hasEmissionTextureTransform",void 0),e([t()],s.prototype,"hasNormalTextureTransform",void 0),e([t()],s.prototype,"hasOcclusionTextureTransform",void 0),e([t()],s.prototype,"hasMetallicRoughnessTextureTransform",void 0);export{s as DefaultMaterialTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(e,t){super(),this.spherical=e,this.polygonOffset=0,this.enableOITOffset=!1,this.screenCenterOffsetUnitsEnabled=!1,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.occludedFragmentFade=!1,this.hasOcclusionTexture=!1,this.hasFocusAreaStyle=!1,this.hasVertexColor=!0,this.hasVertexSize=!0,this.hasVertexRotation=!0,this.hasVertexUVi=!0,this.hasVertexCenterOffset=!0,this.olidColorInstanced=!1,this.textureCoordinateType=0,this.emissionSource=0,this.discardInvisibleFragments=!0,this.hasVVInstancing=!1,this.snowCover=!1,this.transparentOccluded=t}}e([t()],i.prototype,"transparentOccluded",void 0),e([t({count:5})],i.prototype,"polygonOffset",void 0),e([t()],i.prototype,"enableOITOffset",void 0),e([t()],i.prototype,"screenCenterOffsetUnitsEnabled",void 0),e([t()],i.prototype,"signedDistanceFieldEnabled",void 0),e([t()],i.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),e([t()],i.prototype,"hasVVSize",void 0),e([t()],i.prototype,"hasVVColor",void 0),e([t()],i.prototype,"hasVerticalOffset",void 0),e([t()],i.prototype,"hasScreenSizePerspective",void 0),e([t()],i.prototype,"hasRotation",void 0),e([t()],i.prototype,"debugDrawLabelBorder",void 0),e([t()],i.prototype,"depthTestEnabled",void 0),e([t()],i.prototype,"pixelSnappingEnabled",void 0),e([t()],i.prototype,"draped",void 0),e([t()],i.prototype,"occludedFragmentFade",void 0),e([t()],i.prototype,"hasOcclusionTexture",void 0),e([t()],i.prototype,"hasFocusAreaStyle",void 0),e([t()],i.prototype,"hasVertexColor",void 0),e([t()],i.prototype,"hasVertexSize",void 0),e([t()],i.prototype,"hasVertexRotation",void 0),e([t()],i.prototype,"hasVertexUVi",void 0),e([t()],i.prototype,"hasVertexCenterOffset",void 0);export{i as HUDMaterialTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(e,t){super(),this.spherical=e,this.polygonOffset=0,this.enableOITOffset=!1,this.screenCenterOffsetUnitsEnabled=!1,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.occludedFragmentFade=!1,this.hasOcclusionTexture=!1,this.hasFocusAreaStyle=!1,this.hasVertexColor=!0,this.hasVertexSize=!0,this.hasVertexRotation=!0,this.hasVertexUVi=!0,this.hasVertexCenterOffset=!0,this.olidColorInstanced=!1,this.textureCoordinateType=0,this.emissionSource=0,this.hasVVInstancing=!1,this.snowCover=!1,this.renderOccluded=!1,this.transparentOccluded=t}}e([t()],i.prototype,"transparentOccluded",void 0),e([t({count:5})],i.prototype,"polygonOffset",void 0),e([t()],i.prototype,"enableOITOffset",void 0),e([t()],i.prototype,"screenCenterOffsetUnitsEnabled",void 0),e([t()],i.prototype,"signedDistanceFieldEnabled",void 0),e([t()],i.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),e([t()],i.prototype,"hasVVSize",void 0),e([t()],i.prototype,"hasVVColor",void 0),e([t()],i.prototype,"hasVerticalOffset",void 0),e([t()],i.prototype,"hasScreenSizePerspective",void 0),e([t()],i.prototype,"hasRotation",void 0),e([t()],i.prototype,"debugDrawLabelBorder",void 0),e([t()],i.prototype,"depthTestEnabled",void 0),e([t()],i.prototype,"pixelSnappingEnabled",void 0),e([t()],i.prototype,"draped",void 0),e([t()],i.prototype,"occludedFragmentFade",void 0),e([t()],i.prototype,"hasOcclusionTexture",void 0),e([t()],i.prototype,"hasFocusAreaStyle",void 0),e([t()],i.prototype,"hasVertexColor",void 0),e([t()],i.prototype,"hasVertexSize",void 0),e([t()],i.prototype,"hasVertexRotation",void 0),e([t()],i.prototype,"hasVertexUVi",void 0),e([t()],i.prototype,"hasVertexCenterOffset",void 0);export{i as HUDMaterialTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as i}from"../materials/TriangleTechniqueConfiguration.js";class o extends i{constructor(e){super(),this.draped=e,this.cullFace=0,this.writeDepth=!0,this.hasOccludees=!1,this.perspectiveInterpolation=!0,this.textureCoordinateType=0,this.emissionSource=0,this.discardInvisibleFragments=!0,this.olidColorInstanced=!1,this.snowCover=!1}}e([t({count:3})],o.prototype,"cullFace",void 0),e([t()],o.prototype,"writeDepth",void 0),e([t()],o.prototype,"hasOccludees",void 0),e([t()],o.prototype,"perspectiveInterpolation",void 0);export{o as ImageMaterialTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as o}from"../materials/TriangleTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.draped=e,this.cullFace=0,this.writeDepth=!0,this.hasOccludees=!1,this.perspectiveInterpolation=!0,this.textureCoordinateType=0,this.emissionSource=0,this.olidColorInstanced=!1,this.snowCover=!1,this.renderOccluded=!1}}e([t({count:3})],i.prototype,"cullFace",void 0),e([t()],i.prototype,"writeDepth",void 0),e([t()],i.prototype,"hasOccludees",void 0),e([t()],i.prototype,"perspectiveInterpolation",void 0);export{i as ImageMaterialTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as i}from"../materials/DefaultTechniqueConfiguration.js";class s extends i{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hudDepth=!1,this.hudDepthAlignStart=!1,this.writeDepth=!1,this.draped=!1,this.discardInvisibleFragments=!0,this.oitPremultipliedAlpha=!0,this.snowCover=!1,this.emissionSource=0,this.textureCoordinateType=0,this.hasVertexCenterOffset=!0}}e([t()],s.prototype,"screenCenterOffsetUnitsEnabled",void 0),e([t()],s.prototype,"hasVerticalOffset",void 0),e([t()],s.prototype,"hasScreenSizePerspective",void 0),e([t()],s.prototype,"hudDepth",void 0),e([t()],s.prototype,"hudDepthAlignStart",void 0);export{s as LineCalloutTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as i}from"../materials/DefaultTechniqueConfiguration.js";class r extends i{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hudDepth=!1,this.hudDepthAlignStart=!1,this.writeDepth=!1,this.draped=!1,this.oitPremultipliedAlpha=!0,this.snowCover=!1,this.renderOccluded=!1,this.emissionSource=0,this.textureCoordinateType=0,this.hasVertexCenterOffset=!0}}e([t()],r.prototype,"screenCenterOffsetUnitsEnabled",void 0),e([t()],r.prototype,"hasVerticalOffset",void 0),e([t()],r.prototype,"hasScreenSizePerspective",void 0),e([t()],r.prototype,"hudDepth",void 0),e([t()],r.prototype,"hudDepthAlignStart",void 0);export{r as LineCalloutTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../support/engineContent/marker.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/MarkerSizing.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/NoPerspective.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatBindUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/LineMarker.glsl.js";
2
+ import"../../support/engineContent/marker.js";import"../core/shaderLibrary/Slice.glsl.js";import"../core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import"../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../core/shaderLibrary/shading/MarkerSizing.glsl.js";import"../core/shaderLibrary/shading/PositionOutsideClipSpace.js";import"../core/shaderLibrary/util/ColorConversion.glsl.js";import"../core/shaderLibrary/util/NoPerspective.glsl.js";import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float2BindUniform.js";import"../core/shaderModules/Float4BindUniform.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatBindUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"./alphaCutoff.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/LineMarker.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{parameter as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(t){super(),this.spherical=t,this.space=1,this.anchor=0,this.occluder=!1,this.writeDepth=!1,this.hideOnShortSegments=!1,this.hasCap=!1,this.hasTip=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.hasOccludees=!1,this.hasScreenSizePerspective=!1,this.textureCoordinateType=0,this.emissionSource=0,this.discardInvisibleFragments=!0,this.occlusionPass=!1,this.hasVVInstancing=!1,this.hasSliceTranslatedView=!0,this.olidColorInstanced=!1,this.overlayEnabled=!1,this.snowCover=!1}get draped(){return 0===this.space}get worldSpace(){return 2===this.space}}t([e({count:3})],i.prototype,"space",void 0),t([e({count:2})],i.prototype,"anchor",void 0),t([e()],i.prototype,"occluder",void 0),t([e()],i.prototype,"writeDepth",void 0),t([e()],i.prototype,"hideOnShortSegments",void 0),t([e()],i.prototype,"hasCap",void 0),t([e()],i.prototype,"hasTip",void 0),t([e()],i.prototype,"hasVVSize",void 0),t([e()],i.prototype,"hasVVColor",void 0),t([e()],i.prototype,"hasVVOpacity",void 0),t([e()],i.prototype,"hasOccludees",void 0),t([e()],i.prototype,"hasScreenSizePerspective",void 0);export{i as LineMarkerTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.spherical=e,this.space=1,this.anchor=0,this.occluder=!1,this.writeDepth=!1,this.hideOnShortSegments=!1,this.hasCap=!1,this.hasTip=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.hasVVOpacity=!1,this.hasOccludees=!1,this.hasScreenSizePerspective=!1,this.textureCoordinateType=0,this.emissionSource=0,this.occlusionPass=!1,this.hasVVInstancing=!1,this.hasSliceTranslatedView=!0,this.olidColorInstanced=!1,this.overlayEnabled=!1,this.snowCover=!1,this.renderOccluded=!1}get draped(){return 0===this.space}get worldSpace(){return 2===this.space}}e([t({count:3})],i.prototype,"space",void 0),e([t({count:2})],i.prototype,"anchor",void 0),e([t()],i.prototype,"occluder",void 0),e([t()],i.prototype,"writeDepth",void 0),e([t()],i.prototype,"hideOnShortSegments",void 0),e([t()],i.prototype,"hasCap",void 0),e([t()],i.prototype,"hasTip",void 0),e([t()],i.prototype,"hasVVSize",void 0),e([t()],i.prototype,"hasVVColor",void 0),e([t()],i.prototype,"hasVVOpacity",void 0),e([t()],i.prototype,"hasOccludees",void 0),e([t()],i.prototype,"hasScreenSizePerspective",void 0);export{i as LineMarkerTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/MeasurementArrow.glsl.js";
2
+ import"../core/shaderLibrary/util/View.glsl.js";import"../core/shaderModules/Float4PassUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"./alphaCutoff.glsl.js";import"./OutputColorHighlightOLID.glsl.js";import"../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../chunks/MeasurementArrow.glsl.js";