@arcgis/core 5.2.0-next.74 → 5.2.0-next.76

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 (489) hide show
  1. package/arcgisGlobal.d.ts +1 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/013c9cc198736a72f7f2.js +1 -0
  4. package/assets/esri/core/workers/chunks/0194244a3f437ad74045.js +1 -0
  5. package/assets/esri/core/workers/chunks/0502641d9a214b37ff29.js +1 -0
  6. package/assets/esri/core/workers/chunks/{4dcd4a052b40047a9230.js → 08cac27df6c216ae1995.js} +1 -1
  7. package/assets/esri/core/workers/chunks/08ec5461af74356e7570.js +1 -0
  8. package/assets/esri/core/workers/chunks/0909816f13d25cacf250.js +1 -0
  9. package/assets/esri/core/workers/chunks/0933203eee15ea50e123.js +1 -0
  10. package/assets/esri/core/workers/chunks/0d9fe49812554e7d7ba7.js +1 -0
  11. package/assets/esri/core/workers/chunks/{0e81c6d4f1c81f9b0a1b.js → 1142f8e9c80207d6bdae.js} +1 -1
  12. package/assets/esri/core/workers/chunks/16929524565a677db4dc.js +1 -0
  13. package/assets/esri/core/workers/chunks/16a04fc184728d66e6e1.js +1 -0
  14. package/assets/esri/core/workers/chunks/177c3b23c1cbd4737049.js +1 -0
  15. package/assets/esri/core/workers/chunks/18e0e993c0c39c962e61.js +1 -0
  16. package/assets/esri/core/workers/chunks/1a467da4c0b33f655199.js +1 -0
  17. package/assets/esri/core/workers/chunks/1ef28d4457c8c943ad19.js +1 -0
  18. package/assets/esri/core/workers/chunks/20b54e7872d967f3be32.js +1 -0
  19. package/assets/esri/core/workers/chunks/{5f31b375971ab067121e.js → 21f763694a41968ac21a.js} +1 -1
  20. package/assets/esri/core/workers/chunks/230925079cee040a8d77.js +1 -0
  21. package/assets/esri/core/workers/chunks/2501d9459f6d14c797e5.js +1 -0
  22. package/assets/esri/core/workers/chunks/257f1e8316877f611e11.js +1 -0
  23. package/assets/esri/core/workers/chunks/270ed3070d118edb3f37.js +1 -0
  24. package/assets/esri/core/workers/chunks/2740f755c3a322cbd477.js +1 -0
  25. package/assets/esri/core/workers/chunks/2e7c830b5b1fe406169f.js +1 -0
  26. package/assets/esri/core/workers/chunks/2f4ed8a63d57636a4ebe.js +1 -0
  27. package/assets/esri/core/workers/chunks/{31d19bb72a9e79b30070.js → 30818b5ff0ce51b25d6f.js} +1 -1
  28. package/assets/esri/core/workers/chunks/315031323e11a18154e3.js +1 -0
  29. package/assets/esri/core/workers/chunks/393f79843d5a78c1cc37.js +1 -0
  30. package/assets/esri/core/workers/chunks/3b5c5356353f1a2303a0.js +1 -0
  31. package/assets/esri/core/workers/chunks/3c28e2040cb4fb716eaa.js +1 -0
  32. package/assets/esri/core/workers/chunks/{99e3aa4832ed87474ab4.js → 44857a76be2c0ac65bb9.js} +1 -1
  33. package/assets/esri/core/workers/chunks/44a786aba84918f2b247.js +1 -0
  34. package/assets/esri/core/workers/chunks/{3e2b4e734aa20a308f3e.js → 46e56fac44e0fd26ba1d.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{4491dc227c28e2ab4f8e.js → 484b251fbcbffcb58323.js} +1 -1
  36. package/assets/esri/core/workers/chunks/48e2d0bfb62e1f4f2ad9.js +1 -0
  37. package/assets/esri/core/workers/chunks/4945d6b0ca1812864185.js +1 -0
  38. package/assets/esri/core/workers/chunks/{7f2f2a92dce3f68e579b.js → 4b54444c04fbd6f42c18.js} +1 -1
  39. package/assets/esri/core/workers/chunks/4c82f5f23004f905a18f.js +1 -0
  40. package/assets/esri/core/workers/chunks/4d7a3b3aaf876da0891b.js +1 -0
  41. package/assets/esri/core/workers/chunks/4f8ce5887102971bfa34.js +2 -0
  42. package/assets/esri/core/workers/chunks/50b08415e072a49bc572.js +1 -0
  43. package/assets/esri/core/workers/chunks/{186bedc377cc97731ca2.js → 532e3a59888e4cc13bd3.js} +2 -2
  44. package/assets/esri/core/workers/chunks/53eed0941a39b56cc034.js +1 -0
  45. package/assets/esri/core/workers/chunks/{1a3afee3ecd806b4aa81.js → 552d6aecc7d88d16227b.js} +1 -1
  46. package/assets/esri/core/workers/chunks/56e6d8c4a9ed893ce951.js +1 -0
  47. package/assets/esri/core/workers/chunks/57159bcac86d660dcceb.js +1 -0
  48. package/assets/esri/core/workers/chunks/58026fc30d8a0ded4102.js +1 -0
  49. package/assets/esri/core/workers/chunks/59598023c0aea62a6297.js +1 -0
  50. package/assets/esri/core/workers/chunks/5bf2ce280ea35ea4c96b.js +1 -0
  51. package/assets/esri/core/workers/chunks/5fd2aa0be03dfb494efa.js +1 -0
  52. package/assets/esri/core/workers/chunks/619aa1381296172ff47b.js +1 -0
  53. package/assets/esri/core/workers/chunks/62f37d1075390a177ae9.js +1 -0
  54. package/assets/esri/core/workers/chunks/{2baa16ec8559e77c226f.js → 64a1ffc221e5b63b43fb.js} +1 -1
  55. package/assets/esri/core/workers/chunks/65d1e338612e59063eba.js +1 -0
  56. package/assets/esri/core/workers/chunks/680dd7b7638465eb33de.js +1 -0
  57. package/assets/esri/core/workers/chunks/69b0dcd7bcd8ec42e2c3.js +1 -0
  58. package/assets/esri/core/workers/chunks/6c740c411b085d2d08c4.js +1 -0
  59. package/assets/esri/core/workers/chunks/6c982779d6d47ec99899.js +1 -0
  60. package/assets/esri/core/workers/chunks/6dddd3df31961b9fda12.js +1 -0
  61. package/assets/esri/core/workers/chunks/{1ca04ecf010e68863014.js → 6e45ecf359bce3417f5d.js} +1 -1
  62. package/assets/esri/core/workers/chunks/702b2381acf4d1f90094.js +1 -0
  63. package/assets/esri/core/workers/chunks/{a52c88e2d837b525ff6c.js → 71ee7c51d2c60a180f1e.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{ad1d06a91121ebfe9162.js → 755b2d883fba90c4e688.js} +2 -2
  65. package/assets/esri/core/workers/chunks/75fc0b1db8e2e3fd2458.js +1 -0
  66. package/assets/esri/core/workers/chunks/{9e25f715cda59c686a4c.js → 792303e4090c0c70c4ff.js} +1 -1
  67. package/assets/esri/core/workers/chunks/79429c8be5da85713200.js +1 -0
  68. package/assets/esri/core/workers/chunks/7b470d6ad182548b9e95.js +1 -0
  69. package/assets/esri/core/workers/chunks/7d8eb4dbea1916320f74.js +1 -0
  70. package/assets/esri/core/workers/chunks/83e54166ba634ec2bd89.js +1717 -0
  71. package/assets/esri/core/workers/chunks/841c81c280114412c95b.js +1 -0
  72. package/assets/esri/core/workers/chunks/87eaed6fdabd482d142e.js +1 -0
  73. package/assets/esri/core/workers/chunks/88d5541679e77117bf03.js +1 -0
  74. package/assets/esri/core/workers/chunks/894ebc64b698e5d7604b.js +1 -0
  75. package/assets/esri/core/workers/chunks/8a36b999cbd65dd2f16c.js +1 -0
  76. package/assets/esri/core/workers/chunks/8ae3a6ddc87bf8315583.js +1 -0
  77. package/assets/esri/core/workers/chunks/{67f54586156d1ab80257.js → 8b980c6b92cc4ea68ede.js} +1 -1
  78. package/assets/esri/core/workers/chunks/8d9a7fa14489897780d3.js +1 -0
  79. package/assets/esri/core/workers/chunks/8e225dd0319672103561.js +1 -0
  80. package/assets/esri/core/workers/chunks/9199300ffd225a1bbef1.js +1 -0
  81. package/assets/esri/core/workers/chunks/94b9a61b4dbb83425a78.js +1 -0
  82. package/assets/esri/core/workers/chunks/98613fded899c59f34a4.js +1 -0
  83. package/assets/esri/core/workers/chunks/{9ca59077712e45ef4d56.js → 9c3e6325dc60bcaf44d7.js} +1 -1
  84. package/assets/esri/core/workers/chunks/9e1392a0c608a13ab036.js +1 -0
  85. package/assets/esri/core/workers/chunks/9e2e4d197a7a57c2a691.js +1 -0
  86. package/assets/esri/core/workers/chunks/{d03e7be74c57c3dbf003.js → a014c17fc210620da738.js} +2 -2
  87. package/assets/esri/core/workers/chunks/{8302bffd28cc6720e0fe.js → a19be304219808268039.js} +2 -2
  88. package/assets/esri/core/workers/chunks/{bd311c85437743cf7d2f.js → a4e4fa4dd1a122bbf7cd.js} +1 -1
  89. package/assets/esri/core/workers/chunks/a5240c8a47842138f31f.js +1 -0
  90. package/assets/esri/core/workers/chunks/a69c10bfd632a5546b34.js +1 -0
  91. package/assets/esri/core/workers/chunks/{b6d26d9738c0787acc38.js → a6a2a4a2bae0d327d7ed.js} +1 -1
  92. package/assets/esri/core/workers/chunks/a7727a2377470d586ff9.js +1 -0
  93. package/assets/esri/core/workers/chunks/a91c1d782346a9c7e1ef.js +1 -0
  94. package/assets/esri/core/workers/chunks/{6cd6d0cfd313f0475d98.js → ac59218847e5ef4c4160.js} +1 -1
  95. package/assets/esri/core/workers/chunks/ac87be2210f868524996.js +1 -0
  96. package/assets/esri/core/workers/chunks/aed16c3e26652960ad3f.js +1 -0
  97. package/assets/esri/core/workers/chunks/b084829a3fd709dc47a8.js +1 -0
  98. package/assets/esri/core/workers/chunks/{05f6887805d92da03122.js → b24fc7eeda580ef020d2.js} +1 -1
  99. package/assets/esri/core/workers/chunks/b37a20c5c4a4686257d4.js +1 -0
  100. package/assets/esri/core/workers/chunks/{a0a1f0bd3648738354a6.js → b4abf82b8ac974a55ae1.js} +1 -1
  101. package/assets/esri/core/workers/chunks/b950ddafba8125c84a5b.js +1 -0
  102. package/assets/esri/core/workers/chunks/b9d1bb106737a05290e1.js +1 -0
  103. package/assets/esri/core/workers/chunks/bab5f4b2424b487b87ac.js +1 -0
  104. package/assets/esri/core/workers/chunks/bad2c7219e95750906e1.js +1 -0
  105. package/assets/esri/core/workers/chunks/bbc6b270d2032189107c.js +1 -0
  106. package/assets/esri/core/workers/chunks/{faa55265020591fd2224.js → bc0395777c5c1adb1ddb.js} +1 -1
  107. package/assets/esri/core/workers/chunks/bc6e488f5fbd50f9f3d0.js +1 -0
  108. package/assets/esri/core/workers/chunks/bd7d87d175ba933ab2ce.js +1 -0
  109. package/assets/esri/core/workers/chunks/{859dd86c921053bf03a1.js → c17dda6fadb8bfad0d51.js} +1 -1
  110. package/assets/esri/core/workers/chunks/c1e5ffe9a251be5a0744.js +1 -0
  111. package/assets/esri/core/workers/chunks/{94368a097e6190ce3c7a.js → c37b28f200b704ae6002.js} +1 -1
  112. package/assets/esri/core/workers/chunks/ca6652c6304ad0e37e8f.js +1 -0
  113. package/assets/esri/core/workers/chunks/{762be5d3e6aeaea33f74.js → cef02ed3942c010da2e8.js} +1 -1
  114. package/assets/esri/core/workers/chunks/cff6390b863361eaeeed.js +1 -0
  115. package/assets/esri/core/workers/chunks/d2172583ee6e481a66aa.js +1 -0
  116. package/assets/esri/core/workers/chunks/d520d407043bc52e5410.js +1 -0
  117. package/assets/esri/core/workers/chunks/da0ef984509057ec8507.js +1 -0
  118. package/assets/esri/core/workers/chunks/dbdd96e558936955acdb.js +1 -0
  119. package/assets/esri/core/workers/chunks/ddd8f6154e265dbb6f9f.js +1 -0
  120. package/assets/esri/core/workers/chunks/de601f0d5a2a282d2efd.js +1 -0
  121. package/assets/esri/core/workers/chunks/de927b1460bc384f5b87.js +1 -0
  122. package/assets/esri/core/workers/chunks/de9a1cce70581920f248.js +1 -0
  123. package/assets/esri/core/workers/chunks/dff932682d6386a861ce.js +1 -0
  124. package/assets/esri/core/workers/chunks/{2c31648a4b95275516ee.js → e227eb44cd139fe2bc1b.js} +1 -1
  125. package/assets/esri/core/workers/chunks/e4e5a171a4874c5af4a4.js +1 -0
  126. package/assets/esri/core/workers/chunks/{fdca9873914b9dbd9244.js → e59101f1d060d0a30a65.js} +1 -1
  127. package/assets/esri/core/workers/chunks/{ddb92c815d17c67a45e6.js → e5d114f2b57d2b8e2f1c.js} +1 -1
  128. package/assets/esri/core/workers/chunks/e89e6eea380ca2c13b64.js +1 -0
  129. package/assets/esri/core/workers/chunks/e9d352d030dcad1619a6.js +1 -0
  130. package/assets/esri/core/workers/chunks/{3de6e54b6ed0feae1940.js → eae51e827f629ab37207.js} +1 -1
  131. package/assets/esri/core/workers/chunks/eee1fd629619021ea279.js +1 -0
  132. package/assets/esri/core/workers/chunks/ef47a5da641cb0d33fdf.js +1 -0
  133. package/assets/esri/core/workers/chunks/f35e749bb5be39880cbe.js +1 -0
  134. package/assets/esri/core/workers/chunks/{3dff36f6de181d9dcdc5.js → f40e4433e7608d0962a6.js} +1 -1
  135. package/assets/esri/core/workers/chunks/f4aa6e90200f61e623e5.js +1 -0
  136. package/assets/esri/core/workers/chunks/ff578f0ca68d652fece5.js +1 -0
  137. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  138. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  139. package/assets/esri/libs/text/pkg/bundle_bg.wasm +0 -0
  140. package/chunks/GaussianSplat.glsl.js +8 -8
  141. package/chunks/GaussianSplatShadow.glsl.js +4 -5
  142. package/chunks/HeatmapDensity.glsl.js +5 -5
  143. package/chunks/OccludedGeometryDepth.glsl.js +5 -0
  144. package/chunks/ShadowCastVisualize.glsl.js +2 -2
  145. package/chunks/bundle2.js +1 -1
  146. package/chunks/lyr3DMain.js +1 -1
  147. package/chunks/lyr3DWorker.js +1 -1
  148. package/config.js +1 -1
  149. package/core/importUtils.js +2 -0
  150. package/geometry/geometryEngine.js +1 -1
  151. package/geometry/operators/importUtils.js +2 -0
  152. package/geometry/support/centroid.js +1 -1
  153. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  154. package/geometry/support/extentUtils.js +1 -1
  155. package/geometry/support/frustum.js +1 -1
  156. package/geometry/support/normalizeUtils.d.ts +17 -15
  157. package/geometry/support/normalizeUtils.js +1 -1
  158. package/kernel.js +1 -1
  159. package/layers/FeatureLayer.d.ts +1 -1
  160. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  161. package/layers/graphics/data/QueryEngine.js +1 -1
  162. package/layers/graphics/data/QueryEngineResult.js +1 -1
  163. package/layers/graphics/data/projectionSupport.js +1 -1
  164. package/layers/graphics/data/queryUtils.js +1 -1
  165. package/layers/graphics/hydratedFeatures.js +1 -1
  166. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  167. package/package.json +2 -2
  168. package/portal/schemas/definitions.js +1 -1
  169. package/rest/geoprocessor/utils.js +1 -1
  170. package/rest/identify.js +1 -1
  171. package/rest/imageService.js +1 -1
  172. package/rest/query/operations/query.js +1 -1
  173. package/rest/query/operations/queryAttributeBins.js +1 -1
  174. package/rest/query/operations/queryPivot.js +1 -1
  175. package/rest/query/operations/queryTopFeatures.js +1 -1
  176. package/support/revision.js +1 -1
  177. package/symbols/cim/CIMEffects.js +1 -1
  178. package/symbols/cim/animationUtils.js +1 -1
  179. package/symbols/cim/cimAnalyzer.js +1 -1
  180. package/symbols/cim/effects/EffectCircularSector.js +1 -1
  181. package/symbols/cim/utils.js +1 -1
  182. package/views/2d/engine/BitmapTile.js +1 -1
  183. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  184. package/views/2d/engine/flow/styles/Particles.js +1 -1
  185. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  186. package/views/2d/engine/imagery/RasterTile.js +1 -1
  187. package/views/2d/engine/imagery/RasterVFTile.js +1 -1
  188. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  189. package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
  190. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  191. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  192. package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
  193. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  194. package/views/2d/engine/webgl/Painter.js +1 -1
  195. package/views/2d/engine/webgl/RenderingDevice.js +1 -1
  196. package/views/2d/engine/webgl/TileContainer.js +1 -1
  197. package/views/2d/engine/webgl/TiledDisplayObject.js +1 -1
  198. package/views/2d/engine/webgl/animations/infos.js +1 -1
  199. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  200. package/views/2d/engine/webgl/normalizedTileUtils.js +1 -1
  201. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  202. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
  203. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  204. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
  205. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
  206. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  208. package/views/2d/engine/webgl/shaderGraph/techniques/bitmap/BitmapTechnique.js +1 -1
  209. package/views/2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js +1 -1
  210. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
  211. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  212. package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
  213. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  214. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
  215. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
  216. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
  217. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
  218. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
  219. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
  220. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  221. package/views/2d/engine/webgl/shaderGraph/techniques/flow/FlowTechnique.js +1 -1
  222. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  223. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  224. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  225. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  226. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
  227. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
  228. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  229. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
  230. package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
  231. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
  232. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
  233. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  234. package/views/2d/engine/webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js +1 -1
  235. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  236. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitmapShader.js +1 -1
  237. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js +1 -1
  238. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
  239. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
  240. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientFillShader.js +1 -1
  241. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
  242. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
  243. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  244. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  245. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternFillShader.js +1 -1
  246. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader.js +1 -1
  247. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/Tile.js +1 -1
  248. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js +1 -1
  249. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileInfo.js +1 -1
  250. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js +1 -1
  251. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js +1 -1
  252. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  253. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
  254. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/MagDirShader.js +1 -1
  255. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/ScalarShader.js +1 -1
  256. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderBackground.js +1 -1
  257. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderCircle.js +1 -1
  258. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderFill.js +1 -1
  259. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderIcon.js +1 -1
  260. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderLine.js +1 -1
  261. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderOutline.js +1 -1
  262. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderText.js +1 -1
  263. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  264. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
  265. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
  266. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +1 -1
  267. package/views/2d/engine/webgl/shaderGraph/techniques/utility/DebugOverlayTechnique.js +1 -1
  268. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  269. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
  270. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  271. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
  272. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  273. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  274. package/views/2d/engine/webgl/shaderGraph/types.js +2 -0
  275. package/views/2d/engine/webgl/shaderGraph/uniformBufferUtils.js +2 -0
  276. package/views/2d/layers/MediaLayerView2D.js +1 -1
  277. package/views/2d/layers/TileLayerView2D.js +1 -1
  278. package/views/2d/layers/support/DisplayGL.js +1 -1
  279. package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
  280. package/views/2d/viewpointUtils.js +1 -1
  281. package/views/3d/environment/EnvironmentManager.js +1 -1
  282. package/views/3d/interactive/Manipulator3D.js +1 -1
  283. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  284. package/views/3d/interactive/manipulatorUtils.js +1 -1
  285. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  286. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  287. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  288. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  289. package/views/3d/layers/MediaLayerView3D.js +1 -1
  290. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  291. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  292. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  293. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  294. package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
  295. package/views/3d/support/flow/geometryUtils.js +1 -1
  296. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  297. package/views/3d/support/hitTest.js +1 -1
  298. package/views/3d/support/renderInfoUtils/line.js +1 -1
  299. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  300. package/views/3d/terrain/DrapedZ.js +2 -0
  301. package/views/3d/terrain/OverlayRenderer.js +1 -1
  302. package/views/3d/terrain/TileCompositor.js +1 -1
  303. package/views/3d/webgl/RenderCamera.js +1 -1
  304. package/views/3d/webgl/RenderNode.js +1 -1
  305. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +2 -2
  306. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +2 -2
  307. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js +8 -3
  308. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +8 -2
  309. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +2 -0
  310. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +2 -0
  311. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechnique.js +2 -0
  312. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulateTechniqueConfiguration.js +2 -0
  313. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClear.glsl.js +2 -0
  314. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastClearTechnique.js +2 -0
  315. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastMaskTechnique.js +2 -0
  316. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastRenderer.js +2 -0
  317. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualize.glsl.js +2 -0
  318. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechnique.js +2 -0
  319. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastVisualizeTechniqueConfiguration.js +2 -0
  320. package/views/3d/webgl-engine/lib/CutFillVisualization.js +1 -1
  321. package/views/3d/webgl-engine/lib/PositionReader.js +1 -1
  322. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  323. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
  324. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFields.js +1 -1
  325. package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
  326. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  327. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  328. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  329. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  330. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  331. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  332. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +28 -21
  333. package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +1 -1
  334. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  335. package/views/3d/webgl-engine/shaders/OccludedGeometryDepth.glsl.js +2 -0
  336. package/views/3d/webgl-engine/shaders/OccludedGeometryDepthTechnique.js +2 -0
  337. package/views/VideoView.js +1 -1
  338. package/views/selection/SelectionOperation.js +1 -1
  339. package/views/webgl/RenderingContext.js +1 -1
  340. package/views/webgl/UniformBufferLayout.js +1 -1
  341. package/views/webgl/UniformBufferObject.js +1 -1
  342. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +20 -6
  343. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  344. package/widgets/BatchAttributeForm/inputs/support/MultipleChoiceController.d.ts +100 -0
  345. package/widgets/BatchAttributeForm/inputs/support/MultipleChoiceController.js +2 -0
  346. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  347. package/widgets/BatchAttributeForm/inputs/support/multipleChoiceInputUtils.js +1 -1
  348. package/widgets/BatchAttributeForm.js +1 -1
  349. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  350. package/widgets/OrientedImageryViewer.js +1 -1
  351. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  352. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  353. package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
  354. package/widgets/support/SelectionList/GroupLayerItem.d.ts +8 -1
  355. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  356. package/widgets/support/SelectionList/LayerItem.d.ts +8 -1
  357. package/widgets/support/SelectionList/LayerItem.js +1 -1
  358. package/widgets/support/SelectionList/SelectionListViewModel.d.ts +29 -1
  359. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  360. package/widgets/support/SelectionList.js +1 -1
  361. package/widgets/support/SelectionToolbar.js +1 -1
  362. package/assets/esri/core/workers/chunks/01c92e68fb17cf2d0e08.js +0 -1
  363. package/assets/esri/core/workers/chunks/02dd79beb13eff6be85e.js +0 -1
  364. package/assets/esri/core/workers/chunks/0823961e5d0bdedbf8cf.js +0 -2
  365. package/assets/esri/core/workers/chunks/0aedeb837399d3f92e4a.js +0 -1
  366. package/assets/esri/core/workers/chunks/0bf644f93c180a2bc2f8.js +0 -705
  367. package/assets/esri/core/workers/chunks/0dbf31a663b5220a3136.js +0 -1
  368. package/assets/esri/core/workers/chunks/0df660dfd941cff3ea1d.js +0 -1
  369. package/assets/esri/core/workers/chunks/1119a33245138e7b3914.js +0 -1
  370. package/assets/esri/core/workers/chunks/1418c03c4ab87f7ab5f4.js +0 -1
  371. package/assets/esri/core/workers/chunks/160b204cbf5bda2a29e9.js +0 -1
  372. package/assets/esri/core/workers/chunks/193aed69de2dec4f36b6.js +0 -1
  373. package/assets/esri/core/workers/chunks/1cc063aa2ddf44bbd515.js +0 -1
  374. package/assets/esri/core/workers/chunks/264fd750691d517ab1f3.js +0 -1
  375. package/assets/esri/core/workers/chunks/2791f3fe16ca5ee2f39a.js +0 -1
  376. package/assets/esri/core/workers/chunks/2a2ed7bd44010f24c2dd.js +0 -1
  377. package/assets/esri/core/workers/chunks/2bdb9b5365869081c936.js +0 -1
  378. package/assets/esri/core/workers/chunks/2d45daacec0d5ed38782.js +0 -1
  379. package/assets/esri/core/workers/chunks/2e44978ee677aa23163d.js +0 -256
  380. package/assets/esri/core/workers/chunks/2ea3ca68cfa4d34e8f3b.js +0 -1
  381. package/assets/esri/core/workers/chunks/2f81047790c4890ae625.js +0 -1
  382. package/assets/esri/core/workers/chunks/32f5112c848efec6c33b.js +0 -1
  383. package/assets/esri/core/workers/chunks/35fd2f765d2cb3f59a22.js +0 -1462
  384. package/assets/esri/core/workers/chunks/3bc2943035391b44d4cf.js +0 -29
  385. package/assets/esri/core/workers/chunks/3d6b2d5ae647e140abaf.js +0 -1
  386. package/assets/esri/core/workers/chunks/44e8cd4b3dad777ab0c9.js +0 -1
  387. package/assets/esri/core/workers/chunks/45ccca01db0027b9dc16.js +0 -1
  388. package/assets/esri/core/workers/chunks/4710f21b138a2c9a0345.js +0 -1
  389. package/assets/esri/core/workers/chunks/4abd54518e35050feb90.js +0 -1
  390. package/assets/esri/core/workers/chunks/4b5bd0c9a55ea2998601.js +0 -1
  391. package/assets/esri/core/workers/chunks/4c2794687aea172775a0.js +0 -1
  392. package/assets/esri/core/workers/chunks/4cf2b0558a4acc141429.js +0 -1
  393. package/assets/esri/core/workers/chunks/4d9bde9f66817a92ceca.js +0 -1
  394. package/assets/esri/core/workers/chunks/4e129b9f5772a06e580c.js +0 -1
  395. package/assets/esri/core/workers/chunks/509aecafbc629bee1c15.js +0 -1
  396. package/assets/esri/core/workers/chunks/5441f96cdd0660229efe.js +0 -1
  397. package/assets/esri/core/workers/chunks/553be2bd69bd311477ea.js +0 -1
  398. package/assets/esri/core/workers/chunks/5600fc334d20c4f0c83d.js +0 -1
  399. package/assets/esri/core/workers/chunks/56bbde1dff96b423fbb9.js +0 -1
  400. package/assets/esri/core/workers/chunks/5bf4ab72b9634b06cc5d.js +0 -1
  401. package/assets/esri/core/workers/chunks/5e3d5347223f0111f40f.js +0 -1
  402. package/assets/esri/core/workers/chunks/613e799377bdb767c955.js +0 -1
  403. package/assets/esri/core/workers/chunks/623d5518bca227f643bd.js +0 -1
  404. package/assets/esri/core/workers/chunks/62811bca7ad2100c023c.js +0 -1
  405. package/assets/esri/core/workers/chunks/64176f7ae719289a2f79.js +0 -1
  406. package/assets/esri/core/workers/chunks/6f58cb9dffe8016397a2.js +0 -1
  407. package/assets/esri/core/workers/chunks/73f77f5a6907cb8d9a35.js +0 -1
  408. package/assets/esri/core/workers/chunks/76b573143d1a65fdbcb6.js +0 -1
  409. package/assets/esri/core/workers/chunks/7aaa051b51a8e34bbfb0.js +0 -1
  410. package/assets/esri/core/workers/chunks/7b5b66ae79e0287e3ade.js +0 -1
  411. package/assets/esri/core/workers/chunks/7e373d9c98ce910db9d2.js +0 -1
  412. package/assets/esri/core/workers/chunks/7f91e45156bbe88f9a62.js +0 -1
  413. package/assets/esri/core/workers/chunks/86a4057572755b403548.js +0 -1
  414. package/assets/esri/core/workers/chunks/877594b6db08da98acd7.js +0 -1
  415. package/assets/esri/core/workers/chunks/8a48a6760c33ed50b650.js +0 -1
  416. package/assets/esri/core/workers/chunks/8d21e2dabc5165f1c8ca.js +0 -1
  417. package/assets/esri/core/workers/chunks/903e1cd8b76eff19ebdf.js +0 -1
  418. package/assets/esri/core/workers/chunks/917c11cb40a7742d7f98.js +0 -1
  419. package/assets/esri/core/workers/chunks/91d133c04ca764d74934.js +0 -1
  420. package/assets/esri/core/workers/chunks/92c4464b67fce6cea134.js +0 -1
  421. package/assets/esri/core/workers/chunks/947f1ea4dbc3e3419ecc.js +0 -1
  422. package/assets/esri/core/workers/chunks/9482a6d7baa24bbf5693.js +0 -1
  423. package/assets/esri/core/workers/chunks/96cec8a02ca96175d602.js +0 -1
  424. package/assets/esri/core/workers/chunks/98e6c1d035755a074d24.js +0 -1
  425. package/assets/esri/core/workers/chunks/9902fcd2070c8eb6d043.js +0 -1
  426. package/assets/esri/core/workers/chunks/9b76c8974424a1908e86.js +0 -1
  427. package/assets/esri/core/workers/chunks/9be6827e5756031a56c1.js +0 -1
  428. package/assets/esri/core/workers/chunks/a101152066dd56259619.js +0 -1
  429. package/assets/esri/core/workers/chunks/a27cdf4c29dd50a6dab1.js +0 -1
  430. package/assets/esri/core/workers/chunks/a294dd12b5c708ce04af.js +0 -1
  431. package/assets/esri/core/workers/chunks/a2a2c7e274fb32fecffa.js +0 -1
  432. package/assets/esri/core/workers/chunks/a3bf8aa81ee398da5b52.js +0 -1
  433. package/assets/esri/core/workers/chunks/a9053ad0f4e8c4705665.js +0 -1
  434. package/assets/esri/core/workers/chunks/afeeb11b39e140303b5a.js +0 -1
  435. package/assets/esri/core/workers/chunks/b1a175b3b2d1a7ddde8e.js +0 -1
  436. package/assets/esri/core/workers/chunks/b33d870cbfa238762c5e.js +0 -1
  437. package/assets/esri/core/workers/chunks/b3b53cf0a3a30164d337.js +0 -1
  438. package/assets/esri/core/workers/chunks/b599b7dadce8b8bc88f6.js +0 -1
  439. package/assets/esri/core/workers/chunks/b858adff7043683fe41c.js +0 -1
  440. package/assets/esri/core/workers/chunks/b984b808d383974ca3d8.js +0 -1
  441. package/assets/esri/core/workers/chunks/be1d2c3a61e6447fbbc7.js +0 -1
  442. package/assets/esri/core/workers/chunks/bff75cc7413bf0d319db.js +0 -1
  443. package/assets/esri/core/workers/chunks/c02ae1d40c1fe95ae6c5.js +0 -1
  444. package/assets/esri/core/workers/chunks/c1189316d24fb4cdb2a0.js +0 -1
  445. package/assets/esri/core/workers/chunks/c1a4d499a30f3d80567b.js +0 -1
  446. package/assets/esri/core/workers/chunks/c25dc9073e73d6b44d88.js +0 -1
  447. package/assets/esri/core/workers/chunks/c45a5bcf26659daf02a1.js +0 -1
  448. package/assets/esri/core/workers/chunks/c46f79d5b7712adbbd1c.js +0 -1
  449. package/assets/esri/core/workers/chunks/c53b2be005721591e29b.js +0 -1
  450. package/assets/esri/core/workers/chunks/c82ab4f0908290e70ee9.js +0 -1
  451. package/assets/esri/core/workers/chunks/c866b66ba72d96453899.js +0 -1
  452. package/assets/esri/core/workers/chunks/c873383e7dae35dc1a61.js +0 -1
  453. package/assets/esri/core/workers/chunks/cc5ec6e99aa09342c704.js +0 -1
  454. package/assets/esri/core/workers/chunks/cd892c9603710d6130a9.js +0 -1
  455. package/assets/esri/core/workers/chunks/cf360767310fb45660a8.js +0 -1
  456. package/assets/esri/core/workers/chunks/d021775cf747556660a5.js +0 -1
  457. package/assets/esri/core/workers/chunks/d08f81d545930a79fb2e.js +0 -1
  458. package/assets/esri/core/workers/chunks/d607cf154218d20e4114.js +0 -1
  459. package/assets/esri/core/workers/chunks/d79ce047afbc034f6008.js +0 -1
  460. package/assets/esri/core/workers/chunks/da6134c7883531f21afe.js +0 -1
  461. package/assets/esri/core/workers/chunks/dbc9249dae41096d750d.js +0 -1
  462. package/assets/esri/core/workers/chunks/e4a2eefffe16cd5bb20f.js +0 -1
  463. package/assets/esri/core/workers/chunks/e602b91d8fdc36a92530.js +0 -1
  464. package/assets/esri/core/workers/chunks/ebfb3cdc0df15eb05d75.js +0 -1
  465. package/assets/esri/core/workers/chunks/ec1841e6e498d54012eb.js +0 -1
  466. package/assets/esri/core/workers/chunks/ed1de8b7406269e217b9.js +0 -29
  467. package/assets/esri/core/workers/chunks/f1727b4a32cb6f36a5e6.js +0 -1
  468. package/assets/esri/core/workers/chunks/f2ab8e49c7f17f488aa8.js +0 -1
  469. package/assets/esri/core/workers/chunks/f721756a6c1593f96409.js +0 -1
  470. package/assets/esri/core/workers/chunks/fb51f823b25c827c6b29.js +0 -1
  471. package/chunks/geometryEngineBase.js +0 -2
  472. package/geometry/geometryAdapters/json.js +0 -2
  473. package/geometry/geometryEngineJSON.js +0 -2
  474. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +0 -2
  475. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +0 -2
  476. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +0 -2
  477. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +0 -2
  478. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js +0 -2
  479. package/views/3d/webgl-engine/shaders/ShadowCastClear.glsl.js +0 -2
  480. package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +0 -2
  481. package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +0 -2
  482. package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +0 -2
  483. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +0 -2
  484. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +0 -2
  485. /package/assets/esri/core/workers/chunks/{0823961e5d0bdedbf8cf.js.LICENSE.txt → 4f8ce5887102971bfa34.js.LICENSE.txt} +0 -0
  486. /package/assets/esri/core/workers/chunks/{186bedc377cc97731ca2.js.LICENSE.txt → 532e3a59888e4cc13bd3.js.LICENSE.txt} +0 -0
  487. /package/assets/esri/core/workers/chunks/{ad1d06a91121ebfe9162.js.LICENSE.txt → 755b2d883fba90c4e688.js.LICENSE.txt} +0 -0
  488. /package/assets/esri/core/workers/chunks/{d03e7be74c57c3dbf003.js.LICENSE.txt → a014c17fc210620da738.js.LICENSE.txt} +0 -0
  489. /package/assets/esri/core/workers/chunks/{8302bffd28cc6720e0fe.js.LICENSE.txt → a19be304219808268039.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/has.js";import{rasterizeDash as t}from"../../../../symbols/cim/rasterizingUtils.js";import{log2 as e}from"./GeometryUtils.js";import i from"../webgl/Rect.js";import s from"../webgl/RectangleBinPack.js";import a from"../../../webgl/Texture.js";import{TextureDescriptor as h}from"../../../webgl/TextureDescriptor.js";const r="dasharray-";class o{constructor(t,e,i=0){this._mosaicPages=[],this._currentPage=0,this._maxItemSize=0,this._pageWidth=0,this._pageHeight=0,this._mosaicRects={},this.pixelRatio=1,e<=0&&console.error("Sprites mosaic defaultWidth and defaultHeight must be greater than zero!"),this._pageWidth=t,this._pageHeight=e,i>0&&(this._maxItemSize=i),this._binPack=new s(t-4,e-4),this._mosaicPages.push({mosaicsData:{type:"static",data:new Uint32Array(this._pageWidth*this._pageHeight)},size:[this._pageWidth,this._pageHeight],dirty:!0,texture:void 0})}destroy(){this.dispose()}dispose(){if(this._binPack=null,null!==this._mosaicPages){for(const t of this._mosaicPages){const e=t.texture;e&&e.dispose()}this._mosaicPages=null}}getWidth(t){return t<0||t>=this._mosaicPages.length?-1:this._mosaicPages[t].size[0]}getHeight(t){return t<0||t>=this._mosaicPages.length?-1:this._mosaicPages[t].size[1]}getPageSize(t){return t<0||t>=this._mosaicPages.length?null:this._mosaicPages[t].size}getTexture(t){return t<0||t>=this._mosaicPages.length?null:this._mosaicPages[t].texture||null}setSpriteSource(t){for(const e of this._mosaicPages)e.texture&&(e.texture.dispose(),e.texture=null),e.dirty=!0;if(0===this._mosaicPages.length){this._binPack=new s(this._pageWidth-4,this._pageHeight-4);const t=Math.floor(this._pageWidth)*Math.floor(this._pageHeight),e=new Uint32Array(t);for(let i=0;i<t;i++)e[i]=0;this._mosaicPages.push({mosaicsData:{type:"static",data:e},size:[this._pageWidth,this._pageHeight],dirty:!0,texture:null})}this._sprites=t}getSpriteItem(t,e=!1){let i,s,a=this._mosaicRects[t];if(a)return a;if(!this._sprites||"loaded"!==this._sprites.loadStatus)return null;if(t&&t.startsWith(r)?([i,s]=this._rasterizeDash(t),e=!0):i=this._sprites.getSpriteInfo(t),!i?.width||!i.height||i.width<0||i.height<0)return null;const h=i.width,o=i.height,[n,g,c]=this._allocateImage(h,o);return n.width<=0?null:(this._copy(n,i,g,c,e,s),a={type:"sprite",rect:n,width:h,height:o,sdf:i.sdf,simplePattern:!1,rasterizationScale:i.pixelRatio??1,samplingMode:"Linear",page:g},this._mosaicRects[t]=a,a)}getSpriteItems(t){const e={};for(const i of t)e[i.name]=this.getSpriteItem(i.name,i.repeat);return e}getMosaicItemPosition(t,e){const i=this.getSpriteItem(t,e),s=i?.rect;if(!s)return null;s.width=i.width,s.height=i.height;const a=i.width,h=i.height,r=2;return{tl:[s.x+r,s.y+r],br:[s.x+r+a,s.y+r+h],page:i.page}}bind(t,e,i=0,s=0){if(i>=this._mosaicPages.length||i>=this._mosaicPages.length)return;const r=this._mosaicPages[i];let o=r.texture;if(!o){const e=new h(r.size[0],r.size[1]);e.wrapMode=33071,o=new a(t,e),r.texture=o}if(o.setSamplingMode(e),t.bindTexture(o,s),r.dirty){const t=r.mosaicsData.data;o.setData(new Uint8Array(t.buffer))}r.dirty=!1}static _copyBits(t,e,i,s,a,h,r,o,n,g,c){let l=s*e+i,_=o*h+r;if(c){_-=h;for(let r=-1;r<=g;r++,l=((r+g)%g+s)*e+i,_+=h)for(let e=-1;e<=n;e++)a[_+e]=t[l+(e+n)%n]}else for(let m=0;m<g;m++){for(let e=0;e<n;e++)a[_+e]=t[l+e];l+=e,_+=h}}_copy(t,e,i,s,a,h){if(!this._sprites||"loaded"!==this._sprites.loadStatus||i>=this._mosaicPages.length)return;const r=this._mosaicPages[i],n=r.mosaicsData.data,g=new Uint32Array(h?h.buffer:this._sprites.image.buffer),c=2,l=h?e.width:this._sprites.width;o._copyBits(g,l,e.x,e.y,n,s[0],t.x+c,t.y+c,e.width,e.height,a),r.dirty=!0}_allocateImage(t,a){t+=2,a+=2;const h=Math.max(t,a);if(this._maxItemSize&&this._maxItemSize<h){const s=2**Math.ceil(e(t)),h=2**Math.ceil(e(a)),r=new i(0,0,t,a);return this._mosaicPages.push({mosaicsData:{type:"static",data:new Uint32Array(s*h)},size:[s,h],dirty:!0,texture:null}),[r,this._mosaicPages.length-1,[s,h]]}let r=t%4?4-t%4:4,o=a%4?4-a%4:4;1===r&&(r=5),1===o&&(o=5);const n=this._binPack.allocate(t+r,a+o);if(n.width<=0){const e=this._mosaicPages[this._currentPage];return e.dirty||(e.mosaicsData.data=null),this._currentPage=this._mosaicPages.length,this._mosaicPages.push({mosaicsData:{type:"static",data:new Uint32Array(this._pageWidth*this._pageHeight)},size:[this._pageWidth,this._pageHeight],dirty:!0,texture:null}),this._binPack=new s(this._pageWidth-4,this._pageHeight-4),this._allocateImage(t,a)}return[n,this._currentPage,[this._pageWidth,this._pageHeight]]}_rasterizeDash(e){const i=/\[(.*?)\]/,s=e.match(i);if(!s)return null;const a=s[1].split(",").map(Number),h=e.slice(e.lastIndexOf("-")+1),[r,o,n]=t(a,h);return[{x:0,y:0,width:o,height:n,sdf:!0,pixelRatio:1},new Uint8Array(r.buffer)]}}export{o as default};
2
+ import"../../../../core/has.js";import{rasterizeDash as t}from"../../../../symbols/cim/rasterizingUtils.js";import{log2 as e}from"./GeometryUtils.js";import i from"../webgl/Rect.js";import s from"../webgl/RectangleBinPack.js";import a from"../../../webgl/Texture.js";import{TextureDescriptor as h}from"../../../webgl/TextureDescriptor.js";const r="dasharray-";class o{constructor(t,e,i=0){this._mosaicPages=[],this._currentPage=0,this._maxItemSize=0,this._pageWidth=0,this._pageHeight=0,this._mosaicRects={},this.pixelRatio=1,e<=0&&console.error("Sprites mosaic defaultWidth and defaultHeight must be greater than zero!"),this._pageWidth=t,this._pageHeight=e,i>0&&(this._maxItemSize=i),this._binPack=new s(t-4,e-4),this._mosaicPages.push({mosaicsData:{type:"static",data:new Uint32Array(this._pageWidth*this._pageHeight)},size:[this._pageWidth,this._pageHeight],dirty:!0,texture:void 0})}destroy(){this.dispose()}dispose(){if(this._binPack=null,null!==this._mosaicPages){for(const t of this._mosaicPages){const e=t.texture;e&&e.dispose()}this._mosaicPages=null}}getWidth(t){return t<0||t>=this._mosaicPages.length?-1:this._mosaicPages[t].size[0]}getHeight(t){return t<0||t>=this._mosaicPages.length?-1:this._mosaicPages[t].size[1]}getPageSize(t){return t<0||t>=this._mosaicPages.length?null:this._mosaicPages[t].size}getTexture(t){return t<0||t>=this._mosaicPages.length?null:this._mosaicPages[t].texture||null}setSpriteSource(t){for(const e of this._mosaicPages)e.texture&&(e.texture.dispose(),e.texture=null),e.dirty=!0;if(0===this._mosaicPages.length){this._binPack=new s(this._pageWidth-4,this._pageHeight-4);const t=Math.floor(this._pageWidth)*Math.floor(this._pageHeight),e=new Uint32Array(t);for(let i=0;i<t;i++)e[i]=0;this._mosaicPages.push({mosaicsData:{type:"static",data:e},size:[this._pageWidth,this._pageHeight],dirty:!0,texture:null})}this._sprites=t}getSpriteItem(t,e=!1){let i,s,a=this._mosaicRects[t];if(a)return a;if(t&&t.startsWith(r))[i,s]=this._rasterizeDash(t),e=!0;else{if(!this._sprites||"loaded"!==this._sprites.loadStatus)return null;i=this._sprites.getSpriteInfo(t)}if(!i?.width||!i.height||i.width<0||i.height<0)return null;const h=i.width,o=i.height,[n,g,c]=this._allocateImage(h,o);return n.width<=0?null:(this._copy(n,i,g,c,e,s),a={type:"sprite",rect:n,width:h,height:o,sdf:i.sdf,simplePattern:!1,rasterizationScale:i.pixelRatio??1,samplingMode:"Linear",page:g},this._mosaicRects[t]=a,a)}getSpriteItems(t){const e={};for(const i of t)e[i.name]=this.getSpriteItem(i.name,i.repeat);return e}getMosaicItemPosition(t,e){const i=this.getSpriteItem(t,e),s=i?.rect;if(!s)return null;s.width=i.width,s.height=i.height;const a=i.width,h=i.height,r=2;return{tl:[s.x+r,s.y+r],br:[s.x+r+a,s.y+r+h],page:i.page}}bind(t,e,i=0,s=0){if(i>=this._mosaicPages.length||i>=this._mosaicPages.length)return;const r=this._mosaicPages[i];let o=r.texture;if(!o){const e=new h(r.size[0],r.size[1]);e.wrapMode=33071,o=new a(t,e),r.texture=o}if(o.setSamplingMode(e),t.bindTexture(o,s),r.dirty){const t=r.mosaicsData.data;o.setData(new Uint8Array(t.buffer))}r.dirty=!1}static _copyBits(t,e,i,s,a,h,r,o,n,g,c){let l=s*e+i,_=o*h+r;if(c){_-=h;for(let r=-1;r<=g;r++,l=((r+g)%g+s)*e+i,_+=h)for(let e=-1;e<=n;e++)a[_+e]=t[l+(e+n)%n]}else for(let m=0;m<g;m++){for(let e=0;e<n;e++)a[_+e]=t[l+e];l+=e,_+=h}}_copy(t,e,i,s,a,h){if(i>=this._mosaicPages.length||!h&&(!this._sprites||"loaded"!==this._sprites.loadStatus))return;const r=this._mosaicPages[i],n=r.mosaicsData.data,g=new Uint32Array(h?h.buffer:this._sprites.image.buffer),c=2,l=h?e.width:this._sprites.width;o._copyBits(g,l,e.x,e.y,n,s[0],t.x+c,t.y+c,e.width,e.height,a),r.dirty=!0}_allocateImage(t,a){t+=2,a+=2;const h=Math.max(t,a);if(this._maxItemSize&&this._maxItemSize<h){const s=2**Math.ceil(e(t)),h=2**Math.ceil(e(a)),r=new i(0,0,t,a);return this._mosaicPages.push({mosaicsData:{type:"static",data:new Uint32Array(s*h)},size:[s,h],dirty:!0,texture:null}),[r,this._mosaicPages.length-1,[s,h]]}let r=t%4?4-t%4:4,o=a%4?4-a%4:4;1===r&&(r=5),1===o&&(o=5);const n=this._binPack.allocate(t+r,a+o);if(n.width<=0){const e=this._mosaicPages[this._currentPage];return e.dirty||(e.mosaicsData.data=null),this._currentPage=this._mosaicPages.length,this._mosaicPages.push({mosaicsData:{type:"static",data:new Uint32Array(this._pageWidth*this._pageHeight)},size:[this._pageWidth,this._pageHeight],dirty:!0,texture:null}),this._binPack=new s(this._pageWidth-4,this._pageHeight-4),this._allocateImage(t,a)}return[n,this._currentPage,[this._pageWidth,this._pageHeight]]}_rasterizeDash(e){const i=/\[(.*?)\]/,s=e.match(i);if(!s)return null;const a=s[1].split(",").map(Number),h=e.slice(e.lastIndexOf("-")+1),[r,o,n]=t(a,h);return[{x:0,y:0,width:o,height:n,sdf:!0,pixelRatio:1},new Uint8Array(r.buffer)]}}export{o as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{MinPriority as e}from"../../../../core/MemCache.js";import{throwIfAborted as t}from"../../../../core/promiseUtils.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{create as o}from"../../../../geometry/support/aaBoundingRect.js";import{tileSizeInPixels as s}from"./constants.js";import{TileHandler as r}from"./TileHandler.js";import{VectorTile as n}from"./VectorTile.js";import l from"../../tiling/TileInfoViewPOT.js";import a from"../../tiling/TileKey.js";class h extends r{constructor(e,t,i,o,s){super(e,t,i,e.tileInfo.lods.length-1,o),this._memCache=s,this.type="TileHandler3D",this._vectorTiles=new Map,this._ongoingTileRequests=new Map,this._ongoingRequestToController=new Map,this._tileInfoView=new l(e.tileInfo,e.fullExtent)}destroy(){super.destroy(),this._ongoingRequestToController.forEach(e=>e.abort()),this._ongoingRequestToController.clear(),this._ongoingTileRequests.clear(),this._vectorTiles.clear()}async getVectorTile(r,l){const h=new a(r[0],r[1],r[2],0);let g=this._vectorTiles.get(h.id)??this._memCache.get(h.id);if(g)return g.retain(),g;const c=await this._getVectorTileData(h);if(t(l),!this._layer)return null;if(g=this._vectorTiles.get(h.id)??this._memCache.get(h.id),g)return g.retain(),g;const T=this._layer.tileInfo.getTileBounds(o(),h),m=this._tileInfoView.getTileResolution(r[0]);return g=new n(h,m,T[0],T[3],s,s,this._styleRepository,this),g.setData(c),c&&(g.retain(),this._memCache.put(h.id,g,e),this._vectorTiles.set(h.id,g)),g.neededForCoverage=!0,g.transforms.tileUnitsToPixels=i(1/8,0,0,0,1/8,0,0,0,1),g}updateTileSize(e){this._memCache.updateSize(e.id)}onDisposeTile(e){this._vectorTiles.delete(e.id)}_getVectorTileData(e){const t=e.id;if(this._ongoingTileRequests.has(t))return this._ongoingTileRequests.get(t);const i=new AbortController,o={signal:i.signal},s=this._getParsedVectorTileData(e,o).then(e=>(this._ongoingTileRequests.delete(t),this._ongoingRequestToController.delete(t),e)).catch(()=>(this._ongoingTileRequests.delete(t),this._ongoingRequestToController.delete(t),null));return this._ongoingTileRequests.set(t,s),this._ongoingRequestToController.set(t,i),s}_getParsedVectorTileData(e,t){return this.fetchTileData(e,t).then(i=>this.parseTileData({key:e,data:i},t))}}export{h as default};
2
+ import{MinPriority as e}from"../../../../core/MemCache.js";import{throwIfAborted as t}from"../../../../core/promiseUtils.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{create as o}from"../../../../geometry/support/aaBoundingRect.js";import{tileSizeInPixels as s}from"./constants.js";import{TileHandler as r}from"./TileHandler.js";import{VectorTile as n}from"./VectorTile.js";import l from"../../tiling/TileInfoViewPOT.js";import a from"../../tiling/TileKey.js";class h extends r{constructor(e,t,i,o,s){super(e,t,i,e.tileInfo.lods.length-1,o),this._memCache=s,this.type="TileHandler3D",this._vectorTiles=new Map,this._ongoingTileRequests=new Map,this._ongoingRequestToController=new Map,this.tilingScheme=new l(e.tileInfo,e.fullExtent)}destroy(){super.destroy(),this._ongoingRequestToController.forEach(e=>e.abort()),this._ongoingRequestToController.clear(),this._ongoingTileRequests.clear(),this._vectorTiles.clear()}async getVectorTile(r,l){const h=new a(r[0],r[1],r[2],0);let g=this._vectorTiles.get(h.id)??this._memCache.get(h.id);if(g)return g.retain(),g;const c=await this._getVectorTileData(h);if(t(l),!this._layer)return null;if(g=this._vectorTiles.get(h.id)??this._memCache.get(h.id),g)return g.retain(),g;const T=this._layer.tileInfo.getTileBounds(o(),h),m=this.tilingScheme.getTileResolution(r[0]);return g=new n(h,m,T[0],T[3],s,s,this._styleRepository,this),g.setData(c),c&&(g.retain(),this._memCache.put(h.id,g,e),this._vectorTiles.set(h.id,g)),g.neededForCoverage=!0,g.transforms.tileUnitsToPixels=i(1/8,0,0,0,1/8,0,0,0,1),g}updateTileSize(e){this._memCache.updateSize(e.id)}onDisposeTile(e){this._vectorTiles.delete(e.id)}_getVectorTileData(e){const t=e.id;if(this._ongoingTileRequests.has(t))return this._ongoingTileRequests.get(t);const i=new AbortController,o={signal:i.signal},s=this._getParsedVectorTileData(e,o).then(e=>(this._ongoingTileRequests.delete(t),this._ongoingRequestToController.delete(t),e)).catch(()=>(this._ongoingTileRequests.delete(t),this._ongoingRequestToController.delete(t),null));return this._ongoingTileRequests.set(t,s),this._ongoingRequestToController.set(t,i),s}_getParsedVectorTileData(e,t){return this.fetchTileData(e,t).then(i=>this.parseTileData({key:e,data:i},t))}}export{h as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{RenderingDevice as e}from"../webgl/RenderingDevice.js";import{simplePipelineState as t}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as i}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";const r=1e-6;class n{constructor(t,r){this.spriteMosaic=t,this.glyphMosaic=r,this._vtlTechniques=new i,this._context=null,this._vtlTechniques.startup(),this._renderingDevice=new e}dispose(){this._vtlTechniques&&this._vtlTechniques.shutdown(this._context),this.spriteMosaic.dispose(),this._renderingDevice.dispose(),this._context=null}drawSymbols(e,t,i){const n=i.layers;e.renderPass="translucent";const a=this._vtlTechniques.getTechnique(3);s[0]=t;for(let o=0;o<n.length;o++){const t=n[o];if(3!==t.type)continue;const i=t.getLayoutProperty("visibility");if(i&&1===i.getValue())continue;const l=e.displayLevel;void 0!==t.minzoom&&t.minzoom>l+r||void 0!==t.maxzoom&&t.maxzoom<=l-r||(e.styleLayerUID=t.uid,e.styleLayer=t,a.render(e,{tiles:s}))}s[0]=null}drawBackground(e,t,i){if(0===i.backgroundBucketIds.length)return;const{displayLevel:n,requiredLevel:a}=e;t.key.level=a,this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:{write:!1,test:519}}),e.renderPass="background";const o=this._vtlTechniques.getTechnique(0);s[0]=t,i.backgroundBucketIds.forEach(t=>{const a=i.getLayerById(t);if(0!==a.type)return;const l=a.getLayoutProperty("visibility");l&&1===l.getValue()||void 0!==a.minzoom&&a.minzoom>n+r||void 0!==a.maxzoom&&a.maxzoom<=n-r||(e.styleLayerUID=a.uid,e.styleLayer=a,o.render(e,{tiles:s}))}),s[0]=null}drawTile(e,i,r,n){const s=r.layers,a=n?e=>n!==e.type||!i.layerData.has(e.uid):e=>!i.layerData.has(e.uid),o=s.filter(e=>{if(a(e))return!1;const t=e.getLayoutProperty("visibility");return 1!==t?.getValue()}),{context:l}=e,c=l.getPipelineState(),{depthWrite:d}=c;i.disposeLayerData();let u=0,h=1;void 0!==d?.zNear&&void 0!==d.zFar&&(u=d.zNear,h=d.zFar),this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"none"},stencil:!1,depth:{write:{zNear:u,zFar:h},test:515}}),e.renderPass="opaque";for(let t=o.length-1;t>=0;--t)this._renderStyleLayer(o[t],e,i);this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:{write:!1,test:515}}),e.renderPass="translucent",o.forEach(t=>this._renderStyleLayer(t,e,i)),this._renderingDevice.setPipelineState(t),l.setPipelineState(c),this._context||(this._context=e.context)}setShader(e){return this._renderingDevice.setShader(e)}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,i){return this._renderingDevice.submitDraw(e,t,i)}submitDrawMesh(e,t,i,r){this._renderingDevice.submitDrawMesh(e,t,i,r)}submitDrawMeshUntyped(e,t,i,r){this._renderingDevice.submitDrawMeshUntyped(e,t,i,r)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}_renderStyleLayer(e,t,i){const{renderPass:n}=t;let a;switch(e.type){case 0:if("background"!==n)return;a=this._vtlTechniques.getTechnique(0);break;case 1:if("opaque"!==n&&"translucent"!==n)return;a=this._vtlTechniques.getTechnique(1);break;case 2:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(2);break;case 4:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(4);break;case 3:if("translucent"!==n)return;a=this._vtlTechniques.getTechnique(3)}const{displayLevel:o}=t,{minzoom:l,maxzoom:c}=e;if(void 0!==l&&l>o+r||void 0!==c&&c<=o-r||!a)return;const d=this._renderingDevice.getPipelineState();3===e.type&&this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:!1}),t.styleLayerUID=e.uid,t.styleLayer=e,s[0]=i,a.render(t,{tiles:s}),s[0]=null,3===e.type&&this._renderingDevice.setPipelineState(d)}}const s=[null];export{n as default};
2
+ import{RenderingDevice as e}from"../webgl/RenderingDevice.js";import{simplePipelineState as t}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as i}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";const n=1e-6;class r{constructor(t,n){this.spriteMosaic=t,this.glyphMosaic=n,this._vtlTechniques=new i,this._context=null,this._vtlTechniques.startup(),this._renderingDevice=new e}dispose(){this._vtlTechniques&&this._vtlTechniques.shutdown(this._context),this.spriteMosaic.dispose(),this._renderingDevice.dispose(),this._context=null}drawSymbols(e,t,i){this._context??=e.context;const r=i.layers;e.renderPass="translucent";const a=this._vtlTechniques.getTechnique(3);s[0]=t;for(let o=0;o<r.length;o++){const t=r[o];if(3!==t.type)continue;const i=t.getLayoutProperty("visibility");if(i&&1===i.getValue())continue;const c=e.displayLevel;void 0!==t.minzoom&&t.minzoom>c+n||void 0!==t.maxzoom&&t.maxzoom<=c-n||(e.styleLayerUID=t.uid,e.styleLayer=t,a.render(e,{tiles:s}))}s[0]=null}drawBackground(e,t,i){if(0===i.backgroundBucketIds.length)return;this._context??=e.context;const{displayLevel:r}=e;this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:{write:!1,test:519}}),e.renderPass="background";const a=this._vtlTechniques.getTechnique(0);s[0]=t,i.backgroundBucketIds.forEach(t=>{const o=i.getLayerById(t);if(0!==o.type)return;const c=o.getLayoutProperty("visibility");c&&1===c.getValue()||void 0!==o.minzoom&&o.minzoom>r+n||void 0!==o.maxzoom&&o.maxzoom<=r-n||(e.styleLayerUID=o.uid,e.styleLayer=o,a.render(e,{tiles:s}))}),s[0]=null}drawTile(e,i,n,r){this._context??=e.context;const s=n.layers,a=r?e=>r!==e.type||!i.layerData.has(e.uid):e=>!i.layerData.has(e.uid),o=s.filter(e=>{if(a(e))return!1;const t=e.getLayoutProperty("visibility");return 1!==t?.getValue()}),{context:c}=e,l=c.getPipelineState(),{depthWrite:h}=l;i.disposeLayerData();let d=0,u=1;void 0!==h?.zNear&&void 0!==h.zFar&&(d=h.zNear,u=h.zFar),this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"none"},stencil:!1,depth:{write:{zNear:d,zFar:u},test:515}}),e.renderPass="opaque";for(let t=o.length-1;t>=0;--t)this._renderStyleLayer(o[t],e,i);this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:{write:!1,test:515}}),e.renderPass="translucent",o.forEach(t=>this._renderStyleLayer(t,e,i)),this._renderingDevice.setPipelineState(t),c.setPipelineState(l)}setShader(e){return this._renderingDevice.setShader(e)}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,i){return this._renderingDevice.submitDraw(e,t,i)}submitDrawMesh(e,t,i,n){this._renderingDevice.submitDrawMesh(e,t,i,n)}submitDrawMeshUntyped(e,t,i,n){this._renderingDevice.submitDrawMeshUntyped(e,t,i,n)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}_renderStyleLayer(e,t,i){const{renderPass:r}=t;let a;switch(e.type){case 0:if("background"!==r)return;a=this._vtlTechniques.getTechnique(0);break;case 1:if("opaque"!==r&&"translucent"!==r)return;a=this._vtlTechniques.getTechnique(1);break;case 2:if("translucent"!==r)return;a=this._vtlTechniques.getTechnique(2);break;case 4:if("translucent"!==r)return;a=this._vtlTechniques.getTechnique(4);break;case 3:if("translucent"!==r)return;a=this._vtlTechniques.getTechnique(3)}const{displayLevel:o}=t,{minzoom:c,maxzoom:l}=e;if(void 0!==c&&c>o+n||void 0!==l&&l<=o-n||!a)return;const h=this._renderingDevice.getPipelineState();3===e.type&&this._renderingDevice.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:!1,depth:!1}),t.styleLayerUID=e.uid,t.styleLayer=e,s[0]=i,a.render(t,{tiles:s}),s[0]=null,3===e.type&&this._renderingDevice.setPipelineState(h)}}const s=[null];export{r as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null,this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic}}doRender(e){const{drawPhase:t}=e,s=1===t||64===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;64!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);this.children.forEach(e=>e.disposeLayerData()),super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(t=>(1===e.drawPhase&&t.fader.fade()<1&&this.requestRender(),t.visible&&t.hasData()));if(n&&0!==n.length){for(const e of n)e.triangleCount=0;t.setClearDepth(1),t.clear(256),s.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}}),e.renderPass="translucent";for(let t=0;t<o.length;t++)this._renderStyleLayer(o[t],e,n);t.bindVAO(null),s.setPipelineState(a);for(const e of n)e.debugInfo.display.triangleCount=e.triangleCount}else t.bindVAO(null)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{displayLevel:r,renderPass:i}=t;if(void 0===e)return;const o=e.getLayoutProperty("visibility");if(o&&1===o.getValue())return;switch(e.type){case 0:return;case 1:case 2:case 4:case 3:if("translucent"!==i)return}if(s=3===e.type?s.filter(e=>e.decluttered):s.filter(e=>e.neededForCoverage),3!==e.type&&(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+u||void 0!==e.maxzoom&&e.maxzoom<r-u))return;const l=e.uid;t.styleLayerUID=l,t.styleLayer=e;const n=this._techniques.getTechnique(e.type);null!=n&&n.render(t,{tiles:s})}_renderBackgroundLayers(e,t,s){const{displayLevel:r,state:i}=e,o=this._styleRepository;let l=!1;for(const h of t){const e=o.getLayerById(h);if(e&&0===e.type&&y(o.getLayerById(h),s)){l=!0;break}}if(!l)return;const n=this.tilingScheme.getTileCoverage(e.state,0,!0,"smallest"),{spans:a,lodInfo:d}=n,{level:m}=d,p=[];let g=0;for(const{row:h,colFrom:u,colTo:y}of a)for(let e=u;e<=y;e++){const t=new c(m,h,d.normalizeCol(e),d.getWorldForColumn(e)),s=this._getOrCreateBackgroundTile(g,t);s.setTransform(i),p.push(s),g++}const f=this._techniques.getTechnique(0);for(const h of t){const t=o.getLayerById(h);0!==t.type||!y(t,s)||void 0!==t.minzoom&&t.minzoom>=r+u||void 0!==t.maxzoom&&t.maxzoom<r-u||(e.styleLayerUID=t.uid,e.styleLayer=t,f.render(e,{tiles:p}))}h.pool.release(n)}_getOrCreateBackgroundTile(t,i){const o=this._backgroundTiles[t];if(o?.key.equals(i))return o;const n=this.tilingScheme.getTileBounds(e(),i),a=this.tilingScheme.getTileResolution(i.level),d=new l(i,a,n[0],n[3],r,r,s,s);return o?(o.destroy(),this._backgroundTiles[t]=d):this._backgroundTiles.push(d),d}_computeDisplayInfoView(e){let s=e.tileInfo.lods[0].scale;const i=Math.max(25,e.tileInfo.lods.length),o=[];for(let t=0;t<=i;t++)o.push(s),s/=2;this._displayInfo=t.create({scales:o,size:r,spatialReference:e.spatialReference,numLODs:i})}}export{m as VectorTileContainer};
2
+ import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null;for(const t of this._backgroundTiles)t.destroy();this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic}}doRender(e){const{drawPhase:t}=e,s=1===t||64===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;64!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);this.children.forEach(e=>e.disposeLayerData()),super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(t=>(1===e.drawPhase&&t.fader.fade()<1&&this.requestRender(),t.visible&&t.hasData()));if(n&&0!==n.length){for(const e of n)e.triangleCount=0;t.setClearDepth(1),t.clear(256),s.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}}),e.renderPass="translucent";for(let t=0;t<o.length;t++)this._renderStyleLayer(o[t],e,n);t.bindVAO(null),s.setPipelineState(a);for(const e of n)e.debugInfo.display.triangleCount=e.triangleCount}else t.bindVAO(null)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{displayLevel:r,renderPass:i}=t;if(void 0===e)return;const o=e.getLayoutProperty("visibility");if(o&&1===o.getValue())return;switch(e.type){case 0:return;case 1:case 2:case 4:case 3:if("translucent"!==i)return}if(s=3===e.type?s.filter(e=>e.decluttered):s.filter(e=>e.neededForCoverage),3!==e.type&&(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+u||void 0!==e.maxzoom&&e.maxzoom<r-u))return;const l=e.uid;t.styleLayerUID=l,t.styleLayer=e;const n=this._techniques.getTechnique(e.type);null!=n&&n.render(t,{tiles:s})}_renderBackgroundLayers(e,t,s){const{displayLevel:r,state:i}=e,o=this._styleRepository;let l=!1;for(const h of t){const e=o.getLayerById(h);if(e&&0===e.type&&y(o.getLayerById(h),s)){l=!0;break}}if(!l)return;const n=this.tilingScheme.getTileCoverage(e.state,0,!0,"smallest"),{spans:a,lodInfo:d}=n,{level:m}=d,p=[];let g=0;for(const{row:h,colFrom:u,colTo:y}of a)for(let e=u;e<=y;e++){const t=new c(m,h,d.normalizeCol(e),d.getWorldForColumn(e)),s=this._getOrCreateBackgroundTile(g,t);s.setTransform(i),p.push(s),g++}const f=this._techniques.getTechnique(0);for(const h of t){const t=o.getLayerById(h);0!==t.type||!y(t,s)||void 0!==t.minzoom&&t.minzoom>=r+u||void 0!==t.maxzoom&&t.maxzoom<r-u||(e.styleLayerUID=t.uid,e.styleLayer=t,f.render(e,{tiles:p}))}h.pool.release(n)}_getOrCreateBackgroundTile(t,i){const o=this._backgroundTiles[t];if(o?.key.equals(i))return o;const n=this.tilingScheme.getTileBounds(e(),i),a=this.tilingScheme.getTileResolution(i.level),d=new l(i,a,n[0],n[3],r,r,s,s);return o?(o.destroy(),this._backgroundTiles[t]=d):this._backgroundTiles.push(d),d}_computeDisplayInfoView(e){let s=e.tileInfo.lods[0].scale;const i=Math.max(25,e.tileInfo.lods.length),o=[];for(let t=0;t<=i;t++)o.push(s),s/=2;this._displayInfo=t.create({scales:o,size:r,spatialReference:e.spatialReference,numLODs:i})}}export{m as VectorTileContainer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{set as e,identity as t,translate as i,rotate as s,multiply as l}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{toRadian as r}from"../../../../core/libs/gl-matrix-2/math/common.js";import"../../tiling/TileInfoView.js";import a from"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{tileSizeInPixels as o,tileSizeInTileUnits as d,tileCoordinateScale as c}from"./constants.js";import{declutterSingleTile as h}from"./decluttering/jobsUtil.js";import{RenderableTile as u}from"../webgl/RenderableTile.js";import{TileReshuffleManager as m}from"../webgl/TileReshuffleManager.js";class p{constructor(){this._renderParams={reshuffleManager:new m,context:null,drawPhase:1,state:new g,stationary:!0,pixelRatio:1,displayLevel:-1,requiredLevel:-1,normalizedTileView:{origin:[0,0],worldWrapId:[0,0],unitsToPixels:1},tilingScheme:null,globalOpacity:1,renderPass:"background",styleLayer:null,styleLayerUID:-1,painter:null,glyphMosaic:null,spriteMosaic:null,profiler:null,renderingOptions:null,requestRender:null,allowDelayedRender:!1,deltaTime:-1,timeline:null,time:0,blendMode:null,dataUploadCounter:0,effects:null,inFadeTransition:!1,requireFBO:!1,highlightGradient:null,stencilSymbols:!0,is3D:!0,backgroundColor:null,animationsEnabled:!0},this._backgroundTile=new u(new a(0,0,0,0),1,0,0,o,o,d,d),this._heading=0,this._declutteredForHeading=new WeakMap}dispose(){this._renderParams=null}renderBackground(e,t,i,s,l,n,r,a,o,d){const c=this._backgroundTile;this._updateRenderParameters(e,t,c,i,l,n,r,a,o,d),this._renderParams.stencilSymbols=!1,i.drawBackground(this._renderParams,c,s)}renderContent(e,t,i,s,l,n,r,a,o,d,c,h){this._declutter(i),s.forAll(({sourceLayerInfo:{data:e}})=>this._declutter(e));const u=s.length>0;u&&this._stencilSymbols(e,t,i,s,l,n,r,a,o,d,c,h);let m=1;i.stencilRef=u?m:0,e.setStencilFunction(514,i.stencilRef,255),this._render(e,t,i,l,n,r,a,o,d,c,h),s.forAll(({sourceLod:t,offset:i,sourceLayerInfo:{data:s}})=>{s.stencilRef=++m,this._renderSymbols(e,t,s,l,n,r,a,i,d,c,h)})}_stencilSymbols(e,t,i,s,l,n,r,a,o,d,c,h){let u=1;i.stencilRef=u,e.setDepthTestEnabled(!1),e.setDepthWriteEnabled(!1),e.setStencilTestEnabled(!0),e.setBlendingEnabled(!1),e.setColorMask(!1,!1,!1,!1),e.setStencilOp(7680,7680,7681),e.setStencilWriteMask(255),e.setStencilFunction(519,i.stencilRef,255),this._stencilTileSymbols(e,t,i,l,n,r,a,o,d,c,h),s.forAll(({sourceLod:t,offset:i,sourceLayerInfo:{data:s}})=>{s.stencilRef=++u,e.setStencilFunction(519,s.stencilRef,255),this._stencilTileSymbols(e,t,s,l,n,r,a,i,d,c,h)}),e.setStencilWriteMask(0),e.setBlendingEnabled(!0),e.setDepthTestEnabled(!0),e.setColorMask(!0,!0,!0,!0)}_renderSymbols(e,t,i,s,l,n,r,a,o,d,c){e.setStencilFunction(514,i.stencilRef,255),this._render(e,t,i,s,l,n,r,a,o,d,c,3)}_render(e,t,i,s,l,n,r,a,o,d,c,h){this._updateRenderParameters(e,t,i,s,n,r,a,o,d,c),this._renderParams.stencilSymbols=!1,s.drawTile(this._renderParams,i,l,h)}_stencilTileSymbols(e,t,i,s,l,n,r,a,o,d,c){this._updateRenderParameters(e,t,i,s,n,r,a,o,d,c),this._renderParams.stencilSymbols=!0,i.triangleCount=0,s.drawSymbols(this._renderParams,i,l)}_updateRenderParameters(n,a,o,d,h,u,m,p,g,f){"type"in o&&"vector-tile"===o.type&&!o.stage&&o.attachWithContext(n);const _=a[0]-h.getLevelShift(a[0]),y=this._renderParams;y.context=n,y.painter=d,y.glyphMosaic=d.glyphMosaic,y.spriteMosaic=d.spriteMosaic,y.pixelRatio=g*f,y.displayLevel=_,y.requiredLevel=_;const b=h.getScale(a[0]),[S,w]=h.getOffset(a,u*b),M=c*u*b/p,T=-1-S-m[0]*u*2,R=1+w+(1-m[1])*u*2-2,P=y.state,x=p/f;P.size[0]=x,P.size[1]=x,P.pixelRatio=f,P.rotation=(360-this._heading)%360;const j=2/x;e(P.displayViewMat3,j,0,0,0,-j,0,-1,1,1);const L=M/j,k=[(T+1)/j,(1-R)/j],v=o.width/o.rangeX*o.resolution;P.resolution=v/L,y.normalizedTileView.origin[0]=-k[0],y.normalizedTileView.origin[1]=-k[1];const F=t(P.displayMat3),C=t(P.viewMat3),E=r(this._heading);i(F,F,[x/2,x/2]),s(F,F,E),i(F,F,[-x/2,-x/2]),l(F,P.displayViewMat3,F),i(C,C,[x/2,x/2]),s(C,C,-E),i(C,C,[-x/2,-x/2])}updateHeading(e){this._heading=e}_declutter(e){this._declutteredForHeading.get(e)!==this._heading&&(h(e,(360-this._heading)%360),this._declutteredForHeading.set(e,this._heading))}}class g{constructor(){this.size=[0,0],this.pixelRatio=1,this.rotation=0,this.displayMat3=n(),this.displayViewMat3=n(),this.viewMat3=n(),this.transform=null,this.inverseTransform=null,this.viewMat2d=null,this.id=0,this.extent=null,this.center=[0,0],this.scale=1,this.resolution=0,this.worldScreenWidth=0,this.spatialReference=null,this.viewpoint=null,this.getScreenTransform=null,this.toMap=null,this.toScreen=null,this.clone=null,this.copy=null,this.toJSON=null}}export{p as VectorTileRendererHelper3D};
2
+ import{set as e,identity as t,translate as i,rotate as l,multiply as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{toRadian as r}from"../../../../core/libs/gl-matrix-2/math/common.js";import"../../tiling/TileInfoView.js";import a from"../../tiling/TileKey.js";import"../../tiling/TileQueue.js";import"../../tiling/TileStrategy.js";import{tileSizeInPixels as o,tileSizeInTileUnits as d,tileCoordinateScale as c}from"./constants.js";import{declutterSingleTile as h}from"./decluttering/jobsUtil.js";import{getNormalizedTileOrigin as u,getNormalizedTileUnitsPerMapUnit as g}from"../webgl/normalizedTileUtils.js";import{RenderableTile as m}from"../webgl/RenderableTile.js";import{TileReshuffleManager as p}from"../webgl/TileReshuffleManager.js";function _([e,t,i]){return new m(new a(e,t,i,0),1,0,0,o,o,d,d)}class T{constructor(){this._renderParams={reshuffleManager:new p,context:null,drawPhase:1,state:new f,stationary:!0,pixelRatio:1,displayLevel:-1,requiredLevel:-1,normalizedTileView:{origin:[0,0],worldWrapId:[0,0],unitsToPixels:1},tilingScheme:null,globalOpacity:1,renderPass:"background",styleLayer:null,styleLayerUID:-1,painter:null,glyphMosaic:null,spriteMosaic:null,profiler:null,renderingOptions:null,requestRender:null,allowDelayedRender:!1,deltaTime:-1,timeline:null,time:0,blendMode:null,dataUploadCounter:0,effects:null,inFadeTransition:!1,requireFBO:!1,highlightGradient:null,stencilSymbols:!0,is3D:!0,backgroundColor:null,animationsEnabled:!0},this._backgroundTile=_([0,0,0]),this._backgroundTileTilingScheme=null,this._heading=0,this._declutteredForHeading=new WeakMap}dispose(){this._backgroundTile.destroy(),this._backgroundTileTilingScheme=null,this._renderParams=null}updateViewRenderParameters(n,a,o,d,h,u,g,m,p,_){const T=this._getBackgroundTile(a,o,h,u),f=this._renderParams;f.context=n,f.painter=d,f.glyphMosaic=d.glyphMosaic,f.spriteMosaic=d.spriteMosaic,f.pixelRatio=p*_;const y=h.getScale(a[0]),b=c*g*y/m,S=f.state,w=m/_;S.size[0]=w,S.size[1]=w,S.pixelRatio=_,S.rotation=(360-this._heading)%360;const k=2/w;e(S.displayViewMat3,k,0,0,0,-k,0,-1,1,1);const M=b/k,R=T.width/T.rangeX*T.resolution;S.resolution=R/M;const v=t(S.displayMat3),P=t(S.viewMat3),x=r(this._heading);return i(v,v,[w/2,w/2]),l(v,v,x),i(v,v,[-w/2,-w/2]),s(v,S.displayViewMat3,v),i(P,P,[w/2,w/2]),l(P,P,-x),i(P,P,[-w/2,-w/2]),f}updateTileInfoRenderParameters(e,t,i,l,s,n,r,a){const o=this._getBackgroundTile(e,t,i,l),d=this._renderParams,c=this._getScreenTranslation(e,i,s,n,r,a),h=u(l,o),m=d.normalizedTileView,p=1/(d.state.resolution*g(l));return d.displayLevel=this._getLevel(e,i),d.requiredLevel=d.displayLevel,d.tilingScheme=l,m.origin[0]=h[0]-c[0]/p,m.origin[1]=h[1]-c[1]/p,m.worldWrapId[0]=o.key.world,m.worldWrapId[1]=0,m.unitsToPixels=p,d}renderBackground(e,t,i,l,s,n,r){const a=this._getBackgroundTile(t,i,n,r);this._attachTile(e,a),this._renderParams.stencilSymbols=!1,l.drawBackground(this._renderParams,a,s)}renderContent(e,t,i,l,s){this._declutter(t),i.forAll(({sourceLayerInfo:{data:e}})=>this._declutter(e));const n=i.length>0;n&&this._stencilSymbols(e,t,i,l,s);let r=1;t.stencilRef=n?r:0,e.setStencilFunction(514,t.stencilRef,255),this._render(e,t,l,s),i.forAll(({sourceLayerInfo:{data:t}})=>{t.stencilRef=++r,this._renderSymbols(e,t,l,s)})}_stencilSymbols(e,t,i,l,s){let n=1;t.stencilRef=n,e.setDepthTestEnabled(!1),e.setDepthWriteEnabled(!1),e.setStencilTestEnabled(!0),e.setBlendingEnabled(!1),e.setColorMask(!1,!1,!1,!1),e.setStencilOp(7680,7680,7681),e.setStencilWriteMask(255),e.setStencilFunction(519,t.stencilRef,255),this._stencilTileSymbols(e,t,l,s),i.forAll(({sourceLayerInfo:{data:t}})=>{t.stencilRef=++n,e.setStencilFunction(519,t.stencilRef,255),this._stencilTileSymbols(e,t,l,s)}),e.setStencilWriteMask(0),e.setBlendingEnabled(!0),e.setDepthTestEnabled(!0),e.setColorMask(!0,!0,!0,!0)}_renderSymbols(e,t,i,l){e.setStencilFunction(514,t.stencilRef,255),this._render(e,t,i,l,3)}_render(e,t,i,l,s){this._attachTile(e,t),this._renderParams.stencilSymbols=!1,i.drawTile(this._renderParams,t,l,s)}_stencilTileSymbols(e,t,i,l){this._attachTile(e,t),this._renderParams.stencilSymbols=!0,t.triangleCount=0,i.drawSymbols(this._renderParams,t,l)}_attachTile(e,t){"type"in t&&"vector-tile"===t.type&&!t.stage&&t.attachWithContext(e)}_getScreenTranslation(e,t,i,l,s,n){const r=t.getScale(e[0]),[a,o]=t.getOffset(e,i*r),d=2/(s/n);return[(-1-a-l[0]*i*2+1)/d,(1-(1+o+(1-l[1])*i*2-2))/d]}_getBackgroundTile(e,t,i,l){if(t)return t;const[s,n,r]=i.getLevelRowColumn(e),a=this._backgroundTile.key;return this._backgroundTileTilingScheme===l&&a.level===s&&a.row===n&&a.col===r||(this._backgroundTile.destroy(),this._backgroundTile=_([s,n,r]),this._backgroundTileTilingScheme=l),this._backgroundTile}_getLevel(e,t){return e[0]-t.getLevelShift(e[0])}updateHeading(e){this._heading=e}_declutter(e){this._declutteredForHeading.get(e)!==this._heading&&(h(e,(360-this._heading)%360),this._declutteredForHeading.set(e,this._heading))}}class f{constructor(){this.size=[0,0],this.pixelRatio=1,this.rotation=0,this.displayMat3=n(),this.displayViewMat3=n(),this.viewMat3=n(),this.transform=null,this.inverseTransform=null,this.viewMat2d=null,this.id=0,this.extent=null,this.center=[0,0],this.scale=1,this.resolution=0,this.worldScreenWidth=0,this.spatialReference=null,this.viewpoint=null,this.getScreenTransform=null,this.toMap=null,this.toScreen=null,this.clone=null,this.copy=null,this.toJSON=null}}export{T as VectorTileRendererHelper3D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/has.js";import{estimateNumberMemory as t}from"../../../../core/memoryEstimations.js";import{List as e}from"./cpuMapped/FreeList.js";import{isHittest as n}from"./shaderGraph/techniques/featureTechniqueUtils.js";import{PrimitiveType as i,DataType as s}from"../../../webgl/enums.js";function a(t,e){return t<<16|255&e}function r(t){return 255&t}function d(t,e){return e?e.get(t.instanceId)??t.techniqueRef.symbologyPlane:t.techniqueRef.symbologyPlane}class h{constructor(t,e,n,i,s){this.instance=t,this.materialKey=e,this.target=n,this.start=i,this.count=s}get textureKey(){return r(this.materialKey)}get indexEnd(){return this.start+this.count}extend(t){this.count+=t}render(t){this.instance.techniqueRef.render(t,this)}getStencilReference(){return this.target.stencilRef}getAttributePrecisionPackFactors(){const t=this.instance.instanceId;return this.target.getMesh(t).getAttributePrecisionPackFactors()}draw(t,e){n(t)?this.drawCompute(t.context,e):this.drawGeometry(t.context,e)}drawCompute(t,e){const n=this.instance.instanceId,a=this.target.getMesh(n).getComputeVAO(t,e),r=this.start*Uint32Array.BYTES_PER_ELEMENT/3;t.bindVAO(a,e.locations),t.drawElements(i.POINTS,this.count/3,s.UNSIGNED_INT,r),t.bindVAO(null)}drawGeometry(t,e){const n=this.instance.instanceId,a=this.target.getMesh(n).getGeometryVAO(t,e),r=this.start*Uint32Array.BYTES_PER_ELEMENT;t.bindVAO(a,e.locations),t.drawElements(i.TRIANGLES,this.count,s.UNSIGNED_INT,r),t.bindVAO(null)}}class o{constructor(){this._length=0,this._minOrderedLength=0,this._materialKeys=new Set}static fromDisplayEntities(t,e,n,i){const s=new o,r=n.getInstanceOrder();for(const d of t.values())for(const t of d.records){const d=n.getInstance(t.instanceId),h=a(d.instanceId,t.textureKey);s.addRecord(d,h,t.indexStart,t.indexCount,t.vertexStart,t.vertexCount,e,i,r)}return s}get length(){return this._length}get minOrderedLength(){return this._minOrderedLength}get minUnorderedLength(){return this._materialKeys.size}get usedMemory(){return this._length?5*this._length*t:0}render(t,e){const{drawPhase:n}=t;for(const i of this.infos()){const s=i.instance.techniqueRef;s.drawPhase&n&&(null==e||s.type===e)&&i.render(t)}}addRecord(t,n,i,s,a,r,o,l,c){let u=i,_=s;if(_||(u=a,_=r),!_)return;if(null==this._head){const i=new h(t,n,o,u,_);return this._head=new e(i),this._tail=this._head,this._length++,void this._minOrderedLength++}if(1===l)return this._insert(t,n,o,u,_,this._tail,null);let g=null,m=this._head;const f=t.instanceId,y=d(t,c);if(2===l&&(2===y||3===y))return this._insert(t,n,o,u,_,this._tail,null);for(;m;){const e=m.data.instance,i=e.instanceId,s=d(e,c),a=g?.data.instance.instanceId;if(y<s||f===a&&f!==i)return this._insert(t,n,o,u,_,g,m);g=m,m=m.next}this._insert(t,n,o,u,_,g,null)}*infos(){if(null!=this._head)for(const t of this._head.values())yield t}_insert(t,n,i,s,a,r,d){if(null==r&&null==d){const r=new h(t,n,i,s,a);return this._head=new e(r),this._tail=this._head,this._length++,void this._minOrderedLength++}return n!==this._tail.data.materialKey&&this._minOrderedLength++,this._materialKeys.add(n),null==r&&null!=d?this._insertAtHead(t,n,i,s,a,d):null!=r&&null==d?this._insertAtEnd(t,n,i,s,a,r):null!=r&&null!=d?this._insertAtMiddle(t,n,i,s,a,r,d):void 0}_insertAtHead(t,n,i,s,a,r){const d=s+a;if(n===r.data.materialKey&&i===r.data.target&&d===r.data.start)r.data.start=s,r.data.count+=a;else{const d=new h(t,n,i,s,a);this._head=new e(d),this._head.next=r,this._length++}}_insertAtEnd(t,n,i,s,a,r){if(r.data.materialKey===n&&r.data.indexEnd===s)r.data.count+=a;else{const d=new h(t,n,i,s,a);this._tail=new e(d),r.next=this._tail,this._length++}}_insertAtMiddle(t,n,i,s,a,r,d){const o=s+a;if(r.data.materialKey===n&&r.data.target===i&&r.data.indexEnd===s)r.data.count+=a,r.data.materialKey===d.data.materialKey&&r.data.target===d.data.target&&r.data.indexEnd===d.data.start&&(r.data.count+=d.data.count,r.next=d.next,this._length--);else if(n===d.data.materialKey&&i===d.data.target&&o===d.data.start)d.data.start=s,d.data.count+=a;else{const o=new h(t,n,i,s,a),l=new e(o);r.next=l,l.next=d,this._length++}}}export{o as DisplayList,h as DisplayListInfo};
2
+ import"../../../../core/has.js";import{estimateNumberMemory as t}from"../../../../core/memoryEstimations.js";import{List as e}from"./cpuMapped/FreeList.js";import{isHittest as n}from"./shaderGraph/techniques/featureTechniqueUtils.js";import{PrimitiveType as i,DataType as s}from"../../../webgl/enums.js";function a(t,e){return t<<16|255&e}function r(t){return 255&t}function d(t,e){return e?e.get(t.instanceId)??t.techniqueRef.symbologyPlane:t.techniqueRef.symbologyPlane}class h{constructor(t,e,n,i,s){this.instance=t,this.materialKey=e,this.target=n,this.start=i,this.count=s}get textureKey(){return r(this.materialKey)}get indexEnd(){return this.start+this.count}extend(t){this.count+=t}render(t){const e=this.instance.techniqueRef;this.target.bindTile(t.context,t.tilingScheme),e.render(t,this)}getStencilReference(){return this.target.stencilRef}getAttributePrecisionPackFactors(){const t=this.instance.instanceId;return this.target.getMesh(t).getAttributePrecisionPackFactors()}draw(t,e){n(t)?this.drawCompute(t.context,e):this.drawGeometry(t.context,e)}drawCompute(t,e){const n=this.instance.instanceId,a=this.target.getMesh(n).getComputeVAO(t,e),r=this.start*Uint32Array.BYTES_PER_ELEMENT/3;t.bindVAO(a,e.locations),t.drawElements(i.POINTS,this.count/3,s.UNSIGNED_INT,r),t.bindVAO(null)}drawGeometry(t,e){const n=this.instance.instanceId,a=this.target.getMesh(n).getGeometryVAO(t,e),r=this.start*Uint32Array.BYTES_PER_ELEMENT;t.bindVAO(a,e.locations),t.drawElements(i.TRIANGLES,this.count,s.UNSIGNED_INT,r),t.bindVAO(null)}}class o{constructor(){this._length=0,this._minOrderedLength=0,this._materialKeys=new Set}static fromDisplayEntities(t,e,n,i){const s=new o,r=n.getInstanceOrder();for(const d of t.values())for(const t of d.records){const d=n.getInstance(t.instanceId),h=a(d.instanceId,t.textureKey);s.addRecord(d,h,t.indexStart,t.indexCount,t.vertexStart,t.vertexCount,e,i,r)}return s}get length(){return this._length}get minOrderedLength(){return this._minOrderedLength}get minUnorderedLength(){return this._materialKeys.size}get usedMemory(){return this._length?5*this._length*t:0}render(t,e){const{drawPhase:n}=t;for(const i of this.infos()){const s=i.instance.techniqueRef;s.drawPhase&n&&(null==e||s.type===e)&&i.render(t)}}addRecord(t,n,i,s,a,r,o,l,c){let u=i,_=s;if(_||(u=a,_=r),!_)return;if(null==this._head){const i=new h(t,n,o,u,_);return this._head=new e(i),this._tail=this._head,this._length++,void this._minOrderedLength++}if(1===l)return this._insert(t,n,o,u,_,this._tail,null);let g=null,m=this._head;const f=t.instanceId,y=d(t,c);if(2===l&&(2===y||3===y))return this._insert(t,n,o,u,_,this._tail,null);for(;m;){const e=m.data.instance,i=e.instanceId,s=d(e,c),a=g?.data.instance.instanceId;if(y<s||f===a&&f!==i)return this._insert(t,n,o,u,_,g,m);g=m,m=m.next}this._insert(t,n,o,u,_,g,null)}*infos(){if(null!=this._head)for(const t of this._head.values())yield t}_insert(t,n,i,s,a,r,d){if(null==r&&null==d){const r=new h(t,n,i,s,a);return this._head=new e(r),this._tail=this._head,this._length++,void this._minOrderedLength++}return n!==this._tail.data.materialKey&&this._minOrderedLength++,this._materialKeys.add(n),null==r&&null!=d?this._insertAtHead(t,n,i,s,a,d):null!=r&&null==d?this._insertAtEnd(t,n,i,s,a,r):null!=r&&null!=d?this._insertAtMiddle(t,n,i,s,a,r,d):void 0}_insertAtHead(t,n,i,s,a,r){const d=s+a;if(n===r.data.materialKey&&i===r.data.target&&d===r.data.start)r.data.start=s,r.data.count+=a;else{const d=new h(t,n,i,s,a);this._head=new e(d),this._head.next=r,this._length++}}_insertAtEnd(t,n,i,s,a,r){if(r.data.materialKey===n&&r.data.indexEnd===s)r.data.count+=a;else{const d=new h(t,n,i,s,a);this._tail=new e(d),r.next=this._tail,this._length++}}_insertAtMiddle(t,n,i,s,a,r,d){const o=s+a;if(r.data.materialKey===n&&r.data.target===i&&r.data.indexEnd===s)r.data.count+=a,r.data.materialKey===d.data.materialKey&&r.data.target===d.data.target&&r.data.indexEnd===d.data.start&&(r.data.count+=d.data.count,r.next=d.next,this._length--);else if(n===d.data.materialKey&&i===d.data.target&&o===d.data.start)d.data.start=s,d.data.count+=a;else{const o=new h(t,n,i,s,a),l=new e(o);r.next=l,l.next=d,this._length++}}}export{o as DisplayList,h as DisplayListInfo};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/has.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{RenderingDevice as t}from"./RenderingDevice.js";import{TextureManager as s}from"./TextureManager.js";import{TextureUploadManager as i}from"./TextureUploadManager.js";import{BlendEffect as r}from"./effects/BlendEffect.js";import{FeatureEffect as n}from"./effects/FeatureEffect.js";import o from"./effects/HighlightEffect.js";import{HittestEffect as h}from"./effects/HittestEffect.js";import{EffectManager as f}from"./effects/post-processing/EffectManager.js";import{SimpleMesh as a}from"./meshing/SimpleMesh.js";import{BitBlitTechnique as l}from"./shaderGraph/techniques/utility/BitBlitTechnique.js";import{WorldExtentClipTechnique as c}from"./shaderGraph/techniques/utility/WorldExtentClipTechnique.js";import{SizedDepthStencilFormat as d}from"../../../webgl/enums.js";import{DisposableFramebufferObject as u}from"../../../webgl/FramebufferObject.js";import{Renderbuffer as p}from"../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as b}from"../../../webgl/RenderbufferDescriptor.js";import{TextureDescriptor as g}from"../../../webgl/TextureDescriptor.js";class _{constructor(e,d){this.context=e,this._blitTechnique=new l,this._worldExtentClipTechnique=new c,this._lastWidth=null,this._lastHeight=null,this._blendEffect=new r,this._stencilBuf=null,this._prevBeforeLayerFBOStack=[],this._fboPool=[],this.effects={highlight:new o,hittest:new h,insideEffect:new n("inside"),outsideEffect:new n("outside")},this.textureManager=new s(d),this.textureUploadManager=new i(d),this._effectsManager=new f,this._quadMesh=a.fromVertexStream(e,[0,0,1,0,0,1,1,1]),this._renderingDevice=new t}dispose(){if(this.textureManager.dispose(),this.textureUploadManager.destroy(),this._blitTechnique.shutdown(),this._worldExtentClipTechnique.shutdown(),this._quadMesh=e(this._quadMesh),this._fbos){let e;for(e in this._fbos)this._fbos[e]&&this._fbos[e].dispose()}for(const e of this._fboPool)e.dispose();if(this._fboPool.length=0,this.effects){let e;for(e in this.effects)this.effects[e]&&this.effects[e].dispose()}this._effectsManager.dispose(),this._blendEffect.dispose(this.context),this._renderingDevice.dispose()}get quadMesh(){return this._quadMesh}getFbos(){if(!this._fbos)throw new Error("InternalError: Painter FBOs not initialized");return this._fbos}acquireFbo(e,t){let s;if(this._fboPool.length>0)s=this._fboPool.pop();else{const i=new g(e,t);i.samplingMode=9728,i.wrapMode=33071,s=new u(this.context,i,this._stencilBuf)}return s.width===e&&s.height===t||s.resize(e,t),s}releaseFbo(e){this._fboPool.push(e)}getSharedStencilBuffer(){return this._stencilBuf}beforeRenderPhases(e,t,s){const{context:i}=e;this._worldExtentClipTechnique.render(e,{backgroundColor:t,padding:s});const{width:r,height:n}=i.getViewport();if(this.updateFBOs(r,n),this._prevFBO=i.boundFramebuffer,i.bindFramebuffer(this.getFbos().output),i.setColorMask(!0,!0,!0,!0),null!=t){const{r:e,g:s,b:r,a:n}=t;i.setClearColor(n*e/255,n*s/255,n*r/255,n)}else i.setClearColor(0,0,0,0);i.setDepthWriteEnabled(!0),i.setClearDepth(1),i.clear(16640),i.setDepthWriteEnabled(!1)}afterRenderPhases(e){const{context:t}=e;t.bindFramebuffer(this._prevFBO),this._blitTechnique.render(e,{texture:this.getFbos().output.colorTexture,samplingMode:9728,opacity:1,clipToVisibleRegion:!0}),this._renderingDevice.setPipelineStateNeedsUpdate(!0)}beforeRenderLayer(e,t,s){const{context:i,blendMode:r,effects:n,drawPhase:o,requireFBO:h}=e;if(i.setClearColor(0,0,0,0),h||m(o,r,n,s)){const e=i.boundFramebuffer;this._prevBeforeLayerFBOStack.push(e);const{width:t,height:s}=i.getViewport(),r=this.acquireFbo(t,s);i.bindFramebuffer(r),i.setColorMask(!0,!0,!0,!0),i.setClearColor(0,0,0,0),i.setDepthWriteEnabled(!0),i.setClearDepth(1),i.clear(16640),i.setDepthWriteEnabled(!1)}i.setDepthWriteEnabled(!1),i.setDepthTestEnabled(!1),i.setStencilTestEnabled(!0),i.setClearStencil(t),i.setStencilWriteMask(255),i.clear(1024)}afterRenderLayer(e,t){const{context:s,blendMode:i,effects:r,requireFBO:n,drawPhase:o}=e;if(n||m(o,i,r,t)){const n=s.boundFramebuffer;if(null==n)return;null!=r&&r.length>0&&1===o&&(s.setColorMask(!0,!0,!0,!0),this._applyEffects(e,r,n)),s.bindFramebuffer(this._prevBeforeLayerFBOStack.pop()),s.setStencilTestEnabled(!1),s.setStencilWriteMask(0),s.setBlendingEnabled(!0),s.setBlendFunctionSeparate(1,771,1,771),s.setColorMask(!0,!0,!0,!0);const h=null==i||16===o||2===o||128===o?"normal":i;this._blendEffect.draw(e,n.colorTexture,9728,h,t),this.releaseFbo(n)}}blitTexture(e,t,s,i=1){this._blitTechnique.render(e,{texture:t,samplingMode:s,opacity:i}),this._renderingDevice.setPipelineStateNeedsUpdate(!0)}getPostProcessingEffects(e){return this._effectsManager.getPostProcessingEffects(e)}updateFBOs(e,t){if(e!==this._lastWidth||t!==this._lastHeight){if(this._lastWidth=e,this._lastHeight=t,this._fbos){let s;for(s in this._fbos)this._fbos[s].resize(e,t);return}const s=new g(e,t);s.samplingMode=9728,s.wrapMode=33071;const i=new b(d.DEPTH24_STENCIL8,e,t);this._stencilBuf=new p(this.context,i),this._fbos={output:new u(this.context,s,this._stencilBuf),effect0:new u(this.context,s,this._stencilBuf)}}}_applyEffects(e,t,s){const{context:i}=e,r=this._effectsManager.getPostProcessingEffects(t);for(const{postProcessingTechnique:n,effect:o}of r)i.bindFramebuffer(s),n.render(e,{layerFBO:s,effect:o});this._renderingDevice.setPipelineStateNeedsUpdate(!0)}setShader(e){return this._renderingDevice.setShader(e)}clearShaderCache(){this._renderingDevice.clearShaderCache()}getProgramCache(){return this._renderingDevice.getProgramCache()}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,s){return this._renderingDevice.submitDraw(e,t,s)}submitDrawMesh(e,t,s,i){this._renderingDevice.submitDrawMesh(e,t,s,i)}submitDrawMeshUntyped(e,t,s,i){this._renderingDevice.submitDrawMeshUntyped(e,t,s,i)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}}function m(e,t,s,i){return 4!==e&&2!==e&&16!==e&&128!==e&&(1!==i||null!=t&&"normal"!==t||null!=s&&s.length>0)}export{_ as default};
2
+ import"../../../../core/has.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{RenderingDevice as t}from"./RenderingDevice.js";import{TextureManager as i}from"./TextureManager.js";import{TextureUploadManager as s}from"./TextureUploadManager.js";import{BlendEffect as r}from"./effects/BlendEffect.js";import{FeatureEffect as n}from"./effects/FeatureEffect.js";import o from"./effects/HighlightEffect.js";import{HittestEffect as f}from"./effects/HittestEffect.js";import{EffectManager as h}from"./effects/post-processing/EffectManager.js";import{SimpleMesh as a}from"./meshing/SimpleMesh.js";import{updateUniformBufferObject as l}from"./shaderGraph/uniformBufferUtils.js";import{viewInfoUniformBlockBinding as c,getViewUniforms as d}from"./shaderGraph/techniques/shaders/ViewInfo.js";import{BitBlitTechnique as u}from"./shaderGraph/techniques/utility/BitBlitTechnique.js";import{WorldExtentClipTechnique as p}from"./shaderGraph/techniques/utility/WorldExtentClipTechnique.js";import{SizedDepthStencilFormat as b}from"../../../webgl/enums.js";import{DisposableFramebufferObject as g}from"../../../webgl/FramebufferObject.js";import{Renderbuffer as m}from"../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as _}from"../../../webgl/RenderbufferDescriptor.js";import{TextureDescriptor as w}from"../../../webgl/TextureDescriptor.js";import{UniformBufferObject as M}from"../../../webgl/UniformBufferObject.js";class B{constructor(e,l){this.context=e,this._blitTechnique=new u,this._worldExtentClipTechnique=new p,this._lastWidth=null,this._lastHeight=null,this._blendEffect=new r,this._stencilBuf=null,this._prevBeforeLayerFBOStack=[],this._fboPool=[],this.effects={highlight:new o,hittest:new f,insideEffect:new n("inside"),outsideEffect:new n("outside")},this.textureManager=new i(l),this.textureUploadManager=new s(l),this._effectsManager=new h,this._quadMesh=a.fromVertexStream(e,[0,0,1,0,0,1,1,1]),this._renderingDevice=new t,this._viewInfoUniformBufferObject=new M(e,c.descriptor)}dispose(){if(this.textureManager.dispose(),this.textureUploadManager.destroy(),this._blitTechnique.shutdown(),this._worldExtentClipTechnique.shutdown(),this._quadMesh=e(this._quadMesh),this._fbos){let e;for(e in this._fbos)this._fbos[e]&&this._fbos[e].dispose()}for(const e of this._fboPool)e.dispose();if(this._fboPool.length=0,this.effects){let e;for(e in this.effects)this.effects[e]&&this.effects[e].dispose()}this._effectsManager.dispose(),this._blendEffect.dispose(this.context),this._viewInfoUniformBufferObject.dispose(),this._renderingDevice.dispose()}get quadMesh(){return this._quadMesh}getFbos(){if(!this._fbos)throw new Error("InternalError: Painter FBOs not initialized");return this._fbos}acquireFbo(e,t){let i;if(this._fboPool.length>0)i=this._fboPool.pop();else{const s=new w(e,t);s.samplingMode=9728,s.wrapMode=33071,i=new g(this.context,s,this._stencilBuf)}return i.width===e&&i.height===t||i.resize(e,t),i}releaseFbo(e){this._fboPool.push(e)}getSharedStencilBuffer(){return this._stencilBuf}beforeRenderPhases(e,t,i){const{context:s}=e;l(this._viewInfoUniformBufferObject,c,d(e)),s.bindUBO(c.bindingPoint,this._viewInfoUniformBufferObject),this._worldExtentClipTechnique.render(e,{backgroundColor:t,padding:i});const{width:r,height:n}=s.getViewport();if(this.updateFBOs(r,n),this._prevFBO=s.boundFramebuffer,s.bindFramebuffer(this.getFbos().output),s.setColorMask(!0,!0,!0,!0),null!=t){const{r:e,g:i,b:r,a:n}=t;s.setClearColor(n*e/255,n*i/255,n*r/255,n)}else s.setClearColor(0,0,0,0);s.setDepthWriteEnabled(!0),s.setClearDepth(1),s.clear(16640),s.setDepthWriteEnabled(!1)}afterRenderPhases(e){const{context:t}=e;t.bindFramebuffer(this._prevFBO),this._blitTechnique.render(e,{texture:this.getFbos().output.colorTexture,samplingMode:9728,opacity:1,clipToVisibleRegion:!0}),this._renderingDevice.setPipelineStateNeedsUpdate(!0)}beforeRenderLayer(e,t,i){const{context:s,blendMode:r,effects:n,drawPhase:o,requireFBO:f}=e;if(s.setClearColor(0,0,0,0),f||D(o,r,n,i)){const e=s.boundFramebuffer;this._prevBeforeLayerFBOStack.push(e);const{width:t,height:i}=s.getViewport(),r=this.acquireFbo(t,i);s.bindFramebuffer(r),s.setColorMask(!0,!0,!0,!0),s.setClearColor(0,0,0,0),s.setDepthWriteEnabled(!0),s.setClearDepth(1),s.clear(16640),s.setDepthWriteEnabled(!1)}s.setDepthWriteEnabled(!1),s.setDepthTestEnabled(!1),s.setStencilTestEnabled(!0),s.setClearStencil(t),s.setStencilWriteMask(255),s.clear(1024)}afterRenderLayer(e,t){const{context:i,blendMode:s,effects:r,requireFBO:n,drawPhase:o}=e;if(n||D(o,s,r,t)){const n=i.boundFramebuffer;if(null==n)return;null!=r&&r.length>0&&1===o&&(i.setColorMask(!0,!0,!0,!0),this._applyEffects(e,r,n)),i.bindFramebuffer(this._prevBeforeLayerFBOStack.pop()),i.setStencilTestEnabled(!1),i.setStencilWriteMask(0),i.setBlendingEnabled(!0),i.setBlendFunctionSeparate(1,771,1,771),i.setColorMask(!0,!0,!0,!0);const f=null==s||16===o||2===o||128===o?"normal":s;this._blendEffect.draw(e,n.colorTexture,9728,f,t),this.releaseFbo(n)}}blitTexture(e,t,i,s=1){this._blitTechnique.render(e,{texture:t,samplingMode:i,opacity:s}),this._renderingDevice.setPipelineStateNeedsUpdate(!0)}getPostProcessingEffects(e){return this._effectsManager.getPostProcessingEffects(e)}updateFBOs(e,t){if(e!==this._lastWidth||t!==this._lastHeight){if(this._lastWidth=e,this._lastHeight=t,this._fbos){let i;for(i in this._fbos)this._fbos[i].resize(e,t);return}const i=new w(e,t);i.samplingMode=9728,i.wrapMode=33071;const s=new _(b.DEPTH24_STENCIL8,e,t);this._stencilBuf=new m(this.context,s),this._fbos={output:new g(this.context,i,this._stencilBuf),effect0:new g(this.context,i,this._stencilBuf)}}}_applyEffects(e,t,i){const{context:s}=e,r=this._effectsManager.getPostProcessingEffects(t);for(const{postProcessingTechnique:n,effect:o}of r)s.bindFramebuffer(i),n.render(e,{layerFBO:i,effect:o});this._renderingDevice.setPipelineStateNeedsUpdate(!0)}setShader(e){return this._renderingDevice.setShader(e)}clearShaderCache(){this._renderingDevice.clearShaderCache()}getProgramCache(){return this._renderingDevice.getProgramCache()}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,i){return this._renderingDevice.submitDraw(e,t,i)}submitDrawMesh(e,t,i,s){this._renderingDevice.submitDrawMesh(e,t,i,s)}submitDrawMeshUntyped(e,t,i,s){this._renderingDevice.submitDrawMeshUntyped(e,t,i,s)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}}function D(e,t,i,s){return 4!==e&&2!==e&&16!==e&&128!==e&&(1!==s||null!=t&&"normal"!==t||null!=i&&i.length>0)}export{B as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/has.js";import"../../../../core/Logger.js";import{TechniqueProgramCache as e}from"./shaderGraph/techniques/TechniqueProgramCache.js";class t{constructor(){this._currentPipelineStateNeedsUpdate=!1,this._programCache=new e}dispose(){this._programCache.destroy()}clearShaderCache(){this._programCache.destroy(),this._programCache=new e}setShader(e){return this._shaderState={shader:e.shader,uniforms:e.uniforms,textures:e.textures,defines:e.defines,optionalAttributes:e.optionalAttributes,useComputeBuffer:e.useComputeBuffer??!1},this._shaderState}setPipelineState(e){e!==this._currentPipelineState&&(this._currentPipelineState=e,this._currentPipelineStateNeedsUpdate=!0)}updatePipelineState(e){this._currentPipelineStateNeedsUpdate&&(this._currentPipelineStateNeedsUpdate=!1,this._updatePipelineState(e))}getPipelineState(){return this._currentPipelineState}setStencilRef(e,t){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{stencil:s}=this._currentPipelineState;if(s){const{test:r}=s;if(r){const{compare:s,mask:i}=r;if(null==t)throw new Error("InternalError: Stencil reference expected for target but not defined");e.setStencilFunctionSeparate(1032,s,t,i)}}}setPipelineStateNeedsUpdate(e){this._currentPipelineStateNeedsUpdate=e}getShaderState(){return this._shaderState}getProgramCache(){return this._programCache}submitDraw(e,t,s){let r=s?.stencilRef;if(!this._shaderState)return null;const{shader:i,uniforms:n,textures:a,defines:l,optionalAttributes:o}=this._shaderState,c=e.context,d=t.getAttributePrecisionPackFactors(),p=this._programCache.getProgram(i,d,n,a??{},l??{},o??{});if(p.setUniforms(n),p.setTextures(a),p.bind(c),this.updatePipelineState(c),null==r){const e=t.getStencilReference();null!=e&&(r=e)}return null!=r&&this.setStencilRef(c,r),t.draw(e,i.locationInfo),p.cleanupTemporaryTextures(),{vertexShader:p.vertexShader,fragmentShader:p.fragmentShader}}submitDrawMesh(e,t,s,r){this.submitDrawMeshUntyped(e,t,s,r)}submitDrawMeshUntyped(e,t,s,r){const i=r?.parts,n=r?.stencilRef,{precisionFactors:a,materialKey:l}=t,{shader:o,uniforms:c,textures:d,defines:p,optionalAttributes:h}=this.setShader(t),u=this._programCache.getProgram(o,a||{},c,d??{},p??{},h??{},l);if(u.setUniforms(c),u.setTextures(d),u.bind(e),this.updatePipelineState(e),this.setStencilRef(e,n),i)for(const S of i)s.bind(e,t.shader.locationInfo,S),s.draw(e);else for(let S=0;S<s.parts.length;S++)s.bind(e,t.shader.locationInfo,S),s.draw(e);s.unbind(e),u.cleanupTemporaryTextures()}_updatePipelineState(e){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{color:t,depth:s,stencil:r}=this._currentPipelineState;if(t){const{blendMode:s,write:r}=t;switch(e.setColorMask(...r),e.setBlendingEnabled("none"!==s),e.setBlendEquation(32774),s){case"composite":e.setBlendFunctionSeparate(1,771,1,771);break;case"additive":e.setBlendFunctionSeparate(1,1,1,1);break;case"custom":{const{blendParameters:s,blendEquation:r}=t,{dstAlpha:i,dstRGB:n,srcAlpha:a,srcRGB:l}=s;e.setBlendEquation(r),e.setBlendFunctionSeparate(l,n,a,i);break}case"delete":e.setBlendEquation(32779),e.setBlendFunctionSeparate(1,771,1,771);break;case"none":e.setBlendingEnabled(!1)}}else e.setColorMask(!1,!1,!1,!1);if(s){const{test:t,write:r}=s;r?(e.setDepthWriteEnabled(!0),e.setDepthRange(r.zNear,r.zFar)):e.setDepthWriteEnabled(!1),t?(e.setDepthTestEnabled(!0),e.setDepthFunction(t)):e.setDepthTestEnabled(!1)}else e.setDepthTestEnabled(!1),e.setDepthWriteEnabled(!1);if(r){const{test:t,write:s}=r;if(t){const{op:s}=t;e.setStencilTestEnabled(!0),e.setStencilOpSeparate(1032,s.fail,s.zFail,s.zPass)}else e.setStencilTestEnabled(!1);if(s){const{mask:t}=s;e.setStencilWriteMask(t)}else e.setStencilWriteMask(0)}else e.setStencilTestEnabled(!1),e.setStencilWriteMask(0)}}export{t as RenderingDevice};
2
+ import"../../../../core/has.js";import"../../../../core/Logger.js";import{TechniqueProgramCache as e}from"./shaderGraph/techniques/TechniqueProgramCache.js";class t{constructor(){this._currentPipelineStateNeedsUpdate=!1,this._programCache=new e}dispose(){this._programCache.destroy()}clearShaderCache(){this._programCache.destroy(),this._programCache=new e}setShader(e){return this._shaderState={shader:e.shader,uniforms:e.uniforms,textures:e.textures,defines:e.defines,optionalAttributes:e.optionalAttributes,useComputeBuffer:e.useComputeBuffer??!1},this._shaderState}setPipelineState(e){e!==this._currentPipelineState&&(this._currentPipelineState=e,this._currentPipelineStateNeedsUpdate=!0)}updatePipelineState(e){this._currentPipelineStateNeedsUpdate&&(this._currentPipelineStateNeedsUpdate=!1,this._updatePipelineState(e))}getPipelineState(){return this._currentPipelineState}setStencilRef(e,t){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{stencil:s}=this._currentPipelineState;if(s){const{test:r}=s;if(r){const{compare:s,mask:i}=r;if(null==t)throw new Error("InternalError: Stencil reference expected for target but not defined");e.setStencilFunctionSeparate(1032,s,t,i)}}}setPipelineStateNeedsUpdate(e){this._currentPipelineStateNeedsUpdate=e}getShaderState(){return this._shaderState}getProgramCache(){return this._programCache}submitDraw(e,t,s){let r=s?.stencilRef;if(!this._shaderState)return null;const{shader:i,uniforms:n,textures:a,defines:l,optionalAttributes:o}=this._shaderState,c=e.context,d=t.getAttributePrecisionPackFactors(),p=a??{},h=this._programCache.getProgram(i,d,n,p,l??{},o??{});if(h.bind(c,n,p),this.updatePipelineState(c),null==r){const e=t.getStencilReference();null!=e&&(r=e)}return null!=r&&this.setStencilRef(c,r),t.draw(e,i.locationInfo),h.cleanupTemporaryTextures(),{vertexShader:h.vertexShader,fragmentShader:h.fragmentShader}}submitDrawMesh(e,t,s,r){this.submitDrawMeshUntyped(e,t,s,r)}submitDrawMeshUntyped(e,t,s,r){const i=r?.parts,n=r?.stencilRef,{precisionFactors:a,materialKey:l}=t,{shader:o,uniforms:c,textures:d,defines:p,optionalAttributes:h}=this.setShader(t),u=d??{},S=this._programCache.getProgram(o,a||{},c,u,p??{},h??{},l);if(S.bind(e,c,u),this.updatePipelineState(e),this.setStencilRef(e,n),i)for(const f of i)s.bind(e,t.shader.locationInfo,f),s.draw(e);else for(let f=0;f<s.parts.length;f++)s.bind(e,t.shader.locationInfo,f),s.draw(e);s.unbind(e),S.cleanupTemporaryTextures()}_updatePipelineState(e){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{color:t,depth:s,stencil:r}=this._currentPipelineState;if(t){const{blendMode:s,write:r}=t;switch(e.setColorMask(...r),e.setBlendingEnabled("none"!==s),e.setBlendEquation(32774),s){case"composite":e.setBlendFunctionSeparate(1,771,1,771);break;case"additive":e.setBlendFunctionSeparate(1,1,1,1);break;case"custom":{const{blendParameters:s,blendEquation:r}=t,{dstAlpha:i,dstRGB:n,srcAlpha:a,srcRGB:l}=s;e.setBlendEquation(r),e.setBlendFunctionSeparate(l,n,a,i);break}case"delete":e.setBlendEquation(32779),e.setBlendFunctionSeparate(1,771,1,771);break;case"none":e.setBlendingEnabled(!1)}}else e.setColorMask(!1,!1,!1,!1);if(s){const{test:t,write:r}=s;r?(e.setDepthWriteEnabled(!0),e.setDepthRange(r.zNear,r.zFar)):e.setDepthWriteEnabled(!1),t?(e.setDepthTestEnabled(!0),e.setDepthFunction(t)):e.setDepthTestEnabled(!1)}else e.setDepthTestEnabled(!1),e.setDepthWriteEnabled(!1);if(r){const{test:t,write:s}=r;if(t){const{op:s}=t;e.setStencilTestEnabled(!0),e.setStencilOpSeparate(1032,s.fail,s.zFail,s.zPass)}else e.setStencilTestEnabled(!1);if(s){const{mask:t}=s;e.setStencilWriteMask(t)}else e.setStencilWriteMask(0)}else e.setStencilTestEnabled(!1),e.setStencilWriteMask(0)}}export{t as RenderingDevice};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"../../../../core/has.js";import{createNormalizedTileView as e}from"./normalizedTileUtils.js";import i from"./WGLContainer.js";import{TileDebugInfoTechnique as t}from"./shaderGraph/techniques/tile/TileDebugInfoTechnique.js";import{TileStencilTechnique as n}from"./shaderGraph/techniques/tile/TileStencilTechnique.js";const l=(e,i)=>e.key.level-i.key.level!==0?e.key.level-i.key.level:e.key.row-i.key.row!==0?e.key.row-i.key.row:e.key.col-i.key.col;class r extends i{constructor(e){super(),this._tileStencilTechnique=new n,this._tileDebugInfoTechnique=new t,this.tilingScheme=e,this.sortFunction=l}get tilingScheme(){return this._tilingScheme}set tilingScheme(e){this._tilingScheme=e}renderChildren(e){this.setStencilReference(e),super.renderChildren(e);for(const i of this.getStencilTarget())this._tileStencilTechnique.render(e,i,this.getTileStencilOptions(i));if(has("esri-tiles-debug"))for(const i of this.children)this._tileDebugInfoTechnique.render(e,i)}getTileStencilOptions(e){return null}createRenderParams(i){const{state:t}=i,n=super.createRenderParams(i);return n.requiredLevel=this.tilingScheme.getClosestInfoForScale(t.scale).level,n.displayLevel=this.tilingScheme.scaleToZoom(t.scale),n.normalizedTileView=e(t,this.tilingScheme),n.tilingScheme=this.tilingScheme,n}onDetach(){super.onDetach(),this._tileStencilTechnique.shutdown(),this._tileDebugInfoTechnique.shutdown()}getStencilTarget(){return this.children}setStencilReference(e){let i=1;for(const t of this.children)t.stencilRef=i++}}export{r as default};
2
+ import has from"../../../../core/has.js";import{createNormalizedTileView as e}from"./normalizedTileUtils.js";import i from"./WGLContainer.js";import{updateUniformBufferObject as t}from"./shaderGraph/uniformBufferUtils.js";import{tileInfoUniformBlockBinding as n,getTileInfoUniforms as r}from"./shaderGraph/techniques/shaders/TileInfo.js";import{TileDebugInfoTechnique as s}from"./shaderGraph/techniques/tile/TileDebugInfoTechnique.js";import{TileStencilTechnique as l}from"./shaderGraph/techniques/tile/TileStencilTechnique.js";import{UniformBufferObject as o}from"../../../webgl/UniformBufferObject.js";const c=(e,i)=>e.key.level-i.key.level!==0?e.key.level-i.key.level:e.key.row-i.key.row!==0?e.key.row-i.key.row:e.key.col-i.key.col;class h extends i{constructor(e){super(),this._tileStencilTechnique=new l,this._tileDebugInfoTechnique=new s,this._tileInfoUniformBufferObject=null,this.tilingScheme=e,this.sortFunction=c}get tilingScheme(){return this._tilingScheme}set tilingScheme(e){this._tilingScheme=e}renderChildren(e){this._updateTileInfo(e),this.setStencilReference(e),super.renderChildren(e);for(const i of this.getStencilTarget())this._tileStencilTechnique.render(e,i,this.getTileStencilOptions(i));if(has("esri-tiles-debug"))for(const i of this.children)this._tileDebugInfoTechnique.render(e,i)}getTileStencilOptions(e){return null}createRenderParams(i){const{state:t}=i,n=super.createRenderParams(i);return n.requiredLevel=this.tilingScheme.getClosestInfoForScale(t.scale).level,n.displayLevel=this.tilingScheme.scaleToZoom(t.scale),n.normalizedTileView=e(t,this.tilingScheme),n.tilingScheme=this.tilingScheme,n}onDetach(){super.onDetach(),this._tileInfoUniformBufferObject?.dispose(),this._tileInfoUniformBufferObject=null,this._tileStencilTechnique.shutdown(),this._tileDebugInfoTechnique.shutdown()}_updateTileInfo(e){const{context:i}=e;this._tileInfoUniformBufferObject??=new o(i,n.descriptor);const s=this._tileInfoUniformBufferObject;t(s,n,r(e)),i.bindUBO(n.bindingPoint,s)}getStencilTarget(){return this.children}setStencilReference(e){let i=1;for(const t of this.children)t.stencilRef=i++}}export{h as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{set as t,multiply as e}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{DisplayObject as s}from"../DisplayObject.js";import i from"../../tiling/TileKey.js";class r extends s{constructor(t,e,s,r,o,n,h=o,d=n){super(),this.tileDebugInfoTexture=null,this.debugInfo={display:{length:0,minOrderedLength:0,minUnorderedLength:0,triangleCount:0},memory:{bytesUsed:0,bytesReserved:0}},this._destroyed=!1,this.key=new i(t),this.resolution=e,this.x=s,this.y=r,this.width=o,this.height=n,this.rangeX=h,this.rangeY=d}destroy(){super.destroy(),this.tileDebugInfoTexture&&(this.tileDebugInfoTexture.dispose(),this.tileDebugInfoTexture=null),this._destroyed=!0}get debugSlot(){let t=this;for(;t.parent!==this._stage;){if(!t.parent)return 0;t=t.parent}return this._stage.children.indexOf(t)}setTransform(s){const i=this.resolution/(s.resolution*s.pixelRatio),r=this.transforms.tileMat3,[o,n]=s.toScreenNoRotation([0,0],[this.x,this.y]),h=this.width/this.rangeX*i,d=this.height/this.rangeY*i;t(r,h,0,0,0,d,0,o,n,1),e(this.transforms.displayViewScreenMat3,s.displayViewMat3,r)}get destroyed(){return this._destroyed}}export{r as TiledDisplayObject};
2
+ import{set as e,multiply as t}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{DisplayObject as i}from"../DisplayObject.js";import{updateUniformBufferObject as s}from"./shaderGraph/uniformBufferUtils.js";import{tileUniformBlockBinding as r,getTileUniforms as o}from"./shaderGraph/techniques/shaders/Tile.js";import n from"../../tiling/TileKey.js";import{UniformBufferObject as h}from"../../../webgl/UniformBufferObject.js";class f extends i{constructor(e,t,i,s,r,o,h=r,f=o){super(),this.tileDebugInfoTexture=null,this.debugInfo={display:{length:0,minOrderedLength:0,minUnorderedLength:0,triangleCount:0},memory:{bytesUsed:0,bytesReserved:0}},this._destroyed=!1,this._tileUniformBufferObject=null,this.key=new n(e),this.resolution=t,this.x=i,this.y=s,this.width=r,this.height=o,this.rangeX=h,this.rangeY=f}destroy(){super.destroy(),this._disposeTileUniformBufferObject(),this.tileDebugInfoTexture&&(this.tileDebugInfoTexture.dispose(),this.tileDebugInfoTexture=null),this._destroyed=!0}get debugSlot(){let e=this;for(;e.parent!==this._stage;){if(!e.parent)return 0;e=e.parent}return this._stage.children.indexOf(e)}bindTile(e,t){let i=this._tileUniformBufferObject;null==i&&(i=new h(e,r.descriptor,35044),s(i,r,o(t,this)),this._tileUniformBufferObject=i),e.bindUBO(r.bindingPoint,i)}setTransform(i){const s=this.resolution/(i.resolution*i.pixelRatio),r=this.transforms.tileMat3,[o,n]=i.toScreenNoRotation([0,0],[this.x,this.y]),h=this.width/this.rangeX*s,f=this.height/this.rangeY*s;e(r,h,0,0,0,f,0,o,n,1),t(this.transforms.displayViewScreenMat3,i.displayViewMat3,r)}onDetach(){super.onDetach(),this._disposeTileUniformBufferObject()}get destroyed(){return this._destroyed}_disposeTileUniformBufferObject(){this._tileUniformBufferObject?.dispose(),this._tileUniformBufferObject=null}}export{f as TiledDisplayObject};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{instructions as t}from"./instructions.js";function n(t){return t instanceof i?t:"object"==typeof t&&"type"in t?c[t.type].hydrate(t):new o(t)}class i{constructor(t){this.inputs=t}encode(){const t=[];for(const n of this.inputs)t.push(...n.encode());return t.push(...this.instructions),t}}class o extends i{constructor(t){super([]),this.value=t}simplify(){return this}get instructions(){if(Array.isArray(this.value)){const[n,i,o,s]=this.value;return null!=s?t.vector4.encode([n,i||0,o||0,s]):t.vector3.encode([n,i||0,o||0])}return t.scalar.encode(this.value)}}class s extends i{constructor(t,n){super([n]),this._config=t,this._parent=n}static hydrate(t){return new s(t,n(t.parent))}simplify(){if(this._config.relativeTranslation||this._config.absoluteScale)return this;const t=this._parent.simplify();if(!(t instanceof o))return this;const[n,i,r,e]=t.value,c=this._config.translation.from[0],a=this._config.translation.from[1],f=this._config.rotation.from,h=this._config.scale.from;if(c===this._config.translation.to[0]&&a===this._config.translation.to[1]&&f===this._config.rotation.to&&h===this._config.scale.to){const t=r+f,s=e*h,u=Math.sin(r),l=Math.cos(r);return new o([l*e*c-u*e*a+n,u*e*c+l*e*a+i,t,s])}return new s(this._config,t)}get instructions(){return t.animatedTransform.encode(this._config)}}class r extends i{constructor(t,n){super([n]),this._config=t,this._parent=n}static hydrate(t){return new r(t,n(t.parent))}simplify(){const t=this._parent.simplify();if(!(t instanceof o))return this;const[n,i,s,e]=t.value,c=this._config.color.from[0],a=this._config.color.from[1],f=this._config.color.from[2];let h=this._config.color.from[3];const u=this._config.opacity.from;return c===this._config.color.to[0]&&a===this._config.color.to[1]&&f===this._config.color.to[2]&&h===this._config.color.to[3]&&u===this._config.opacity.to?(h*=u,new o([n*c,i*a,s*f,e*h])):new r(this._config,t)}get instructions(){return t.animatedColor.encode(this._config)}}class e extends i{constructor(t,n){super([n]),this._config=t,this._parent=n}static hydrate(t){return new e(t,n(t.parent))}simplify(){const t=this._parent.simplify();return t instanceof o?new e(this._config,t):this}get instructions(){return t.animatedShift.encode(this._config)}}const c={AnimatedTransform:s,AnimatedColor:r,AnimatedShift:e};export{i as AAnimationInfo,r as AnimatedColor,e as AnimatedShift,s as AnimatedTransform,o as Constant,n as hydrate};
2
+ import{instructions as t}from"./instructions.js";function i(t){return t instanceof n?t:"object"==typeof t&&"type"in t?c[t.type].hydrate(t):new o(t)}class n{constructor(t){this.inputs=t}encode(){const t=[];for(const i of this.inputs)t.push(...i.encode());return t.push(...this.instructions),t}}class o extends n{constructor(t){super([]),this.value=t}simplify(){return this}get instructions(){if(Array.isArray(this.value)){const[i,n,o,s]=this.value;return null!=s?t.vector4.encode([i,n||0,o||0,s]):t.vector3.encode([i,n||0,o||0])}return t.scalar.encode(this.value)}}class s extends n{constructor(t,i){super([i]),this._config=t,this._parent=i}static hydrate(t){return new s(t,i(t.parent))}simplify(){if(this._config.relativeTranslation||this._config.absoluteScale||this._config.selectGlobalRotation)return this;const t=this._parent.simplify();if(!(t instanceof o))return this;const[i,n,r,e]=t.value,c=this._config.translation.from[0],a=this._config.translation.from[1],f=this._config.rotation.from,h=this._config.scale.from;if(c===this._config.translation.to[0]&&a===this._config.translation.to[1]&&f===this._config.rotation.to&&h===this._config.scale.to){const t=r+f,s=e*h,u=Math.sin(r),l=Math.cos(r);return new o([l*e*c-u*e*a+i,u*e*c+l*e*a+n,t,s])}return new s(this._config,t)}get instructions(){return t.animatedTransform.encode(this._config)}}class r extends n{constructor(t,i){super([i]),this._config=t,this._parent=i}static hydrate(t){return new r(t,i(t.parent))}simplify(){const t=this._parent.simplify();if(!(t instanceof o))return this;const[i,n,s,e]=t.value,c=this._config.color.from[0],a=this._config.color.from[1],f=this._config.color.from[2];let h=this._config.color.from[3];const u=this._config.opacity.from;return c===this._config.color.to[0]&&a===this._config.color.to[1]&&f===this._config.color.to[2]&&h===this._config.color.to[3]&&u===this._config.opacity.to?(h*=u,new o([i*c,n*a,s*f,e*h])):new r(this._config,t)}get instructions(){return t.animatedColor.encode(this._config)}}class e extends n{constructor(t,i){super([i]),this._config=t,this._parent=i}static hydrate(t){return new e(t,i(t.parent))}simplify(){const t=this._parent.simplify();return t instanceof o?new e(this._config,t):this}get instructions(){return t.animatedShift.encode(this._config)}}const c={AnimatedTransform:s,AnimatedColor:r,AnimatedShift:e};export{n as AAnimationInfo,r as AnimatedColor,e as AnimatedShift,s as AnimatedTransform,o as Constant,i as hydrate};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- class t{generateSource(t){const o=[];for(let a=1;a<this.length;a++)o.push(`vec4 atom${a} = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;");for(let a=0;a<this.ins;a++)o.push("top--;"),o.push(`vec4 in${this.ins-a-1} = stack[top];`);for(let a=0;a<this.outs;a++)o.push(`vec4 out${a};`);const{microcode:e}=this;for(const a of e)o.push(a);for(let a=0;a<this.outs;a++)o.push(`stack[top] = out${a};`),o.push("top++;"),o.push(`if (top >= ${d}) { top = ${d-1}; }`);return o}}let o=128;class e extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=0,this.microcode=["break;"]}encode(){return[[this.opcode,0,0,0]]}}class a extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.y, atom0.y, atom0.y, atom0.y);"]}encode(t){return[[this.opcode,t,0,0]]}}class i extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.yzw, 0.0);"]}encode(t){return[[this.opcode,t[0]||0,t[1]||0,t[2]||0]]}}class n extends t{constructor(){super(...arguments),this.opcode=++o,this.length=2,this.ins=0,this.outs=1,this.microcode=["out0 = atom1;"]}encode(t){return[[this.opcode,0,0,0],t]}}function r(t){return[`float duration = clamp(${t.duration}, 0.05, 3600.0);`,`float startTimeOffset = ${t.startTimeOffset};`,`float repeatDelay = ${t.repeatDelay};`,`float timeOriginSelector = ${t.timeOriginSelector};`,`float repeatType = ${t.repeatType};`,`float easing = ${t.easing};`,`float playAnimation = ${t.playAnimation} * (1.0 - step(0.0, -${t.duration}));`,`float reverseAnimation = ${t.reverseAnimation};`,"float time = globalTime - (timeOriginSelector == 1.0 ? localTimeOrigin : 0.0);","time *= playAnimation;","time *= 1.0 - reverseAnimation * 2.0;","float period = duration + repeatDelay;","time += reverseAnimation == 1.0 ? (period - startTimeOffset - 0.001) : startTimeOffset + 0.001;","float omega = time / period;","float oi = floor(omega);","omega = repeatType == 1.0 || repeatType == 3.0 ? omega - oi : omega;","float of = omega * period;","of = (clamp(of, reverseAnimation * repeatDelay, period - (1.0 - reverseAnimation) * repeatDelay) - reverseAnimation * repeatDelay) / duration;","of = easing == 2.0 ? pow(of, 3.0) : of;","of = easing == 3.0 ? 1.0 - pow(1.0 - of, 3.0) : of;","of = easing == 4.0 ? of < 0.5 ? 4.0 * pow(of, 3.0) : 1.0 - pow(-2.0 * of + 2.0, 3.0) / 2.0 : of;","bool oscillate = repeatType == 3.0 && mod(oi, 2.0) == 1.0;",`${t.out} = oscillate ? 1.0 - of : of;`]}const s={Linear:1,EaseIn:2,EaseOut:3,EaseInOut:4},l={Loop:1,None:2,Oscillate:3},m={Local:1,Global:2};function c(t){const o=s[t.easing],e=l[t.repeatType],a=m[t.timeOriginSelector];return[[t.duration,t.startTimeOffset,t.repeatDelay,a],[e,o,t.playAnimation,t.reverseAnimation]]}class f extends t{constructor(){super(...arguments),this.opcode=++o,this.length=10,this.ins=1,this.outs=1,this.microcode=["vec2 fromTranslation = atom1.xy;","vec2 toTranslation = atom1.zw;","float fromRotation = atom2.x;","float toRotation = atom2.y;","float fromScale = atom2.z;","float toScale = atom2.w;","bool relativeTranslation = atom9.x == 1.0;","bool absoluteScale = atom9.y == 1.0;","vec2 translationMultiplier = relativeTranslation ? pixelDimensions : vec2(1.0, 1.0);","float scaleDivisor = absoluteScale ? pixelDimensions.y : 1.0;","float fTranslation;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fTranslation"}),"}","float fRotation;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fRotation"}),"}","float fScale;","{",...r({duration:"atom7.x",startTimeOffset:"atom7.y",repeatDelay:"atom7.z",timeOriginSelector:"atom7.w",repeatType:"atom8.x",easing:"atom8.y",playAnimation:"atom8.z",reverseAnimation:"atom8.w",out:"fScale"}),"}","vec2 aTranslation = mix(fromTranslation, toTranslation, fTranslation);","float aRotation = mix(fromRotation, toRotation, fRotation);","float aScale = mix(fromScale, toScale, fScale);","vec2 pTranslation = in0.xy;","float pRotation = in0.z;","float pScale = in0.w;","aTranslation *= translationMultiplier;","aScale /= scaleDivisor;","float rotation = pRotation + aRotation;","float scale = pScale * aScale;","float sin1 = sin(pRotation);","float cos1 = cos(pRotation);","float s1 = pScale;","float x1 = pTranslation.x;","float y1 = pTranslation.y;","float x2 = aTranslation.x;","float y2 = aTranslation.y;","\n vec2 translation = vec2(\n cos1 * s1 * x2 - sin1 * s1 * y2 + x1,\n sin1 * s1 * x2 + cos1 * s1 * y2 + y1\n );\n ","out0 = vec4(translation, rotation, scale);"]}encode(t){return[[this.opcode,0,0,0],[t.translation.from[0],t.translation.from[1],t.translation.to[0],t.translation.to[1]],[t.rotation.from,t.rotation.to,t.scale.from,t.scale.to],...c(t.translation.timing),...c(t.rotation.timing),...c(t.scale.timing),[t.relativeTranslation?1:0,t.absoluteScale?1:0,0,0]]}}class p extends t{constructor(){super(...arguments),this.opcode=++o,this.length=7,this.ins=1,this.outs=1,this.microcode=["float fromOpacity = atom0.y;","float toOpacity = atom0.z;","vec4 fromColor = atom1;","vec4 toColor = atom2;","float fColor;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fColor"}),"}","float fOpacity;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fOpacity"}),"}","vec4 aColor = mix(fromColor, toColor, fColor);","aColor.a *= mix(fromOpacity, toOpacity, fOpacity);","vec4 pColor = in0;","out0 = aColor * pColor;"]}encode(t){return[[this.opcode,t.opacity.from,t.opacity.to,0],[t.color.from[0],t.color.from[1],t.color.from[2],t.color.from[3]],[t.color.to[0],t.color.to[1],t.color.to[2],t.color.to[3]],...c(t.color.timing),...c(t.opacity.timing)]}}class u extends t{constructor(){super(...arguments),this.opcode=++o,this.length=4,this.ins=1,this.outs=1,this.microcode=["float fromShift = atom0.y;","float toShift = atom0.z;","float duration = atom1.x;","bool multiplyToByLineLength = atom3.x == 1.0;","bool multiplyDurationByLineLength = atom3.y == 1.0;","duration *= multiplyDurationByLineLength ? lineLength : 1.0;","float fShift;","{",...r({duration:"duration",startTimeOffset:"atom1.y",repeatDelay:"atom1.z",timeOriginSelector:"atom1.w",repeatType:"atom2.x",easing:"atom2.y",playAnimation:"atom2.z",reverseAnimation:"atom2.w",out:"fShift"}),"}","toShift *= multiplyToByLineLength ? lineLength : 1.0;","float aShift = mix(fromShift, toShift, fShift);","vec4 pShift = in0;","out0 = mod(aShift + pShift, lineLength);"]}encode(t){return[[this.opcode,t.shift.from,t.shift.to,0],...c(t.shift.timing),[t.multiplyToByLineLength?1:0,t.multiplyDurationByLineLength?1:0,0,0]]}}const h={scalar:new a,vector3:new i,vector4:new n,animatedTransform:new f,animatedColor:new p,animatedShift:new u,ret:new e},y=40,d=4;function g(t){const o=[];o.push(`float globalTime = ${t.globalTime};`),o.push(`float localTimeOrigin = ${t.localTimeOrigin};`),o.push(`float lineLength = ${t.lineLength};`),o.push(`vec2 pointer = ${t.animationPointer};`),o.push(`vec2 size = ${t.animationTextureSize};`),o.push("int top = 0;"),o.push(`vec4 stack[${d}];`),o.push(`for (int counter = 0; counter < ${y}; counter++) {`),o.push(`vec4 atom0 = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;"),o.push(`vec2 pixelDimensions = ${t.pixelDimensions};`),o.push("if (false) {");for(const e in h){const a=h[e];o.push(`} else if (int(atom0.x) == ${a.opcode}) {`);for(const e of a.generateSource(t))o.push(e)}return o.push("} // End if-else."),o.push("} // End for."),o.push(`${t.out} = top > 0 ? stack[top - 1] : vec4(0.0);`),o.join("\n")}export{t as AAnimationInstruction,p as AnimatedColorInstruction,u as AnimatedShiftInstruction,f as AnimatedTransformInstruction,e as RetInstruction,a as ScalarInstruction,i as Vector3Instruction,n as Vector4Instruction,s as easingCodes,g as generateVirtualMachineSource,r as getTweenFactor,h as instructions,l as repeatTypeCodes,m as timeOriginSelectorCodes};
2
+ class t{generateSource(t){const o=[];for(let a=1;a<this.length;a++)o.push(`vec4 atom${a} = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;");for(let a=0;a<this.ins;a++)o.push("top--;"),o.push(`vec4 in${this.ins-a-1} = stack[top];`);for(let a=0;a<this.outs;a++)o.push(`vec4 out${a};`);const{microcode:e}=this;for(const a of e)o.push(a);for(let a=0;a<this.outs;a++)o.push(`stack[top] = out${a};`),o.push("top++;"),o.push(`if (top >= ${d}) { top = ${d-1}; }`);return o}}let o=128;class e extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=0,this.microcode=["break;"]}encode(){return[[this.opcode,0,0,0]]}}class a extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.y, atom0.y, atom0.y, atom0.y);"]}encode(t){return[[this.opcode,t,0,0]]}}class i extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.yzw, 0.0);"]}encode(t){return[[this.opcode,t[0]||0,t[1]||0,t[2]||0]]}}class n extends t{constructor(){super(...arguments),this.opcode=++o,this.length=2,this.ins=0,this.outs=1,this.microcode=["out0 = atom1;"]}encode(t){return[[this.opcode,0,0,0],t]}}function r(t){return[`float duration = clamp(${t.duration}, 0.05, 3600.0);`,`float startTimeOffset = ${t.startTimeOffset};`,`float repeatDelay = ${t.repeatDelay};`,`float timeOriginSelector = ${t.timeOriginSelector};`,`float repeatType = ${t.repeatType};`,`float easing = ${t.easing};`,`float playAnimation = ${t.playAnimation} * (1.0 - step(0.0, -${t.duration}));`,`float reverseAnimation = ${t.reverseAnimation};`,"float time = globalTime - (timeOriginSelector == 1.0 ? localTimeOrigin : 0.0);","time *= playAnimation;","time *= 1.0 - reverseAnimation * 2.0;","float period = duration + repeatDelay;","time += reverseAnimation == 1.0 ? (period - startTimeOffset - 0.001) : startTimeOffset + 0.001;","float omega = time / period;","float oi = floor(omega);","omega = repeatType == 1.0 || repeatType == 3.0 ? omega - oi : omega;","float of = omega * period;","of = (clamp(of, reverseAnimation * repeatDelay, period - (1.0 - reverseAnimation) * repeatDelay) - reverseAnimation * repeatDelay) / duration;","of = easing == 2.0 ? pow(of, 3.0) : of;","of = easing == 3.0 ? 1.0 - pow(1.0 - of, 3.0) : of;","of = easing == 4.0 ? of < 0.5 ? 4.0 * pow(of, 3.0) : 1.0 - pow(-2.0 * of + 2.0, 3.0) / 2.0 : of;","bool oscillate = repeatType == 3.0 && mod(oi, 2.0) == 1.0;",`${t.out} = oscillate ? 1.0 - of : of;`]}const s={Linear:1,EaseIn:2,EaseOut:3,EaseInOut:4},l={Loop:1,None:2,Oscillate:3},m={Local:1,Global:2};function c(t){const o=s[t.easing],e=l[t.repeatType],a=m[t.timeOriginSelector];return[[t.duration,t.startTimeOffset,t.repeatDelay,a],[e,o,t.playAnimation,t.reverseAnimation]]}class f extends t{constructor(){super(...arguments),this.opcode=++o,this.length=10,this.ins=1,this.outs=1,this.microcode=["vec2 fromTranslation = atom1.xy;","vec2 toTranslation = atom1.zw;","float fromRotation = atom2.x;","float toRotation = atom2.y;","float fromScale = atom2.z;","float toScale = atom2.w;","bool relativeTranslation = atom9.x == 1.0;","bool absoluteScale = atom9.y == 1.0;","bool selectGlobalRotation = atom9.z == 1.0;","vec2 translationMultiplier = relativeTranslation ? pixelDimensions : vec2(1.0, 1.0);","float scaleDivisor = absoluteScale ? pixelDimensions.y : 1.0;","float fTranslation;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fTranslation"}),"}","float fRotation;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fRotation"}),"}","float fScale;","{",...r({duration:"atom7.x",startTimeOffset:"atom7.y",repeatDelay:"atom7.z",timeOriginSelector:"atom7.w",repeatType:"atom8.x",easing:"atom8.y",playAnimation:"atom8.z",reverseAnimation:"atom8.w",out:"fScale"}),"}","vec2 aTranslation = mix(fromTranslation, toTranslation, fTranslation);","float aRotation = mix(fromRotation, toRotation, fRotation);","float aScale = mix(fromScale, toScale, fScale);","vec2 pTranslation = in0.xy;","float pRotation = in0.z;","float pScale = in0.w;","aTranslation *= translationMultiplier;","aScale /= scaleDivisor;","float rotation = pRotation + aRotation;","\n if (selectGlobalRotation) {\n rotation = globalRotation;\n }\n ","float scale = pScale * aScale;","float sin1 = sin(pRotation);","float cos1 = cos(pRotation);","float s1 = pScale;","float x1 = pTranslation.x;","float y1 = pTranslation.y;","float x2 = aTranslation.x;","float y2 = aTranslation.y;","\n vec2 translation = vec2(\n cos1 * s1 * x2 - sin1 * s1 * y2 + x1,\n sin1 * s1 * x2 + cos1 * s1 * y2 + y1\n );\n ","out0 = vec4(translation, rotation, scale);"]}encode(t){return[[this.opcode,0,0,0],[t.translation.from[0],t.translation.from[1],t.translation.to[0],t.translation.to[1]],[t.rotation.from,t.rotation.to,t.scale.from,t.scale.to],...c(t.translation.timing),...c(t.rotation.timing),...c(t.scale.timing),[t.relativeTranslation?1:0,t.absoluteScale?1:0,t.selectGlobalRotation?1:0,0]]}}class p extends t{constructor(){super(...arguments),this.opcode=++o,this.length=7,this.ins=1,this.outs=1,this.microcode=["float fromOpacity = atom0.y;","float toOpacity = atom0.z;","vec4 fromColor = atom1;","vec4 toColor = atom2;","float fColor;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fColor"}),"}","float fOpacity;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fOpacity"}),"}","vec4 aColor = mix(fromColor, toColor, fColor);","aColor.a *= mix(fromOpacity, toOpacity, fOpacity);","vec4 pColor = in0;","out0 = aColor * pColor;"]}encode(t){return[[this.opcode,t.opacity.from,t.opacity.to,0],[t.color.from[0],t.color.from[1],t.color.from[2],t.color.from[3]],[t.color.to[0],t.color.to[1],t.color.to[2],t.color.to[3]],...c(t.color.timing),...c(t.opacity.timing)]}}class u extends t{constructor(){super(...arguments),this.opcode=++o,this.length=4,this.ins=1,this.outs=1,this.microcode=["float fromShift = atom0.y;","float toShift = atom0.z;","float duration = atom1.x;","bool multiplyToByLineLength = atom3.x == 1.0;","bool multiplyDurationByLineLength = atom3.y == 1.0;","duration *= multiplyDurationByLineLength ? lineLength : 1.0;","float fShift;","{",...r({duration:"duration",startTimeOffset:"atom1.y",repeatDelay:"atom1.z",timeOriginSelector:"atom1.w",repeatType:"atom2.x",easing:"atom2.y",playAnimation:"atom2.z",reverseAnimation:"atom2.w",out:"fShift"}),"}","toShift *= multiplyToByLineLength ? lineLength : 1.0;","float aShift = mix(fromShift, toShift, fShift);","vec4 pShift = in0;","out0 = mod(aShift + pShift, lineLength);"]}encode(t){return[[this.opcode,t.shift.from,t.shift.to,0],...c(t.shift.timing),[t.multiplyToByLineLength?1:0,t.multiplyDurationByLineLength?1:0,0,0]]}}const h={scalar:new a,vector3:new i,vector4:new n,animatedTransform:new f,animatedColor:new p,animatedShift:new u,ret:new e},y=40,d=4;function g(t){const o=[];o.push(`float globalTime = ${t.globalTime};`),o.push(`float localTimeOrigin = ${t.localTimeOrigin};`),o.push(`float lineLength = ${t.lineLength};`),o.push(`float globalRotation = ${t.globalRotation};`),o.push(`vec2 pointer = ${t.animationPointer};`),o.push(`vec2 size = ${t.animationTextureSize};`),o.push("int top = 0;"),o.push(`vec4 stack[${d}];`),o.push(`for (int counter = 0; counter < ${y}; counter++) {`),o.push(`vec4 atom0 = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;"),o.push(`vec2 pixelDimensions = ${t.pixelDimensions};`),o.push("if (false) {");for(const e in h){const a=h[e];o.push(`} else if (int(atom0.x) == ${a.opcode}) {`);for(const e of a.generateSource(t))o.push(e)}return o.push("} // End if-else."),o.push("} // End for."),o.push(`${t.out} = top > 0 ? stack[top - 1] : vec4(0.0);`),o.join("\n")}export{t as AAnimationInstruction,p as AnimatedColorInstruction,u as AnimatedShiftInstruction,f as AnimatedTransformInstruction,e as RetInstruction,a as ScalarInstruction,i as Vector3Instruction,n as Vector4Instruction,s as easingCodes,g as generateVirtualMachineSource,r as getTweenFactor,h as instructions,l as repeatTypeCodes,m as timeOriginSelectorCodes};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{getWorldWidth as n,getScaleToResolutionFactor as o}from"../../viewpointUtils.js";const r=65536;function t(n,o){const r=c(n),t=n.getLODInfoAt(o.key.level),e=u(n);return[(t.getXForColumn(o.key.col)-r[0])*e,(r[1]-t.getYForRow(o.key.row))*e]}function e([n,o]){return[Math.fround(n),Math.fround(o)]}function i(n,r){const t=c(r),e=u(r),i=n.scale*o(r.spatialReference),a=1/(i*e),d=n.size[0]*i/2,f=n.size[1]*i/2,s=l(n.center[0]-d-t[0],e),p=l(t[1]-n.center[1]-f,e);return{origin:[s.coordinate,p.coordinate],worldWrapId:[s.worldWrapId,p.worldWrapId],unitsToPixels:a}}function c(n){return[n.tileInfo.origin.x,n.tileInfo.origin.y]}function u(o){const t=n(o.spatialReference);return t>0?r/t:1}function l(n,o){const t=r/o,e=n%t;let i=Math.round((n-e)/t),c=e*o;return c<0&&(i-=1,c+=r),c>=r&&(i+=1,c-=r),{coordinate:c,worldWrapId:i}}export{i as createNormalizedTileView,t as getNormalizedTileOrigin,r as normalizedTileWorldSize,e as toFloat32};
2
+ import{getWorldWidth as n,getScaleToResolutionFactor as o}from"../../viewpointUtils.js";const r=65536;function t(n,o){const r=c(n),t=n.getLODInfoAt(o.key.level),e=u(n);return[(t.getXForColumn(o.key.col)-r[0])*e,(r[1]-t.getYForRow(o.key.row))*e]}function e([n,o]){return[Math.fround(n),Math.fround(o)]}function i(n,r){const t=c(r),e=u(r),i=n.scale*o(r.spatialReference),a=1/(i*e),d=n.size[0]*i/2,f=n.size[1]*i/2,s=l(n.center[0]-d-t[0],e),p=l(t[1]-n.center[1]-f,e);return{origin:[s.coordinate,p.coordinate],worldWrapId:[s.worldWrapId,p.worldWrapId],unitsToPixels:a}}function c(n){return[n.tileInfo.origin.x,n.tileInfo.origin.y]}function u(o){const t=n(o.spatialReference);return t>0?r/t:1}function l(n,o){const t=r/o,e=n%t;let i=Math.round((n-e)/t),c=e*o;return c<0&&(i-=1,c+=r),c>=r&&(i+=1,c-=r),{coordinate:c,worldWrapId:i}}export{i as createNormalizedTileView,t as getNormalizedTileOrigin,u as getNormalizedTileUnitsPerMapUnit,r as normalizedTileWorldSize,e as toFloat32};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import"../../../../../core/has.js";import e from"../../../../../core/Logger.js";import{Sampler2D as r,Float as o,Int as n,Vec4 as s,Vec2 as i}from"./graph/glsl.js";import{generateGLSL as p}from"./graph/GlslGraphWriter.js";import{ShaderGraphContext as a}from"./graph/ShaderGraphContext.js";import{setReachableUids as u}from"./graph/ShaderGraphNode.js";import{TypedShaderProgram as y}from"./typed/TypedShaderProgram.js";import{ShaderBuilder as c}from"../../../../webgl/ShaderBuilder.js";function d(t){return new t}function h(t,e,r){const o=t.constructor[e]??[];t.constructor.hasOwnProperty(e)||Object.defineProperty(t.constructor,e,{value:o.slice()}),t.constructor[e].push(r)}function f(t,e){return(r,o)=>{h(r,"locations",{typeCtor:e,propertyKey:o,parameterIndex:null,index:t})}}const l=t=>(e,r)=>{h(e,"builtins",{builtin:t,propertyKey:r})},m=t=>(e,r,o)=>{h(e,"inputs",{inputCtor:t,propertyKey:r,parameterIndex:o})},g=t=>(e,r)=>{h(e,"uniforms",{typeCtor:t,propertyKey:r})},_=t=>(e,r)=>{h(e,"textures",{typeCtor:t,propertyKey:r})},x=t=>(e,r)=>{h(e,"options",{typeCtor:t,propertyKey:r})},K=(t,e)=>{h(t,"defines",{propertyKey:e})};function C(t){return(e,r)=>{h(e,"transformFeedbackBindings",{propertyKey:r,parameterIndex:null,index:t})}}const b=(t,e)=>(r,o)=>{r.constructor.builtins.push({builtin:t,propertyKey:o,typeCtor:e})};class I{static{this.builtins=[]}}t([b("gl_VertexID",n)],I.prototype,"glVertexID",void 0);class v{}class w{static{this.builtins=[]}}t([b("gl_FragCoord",s)],w.prototype,"glFragCoord",void 0),t([b("gl_PointCoord",i)],w.prototype,"glPointCoord",void 0);class P{}t([l("gl_FragDepth")],P.prototype,"glFragDepth",void 0);class ${constructor(){this.type="uniform-group"}get _uniforms(){return this.constructor.uniforms??[]}}class j{constructor(){this.type="texture-group"}get _textures(){return this.constructor.textures??[]}}class F{constructor(){this.logShader=!1,this.computeAttributes={}}get vertexInput(){const t=this._shaderModuleClass.inputs.findLast(t=>"vertex"===t.propertyKey&&0===t.parameterIndex);if(!t)throw new Error("Unable to find vertex input parameter");return t}get computeInput(){return this._shaderModuleClass.inputs.findLast(t=>"vertex"===t.propertyKey&&1===t.parameterIndex)}get fragmentInput(){const t=this._shaderModuleClass.inputs.findLast(t=>"fragment"===t.propertyKey);if(!t)throw new Error("Unable to find fragment input parameter");return t}get transformFeedbackBindings(){return this.fragmentInput.inputCtor.transformFeedbackBindings??[]}get locations(){return[...this.vertexInput.inputCtor.locations,...this.computeInput?.inputCtor.locations??[]]}get locationsMap(){const t=new Map,r=new Set;for(const o of this.locations)r.has(o.index)?e.getLogger("esri.views.2d.engine.webgl.shaderGraph.GraphShaderModule").warnOnce("mapview-rendering",`Unable to assigned attribute ${o.propertyKey} to ${o.index}. Index already in use`,{locationsMap:t}):(t.set(o.propertyKey,o.index),r.add(o.index));return t}get locationInfo(){if(!this._locationInfo){const t=this.locationsMap,e=Array.from(t.entries()).map(([t,e])=>`${t}.${e}`).join("."),r=this.computeAttributes;this._locationInfo={stringHash:e,locations:t,computeAttributeMap:r}}return this._locationInfo}get renamedLocationsMap(){const t=new Map;for(const e of this.locations)t.set("a_"+e.propertyKey,e.index);return t}get optionPropertyKeys(){if(!this._optionPropertyKeys){const t=new Set;for(const e of this._options)t.add(e.propertyKey);this._optionPropertyKeys=t}return this._optionPropertyKeys}get _shaderModuleClass(){return this.constructor}get _defines(){return this._shaderModuleClass.defines??[]}get _options(){return this._shaderModuleClass.options??[]}get _uniforms(){return this._shaderModuleClass.uniforms??[]}get _textures(){return this._shaderModuleClass.textures??[]}getProgram(t,e,r,o){try{const{vertex:n,fragment:s,uniformBindings:i,textureBindings:p}=this._generateShaders(t,e,r,o);return new y(this.type,n,s,this.renamedLocationsMap,i,p,this.transformFeedbackBindings)}catch(n){return new y(this.type,"","",this.renamedLocationsMap,[],[],this.transformFeedbackBindings)}}getDebugUniformClassInfo(t){const e=this._options.find(e=>e.propertyKey===t);if(e)return{type:"option",className:e.typeCtor};const r=this._uniforms.find(e=>e.propertyKey===t);if(!r)throw new Error(`Unable to find uniform class type for property: ${t}`);return{type:"required",className:r.typeCtor}}getDebugTextureClassInfo(t){const e=this._textures.find(e=>e.propertyKey===t);if(!e)throw new Error(`Unable to find texture type for property: ${t}`);return{className:e.typeCtor}}getShaderKey(t,e,r,o,n){const s=Object.keys(t).map(e=>`${e}.${t[e]}`).join("."),i=Object.keys(o).map(t=>`${t}.${o[t]}`).join("."),p=Object.keys(n).map(t=>`${t}.${n[t]}`).join("."),a=Object.keys(e).filter(t=>this.optionPropertyKeys.has(t)&&e[t]).join("."),u=Object.keys(r).filter(t=>r[t]).join(".");return`${this.type}.${s}.${i}.${p}.${a}.${u}`}_generateShaders(t,e,r,o){const n=[],s=[];this._setDefines(r),this._setOptionalUniforms(n,e),this._setRequiredUniforms(n),this._setRequiredTextures(s);const i=this._hydrateVertexInput(o),y=this._injectPackPrecisionFactor(i,t),c=this._hydrateComputeInput(),d=c&&this._injectComputePackPrecisionFactor(c,t),h=this.vertex(y,d),f=this._hydrateFragmentInput(h),l=this.fragment(f),m=new Set;for(const p in l){const t=l[p];u(m,t)}const g=this._getVertexInputBuiltins(),_={};for(const[p,a]of Object.entries(i))_[p]=a;if(null!=c)for(const[p,a]of Object.entries(c))_[p]=a;const x=a.createVertex(_,h,g,n,s,this.transformFeedbackBindings,m);p(x);const K=this._getFragmentInputBuiltins(l);K.set("glPointCoord","gl_PointCoord"),K.set("glFragCoord","gl_FragCoord");const C=a.createFragment(f,l,K,n,s,x,this.transformFeedbackBindings);p(C);const b=this._createShaderBuilder(x,C),I=b.generate("vertex"),v=b.generate("fragment");return this.logShader&&(console.log(I),console.log(v)),{vertex:I,fragment:v,uniformBindings:n,textureBindings:s}}_setDefines(t){for(const e in t)this[e]=t[e]}_setOptionalUniforms(t,e){for(const r of this._options){e[r.propertyKey]?this[r.propertyKey]=this._hydrateUniformGroup(t,r):this[r.propertyKey]=null}}_setRequiredUniforms(t){for(const e of this._uniforms)this[e.propertyKey]=this._hydrateUniformGroup(t,e)}_setRequiredTextures(t){for(const e of this._textures)this[e.propertyKey]=this._hydrateTextureBinding(t,e)}_hydrateUniformGroup(t,e){const r=new(0,e.typeCtor);for(const o of r._uniforms??[]){const n=d(o.typeCtor),s=`u_${e.propertyKey}_${o.propertyKey}`,i=n.type,p=[e.propertyKey,o.propertyKey].join(".");if("type"in o.typeCtor&&"array"===o.typeCtor.type){const e=n;t.push({shaderModulePath:p,uniformName:s,uniformType:i,uniformArrayLength:e.size,uniformArrayElementType:e.elementType.type,uniformHydrated:n})}else if("type"in o.typeCtor&&"array-2d"===o.typeCtor.type){const e=n;t.push({shaderModulePath:p,uniformName:s,uniformType:i,uniformArrayLength:e.size,uniformArrayElementType:e.elementType.type,uniformHydrated:n})}else t.push({shaderModulePath:p,uniformName:s,uniformType:i,uniformHydrated:n});r[o.propertyKey]=n}return r}_hydrateTextureBinding(t,e){const o=e.typeCtor;if(o===r){const o=new r,n=`u_${e.propertyKey}`,s=e.propertyKey;return t.push({shaderModulePath:s,textureName:n,textureHydrated:o}),o}const n=new o;for(const r of n._textures){const o=d(r.typeCtor),s=`u_${e.propertyKey}_${r.propertyKey}`,i=[e.propertyKey,r.propertyKey].join(".");t.push({shaderModulePath:i,textureName:s,textureHydrated:o}),n[r.propertyKey]=o}return n}_hydrateVertexInput(t){const e=this.vertexInput.inputCtor,r=e.locations.reduce((e,r)=>!1===t[r.propertyKey]?e:{...e,[r.propertyKey]:d(r.typeCtor)},{});for(const{propertyKey:o,typeCtor:n}of e.builtins){const t=d(n);r[o]=t}return r}_hydrateComputeInput(){if(null==this.computeInput)return null;return this.computeInput.inputCtor.locations.reduce((t,e)=>({...t,[e.propertyKey]:d(e.typeCtor)}),{})}_injectPackPrecisionFactor(t,e){const r={};for(const n in t){const s=t[n],i=e[n];if(i){if("float"!==s.type&&"vec2"!==s.type&&"vec3"!==s.type&&"vec4"!==s.type)throw new Error(`InternalError: packPrecisionFactor requires GenType, but found ${s.type}`);r[n]=s.divide(new o(i))}else r[n]=s}return r}_injectComputePackPrecisionFactor(t,e){const r={},n=new Map;for(const o in this.computeAttributes)for(const t of this.computeAttributes[o]??[])n.set(t,o);for(const s in t){const i=t[s],p=n.get(s);if(!p)continue;const a=e[p];if(a){if("float"!==i.type&&"vec2"!==i.type&&"vec3"!==i.type&&"vec4"!==i.type)throw new Error(`InternalError: packPrecisionFactor requires GenType, but found ${i.type}`);r[s]=i.divide(new o(a))}else r[s]=i}return r}_hydrateFragmentInput(t){const e={};for(const r in t)e[r]=t[r];for(const{propertyKey:r,typeCtor:o}of w.builtins){const t=d(o);e[r]=t}return e}_getVertexInputBuiltins(){const t=this.vertexInput.inputCtor,e=new Map;for(const{builtin:r,propertyKey:o}of t.builtins)e.set(o,r);return e}_getFragmentInputBuiltins(t){const e=t.constructor,r=new Map;for(const o of e.builtins??[])r.set(o.propertyKey,o.builtin);return r}_createShaderBuilder(t,e){const r=new c;return this._insertDebugInfo(r),t.insertVertexShader(r),e.insertFragmentShader(r),r}_insertDebugInfo(t){t.vertex.code.add("// DEFINES: "),t.vertex.code.add("// --------------------------------------------------------- ");for(const e of this._defines)this[e.propertyKey]?t.vertex.code.add(`// ${e.propertyKey}: true`):t.vertex.code.add(`// ${e.propertyKey}: false`);t.vertex.code.add(""),t.vertex.code.add("// OPTIONS: "),t.vertex.code.add("// --------------------------------------------------------- ");for(const e of this._options)this[e.propertyKey]?t.vertex.code.add(`// ${e.propertyKey}: true`):t.vertex.code.add(`// ${e.propertyKey}: false`)}}export{v as ComputeVertexInput,w as FragmentInput,P as FragmentOutput,F as GraphShaderModule,j as TextureGroup,$ as UniformGroup,I as VertexInput,l as builtin,K as define,m as input,f as location,x as option,_ as texture,C as transformFeedback,g as uniform};
2
+ import{__decorate as e}from"tslib";import"../../../../../core/has.js";import t from"../../../../../core/Logger.js";import{unassignedUniformBlockBindingPoint as r,firstTechniqueUniformBlockBindingPoint as o}from"./types.js";import{Sampler2D as n,Float as s,Int as i,Vec4 as p,Vec2 as a}from"./graph/glsl.js";import{generateGLSL as u}from"./graph/GlslGraphWriter.js";import{ShaderGraphContext as c}from"./graph/ShaderGraphContext.js";import{setReachableUids as y}from"./graph/ShaderGraphNode.js";import{TypedShaderProgram as d}from"./typed/TypedShaderProgram.js";import{ShaderBuilder as h}from"../../../../webgl/ShaderBuilder.js";function f(e){return new e}function l(e,t,r){const o=e.constructor[t]??[];e.constructor.hasOwnProperty(t)||Object.defineProperty(e.constructor,t,{value:o.slice()}),e.constructor[t].push(r)}function m(e){return e===F||e?.prototype instanceof F}function g(e){switch(e.type){case"float":return 5126;case"vec2":return 35664;case"vec3":return 35665;case"vec4":return 35666;case"int":return 5124;case"ivec2":return 35667;case"ivec3":return 35668;case"ivec4":return 35669;case"uint":return 5125;case"uvec2":return 36294;case"uvec3":return 36295;case"uvec4":return 36296;case"bool":return 35670;case"bvec2":return 35671;case"bvec3":return 35672;case"bvec4":return 35673;case"mat2":return 35674;case"mat3":return 35675;case"mat4":return 35676;case"array":case"array-2d":return g(e.elementType);case"sampler2D":throw new Error("Sampler2D uniforms cannot be stored in a uniform block")}}function _(e,t){const r=g(t);return"array"===t.type||"array-2d"===t.type?{name:e,type:r,count:t.size}:{name:e,type:r}}function b(e,t){return(r,o)=>{l(r,"locations",{typeCtor:t,propertyKey:o,parameterIndex:null,index:e})}}const x=e=>(t,r)=>{l(t,"builtins",{builtin:e,propertyKey:r})},K=e=>(t,r,o)=>{l(t,"inputs",{inputCtor:e,propertyKey:r,parameterIndex:o})},C=e=>(t,r)=>{l(t,"uniforms",{typeCtor:e,propertyKey:r})},v=e=>(t,r)=>{l(t,"textures",{typeCtor:e,propertyKey:r})},w=e=>(t,r)=>{l(t,"options",{typeCtor:e,propertyKey:r})},I=(e,t)=>{l(e,"defines",{propertyKey:t})};function P(e){return(t,r)=>{l(t,"transformFeedbackBindings",{propertyKey:r,parameterIndex:null,index:e})}}const j=(e,t)=>(r,o)=>{r.constructor.builtins.push({builtin:e,propertyKey:o,typeCtor:t})};class ${static{this.builtins=[]}}e([j("gl_VertexID",i)],$.prototype,"glVertexID",void 0);class k{}class M{static{this.builtins=[]}}e([j("gl_FragCoord",p)],M.prototype,"glFragCoord",void 0),e([j("gl_PointCoord",a)],M.prototype,"glPointCoord",void 0);class B{}e([x("gl_FragDepth")],B.prototype,"glFragDepth",void 0);class F{constructor(){this.type="uniform-group",this.bindingPoint=r}get _uniforms(){return this.constructor.uniforms??[]}}function S(e,t){const r=new t,{bindingPoint:o}=r,n=[],s=[];for(const i of r._uniforms??[]){if(m(i.typeCtor))throw new Error("Nested UniformGroup members are not supported in uniform blocks");const t=f(i.typeCtor),o=`u_${e}_${i.propertyKey}`,p=t.type,a={shaderModulePath:[e,i.propertyKey].join("."),propertyName:i.propertyKey,uniformName:o,uniformType:p,uniformHydrated:t};("array"===t.type||"array-2d"===t.type)&&(a.uniformArrayLength=t.size,a.uniformArrayElementType=t.elementType.type),n.push(_(o,t)),s.push(a),r[i.propertyKey]=t}return{uniformGroup:r,binding:{shaderModulePath:e,bindingPoint:o,descriptor:n,members:s}}}function U(e){let t=o;return e.map(e=>{if(e.bindingPoint!==r)return e;const o={...e,bindingPoint:t};return t++,o})}class O{constructor(){this.type="texture-group"}get _textures(){return this.constructor.textures??[]}}class E{constructor(){this.logShader=!1,this.computeAttributes={}}get vertexInput(){const e=this._shaderModuleClass.inputs.findLast(e=>"vertex"===e.propertyKey&&0===e.parameterIndex);if(!e)throw new Error("Unable to find vertex input parameter");return e}get computeInput(){return this._shaderModuleClass.inputs.findLast(e=>"vertex"===e.propertyKey&&1===e.parameterIndex)}get fragmentInput(){const e=this._shaderModuleClass.inputs.findLast(e=>"fragment"===e.propertyKey);if(!e)throw new Error("Unable to find fragment input parameter");return e}get transformFeedbackBindings(){return this.fragmentInput.inputCtor.transformFeedbackBindings??[]}get locations(){return[...this.vertexInput.inputCtor.locations,...this.computeInput?.inputCtor.locations??[]]}get locationsMap(){const e=new Map,r=new Set;for(const o of this.locations)r.has(o.index)?t.getLogger("esri.views.2d.engine.webgl.shaderGraph.GraphShaderModule").warnOnce("mapview-rendering",`Unable to assigned attribute ${o.propertyKey} to ${o.index}. Index already in use`,{locationsMap:e}):(e.set(o.propertyKey,o.index),r.add(o.index));return e}get locationInfo(){if(!this._locationInfo){const e=this.locationsMap,t=Array.from(e.entries()).map(([e,t])=>`${e}.${t}`).join("."),r=this.computeAttributes;this._locationInfo={stringHash:t,locations:e,computeAttributeMap:r}}return this._locationInfo}get renamedLocationsMap(){const e=new Map;for(const t of this.locations)e.set("a_"+t.propertyKey,t.index);return e}get optionPropertyKeys(){if(!this._optionPropertyKeys){const e=new Set;for(const t of this._options)e.add(t.propertyKey);this._optionPropertyKeys=e}return this._optionPropertyKeys}get _shaderModuleClass(){return this.constructor}get _defines(){return this._shaderModuleClass.defines??[]}get _options(){return this._shaderModuleClass.options??[]}get _uniforms(){return this._shaderModuleClass.uniforms??[]}get _textures(){return this._shaderModuleClass.textures??[]}getProgram(e,t,r,o){try{const{vertex:n,fragment:s,uniformBlockBindings:i,textureBindings:p}=this._generateShaders(e,t,r,o);return new d(this.type,n,s,this.renamedLocationsMap,i,p,this.transformFeedbackBindings)}catch(n){return new d(this.type,"","",this.renamedLocationsMap,[],[],this.transformFeedbackBindings)}}getDebugUniformClassInfo(e){const t=this._options.find(t=>t.propertyKey===e);if(t)return{type:"option",className:t.typeCtor};const r=this._uniforms.find(t=>t.propertyKey===e);if(!r)throw new Error(`Unable to find uniform class type for property: ${e}`);return{type:"required",className:r.typeCtor}}getDebugTextureClassInfo(e){const t=this._textures.find(t=>t.propertyKey===e);if(!t)throw new Error(`Unable to find texture type for property: ${e}`);return{className:t.typeCtor}}getShaderKey(e,t,r,o,n){const s=Object.keys(e).map(t=>`${t}.${e[t]}`).join("."),i=Object.keys(o).map(e=>`${e}.${o[e]}`).join("."),p=Object.keys(n).map(e=>`${e}.${n[e]}`).join("."),a=Object.keys(t).filter(e=>this.optionPropertyKeys.has(e)&&t[e]).join("."),u=Object.keys(r).filter(e=>r[e]).join(".");return`${this.type}.${s}.${i}.${p}.${a}.${u}`}_generateShaders(e,t,r,o){const n=[],s=[];this._setDefines(r),this._setOptionalUniforms(n,t),this._setRequiredUniforms(n),this._setRequiredTextures(s);const i=this._hydrateVertexInput(o),p=this._injectPackPrecisionFactor(i,e),a=this._hydrateComputeInput(),d=a&&this._injectComputePackPrecisionFactor(a,e),h=this.vertex(p,d),f=this._hydrateFragmentInput(h),l=this.fragment(f),m=new Set;for(const u in l){const e=l[u];y(m,e)}const g=this._getVertexInputBuiltins(),_={};for(const[u,c]of Object.entries(i))_[u]=c;if(null!=a)for(const[u,c]of Object.entries(a))_[u]=c;const b=c.createVertex(_,h,g,n,s,this.transformFeedbackBindings,m);u(b);const x=this._getFragmentInputBuiltins(l);x.set("glPointCoord","gl_PointCoord"),x.set("glFragCoord","gl_FragCoord");const K=c.createFragment(f,l,x,n,s,b,this.transformFeedbackBindings);u(K);const C=new Set([...b.usedUniformBlockShaderModulePaths(),...K.usedUniformBlockShaderModulePaths()]),v=U(n.filter(({shaderModulePath:e})=>C.has(e))),w=this._createShaderBuilder(b,K),I=w.generate("vertex"),P=w.generate("fragment");return this.logShader&&(console.log(I),console.log(P)),{vertex:I,fragment:P,uniformBlockBindings:v,textureBindings:s}}_setDefines(e){for(const t in e)this[t]=e[t]}_setOptionalUniforms(e,t){for(const r of this._options){t[r.propertyKey]?this[r.propertyKey]=this._hydrateUniformBlock(e,r):this[r.propertyKey]=null}}_setRequiredUniforms(e){for(const t of this._uniforms)this[t.propertyKey]=this._hydrateUniformBlock(e,t)}_setRequiredTextures(e){for(const t of this._textures)this[t.propertyKey]=this._hydrateTextureBinding(e,t)}_hydrateUniformBlock(e,t){if(!m(t.typeCtor))throw new Error("Only UniformGroup subclasses can be used as uniform blocks");const{uniformGroup:r,binding:o}=S(t.propertyKey,t.typeCtor);return e.push(o),r}_hydrateTextureBinding(e,t){const r=t.typeCtor;if(r===n){const r=new n,o=`u_${t.propertyKey}`,s=t.propertyKey;return e.push({shaderModulePath:s,textureName:o,textureHydrated:r}),r}const o=new r;for(const n of o._textures){const r=f(n.typeCtor),s=`u_${t.propertyKey}_${n.propertyKey}`,i=[t.propertyKey,n.propertyKey].join(".");e.push({shaderModulePath:i,textureName:s,textureHydrated:r}),o[n.propertyKey]=r}return o}_hydrateVertexInput(e){const t=this.vertexInput.inputCtor,r=t.locations.reduce((t,r)=>!1===e[r.propertyKey]?t:{...t,[r.propertyKey]:f(r.typeCtor)},{});for(const{propertyKey:o,typeCtor:n}of t.builtins){const e=f(n);r[o]=e}return r}_hydrateComputeInput(){if(null==this.computeInput)return null;return this.computeInput.inputCtor.locations.reduce((e,t)=>({...e,[t.propertyKey]:f(t.typeCtor)}),{})}_injectPackPrecisionFactor(e,t){const r={};for(const o in e){const n=e[o],i=t[o];if(i){if("float"!==n.type&&"vec2"!==n.type&&"vec3"!==n.type&&"vec4"!==n.type)throw new Error(`InternalError: packPrecisionFactor requires GenType, but found ${n.type}`);r[o]=n.divide(new s(i))}else r[o]=n}return r}_injectComputePackPrecisionFactor(e,t){const r={},o=new Map;for(const n in this.computeAttributes)for(const e of this.computeAttributes[n]??[])o.set(e,n);for(const n in e){const i=e[n],p=o.get(n);if(!p)continue;const a=t[p];if(a){if("float"!==i.type&&"vec2"!==i.type&&"vec3"!==i.type&&"vec4"!==i.type)throw new Error(`InternalError: packPrecisionFactor requires GenType, but found ${i.type}`);r[n]=i.divide(new s(a))}else r[n]=i}return r}_hydrateFragmentInput(e){const t={};for(const r in e)t[r]=e[r];for(const{propertyKey:r,typeCtor:o}of M.builtins){const e=f(o);t[r]=e}return t}_getVertexInputBuiltins(){const e=this.vertexInput.inputCtor,t=new Map;for(const{builtin:r,propertyKey:o}of e.builtins)t.set(o,r);return t}_getFragmentInputBuiltins(e){const t=e.constructor,r=new Map;for(const o of t.builtins??[])r.set(o.propertyKey,o.builtin);return r}_createShaderBuilder(e,t){const r=new h;return this._insertDebugInfo(r),e.insertVertexShader(r),t.insertFragmentShader(r),r}_insertDebugInfo(e){e.vertex.code.add("// DEFINES: "),e.vertex.code.add("// --------------------------------------------------------- ");for(const t of this._defines)this[t.propertyKey]?e.vertex.code.add(`// ${t.propertyKey}: true`):e.vertex.code.add(`// ${t.propertyKey}: false`);e.vertex.code.add(""),e.vertex.code.add("// OPTIONS: "),e.vertex.code.add("// --------------------------------------------------------- ");for(const t of this._options)this[t.propertyKey]?e.vertex.code.add(`// ${t.propertyKey}: true`):e.vertex.code.add(`// ${t.propertyKey}: false`)}}export{k as ComputeVertexInput,M as FragmentInput,B as FragmentOutput,E as GraphShaderModule,O as TextureGroup,F as UniformGroup,$ as VertexInput,x as builtin,S as createUniformBlockBinding,I as define,K as input,b as location,w as option,v as texture,P as transformFeedback,C as uniform};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{cloneShaderNode as e}from"./ShaderGraphNode.js";class t{constructor(e,t,a,o=[]){this.variableName=e,this.variableInputType=t,this.node=a,this.qualifiers=o,this.type="shader-input",this.isUsed=!1}clone(){return new t(this.variableName,this.variableInputType,e(this.node),[...this.qualifiers])}}class a{constructor(e,t,a,o=[]){this.outVariableName=e,this.outVariableType=t,this.node=a,this.qualifiers=o,this.type="shader-output"}clone(){const t=new a(this.outVariableName,this.outVariableType,e(this.node),[...this.qualifiers]);return t.variableName=this.variableName,t}}class o{static createVertex(e,n,s,d,i,u,p){const c=[];for(const a in e){const o=e[a],r=s.get(a);r?c.push(new t(r,"builtin",o)):c.push(new t("a_"+a,"in",o))}for(const a of d){const e=a.uniformHydrated;c.push(new t(a.uniformName,"uniform",e))}for(const a of i){const e=a.textureHydrated;c.push(new t(a.textureName,"uniform",e))}const h=[];for(const t in n){const e=n[t];if("glPosition"===t)h.push(new a("gl_Position","builtin",e));else if("glPointSize"===t)h.push(new a("gl_PointSize","builtin",e));else{const o=r(e),n=[];o&&n.push(o),h.push(new a("v_"+t,"out",e,n))}}return new o(c,h,u,p)}static createFragment(e,r,n,s,d,i,u){const p=[],c=Array.from(i.rootOutputNodes());for(const a in e){const o=e[a],r=n.get(a);if(r){p.push(new t(r,"builtin",o));continue}const s=c.find(e=>e.node===o);s&&p.push(new t(s.outVariableName,"in",o,s.qualifiers))}for(const a of s){const e=a.uniformHydrated;p.push(new t(a.uniformName,"uniform",e))}for(const a of d){const e=a.textureHydrated;p.push(new t(a.textureName,"uniform",e))}const h=[];for(const t in r){const e=r[t],o=n.get(t);switch(t){case"discard":h.push(new a(null,"discard",e));break;case"fragData0":h.push(new a("fragData0","fragData0",e));break;case"fragData1":h.push(new a("fragData1","fragData1",e));break;case"fragData2":h.push(new a("fragData2","fragData2",e));break;case"fragData3":h.push(new a("fragData3","fragData3",e));break;default:o?h.push(new a(o,"builtin",e)):h.push(new a(t,"out",e))}}return new o(p,h,u)}constructor(e,t,a,o){this.type="shader-graph-context",this.indent=0,this.body="",this.varCount=0,this._arrayReadVersions=new Map,this._inputShaderTypesByNodeUid=new Map,this._nodeEmitMap=new Map;for(const r of e)this._inputShaderTypesByNodeUid.set(r.node.uid,r);this._outputShaderTypes=t,this._transformFeedbackBindings=a,this._transformFeedbackNames=new Set(a.map(e=>"v_"+e.propertyKey)),this._usedInFragmentShader=o}shouldPruneOutputNode(e){return!!this._usedInFragmentShader&&("builtin"!==e.outVariableType&&(!this._transformFeedbackNames.has(e.outVariableName)&&!this._usedInFragmentShader.has(e.node.uid)))}setEmit(e,t){this._nodeEmitMap.set(e.uid,t)}getEmit(e){return this._nodeEmitMap.get(e.uid)}inputs(){return this._inputShaderTypesByNodeUid.values()}get arrayReadVersions(){return this._arrayReadVersions}createArrayReadVersions(){const e=[],t=[],a=new Set;this._arrayReadVersions.clear();for(const o of this.rootOutputNodes())this.shouldPruneOutputNode(o)||(t.push(o.node),a.add(o.node.uid));for(let o=0;o<t.length;o++){const r=t[o];"array-read-node"===r.shaderType&&e.push(r);for(const e of r.children)e&&"number"!=typeof e&&"boolean"!=typeof e&&!a.has(e.uid)&&(a.add(e.uid),t.push(e))}for(const o of e){let e=this._arrayReadVersions.get(o.version.uid);e||(e=[],this._arrayReadVersions.set(o.version.uid,e)),e.push(o)}}getInput(e){return this._inputShaderTypesByNodeUid.get(e.uid)}*rootOutputNodes(){for(const e of this._outputShaderTypes)yield e}*nodes(){const e=[];for(const t of this._outputShaderTypes.values())e.push(t.node);for(;e.length;){const t=e.pop();"number"!=typeof t&&"boolean"!=typeof t&&e.push(...t.children.filter(Boolean)),yield t}}*nodesOfTypeOrFunction(){for(const e of this.nodes())"number"!=typeof e&&"boolean"!=typeof e&&(yield e)}createSubgraphContext(){const e=this.clone();return e.body="",e.indent=this.indent+2,e._nodeEmitMap=new Map(this._nodeEmitMap),e}clone(){const e=new o([],this._outputShaderTypes,this._transformFeedbackBindings,this._usedInFragmentShader);return e._inputShaderTypesByNodeUid=this._inputShaderTypesByNodeUid,e.indent=this.indent,e.body=this.body,e.varCount=this.varCount,e._arrayReadVersions=this._arrayReadVersions,e._nodeEmitMap=this._nodeEmitMap,e}insertVertexShader(e){e.vertex.code.add(""),this._insertInputs(e,"vertex"),e.vertex.code.add(""),e.vertex.code.add("// OUTPUTS: "),e.vertex.code.add("// --------------------------------------------------------- ");for(const t of this.rootOutputNodes()){const a="builtin"===t.outVariableType;if(!this.shouldPruneOutputNode(t))if(a)e.vertex.code.add(`// ${t.outVariableType.padEnd(7)} ${t.node.type.padEnd(9)} ${t.outVariableName};`);else if("array"===t.node.type){const a=[...t.qualifiers,t.outVariableType].join(" ");e.vertex.code.add(`${a.padEnd(10)} ${t.node.elementType.type.padEnd(9)} ${t.outVariableName}[${t.node.size}];`)}else{const a=[...t.qualifiers,t.outVariableType].join(" ");e.vertex.code.add(`${a.padEnd(10)} ${t.node.type.padEnd(9)} ${t.outVariableName};`)}}e.vertex.code.add(""),e.vertex.code.add("void main() {"),e.vertex.code.add(" "+this.body.split("\n").join("\n "));for(const t of this.rootOutputNodes())this.shouldPruneOutputNode(t)||e.vertex.code.add(` ${t.outVariableName} = ${t.variableName};`);e.vertex.code.add("}")}insertFragmentShader(e){this._insertInputs(e,"fragment"),e.fragment.code.add(""),e.fragment.code.add("// OUTPUTS: "),e.fragment.code.add("// --------------------------------------------------------- ");let t=0;for(const n of this.rootOutputNodes())"builtin"===n.outVariableType?e.fragment.code.add(`// ${n.outVariableType.padEnd(7)} ${n.node.type.padEnd(9)} ${n.outVariableName};`):"discard"===n.outVariableType||e.outputs.add(n.outVariableName,n.node.type,t++);e.fragment.code.add(""),e.fragment.code.add("void main() {"),e.fragment.code.add(" "+this.body.split("\n").join("\n "));const a=Array.from(this.rootOutputNodes()),o=a.find(e=>"discard"===e.outVariableType),r=a.filter(e=>"discard"!==e.outVariableType);o&&(e.fragment.code.add(` if (${o.variableName}) {`),e.fragment.code.add(" discard;"),e.fragment.code.add(" }"),e.fragment.code.add(" "));for(const n of r)e.fragment.code.add(` ${n.outVariableName} = ${n.variableName};`);e.fragment.code.add("}")}_insertInputs(e,t){e[t].code.add("// INPUTS: "),e[t].code.add("// --------------------------------------------------------- ");for(const a of this.inputs())if(a.isUsed&&"builtin"!==a.variableInputType)if("array"===a.node.type)e[t].code.add(` ${a.variableInputType.padEnd(10)} ${a.node.elementType.type.padEnd(9)} ${a.variableName}[${a.node.size}];`);else if("array-2d"===a.node.type)e[t].code.add(` ${a.variableInputType.padEnd(10)} ${a.node.elementType.type.padEnd(9)} ${a.variableName}[${a.node.size}]; // Emulated 2D Array. Not supported by ES3.0`);else{const o=[...a.qualifiers,a.variableInputType].join(" ");e[t].code.add(` ${o.padEnd(10)} ${a.node.type.padEnd(9)} ${a.variableName};`)}}}function r(e){switch(e.type){case"float":case"vec2":case"vec3":case"vec4":case"array":return null;case"int":case"ivec2":case"ivec3":case"ivec4":case"uint":case"uvec2":case"uvec3":case"uvec4":case"bool":case"bvec2":case"bvec3":case"bvec4":return"flat";case"mat2":case"mat3":case"mat4":case"sampler2D":case"array-2d":throw new Error(`InternalError: ${e.type} is not a valid output type`)}}export{o as ShaderGraphContext,t as ShaderInput,a as ShaderOutput};
2
+ import{getUniformBlockName as e}from"../types.js";import{cloneShaderNode as t}from"./ShaderGraphNode.js";class a{constructor(e,t,a,o=[],r=null){this.variableName=e,this.variableInputType=t,this.node=a,this.qualifiers=o,this.uniformBlockShaderModulePath=r,this.type="shader-input",this.isUsed=!1}clone(){return new a(this.variableName,this.variableInputType,t(this.node),[...this.qualifiers],this.uniformBlockShaderModulePath)}}class o{constructor(e,t,a,o=[]){this.outVariableName=e,this.outVariableType=t,this.node=a,this.qualifiers=o,this.type="shader-output"}clone(){const e=new o(this.outVariableName,this.outVariableType,t(this.node),[...this.qualifiers]);return e.variableName=this.variableName,e}}class r{static createVertex(e,t,n,s,i,u,c){const p=[];for(const o in e){const t=e[o],r=n.get(o);r?p.push(new a(r,"builtin",t)):p.push(new a("a_"+o,"in",t))}for(const o of s)for(const e of o.members)p.push(new a(e.uniformName,"uniform-block",e.uniformHydrated,[],o.shaderModulePath));for(const o of i){const e=o.textureHydrated;p.push(new a(o.textureName,"uniform",e))}const h=[];for(const a in t){const e=t[a];if("glPosition"===a)h.push(new o("gl_Position","builtin",e));else if("glPointSize"===a)h.push(new o("gl_PointSize","builtin",e));else{const t=d(e),r=[];t&&r.push(t),h.push(new o("v_"+a,"out",e,r))}}return new r(p,h,s,u,c)}static createFragment(e,t,n,d,s,i,u){const c=[],p=Array.from(i.rootOutputNodes());for(const o in e){const t=e[o],r=n.get(o);if(r){c.push(new a(r,"builtin",t));continue}const d=p.find(e=>e.node===t);d&&c.push(new a(d.outVariableName,"in",t,d.qualifiers))}for(const o of d)for(const e of o.members)c.push(new a(e.uniformName,"uniform-block",e.uniformHydrated,[],o.shaderModulePath));for(const o of s){const e=o.textureHydrated;c.push(new a(o.textureName,"uniform",e))}const h=[];for(const a in t){const e=t[a],r=n.get(a);switch(a){case"discard":h.push(new o(null,"discard",e));break;case"fragData0":h.push(new o("fragData0","fragData0",e));break;case"fragData1":h.push(new o("fragData1","fragData1",e));break;case"fragData2":h.push(new o("fragData2","fragData2",e));break;case"fragData3":h.push(new o("fragData3","fragData3",e));break;default:r?h.push(new o(r,"builtin",e)):h.push(new o(a,"out",e))}}return new r(c,h,d,u)}constructor(e,t,a,o,r){this.type="shader-graph-context",this.indent=0,this.body="",this.varCount=0,this._arrayReadVersions=new Map,this._inputShaderTypesByNodeUid=new Map,this._nodeEmitMap=new Map;for(const n of e)this._inputShaderTypesByNodeUid.set(n.node.uid,n);this._outputShaderTypes=t,this._uniformBlockBindings=a,this._transformFeedbackBindings=o,this._transformFeedbackNames=new Set(o.map(e=>"v_"+e.propertyKey)),this._usedInFragmentShader=r}shouldPruneOutputNode(e){return!!this._usedInFragmentShader&&("builtin"!==e.outVariableType&&(!this._transformFeedbackNames.has(e.outVariableName)&&!this._usedInFragmentShader.has(e.node.uid)))}setEmit(e,t){this._nodeEmitMap.set(e.uid,t)}getEmit(e){return this._nodeEmitMap.get(e.uid)}inputs(){return this._inputShaderTypesByNodeUid.values()}usedUniformBlockShaderModulePaths(){const e=new Set;for(const t of this.inputs())t.isUsed&&"uniform-block"===t.variableInputType&&null!=t.uniformBlockShaderModulePath&&e.add(t.uniformBlockShaderModulePath);return e}get arrayReadVersions(){return this._arrayReadVersions}createArrayReadVersions(){const e=[],t=[],a=new Set;this._arrayReadVersions.clear();for(const o of this.rootOutputNodes())this.shouldPruneOutputNode(o)||(t.push(o.node),a.add(o.node.uid));for(let o=0;o<t.length;o++){const r=t[o];"array-read-node"===r.shaderType&&e.push(r);for(const e of r.children)e&&"number"!=typeof e&&"boolean"!=typeof e&&!a.has(e.uid)&&(a.add(e.uid),t.push(e))}for(const o of e){let e=this._arrayReadVersions.get(o.version.uid);e||(e=[],this._arrayReadVersions.set(o.version.uid,e)),e.push(o)}}getInput(e){return this._inputShaderTypesByNodeUid.get(e.uid)}*rootOutputNodes(){for(const e of this._outputShaderTypes)yield e}*nodes(){const e=[];for(const t of this._outputShaderTypes.values())e.push(t.node);for(;e.length;){const t=e.pop();"number"!=typeof t&&"boolean"!=typeof t&&e.push(...t.children.filter(Boolean)),yield t}}*nodesOfTypeOrFunction(){for(const e of this.nodes())"number"!=typeof e&&"boolean"!=typeof e&&(yield e)}createSubgraphContext(){const e=this.clone();return e.body="",e.indent=this.indent+2,e._nodeEmitMap=new Map(this._nodeEmitMap),e}clone(){const e=new r([],this._outputShaderTypes,this._uniformBlockBindings,this._transformFeedbackBindings,this._usedInFragmentShader);return e._inputShaderTypesByNodeUid=this._inputShaderTypesByNodeUid,e.indent=this.indent,e.body=this.body,e.varCount=this.varCount,e._arrayReadVersions=this._arrayReadVersions,e._nodeEmitMap=this._nodeEmitMap,e}insertVertexShader(e){e.vertex.code.add(""),this._insertInputs(e,"vertex"),e.vertex.code.add(""),e.vertex.code.add("// OUTPUTS: "),e.vertex.code.add("// --------------------------------------------------------- ");for(const t of this.rootOutputNodes()){const a="builtin"===t.outVariableType;if(!this.shouldPruneOutputNode(t))if(a)e.vertex.code.add(`// ${t.outVariableType.padEnd(7)} ${t.node.type.padEnd(9)} ${t.outVariableName};`);else if("array"===t.node.type){const a=[...t.qualifiers,t.outVariableType].join(" ");e.vertex.code.add(`${a.padEnd(10)} ${t.node.elementType.type.padEnd(9)} ${t.outVariableName}[${t.node.size}];`)}else{const a=[...t.qualifiers,t.outVariableType].join(" ");e.vertex.code.add(`${a.padEnd(10)} ${t.node.type.padEnd(9)} ${t.outVariableName};`)}}e.vertex.code.add(""),e.vertex.code.add("void main() {"),e.vertex.code.add(" "+this.body.split("\n").join("\n "));for(const t of this.rootOutputNodes())this.shouldPruneOutputNode(t)||e.vertex.code.add(` ${t.outVariableName} = ${t.variableName};`);e.vertex.code.add("}")}insertFragmentShader(e){this._insertInputs(e,"fragment"),e.fragment.code.add(""),e.fragment.code.add("// OUTPUTS: "),e.fragment.code.add("// --------------------------------------------------------- ");let t=0;for(const n of this.rootOutputNodes())"builtin"===n.outVariableType?e.fragment.code.add(`// ${n.outVariableType.padEnd(7)} ${n.node.type.padEnd(9)} ${n.outVariableName};`):"discard"===n.outVariableType||e.outputs.add(n.outVariableName,n.node.type,t++);e.fragment.code.add(""),e.fragment.code.add("void main() {"),e.fragment.code.add(" "+this.body.split("\n").join("\n "));const a=Array.from(this.rootOutputNodes()),o=a.find(e=>"discard"===e.outVariableType),r=a.filter(e=>"discard"!==e.outVariableType);o&&(e.fragment.code.add(` if (${o.variableName}) {`),e.fragment.code.add(" discard;"),e.fragment.code.add(" }"),e.fragment.code.add(" "));for(const n of r)e.fragment.code.add(` ${n.outVariableName} = ${n.variableName};`);e.fragment.code.add("}")}_insertInputs(t,a){t[a].code.add("// INPUTS: "),t[a].code.add("// --------------------------------------------------------- ");const o=this.usedUniformBlockShaderModulePaths();for(const r of this._uniformBlockBindings){if(!o.has(r.shaderModulePath))continue;const d=e(r.shaderModulePath);t[a].code.add(`layout(std140) uniform ${d} {`);for(const e of r.members)t[a].code.add(` ${n(e)}`);t[a].code.add("};")}for(const e of this.inputs())if(e.isUsed&&"builtin"!==e.variableInputType&&"uniform-block"!==e.variableInputType)if("array"===e.node.type)t[a].code.add(` ${e.variableInputType.padEnd(10)} ${e.node.elementType.type.padEnd(9)} ${e.variableName}[${e.node.size}];`);else if("array-2d"===e.node.type)t[a].code.add(` ${e.variableInputType.padEnd(10)} ${e.node.elementType.type.padEnd(9)} ${e.variableName}[${e.node.size}]; // Emulated 2D Array. Not supported by ES3.0`);else{const o=[...e.qualifiers,e.variableInputType].join(" ");t[a].code.add(` ${o.padEnd(10)} ${e.node.type.padEnd(9)} ${e.variableName};`)}}}function n(e){const{uniformHydrated:t,uniformName:a}=e;return"array"===t.type?`${t.elementType.type.padEnd(9)} ${a}[${t.size}];`:"array-2d"===t.type?`${t.elementType.type.padEnd(9)} ${a}[${t.size}]; // Emulated 2D Array. Not supported by ES3.0`:`${t.type.padEnd(9)} ${a};`}function d(e){switch(e.type){case"float":case"vec2":case"vec3":case"vec4":case"array":return null;case"int":case"ivec2":case"ivec3":case"ivec4":case"uint":case"uvec2":case"uvec3":case"uvec4":case"bool":case"bvec2":case"bvec3":case"bvec4":return"flat";case"mat2":case"mat3":case"mat4":case"sampler2D":case"array-2d":throw new Error(`InternalError: ${e.type} is not a valid output type`)}}export{r as ShaderGraphContext,a as ShaderInput,o as ShaderOutput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as i}from"tslib";import{animationDebugFlags as t}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{generateVirtualMachineSource as e}from"../../../animations/instructions.js";import{location as o,uniform as a,texture as s,option as r}from"../../GraphShaderModule.js";import{Vec2 as l,Vec4 as n,Float as p,Sampler2D as m,step as u,negate as d,cond as c,equal as y,Mat2 as v,cos as h,sin as f,Mat3 as b,Vec3 as S,lessThanEqual as w,ifElse as g,texture2D as V,clamp as x,abs as z,block as T}from"../../graph/glsl.js";import{AnimationUniformInfo as P}from"./AnimationUniformInfo.js";import{MarkerConstants as j}from"../markers/markerConstants.js";import{FeatureVertexInput as _,AFeatureShader as C,FeatureFragmentInput as M}from"../shaders/AFeatureShader.js";import{softEdgeRatio as O}from"../shaders/constants.js";import{LocalTileOffset as D}from"../shaders/LocalTileOffset.js";import{MosaicInfo as F}from"../shaders/MosaicInfo.js";import{getBit as A,rgba2float as I}from"../shaders/utils.js";import{VisualVariableColor as L}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as R}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as k}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as U}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as E}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as B}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as G}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as q,getVisualVariableAngle as N}from"../shaders/vvUtils.js";class W extends _{}i([o(3,l)],W.prototype,"offset",void 0),i([o(4,n)],W.prototype,"sizing",void 0),i([o(5,n)],W.prototype,"value1Position2Value2",void 0),i([o(6,n)],W.prototype,"animationPointerAndBaseSizeAndReferenceSize",void 0),i([o(7,l)],W.prototype,"zoomRange",void 0),i([o(8,p)],W.prototype,"lineLength",void 0);class Z extends M{}class H extends C{_vertexPreamble(i,t,e){const{id:o,offset:a,animationPointerAndBaseSizeAndReferenceSize:s,sizing:r}=i,l=s.xy,n=s.z,m=s.w,b=r.xy,S=this._getEvalParams(i,b,e);let w,g;if(i.value1Position2Value2){let t;t=this.hittestRequest?new p(0):J(l,6,S).a.multiply(this.tile.getDisplayZoomFactor(this.tileContainer));const e=i.pos,o=i.value1Position2Value2.yz,a=i.value1Position2Value2.x,s=i.value1Position2Value2.w,r=t.subtract(a).divide(s.subtract(a));g=e.add(o.subtract(e).multiply(r)),w=u(new p(1),r).add(u(new p(0),d(r)))}else g=i.pos,w=new p(0);const V=r.z,x=A(i.bitset,j.bitset.isStroke),z=r.w,T=A(i.bitset,j.bitset.scaleSymbolsProportionally),P=J(l,0,S),_=c([y(A(i.bitset,j.bitset.isMapAligned),new p(1)),this.view.rotation.divide(180).multiply(Math.PI)],[!0,new p(0)]),C=new v(h(_),f(_.multiply(-1)),f(_),h(_)).multiply(P.xy),M=P.z.subtract(_).subtract(t),O=P.w,D=A(i.bitset,j.bitset.isSDF),F=q(this,o,new p(m)).divide(new p(m));return{baseSize:n,animationPointer:l,strokeWidth:V,isOutline:x,unscaledDistanceToPx:z,scaleSymbolsProportionally:T,isSDF:D,position:this._getScreenPosition({id:o,pos:g,offset:a,referenceSize:m,translation:C,rotation:M,scale:O,vvScale:F}),evalParams:S,vvScale:F,scale:O,clip:w}}_getScreenPosition(i){const{pos:t,translation:e,rotation:o,scale:a,offset:s,id:r,vvScale:l}=i,n=N(this,r).multiply(Math.PI/180),m=e.x.multiply(4/3),u=e.y.multiply(-1).multiply(4/3),c=f(n),y=h(n),v=y.multiply(m).add(d(c).multiply(u)),w=c.multiply(m).add(y.multiply(u)),g=f(o.subtract(n)),V=h(o.subtract(n)),x=new p(0),z=new p(1),{pixelRatio:T}=this.view,P=new b(z,x,x,x,z,x,v.multiply(T),w.multiply(T),z),j=new b(V,g.multiply(-1),x,g,V,x,0,0,z),_=a.multiply(l).multiply(T).multiply(4/3),C=j.multiply(_),M=this.tile.getViewScreenMat3(this.view,this.tileContainer).multiply(new S(t,1)),O=P.multiply(M).xy,D=C.multiply(new S(s,0)).xy;return O.add(D)}_clip(i,e){let o=super.clip(i,e);const a=w(this._getLocalTimeOrigin(i),new p(0));return t.forceGlobalTimeOrigin||(o=o.add(c([a,()=>new p(2)],[!0,()=>new p(0)]))),o}_getLocalTimeOrigin(i){return this.getLocalTimeOrigin(i)}_toNdc(i){return this.view.displayMat3.multiply(new S(i,1)).xy}_getEvalParams(i,t,e){const{globalTime:o,animationTextureSize:a}=this.animationInfo;return{globalTime:o,localTimeOrigin:this._getLocalTimeOrigin(i.id),animationTextureSize:a,animationTexture:this.animationTexture,pixelDimensions:t,lineLength:e}}_getColor(i,t){return g(y(t.isSDF,new p(1)),this._getSDFColor(i,t),this._getSpriteColor(i,t))}_getSpriteColor(i,t){return V(this.mosaicTexture,i).multiply(t.color)}_getSDFColor(i,t){const e=V(this.mosaicTexture,i),o=new p(.5).subtract(I(e)).multiply(t.distanceToPx).multiply(O),a=x(new p(.5).subtract(o),new p(0),new p(1)),s=t.color.multiply(a),r=t.outlineSize.multiply(.5),l=z(o).subtract(r),n=x(new p(.5).subtract(l),new p(0),new p(1)),m=t.outlineColor.multiply(n);return new p(1).subtract(m.a).multiply(s).add(m)}}function J(i,t,o){const a=i.add(new l(t,0)),s=V(o.animationTexture,a.add(.5).divide(o.animationTextureSize)).xy;return i=i.add(s),T({animationPointer:i,...o},n,null,i=>{const{out:t}=i;if(!t)throw new Error("out is null");return e({...i,out:t})})}i([a(F)],H.prototype,"mosaicInfo",void 0),i([a(P)],H.prototype,"animationInfo",void 0),i([a(D)],H.prototype,"localTileOffset",void 0),i([s(m)],H.prototype,"mosaicTexture",void 0),i([r(L)],H.prototype,"visualVariableColor",void 0),i([r(R)],H.prototype,"visualVariableOpacity",void 0),i([r(U)],H.prototype,"visualVariableSizeMinMaxValue",void 0),i([r(E)],H.prototype,"visualVariableSizeScaleStops",void 0),i([r(B)],H.prototype,"visualVariableSizeStops",void 0),i([r(G)],H.prototype,"visualVariableSizeUnitValue",void 0),i([r(k)],H.prototype,"visualVariableRotation",void 0),i([s(m)],H.prototype,"animationTexture",void 0);export{Z as AAnimatedFragmentInput,H as AAnimatedShader,W as AAnimatedVertexInput,J as getValue};
2
+ import{__decorate as i}from"tslib";import{animationDebugFlags as t}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{generateVirtualMachineSource as e}from"../../../animations/instructions.js";import{location as o,uniform as a,texture as s,option as r}from"../../GraphShaderModule.js";import{Vec2 as l,Vec4 as n,Float as p,Sampler2D as m,cond as u,equal as d,negate as c,step as y,sin as v,cos as f,Mat3 as h,Vec3 as b,lessThanEqual as S,ifElse as w,texture2D as g,clamp as V,abs as x,block as z}from"../../graph/glsl.js";import{AnimationUniformInfo as T}from"./AnimationUniformInfo.js";import{MarkerConstants as P}from"../markers/markerConstants.js";import{FeatureVertexInput as j,AFeatureShader as _,FeatureFragmentInput as M}from"../shaders/AFeatureShader.js";import{softEdgeRatio as O}from"../shaders/constants.js";import{LocalTileOffset as C}from"../shaders/LocalTileOffset.js";import{MosaicInfo as D}from"../shaders/MosaicInfo.js";import{getBit as I,rgba2float as F}from"../shaders/utils.js";import{VisualVariableColor as R}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as A}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as L}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as k}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as U}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as E}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as B}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as G,getVisualVariableAngle as q}from"../shaders/vvUtils.js";class N extends j{}i([o(3,l)],N.prototype,"offset",void 0),i([o(4,n)],N.prototype,"sizing",void 0),i([o(5,n)],N.prototype,"value1Position2Value2",void 0),i([o(6,n)],N.prototype,"animationPointerAndBaseSizeAndReferenceSize",void 0),i([o(7,l)],N.prototype,"zoomRange",void 0),i([o(8,p)],N.prototype,"lineLength",void 0);class W extends M{}class Z extends _{_vertexPreamble(i,t,e){const{id:o,offset:a,animationPointerAndBaseSizeAndReferenceSize:s,sizing:r}=i,l=s.xy,n=s.z,m=s.w,v=r.xy,f=u([d(I(i.bitset,P.bitset.isMapAligned),new p(1)),this.view.rotation.divide(180).multiply(Math.PI)],[!0,new p(0)]),h=c(f.add(t)),b=this._getEvalParams(i,v,e,h);let S,w;if(i.value1Position2Value2){let t;t=this.hittestRequest?new p(0):H(l,6,b).a.multiply(this.tile.getDisplayZoomFactor(this.tileInfo));const e=i.pos,o=i.value1Position2Value2.yz,a=i.value1Position2Value2.x,s=i.value1Position2Value2.w,r=t.subtract(a).divide(s.subtract(a));w=e.add(o.subtract(e).multiply(r)),S=y(new p(1),r).add(y(new p(0),c(r)))}else w=i.pos,S=new p(0);const g=r.z,V=I(i.bitset,P.bitset.isStroke),x=r.w,z=I(i.bitset,P.bitset.scaleSymbolsProportionally),T=H(l,0,b),j=T.xy,_=T.z,M=T.w,O=I(i.bitset,P.bitset.isSDF),C=G(this,o,new p(m)).divide(new p(m));return{baseSize:n,animationPointer:l,strokeWidth:g,isOutline:V,unscaledDistanceToPx:x,scaleSymbolsProportionally:z,isSDF:O,position:this._getScreenPosition({id:o,pos:w,offset:a,referenceSize:m,translation:j,rotation:_,scale:M,vvScale:C}),evalParams:b,vvScale:C,scale:M,clip:S}}_getScreenPosition(i){const{pos:t,translation:e,rotation:o,scale:a,offset:s,id:r,vvScale:l}=i,n=q(this,r).multiply(Math.PI/180),m=e.x.multiply(4/3),u=e.y.multiply(-1).multiply(4/3),d=v(n),y=f(n),S=y.multiply(m).add(c(d).multiply(u)),w=d.multiply(m).add(y.multiply(u)),g=v(o.subtract(n)),V=f(o.subtract(n)),x=new p(0),z=new p(1),{pixelRatio:T}=this.view,P=new h(z,x,x,x,z,x,S.multiply(T),w.multiply(T),z),j=new h(V,g.multiply(-1),x,g,V,x,0,0,z),_=a.multiply(l).multiply(T).multiply(4/3),M=j.multiply(_),O=this.tile.getViewScreenMat3(this.view,this.tileInfo).multiply(new b(t,1)),C=P.multiply(O).xy,D=M.multiply(new b(s,0)).xy;return C.add(D)}_clip(i,e){let o=super.clip(i,e);const a=S(this._getLocalTimeOrigin(i),new p(0));return t.forceGlobalTimeOrigin||(o=o.add(u([a,()=>new p(2)],[!0,()=>new p(0)]))),o}_getLocalTimeOrigin(i){return this.getLocalTimeOrigin(i)}_toNdc(i){return this.view.displayMat3.multiply(new b(i,1)).xy}_getEvalParams(i,t,e,o){const{globalTime:a,animationTextureSize:s}=this.animationInfo;return{globalTime:a,localTimeOrigin:this._getLocalTimeOrigin(i.id),animationTextureSize:s,animationTexture:this.animationTexture,pixelDimensions:t,lineLength:e,globalRotation:o}}_getColor(i,t){return w(d(t.isSDF,new p(1)),this._getSDFColor(i,t),this._getSpriteColor(i,t))}_getSpriteColor(i,t){return g(this.mosaicTexture,i).multiply(t.color)}_getSDFColor(i,t){const e=g(this.mosaicTexture,i),o=new p(.5).subtract(F(e)).multiply(t.distanceToPx).multiply(O),a=V(new p(.5).subtract(o),new p(0),new p(1)),s=t.color.multiply(a),r=t.outlineSize.multiply(.5),l=x(o).subtract(r),n=V(new p(.5).subtract(l),new p(0),new p(1)),m=t.outlineColor.multiply(n);return new p(1).subtract(m.a).multiply(s).add(m)}}function H(i,t,o){const a=i.add(new l(t,0)),s=g(o.animationTexture,a.add(.5).divide(o.animationTextureSize)).xy;return i=i.add(s),z({animationPointer:i,...o},n,null,i=>{const{out:t}=i;if(!t)throw new Error("out is null");return e({...i,out:t})})}i([a(D)],Z.prototype,"mosaicInfo",void 0),i([a(T)],Z.prototype,"animationInfo",void 0),i([a(C)],Z.prototype,"localTileOffset",void 0),i([s(m)],Z.prototype,"mosaicTexture",void 0),i([r(R)],Z.prototype,"visualVariableColor",void 0),i([r(A)],Z.prototype,"visualVariableOpacity",void 0),i([r(k)],Z.prototype,"visualVariableSizeMinMaxValue",void 0),i([r(U)],Z.prototype,"visualVariableSizeScaleStops",void 0),i([r(E)],Z.prototype,"visualVariableSizeStops",void 0),i([r(B)],Z.prototype,"visualVariableSizeUnitValue",void 0),i([r(L)],Z.prototype,"visualVariableRotation",void 0),i([s(m)],Z.prototype,"animationTexture",void 0);export{W as AAnimatedFragmentInput,Z as AAnimatedShader,N as AAnimatedVertexInput,H as getValue};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{input as s}from"../../GraphShaderModule.js";import{Float as i,sin as r,cos as o,Vec3 as l,Vec4 as n,mix as a,ifElse as m,greaterThan as u}from"../../graph/glsl.js";import{PolyVertexInput as p,PolyHittestVertexInput as h,PolyFragmentInput as c,AAnimatedPolyShader as d}from"./AAnimatedPolyShader.js";import{getPatternMatrix as y}from"../shaders/ComplexFillShader.js";import{c256ToRad as f,noHit as g,trueHit as x}from"../shaders/constants.js";import{isRectHittest as b,hittestFill as P,hittestScreenRect as w}from"../shaders/hittestUtils.js";class S extends d{constructor(){super(...arguments),this.type="AnimatedFillShader"}vertex(t,e){const{distanceToPx:s,ndc:m,z:u,color:p,isOutline:h,strokeWidth:c,isSDF:d,scale:g,scaleSymbolsProportionally:x}=this._vertexPoly(t),b=this.tile.getRequiredZoomFactor(this.tileContainer),P=t.sizing.xy,w=P.multiply(b),S=t.angle?t.angle.multiply(f):new i(0),j=r(S),v=o(S),F=y(t.id,w,j,v,t.bitset),O=this.localTileOffset.getPatternOffsetAtTileOrigin(P,j,v),R=b.multiply(t.offset.subtract(O)).divide(w),T=new l(t.pos,1),q=F.multiply(T).xy.subtract(R),A=t.tlbr.divide(this.mosaicInfo.size.xyxy);return{glPosition:new n(m,u,1),tlbr:A,uv:q,color:p.multiply(new i(1).subtract(h)),outlineColor:p.multiply(h),distanceToPx:s,strokeWidth:c.multiply(a(new i(1),g,x)),isOutline:h,isSDF:d,...this.maybeRunHittest(t,e,{})}}fragment(t){const e=this._fragmentPoly(t);return this.getFragmentOutput(e,t)}hittest(t,e,s){const{pos0:r,pos1:o,pos2:l}=this.computeHittestTriangle(t,e,null),n=b(this.hittestRequest);return m(n,()=>{const{tlbr:t}=this.hittestRequest;return w(r,o,l,t)},()=>{const s=P(this,t,e);return m(u(s,this.hittestRequest.distance),new i(g),new i(x))})}}t([e(0,s(p)),e(1,s(h))],S.prototype,"vertex",null),t([e(0,s(c))],S.prototype,"fragment",null);export{S as AnimatedFillShader};
2
+ import{__decorate as t,__param as e}from"tslib";import{input as s}from"../../GraphShaderModule.js";import{Float as i,sin as r,cos as o,Vec3 as l,Vec4 as n,mix as a,ifElse as m,greaterThan as u}from"../../graph/glsl.js";import{PolyVertexInput as p,PolyHittestVertexInput as h,PolyFragmentInput as c,AAnimatedPolyShader as d}from"./AAnimatedPolyShader.js";import{getPatternMatrix as y}from"../shaders/ComplexFillShader.js";import{c256ToRad as f,noHit as g,trueHit as x}from"../shaders/constants.js";import{isRectHittest as b,hittestFill as P,hittestScreenRect as w}from"../shaders/hittestUtils.js";class S extends d{constructor(){super(...arguments),this.type="AnimatedFillShader"}vertex(t,e){const{distanceToPx:s,ndc:m,z:u,color:p,isOutline:h,strokeWidth:c,isSDF:d,scale:g,scaleSymbolsProportionally:x}=this._vertexPoly(t),b=this.tile.getRequiredZoomFactor(this.tileInfo),P=t.sizing.xy,w=P.multiply(b),S=t.angle?t.angle.multiply(f):new i(0),j=r(S),v=o(S),F=y(t.id,w,j,v,t.bitset),O=this.localTileOffset.getPatternOffsetAtTileOrigin(P,j,v),R=b.multiply(t.offset.subtract(O)).divide(w),T=new l(t.pos,1),q=F.multiply(T).xy.subtract(R),A=t.tlbr.divide(this.mosaicInfo.size.xyxy);return{glPosition:new n(m,u,1),tlbr:A,uv:q,color:p.multiply(new i(1).subtract(h)),outlineColor:p.multiply(h),distanceToPx:s,strokeWidth:c.multiply(a(new i(1),g,x)),isOutline:h,isSDF:d,...this.maybeRunHittest(t,e,{})}}fragment(t){const e=this._fragmentPoly(t);return this.getFragmentOutput(e,t)}hittest(t,e,s){const{pos0:r,pos1:o,pos2:l}=this.computeHittestTriangle(t,e,null),n=b(this.hittestRequest);return m(n,()=>{const{tlbr:t}=this.hittestRequest;return w(r,o,l,t)},()=>{const s=P(this,t,e);return m(u(s,this.hittestRequest.distance),new i(g),new i(x))})}}t([e(0,s(p)),e(1,s(h))],S.prototype,"vertex",null),t([e(0,s(c))],S.prototype,"fragment",null);export{S as AnimatedFillShader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{location as i,input as s}from"../../GraphShaderModule.js";import{Float as o,Vec2 as l,dot as r,max as a,Vec4 as n,mix as m,length as d,clamp as p,step as u,min as h,ifElse as c,greaterThan as y}from"../../graph/glsl.js";import{PolyHittestVertexInput as f,PolyVertexInput as v,AAnimatedPolyShader as b,PolyFragmentInput as g}from"./AAnimatedPolyShader.js";import{getValue as w}from"./AAnimatedShader.js";import{noHit as x,trueHit as S}from"../shaders/constants.js";import{isRectHittest as P,distPointSegment as D,hittestScreenRect as j}from"../shaders/hittestUtils.js";import{getLineAntialiasing as z,getLineThinFactor as A}from"../shaders/LineShader.js";class R extends v{}t([i(10,o)],R.prototype,"accumulatedDistance",void 0),t([i(11,l)],R.prototype,"normal",void 0),t([i(12,l)],R.prototype,"segmentDirection",void 0);class F extends g{}class T extends b{constructor(){super(...arguments),this.type="AnimatedLineShader"}vertex(t,e){const{animationPointerAndBaseSizeAndReferenceSize:i}=t,s=i.xy,{distanceToPx:d,ndc:p,z:u,color:h,isOutline:c,strokeWidth:y,isSDF:f,baseSize:v,scale:b,scaleSymbolsProportionally:g,evalParams:x}=this._vertexPoly(t),S=t.sizing.xy,P=S.x.multiply(v).divide(S.y),D=this.tile.getDisplayZoomFactor(this.tileContainer),j=w(s,6,x).a.multiply(D),z=t.accumulatedDistance.subtract(j),{normal:A}=t,R=t.normal.y,F=z.divide(D).add(r(t.segmentDirection,t.offset)).divide(P),T=R.add(1).divide(2),W=new l(F,T),q=t.tlbr.divide(this.mosaicInfo.size.xyxy),O=v.divide(2),k=new o(.5).multiply(this.view.antialiasing),C=a(O.add(k),new o(.45)).add(new o(.1).multiply(k));return{glPosition:new n(p,u,1),tlbr:q,uv:W,color:h.multiply(new o(1).subtract(c)),outlineColor:h.multiply(c),distanceToPx:d,strokeWidth:y.multiply(m(new o(1),b,g)),isOutline:c,isSDF:f,halfWidth:C,normal:A,...this.maybeRunHittest(t,e,C)}}fragment(t){const e=this._fragmentPoly(t),i=z(t,this.view.antialiasing),{halfWidth:s,normal:l}=t,r=A(s),a=d(l).multiply(s),n=p(r.multiply(s.subtract(a)).divide(r.subtract(new o(1))),new o(0),new o(1));return this.getFragmentOutput(e.multiply(n).multiply(i),t)}hittest(t,e,i){const{pos0:s,pos1:l,pos2:r}=this.computeHittestTriangle(t,e,null),a=P(this.hittestRequest),{distance:n,smallSymbolDistance:m,smallSymbolSizeThreshold:d,tlbr:p}=this.hittestRequest,f=u(i,d.multiply(.5)).multiply(n.subtract(m)),v=this.hittestRequest.position,b=h(D(v,s,l),D(v,s,r)).subtract(i).add(f);return c(a,j(s,l,r,p),c(y(b,n),new o(x),new o(S)))}}t([e(0,s(R)),e(1,s(f))],T.prototype,"vertex",null),t([e(0,s(F))],T.prototype,"fragment",null);export{T as AnimatedLineShader};
2
+ import{__decorate as t,__param as e}from"tslib";import{location as i,input as s}from"../../GraphShaderModule.js";import{Float as o,Vec2 as l,dot as r,max as a,Vec4 as n,mix as m,length as d,clamp as p,step as u,min as h,ifElse as c,greaterThan as y}from"../../graph/glsl.js";import{PolyHittestVertexInput as f,PolyVertexInput as v,AAnimatedPolyShader as b,PolyFragmentInput as g}from"./AAnimatedPolyShader.js";import{getValue as w}from"./AAnimatedShader.js";import{noHit as x,trueHit as S}from"../shaders/constants.js";import{isRectHittest as P,distPointSegment as D,hittestScreenRect as j}from"../shaders/hittestUtils.js";import{getLineAntialiasing as z,getLineThinFactor as A}from"../shaders/LineShader.js";class R extends v{}t([i(10,o)],R.prototype,"accumulatedDistance",void 0),t([i(11,l)],R.prototype,"normal",void 0),t([i(12,l)],R.prototype,"segmentDirection",void 0);class F extends g{}class T extends b{constructor(){super(...arguments),this.type="AnimatedLineShader"}vertex(t,e){const{animationPointerAndBaseSizeAndReferenceSize:i}=t,s=i.xy,{distanceToPx:d,ndc:p,z:u,color:h,isOutline:c,strokeWidth:y,isSDF:f,baseSize:v,scale:b,scaleSymbolsProportionally:g,evalParams:x}=this._vertexPoly(t),S=t.sizing.xy,P=S.x.multiply(v).divide(S.y),D=this.tile.getDisplayZoomFactor(this.tileInfo),j=w(s,6,x).a.multiply(D),z=t.accumulatedDistance.subtract(j),{normal:A}=t,R=t.normal.y,F=z.divide(D).add(r(t.segmentDirection,t.offset)).divide(P),T=R.add(1).divide(2),W=new l(F,T),q=t.tlbr.divide(this.mosaicInfo.size.xyxy),O=v.divide(2),k=new o(.5).multiply(this.view.antialiasing),H=a(O.add(k),new o(.45)).add(new o(.1).multiply(k));return{glPosition:new n(p,u,1),tlbr:q,uv:W,color:h.multiply(new o(1).subtract(c)),outlineColor:h.multiply(c),distanceToPx:d,strokeWidth:y.multiply(m(new o(1),b,g)),isOutline:c,isSDF:f,halfWidth:H,normal:A,...this.maybeRunHittest(t,e,H)}}fragment(t){const e=this._fragmentPoly(t),i=z(t,this.view.antialiasing),{halfWidth:s,normal:l}=t,r=A(s),a=d(l).multiply(s),n=p(r.multiply(s.subtract(a)).divide(r.subtract(new o(1))),new o(0),new o(1));return this.getFragmentOutput(e.multiply(n).multiply(i),t)}hittest(t,e,i){const{pos0:s,pos1:l,pos2:r}=this.computeHittestTriangle(t,e,null),a=P(this.hittestRequest),{distance:n,smallSymbolDistance:m,smallSymbolSizeThreshold:d,tlbr:p}=this.hittestRequest,f=u(i,d.multiply(.5)).multiply(n.subtract(m)),v=this.hittestRequest.position,b=h(D(v,s,l),D(v,s,r)).subtract(i).add(f);return c(a,j(s,l,r,p),c(y(b,n),new o(x),new o(S)))}}t([e(0,s(R)),e(1,s(f))],T.prototype,"vertex",null),t([e(0,s(F))],T.prototype,"fragment",null);export{T as AnimatedLineShader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,input as o,ComputeVertexInput as r}from"../../GraphShaderModule.js";import{Vec2 as l,Float as n,Vec4 as a,ifElse as d,or as u,Bool as m,mix as p,Mat3 as h,lessThan as c,Vec3 as x,distance as y,greaterThan as w,negate as f}from"../../graph/glsl.js";import{AAnimatedVertexInput as g,AAnimatedShader as v,getValue as S,AAnimatedFragmentInput as b}from"./AAnimatedShader.js";import{MarkerConstants as _}from"../markers/markerConstants.js";import{trueHit as V,noHit as C}from"../shaders/constants.js";import{isRectHittest as z,hittestMarkerScreenRect as P,distPointTriangle as N,xyToBarycentric as k,inTriangle as R}from"../shaders/hittestUtils.js";import{getBitBool as D}from"../shaders/utils.js";import{getVisualVariableColor as M,getVisualVariableOpacity as j}from"../shaders/vvUtils.js";class q extends g{}t([s(9,l)],q.prototype,"uv",void 0),t([s(10,n)],q.prototype,"angle",void 0);class F extends r{}t([s(11,l)],F.prototype,"offsetNextVertex1",void 0),t([s(12,l)],F.prototype,"offsetNextVertex2",void 0),t([s(13,l)],F.prototype,"textureUVNextVertex1",void 0),t([s(14,l)],F.prototype,"textureUVNextVertex2",void 0);class T extends b{}function U(t,e,i,s){return e.multiply(t.x).add(i.multiply(t.y)).add(s.multiply(t.z))}class A extends v{constructor(){super(...arguments),this.type="AnimatedMarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],uv:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=t.uv.divide(this.mosaicInfo.size),{position:s,animationPointer:o,evalParams:r,isOutline:l,unscaledDistanceToPx:c,vvScale:x,strokeWidth:y,scaleSymbolsProportionally:w,scale:f,isSDF:g,baseSize:v,clip:b}=this._vertexPreamble(t,t.angle,t.lineLength||new n(0)),V=this._toNdc(s);let C=S(o,1,r);C=new a(C.rgb.multiply(C.a),C.a);let z=d(D(t.bitset,_.bitset.colorLocked),C,S(o,2,r));z=new a(z.rgb.multiply(z.a),z.a);let P=S(o,3,r);P=new a(P.rgb.multiply(P.a),P.a);const N=S(o,4,r).a,k=S(o,5,r).a,R=M(this,t.id,C,u(D(t.bitset,_.bitset.colorLocked),new m(l))),q=p(R,z,P),F=j(this,t.id),T=p(F,N,k),U=q.multiply(T),A=this.clip(t.id,t.zoomRange).add(b.multiply(2)),I=c.multiply(x);return{glPosition:new a(V,A,1),uv:i,color:U.multiply(new n(1).subtract(l)),outlineColor:U.multiply(l),distanceToPx:I,strokeWidth:y.multiply(p(new n(1),f,w)),isOutline:l,isSDF:g,...this.maybeRunHittest(t,e,{pos:t.pos,size:v,sizeCorrection:new n(1),isMapAligned:new n(1),vvRotationMat3:new h(1,0,0,0,1,0,0,0,1),placementMat3:new h(1,0,0,0,1,0,0,0,1),outlineSize:new n(1),distanceToPx:I,isSDF:g})}}fragment(t){let e=this._getColor(t.uv,{color:t.color,distanceToPx:t.distanceToPx,isSDF:t.isSDF,outlineColor:t.outlineColor,outlineSize:t.strokeWidth});return i.spotlightAnimatedSymbols&&(e=e.add(new a(0,.3,0,.3))),this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:s,pos1:o,pos2:r}=this.computeHittestTriangle(t,e,i),l=z(this.hittestRequest);return d(l,()=>{const{tlbr:t}=this.hittestRequest;return P(s,o,r,t)},()=>d(c(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i)))}_hittestSmallMarker(t,e,i){const{position:s,distance:o,smallSymbolDistance:r}=this.hittestRequest,l=o.subtract(r),a=this.tile.getViewScreenMat3(this.view,this.tileContainer).multiply(new x(i.pos,1)).xy,u=i.size.multiply(.5),m=y(a,s).subtract(u).add(l);return d(w(m,this.hittestRequest.distance),new n(C),new n(V))}_hittestMarker(t,e,i){const s=this._vertexPreamble({...t},t.angle,new n(0)).position,o=this._vertexPreamble({...t,offset:e.offsetNextVertex1},t.angle,new n(0)).position,r=this._vertexPreamble({...t,offset:e.offsetNextVertex2},t.angle,new n(0)).position,l=this.hittestRequest.position,a=this.hittestRequest.distance,u=N(l,s,o,r);return d(w(u,a),new n(C),this._hittestSamples(s,o,r,t,e,i))}_hittestSamples(t,e,i,s,o,r){const{outlineSize:u,isSDF:m,distanceToPx:p}=r,h=this.hittestRequest.position,c=this.hittestRequest.distance,x=k(h.add(new l(f(c),f(c))),t,e,i),y=k(h.add(new l(0,f(c))),t,e,i),g=k(h.add(new l(c,f(c))),t,e,i),v=k(h.add(new l(f(c),0)),t,e,i),S=k(h,t,e,i),b=k(h.add(new l(c,0)),t,e,i),_=k(h.add(new l(f(c),c)),t,e,i),z=k(h.add(new l(0,c)),t,e,i),P=k(h.add(new l(c,c)),t,e,i),N=s.uv.divide(this.mosaicInfo.size),D=o.textureUVNextVertex1.divide(this.mosaicInfo.size),M=o.textureUVNextVertex2.divide(this.mosaicInfo.size),j={color:new a(1,1,1,1),outlineSize:u,outlineColor:new a(1,1,1,1),isSDF:m,distanceToPx:p};let q=new n(0);return q=q.add(R(x).multiply(this._getColor(U(x,N,D,M),j).a)),q=q.add(R(y).multiply(this._getColor(U(y,N,D,M),j).a)),q=q.add(R(g).multiply(this._getColor(U(g,N,D,M),j).a)),q=q.add(R(v).multiply(this._getColor(U(v,N,D,M),j).a)),q=q.add(R(S).multiply(this._getColor(U(S,N,D,M),j).a)),q=q.add(R(b).multiply(this._getColor(U(b,N,D,M),j).a)),q=q.add(R(_).multiply(this._getColor(U(_,N,D,M),j).a)),q=q.add(R(z).multiply(this._getColor(U(z,N,D,M),j).a)),q=q.add(R(P).multiply(this._getColor(U(P,N,D,M),j).a)),d(w(q,new n(.05)),new n(V),new n(C))}}t([e(0,o(q)),e(1,o(F))],A.prototype,"vertex",null),t([e(0,o(T))],A.prototype,"fragment",null);export{T as AnimatedMarkerFragmentInput,A as AnimatedMarkerShader,q as AnimatedMarkerVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,input as o,ComputeVertexInput as r}from"../../GraphShaderModule.js";import{Vec2 as l,Float as n,Vec4 as a,ifElse as d,or as u,Bool as m,mix as p,Mat3 as h,lessThan as c,Vec3 as x,distance as y,greaterThan as w,negate as f}from"../../graph/glsl.js";import{AAnimatedVertexInput as g,AAnimatedShader as v,getValue as S,AAnimatedFragmentInput as b}from"./AAnimatedShader.js";import{MarkerConstants as _}from"../markers/markerConstants.js";import{trueHit as V,noHit as z}from"../shaders/constants.js";import{isRectHittest as C,hittestMarkerScreenRect as P,distPointTriangle as N,xyToBarycentric as k,inTriangle as R}from"../shaders/hittestUtils.js";import{getBitBool as D}from"../shaders/utils.js";import{getVisualVariableColor as M,getVisualVariableOpacity as j}from"../shaders/vvUtils.js";class q extends g{}t([s(9,l)],q.prototype,"uv",void 0),t([s(10,n)],q.prototype,"angle",void 0);class F extends r{}t([s(11,l)],F.prototype,"offsetNextVertex1",void 0),t([s(12,l)],F.prototype,"offsetNextVertex2",void 0),t([s(13,l)],F.prototype,"textureUVNextVertex1",void 0),t([s(14,l)],F.prototype,"textureUVNextVertex2",void 0);class T extends b{}function U(t,e,i,s){return e.multiply(t.x).add(i.multiply(t.y)).add(s.multiply(t.z))}class A extends v{constructor(){super(...arguments),this.type="AnimatedMarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],uv:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=t.uv.divide(this.mosaicInfo.size),{position:s,animationPointer:o,evalParams:r,isOutline:l,unscaledDistanceToPx:c,vvScale:x,strokeWidth:y,scaleSymbolsProportionally:w,scale:f,isSDF:g,baseSize:v,clip:b}=this._vertexPreamble(t,t.angle,t.lineLength||new n(0)),V=this._toNdc(s);let z=S(o,1,r);z=new a(z.rgb.multiply(z.a),z.a);let C=d(D(t.bitset,_.bitset.colorLocked),z,S(o,2,r));C=new a(C.rgb.multiply(C.a),C.a);let P=S(o,3,r);P=new a(P.rgb.multiply(P.a),P.a);const N=S(o,4,r).a,k=S(o,5,r).a,R=M(this,t.id,z,u(D(t.bitset,_.bitset.colorLocked),new m(l))),q=p(R,C,P),F=j(this,t.id),T=p(F,N,k),U=q.multiply(T),A=this.clip(t.id,t.zoomRange).add(b.multiply(2)),I=c.multiply(x);return{glPosition:new a(V,A,1),uv:i,color:U.multiply(new n(1).subtract(l)),outlineColor:U.multiply(l),distanceToPx:I,strokeWidth:y.multiply(p(new n(1),f,w)),isOutline:l,isSDF:g,...this.maybeRunHittest(t,e,{pos:t.pos,size:v,sizeCorrection:new n(1),isMapAligned:new n(1),vvRotationMat3:new h(1,0,0,0,1,0,0,0,1),placementMat3:new h(1,0,0,0,1,0,0,0,1),outlineSize:new n(1),distanceToPx:I,isSDF:g})}}fragment(t){let e=this._getColor(t.uv,{color:t.color,distanceToPx:t.distanceToPx,isSDF:t.isSDF,outlineColor:t.outlineColor,outlineSize:t.strokeWidth});return i.spotlightAnimatedSymbols&&(e=e.add(new a(0,.3,0,.3))),this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:s,pos1:o,pos2:r}=this.computeHittestTriangle(t,e,i),l=C(this.hittestRequest);return d(l,()=>{const{tlbr:t}=this.hittestRequest;return P(s,o,r,t)},()=>d(c(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i)))}_hittestSmallMarker(t,e,i){const{position:s,distance:o,smallSymbolDistance:r}=this.hittestRequest,l=o.subtract(r),a=this.tile.getViewScreenMat3(this.view,this.tileInfo).multiply(new x(i.pos,1)).xy,u=i.size.multiply(.5),m=y(a,s).subtract(u).add(l);return d(w(m,this.hittestRequest.distance),new n(z),new n(V))}_hittestMarker(t,e,i){const s=this._vertexPreamble({...t},t.angle,new n(0)).position,o=this._vertexPreamble({...t,offset:e.offsetNextVertex1},t.angle,new n(0)).position,r=this._vertexPreamble({...t,offset:e.offsetNextVertex2},t.angle,new n(0)).position,l=this.hittestRequest.position,a=this.hittestRequest.distance,u=N(l,s,o,r);return d(w(u,a),new n(z),this._hittestSamples(s,o,r,t,e,i))}_hittestSamples(t,e,i,s,o,r){const{outlineSize:u,isSDF:m,distanceToPx:p}=r,h=this.hittestRequest.position,c=this.hittestRequest.distance,x=k(h.add(new l(f(c),f(c))),t,e,i),y=k(h.add(new l(0,f(c))),t,e,i),g=k(h.add(new l(c,f(c))),t,e,i),v=k(h.add(new l(f(c),0)),t,e,i),S=k(h,t,e,i),b=k(h.add(new l(c,0)),t,e,i),_=k(h.add(new l(f(c),c)),t,e,i),C=k(h.add(new l(0,c)),t,e,i),P=k(h.add(new l(c,c)),t,e,i),N=s.uv.divide(this.mosaicInfo.size),D=o.textureUVNextVertex1.divide(this.mosaicInfo.size),M=o.textureUVNextVertex2.divide(this.mosaicInfo.size),j={color:new a(1,1,1,1),outlineSize:u,outlineColor:new a(1,1,1,1),isSDF:m,distanceToPx:p};let q=new n(0);return q=q.add(R(x).multiply(this._getColor(U(x,N,D,M),j).a)),q=q.add(R(y).multiply(this._getColor(U(y,N,D,M),j).a)),q=q.add(R(g).multiply(this._getColor(U(g,N,D,M),j).a)),q=q.add(R(v).multiply(this._getColor(U(v,N,D,M),j).a)),q=q.add(R(S).multiply(this._getColor(U(S,N,D,M),j).a)),q=q.add(R(b).multiply(this._getColor(U(b,N,D,M),j).a)),q=q.add(R(_).multiply(this._getColor(U(_,N,D,M),j).a)),q=q.add(R(C).multiply(this._getColor(U(C,N,D,M),j).a)),q=q.add(R(P).multiply(this._getColor(U(P,N,D,M),j).a)),d(w(q,new n(.05)),new n(V),new n(z))}}t([e(0,o(q)),e(1,o(F))],A.prototype,"vertex",null),t([e(0,o(T))],A.prototype,"fragment",null);export{T as AnimatedMarkerFragmentInput,A as AnimatedMarkerShader,q as AnimatedMarkerVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{animationDebugFlags as e}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{FeatureTechnique as t}from"../FeatureTechnique.js";import{isHittest as a,getSelectionDefines as i,getFeatureTextures as n,getLocalTileOffset as r,getFeatureUniforms as o,resolveDynamicUniforms as s,getFeaturePipelineState as u}from"../featureTechniqueUtils.js";class m extends t{render(t,m){const{context:c,painter:l}=t,{target:g}=m,{freezeGlobalTime:d}=e,f=0,x=l.textureManager.animationStore.getTexture(c,f),p=m.instance.getInput(),T=l.textureManager.getMosaicInfo(t,m.textureKey,!1),{optionalAttributes:b}=p,h=b.zoomRange,D=b.value1Position2Value2,M="accumulatedDistance"in b&&!!b.accumulatedDistance,y="segmentDirection"in b&&!!b.segmentDirection,z="normal"in b&&!!b.normal;l.setShader({shader:this.shaders.geometry,uniforms:{...s(t,m.target,p.uniforms),...o(t,m.target),mosaicInfo:T,animationInfo:{globalTime:t.animationsEnabled?!1===d?t.time/1e3:d:0,animationTextureSize:[x.descriptor.width,x.descriptor.height]},localTileOffset:r(m.target)},textures:{...n(t),mosaicTexture:l.textureManager.getMosaicTexture(t,m.textureKey,!1),animationTexture:{unit:6,texture:x}},defines:{...i(t)},optionalAttributes:{zoomRange:h,value1Position2Value2:D,accumulatedDistance:M,segmentDirection:y,normal:z},useComputeBuffer:a(t)}),l.setPipelineState({...u(t)}),l.submitDraw(t,m),!1===d&&t.animationsEnabled&&g.requestRender()}}export{m as AnimatedTechnique};
2
+ import{animationDebugFlags as e}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{FeatureTechnique as t}from"../FeatureTechnique.js";import{isHittest as i,getSelectionDefines as a,getFeatureTextures as n,getLocalTileOffset as r,getFeatureUniforms as o,resolveDynamicUniforms as s,getFeaturePipelineState as u}from"../featureTechniqueUtils.js";class m extends t{render(t,m){const{context:c,painter:l}=t,{target:g}=m,{freezeGlobalTime:d}=e,f=0,x=l.textureManager.animationStore.getTexture(c,f),p=m.instance.getInput(),T=l.textureManager.getMosaicInfo(t,m.textureKey,!1),{optionalAttributes:b}=p,h=b.zoomRange,D=b.value1Position2Value2,M="accumulatedDistance"in b&&!!b.accumulatedDistance,y="segmentDirection"in b&&!!b.segmentDirection,z="normal"in b&&!!b.normal;l.setShader({shader:this.shaders.geometry,uniforms:{...s(t,m.target,p.uniforms),...o(t),mosaicInfo:T,animationInfo:{globalTime:t.animationsEnabled?!1===d?t.time/1e3:d:0,animationTextureSize:[x.descriptor.width,x.descriptor.height]},localTileOffset:r(m.target)},textures:{...n(t),mosaicTexture:l.textureManager.getMosaicTexture(t,m.textureKey,!1),animationTexture:{unit:6,texture:x}},defines:{...a(t)},optionalAttributes:{zoomRange:h,value1Position2Value2:D,accumulatedDistance:M,segmentDirection:y,normal:z},useComputeBuffer:i(t)}),l.setPipelineState({...u(t)}),l.submitDraw(t,m),!1===d&&t.animationsEnabled&&g.requestRender()}}export{m as AnimatedTechnique};