@arcgis/core 5.0.0-next.31 → 5.0.0-next.33

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 (241) hide show
  1. package/applications/SceneViewer/sceneViewerUtils.d.ts +3 -0
  2. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/1dd867fa7c58c06b79ea.js +1 -0
  5. package/assets/esri/core/workers/chunks/22d66d1c8dfccdbbcf30.js +1 -0
  6. package/assets/esri/core/workers/chunks/22f745539ca54d8cd30d.js +1 -0
  7. package/assets/esri/core/workers/chunks/2613e482450b57f2d4f5.js +1 -0
  8. package/assets/esri/core/workers/chunks/27bd88e1101873d4ce12.js +1 -0
  9. package/assets/esri/core/workers/chunks/{1dfca37f95f2b968aa54.js → 39d2b540738431adec98.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{5f2cf73fb2944f82661d.js → 433d249c35c56bf15806.js} +34 -34
  11. package/assets/esri/core/workers/chunks/446f76356fc116204ec3.js +1 -0
  12. package/assets/esri/core/workers/chunks/44b6b7418cbf7f778bef.js +1 -0
  13. package/assets/esri/core/workers/chunks/4675ed3ca3e0104d00bf.js +1 -0
  14. package/assets/esri/core/workers/chunks/4df7cc3477bc46fc39af.js +1 -0
  15. package/assets/esri/core/workers/chunks/52ecbaa2d32692d6d8df.js +1 -0
  16. package/assets/esri/core/workers/chunks/{3777b41b4fa2f1418402.js → 55818fe7a7aa1e5c8bbd.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{7e6fae3660e7a6a0fa16.js → 5f781ef46ce7c4048c2f.js} +1 -1
  18. package/assets/esri/core/workers/chunks/63933cbcb5c12df09715.js +1 -0
  19. package/assets/esri/core/workers/chunks/706423d801fa9cbf2e90.js +1 -0
  20. package/assets/esri/core/workers/chunks/{e6df4327ac1d9b65b80d.js → 71dd80231ea656a6380c.js} +1 -1
  21. package/assets/esri/core/workers/chunks/725819839434c59102f3.js +1 -0
  22. package/assets/esri/core/workers/chunks/72cebf18da5ec5eeb666.js +1 -0
  23. package/assets/esri/core/workers/chunks/{bd58c027408dc858f23c.js → 77b45957cfe42523c1c8.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{b2fbb44e219232e61cbd.js → 794960ec36e11f4416c2.js} +1 -1
  25. package/assets/esri/core/workers/chunks/852de585a72d902344a6.js +1 -0
  26. package/assets/esri/core/workers/chunks/{25fd0884dd14973c89f5.js → 866a608d489bf56bc371.js} +1 -1
  27. package/assets/esri/core/workers/chunks/871dd5e1f016a04b8d98.js +1 -0
  28. package/assets/esri/core/workers/chunks/892c417f5130b003889d.js +1 -0
  29. package/assets/esri/core/workers/chunks/{0bfb7db0a151a5e85dd1.js → 8ad6595ad44c2d60c1ce.js} +1 -1
  30. package/assets/esri/core/workers/chunks/907083c427d7fb4354e9.js +1 -0
  31. package/assets/esri/core/workers/chunks/{11bb437437272d8f3e2c.js → 9252854b512237b6a0ef.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{e615983fab688d515205.js → 944dfa9309da8f49a616.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{f2f4e34247882eceb50d.js → a2cee5ac0d4df0108425.js} +3 -3
  34. package/assets/esri/core/workers/chunks/a4b7ba8aec109beb5b4d.js +1 -0
  35. package/assets/esri/core/workers/chunks/{3bacd904cd93c8013f6a.js → ae793d814cf32db9fbde.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{e0b70652da4a7f672cfc.js → b21cf62652ca772108c8.js} +1 -1
  37. package/assets/esri/core/workers/chunks/c2596f48b37092dd566c.js +1 -0
  38. package/assets/esri/core/workers/chunks/c82a974c8448407885e6.js +1 -0
  39. package/assets/esri/core/workers/chunks/c9c2e00fed979c21e2f0.js +1 -0
  40. package/assets/esri/core/workers/chunks/{94005916d321c879bea1.js → cb500d673ca7ec1ef945.js} +1 -1
  41. package/assets/esri/core/workers/chunks/d239a4ef60e348cfb05a.js +1 -0
  42. package/assets/esri/core/workers/chunks/d6d03f22c91f528b97e5.js +1 -0
  43. package/assets/esri/core/workers/chunks/{4ab89c990a82c745c0fd.js → d764b6273974f4bca31b.js} +1 -1
  44. package/assets/esri/core/workers/chunks/d86e59da76eea888ba86.js +1 -0
  45. package/assets/esri/core/workers/chunks/da517b4b07d4d27ce94c.js +1 -0
  46. package/assets/esri/core/workers/chunks/dc3a4ad62bc041a4f899.js +1 -0
  47. package/assets/esri/core/workers/chunks/defc6b50df5018bd9e86.js +1 -0
  48. package/assets/esri/core/workers/chunks/df458ad51be27df3d79d.js +1 -0
  49. package/assets/esri/core/workers/chunks/{01b8e680befff83e7d3e.js → e093e745708f722bc1b9.js} +1 -1
  50. package/assets/esri/core/workers/chunks/e32fc0b2c6530d28ce85.js +1 -0
  51. package/assets/esri/core/workers/chunks/e3a994587f9b2e88db85.js +1 -0
  52. package/assets/esri/core/workers/chunks/ea5bf896acfcc3106bf5.js +1 -0
  53. package/assets/esri/core/workers/chunks/ed1dabed10ff9f4e0369.js +1 -0
  54. package/assets/esri/core/workers/chunks/{a74e6d505a55ed27f004.js → f11453f24c0b728669d2.js} +1 -1
  55. package/assets/esri/core/workers/chunks/f2ebd6471e1259a6eac0.js +1 -0
  56. package/assets/esri/core/workers/chunks/{14dc21fe66c7b98fb456.js → f3127bdf28a1d9b8db27.js} +1 -1
  57. package/assets/esri/core/workers/chunks/f3c232fc56a29d51196a.js +1 -0
  58. package/assets/esri/core/workers/chunks/fee942ef802a162e0248.js +1 -0
  59. package/assets/esri/themes/base/widgets/_Attribution.scss +8 -0
  60. package/assets/esri/themes/dark/main.css +1 -1
  61. package/assets/esri/themes/light/main.css +1 -1
  62. package/assets/esri/themes/light/view.css +1 -1
  63. package/chunks/BlendLayers.glsl.js +1 -1
  64. package/chunks/Envelope.js +1 -1
  65. package/chunks/GaussianSplat.glsl.js +2 -2
  66. package/chunks/Geometry.js +1 -1
  67. package/chunks/GlowComposition.glsl.js +5 -5
  68. package/chunks/MultiPathImpl.js +1 -1
  69. package/chunks/Point2D.js +1 -1
  70. package/chunks/UnitFactory.js +1 -1
  71. package/config.js +1 -1
  72. package/core/deprecate.js +1 -1
  73. package/core/keyboard.js +5 -0
  74. package/geometry/SpatialReference.js +1 -1
  75. package/geometry/operators/support/apiConverter.js +1 -1
  76. package/geometry/operators/support/jsonConverter.js +1 -1
  77. package/geometry/support/spatialReferenceUtils.js +1 -1
  78. package/interfaces.d.ts +552 -3
  79. package/kernel.js +1 -1
  80. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  81. package/layers/catalog/CatalogDynamicGroupLayer.js +1 -1
  82. package/layers/graphics/data/AttributesBuilder.js +1 -1
  83. package/layers/graphics/data/QueryEngineResult.js +1 -1
  84. package/layers/mixins/ArcGISImageService.js +1 -1
  85. package/package.json +1 -1
  86. package/portal/schemas/definitions.js +1 -1
  87. package/rest/query/operations/query.js +1 -1
  88. package/rest/support/LocateSetting.d.ts +4 -0
  89. package/rest/support/LocateSetting.js +5 -0
  90. package/rest/support/LocateSettingBase.d.ts +4 -0
  91. package/rest/support/LocateSettingBase.js +5 -0
  92. package/rest/support/LocateSettingSource.d.ts +4 -0
  93. package/rest/support/LocateSettingSource.js +5 -0
  94. package/rest/support/LocateSettings.d.ts +4 -0
  95. package/rest/support/LocateSettings.js +5 -0
  96. package/rest/support/LocateSettingsOverrides.d.ts +4 -0
  97. package/rest/support/LocateSettingsOverrides.js +5 -0
  98. package/rest/support/RouteParameters.js +1 -1
  99. package/statistics/utils.js +1 -1
  100. package/support/revision.js +1 -1
  101. package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
  102. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  103. package/views/3d/GroundView3D.js +1 -1
  104. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  105. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  106. package/views/3d/layers/I3SMeshView3D.js +1 -1
  107. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  108. package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
  109. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  110. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  111. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  112. package/views/3d/state/ConstraintsManager.js +1 -1
  113. package/views/3d/state/NearFarHeuristic.js +1 -1
  114. package/views/3d/support/Attribution3D.js +5 -0
  115. package/views/3d/support/CombinedElevationProvider.js +1 -1
  116. package/views/3d/support/ElevationRange.js +1 -1
  117. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  118. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +5 -0
  119. package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +5 -0
  120. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  121. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  122. package/views/3d/terrain/ElevationBounds.js +1 -1
  123. package/views/3d/terrain/ElevationData.js +1 -1
  124. package/views/3d/terrain/TerrainSurface.js +1 -1
  125. package/views/3d/terrain/Tile.js +1 -1
  126. package/views/3d/terrain/TileBlendTechniqueConfiguration.js +1 -1
  127. package/views/3d/terrain/TileCompositor.js +1 -1
  128. package/views/3d/terrain/TileRenderer.js +1 -1
  129. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  130. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  131. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  132. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  133. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  134. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +12 -12
  135. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentDataConstants.js +5 -0
  136. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  137. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  138. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  139. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +10 -13
  140. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +7 -1
  141. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +6 -6
  142. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +4 -4
  143. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +1 -1
  144. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  145. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
  146. package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +1 -1
  147. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  148. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  149. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  150. package/views/3d/webgl-engine/lib/TextureBackedBuffer/BufferManager.js +1 -1
  151. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
  152. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFields.js +1 -1
  153. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
  154. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  155. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  156. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  157. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  158. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  159. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  160. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  161. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  162. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  163. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  164. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  165. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  166. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  167. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  168. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  169. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  170. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  171. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +4 -4
  172. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +24 -31
  173. package/views/Attribution.js +5 -0
  174. package/views/DOMContainer.js +1 -1
  175. package/views/SceneView.js +1 -1
  176. package/views/View.js +1 -1
  177. package/views/draw/support/managers/DrawTooltipManager.js +5 -0
  178. package/views/interactive/tooltip/content/TooltipContentDynamic.js +5 -0
  179. package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
  180. package/views/interactive/tooltip/fields/TooltipField.js +1 -1
  181. package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +5 -0
  182. package/views/layers/LayerView.js +1 -1
  183. package/views/support/AttributionItem.d.ts +4 -0
  184. package/views/support/AttributionItem.js +5 -0
  185. package/views/support/GroundElevationSampler.js +1 -1
  186. package/views/support/LayerViewManager.js +1 -1
  187. package/views/support/attributionUtils.js +5 -0
  188. package/views/support/geodesicAreaMeasurementUtils.js +1 -1
  189. package/views/support/geodesicLengthMeasurementUtils.js +1 -1
  190. package/views/ui/2d/DefaultUI2D.js +1 -1
  191. package/views/ui/3d/DefaultUI3D.js +1 -1
  192. package/widgets/Attribution/AttributionViewModel.js +1 -1
  193. package/widgets/Attribution.js +1 -1
  194. package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
  195. package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
  196. package/widgets/ElevationProfile.js +1 -1
  197. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  198. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
  199. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  200. package/widgets/Widget.js +1 -1
  201. package/widgets/support/decorators/accessibleHandler.js +1 -1
  202. package/widgets/support/jsxWidgetSupport.js +1 -1
  203. package/widgets/support/widget.js +1 -1
  204. package/widgets/support/widgetUtils.js +1 -1
  205. package/assets/esri/core/workers/chunks/0a1df5a724fe253b3866.js +0 -1
  206. package/assets/esri/core/workers/chunks/155d74b9c0ef31dc2316.js +0 -1
  207. package/assets/esri/core/workers/chunks/25143b919e75d5d2da05.js +0 -1
  208. package/assets/esri/core/workers/chunks/2c8c48433b380da59831.js +0 -1
  209. package/assets/esri/core/workers/chunks/2d17ed5321ca05acb8e3.js +0 -1
  210. package/assets/esri/core/workers/chunks/31b5747a254d13acc58e.js +0 -1
  211. package/assets/esri/core/workers/chunks/3ac84e324d212815e252.js +0 -1
  212. package/assets/esri/core/workers/chunks/41a00c77e6f7ce61e476.js +0 -1
  213. package/assets/esri/core/workers/chunks/447b53a9280b2b19b7a6.js +0 -1
  214. package/assets/esri/core/workers/chunks/45729d006db6a569715f.js +0 -1
  215. package/assets/esri/core/workers/chunks/50cf3cbcad2be1c1e210.js +0 -1
  216. package/assets/esri/core/workers/chunks/565358ea8d1bdc4d1ebc.js +0 -1
  217. package/assets/esri/core/workers/chunks/592afe1a41bed3b0cc31.js +0 -1
  218. package/assets/esri/core/workers/chunks/5aeda8a1f2ccabfdf40f.js +0 -1
  219. package/assets/esri/core/workers/chunks/657d9e5145da1306ace8.js +0 -1
  220. package/assets/esri/core/workers/chunks/6ce7ca6bebdc61d8eada.js +0 -1
  221. package/assets/esri/core/workers/chunks/7f7a81ed8893ab649af7.js +0 -1
  222. package/assets/esri/core/workers/chunks/7ffef8a19166f6b564d8.js +0 -1
  223. package/assets/esri/core/workers/chunks/819781a209608dcdd678.js +0 -1
  224. package/assets/esri/core/workers/chunks/8d57e3a0e5687ce15557.js +0 -1
  225. package/assets/esri/core/workers/chunks/8e9a5d38da40702def80.js +0 -1
  226. package/assets/esri/core/workers/chunks/8fbda0b85731ac77e1d8.js +0 -1
  227. package/assets/esri/core/workers/chunks/98c32d10a2344cd7a50b.js +0 -1
  228. package/assets/esri/core/workers/chunks/aac313257a8b1ae75b75.js +0 -1
  229. package/assets/esri/core/workers/chunks/be06c8a58c217a17451b.js +0 -1
  230. package/assets/esri/core/workers/chunks/d56548a994753b08403c.js +0 -1
  231. package/assets/esri/core/workers/chunks/d5b464ff83ce29b51968.js +0 -1
  232. package/assets/esri/core/workers/chunks/d777d7cb8df3f21ac97e.js +0 -1
  233. package/assets/esri/core/workers/chunks/dd95e679618b7b21a7b1.js +0 -1
  234. package/assets/esri/core/workers/chunks/e08a1934d98e7324776d.js +0 -1
  235. package/assets/esri/core/workers/chunks/e5deb72df8b2505fd325.js +0 -1
  236. package/assets/esri/core/workers/chunks/e689a4849f5af3f2f641.js +0 -1
  237. package/assets/esri/core/workers/chunks/f259ad785ce3aa970792.js +0 -1
  238. package/assets/esri/core/workers/chunks/f4919950a9a3703d9da3.js +0 -1
  239. package/assets/esri/core/workers/chunks/f6ce485c082d0d640b01.js +0 -1
  240. package/assets/esri/core/workers/chunks/fd9ef4b8c969962cf72b.js +0 -1
  241. package/layers/support/attributionUtils.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as o}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as i}from"../../../../../chunks/GlowComposition.glsl.js";import{ColorAttachment0 as t,ColorAttachment1 as l}from"../../../../webgl/enums.js";import{makePipelineState as m,defaultColorWrite as n}from"../../../../webgl/renderState.js";let a=class extends s{constructor(){super(...arguments),this.shader=new o(i,()=>import("./GlowComposition.glsl.js"))}initializePipeline(e){return m({colorWrite:n,drawBuffers:{buffers:e.blurEnabled?[t,l]:[t]}})}};a=e([r("esri.views.3d.webgl-engine.effects.glow.GlowCompositionTechnique")],a);export{a as GlowCompositionTechnique};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as o}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{b as i}from"../../../../../chunks/GlowComposition.glsl.js";import{ColorAttachment0 as t,ColorAttachment1 as l}from"../../../../webgl/enums.js";import{makePipelineState as m,defaultColorWrite as n}from"../../../../webgl/renderState.js";let c=class extends s{constructor(){super(...arguments),this.shader=new o(i,()=>import("./GlowComposition.glsl.js"))}initializePipeline(e){return m({colorWrite:n,drawBuffers:{buffers:e.blurEnabled?[t,l]:[t]}})}};c=e([r("esri.views.3d.webgl-engine.effects.glow.GlowCompositionTechnique")],c);export{c as GlowCompositionTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- const s=2.6,n={sunny:.0022,rainy:.0022,cloudy:.0022,snowy:.0022,foggy:.0022};class e{constructor(s){this.presets=s,this.presets=o(s)}}const t={minDisperse:new e([.8,.12,.06,.02,0,0]),maxDisperse:new e([0,0,.06,.12,.25,.57])};function o(s,n=1){const e=s[0]+s[1]+s[2]+s[3]+s[4]+s[5];return e<=n?s:[s[0]/e,s[1]/e,s[2]/e,s[3]/e,s[4]/e,s[5]/e]}export{n as blurRadiusPresets,s as defaultExposure,t as lodFactorsPresets,o as normalizePreset};
5
+ const n=2.6,o={sunny:.0022,rainy:.0022,cloudy:.0022,snowy:.0022,foggy:.0022};export{o as blurRadiusPresets,n as defaultExposure};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as i,syncAndInitial as s}from"../../../../../core/reactiveUtils.js";import{property as r,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{b as a}from"../../../../../chunks/vec32.js";import{ZEROS as n}from"../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{getReferenceEllipsoid as h}from"../../../../../geometry/ellipsoidUtils.js";import{InternalRenderCategory as l}from"../../../webgl.js";import{TransparentEnvironment as m}from"../TransparentEnvironment.js";import{G as c}from"../../../../../chunks/GlowBlur.glsl.js";import{GlowBlurTechnique as u}from"./GlowBlurTechnique.js";import{GlowBlurTechniqueConfiguration as p}from"./GlowBlurTechniqueConfiguration.js";import{G as d}from"../../../../../chunks/GlowComposition.glsl.js";import{GlowCompositionTechnique as g}from"./GlowCompositionTechnique.js";import{GlowCompositionTechniqueConfiguration as _}from"./GlowCompositionTechniqueConfiguration.js";import{blurRadiusPresets as f,lodFactorsPresets as b,normalizePreset as w}from"./GlowPresets.glsl.js";import{ColorAttachment1 as P,DepthStencilAttachment as T}from"../../../../webgl/enums.js";let R=class extends m{constructor(e){super(e),this.consumes={required:[l.TRANSPARENT_ENVIRONMENT,"emissive"]},this.produces=l.TRANSPARENT_ENVIRONMENT,this._blurHorizontalConfiguration=new p,this._blurVerticalConfiguration=new p,this._compositionConfiguration=new _,this._compositionParameters=new d,this._blurParameters=new c,this._blurScale=3.06,this._glowEnabled=!1,this._glowResults=new Array;const t=h(e.view.spatialReference);this._atmosphereRadius=t.radius+t.atmosphereHeight;e.view.stage.renderView.techniques.precompile(g,this._compositionConfiguration)}initialize(){this.addHandles([i(()=>this._updateFogParameters(),()=>{},s),i(()=>this.view.qualitySettings.glow,e=>{this._glowEnabled=e,this.precompile(),this.requestRender(1)},s)])}_updateFogParameters(){const e=this.view.environment.weather;if("sunny"===e.type||"cloudy"===e.type)this._blurParameters.blurRadius=f[e.type],this._compositionParameters.distanceModifier=0;else{const i="foggy"===e.type?e.fogStrength:e.precipitation;this._blurParameters.blurRadius=t(f.cloudy,f[e.type],i),this._compositionParameters.distanceModifier="foggy"===e.type?t(3e-5,.005,e.fogStrength**3):t(4e-6,2e-4,(e.precipitation??0)**3)}this._computeLodFactors(),this.requestRender(1)}_computeLodFactors(e=b.minDisperse.presets,i=b.maxDisperse.presets){e.forEach((e,s)=>{this._compositionParameters.lodFactors[s]=t(e,i[s],this._compositionParameters.dispersionWeight)})}precompile(){this._glowEnabled&&(this.techniques.precompile(u,this._blurHorizontalConfiguration),this._blurVerticalConfiguration.glowStage=1,this.techniques.precompile(u,this._blurVerticalConfiguration)),this._compositionConfiguration.blurEnabled=this._glowEnabled,this.techniques.precompile(g,this._compositionConfiguration)}render(e){const t=e.find(({name:e})=>e===l.TRANSPARENT_ENVIRONMENT),i=t.getAttachment(P);if(!i?.attachment)return t;const s=t.getAttachment(T);if(!this._glowEnabled){const e=this.techniques.get(g,this._compositionConfiguration);if(!e.compiled)return this.requestRender(1),t;const r=t.getTexture(),o=this.fboCache,{fullWidth:a,fullHeight:n}=this.bindParameters.camera,h=this.renderingContext,l=o.acquire(r.descriptor.width,r.descriptor.height,this.produces);return this._prepareFBO(l,a,n),this._compositionParameters.color=r,this._compositionParameters.emission=i.attachment,h.bindTechnique(e,this.bindParameters,this._compositionParameters),h.screen.draw(),l.attachDepth(s),l.attachColor(i,P),l}const r=this.techniques.get(u,this._blurHorizontalConfiguration),o=this.techniques.get(u,this._blurVerticalConfiguration),n=this.techniques.get(g,this._compositionConfiguration);if(!r.compiled||!o.compiled||!n.compiled)return this.requestRender(1),t;const h=t.getTexture(),m=this.fboCache,{fullWidth:c,fullHeight:p}=this.bindParameters.camera,d=this.renderingContext;let _=i.attachment,f=Math.ceil(c/2),b=Math.ceil(p/2);const w=5,R=this._blurParameters.blurRadius;for(let a=0;a<w;a++){const e=m.acquire(f,b,"glow horizontal",8);this._blurParameters.emissionsToDownsample=_,this._prepareFBO(e,f,b),d.bindTechnique(r,this.bindParameters,this._blurParameters),d.screen.draw();const t=m.acquire(f,b,"glow vertical",8);this._blurParameters.emissionsToDownsample=e.getTexture(),this._prepareFBO(t,f,b),d.bindTechnique(o,this.bindParameters,this._blurParameters),d.screen.draw(),e.release(),this._glowResults[a]=t,f=Math.ceil(f/2),b=Math.ceil(b/2),_=this._glowResults[a].getTexture(),this._blurParameters.blurRadius*=this._blurScale}this._blurParameters.blurRadius=R;const C=this.bindParameters.camera,q=a(C.eye);this._compositionParameters.atmosphereC=q**2-this._atmosphereRadius**2,this._compositionParameters.color=h,this._compositionParameters.emission=i.attachment,this._compositionParameters.lodTexture0=this._glowResults[0].getTexture(),this._compositionParameters.lodTexture1=this._glowResults[1].getTexture(),this._compositionParameters.lodTexture2=this._glowResults[2].getTexture(),this._compositionParameters.lodTexture3=this._glowResults[3].getTexture(),this._compositionParameters.lodTexture4=this._glowResults[4].getTexture();const x=m.acquire(h.descriptor.width,h.descriptor.height,this.produces);return x.acquireColor(P,8,"emissive glow"),this._prepareFBO(x,c,p,!0),d.bindTechnique(n,this.bindParameters,this._compositionParameters),d.screen.draw(),this._glowResults.forEach(e=>e.release()),x.attachDepth(s),x}_prepareFBO(e,t,i,s=!1){const r=this.renderingContext;r.bindFramebuffer(e.fbo),r.setViewport(0,0,t,i),r.setClearColor(0,0,0,0),r.clear(16384),s&&r.clearBuffer(1,n)}get test(){return{compositionParameters:this._compositionParameters,blurParameters:this._blurParameters,setBlurLodCombination:e=>{this._compositionParameters.dispersionWeight=e,this._computeLodFactors()},setLodFactors:e=>{this._computeLodFactors(w(e))},toggleTonemapping:e=>{this._compositionConfiguration.tonemappingEnabled=e,this.requestRender(1)}}}};e([r()],R.prototype,"consumes",void 0),e([r()],R.prototype,"produces",void 0),R=e([o("esri.views.3d.webgl-engine.effects.glow.GlowRenderNode")],R);export{R as GlowRenderNode};
5
+ import{__decorate as e}from"tslib";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as i,syncAndInitial as s}from"../../../../../core/reactiveUtils.js";import{property as r,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{b as a}from"../../../../../chunks/vec32.js";import{ZEROS as n}from"../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{getReferenceEllipsoid as h}from"../../../../../geometry/ellipsoidUtils.js";import{InternalRenderCategory as l}from"../../../webgl.js";import{TransparentEnvironment as m}from"../TransparentEnvironment.js";import{G as c}from"../../../../../chunks/GlowBlur.glsl.js";import{GlowBlurTechnique as u}from"./GlowBlurTechnique.js";import{GlowBlurTechniqueConfiguration as p}from"./GlowBlurTechniqueConfiguration.js";import{G as d,a as g}from"../../../../../chunks/GlowComposition.glsl.js";import{GlowCompositionTechnique as _}from"./GlowCompositionTechnique.js";import{GlowCompositionTechniqueConfiguration as f}from"./GlowCompositionTechniqueConfiguration.js";import{blurRadiusPresets as b}from"./GlowPresets.glsl.js";import{ColorAttachment1 as w,DepthStencilAttachment as P}from"../../../../webgl/enums.js";let T=class extends m{constructor(e){super(e),this.consumes={required:[l.TRANSPARENT_ENVIRONMENT,"emissive"]},this.produces=l.TRANSPARENT_ENVIRONMENT,this._blurHorizontalConfiguration=new p,this._blurVerticalConfiguration=new p,this._compositionConfiguration=new f,this._compositionParameters=new d,this._blurParameters=new c,this._blurScale=3.06,this._glowEnabled=!1,this._glowResults=new Array,this._lodFactorsPresets={minDisperse:new g([.5,.25,.15,.07,.03,0]),maxDisperse:new g([0,0,.06,.12,.25,.57])};const t=h(e.view.spatialReference);this._atmosphereRadius=t.radius+t.atmosphereHeight;e.view.stage.renderView.techniques.precompile(_,this._compositionConfiguration)}initialize(){this.addHandles([i(()=>this._updateFogParameters(),()=>{},s),i(()=>this.view.qualitySettings.glow,e=>{this._glowEnabled=e,this.precompile(),this.requestRender(1)},s)])}_updateFogParameters(){const e=this.view.environment.weather;if("sunny"===e.type||"cloudy"===e.type)this._blurParameters.blurRadius=b[e.type],this._compositionParameters.distanceModifier=0;else{const i="foggy"===e.type?e.fogStrength:e.precipitation;this._blurParameters.blurRadius=t(b.cloudy,b[e.type],i),this._compositionParameters.distanceModifier="foggy"===e.type?t(3e-5,.005,e.fogStrength**3):t(4e-6,2e-4,(e.precipitation??0)**3)}this.requestRender(1)}precompile(){this._glowEnabled&&(this.techniques.precompile(u,this._blurHorizontalConfiguration),this._blurVerticalConfiguration.glowStage=1,this.techniques.precompile(u,this._blurVerticalConfiguration)),this._compositionConfiguration.blurEnabled=this._glowEnabled,this.techniques.precompile(_,this._compositionConfiguration)}render(e){const t=e.find(({name:e})=>e===l.TRANSPARENT_ENVIRONMENT),i=t.getAttachment(w);if(!i?.attachment)return t;const s=t.getAttachment(P);if(!this._glowEnabled){const e=this.techniques.get(_,this._compositionConfiguration);if(!e.compiled)return this.requestRender(1),t;const r=t.getTexture(),o=this.fboCache,{fullWidth:a,fullHeight:n}=this.bindParameters.camera,h=this.renderingContext,l=o.acquire(r.descriptor.width,r.descriptor.height,this.produces);return this._prepareFBO(l,a,n),this._compositionParameters.color=r,this._compositionParameters.emission=i.attachment,h.bindTechnique(e,this.bindParameters,this._compositionParameters),h.screen.draw(),l.attachDepth(s),l.attachColor(i,w),l}const r=this.techniques.get(u,this._blurHorizontalConfiguration),o=this.techniques.get(u,this._blurVerticalConfiguration),n=this.techniques.get(_,this._compositionConfiguration);if(!r.compiled||!o.compiled||!n.compiled)return this.requestRender(1),t;const h=t.getTexture(),m=this.fboCache,{fullWidth:c,fullHeight:p}=this.bindParameters.camera,d=this.renderingContext;let g=i.attachment,f=Math.ceil(c/2),b=Math.ceil(p/2);const T=5,R=this._blurParameters.blurRadius;for(let a=0;a<T;a++){const e=m.acquire(f,b,"glow horizontal",8);this._blurParameters.emissionsToDownsample=g,this._prepareFBO(e,f,b),d.bindTechnique(r,this.bindParameters,this._blurParameters),d.screen.draw();const t=m.acquire(f,b,"glow vertical",8);this._blurParameters.emissionsToDownsample=e.getTexture(),this._prepareFBO(t,f,b),d.bindTechnique(o,this.bindParameters,this._blurParameters),d.screen.draw(),e.release(),this._glowResults[a]=t,f=Math.ceil(f/2),b=Math.ceil(b/2),g=this._glowResults[a].getTexture(),this._blurParameters.blurRadius*=this._blurScale}this._blurParameters.blurRadius=R;const C=this.bindParameters.camera,q=a(C.eye);this._compositionParameters.atmosphereC=q**2-this._atmosphereRadius**2,this._compositionParameters.color=h,this._compositionParameters.emission=i.attachment,this._compositionParameters.lodTexture0=this._glowResults[0].getTexture(),this._compositionParameters.lodTexture1=this._glowResults[1].getTexture(),this._compositionParameters.lodTexture2=this._glowResults[2].getTexture(),this._compositionParameters.lodTexture3=this._glowResults[3].getTexture(),this._compositionParameters.lodTexture4=this._glowResults[4].getTexture(),this._compositionParameters.minDisperse=this._lodFactorsPresets.minDisperse,this._compositionParameters.maxDisperse=this._lodFactorsPresets.maxDisperse;const x=m.acquire(h.descriptor.width,h.descriptor.height,this.produces);return x.acquireColor(w,8,"emissive glow"),this._prepareFBO(x,c,p,!0),d.bindTechnique(n,this.bindParameters,this._compositionParameters),d.screen.draw(),this._glowResults.forEach(e=>e.release()),x.attachDepth(s),x}_prepareFBO(e,t,i,s=!1){const r=this.renderingContext;r.bindFramebuffer(e.fbo),r.setViewport(0,0,t,i),r.setClearColor(0,0,0,0),r.clear(16384),s&&r.clearBuffer(1,n)}get test(){return{compositionParameters:this._compositionParameters,blurParameters:this._blurParameters,setBlurLodCombination:e=>{this._compositionParameters.dispersionWeight=e},getPresets:this._lodFactorsPresets.minDisperse.presets,setMinDisperse:(e,t)=>{this._lodFactorsPresets.minDisperse.presets[e]=t},toggleTonemapping:e=>{this._compositionConfiguration.tonemappingEnabled=e,this.requestRender(1)}}}};e([r()],T.prototype,"consumes",void 0),e([r()],T.prototype,"produces",void 0),T=e([o("esri.views.3d.webgl-engine.effects.glow.GlowRenderNode")],T);export{T as GlowRenderNode};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{watch as s}from"../../../../core/reactiveUtils.js";import{subclass as e}from"../../../../core/accessorSupport/decorators.js";import{set as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{e as r,b as n,j as o,q as h,g as l,E as c,J as u,d as p}from"../../../../chunks/vec32.js";import{create as m,clone as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as g}from"../../../../chunks/vec42.js";import{create as f}from"../../../../geometry/support/plane.js";import{fromPoints as _}from"../../../../geometry/support/ray.js";import{Sphere as b}from"../../../../geometry/support/sphere.js";import{RenderCategory as P}from"../../webgl.js";import{GaussianSplatTarget as C}from"../../layers/i3s/Intersector.js";import{GaussianSplatDataStore as S}from"../../support/gaussianSplatting/GaussianSplatDataStore.js";import q from"../../webgl/RenderNode.js";import{IntersectorResult as w}from"./IntersectorResult.js";import{G as v}from"../../../../chunks/GaussianSplat.glsl.js";import{G as T}from"../../../../chunks/GaussianSplatComposition.glsl.js";import{GaussianSplatCompositionTechnique as D}from"../shaders/GaussianSplatCompositionTechnique.js";import{G as y}from"../../../../chunks/GaussianSplatDepthComposition.glsl.js";import{GaussianSplatDepthCompositionTechnique as j}from"../shaders/GaussianSplatDepthCompositionTechnique.js";import{GaussianSplatDepthTechnique as x}from"../shaders/GaussianSplatDepthTechnique.js";import{GaussianSplatTechnique as G}from"../shaders/GaussianSplatTechnique.js";import{GaussianSplatTechniqueConfiguration as R}from"../shaders/GaussianSplatTechniqueConfiguration.js";import{DepthStencilAttachment as A,PrimitiveType as V}from"../../../webgl/enums.js";var E;let I=class extends q{constructor(){super(...arguments),this.gaussianPosition=m(),this.intersectionRayDir=m(),this.intersectionPlane=f(),this._slicePlaneEnabled=!1,this._data=null,this.produces=P.OPAQUE,this.type=0,this.isGround=!1,this.layerViewUid="",this._gaussianSplatParameters=new v,this._gaussianSplatCompositionParameters=new T,this._gaussianSplatDepthCompositionParameters=new y,this._splatTechniqueConfiguration=new R,this._splatDepthTechniqueConfiguration=new R(!0),this._previousCameraPosition=m(),this._previousCameraDirection=m(),this._tanFov=a(),this._tempVec=m(),this._cameraDelta=m(),this._coarseCameraPosition=m()}static{E=this}async initialize(){this._data=new S(this),this.view.sceneIntersectionHelper.addIntersectionHandler(this),this.addHandles([s(()=>this.view.state.camera,()=>this._onCameraChange())])}precompile(){this._splatTechniqueConfiguration.alphaCutoff=this.view.qualitySettings.gaussianSplat.minimumOpacity,this._splatTechniqueConfiguration.terrainDepthTest=this.bindParameters.terrainDepthTest,this.techniques.precompile(G,this._splatTechniqueConfiguration),this._splatDepthTechniqueConfiguration.alphaCutoff=this.view.qualitySettings.gaussianSplat.minimumOpacity,this._splatDepthTechniqueConfiguration.terrainDepthTest=this.bindParameters.terrainDepthTest,this.techniques.precompile(x,this._splatDepthTechniqueConfiguration),this.techniques.precompile(D),this.techniques.precompile(j)}render(t){const s=t.find(({name:t})=>t===P.OPAQUE);if(!this._data.visibleGaussians||!this._data.orderTexture.texture||!this._data.textureAtlas.texture)return s;const e=this.techniques.get(G,this._splatTechniqueConfiguration),a=this.techniques.get(x,this._splatDepthTechniqueConfiguration),r=this.techniques.get(D),n=this.techniques.get(j);if(!(e.compiled&&a.compiled&&n.compiled&&r.compiled))return this.requestRender(1),s;const{fullWidth:o,fullHeight:h}=this.bindParameters.camera,l=this.fboCache,c=l.acquire(o,h,"gaussian color output");c.attachDepth(s.getAttachment(A));const u=this.renderingContext;u.bindFramebuffer(c.fbo),u.setClearColor(0,0,0,0),u.clear(16384),this._gaussianSplatParameters.totalGaussians=this._data.visibleGaussians,this._gaussianSplatParameters.splatOrder=this._data.orderTexture.texture,this._gaussianSplatParameters.splatAtlas=this._data.textureAtlas.texture;const p=Math.tan(.5*this.camera.fovY),m=p/h*o;i(this._tanFov,m,p);const d=h/(2*p);this._gaussianSplatParameters.focalLength=d,this._gaussianSplatParameters.tanFov=this._tanFov;const g=this.view.qualitySettings.gaussianSplat.minimumSplatPixelRadius*Math.sqrt(o*h)/Math.sqrt(2073600);this._gaussianSplatParameters.minSplatRadius=g,this._prepareHighPrecisionCameraPosition(),this.renderingContext.bindTechnique(e,this.bindParameters,this._gaussianSplatParameters),this.renderingContext.drawArraysInstanced(V.TRIANGLE_STRIP,0,4,this._data.visibleGaussians);const f=l.acquire(o,h,"splat depth",8);f.attachDepth(s.getAttachment(A)),u.bindFramebuffer(f.fbo),u.setClearColor(0,0,0,0),u.clear(16384),this.renderingContext.bindTechnique(a,this.bindParameters,this._gaussianSplatParameters),this.renderingContext.drawArraysInstanced(V.TRIANGLE_STRIP,0,4,this._data.visibleGaussians);const _=l.acquire(o,h,this.produces);return this._gaussianSplatDepthCompositionParameters.splatDepth=f.getTexture(),_.attachDepth(s.getAttachment(A)),u.bindFramebuffer(_.fbo),u.bindTechnique(n,this.bindParameters,this._gaussianSplatDepthCompositionParameters),u.screen.draw(),this._gaussianSplatCompositionParameters.color=s.getTexture(),this._gaussianSplatCompositionParameters.splatColor=c.getTexture(),u.bindFramebuffer(_.fbo),u.bindTechnique(r,this.bindParameters,this._gaussianSplatCompositionParameters),u.screen.draw(),c.release(),f.release(),_}intersect(t,s,e,i){const{gaussianPosition:a,intersectionRayDir:u,intersectionPlane:p,layerViewUid:f}=this,P=_(e,i);r(u,i,e);const S=1/n(u);o(u,u,S);const q=m();h(q,u),g(p,u[0],u[1],u[2],-l(u,e));const v=new F,T=new F,D=new Array;this._data.visibleGaussianTiles.forEach(r=>{const{maxScale:n}=r,o=r.obb.minimumDistancePlane(p),h=r.obb.maximumDistancePlane(p),m=h<0,g=null!=v.dist&&null!=T.dist&&v.dist<o*S&&T.dist>h*S;if(m||g)return;if(!new b(r.obb.center,r.obb.radius+n).intersectRay(P,null))return;if(!r.obb.intersectRay(e,u,n))return;const{positions:_,squaredScales:C,gaussianAtlasIndices:w}=r,y=w.length;for(let p=0;p<y;p++){const r=3*p;a[0]=_[r]-e[0],a[1]=_[r+1]-e[1],a[2]=_[r+2]-e[2];const n=C[p],o=l(a,u),h=o*o;if(c(a)-h>n)continue;const m=o*S,g=t=>(t.point=t.point?t.point.fill(a[0],a[1],a[2]):d(a),t.dist=m,t.normal=q,t.layerViewUid=f,t);if((null==v.dist||m<v.dist)&&(null==s||s(e,i,m))&&g(v),0!==t.options.store&&(null==T.dist||m>T.dist)&&(null==s||s(e,i,m))&&g(T),2===t.options.store&&(null==s||s(e,i,m))){const t=new F;D.push(g(t))}}});const y=(t,s)=>{const{layerViewUid:e}=s,i=new C(s.point,e);t.set(0,i,s.dist,s.normal)};if(M(v)){const s=t.results.min;(null==s.distance||v.dist<s.distance)&&y(s,v)}if(M(T)&&0!==t.options.store){const s=t.results.max;(null==s.distance||T.dist>s.distance)&&y(s,T)}if(2===t.options.store)for(const r of D){const s=new w(P);y(s,r),t.results.all.push(s)}}get slicePlaneEnabled(){return this._slicePlaneEnabled}set slicePlaneEnabled(t){this._slicePlaneEnabled!==t&&(this._slicePlaneEnabled=t,this.requestRender(1))}get data(){return this._data}destroy(){this._data.destroy(),super.destroy()}_onCameraChange(){const t=this.view.state.camera.eye,s=this.view.state.camera.ray.direction,e=.001;(Math.abs(t[0]-this._previousCameraPosition[0])>e||Math.abs(t[1]-this._previousCameraPosition[1])>e||Math.abs(t[2]-this._previousCameraPosition[2])>e||Math.abs(s[0]-this._previousCameraDirection[0])>e||Math.abs(s[1]-this._previousCameraDirection[1])>e||Math.abs(s[2]-this._previousCameraDirection[2])>e)&&this._data.requestSort()}_prepareHighPrecisionCameraPosition(){o(this._tempVec,this.camera.eye,1/E.tileSize),u(this._tempVec,this._tempVec),p(this._coarseCameraPosition,this._tempVec),this._gaussianSplatParameters.cameraPos8k=this._coarseCameraPosition,o(this._tempVec,this._tempVec,E.tileSize),r(this._cameraDelta,this.camera.eye,this._tempVec),this._gaussianSplatParameters.cameraDelta=this._cameraDelta}static{this.tileSize=2.048}};function M(t){return null!=t.dist&&null!=t.point}I=E=t([e("esri.views.3d.webgl-engine.lib.GaussianSplatRenderNode")],I);class F{constructor(){this.point=null,this.dist=null,this.normal=null,this.layerViewUid=""}}export{I as GaussianSplatRenderNode};
5
+ import{__decorate as t}from"tslib";import{watch as e}from"../../../../core/reactiveUtils.js";import{property as s,subclass as i}from"../../../../core/accessorSupport/decorators.js";import{set as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{e as n,b as o,j as h,q as l,g as u,E as p,J as c,d as m}from"../../../../chunks/vec32.js";import{create as d,clone as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as f}from"../../../../chunks/vec42.js";import{create as _}from"../../../../geometry/support/plane.js";import{fromPoints as b}from"../../../../geometry/support/ray.js";import{Sphere as C}from"../../../../geometry/support/sphere.js";import{RenderCategory as P}from"../../webgl.js";import{GaussianSplatTarget as S}from"../../layers/i3s/Intersector.js";import{GaussianSplatDataStore as v}from"../../support/gaussianSplatting/GaussianSplatDataStore.js";import q from"../../webgl/RenderNode.js";import{IntersectorResult as T}from"./IntersectorResult.js";import{G as w}from"../../../../chunks/GaussianSplat.glsl.js";import{G as x}from"../../../../chunks/GaussianSplatComposition.glsl.js";import{GaussianSplatCompositionTechnique as y}from"../shaders/GaussianSplatCompositionTechnique.js";import{G as D}from"../../../../chunks/GaussianSplatDepthComposition.glsl.js";import{GaussianSplatDepthCompositionTechnique as j}from"../shaders/GaussianSplatDepthCompositionTechnique.js";import{GaussianSplatDepthTechnique as G}from"../shaders/GaussianSplatDepthTechnique.js";import{GaussianSplatTechnique as A}from"../shaders/GaussianSplatTechnique.js";import{GaussianSplatTechniqueConfiguration as F}from"../shaders/GaussianSplatTechniqueConfiguration.js";import{DepthStencilAttachment as R,PrimitiveType as E}from"../../../webgl/enums.js";var V;let H=class extends q{static{V=this}constructor(t){super(t),this.gaussianPosition=d(),this.intersectionRayDir=d(),this.intersectionPlane=_(),this._slicePlaneEnabled=!1,this._data=null,this.produces=P.OPAQUE,this.type=0,this.isGround=!1,this.layerViewUid="",this._gaussianSplatParameters=new w,this._gaussianSplatCompositionParameters=new x,this._gaussianSplatDepthCompositionParameters=new D,this._splatTechniqueConfiguration=new F,this._splatDepthTechniqueConfiguration=new F(!0),this._previousCameraPosition=d(),this._previousCameraDirection=d(),this._tanFov=r(),this._tempVec=d(),this._cameraDelta=d(),this._coarseCameraPosition=d(),this.fadeHelper=null}async initialize(){this._data=new v(this),this.view.sceneIntersectionHelper.addIntersectionHandler(this),this.addHandles([e(()=>this.view.state.camera,()=>this._onCameraChange())])}precompile(){this._splatTechniqueConfiguration.alphaCutoff=this.view.qualitySettings.gaussianSplat.minimumOpacity,this._splatTechniqueConfiguration.terrainDepthTest=this.bindParameters.terrainDepthTest,this._splatTechniqueConfiguration.fadingEnabled=this.fadeHelper.fadingEnabled,this.techniques.precompile(A,this._splatTechniqueConfiguration),this._splatDepthTechniqueConfiguration.alphaCutoff=this.view.qualitySettings.gaussianSplat.minimumOpacity,this._splatDepthTechniqueConfiguration.terrainDepthTest=this.bindParameters.terrainDepthTest,this.techniques.precompile(G,this._splatDepthTechniqueConfiguration),this.techniques.precompile(y),this.techniques.precompile(j)}render(t){const e=t.find(({name:t})=>t===P.OPAQUE);if(this._handleFading(),!this._data.visibleGaussians||!this._data.orderTexture.texture||!this._data.textureAtlas.texture)return e;const s=this.techniques.get(A,this._splatTechniqueConfiguration),i=this.techniques.get(G,this._splatDepthTechniqueConfiguration),r=this.techniques.get(y),n=this.techniques.get(j);if(!(s.compiled&&i.compiled&&n.compiled&&r.compiled))return this.requestRender(1),e;const{fullWidth:o,fullHeight:h}=this.bindParameters.camera,l=this.fboCache,u=l.acquire(o,h,"gaussian color output");u.attachDepth(e.getAttachment(R));const p=this.renderingContext;p.bindFramebuffer(u.fbo),p.setClearColor(0,0,0,0),p.clear(16384),this._gaussianSplatParameters.totalGaussians=this._data.visibleGaussians,this._gaussianSplatParameters.splatOrder=this._data.orderTexture.texture,this._gaussianSplatParameters.splatFading=this._data.fadingTexture.texture,this._gaussianSplatParameters.splatAtlas=this._data.textureAtlas.texture;const c=Math.tan(.5*this.camera.fovY),m=c/h*o;a(this._tanFov,m,c);const d=h/(2*c);this._gaussianSplatParameters.focalLength=d,this._gaussianSplatParameters.tanFov=this._tanFov;const g=this.view.qualitySettings.gaussianSplat.minimumSplatPixelRadius*Math.sqrt(o*h)/Math.sqrt(2073600);this._gaussianSplatParameters.minSplatRadius=g,this._prepareHighPrecisionCameraPosition(),this.renderingContext.bindTechnique(s,this.bindParameters,this._gaussianSplatParameters),this.renderingContext.drawArraysInstanced(E.TRIANGLE_STRIP,0,4,this._data.visibleGaussians);const f=l.acquire(o,h,"splat depth",8);f.attachDepth(e.getAttachment(R)),p.bindFramebuffer(f.fbo),p.setClearColor(0,0,0,0),p.clear(16384),this.renderingContext.bindTechnique(i,this.bindParameters,this._gaussianSplatParameters),this.renderingContext.drawArraysInstanced(E.TRIANGLE_STRIP,0,4,this._data.visibleGaussians);const _=l.acquire(o,h,this.produces);return this._gaussianSplatDepthCompositionParameters.splatDepth=f.getTexture(),_.attachDepth(e.getAttachment(R)),p.bindFramebuffer(_.fbo),p.bindTechnique(n,this.bindParameters,this._gaussianSplatDepthCompositionParameters),p.screen.draw(),this._gaussianSplatCompositionParameters.color=e.getTexture(),this._gaussianSplatCompositionParameters.splatColor=u.getTexture(),p.bindFramebuffer(_.fbo),p.bindTechnique(r,this.bindParameters,this._gaussianSplatCompositionParameters),p.screen.draw(),u.release(),f.release(),_}intersect(t,e,s,i){const{gaussianPosition:a,intersectionRayDir:r,intersectionPlane:c,layerViewUid:m}=this,_=b(s,i);n(r,i,s);const P=1/o(r);h(r,r,P);const v=d();l(v,r),f(c,r[0],r[1],r[2],-u(r,s));const q=new M,w=new M,x=new Array;this._data.visibleGaussianTiles.forEach(n=>{const{maxScale:o}=n,h=n.obb.minimumDistancePlane(c),l=n.obb.maximumDistancePlane(c),d=l<0,f=null!=q.dist&&null!=w.dist&&q.dist<h*P&&w.dist>l*P;if(d||f)return;if(!new C(n.obb.center,n.obb.radius+o).intersectRay(_,null))return;if(!n.obb.intersectRay(s,r,o))return;const{positions:b,squaredScales:S,gaussianAtlasIndices:T}=n,y=T.length;for(let c=0;c<y;c++){const n=3*c;a[0]=b[n]-s[0],a[1]=b[n+1]-s[1],a[2]=b[n+2]-s[2];const o=S[c],h=u(a,r),l=h*h;if(p(a)-l>o)continue;const d=h*P,f=t=>(t.point=t.point?t.point.fill(a[0],a[1],a[2]):g(a),t.dist=d,t.normal=v,t.layerViewUid=m,t);if((null==q.dist||d<q.dist)&&(null==e||e(s,i,d))&&f(q),0!==t.options.store&&(null==w.dist||d>w.dist)&&(null==e||e(s,i,d))&&f(w),2===t.options.store&&(null==e||e(s,i,d))){const t=new M;x.push(f(t))}}});const y=(t,e)=>{const{layerViewUid:s}=e,i=new S(e.point,s);t.set(0,i,e.dist,e.normal)};if(I(q)){const e=t.results.min;(null==e.distance||q.dist<e.distance)&&y(e,q)}if(I(w)&&0!==t.options.store){const e=t.results.max;(null==e.distance||w.dist>e.distance)&&y(e,w)}if(2===t.options.store)for(const n of x){const e=new T(_);y(e,n),t.results.all.push(e)}}get slicePlaneEnabled(){return this._slicePlaneEnabled}set slicePlaneEnabled(t){this._slicePlaneEnabled!==t&&(this._slicePlaneEnabled=t,this.requestRender(1))}get data(){return this._data}destroy(){this._data.destroy(),super.destroy()}_onCameraChange(){const t=this.view.state.camera.eye,e=this.view.state.camera.ray.direction,s=.001;(Math.abs(t[0]-this._previousCameraPosition[0])>s||Math.abs(t[1]-this._previousCameraPosition[1])>s||Math.abs(t[2]-this._previousCameraPosition[2])>s||Math.abs(e[0]-this._previousCameraDirection[0])>s||Math.abs(e[1]-this._previousCameraDirection[1])>s||Math.abs(e[2]-this._previousCameraDirection[2])>s)&&this._data.requestSort()}_prepareHighPrecisionCameraPosition(){h(this._tempVec,this.camera.eye,1/V.tileSize),c(this._tempVec,this._tempVec),m(this._coarseCameraPosition,this._tempVec),this._gaussianSplatParameters.cameraPos8k=this._coarseCameraPosition,h(this._tempVec,this._tempVec,V.tileSize),n(this._cameraDelta,this.camera.eye,this._tempVec),this._gaussianSplatParameters.cameraDelta=this._cameraDelta}_handleFading(){if(0===this.fadeHelper.numFadingTiles)return void(this._previousFrameStart=null);this._previousFrameStart??=this.view.stage.renderer.renderContext.time;const t=this.view.stage?.renderer.renderContext.time-this._previousFrameStart;this.fadeHelper.updateAllTileFading(t),this._previousFrameStart=this.view.stage.renderer.renderContext.time,this._data.fadingTexture.updateTexture(this._data.textureAtlas.pageAllocator.pageCount)}static{this.tileSize=2.048}};function I(t){return null!=t.dist&&null!=t.point}t([s({constructOnly:!0})],H.prototype,"fadeHelper",void 0),H=V=t([i("esri.views.3d.webgl-engine.lib.GaussianSplatRenderNode")],H);class M{constructor(){this.point=null,this.dist=null,this.normal=null,this.layerViewUid=""}}export{H as GaussianSplatRenderNode};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{ColorAttachment0 as e,ColorAttachment1 as n,ColorAttachment2 as r}from"../../../webgl/enums.js";import{defaultDepthWrite as t,separateBlendingParams as u,premultipliedAlpha as s,unpremultipliedAlphaToPremultipliedAlpha as c}from"../../../webgl/renderState.js";const f=u(1,0,1,771);function l(e,n=!1){switch(e){case 0:return n?s:c;case 1:return f;case 2:case 3:return null}}function o(e){if(e.draped)return null;switch(e.oitPass){case 0:case 2:return e.writeDepth?t:null;case 1:case 3:return null}}const a={factor:-1,units:-2},i=5e5;function b({oitPass:e,enableOffset:n}){return n&&1===e?a:null}function m(e,n=513){return 0===e||2===e?n:515}function p(t,u){return 1===t?u?{buffers:[e,n,r]}:{buffers:[e,n]}:u?{buffers:[e,n]}:null}export{a as OITPolygonOffset,i as OITPolygonOffsetLimit,l as blending,f as blendingColorAlpha,o as depthWrite,p as getDrawBuffers,m as oitDepthTest,b as oitPolygonOffset};
5
+ import{ColorAttachment0 as e,ColorAttachment1 as n,ColorAttachment2 as r}from"../../../webgl/enums.js";import{defaultDepthWrite as t,separateBlendingParams as u,premultipliedAlpha as s,unpremultipliedAlphaToPremultipliedAlpha as c}from"../../../webgl/renderState.js";const f=u(1,0,1,771);function l(e,n=!1){switch(e){case 0:return n?s:c;case 1:return f;case 2:case 3:return null}}function o(e){if(e.draped)return null;switch(e.oitPass){case 0:case 2:return e.writeDepth?t:null;case 1:case 3:return null}}function a(e,n=513){return{func:0===e||2===e?n:515}}const i={factor:-1,units:-2},b=5e5;function m({oitPass:e,enableOffset:n}){return n&&1===e?i:null}function p(t,u){return 1===t?u?{buffers:[e,n,r]}:{buffers:[e,n]}:u?{buffers:[e,n]}:null}export{i as OITPolygonOffset,b as OITPolygonOffsetLimit,l as blending,f as blendingColorAlpha,a as depthTest,o as depthWrite,p as drawBuffers,m as oitPolygonOffset};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{maxIndexCount as t,ManagedTextureBackedBuffer as e}from"./ManagedTextureBackedBuffer.js";class s{constructor(t,e){this._rctx=t,this._layoutDeclaration=e,this._bufferList=[]}garbageCollect(){const{_bufferList:t}=this;this._bufferList=t.filter(t=>0!==t.activeCount||(t.dispose(),!1))}destroy(){const{_bufferList:t}=this;t.forEach(t=>t.dispose()),this._bufferList=[]}getBuffer(s){const{_bufferList:r}=this;for(const t of r)if(t.availableCount>=s)return t;if(s>t)return null;const f=new e(this._rctx,this._layoutDeclaration);return r.push(f),f}updateTextures(){const t=this._bufferList;for(const e of t)e.textureBuffer.updateTexture()}}export{s as BufferManager};
5
+ import{maxIndexCount as t,ManagedTextureBackedBuffer as e}from"./ManagedTextureBackedBuffer.js";class s{constructor(t,e){this._rctx=t,this._layout=e,this._bufferList=[]}garbageCollect(){const{_bufferList:t}=this;this._bufferList=t.filter(t=>0!==t.activeCount||(t.dispose(),!1))}destroy(){const{_bufferList:t}=this;t.forEach(t=>t.dispose()),this._bufferList=[]}getBuffer(s){const{_bufferList:r}=this;for(const t of r)if(t.availableCount>=s)return t;if(s>t)return null;const f=new e(this._rctx,this._layout);return r.push(f),f}updateTextures(){const t=this._bufferList;for(const e of t)e.textureBuffer.updateTexture()}}export{s as BufferManager};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{typeToCreationInfoMap as t}from"./TextureBackedBufferFields.js";import{hashTextureBackedBufferLayout as e,LayoutField as r,TextureBackedBufferLayout as i}from"./TextureBackedBufferLayout.js";import{Texture as s}from"../../../../webgl/Texture.js";import{TextureDescriptor as n}from"../../../../webgl/TextureDescriptor.js";class u{constructor(t,e){this._rctx=t,this._fields=[],this._nameToFieldMap=new Map,this._textureData=new Uint8Array(new ArrayBuffer),this._textureWidth=1,this._textureHeight=1,this._dirty=!0,this._generateLayout(e);const r=new n(this._textureWidth,this._textureHeight);r.samplingMode=9728,r.wrapMode=33071,this._texture=new s(this._rctx,r)}get layout(){return this._layout}dispose(){this._texture.dispose(),this._texture=void 0,this._textureData=void 0}get test(){return{data:this._textureData,fields:this._fields}}getScalarField(t){const e=this._nameToFieldMap.get(t);return 1===e?.elementCount?e:null}getVec4Field(t){const e=this._nameToFieldMap.get(t);return 4===e?.elementCount?e:null}getVec5Field(t){const e=this._nameToFieldMap.get(t);return 5===e?.elementCount?e:null}resizeToFit(t){const e=t+1;e>this._textureData.length/this._layout.byteStride&&this._resize(e)}updateTexture(){if(!this._dirty)return;const t=this._texture.descriptor.width,e=this._texture.descriptor.height;t===this._textureWidth&&e===this._textureHeight||this._texture.resize(this._textureWidth,this._textureHeight),this._texture.setData(this._textureData),this._dirty=!1}get texture(){return this._texture}_resize(t){const{_fields:e,_layout:r}=this,i=r.byteStride;if(0===t){const t=new ArrayBuffer;this._textureData=new Uint8Array(t);for(const r of e)r.updateBuffer(t);return void(this._dirty=!0)}const s=Math.ceil(Math.sqrt(t)),n=Math.ceil(t/s),u=s*i,a=Math.ceil(u/4),o=new ArrayBuffer(u*n);for(const _ of e)_.updateBuffer(o);const h=new Uint8Array(o);h.set(this._textureData),this._textureData=h,this._textureWidth=a,this._textureHeight=n,this._dirty=!0}_generateLayout(t){const e=h(t),r=this._textureData.buffer;this._fields=e.fields.map(t=>{const e=t.createField(()=>this._dirty=!0);return e.updateBuffer(r),this._nameToFieldMap.set(e.name,e),e}),this._layout=e}}const a=new Map;function o(t){return a.get(t)}function h(s){const n=e(s);let u=a.get(n);if(null!=u)return u;let o=0;const h=[];for(let e=0;e<s.length;++e){const r=s[e],{type:i}=r,n=t.get(i);null!=n&&(h.push({declaration:r,byteOffset:o,creationInfo:n}),o+=n.byteSize)}o=_(o);const l=o,d=h.map(({declaration:t,byteOffset:e,creationInfo:i})=>new r(t,e,l,i));return u=new i(n,d,l),a.set(n,u),u}function _(t){return t+3&-4}export{u as TextureBackedBuffer,o as getTextureBackedBufferLayout};
5
+ import{Texture as t}from"../../../../webgl/Texture.js";import{TextureDescriptor as e}from"../../../../webgl/TextureDescriptor.js";class i{constructor(i,r){this._rctx=i,this._fields=[],this._nameToFieldMap=new Map,this._textureData=new Uint8Array(new ArrayBuffer),this._textureWidth=1,this._textureHeight=1,this._dirty=!0,this._layout=r,this._setupFields(r);const s=new e(this._textureWidth,this._textureHeight);s.samplingMode=9728,s.wrapMode=33071,this._texture=new t(this._rctx,s)}get layout(){return this._layout}dispose(){this._texture.dispose(),this._texture=void 0,this._textureData=void 0}get test(){return{data:this._textureData,fields:this._fields}}getScalarField(t){const e=this._nameToFieldMap.get(t);return 1===e?.elementCount?e:null}getVec4Field(t){const e=this._nameToFieldMap.get(t);return 4===e?.elementCount?e:null}getVec5Field(t){const e=this._nameToFieldMap.get(t);return 5===e?.elementCount?e:null}resizeToFit(t){const e=t+1;e>this._textureData.length/this._layout.byteStride&&this._resize(e)}updateTexture(){if(!this._dirty)return;const t=this._texture.descriptor.width,e=this._texture.descriptor.height;t===this._textureWidth&&e===this._textureHeight||this._texture.resize(this._textureWidth,this._textureHeight),this._texture.setData(this._textureData),this._dirty=!1}get texture(){return this._texture}_resize(t){const{_fields:e,_layout:i}=this,r=i.byteStride;if(0===t){const t=new ArrayBuffer;this._textureData=new Uint8Array(t);for(const i of e)i.updateBuffer(t);return void(this._dirty=!0)}const s=Math.ceil(Math.sqrt(t)),h=Math.ceil(t/s),u=s*r,a=Math.ceil(u/4),n=new ArrayBuffer(u*h);for(const o of e)o.updateBuffer(n);const _=new Uint8Array(n);_.set(this._textureData),this._textureData=_,this._textureWidth=a,this._textureHeight=h,this._dirty=!0}_setupFields(t){const e=this._textureData.buffer;this._fields=t.fields.map(t=>{const i=t.createField(()=>this._dirty=!0);return i.updateBuffer(e),this._nameToFieldMap.set(i.name,i),i})}}export{i as TextureBackedBuffer};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{packFloatRGBA as e,packFloatRGB as t}from"../../../../../core/floatRGBA.js";import{BufferViewVec4u8 as s,BufferViewVec3u8 as r,BufferViewUint8 as i}from"../../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as f}from"../../../../../geometry/support/buffer/types.js";class u{constructor(e,t,s,r){this.name=e,this.byteOffset=t,this.byteStride=s,this.makeDirty=r}}class n extends u{constructor(e,t,s,r){super(e,t,s,r),this.elementCount=1}}class o extends n{constructor(e,t,s,r,i){super(e,s,r,i),this._bufferViewConstructor=t}updateBuffer(e){const{byteOffset:t,byteStride:s,_bufferViewConstructor:r}=this;this._bufferView=new r(e,t,s),this.makeDirty()}set(e,t){this._bufferView.set(e,t),this.makeDirty()}}class a extends n{constructor(e,t,s,r,i){super(e,t,s,r),this._maxValue=i}updateBuffer(e){const{byteOffset:t,byteStride:s}=this;this._bufferView=new r(e,t,s),this.makeDirty()}set(e,s){const{_bufferView:r,_maxValue:i,makeDirty:f}=this;t(s/i*.5+.5,p),r.setValues(e,p[0],p[1],p[2]),f()}}class c extends n{constructor(e,t,s,r,i){super(e,t,s,r),this._maxValue=i}updateBuffer(e){const{byteOffset:t,byteStride:r}=this;this._bufferView=new s(e,t,r),this.makeDirty()}set(t,s){const{_bufferView:r,_maxValue:i,makeDirty:f}=this;e(s/i*.5+.5,k),r.setValues(t,k[0],k[1],k[2],k[3]),f()}}class h extends u{constructor(e,t,s,r){super(e,t,s,r),this.elementCount=3}}class b extends h{constructor(e,t,s,r,i){super(e,s,r,i),this._bufferViewConstructor=t}updateBuffer(e){const{byteOffset:t,byteStride:s,_bufferViewConstructor:r}=this;this._bufferView=new r(e,t,s),this.makeDirty()}setValues(e,t,s,r){this._bufferView.set(e,0,t),this._bufferView.set(e,1,s),this._bufferView.set(e,2,r),this.makeDirty()}setElement(e,t,s){this._bufferView.set(e,t,s),this.makeDirty()}setVec(e,t){this._bufferView.setVec(e,t),this.makeDirty()}setArray(e,t){this._bufferView.set(e,0,t[0]),this._bufferView.set(e,1,t[1]),this._bufferView.set(e,2,t[2]),this.makeDirty()}}class V extends u{constructor(e,t,s,r){super(e,t,s,r),this.elementCount=4}}class w extends V{constructor(e,t,s,r,i){super(e,s,r,i),this._bufferViewConstructor=t}updateBuffer(e){const{byteOffset:t,byteStride:s,_bufferViewConstructor:r}=this;this._bufferView=new r(e,t,s),this.makeDirty()}setValues(e,t,s,r,i){this._bufferView.set(e,0,t),this._bufferView.set(e,1,s),this._bufferView.set(e,2,r),this._bufferView.set(e,3,i),this.makeDirty()}setElement(e,t,s){this._bufferView.set(e,t,s),this.makeDirty()}getElement(e,t){return this._bufferView.get(e,t)}setVec(e,t){this._bufferView.setVec(e,t),this.makeDirty()}setArray(e,t){this._bufferView.set(e,0,t[0]),this._bufferView.set(e,1,t[1]),this._bufferView.set(e,2,t[2]),this._bufferView.set(e,3,t[3]),this.makeDirty()}}class m extends u{constructor(e,t,s,r){super(e,t,s,r),this.elementCount=5}}class y extends m{constructor(e,t,s,r,i){super(e,s,r,i),this._bufferViewConstructor=t}updateBuffer(e){const{byteOffset:t,byteStride:s,_bufferViewConstructor:r}=this;this._bufferView=new r(e,t,s),this.makeDirty()}setValues(e,t,s,r,i,f){const u=254&r|f;this._bufferView.set(e,0,t),this._bufferView.set(e,1,s),this._bufferView.set(e,2,u),this._bufferView.set(e,3,i),this.makeDirty()}}const _={u8:{elementCount:1,byteSize:l(i),createField:(e,t,s,r)=>new o(e.name,i,t,s,r)},"packed-f24":{elementCount:1,byteSize:l(r),createField:(e,t,s,r)=>new a(e.name,t,s,r,e.maxValue)},"packed-f32":{elementCount:1,byteSize:l(s),createField:(e,t,s,r)=>new c(e.name,t,s,r,e.maxValue)},vec4u8:{elementCount:4,byteSize:l(s),createField:(e,t,r,i)=>new w(e.name,s,t,r,i)},u8u8u7xu8:{elementCount:5,byteSize:l(s),createField:(e,t,r,i)=>new y(e.name,s,t,r,i)}};function l(e){return f(e.ElementType)*e.ElementCount}const d=new Map;Object.entries(_).forEach(([e,t])=>{d.set(e,t)});const p=new Uint8Array(3),k=new Uint8Array(4);export{o as DefaultScalarField,b as DefaultVec3Field,w as DefaultVec4Field,u as Field,a as PackedF24Field,c as PackedF32Field,n as ScalarField,y as U8U8U7XU8Field,V as Vec4Field,m as Vec5Field,d as typeToCreationInfoMap};
5
+ import{packFloatRGB as e,packFloatRGBA as t}from"../../../../../core/floatRGBA.js";import{BufferViewUint8 as s,BufferViewVec4u8 as r,BufferViewVec3u8 as i}from"../../../../../geometry/support/buffer/BufferView.js";import{elementTypeSize as f}from"../../../../../geometry/support/buffer/types.js";class u{constructor(e,t,s,r){this.name=e,this.byteOffset=t,this.byteStride=s,this.makeDirty=r}}class n extends u{constructor(e,t,s,r){super(e,t,s,r),this.elementCount=1}}class a extends n{constructor(e,t,s,r,i){super(e,s,r,i),this._bufferViewConstructor=t}updateBuffer(e){const{byteOffset:t,byteStride:s,_bufferViewConstructor:r}=this;this._bufferView=new r(e,t,s),this.makeDirty()}set(e,t){this._bufferView.set(e,t),this.makeDirty()}}class o extends n{constructor(e,t,s,r,i){super(e,t,s,r),this._maxValue=i}updateBuffer(e){const{byteOffset:t,byteStride:s}=this;this._bufferView=new i(e,t,s),this.makeDirty()}set(t,s){const{_bufferView:r,_maxValue:i,makeDirty:f}=this;e(s/i*.5+.5,d),r.setValues(t,d[0],d[1],d[2]),f()}}class h extends n{constructor(e,t,s,r,i){super(e,t,s,r),this._maxValue=i}updateBuffer(e){const{byteOffset:t,byteStride:s}=this;this._bufferView=new r(e,t,s),this.makeDirty()}set(e,s){const{_bufferView:r,_maxValue:i,makeDirty:f}=this;t(s/i*.5+.5,p),r.setValues(e,p[0],p[1],p[2],p[3]),f()}}class c extends u{constructor(e,t,s,r){super(e,t,s,r),this.elementCount=3}}class b extends c{constructor(e,t,s,r,i){super(e,s,r,i),this._bufferViewConstructor=t}updateBuffer(e){const{byteOffset:t,byteStride:s,_bufferViewConstructor:r}=this;this._bufferView=new r(e,t,s),this.makeDirty()}setValues(e,t,s,r){this._bufferView.set(e,0,t),this._bufferView.set(e,1,s),this._bufferView.set(e,2,r),this.makeDirty()}setElement(e,t,s){this._bufferView.set(e,t,s),this.makeDirty()}setVec(e,t){this._bufferView.setVec(e,t),this.makeDirty()}setArray(e,t){this._bufferView.set(e,0,t[0]),this._bufferView.set(e,1,t[1]),this._bufferView.set(e,2,t[2]),this.makeDirty()}}class V extends u{constructor(e,t,s,r){super(e,t,s,r),this.elementCount=4}}class w extends V{constructor(e,t,s,r,i){super(e,s,r,i),this._bufferViewConstructor=t}updateBuffer(e){const{byteOffset:t,byteStride:s,_bufferViewConstructor:r}=this;this._bufferView=new r(e,t,s),this.makeDirty()}setValues(e,t,s,r,i){this._bufferView.set(e,0,t),this._bufferView.set(e,1,s),this._bufferView.set(e,2,r),this._bufferView.set(e,3,i),this.makeDirty()}setElement(e,t,s){this._bufferView.set(e,t,s),this.makeDirty()}getElement(e,t){return this._bufferView.get(e,t)}setVec(e,t){this._bufferView.setVec(e,t),this.makeDirty()}setArray(e,t){this._bufferView.set(e,0,t[0]),this._bufferView.set(e,1,t[1]),this._bufferView.set(e,2,t[2]),this._bufferView.set(e,3,t[3]),this.makeDirty()}}class m extends u{constructor(e,t,s,r){super(e,t,s,r),this.elementCount=5}}class y extends m{constructor(e,t,s,r,i){super(e,s,r,i),this._bufferViewConstructor=t}updateBuffer(e){const{byteOffset:t,byteStride:s,_bufferViewConstructor:r}=this;this._bufferView=new r(e,t,s),this.makeDirty()}setValues(e,t,s,r,i,f){const u=254&r|f;this._bufferView.set(e,0,t),this._bufferView.set(e,1,s),this._bufferView.set(e,2,u),this._bufferView.set(e,3,i),this.makeDirty()}}function _(e){return f(e.ElementType)*e.ElementCount}const l=new Map([["u8",{elementCount:1,byteSize:_(s),createField:(e,t,r,i)=>new a(e.name,s,t,r,i)}],["packed-f24",{elementCount:1,byteSize:_(i),createField:(e,t,s,r)=>new o(e.name,t,s,r,e.maxValue)}],["packed-f32",{elementCount:1,byteSize:_(r),createField:(e,t,s,r)=>new h(e.name,t,s,r,e.maxValue)}],["vec4u8",{elementCount:4,byteSize:_(r),createField:(e,t,s,i)=>new w(e.name,r,t,s,i)}],["u8u8u7xu8",{elementCount:5,byteSize:_(r),createField:(e,t,s,i)=>new y(e.name,r,t,s,i)}]]),d=new Uint8Array(3),p=new Uint8Array(4);export{a as DefaultScalarField,b as DefaultVec3Field,w as DefaultVec4Field,u as Field,o as PackedF24Field,h as PackedF32Field,n as ScalarField,y as U8U8U7XU8Field,V as Vec4Field,m as Vec5Field,l as typeToCreationInfoMap};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- class t{constructor(t,e,s,n){this._declaration=t,this._byteOffset=e,this._byteStride=s,this._creationInfo=n,this._startTexel=Math.floor(e/4);const r=this.byteSize;this._numTexels=Math.ceil((e+r)/4)-this._startTexel;let i=this._startTexel,l=e%4;const o=[],a=["x","y","z","w"];for(let h=0;h<r;++h){const t=`texel${i}.${a[l]}`;o.push(t),++l,l>=4&&(l=0,++i)}this._glslDecodeArgumentString=o.join(", ")}get name(){return this._declaration.name}get declaration(){return this._declaration}get byteOffset(){return this._byteOffset}get byteSize(){return this._creationInfo.byteSize}get startTexel(){return this._startTexel}get numTexels(){return this._numTexels}get elementCount(){return this._creationInfo.elementCount}get glslDecodeArgumentString(){return this._glslDecodeArgumentString}createField(t){const{_declaration:e,_byteOffset:s,_byteStride:n,_creationInfo:r}=this;return r.createField(e,s,n,t)}}class e{constructor(t,e,s){this.byteStride=0,this.numTexels=0,this.hash=t,this.fields=e,this.byteStride=s,this.numTexels=Math.ceil(s/4)}}const s=new Map;let n=1;const r=8;function i(t){const e=t.map(t=>`${t.name}/${t.type})`).join("-");let r=s.get(e);return null==r&&(r=n++,s.set(e,r)),r}export{t as LayoutField,r as MAX_COUNT_TEXTURE_BACKED_BUFFER_LAYOUTS,e as TextureBackedBufferLayout,i as hashTextureBackedBufferLayout};
5
+ import{typeToCreationInfoMap as t}from"./TextureBackedBufferFields.js";class e{constructor(t,e,r,n){this._declaration=t,this._byteOffset=e,this._byteStride=r,this._creationInfo=n,this._startTexel=Math.floor(e/4);const s=this.byteSize;this._numTexels=Math.ceil((e+s)/4)-this._startTexel;let i=this._startTexel,o=e%4;const l=[],a=["x","y","z","w"];for(let c=0;c<s;++c){const t=`texel${i}.${a[o]}`;l.push(t),++o,o>=4&&(o=0,++i)}this._glslDecodeArgumentString=l.join(", ")}get name(){return this._declaration.name}get declaration(){return this._declaration}get byteOffset(){return this._byteOffset}get byteSize(){return this._creationInfo.byteSize}get startTexel(){return this._startTexel}get numTexels(){return this._numTexels}get elementCount(){return this._creationInfo.elementCount}get glslDecodeArgumentString(){return this._glslDecodeArgumentString}createField(t){const{_declaration:e,_byteOffset:r,_byteStride:n,_creationInfo:s}=this;return s.createField(e,r,n,t)}}function r(t){return t+3&-4}class n{constructor(n){this.byteStride=0,this.numTexels=0;let s=0;const i=[];for(let e=0;e<n.length;++e){const r=n[e],{type:o}=r,l=t.get(o);null!=l&&(i.push({declaration:r,byteOffset:s,creationInfo:l}),s+=l.byteSize)}s=r(s);const o=s,l=i.map(({declaration:t,byteOffset:r,creationInfo:n})=>new e(t,r,o,n));this.fields=l,this.byteStride=o,this.numTexels=Math.ceil(o/4)}}export{e as LayoutField,n as TextureBackedBufferLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{equals as r,binaryIndexOf as s}from"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import n from"../../../../../core/Logger.js";import{clamp as i}from"../../../../../core/mathUtils.js";import{disposeMaybe as o,destroyMaybe as a}from"../../../../../core/maybe.js";import{isAbortError as l,onAbortOrThrow as c}from"../../../../../core/promiseUtils.js";import{property as d,subclass as h}from"../../../../../core/accessorSupport/decorators.js";import{fromMat4 as u,transpose as m,invert as g}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as p}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as f}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as _,d as y,a as b,g as j}from"../../../../../chunks/vec32.js";import{create as w,clone as O}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as E}from"../../../../../core/support/UpdatingHandles.js";import{c as v}from"../../../../../chunks/vec33.js";import{maxElevationOffset as x}from"../../collections/Component/Material/shader/ComponentData.glsl.js";import{TwoVectorPosition as M}from"../../core/util/TwoVectorPosition.js";import{Attribute as T}from"../Attribute.js";import{GridLocalOriginFactory as R}from"../GridLocalOriginFactory.js";import{applyToModelMatrix as C}from"../localOriginHelper.js";import{LocalOriginManager as P}from"../LocalOriginManager.js";import{Object3D as A}from"../Object3D.js";import{VertexArrayObject as D}from"../VertexArrayObject.js";import{VertexLayout as k,glVertexLayout as L,EdgeInputBufferLayout as S,RegularEdgeInstancesGLLayout as U,SilhouetteEdgeInstancesGLLayout as V}from"./bufferLayouts.js";import{EdgeRenderer as q,lineWidthFractionFactor as H,extensionLengthOffset as B}from"./EdgeRenderer.js";import{EdgePassParameters as F}from"./EdgeShaderParameters.js";import{EdgeWorkerHandle as I}from"./EdgeWorkerHandle.js";import{generateStrokesTexture as N}from"./strokes.js";import{determineRendererType as W,determineEdgeTransparency as z,determineObjectTransparency as G,fillComponentBufferIndices as K}from"./util.js";import{BufferManager as J}from"../TextureBackedBuffer/BufferManager.js";import{VertexBuffer as Q}from"../../../../webgl/VertexBuffer.js";const X=128;let Y=class extends t{constructor(e){super(e),this._updatingHandles=new E,this._objectEntries=new Map,this._pendingDeletions=new Map,this._renderers=new Map,this._gpuMemoryUsage=0,this._workerAbort=new AbortController,this._tmpModelPosition=w(),this._localOrigins=new P(new R(e.renderSR));const t=k.createBuffer(4);for(let r=0;r<4;r++)t.sideness.set(r,0,0===r||3===r?0:1),t.sideness.set(r,1,0===r||1===r?0:1);this._vertexBuffer=new Q(e.rctx,L,t.buffer)}initialize(){this._workerHandle=new I(this.schedule),this._componentColorManager=new J(this.rctx,fe)}destroy(){this.destroyed||(this._objectEntries.forEach(e=>this._discardObjectEntry(e)),this._objectEntries.clear(),this._pendingDeletions.forEach(e=>this._discardObjectEntry(e)),this._pendingDeletions.clear(),this._strokesTexture=o(this._strokesTexture),this._componentColorManager=a(this._componentColorManager),this._workerAbort.abort(),this._workerHandle.destroy(),this._vertexBuffer.dispose(),this._renderers.clear(),this._updatingHandles.destroy(),this._set("schedule",pe))}get updating(){return this._updatingHandles.updating}get usedMemory(){return this._gpuMemoryUsage}shouldRender(){return this._renderers.size>0}async addComponentObject(e,t,r,s,n,i,o){if(this.hasObject(e))return this._getObjectMemoryUsage(e);let a;const l=new ee(null,new Promise(e=>a=e),e.obb.center,e.obb.radius);this._objectEntries.set(e,l);const c=await this._updatingHandles.addPromise(this._addComponentGeometry(e.transform,l,t,r,s,n,i,o));return this.setNeedsRender(),a(),c}async addOrUpdateObject3D(e,t,r,s){if(this.destroyed)return void n.getLogger(this).warn("Attempt to add an object to a destroyed instance");const i=new AbortController;let o;const{center:a,radius:c}=e.boundingVolumeWorldSpace.bounds,d=new ee(i,new Promise(e=>o=e),a,c),h=this._objectEntries.get(e);h&&(this._pendingDeletions.has(e)?this._discardObjectEntry(h):this._pendingDeletions.set(e,h)),this._objectEntries.set(e,d);try{const n=new Array;if(e.geometries.length>1&&$(e))n.push(this._addObjectMergedGeometries(e,d,t,r,s));else for(const i of e.geometries)i.material.supportsEdges&&n.push(this._addGeometry(e,d,i,t,r,s));await this._updatingHandles.addPromise(Promise.all(n)),this._removePendingDeletion(e)}catch(u){l(u)?this._discardObjectEntry(d):this._removePendingDeletion(e)}finally{this.setNeedsRender(),o()}}removeObject(e){const t=this._objectEntries.get(e);this._objectEntries.delete(e),this._discardObjectEntry(t),this._removePendingDeletion(e)}_removePendingDeletion(e){const t=this._pendingDeletions.get(e);this._pendingDeletions.delete(e),this._discardObjectEntry(t)}async _getObjectEntry(e){const t=this._objectEntries.get(e);if(!t)throw new Error("no object");return await t.loaded,null==t.loaded?null:t}fastUpdateObject3DEdgesTransform(e){if(this.destroyed)return!1;const t=this._objectEntries.get(e);if(!t)return!1;const{geometries:r}=e,{renderables:s}=t;if(0===r.length||0===s.length)return!0;if(s.length>1)return!1;const[n]=s,i=n.transform;if(!(i instanceof se))return!1;const[o]=r;if(o.localOrigin!==i.origin.origin)return!1;const a=f(),l=this._computeModelTransformWithLocalOrigin(e,o,a);return n.transform=new se(a,l),this.setNeedsRender(),!0}_discardObjectEntry(e){e&&(e.abort?.abort(),e.renderables.length&&(e.renderables.forEach(e=>this._removeRenderable(e)),this.setNeedsRender()),e.loaded=null)}hasObject(e){return this._objectEntries.has(e)}async updateAllComponentOpacities(e,t){const r=await this._updatingHandles.addPromise(this._getObjectEntry(e));if(null==r)return;const s=Array.isArray(t)?e=>t[e]:()=>t;r.renderables.forEach(e=>{const{meta:t,buffer:r}=e.components,n=t.length,i=r.textureBuffer.getScalarField("opacity");for(let o=0;o<n;o++){const e=s(o),r=t[o],n=r.index;r.material.opacity=e,i.set(n,255*e)}this._updateTransparency(e)}),this.setNeedsRender()}async _getObjectMemoryUsage(e){const t=await this._getObjectEntry(e);return t?t.renderables.reduce((e,t)=>e+t.statistics.gpuMemoryUsage,0):0}async updateAllComponentMaterials(e,t,r,s){const n=e instanceof A,i=W(t),o=q.getKey(i,r,n),a=await this._updatingHandles.addPromise(this._getObjectEntry(e));null!=a&&(a.renderables.forEach(e=>{if(o!==e.rendererKey){const t=this._renderers.get(e.rendererKey),s=this._acquireRenderer(i,r,n);t.removeRenderable(e),--t.refCount,e.rendererKey=o,s.addRenderable(e)}if(Array.isArray(t))for(let r=0;r<t.length;r++)e.components.meta[r].material=t[r];else e.components.meta[0].material=t;s&&oe(e.components),this._updateTransparency(e)}),this.setNeedsRender())}async updateAllVerticalOffsets(e,t){const r=await this._updatingHandles.addPromise(this._getObjectEntry(e));null!=r&&this._updateAllVerticalOffsets(r,t)}_updateAllVerticalOffsets(e,t){e.renderables.forEach(e=>{const r=e.components.meta;for(let s=0;s<r.length;s++)e.components.meta[s].verticalOffset=t?.[s]??0;oe(e.components)}),this.setNeedsRender()}async updateObjectVisibility(e,t){const r=await this._updatingHandles.addPromise(this._getObjectEntry(e));r&&(r.renderables.forEach(e=>e.visible=t),this.setNeedsRender())}render(e,t){if(null==this._componentColorManager)return;this._localOrigins.updateViewMatrices(e.camera.viewMatrix);const r=e.camera.viewInverseTransposeMatrix,s=w(),n=new M;let i=0,o=0;if(this._renderers.forEach(r=>{0!==r.refCount?(++this.techniques.precompiling,r.forEachRenderable(t=>{t.visible&&(i+=t.statistics.averageEdgeLength,o++,t.regular&&r.acquireTechnique(e,!1),t.silhouette&&r.acquireTechnique(e,!0))},t),--this.techniques.precompiling):this._renderers.delete(r.key)}),this._componentColorManager.garbageCollect(),this._componentColorManager.updateTextures(),0===o)return;const a=new F(40*i/o,t);_(s,r[3],r[7],r[11]),n.set(s),y(a.transformWorldFromViewTH,n.high),y(a.transformWorldFromViewTL,n.low),u(a.transformViewFromCameraRelativeRS,e.camera.viewMatrix),m(ge,a.transformViewFromCameraRelativeRS),g(a.transformNormalViewFromGlobal,ge),a.transformProjFromView=e.camera.projectionMatrix,this._updateObjectCameraDistances(e),this._renderers.forEach(t=>{ae(t,e,a),le(t,e,a)})}_updateTransparency(e){const t=z(e.components.meta),r=G(e.components.meta);t===e.edgeTransparency&&r===e.objectTransparency||(e.edgeTransparency=t,e.objectTransparency=r,this._renderers.get(e.rendererKey).setRenderablesDirty())}_computeModelTransformWithLocalOrigin(e,t,r){e.getCombinedShaderTransformation(t,r);const s=null!=t.localOrigin?this._localOrigins.register(t.localOrigin):this._localOrigins.acquire(_(this._tmpModelPosition,r[12],r[13],r[14]));return t.localOrigin=s.origin,C(s.origin.vec3,r),s}_createComponentBuffers(e){if(null==this._componentColorManager)return null;const t=new Array,r=this._componentColorManager.getBuffer(e.length),s=r.acquireIndices(e.length);for(let i=0;i<e.length;i++){const r=e[i],n=s[i];t.push({index:n,verticalOffset:0,material:r})}const n=new te(r,t);return oe(n),n}_extractEdges(e,t,r,s,n,i,o=i.length){return o<X&&(n=!0),this._workerHandle.process({data:r,indices:i,indicesLength:o,writerSettings:t,skipDeduplicate:s},e,n)}_createRenderable(e,t,r,s,n){const i=t=>new re(new D(this.rctx,new Map([["vertices",this._vertexBuffer],["instances",0===t?new Q(this.rctx,U,e.regular.instancesData.buffer):new Q(this.rctx,V,e.silhouette.instancesData.buffer)]])),0===t?e.regular.lodInfo:e.silhouette.lodInfo),o=e.regular.lodInfo.lengths.length>0?i(0):null,a=e.silhouette.lodInfo.lengths.length>0?i(1):null,l=(o?.vao.usedMemory??0)+(a?.vao.usedMemory??0);return new ne(o,a,{gpuMemoryUsage:l,externalMemoryUsage:n,averageEdgeLength:e.averageEdgeLength},r,z(t.meta),G(t.meta),t,s)}async _addGeometry(e,t,r,s,n,i){if(r.edgeIndicesLength<=0)return;const o=r.attributes.get("position"),a=f(),l=this._computeModelTransformWithLocalOrigin(e,r,a),c=new me(o,a,l);return this._addPositionData(t,c,r.edgeIndicesLength,s,n,i)}async _addPositionData(e,t,r,s,n,i=!1){if(null==e.loaded)return;const o=this._createComponentBuffers([s]);if(null==o)return;const a=this._acquireRenderer(s.type,n,!0),{modelTransform:l,origin:c}=t,d=t.position.indices,h=t.position,u=h.data.length/h.size,m=S.createBuffer(u);for(let f=0;f<u;f++)m.position.set(f,0,h.data[f*h.size]),m.position.set(f,1,h.data[f*h.size+1]),m.position.set(f,2,h.data[f*h.size+2]);K(o.meta,[0,m.componentIndex.count],m.componentIndex);const g=await this._updatingHandles.addPromise(this._extractEdges(e.abort?.signal||this._workerAbort.signal,a.writerSettings,m,!1,i,d,r));if(null==e.loaded)return;const p=this._createRenderable(g,o,new se(l,c),a.key,!1);e.renderables.push(p),a.addRenderable(p),this._gpuMemoryUsage+=p.statistics.gpuMemoryUsage}async _addComponentGeometry(e,t,r,s,n,i,o,a){if(null==t.loaded)return 0;const l=this._createComponentBuffers(i);if(null==l)return 0;const c=W(i),d=this._acquireRenderer(c,o||!1,!1),h=S.createBuffer(r.length/3);v(h.position.typedBuffer,r,h.position.typedBufferStride,3),K(l.meta,n,h.componentIndex,s);const u=!0,m=d.writerSettings,g=await this._updatingHandles.addPromise(this._extractEdges(this._workerAbort.signal,m,h,u,!1,s));if(null==t.loaded)return 0;const p=this._createRenderable(g,l,e,d.key,!0);return t.renderables.push(p),d.addRenderable(p),this._updateAllVerticalOffsets(t,a),p.statistics.gpuMemoryUsage}async _addObjectMergedGeometries(e,t,r,s,n){const i=new Map;let o=0,a=0,l=null;const c=e.geometries.filter(e=>{if(e.edgeIndicesLength<=0||!e.material.supportsEdges)return!1;!l&&e.localOrigin&&(l=e);const t=e.positionAttribute;return a+=t.data.length/t.size,o+=e.edgeIndicesLength,!0});if(0===c.length)return;const d=a>=65536?Uint32Array:Uint16Array,h=o?new d(o):null,u=[];let m=0;c.forEach(e=>{const t=e.attributes.get("position"),r=t.indices;let s=i.get(t.data);if(null==s){s=u.length/3;for(let e=0;e<t.data.length;e+=t.size)u.push(t.data[e]),u.push(t.data[e+1]),u.push(t.data[e+2]);i.set(t.data,s)}for(let n=0;n<e.edgeIndicesLength;n++)h[m++]=s+r[n]});const g=l||e.geometries[0],p=f(),_=this._computeModelTransformWithLocalOrigin(e,g,p);for(let f=0;f<e.geometries.length;f++)e.geometries[f].localOrigin=_.origin;const y=new me(new T(u,h,3),p,_);await this._updatingHandles.addPromise(this._addPositionData(t,y,h.length,r,s,n))}_acquireRenderer(e,t,r){const s=q.getKey(e,t,r);let n=this._renderers.get(s);return null==this._strokesTexture&&(this._strokesTexture=N(this.rctx)),n||(n=new q(this.rctx,this.techniques,{type:e,hasSlicePlane:t,strokesTexture:this._strokesTexture,legacy:r,spherical:1===this.viewingMode}),this._renderers.set(s,n)),++n.refCount,n}_removeRenderable(e){Z(e.regular),Z(e.silhouette);const t=this._renderers.get(e.rendererKey);if(t){t.removeRenderable(e),--t.refCount,this._localOrigins.release(e.transform.origin),this._gpuMemoryUsage-=e.statistics.externalMemoryUsage?0:e.statistics.gpuMemoryUsage;for(const t of e.components.meta)e.components.buffer.releaseIndex(t.index)}}_updateObjectCameraDistances(e){const t=e.camera.eye,r=e.camera.viewForward,s=w(),n=e=>{b(s,e.center,t);const n=j(s,r),i=e.radius,o=n<-i?1/0:n<i?0:n-i;e.renderables.forEach(e=>e.distanceToCamera=o)};this._objectEntries.forEach(n),this._pendingDeletions.forEach(n)}get test(){}};function Z(e){e?.vao&&(e.vao.buffer("instances")?.dispose(),e.vao.disposeVAOOnly(),e.vao=null)}function $(e){let t=null,s=null;for(const n of e.geometries){if(n.material.supportsEdges){if(t){if(!r(t,n.transformation))return!1}else t=n.transformation;if(s||null==n.localOrigin){if(null!=s?.localOrigin&&null!=n.localOrigin&&s.localOrigin.id!==n.localOrigin.id)return!1}else s=n}}return!0}e([d({constructOnly:!0})],Y.prototype,"rctx",void 0),e([d({constructOnly:!0})],Y.prototype,"renderSR",void 0),e([d({constructOnly:!0})],Y.prototype,"viewingMode",void 0),e([d({constructOnly:!0})],Y.prototype,"techniques",void 0),e([d({constructOnly:!0})],Y.prototype,"setNeedsRender",void 0),e([d({constructOnly:!0})],Y.prototype,"schedule",void 0),e([d({readOnly:!0})],Y.prototype,"_updatingHandles",void 0),e([d({readOnly:!0})],Y.prototype,"updating",null),Y=e([h("esri.views.3d.webgl-engine.lib.edgeRendering.EdgeView")],Y);class ee{constructor(e,t,r,s){this.abort=e,this.radius=s,this.renderables=new Array;const n=e?c(e.signal,()=>e.abort()):null;this.loaded=t,this.loaded.then(()=>{null!=this.loaded&&(this.loaded=!0),this.abort=null,n?.remove()}),this.center=O(r)}}class te{constructor(e,t){this.buffer=e,this.meta=t}}class re{constructor(e,t){this.vao=e,this.lod=t}}class se{constructor(e,t){this.modelMatrix=e,this.origin=t}}class ne{constructor(e,t,r,s,n,i,o,a){this.regular=e,this.silhouette=t,this.statistics=r,this.transform=s,this.edgeTransparency=n,this.objectTransparency=i,this.components=o,this.rendererKey=a,this.distanceToCamera=0,this.visible=!0}}class ie extends ne{}function oe(e){const{meta:t,buffer:r}=e,s=r.textureBuffer,n=s.getVec4Field("color"),o=s.getScalarField("lineWidth"),a=s.getScalarField("extensionLength"),l=s.getScalarField("materialType"),c=s.getScalarField("opacity"),d=s.getScalarField("elevationOffset");for(let h=0;h<t.length;h++){const e=t[h].material,r=t[h].index,s=i(Math.round(e.size*H),0,255),u=i(e.extensionLength,-B,255-B)+B,m=255*e.opacity,g=e.color,p=255*g[0],f=255*g[1],_=255*g[2],y=255*g[3];n.setValues(r,p,f,_,y),o.set(r,s),a.set(r,u),l.set(r,e.type),c.set(r,m),d.set(r,t[h].verticalOffset)}}function ae(e,t,r){let s,n;const i=r.transparency,o=t.camera.perScreenPixelRatio;e.forEachRenderable(i=>{if(!ce(i)||!i.visible)return;s??=e.acquireTechnique(t,!1),n??=e.rctx.bindTechnique(s,t,r);const a=ue(i.regular.lod.lengths,i.distanceToCamera,o);e.renderRegularEdges(n,i,r,t,a)},i)}function le(e,t,r){let s,n;const i=r.transparency,o=t.camera.perScreenPixelRatio;e.forEachRenderable(i=>{if(!he(i)||!i.visible)return;s??=e.acquireTechnique(t,!0),n??=e.rctx.bindTechnique(s,t,r);const a=ue(i.silhouette.lod.lengths,i.distanceToCamera,o);e.renderSilhouetteEdges(n,i,r,t,a)},i)}function ce(e){return null!=e.regular}class de extends ne{}function he(e){return null!=e.silhouette}function ue(e,t,r){const n=t*r,i=s(e,n,!0);return-1===i?n<e[0]?e.length:0:e.length-i}class me{constructor(e,t,r){this.position=e,this.modelTransform=t,this.origin=r}}const ge=p(),pe=()=>Promise.reject(),fe=[{name:"color",type:"vec4u8"},{name:"lineWidth",type:"u8"},{name:"extensionLength",type:"u8"},{name:"materialType",type:"u8"},{name:"opacity",type:"u8"},{name:"elevationOffset",type:"packed-f32",maxValue:x}];export{Y as EdgeView,se as LegacyTransform,ie as RegularRenderable,ne as Renderable,de as SilhouetteRenderable};
5
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{equals as r,binaryIndexOf as s}from"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import n from"../../../../../core/Logger.js";import{clamp as i}from"../../../../../core/mathUtils.js";import{disposeMaybe as o,destroyMaybe as a}from"../../../../../core/maybe.js";import{isAbortError as c,onAbortOrThrow as l}from"../../../../../core/promiseUtils.js";import{property as d,subclass as h}from"../../../../../core/accessorSupport/decorators.js";import{fromMat4 as u,transpose as g,invert as m}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as f}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as p}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{h as _,d as b,a as y,g as w}from"../../../../../chunks/vec32.js";import{create as j,clone as O}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as E}from"../../../../../core/support/UpdatingHandles.js";import{c as v}from"../../../../../chunks/vec33.js";import{TwoVectorPosition as x}from"../../core/util/TwoVectorPosition.js";import{Attribute as M}from"../Attribute.js";import{GridLocalOriginFactory as T}from"../GridLocalOriginFactory.js";import{applyToModelMatrix as R}from"../localOriginHelper.js";import{LocalOriginManager as C}from"../LocalOriginManager.js";import{Object3D as A}from"../Object3D.js";import{VertexArrayObject as P}from"../VertexArrayObject.js";import{VertexLayout as D,glVertexLayout as k,edgeViewTextureLayout as S,EdgeInputBufferLayout as L,RegularEdgeInstancesGLLayout as U,SilhouetteEdgeInstancesGLLayout as q}from"./bufferLayouts.js";import{EdgeRenderer as H,lineWidthFractionFactor as V,extensionLengthOffset as B}from"./EdgeRenderer.js";import{EdgePassParameters as I}from"./EdgeShaderParameters.js";import{EdgeWorkerHandle as F}from"./EdgeWorkerHandle.js";import{generateStrokesTexture as N}from"./strokes.js";import{determineRendererType as z,determineEdgeTransparency as W,determineObjectTransparency as G,fillComponentBufferIndices as K}from"./util.js";import{BufferManager as J}from"../TextureBackedBuffer/BufferManager.js";import{VertexBuffer as Q}from"../../../../webgl/VertexBuffer.js";const X=128;let Y=class extends t{constructor(e){super(e),this._updatingHandles=new E,this._objectEntries=new Map,this._pendingDeletions=new Map,this._renderers=new Map,this._gpuMemoryUsage=0,this._workerAbort=new AbortController,this._tmpModelPosition=j(),this._localOrigins=new C(new T(e.renderSR));const t=D.createBuffer(4);for(let r=0;r<4;r++)t.sideness.set(r,0,0===r||3===r?0:1),t.sideness.set(r,1,0===r||1===r?0:1);this._vertexBuffer=new Q(e.rctx,k,t.buffer)}initialize(){this._workerHandle=new F(this.schedule),this._componentColorManager=new J(this.rctx,S)}destroy(){this.destroyed||(this._objectEntries.forEach(e=>this._discardObjectEntry(e)),this._objectEntries.clear(),this._pendingDeletions.forEach(e=>this._discardObjectEntry(e)),this._pendingDeletions.clear(),this._strokesTexture=o(this._strokesTexture),this._componentColorManager=a(this._componentColorManager),this._workerAbort.abort(),this._workerHandle.destroy(),this._vertexBuffer.dispose(),this._renderers.clear(),this._updatingHandles.destroy(),this._set("schedule",fe))}get updating(){return this._updatingHandles.updating}get usedMemory(){return this._gpuMemoryUsage}shouldRender(){return this._renderers.size>0}async addComponentObject(e,t,r,s,n,i,o){if(this.hasObject(e))return this._getObjectMemoryUsage(e);let a;const c=new ee(null,new Promise(e=>a=e),e.obb.center,e.obb.radius);this._objectEntries.set(e,c);const l=await this._updatingHandles.addPromise(this._addComponentGeometry(e.transform,c,t,r,s,n,i,o));return this.setNeedsRender(),a(),l}async addOrUpdateObject3D(e,t,r,s){if(this.destroyed)return void n.getLogger(this).warn("Attempt to add an object to a destroyed instance");const i=new AbortController;let o;const{center:a,radius:l}=e.boundingVolumeWorldSpace.bounds,d=new ee(i,new Promise(e=>o=e),a,l),h=this._objectEntries.get(e);h&&(this._pendingDeletions.has(e)?this._discardObjectEntry(h):this._pendingDeletions.set(e,h)),this._objectEntries.set(e,d);try{const n=new Array;if(e.geometries.length>1&&$(e))n.push(this._addObjectMergedGeometries(e,d,t,r,s));else for(const i of e.geometries)i.material.supportsEdges&&n.push(this._addGeometry(e,d,i,t,r,s));await this._updatingHandles.addPromise(Promise.all(n)),this._removePendingDeletion(e)}catch(u){c(u)?this._discardObjectEntry(d):this._removePendingDeletion(e)}finally{this.setNeedsRender(),o()}}removeObject(e){const t=this._objectEntries.get(e);this._objectEntries.delete(e),this._discardObjectEntry(t),this._removePendingDeletion(e)}_removePendingDeletion(e){const t=this._pendingDeletions.get(e);this._pendingDeletions.delete(e),this._discardObjectEntry(t)}async _getObjectEntry(e){const t=this._objectEntries.get(e);if(!t)throw new Error("no object");return await t.loaded,null==t.loaded?null:t}fastUpdateObject3DEdgesTransform(e){if(this.destroyed)return!1;const t=this._objectEntries.get(e);if(!t)return!1;const{geometries:r}=e,{renderables:s}=t;if(0===r.length||0===s.length)return!0;if(s.length>1)return!1;const[n]=s,i=n.transform;if(!(i instanceof se))return!1;const[o]=r;if(o.localOrigin!==i.origin.origin)return!1;const a=p(),c=this._computeModelTransformWithLocalOrigin(e,o,a);return n.transform=new se(a,c),this.setNeedsRender(),!0}_discardObjectEntry(e){e&&(e.abort?.abort(),e.renderables.length&&(e.renderables.forEach(e=>this._removeRenderable(e)),this.setNeedsRender()),e.loaded=null)}hasObject(e){return this._objectEntries.has(e)}async updateAllComponentOpacities(e,t){const r=await this._updatingHandles.addPromise(this._getObjectEntry(e));if(null==r)return;const s=Array.isArray(t)?e=>t[e]:()=>t;r.renderables.forEach(e=>{const{meta:t,buffer:r}=e.components,n=t.length,i=r.textureBuffer.getScalarField("opacity");for(let o=0;o<n;o++){const e=s(o),r=t[o],n=r.index;r.material.opacity=e,i.set(n,255*e)}this._updateTransparency(e)}),this.setNeedsRender()}async _getObjectMemoryUsage(e){const t=await this._getObjectEntry(e);return t?t.renderables.reduce((e,t)=>e+t.statistics.gpuMemoryUsage,0):0}async updateAllComponentMaterials(e,t,r,s){const n=e instanceof A,i=z(t),o=H.getKey(i,r,n),a=await this._updatingHandles.addPromise(this._getObjectEntry(e));null!=a&&(a.renderables.forEach(e=>{if(o!==e.rendererKey){const t=this._renderers.get(e.rendererKey),s=this._acquireRenderer(i,r,n);t.removeRenderable(e),--t.refCount,e.rendererKey=o,s.addRenderable(e)}if(Array.isArray(t))for(let r=0;r<t.length;r++)e.components.meta[r].material=t[r];else e.components.meta[0].material=t;s&&oe(e.components),this._updateTransparency(e)}),this.setNeedsRender())}async updateAllVerticalOffsets(e,t){const r=await this._updatingHandles.addPromise(this._getObjectEntry(e));null!=r&&this._updateAllVerticalOffsets(r,t)}_updateAllVerticalOffsets(e,t){e.renderables.forEach(e=>{const r=e.components.meta;for(let s=0;s<r.length;s++)e.components.meta[s].verticalOffset=t?.[s]??0;oe(e.components)}),this.setNeedsRender()}async updateObjectVisibility(e,t){const r=await this._updatingHandles.addPromise(this._getObjectEntry(e));r&&(r.renderables.forEach(e=>e.visible=t),this.setNeedsRender())}render(e,t){if(null==this._componentColorManager)return;this._localOrigins.updateViewMatrices(e.camera.viewMatrix);const r=e.camera.viewInverseTransposeMatrix,s=j(),n=new x;let i=0,o=0;if(this._renderers.forEach(r=>{0!==r.refCount?(++this.techniques.precompiling,r.forEachRenderable(t=>{t.visible&&(i+=t.statistics.averageEdgeLength,o++,t.regular&&r.acquireTechnique(e,!1),t.silhouette&&r.acquireTechnique(e,!0))},t),--this.techniques.precompiling):this._renderers.delete(r.key)}),this._componentColorManager.garbageCollect(),this._componentColorManager.updateTextures(),0===o)return;const a=new I(40*i/o,t);_(s,r[3],r[7],r[11]),n.set(s),b(a.transformWorldFromViewTH,n.high),b(a.transformWorldFromViewTL,n.low),u(a.transformViewFromCameraRelativeRS,e.camera.viewMatrix),g(me,a.transformViewFromCameraRelativeRS),m(a.transformNormalViewFromGlobal,me),this._updateObjectCameraDistances(e),this._renderers.forEach(t=>{ae(t,e,a),ce(t,e,a)})}_updateTransparency(e){const t=W(e.components.meta),r=G(e.components.meta);t===e.edgeTransparency&&r===e.objectTransparency||(e.edgeTransparency=t,e.objectTransparency=r,this._renderers.get(e.rendererKey).setRenderablesDirty())}_computeModelTransformWithLocalOrigin(e,t,r){e.getCombinedShaderTransformation(t,r);const s=null!=t.localOrigin?this._localOrigins.register(t.localOrigin):this._localOrigins.acquire(_(this._tmpModelPosition,r[12],r[13],r[14]));return t.localOrigin=s.origin,R(s.origin.vec3,r),s}_createComponentBuffers(e){if(null==this._componentColorManager)return null;const t=new Array,r=this._componentColorManager.getBuffer(e.length),s=r.acquireIndices(e.length);for(let i=0;i<e.length;i++){const r=e[i],n=s[i];t.push({index:n,verticalOffset:0,material:r})}const n=new te(r,t);return oe(n),n}_extractEdges(e,t,r,s,n,i,o=i.length){return o<X&&(n=!0),this._workerHandle.process({data:r,indices:i,indicesLength:o,writerSettings:t,skipDeduplicate:s},e,n)}_createRenderable(e,t,r,s,n){const i=t=>new re(new P(this.rctx,new Map([["vertices",this._vertexBuffer],["instances",0===t?new Q(this.rctx,U,e.regular.instancesData.buffer):new Q(this.rctx,q,e.silhouette.instancesData.buffer)]])),0===t?e.regular.lodInfo:e.silhouette.lodInfo),o=e.regular.lodInfo.lengths.length>0?i(0):null,a=e.silhouette.lodInfo.lengths.length>0?i(1):null,c=(o?.vao.usedMemory??0)+(a?.vao.usedMemory??0);return new ne(o,a,{gpuMemoryUsage:c,externalMemoryUsage:n,averageEdgeLength:e.averageEdgeLength},r,W(t.meta),G(t.meta),t,s)}async _addGeometry(e,t,r,s,n,i){if(r.edgeIndicesLength<=0)return;const o=r.attributes.get("position"),a=p(),c=this._computeModelTransformWithLocalOrigin(e,r,a),l=new ge(o,a,c);return this._addPositionData(t,l,r.edgeIndicesLength,s,n,i)}async _addPositionData(e,t,r,s,n,i=!1){if(null==e.loaded)return;const o=this._createComponentBuffers([s]);if(null==o)return;const a=this._acquireRenderer(s.type,n,!0),{modelTransform:c,origin:l}=t,d=t.position.indices,h=t.position,u=h.data.length/h.size,g=L.createBuffer(u);for(let p=0;p<u;p++)g.position.set(p,0,h.data[p*h.size]),g.position.set(p,1,h.data[p*h.size+1]),g.position.set(p,2,h.data[p*h.size+2]);K(o.meta,[0,g.componentIndex.count],g.componentIndex);const m=await this._updatingHandles.addPromise(this._extractEdges(e.abort?.signal||this._workerAbort.signal,a.writerSettings,g,!1,i,d,r));if(null==e.loaded)return;const f=this._createRenderable(m,o,new se(c,l),a.key,!1);e.renderables.push(f),a.addRenderable(f),this._gpuMemoryUsage+=f.statistics.gpuMemoryUsage}async _addComponentGeometry(e,t,r,s,n,i,o,a){if(null==t.loaded)return 0;const c=this._createComponentBuffers(i);if(null==c)return 0;const l=z(i),d=this._acquireRenderer(l,o||!1,!1),h=L.createBuffer(r.length/3);v(h.position.typedBuffer,r,h.position.typedBufferStride,3),K(c.meta,n,h.componentIndex,s);const u=!0,g=d.writerSettings,m=await this._updatingHandles.addPromise(this._extractEdges(this._workerAbort.signal,g,h,u,!1,s));if(null==t.loaded)return 0;const f=this._createRenderable(m,c,e,d.key,!0);return t.renderables.push(f),d.addRenderable(f),this._updateAllVerticalOffsets(t,a),f.statistics.gpuMemoryUsage}async _addObjectMergedGeometries(e,t,r,s,n){const i=new Map;let o=0,a=0,c=null;const l=e.geometries.filter(e=>{if(e.edgeIndicesLength<=0||!e.material.supportsEdges)return!1;!c&&e.localOrigin&&(c=e);const t=e.positionAttribute;return a+=t.data.length/t.size,o+=e.edgeIndicesLength,!0});if(0===l.length)return;const d=a>=65536?Uint32Array:Uint16Array,h=o?new d(o):null,u=[];let g=0;l.forEach(e=>{const t=e.attributes.get("position"),r=t.indices;let s=i.get(t.data);if(null==s){s=u.length/3;for(let e=0;e<t.data.length;e+=t.size)u.push(t.data[e]),u.push(t.data[e+1]),u.push(t.data[e+2]);i.set(t.data,s)}for(let n=0;n<e.edgeIndicesLength;n++)h[g++]=s+r[n]});const m=c||e.geometries[0],f=p(),_=this._computeModelTransformWithLocalOrigin(e,m,f);for(let p=0;p<e.geometries.length;p++)e.geometries[p].localOrigin=_.origin;const b=new ge(new M(u,h,3),f,_);await this._updatingHandles.addPromise(this._addPositionData(t,b,h.length,r,s,n))}_acquireRenderer(e,t,r){const s=H.getKey(e,t,r);let n=this._renderers.get(s);return null==this._strokesTexture&&(this._strokesTexture=N(this.rctx)),n||(n=new H(this.rctx,this.techniques,{type:e,hasSlicePlane:t,strokesTexture:this._strokesTexture,legacy:r,spherical:1===this.viewingMode}),this._renderers.set(s,n)),++n.refCount,n}_removeRenderable(e){Z(e.regular),Z(e.silhouette);const t=this._renderers.get(e.rendererKey);if(t){t.removeRenderable(e),--t.refCount,this._localOrigins.release(e.transform.origin),this._gpuMemoryUsage-=e.statistics.externalMemoryUsage?0:e.statistics.gpuMemoryUsage;for(const t of e.components.meta)e.components.buffer.releaseIndex(t.index)}}_updateObjectCameraDistances(e){const t=e.camera.eye,r=e.camera.viewForward,s=j(),n=e=>{y(s,e.center,t);const n=w(s,r),i=e.radius,o=n<-i?1/0:n<i?0:n-i;e.renderables.forEach(e=>e.distanceToCamera=o)};this._objectEntries.forEach(n),this._pendingDeletions.forEach(n)}get test(){}};function Z(e){e?.vao&&(e.vao.buffer("instances")?.dispose(),e.vao.disposeVAOOnly(),e.vao=null)}function $(e){let t=null,s=null;for(const n of e.geometries){if(n.material.supportsEdges){if(t){if(!r(t,n.transformation))return!1}else t=n.transformation;if(s||null==n.localOrigin){if(null!=s?.localOrigin&&null!=n.localOrigin&&s.localOrigin.id!==n.localOrigin.id)return!1}else s=n}}return!0}e([d({constructOnly:!0})],Y.prototype,"rctx",void 0),e([d({constructOnly:!0})],Y.prototype,"renderSR",void 0),e([d({constructOnly:!0})],Y.prototype,"viewingMode",void 0),e([d({constructOnly:!0})],Y.prototype,"techniques",void 0),e([d({constructOnly:!0})],Y.prototype,"setNeedsRender",void 0),e([d({constructOnly:!0})],Y.prototype,"schedule",void 0),e([d({readOnly:!0})],Y.prototype,"_updatingHandles",void 0),e([d({readOnly:!0})],Y.prototype,"updating",null),Y=e([h("esri.views.3d.webgl-engine.lib.edgeRendering.EdgeView")],Y);class ee{constructor(e,t,r,s){this.abort=e,this.radius=s,this.renderables=new Array;const n=e?l(e.signal,()=>e.abort()):null;this.loaded=t,this.loaded.then(()=>{null!=this.loaded&&(this.loaded=!0),this.abort=null,n?.remove()}),this.center=O(r)}}class te{constructor(e,t){this.buffer=e,this.meta=t}}class re{constructor(e,t){this.vao=e,this.lod=t}}class se{constructor(e,t){this.modelMatrix=e,this.origin=t}}class ne{constructor(e,t,r,s,n,i,o,a){this.regular=e,this.silhouette=t,this.statistics=r,this.transform=s,this.edgeTransparency=n,this.objectTransparency=i,this.components=o,this.rendererKey=a,this.distanceToCamera=0,this.visible=!0}}class ie extends ne{}function oe(e){const{meta:t,buffer:r}=e,s=r.textureBuffer,n=s.getVec4Field("color"),o=s.getScalarField("lineWidth"),a=s.getScalarField("extensionLength"),c=s.getScalarField("materialType"),l=s.getScalarField("opacity"),d=s.getScalarField("elevationOffset");for(let h=0;h<t.length;h++){const e=t[h].material,r=t[h].index,s=i(Math.round(e.size*V),0,255),u=i(e.extensionLength,-B,255-B)+B,g=255*e.opacity,m=e.color,f=255*m[0],p=255*m[1],_=255*m[2],b=255*m[3];n.setValues(r,f,p,_,b),o.set(r,s),a.set(r,u),c.set(r,e.type),l.set(r,g),d.set(r,t[h].verticalOffset)}}function ae(e,t,r){let s,n;const i=r.transparency,o=t.camera.perScreenPixelRatio;e.forEachRenderable(i=>{if(!le(i)||!i.visible)return;s??=e.acquireTechnique(t,!1),n??=e.rctx.bindTechnique(s,t,r);const a=ue(i.regular.lod.lengths,i.distanceToCamera,o);e.renderRegularEdges(n,i,r,t,a)},i)}function ce(e,t,r){let s,n;const i=r.transparency,o=t.camera.perScreenPixelRatio;e.forEachRenderable(i=>{if(!he(i)||!i.visible)return;s??=e.acquireTechnique(t,!0),n??=e.rctx.bindTechnique(s,t,r);const a=ue(i.silhouette.lod.lengths,i.distanceToCamera,o);e.renderSilhouetteEdges(n,i,r,t,a)},i)}function le(e){return null!=e.regular}class de extends ne{}function he(e){return null!=e.silhouette}function ue(e,t,r){const n=t*r,i=s(e,n,!0);return-1===i?n<e[0]?e.length:0:e.length-i}class ge{constructor(e,t,r){this.position=e,this.modelTransform=t,this.origin=r}}const me=f(),fe=()=>Promise.reject();export{Y as EdgeView,se as LegacyTransform,ie as RegularRenderable,ne as Renderable,de as SilhouetteRenderable};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{glLayout as e}from"../../../support/buffer/glUtil.js";import{newLayout as o}from"../../../support/buffer/InterleavedLayout.js";import{fromLayouts as r}from"../../../../webgl/VertexAttributeLocations.js";const t=o().vec3f("position").u16("componentIndex").freeze(),i=o().vec2u8("sideness").freeze(),n=e(i),s=o().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").u16("componentIndex").u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),a=o().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").vec2i16("normal2Compressed").u16("componentIndex").u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),f=e(s,1),m=e(a,1),p=r([n,f]),u=r([n,m]);export{t as EdgeInputBufferLayout,f as RegularEdgeInstancesGLLayout,s as RegularEdgeInstancesLayout,p as RegularEdgeLocations,m as SilhouetteEdgeInstancesGLLayout,a as SilhouetteEdgeInstancesLayout,u as SilhouetteEdgeLocations,i as VertexLayout,n as glVertexLayout};
5
+ import{glLayout as e}from"../../../support/buffer/glUtil.js";import{newLayout as o}from"../../../support/buffer/InterleavedLayout.js";import{maxElevationOffset as t}from"../../collections/Component/Material/shader/ComponentDataConstants.js";import{TextureBackedBufferLayout as n}from"../TextureBackedBuffer/TextureBackedBufferLayout.js";import{fromLayouts as r}from"../../../../webgl/VertexAttributeLocations.js";const a=o().vec3f("position").u16("componentIndex").freeze(),i=o().vec2u8("sideness").freeze(),m=e(i),s=o().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").u16("componentIndex").u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),p=o().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").vec2i16("normal2Compressed").u16("componentIndex").u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),f=e(s,1),u=e(p,1),l=r([m,f]),c=r([m,u]),v=new n([{name:"color",type:"vec4u8"},{name:"lineWidth",type:"u8"},{name:"extensionLength",type:"u8"},{name:"materialType",type:"u8"},{name:"opacity",type:"u8"},{name:"elevationOffset",type:"packed-f32",maxValue:t}]);export{a as EdgeInputBufferLayout,f as RegularEdgeInstancesGLLayout,s as RegularEdgeInstancesLayout,l as RegularEdgeLocations,u as SilhouetteEdgeInstancesGLLayout,p as SilhouetteEdgeInstancesLayout,c as SilhouetteEdgeLocations,i as VertexLayout,v as edgeViewTextureLayout,m as glVertexLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{newLayout as e}from"../../support/buffer/InterleavedLayout.js";const o=e().vec3f("position").freeze(),f=e().vec3f("position").vec2f16("uv0").freeze(),v=e().vec3f("position").vec4u8("color").freeze(),r=e().vec3f("position").vec2f("uv0").freeze(),c=e().vec3f("position").vec2f("uv0").vec4u8("olidColor").freeze();export{v as PositionColorLayout,o as PositionLayout,f as PositionUvLayout,r as PositionUvf32Layout,c as PositionUvf32OlidLayout};
5
+ import{glLayout as e}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{maxElevationOffset as t,maxPackedRGBEmission as r}from"../collections/Component/Material/shader/ComponentDataConstants.js";import{olidEnabled as f}from"../effects/geometry/olidUtils.js";import{TextureBackedBufferLayout as n}from"../lib/TextureBackedBuffer/TextureBackedBufferLayout.js";const i=o().vec3f("position").freeze(),u=o().vec3f("position").vec2f16("uv0").freeze(),s=o().vec3f("position").vec4u8("color").freeze(),a=o().vec3f("position").vec2f("uv0").freeze(),p=o().vec3f("position").vec2f("uv0").vec4u8("olidColor").freeze(),c=e(o().u16("componentIndex")),m=[{name:"colorAndCastShadows",type:"u8u8u7xu8"},{name:"elevationOffset",type:"packed-f32",maxValue:t},{name:"emissiveStrength",type:"packed-f24",maxValue:r},{name:"emissiveSourceMode",type:"u8"}],l={name:"olidColor",type:"vec4u8"},v=new n(m),d=new n([...m,l]);function y(){return f()?d:v}export{s as PositionColorLayout,i as PositionLayout,u as PositionUvLayout,a as PositionUvf32Layout,p as PositionUvf32OlidLayout,v as componentDataLayout,d as componentDataOlidLayout,y as getComponentDataLayout,c as indexGlLayout,l as olidAttribute};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{freeze as t,create as i,ZEROS as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{isColor as l}from"../core/shaderLibrary/ShaderOutput.js";import{PathVertexPositionPassParameters as a}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{ReloadableShader as n}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as c,depthOnlyOutputBuffersOr as m}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as u}from"../effects/geometry/olidUtils.js";import{OITPolygonOffset as p,oitDepthTest as f,blending as h,getDrawBuffers as d}from"../lib/OrderIndependentTransparency.js";import{stencilBaseAllZerosParams as b,stencilWriteMaskOn as g}from"../lib/StencilUtils.js";import{advancedMRRFactors as j}from"./pbrUtils.js";import{P as v}from"../../../../chunks/Path.glsl.js";import{makePipelineState as S,defaultColorWrite as y,defaultDepthWrite as P,frontFaceCullingParams as T}from"../../../webgl/renderState.js";class V extends a{constructor(){super(...arguments),this.ambient=t(.2,.2,.2),this.diffuse=t(.8,.8,.8),this.opacity=1,this.origin=i(),this.modelTransformation=null,this.mrrFactors=j,this.emissiveStrength=0,this.emissiveSource=1,this.emissiveBaseColor=s}}let x=class extends c{constructor(e,r){super(e,r,z(r).locations),this.shader=new n(v,()=>import("../shaders/Path.glsl.js"))}initializePipeline(e){const{output:r,hasEmission:t,transparent:i,hasSlicePlane:s,doubleSidedMode:o,hasOccludees:a,oitPass:n}=e,c=0===n,u=2===n;return S({blending:l(r)&&i?h(n):null,culling:s&&!i&&0!==o?T:null,depthTest:{func:f(n)},depthWrite:c||u?P:null,drawBuffers:m(r,d(n,t)),colorWrite:y,stencilWrite:a?g:null,stencilTest:a?b:null,polygonOffset:c||u?null:p})}};function z(e){const r=o().vec3f("position").vec4f16("profileVertexAndNormal").vec2i16("profileRight",{glNormalized:!0}).vec2i16("profileUp",{glNormalized:!0});return e.hasVVSize&&r.f32("sizeFeatureAttribute"),e.hasVVColor&&r.f32("colorFeatureAttribute"),e.hasVVOpacity&&r.f32("opacityFeatureAttribute"),u()&&r.vec4u8("olidColor"),r.vec3f16("profileAuxData"),r.freeze()}x=e([r("esri.views.3d.webgl-engine.materials.PathTechnique")],x);export{V as PathPassParameters,x as PathTechnique,z as getLayout};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{freeze as t,create as i,ZEROS as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{isColor as l}from"../core/shaderLibrary/ShaderOutput.js";import{PathVertexPositionPassParameters as a}from"../core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{ReloadableShader as n}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as c,depthOnlyOutputBuffersOr as m}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as u}from"../effects/geometry/olidUtils.js";import{OITPolygonOffset as p,depthTest as f,blending as h,drawBuffers as d}from"../lib/OrderIndependentTransparency.js";import{stencilBaseAllZerosParams as b,stencilWriteMaskOn as g}from"../lib/StencilUtils.js";import{advancedMRRFactors as j}from"./pbrUtils.js";import{P as v}from"../../../../chunks/Path.glsl.js";import{makePipelineState as S,defaultColorWrite as y,defaultDepthWrite as P,frontFaceCullingParams as T}from"../../../webgl/renderState.js";class V extends a{constructor(){super(...arguments),this.ambient=t(.2,.2,.2),this.diffuse=t(.8,.8,.8),this.opacity=1,this.origin=i(),this.modelTransformation=null,this.mrrFactors=j,this.emissiveStrength=0,this.emissiveSource=1,this.emissiveBaseColor=s}}let x=class extends c{constructor(e,r){super(e,r,z(r).locations),this.shader=new n(v,()=>import("../shaders/Path.glsl.js"))}initializePipeline(e){const{output:r,hasEmission:t,transparent:i,hasSlicePlane:s,doubleSidedMode:o,hasOccludees:a,oitPass:n}=e,c=0===n,u=2===n;return S({blending:l(r)&&i?h(n):null,culling:s&&!i&&0!==o?T:null,depthTest:f(n),depthWrite:c||u?P:null,drawBuffers:m(r,d(n,t)),colorWrite:y,stencilWrite:a?g:null,stencilTest:a?b:null,polygonOffset:c||u?null:p})}};function z(e){const r=o().vec3f("position").vec4f16("profileVertexAndNormal").vec2i16("profileRight",{glNormalized:!0}).vec2i16("profileUp",{glNormalized:!0});return e.hasVVSize&&r.f32("sizeFeatureAttribute"),e.hasVVColor&&r.f32("colorFeatureAttribute"),e.hasVVOpacity&&r.f32("opacityFeatureAttribute"),u()&&r.vec4u8("olidColor"),r.vec3f16("profileAuxData"),r.freeze()}x=e([r("esri.views.3d.webgl-engine.materials.PathTechnique")],x);export{V as PathPassParameters,x as PathTechnique,z as getLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{WaterDistortionPassParameters as s}from"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import{ReloadableShader as t}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as i}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as a,getDrawBuffers as n,depthWrite as l,oitDepthTest as c,blending as d}from"../lib/OrderIndependentTransparency.js";import{PositionUvf32OlidLayout as m,PositionUvf32Layout as p}from"./DefaultLayouts.js";import{W as f}from"../../../../chunks/WaterSurface.glsl.js";import{makePipelineState as u,defaultColorWrite as h}from"../../../webgl/renderState.js";class g extends s{}let j=class extends o{constructor(e,r){super(e,r,i()?m.locations:p.locations),this.shader=new t(f,()=>import("../shaders/WaterSurface.glsl.js"))}initializePipeline(e){const{oitPass:r,output:s,hasEmission:t,transparent:o,draped:i}=e;return u({blending:2!==s&&8!==s&&9!==s&&o?d(r):null,depthTest:i?null:{func:c(r)},depthWrite:l(e),drawBuffers:n(r,t),colorWrite:h,polygonOffset:a(e)})}};j=e([r("esri.views.3d.webgl-engine.materials.WaterTechnique")],j);export{g as WaterMaterialPassParameters,j as WaterTechnique};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{WaterDistortionPassParameters as s}from"../core/shaderLibrary/shading/WaterDistortion.glsl.js";import{ReloadableShader as t}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as i}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as a,drawBuffers as n,depthWrite as l,depthTest as c,blending as d}from"../lib/OrderIndependentTransparency.js";import{PositionUvf32OlidLayout as m,PositionUvf32Layout as p}from"./DefaultLayouts.js";import{W as f}from"../../../../chunks/WaterSurface.glsl.js";import{makePipelineState as u,defaultColorWrite as h}from"../../../webgl/renderState.js";class g extends s{}let j=class extends o{constructor(e,r){super(e,r,i()?m.locations:p.locations),this.shader=new t(f,()=>import("../shaders/WaterSurface.glsl.js"))}initializePipeline(e){const{oitPass:r,output:s,hasEmission:t,transparent:o,draped:i}=e;return u({blending:2!==s&&8!==s&&9!==s&&o?d(r):null,depthTest:i?null:c(r),depthWrite:l(e),drawBuffers:n(r,t),colorWrite:h,polygonOffset:a(e)})}};j=e([r("esri.views.3d.webgl-engine.materials.WaterTechnique")],j);export{g as WaterMaterialPassParameters,j as WaterTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{getDrawBuffers as t,depthWrite as i,oitDepthTest as n,blending as a}from"../lib/OrderIndependentTransparency.js";import{PositionUvLayout as c}from"../materials/DefaultLayouts.js";import{C as l}from"../../../../chunks/CheckerBoard.glsl.js";import{makePipelineState as d,defaultColorWrite as p}from"../../../webgl/renderState.js";let m=class extends o{constructor(e,r){super(e,r,c.locations),this.shader=new s(l,()=>import("./CheckerBoard.glsl.js"))}initializePipeline(e){const{oitPass:r,transparent:s,polygonOffset:o,hasEmission:c}=e,l=0===r,m=2===r;return d({blending:s?a(r):null,depthTest:{func:n(r)},depthWrite:i(e),drawBuffers:t(r,c),colorWrite:p,polygonOffset:l||m?o?f:null:{factor:-1,units:-25}})}};m=e([r("esri.views.3d.webgl-engine.shaders.CheckerBoardTechnique")],m);const f={factor:0,units:-25};export{m as CheckerBoardTechnique};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{drawBuffers as t,depthWrite as i,depthTest as n,blending as a}from"../lib/OrderIndependentTransparency.js";import{PositionUvLayout as l}from"../materials/DefaultLayouts.js";import{C as c}from"../../../../chunks/CheckerBoard.glsl.js";import{makePipelineState as d,defaultColorWrite as p}from"../../../webgl/renderState.js";let m=class extends o{constructor(e,r){super(e,r,l.locations),this.shader=new s(c,()=>import("./CheckerBoard.glsl.js"))}initializePipeline(e){const{oitPass:r,transparent:s,polygonOffset:o,hasEmission:l}=e,c=0===r,m=2===r;return d({blending:s?a(r):null,depthTest:n(r),depthWrite:i(e),drawBuffers:t(r,l),colorWrite:p,polygonOffset:c||m?o?h:null:{factor:-1,units:-25}})}};m=e([r("esri.views.3d.webgl-engine.shaders.CheckerBoardTechnique")],m);const h={factor:0,units:-25};export{m as CheckerBoardTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l,depthOnlyOutputBuffersOr as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as a}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as c,depthWrite as p,oitDepthTest as u,blending as m,getDrawBuffers as f}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as d,stencilBaseAllZerosParams as h,stencilWriteMaskOn as g}from"../lib/StencilUtils.js";import{VisualVariablePassParameters as j}from"../materials/VisualVariablePassParameters.js";import{C as b}from"../../../../chunks/ColorMaterial.glsl.js";import{makePipelineState as P,defaultColorWrite as S,cullingParams as T}from"../../../webgl/renderState.js";class v extends j{constructor(){super(...arguments),this.color=t}}let y=class extends l{constructor(e,r){super(e,r,w(r).locations),this.shader=new s(b,()=>import("./ColorMaterial.glsl.js"))}_createPipeline(e,r){const{oitPass:t,output:o,hasEmission:s,transparent:l,cullFace:a,draped:j,hasOccludees:b,polygonOffset:v}=e,y=0===t;return P({blending:i(o)&&l?m(t):null,culling:T(a),depthTest:j?null:{func:u(t)},depthWrite:p(e),drawBuffers:n(o,f(t,s)),colorWrite:S,stencilWrite:b?g:null,stencilTest:b?r?d:h:null,polygonOffset:y?v?C:null:c(e)})}initializePipeline(e){return this._occludeePipelineState=this._createPipeline(e,!0),this._createPipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}};y=e([r("esri.views.3d.webgl-engine.shaders.ColorMaterialTechnique")],y);const C={factor:1,units:1};function w(e){const r=o().vec3f("position");return a()&&r.vec4u8("olidColor"),e.hasVVColor?r.f32("colorFeatureAttribute"):r.vec4u8("color"),r.freeze()}export{v as ColorMaterialPassParameters,y as ColorMaterialTechnique,w as getLayout};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l,depthOnlyOutputBuffersOr as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as a}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as c,depthWrite as p,depthTest as u,blending as m,drawBuffers as f}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as d,stencilBaseAllZerosParams as h,stencilWriteMaskOn as g}from"../lib/StencilUtils.js";import{VisualVariablePassParameters as j}from"../materials/VisualVariablePassParameters.js";import{C as b}from"../../../../chunks/ColorMaterial.glsl.js";import{makePipelineState as P,defaultColorWrite as S,cullingParams as T}from"../../../webgl/renderState.js";class v extends j{constructor(){super(...arguments),this.color=t}}let y=class extends l{constructor(e,r){super(e,r,w(r).locations),this.shader=new s(b,()=>import("./ColorMaterial.glsl.js"))}_createPipeline(e,r){const{oitPass:t,output:o,hasEmission:s,transparent:l,cullFace:a,draped:j,hasOccludees:b,polygonOffset:v}=e,y=0===t;return P({blending:i(o)&&l?m(t):null,culling:T(a),depthTest:j?null:u(t),depthWrite:p(e),drawBuffers:n(o,f(t,s)),colorWrite:S,stencilWrite:b?g:null,stencilTest:b?r?d:h:null,polygonOffset:y?v?C:null:c(e)})}initializePipeline(e){return this._occludeePipelineState=this._createPipeline(e,!0),this._createPipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}};y=e([r("esri.views.3d.webgl-engine.shaders.ColorMaterialTechnique")],y);const C={factor:1,units:1};function w(e){const r=o().vec3f("position");return a()&&r.vec4u8("olidColor"),e.hasVVColor?r.f32("colorFeatureAttribute"):r.vec4u8("color"),r.freeze()}export{v as ColorMaterialPassParameters,y as ColorMaterialTechnique,w as getLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import"../../../../core/has.js";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{getDrawBuffers as i}from"../lib/OrderIndependentTransparency.js";import{a as t}from"../../../../chunks/Compositing.glsl.js";import{makePipelineState as n,defaultColorWrite as a,premultipliedAlpha as c,unpremultipliedAlphaToPremultipliedAlpha as d}from"../../../webgl/renderState.js";let l=class extends o{constructor(){super(...arguments),this.shader=new s(t,()=>import("./Compositing.glsl.js"))}initializePipeline(e){const{blitMode:r,blendEmissive:s}=e;switch(r){case 0:case 3:return n({colorWrite:a,drawBuffers:i(0,s)});case 1:return n({blending:d,colorWrite:a,drawBuffers:i(0,s)});default:return n({blending:c,colorWrite:a,drawBuffers:i(0,s)})}}};l=e([r("esri.views.3d.webgl-engine.shaders.CompositingTechnique")],l);export{l as CompositingTechnique};
5
+ import{__decorate as e}from"tslib";import"../../../../core/has.js";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{drawBuffers as i}from"../lib/OrderIndependentTransparency.js";import{a as t}from"../../../../chunks/Compositing.glsl.js";import{makePipelineState as n,defaultColorWrite as a,premultipliedAlpha as c,unpremultipliedAlphaToPremultipliedAlpha as d}from"../../../webgl/renderState.js";let l=class extends o{constructor(){super(...arguments),this.shader=new s(t,()=>import("./Compositing.glsl.js"))}initializePipeline(e){const{blitMode:r,blendEmissive:s}=e;switch(r){case 0:case 3:return n({colorWrite:a,drawBuffers:i(0,s)});case 1:return n({blending:d,colorWrite:a,drawBuffers:i(0,s)});default:return n({blending:c,colorWrite:a,drawBuffers:i(0,s)})}}};l=e([r("esri.views.3d.webgl-engine.shaders.CompositingTechnique")],l);export{l as CompositingTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as i,freeze as s,create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as l}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import{isColor as a}from"../core/shaderLibrary/ShaderOutput.js";import{VertexNormalPassParameters as c,VertexNormalDrawParameters as h}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as u}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as p,depthOnlyOutputBuffersOr as m}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as d}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as f,depthWrite as v,oitDepthTest as b,blending as g,getDrawBuffers as S}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as y,stencilBaseAllZerosParams as j,stencilWriteMaskOn as x}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as C}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as P}from"../materials/pbrUtils.js";import{D as T}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as O,cullingParams as w,defaultColorWrite as D}from"../../../webgl/renderState.js";import{fromLayouts as V}from"../../../webgl/VertexAttributeLocations.js";import{alphaCutoff as A}from"../../../../webscene/support/AlphaCutoff.js";class M extends c{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=P,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrength=0,this.emissiveSource=1,this.emissiveBaseColor=i,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=s(.2,.2,.2),this.diffuse=s(.8,.8,.8),this.externalColor=o(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=r(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=A,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class k extends h{constructor(){super(...arguments),this.origin=r(),this.slicePlaneLocalOrigin=this.origin}}let z=class extends p{constructor(e,t){const i=[l(R(t))];t.instanced&&t.instancedDoublePrecision&&i.push(l(C(t))),super(e,t,V(i)),this.shader=new u(T,()=>import("./DefaultMaterial.glsl.js"))}_makePipeline(e,t){const{oitPass:i,output:s,hasEmission:r,transparent:o,cullFace:l,customDepthTest:n,hasOccludees:c}=e;return O({blending:a(s)&&o?g(i):null,culling:L(e)?w(l):null,depthTest:{func:b(i,F(n))},depthWrite:v(e),drawBuffers:m(s,S(i,r)),colorWrite:D,stencilWrite:c?x:null,stencilTest:c?t?y:j:null,polygonOffset:f(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}};function F(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function L(e){return 0!==e.cullFace||!e.hasSlicePlane&&(!e.transparent&&!e.doubleSidedMode)}function R(e){const t=n().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color"),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&d()&&t.vec4u8("olidColor"),t}z=e([t("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],z);export{k as DefaultMaterialDrawParameters,M as DefaultMaterialPassParameters,z as DefaultMaterialTechnique,R as getLayout};
5
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as i,freeze as s,create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as l}from"../../support/buffer/glUtil.js";import{newLayout as n}from"../../support/buffer/InterleavedLayout.js";import{isColor as a}from"../core/shaderLibrary/ShaderOutput.js";import{VertexNormalPassParameters as c,VertexNormalDrawParameters as h}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as u}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as p,depthOnlyOutputBuffersOr as m}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as d}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as f,depthWrite as v,depthTest as b,blending as g,drawBuffers as S}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as y,stencilBaseAllZerosParams as j,stencilWriteMaskOn as x}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as C}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as P}from"../materials/pbrUtils.js";import{D as T}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as O,cullingParams as w,defaultColorWrite as D}from"../../../webgl/renderState.js";import{fromLayouts as V}from"../../../webgl/VertexAttributeLocations.js";import{alphaCutoff as A}from"../../../../webscene/support/AlphaCutoff.js";class M extends c{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=P,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrength=0,this.emissiveSource=1,this.emissiveBaseColor=i,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=s(.2,.2,.2),this.diffuse=s(.8,.8,.8),this.externalColor=o(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=r(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=A,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class k extends h{constructor(){super(...arguments),this.origin=r(),this.slicePlaneLocalOrigin=this.origin}}let z=class extends p{constructor(e,t){const i=[l(R(t))];t.instanced&&t.instancedDoublePrecision&&i.push(l(C(t))),super(e,t,V(i)),this.shader=new u(T,()=>import("./DefaultMaterial.glsl.js"))}_makePipeline(e,t){const{oitPass:i,output:s,hasEmission:r,transparent:o,cullFace:l,customDepthTest:n,hasOccludees:c}=e;return O({blending:a(s)&&o?g(i):null,culling:L(e)?w(l):null,depthTest:b(i,F(n)),depthWrite:v(e),drawBuffers:m(s,S(i,r)),colorWrite:D,stencilWrite:c?x:null,stencilTest:c?t?y:j:null,polygonOffset:f(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}};function F(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function L(e){return 0!==e.cullFace||!e.hasSlicePlane&&(!e.transparent&&!e.doubleSidedMode)}function R(e){const t=n().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color"),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&d()&&t.vec4u8("olidColor"),t}z=e([t("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],z);export{k as DefaultMaterialDrawParameters,M as DefaultMaterialPassParameters,z as DefaultMaterialTechnique,R as getLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{ShaderTechniqueConfiguration as e,parameter as r}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class o extends e{constructor(t=!1){super(),this.alphaCutoff=1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.depthPass=t}}function s(t){switch(t){case 2:return.005;case 0:return.05;default:return.01}}t([r({count:3})],o.prototype,"alphaCutoff",void 0),t([r()],o.prototype,"terrainDepthTest",void 0),t([r()],o.prototype,"cullAboveTerrain",void 0);export{o as GaussianSplatTechniqueConfiguration,s as getGaussianSplatAlphaCutoffValue};
5
+ import{__decorate as t}from"tslib";import{ShaderTechniqueConfiguration as e,parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends e{constructor(t=!1){super(),this.alphaCutoff=1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.fadingEnabled=!1,this.occlusionPass=!1,this.depthPass=t}}function i(t){switch(t){case 2:return.005;case 0:return.05;default:return.01}}t([o({count:3})],r.prototype,"alphaCutoff",void 0),t([o()],r.prototype,"terrainDepthTest",void 0),t([o()],r.prototype,"cullAboveTerrain",void 0),t([o()],r.prototype,"fadingEnabled",void 0);export{r as GaussianSplatTechniqueConfiguration,i as getGaussianSplatAlphaCutoffValue};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{isColor as s}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as l}from"../effects/geometry/olidUtils.js";import{getDrawBuffers as a,blending as c}from"../lib/OrderIndependentTransparency.js";import{H as u}from"../../../../chunks/HUDMaterial.glsl.js";import{PrimitiveType as f}from"../../../webgl/enums.js";import{makePipelineState as p,defaultColorWrite as m,defaultDepthWrite as d}from"../../../webgl/renderState.js";import{fromLayouts as h}from"../../../webgl/VertexAttributeLocations.js";let b=class extends n{constructor(e,r){super(e,r,h([g,w()].map(t))),this.shader=new i(u,()=>import("./HUDMaterial.glsl.js")),this.primitiveType=r.occlusionPass?f.POINTS:f.TRIANGLE_STRIP}initializePipeline(e){const{oitPass:r,hasEmission:t,hasPolygonOffset:o,draped:i,output:n,depthTestEnabled:l,occlusionPass:u}=e,f=l&&!i&&!(1===r)&&!u&&!(8===n);return p({blending:s(n)?c(r,!0):null,depthTest:l&&!i?{func:515}:null,depthWrite:f?d:null,drawBuffers:a(r,t),colorWrite:m,polygonOffset:o?v:null})}};b=e([r("esri.views.3d.webgl-engine.shaders.HUDMaterialTechnique")],b);const v={factor:0,units:-4},g=o().vec2u8("uv0",{glNormalized:!0}),j=o().vec3f("position").vec3f("normal").vec4i16("uvi").vec4u8("color").vec2f("size").f32("rotation").vec4f("centerOffsetAndDistance").vec4f("featureAttribute"),T=j.clone().vec4u8("olidColor");function w(){return l()?T:j}export{b as HUDMaterialTechnique,g as baseLayout,w as getInstanceLayout,j as instanceLayout,T as olidInstanceLayout};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{isColor as s}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as l}from"../effects/geometry/olidUtils.js";import{drawBuffers as a,blending as c}from"../lib/OrderIndependentTransparency.js";import{H as u}from"../../../../chunks/HUDMaterial.glsl.js";import{PrimitiveType as f}from"../../../webgl/enums.js";import{makePipelineState as p,defaultColorWrite as m,defaultDepthWrite as d}from"../../../webgl/renderState.js";import{fromLayouts as h}from"../../../webgl/VertexAttributeLocations.js";let b=class extends n{constructor(e,r){super(e,r,h([g,w()].map(t))),this.shader=new i(u,()=>import("./HUDMaterial.glsl.js")),this.primitiveType=r.occlusionPass?f.POINTS:f.TRIANGLE_STRIP}initializePipeline(e){const{oitPass:r,hasEmission:t,hasPolygonOffset:o,draped:i,output:n,depthTestEnabled:l,occlusionPass:u}=e,f=l&&!i&&!(1===r)&&!u&&!(8===n);return p({blending:s(n)?c(r,!0):null,depthTest:l&&!i?{func:515}:null,depthWrite:f?d:null,drawBuffers:a(r,t),colorWrite:m,polygonOffset:o?v:null})}};b=e([r("esri.views.3d.webgl-engine.shaders.HUDMaterialTechnique")],b);const v={factor:0,units:-4},g=o().vec2u8("uv0",{glNormalized:!0}),j=o().vec3f("position").vec3f("normal").vec4i16("uvi").vec4u8("color").vec2f("size").f32("rotation").vec4f("centerOffsetAndDistance").vec4f("featureAttribute"),T=j.clone().vec4u8("olidColor");function w(){return l()?T:j}export{b as HUDMaterialTechnique,g as baseLayout,w as getInstanceLayout,j as instanceLayout,T as olidInstanceLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{isColor as r}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{oitPolygonOffset as l,getDrawBuffers as o,depthWrite as n,oitDepthTest as a,blending as c}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as p,stencilBaseAllZerosParams as u,stencilWriteMaskOn as m}from"../lib/StencilUtils.js";import{PositionUvLayout as d}from"../materials/DefaultLayouts.js";import{I as h}from"../../../../chunks/ImageMaterial.glsl.js";import{makePipelineState as f,defaultColorWrite as g,cullingParams as j}from"../../../webgl/renderState.js";let P=class extends s{constructor(e,t){super(e,t,S(t).locations),this.shader=new i(h,()=>import("./ImageMaterial.glsl.js"))}_getPipelineState(e,t){const{oitPass:i,output:s,hasEmission:d,hasOccludees:h,cullFace:P}=e;return f({blending:r(s)?c(i,!0):null,culling:j(P),depthTest:{func:a(i)},depthWrite:n(e),drawBuffers:o(i,d),colorWrite:g,stencilWrite:h?m:null,stencilTest:h?t?p:u:null,polygonOffset:l(e)})}initializePipeline(e){return this._occludeePipeline=this._getPipelineState(e,!0),this._getPipelineState(e,!1)}getPipeline(e){return e?this._occludeePipeline:super.getPipeline()}};function S(e){let t=d;return e.perspectiveInterpolation&&(t=t.clone().f32("perspectiveDivide")),t}P=e([t("esri.views.3d.webgl-engine.shaders.ImageMaterialTechnique")],P);export{P as ImageMaterialTechnique,S as getLayout};
5
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{isColor as r}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{oitPolygonOffset as l,drawBuffers as o,depthWrite as n,depthTest as a,blending as p}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as c,stencilBaseAllZerosParams as u,stencilWriteMaskOn as m}from"../lib/StencilUtils.js";import{PositionUvLayout as d}from"../materials/DefaultLayouts.js";import{I as h}from"../../../../chunks/ImageMaterial.glsl.js";import{makePipelineState as f,defaultColorWrite as g,cullingParams as j}from"../../../webgl/renderState.js";let P=class extends s{constructor(e,t){super(e,t,S(t).locations),this.shader=new i(h,()=>import("./ImageMaterial.glsl.js"))}_getPipelineState(e,t){const{oitPass:i,output:s,hasEmission:d,hasOccludees:h,cullFace:P}=e;return f({blending:r(s)?p(i,!0):null,culling:j(P),depthTest:a(i),depthWrite:n(e),drawBuffers:o(i,d),colorWrite:g,stencilWrite:h?m:null,stencilTest:h?t?c:u:null,polygonOffset:l(e)})}initializePipeline(e){return this._occludeePipeline=this._getPipelineState(e,!0),this._getPipelineState(e,!1)}getPipeline(e){return e?this._occludeePipeline:super.getPipeline()}};function S(e){let t=d;return e.perspectiveInterpolation&&(t=t.clone().f32("perspectiveDivide")),t}P=e([t("esri.views.3d.webgl-engine.shaders.ImageMaterialTechnique")],P);export{P as ImageMaterialTechnique,S as getLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{newLayout as i}from"../../support/buffer/InterleavedLayout.js";import{isColor as r}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s,depthOnlyOutputBuffersOr as n}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as o,oitDepthTest as c,blending as p,getDrawBuffers as a}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as u,stencilBaseAllZerosParams as d,stencilWriteMaskOn as h,stencilToolTransparentOccluderParams as f,depthCompareAlways as m,stencilToolMaskOccluderParams as P,stencilWriteMaskOff as T,depthCompareLess as b}from"../lib/StencilUtils.js";import{L as g}from"../../../../chunks/LineMarker.glsl.js";import{makePipelineState as W,defaultColorWrite as _,unpremultipliedAlphaToPremultipliedAlpha as S}from"../../../webgl/renderState.js";let j=class extends s{constructor(e,t){super(e,t,k(t).locations),this.shader=new l(g,()=>import("./LineMarker.glsl.js"))}_makePipelineState(e,t){const{output:i,hasEmission:l,oitPass:s,space:f,hasOccludees:m}=e;return W({blending:r(i)?p(s):null,depthTest:0===f?null:{func:c(s)},depthWrite:o(e),drawBuffers:n(i,a(s,l)),colorWrite:_,stencilWrite:m?h:null,stencilTest:m?t?u:d:null,polygonOffset:{factor:0,units:-10}})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=W({blending:S,depthTest:m,depthWrite:null,colorWrite:_,stencilWrite:null,stencilTest:f}),this._occluderPipelineOpaque=W({blending:S,depthTest:m,depthWrite:null,colorWrite:_,stencilWrite:T,stencilTest:P}),this._occluderPipelineMaskWrite=W({blending:null,depthTest:b,depthWrite:null,colorWrite:null,stencilWrite:h,stencilTest:u})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){return e?this._occludeePipelineState:11===t?this._occluderPipelineTransparent??super.getPipeline():10===t?this._occluderPipelineOpaque??super.getPipeline():this._occluderPipelineMaskWrite??super.getPipeline()}};function k(e){const t=i().vec3f("position").vec4f16("previousDelta").vec2f16("uv0");return e.hasVVColor?t.f32("colorFeatureAttribute"):t.vec4u8("color",{glNormalized:!0}),e.hasVVOpacity&&t.f32("opacityFeatureAttribute"),e.hasVVSize?t.f32("sizeFeatureAttribute"):t.f16("size"),e.worldSpace&&t.vec3f16("normal"),t.freeze()}j=e([t("esri.views.3d.webgl-engine.shaders.LineMarkerTechnique")],j);export{j as LineMarkerTechnique,k as getLayout};
5
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{newLayout as i}from"../../support/buffer/InterleavedLayout.js";import{isColor as r}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as l}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s,depthOnlyOutputBuffersOr as n}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as o,depthTest as c,blending as p,drawBuffers as a}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as u,stencilBaseAllZerosParams as d,stencilWriteMaskOn as h,stencilToolTransparentOccluderParams as f,depthCompareAlways as m,stencilToolMaskOccluderParams as P,stencilWriteMaskOff as T,depthCompareLess as b}from"../lib/StencilUtils.js";import{L as g}from"../../../../chunks/LineMarker.glsl.js";import{makePipelineState as W,defaultColorWrite as _,unpremultipliedAlphaToPremultipliedAlpha as S}from"../../../webgl/renderState.js";let j=class extends s{constructor(e,t){super(e,t,k(t).locations),this.shader=new l(g,()=>import("./LineMarker.glsl.js"))}_makePipelineState(e,t){const{output:i,hasEmission:l,oitPass:s,space:f,hasOccludees:m}=e;return W({blending:r(i)?p(s):null,depthTest:0===f?null:c(s),depthWrite:o(e),drawBuffers:n(i,a(s,l)),colorWrite:_,stencilWrite:m?h:null,stencilTest:m?t?u:d:null,polygonOffset:{factor:0,units:-10}})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=W({blending:S,depthTest:m,depthWrite:null,colorWrite:_,stencilWrite:null,stencilTest:f}),this._occluderPipelineOpaque=W({blending:S,depthTest:m,depthWrite:null,colorWrite:_,stencilWrite:T,stencilTest:P}),this._occluderPipelineMaskWrite=W({blending:null,depthTest:b,depthWrite:null,colorWrite:null,stencilWrite:h,stencilTest:u})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){return e?this._occludeePipelineState:11===t?this._occluderPipelineTransparent??super.getPipeline():10===t?this._occluderPipelineOpaque??super.getPipeline():this._occluderPipelineMaskWrite??super.getPipeline()}};function k(e){const t=i().vec3f("position").vec4f16("previousDelta").vec2f16("uv0");return e.hasVVColor?t.f32("colorFeatureAttribute"):t.vec4u8("color",{glNormalized:!0}),e.hasVVOpacity&&t.f32("opacityFeatureAttribute"),e.hasVVSize?t.f32("sizeFeatureAttribute"):t.f16("size"),e.worldSpace&&t.vec3f16("normal"),t.freeze()}j=e([t("esri.views.3d.webgl-engine.shaders.LineMarkerTechnique")],j);export{j as LineMarkerTechnique,k as getLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as t}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{getDrawBuffers as o}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as l,stencilBaseAllZerosParams as n,stencilWriteMaskOn as a,depthCompareLess as p}from"../lib/StencilUtils.js";import{PositionColorLayout as c,PositionLayout as u}from"../materials/DefaultLayouts.js";import{N as m}from"../../../../chunks/NativeLine.glsl.js";import{PrimitiveType as d}from"../../../webgl/enums.js";import{makePipelineState as h,defaultColorWrite as f,defaultDepthWrite as j,unpremultipliedAlphaToPremultipliedAlpha as b}from"../../../webgl/renderState.js";let g=class extends s{constructor(e,r){super(e,r,r.hasVertexColors?c.locations:u.locations),this.shader=new t(m,()=>import("./NativeLine.glsl.js")),this.primitiveType=d.LINES}initializePipeline(e){const{hasOccludees:r,output:t,hasEmission:s,transparent:c,oitPass:u}=e,m=(e,i=null,t=null)=>h({blending:i,depthTest:p,depthWrite:t,colorWrite:f,stencilWrite:r?a:null,stencilTest:r?e?l:n:null,drawBuffers:o(u,s)});return i(t)?(this._occludeePipeline=m(!0,c?b:null,j),m(!1,c?b:null,j)):m(!1)}getPipeline(e){return e?this._occludeePipeline:super.getPipeline()}};g=e([r("esri.views.3d.webgl-engine.shaders.NativeLineTechnique")],g);export{g as NativeLineTechnique};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as t}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{drawBuffers as o}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as l,stencilBaseAllZerosParams as n,stencilWriteMaskOn as a,depthCompareLess as p}from"../lib/StencilUtils.js";import{PositionColorLayout as c,PositionLayout as u}from"../materials/DefaultLayouts.js";import{N as m}from"../../../../chunks/NativeLine.glsl.js";import{PrimitiveType as d}from"../../../webgl/enums.js";import{makePipelineState as h,defaultColorWrite as f,defaultDepthWrite as j,unpremultipliedAlphaToPremultipliedAlpha as b}from"../../../webgl/renderState.js";let g=class extends s{constructor(e,r){super(e,r,r.hasVertexColors?c.locations:u.locations),this.shader=new t(m,()=>import("./NativeLine.glsl.js")),this.primitiveType=d.LINES}initializePipeline(e){const{hasOccludees:r,output:t,hasEmission:s,transparent:c,oitPass:u}=e,m=(e,i=null,t=null)=>h({blending:i,depthTest:p,depthWrite:t,colorWrite:f,stencilWrite:r?a:null,stencilTest:r?e?l:n:null,drawBuffers:o(u,s)});return i(t)?(this._occludeePipeline=m(!0,c?b:null,j),m(!1,c?b:null,j)):m(!1)}getPipeline(e){return e?this._occludeePipeline:super.getPipeline()}};g=e([r("esri.views.3d.webgl-engine.shaders.NativeLineTechnique")],g);export{g as NativeLineTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as o}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s,depthOnlyOutputBuffersOr as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as l}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as c,depthWrite as a,oitDepthTest as p,blending as u,getDrawBuffers as d}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as f,stencilBaseAllZerosParams as m,stencilWriteMaskOn as h}from"../lib/StencilUtils.js";import{P as g}from"../../../../chunks/Pattern.glsl.js";import{makePipelineState as P,defaultColorWrite as S,cullingParams as b}from"../../../webgl/renderState.js";let j=class extends s{constructor(e,t){super(e,t,T(t).locations),this.shader=new o(g,()=>import("./Pattern.glsl.js"))}_setPipelineState(e,t){const{oitPass:r,output:o,hasEmission:s,cullFace:l,draped:g,hasOccludees:j,polygonOffset:T}=e,y=0===r;return P({blending:i(o)?u(r):null,culling:b(l),depthTest:g?null:{func:p(r)},depthWrite:a(e),drawBuffers:n(o,d(r,s)),colorWrite:S,stencilWrite:j?h:null,stencilTest:j?t?f:m:null,polygonOffset:y?T?v:null:c(e)})}initializePipeline(e){return this._occludeePipelineState=this._setPipelineState(e,!0),this._setPipelineState(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}};j=e([t("esri.views.3d.webgl-engine.shaders.PatternTechnique")],j);const v={factor:1,units:1};function T(e){const t=r().vec3f("position").vec4f("uvMapSpace");return e.draped||t.mat3f("boundingRect"),e.hasVVColor?t.f32("colorFeatureAttribute"):t.vec4u8("color"),l()&&t.vec4u8("olidColor"),t.freeze()}export{j as PatternTechnique,T as getLayout};
5
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{isColor as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as o}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s,depthOnlyOutputBuffersOr as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as l}from"../effects/geometry/olidUtils.js";import{oitPolygonOffset as c,depthWrite as a,depthTest as p,blending as u,drawBuffers as d}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as f,stencilBaseAllZerosParams as m,stencilWriteMaskOn as h}from"../lib/StencilUtils.js";import{P as g}from"../../../../chunks/Pattern.glsl.js";import{makePipelineState as P,defaultColorWrite as S,cullingParams as b}from"../../../webgl/renderState.js";let j=class extends s{constructor(e,t){super(e,t,T(t).locations),this.shader=new o(g,()=>import("./Pattern.glsl.js"))}_setPipelineState(e,t){const{oitPass:r,output:o,hasEmission:s,cullFace:l,draped:g,hasOccludees:j,polygonOffset:T}=e,y=0===r;return P({blending:i(o)?u(r):null,culling:b(l),depthTest:g?null:p(r),depthWrite:a(e),drawBuffers:n(o,d(r,s)),colorWrite:S,stencilWrite:j?h:null,stencilTest:j?t?f:m:null,polygonOffset:y?T?v:null:c(e)})}initializePipeline(e){return this._occludeePipelineState=this._setPipelineState(e,!0),this._setPipelineState(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}};j=e([t("esri.views.3d.webgl-engine.shaders.PatternTechnique")],j);const v={factor:1,units:1};function T(e){const t=r().vec3f("position").vec4f("uvMapSpace");return e.draped||t.mat3f("boundingRect"),e.hasVVColor?t.f32("colorFeatureAttribute"):t.vec4u8("color"),l()&&t.vec4u8("olidColor"),t.freeze()}export{j as PatternTechnique,T as getLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import"../../../../core/has.js";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{newLayout as i}from"../../support/buffer/InterleavedLayout.js";import{isColor as r}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l,depthOnlyOutputBuffersOr as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as o}from"../effects/geometry/olidUtils.js";import{OITPolygonOffset as c,depthWrite as u,oitDepthTest as a,blending as p,getDrawBuffers as f}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as d,stencilBaseAllZerosParams as h,stencilWriteMaskOn as m,stencilToolTransparentOccluderParams as b,depthCompareAlways as g,stencilToolMaskOccluderParams as P,stencilWriteMaskOff as T,depthCompareLess as W}from"../lib/StencilUtils.js";import{R as j}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as y}from"../../../webgl/enums.js";import{makePipelineState as O,defaultColorWrite as S,unpremultipliedAlphaToPremultipliedAlpha as _}from"../../../webgl/renderState.js";let v=class extends l{constructor(e,t){super(e,t,L(t).locations),this.shader=new s(j,()=>import("./RibbonLine.glsl.js")),this.primitiveType=t.wireframe?y.LINES:y.TRIANGLE_STRIP}_makePipelineState(e,t){const{oitPass:i,output:s,hasEmission:l,hasOccludees:o,hasPolygonOffset:b}=e,g=0===i,P=2===i;return O({blending:r(s)?p(i):null,depthTest:{func:a(i)},depthWrite:u(e),drawBuffers:n(s,f(i,l)),colorWrite:S,stencilWrite:o?m:null,stencilTest:o?t?d:h:null,polygonOffset:g||P?b?w:null:c})}initializePipeline(e){if(e.occluder){const t=e.hasPolygonOffset?w:null,{output:i,hasOccludees:r}=e;this._occluderPipelineTransparent=O({blending:_,polygonOffset:t,depthTest:g,depthWrite:null,colorWrite:S,stencilWrite:null,stencilTest:r?b:null,drawBuffers:n(i)}),this._occluderPipelineOpaque=O({blending:_,polygonOffset:t,depthTest:r?g:W,depthWrite:null,colorWrite:S,stencilWrite:r?T:null,stencilTest:r?P:null,drawBuffers:n(i)}),this._occluderPipelineMaskWrite=O({blending:null,polygonOffset:t,depthTest:W,depthWrite:null,colorWrite:null,stencilWrite:r?m:null,stencilTest:r?d:null,drawBuffers:n(i)})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){if(e)return this._occludeePipeline;switch(t){case 11:return this._occluderPipelineTransparent??super.getPipeline();case 10:return this._occluderPipelineOpaque??super.getPipeline();default:return this._occluderPipelineMaskWrite??super.getPipeline()}}};v=e([t("esri.views.3d.webgl-engine.shaders.RibbonLineTechnique")],v);const w={factor:0,units:-4};function L(e){const t=i().vec3f("position").vec4f16("previousDelta").vec4f16("nextDelta").f32("u0").vec2f16("lineParameters");return e.hasVVColor?t.f32("colorFeatureAttribute"):t.vec4u8("color",{glNormalized:!0}),e.hasVVSize?t.f32("sizeFeatureAttribute"):t.f32("size"),e.hasVVOpacity&&t.f32("opacityFeatureAttribute"),o()&&t.vec4u8("olidColor"),e.hasAnimation&&t.vec4f16("timeStamps"),t}export{v as RibbonLineTechnique,L as getLayout};
5
+ import{__decorate as e}from"tslib";import"../../../../core/has.js";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{newLayout as i}from"../../support/buffer/InterleavedLayout.js";import{isColor as r}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l,depthOnlyOutputBuffersOr as n}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as o}from"../effects/geometry/olidUtils.js";import{OITPolygonOffset as c,depthWrite as u,depthTest as a,blending as p,drawBuffers as f}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBaseParams as d,stencilBaseAllZerosParams as h,stencilWriteMaskOn as m,stencilToolTransparentOccluderParams as b,depthCompareAlways as g,stencilToolMaskOccluderParams as P,stencilWriteMaskOff as T,depthCompareLess as W}from"../lib/StencilUtils.js";import{R as j}from"../../../../chunks/RibbonLine.glsl.js";import{PrimitiveType as y}from"../../../webgl/enums.js";import{makePipelineState as O,defaultColorWrite as S,unpremultipliedAlphaToPremultipliedAlpha as _}from"../../../webgl/renderState.js";let v=class extends l{constructor(e,t){super(e,t,L(t).locations),this.shader=new s(j,()=>import("./RibbonLine.glsl.js")),this.primitiveType=t.wireframe?y.LINES:y.TRIANGLE_STRIP}_makePipelineState(e,t){const{oitPass:i,output:s,hasEmission:l,hasOccludees:o,hasPolygonOffset:b}=e,g=0===i,P=2===i;return O({blending:r(s)?p(i):null,depthTest:a(i),depthWrite:u(e),drawBuffers:n(s,f(i,l)),colorWrite:S,stencilWrite:o?m:null,stencilTest:o?t?d:h:null,polygonOffset:g||P?b?w:null:c})}initializePipeline(e){if(e.occluder){const t=e.hasPolygonOffset?w:null,{output:i,hasOccludees:r}=e;this._occluderPipelineTransparent=O({blending:_,polygonOffset:t,depthTest:g,depthWrite:null,colorWrite:S,stencilWrite:null,stencilTest:r?b:null,drawBuffers:n(i)}),this._occluderPipelineOpaque=O({blending:_,polygonOffset:t,depthTest:r?g:W,depthWrite:null,colorWrite:S,stencilWrite:r?T:null,stencilTest:r?P:null,drawBuffers:n(i)}),this._occluderPipelineMaskWrite=O({blending:null,polygonOffset:t,depthTest:W,depthWrite:null,colorWrite:null,stencilWrite:r?m:null,stencilTest:r?d:null,drawBuffers:n(i)})}return this._occludeePipeline=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t){if(e)return this._occludeePipeline;switch(t){case 11:return this._occluderPipelineTransparent??super.getPipeline();case 10:return this._occluderPipelineOpaque??super.getPipeline();default:return this._occluderPipelineMaskWrite??super.getPipeline()}}};v=e([t("esri.views.3d.webgl-engine.shaders.RibbonLineTechnique")],v);const w={factor:0,units:-4};function L(e){const t=i().vec3f("position").vec4f16("previousDelta").vec4f16("nextDelta").f32("u0").vec2f16("lineParameters");return e.hasVVColor?t.f32("colorFeatureAttribute"):t.vec4u8("color",{glNormalized:!0}),e.hasVVSize?t.f32("sizeFeatureAttribute"):t.f32("size"),e.hasVVOpacity&&t.f32("opacityFeatureAttribute"),o()&&t.vec4u8("olidColor"),e.hasAnimation&&t.vec4f16("timeStamps"),t}export{v as RibbonLineTechnique,L as getLayout};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{isColor as t}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPolygonOffset as n,getDrawBuffers as a,depthWrite as l,blending as d}from"../lib/OrderIndependentTransparency.js";import{S as c}from"../../../../chunks/ShadedColorMaterial.glsl.js";import{makePipelineState as p,defaultColorWrite as u,cullingParams as f}from"../../../webgl/renderState.js";let h=class extends i{constructor(e,r){super(e,r,m(r).locations),this.shader=new s(c,()=>import("./ShadedColorMaterial.glsl.js"))}initializePipeline(e){const{oitPass:r,hasEmission:o,output:s,transparent:i,cullFace:c,shadingEnabled:h}=e,m=0===r,b=2===r;return p({blending:t(s)&&i?d(r):null,culling:f(c),depthTest:{func:b?513:h?515:513},depthWrite:l(e),drawBuffers:a(r,o),colorWrite:u,polygonOffset:m||b?null:n})}};function m(e){const r=o().vec3f("position").vec3f("normal");return e.screenSizeEnabled&&r.vec3f("offset"),r}h=e([r("esri.views.3d.webgl-engine.shaders.ShadedColorMaterialTechnique")],h);export{h as ShadedColorMaterialTechnique,m as getLayout};
5
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{isColor as t}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../core/shaderTechnique/ShaderTechnique.js";import{OITPolygonOffset as n,drawBuffers as a,depthWrite as l,blending as d}from"../lib/OrderIndependentTransparency.js";import{S as c}from"../../../../chunks/ShadedColorMaterial.glsl.js";import{makePipelineState as p,defaultColorWrite as u,cullingParams as f}from"../../../webgl/renderState.js";let h=class extends i{constructor(e,r){super(e,r,m(r).locations),this.shader=new s(c,()=>import("./ShadedColorMaterial.glsl.js"))}initializePipeline(e){const{oitPass:r,hasEmission:o,output:s,transparent:i,cullFace:c,shadingEnabled:h}=e,m=0===r,b=2===r;return p({blending:t(s)&&i?d(r):null,culling:f(c),depthTest:{func:b?513:h?515:513},depthWrite:l(e),drawBuffers:a(r,o),colorWrite:u,polygonOffset:m||b?null:n})}};function m(e){const r=o().vec3f("position").vec3f("normal");return e.screenSizeEnabled&&r.vec3f("offset"),r}h=e([r("esri.views.3d.webgl-engine.shaders.ShadedColorMaterialTechnique")],h);export{h as ShadedColorMaterialTechnique,m as getLayout};