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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (604) hide show
  1. package/applications/WebEditor/geometryUtils.d.ts +1 -1
  2. package/arcade/arcadeAsyncRuntime.js +1 -1
  3. package/arcade/arcadeCompiler.js +1 -1
  4. package/arcade/arcadeRuntime.js +1 -1
  5. package/arcade/containerUtils.js +1 -1
  6. package/arcade/functions/track.js +1 -1
  7. package/arcgisGlobal.d.ts +2 -0
  8. package/assets/components/assets/icon/aiAgent16.json +1 -0
  9. package/assets/components/assets/icon/aiAgent24.json +1 -0
  10. package/assets/components/assets/icon/aiAgent32.json +1 -0
  11. package/assets/components/assets/icon/aiAgents16.json +1 -0
  12. package/assets/components/assets/icon/aiAgents24.json +1 -0
  13. package/assets/components/assets/icon/aiAgents32.json +1 -0
  14. package/assets/components/assets/icon/explodeGeometry16.json +1 -0
  15. package/assets/components/assets/icon/explodeGeometry24.json +1 -0
  16. package/assets/components/assets/icon/explodeGeometry32.json +1 -0
  17. package/assets/components/assets/icon/integration16.json +1 -0
  18. package/assets/components/assets/icon/integration24.json +1 -0
  19. package/assets/components/assets/icon/integration32.json +1 -0
  20. package/assets/components/assets/icon/spatiotemporalCatalog16.json +1 -0
  21. package/assets/components/assets/icon/spatiotemporalCatalog24.json +1 -0
  22. package/assets/components/assets/icon/spatiotemporalCatalog32.json +1 -0
  23. package/assets/components/assets/input-time-zone/t9n/messages.de.json +1 -1
  24. package/assets/esri/core/workers/RemoteClient.js +1 -1
  25. package/assets/esri/core/workers/chunks/000f91a18c22377f8525.js +1 -0
  26. package/assets/esri/core/workers/chunks/{c4a0d3149947a1d2c484.js → 006146ad6d4a5cbf1a1f.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{bd1a7e95a797e1ed4a7b.js → 013c17e07756fa465845.js} +1 -1
  28. package/assets/esri/core/workers/chunks/014eaccf2c2d357981f0.js +1 -0
  29. package/assets/esri/core/workers/chunks/{f253875feb11883deb84.js → 04d4cd66485b622403d0.js} +1 -1
  30. package/assets/esri/core/workers/chunks/05eb064f9b543890ae24.js +1 -0
  31. package/assets/esri/core/workers/chunks/05fbd1f373cfa3724f0c.js +1 -0
  32. package/assets/esri/core/workers/chunks/0809a55a2f9be07cc5a9.js +1 -0
  33. package/assets/esri/core/workers/chunks/0930738f43ce09b2ed2d.js +1 -0
  34. package/assets/esri/core/workers/chunks/{691434d4c6a38e63d819.js → 0a242e76bc293b0ad04b.js} +1 -1
  35. package/assets/esri/core/workers/chunks/0a4092578dc7578bcf76.js +1 -0
  36. package/assets/esri/core/workers/chunks/0e11bee9b56a7f51b012.js +1 -0
  37. package/assets/esri/core/workers/chunks/0e65869a5dd5a3917da7.js +1 -0
  38. package/assets/esri/core/workers/chunks/0ffb5a1275d07dcd9115.js +1 -0
  39. package/assets/esri/core/workers/chunks/{e370a3337b3c90240e73.js → 105da965fc90604eb6bf.js} +1 -1
  40. package/assets/esri/core/workers/chunks/1082bb0858585bd4fa21.js +2 -0
  41. package/assets/esri/core/workers/chunks/10c13c36c42c5ac41d12.js +1 -0
  42. package/assets/esri/core/workers/chunks/{5235b9c21ac4156c2375.js → 10f4c5533f50c3693318.js} +1 -1
  43. package/assets/esri/core/workers/chunks/1201bb22a2bfd7d7ecba.js +1 -0
  44. package/assets/esri/core/workers/chunks/16f55c5d642a23c2547e.js +1 -0
  45. package/assets/esri/core/workers/chunks/{09e01fd1c199be0c8e03.js → 16ffbe484f6cd4736f79.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{1bf967c68d0c795d3fb4.js → 19a4907fc93ae8b817e9.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{f74c7cbe4bd12f73ae90.js → 19d7339f20f3008c4893.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{9226205850e35b7fc610.js → 1a9f17781e0a3bc5106f.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{bf7875fda48b15271a10.js → 1bef7097fe5e402539ea.js} +1 -1
  50. package/assets/esri/core/workers/chunks/1d7f633f158062eb3f64.js +1 -0
  51. package/assets/esri/core/workers/chunks/{fa377112ef3b78f6ed18.js → 1de1cc0ed0f169a58aff.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{0549e2badf511e27aa54.js → 1e3b07cf0e608431a277.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{8a87e1a89a0d8c6203a7.js → 20feca2fdd304b3e9664.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{4c73c2f4331351e2a50c.js → 22ff018342860249b3eb.js} +1 -1
  55. package/assets/esri/core/workers/chunks/248df6fda489a9de5852.js +1 -0
  56. package/assets/esri/core/workers/chunks/2524e2385f61a6898411.js +1 -0
  57. package/assets/esri/core/workers/chunks/279b16727d4b515eca44.js +1 -0
  58. package/assets/esri/core/workers/chunks/2b10d6597af3eeec5396.js +1 -0
  59. package/assets/esri/core/workers/chunks/2bd4b536e329112591c4.js +1 -0
  60. package/assets/esri/core/workers/chunks/2c01477b69c38f691e19.js +1 -0
  61. package/assets/esri/core/workers/chunks/2e2349387a2b9903f13c.js +2 -0
  62. package/assets/esri/core/workers/chunks/{e594b6db9caee1f7b9fc.js → 32aa1529e84b839d051d.js} +1 -1
  63. package/assets/esri/core/workers/chunks/33041e50ea02d99480b0.js +1 -0
  64. package/assets/esri/core/workers/chunks/{5d7a5aa608ed6192b016.js → 349982635e921e838030.js} +1 -1
  65. package/assets/esri/core/workers/chunks/35d0a7597473d46866de.js +1 -0
  66. package/assets/esri/core/workers/chunks/374d726fdd0a9848cea5.js +1 -0
  67. package/assets/esri/core/workers/chunks/379f5ca5372d834af497.js +1 -0
  68. package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +1 -0
  69. package/assets/esri/core/workers/chunks/{05393b23ab24126d4236.js → 38bc5d09ae07f486d457.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{d270b49c037085503016.js → 3a9435569ba460ff7e3d.js} +1 -1
  71. package/assets/esri/core/workers/chunks/3bafa01ca01a67d09432.js +1 -0
  72. package/assets/esri/core/workers/chunks/3c7901ea007c9615ba54.js +1 -0
  73. package/assets/esri/core/workers/chunks/4047208f9559e06d7102.js +1 -0
  74. package/assets/esri/core/workers/chunks/4049e9b86c8e27a7ff12.js +1 -0
  75. package/assets/esri/core/workers/chunks/411bbdecba340df11d95.js +2 -0
  76. package/assets/esri/core/workers/chunks/42b5533f94ebcdc4befe.js +1 -0
  77. package/assets/esri/core/workers/chunks/44ca13c874b5aa0ed5a0.js +1 -0
  78. package/assets/esri/core/workers/chunks/{e488e5c62cb375c87a39.js → 471027e4280bd51167b0.js} +1 -1
  79. package/assets/esri/core/workers/chunks/4717831effb1ac6d5f5d.js +1 -0
  80. package/assets/esri/core/workers/chunks/{a89dbef8155d7c4354da.js → 476535cfb06ced74d611.js} +2 -2
  81. package/assets/esri/core/workers/chunks/486f1277fe834c0fc4c1.js +1 -0
  82. package/assets/esri/core/workers/chunks/48ade66f1685a1aaffba.js +1 -0
  83. package/assets/esri/core/workers/chunks/4c088c26d5d546c95c90.js +1 -0
  84. package/assets/esri/core/workers/chunks/4d13c1a04788e5222678.js +1 -0
  85. package/assets/esri/core/workers/chunks/{a46ac0be9aabc4cfedc7.js → 4d7f6c92041d52cc8732.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{595edbc1e9bba47d5676.js → 4f89da01b67b66a92c01.js} +1 -1
  87. package/assets/esri/core/workers/chunks/507bbcde2b39321b50a4.js +1 -0
  88. package/assets/esri/core/workers/chunks/{9b8e33985310f281f084.js → 56a5b65961e722f5cae9.js} +1 -1
  89. package/assets/esri/core/workers/chunks/5830deda121e4c95d199.js +1 -0
  90. package/assets/esri/core/workers/chunks/{19e93d4d37018e3ee849.js → 58a52adc42fbe5cd12c6.js} +1 -1
  91. package/assets/esri/core/workers/chunks/{b0e25ccb5a1e57a82628.js → 58b93f13316196d2e97d.js} +1 -1
  92. package/assets/esri/core/workers/chunks/58f98bd89b644cfdafae.js +1 -0
  93. package/assets/esri/core/workers/chunks/5a8658e4ef5163e8ab3b.js +1 -0
  94. package/assets/esri/core/workers/chunks/5aa3e1e9c701c7fef6e4.js +1 -0
  95. package/assets/esri/core/workers/chunks/5bb8d9d887dd4211afd2.js +1 -0
  96. package/assets/esri/core/workers/chunks/5d7625eb9997cd0dff09.js +1 -0
  97. package/assets/esri/core/workers/chunks/5e56a004b4407b8066eb.js +1 -0
  98. package/assets/esri/core/workers/chunks/5efc66be4576c6f67064.js +1 -0
  99. package/assets/esri/core/workers/chunks/60b1af54e7fc20fd9588.js +1 -0
  100. package/assets/esri/core/workers/chunks/6134a2c6983792787184.js +1 -0
  101. package/assets/esri/core/workers/chunks/6319413b89e23f671487.js +1 -0
  102. package/assets/esri/core/workers/chunks/{e50adcfb392adfb3f79c.js → 633454b27c34f9ec7940.js} +1 -1
  103. package/assets/esri/core/workers/chunks/63c43ebf46964c283b4d.js +1 -0
  104. package/assets/esri/core/workers/chunks/65d3638ded62c5606ae3.js +1 -0
  105. package/assets/esri/core/workers/chunks/{aa0ef4493a7e9bed159f.js → 662f4b39ec44c68e0733.js} +1 -1
  106. package/assets/esri/core/workers/chunks/680bef5e8237cc3bdd84.js +1 -0
  107. package/assets/esri/core/workers/chunks/6835f959952f70972fce.js +1 -0
  108. package/assets/esri/core/workers/chunks/{ddf284648a73b6993737.js → 68d823697c298122ee08.js} +1 -1
  109. package/assets/esri/core/workers/chunks/6aaefd61505027267c9b.js +1 -0
  110. package/assets/esri/core/workers/chunks/6ceb17eada151230abf7.js +1 -0
  111. package/assets/esri/core/workers/chunks/6df29716f75696434807.js +1 -0
  112. package/assets/esri/core/workers/chunks/6e804bd6bb4b0ee44fa9.js +1 -0
  113. package/assets/esri/core/workers/chunks/{ee77999df3785468b2b6.js → 6f6e8b7e6e2c856e4ed1.js} +1 -1
  114. package/assets/esri/core/workers/chunks/{8ea28a4b1afe8bb2d313.js → 7091bbdc36f1f03f14b3.js} +1 -1
  115. package/assets/esri/core/workers/chunks/7608de0d942b4c16b2f6.js +1 -0
  116. package/assets/esri/core/workers/chunks/{4b6f433022a6822706cb.js → 762817d30474c15142b4.js} +1 -1
  117. package/assets/esri/core/workers/chunks/762e9a15b2638475a2b4.js +1 -0
  118. package/assets/esri/core/workers/chunks/79088d5c9c2e6a780929.js +1 -0
  119. package/assets/esri/core/workers/chunks/7bb3411a86cdd736d555.js +1 -0
  120. package/assets/esri/core/workers/chunks/{f3d57c5b9dffd12e45b4.js → 7c3a89c12ea32a071ad4.js} +1 -1
  121. package/assets/esri/core/workers/chunks/7c67596c0792282afdfc.js +1 -0
  122. package/assets/esri/core/workers/chunks/7cef6e5f39137e74bbc3.js +1 -0
  123. package/assets/esri/core/workers/chunks/7efc51324cfc8e08c756.js +1 -0
  124. package/assets/esri/core/workers/chunks/{87e0ceb1a64ab08e679a.js → 7fd54fa2f91cdab44ab3.js} +1 -1
  125. package/assets/esri/core/workers/chunks/822a5020afbca21df7f7.js +1 -0
  126. package/assets/esri/core/workers/chunks/8599d2f2eb0fbb4a8bf5.js +1 -0
  127. package/assets/esri/core/workers/chunks/862f7090ba4a56c07093.js +1 -0
  128. package/assets/esri/core/workers/chunks/{97c7dfd29ad4c2966cb4.js → 88252899a5291ad29710.js} +1 -1
  129. package/assets/esri/core/workers/chunks/8837fbcc0d484659b79c.js +1 -0
  130. package/assets/esri/core/workers/chunks/8dcc7749de3391710864.js +1 -0
  131. package/assets/esri/core/workers/chunks/900dad076347443b3ad9.js +1 -0
  132. package/assets/esri/core/workers/chunks/{f8f7b86bbd62106bc3d4.js → 925f83be3c1eb4b5c6af.js} +1 -1
  133. package/assets/esri/core/workers/chunks/{a4a22149077c7780481c.js → 9378ce457b02717304e6.js} +1 -1
  134. package/assets/esri/core/workers/chunks/93a7cf23f73b23fc7802.js +1 -0
  135. package/assets/esri/core/workers/chunks/93c1d1e7c0935242071e.js +1 -0
  136. package/assets/esri/core/workers/chunks/{fddcb8be714ad18ad0c8.js → 970b33947bf61fccd461.js} +1 -1
  137. package/assets/esri/core/workers/chunks/97aaff86e06380a68df8.js +1 -0
  138. package/assets/esri/core/workers/chunks/9bc7df2b8ae0ed443d13.js +1 -0
  139. package/assets/esri/core/workers/chunks/9cc14a41d4a90f6d626e.js +1 -0
  140. package/assets/esri/core/workers/chunks/9e514a58b1165e273202.js +1 -0
  141. package/assets/esri/core/workers/chunks/9fe1db0762ab3326eab4.js +1 -0
  142. package/assets/esri/core/workers/chunks/{a5bb19d2b7d7db22222b.js → a10188c4d1904965898a.js} +1 -1
  143. package/assets/esri/core/workers/chunks/a2288d44cba34d947613.js +1 -0
  144. package/assets/esri/core/workers/chunks/a26916de4c105859621e.js +1 -0
  145. package/assets/esri/core/workers/chunks/a322afbb48898ce35851.js +1 -0
  146. package/assets/esri/core/workers/chunks/a34cadd486e7fcc79063.js +1 -0
  147. package/assets/esri/core/workers/chunks/{cefb70d633c220cbedf9.js → a4dc1a80ed6604d71722.js} +1 -1
  148. package/assets/esri/core/workers/chunks/{20f6e681ccd8bf884b77.js → a72983c3621810d4b1af.js} +1 -1
  149. package/assets/esri/core/workers/chunks/a8e9aa5461c71c88e2e5.js +1 -0
  150. package/assets/esri/core/workers/chunks/{32f11b4aeae1ef00e466.js → a8f70cece5ce2b095cdd.js} +1 -1
  151. package/assets/esri/core/workers/chunks/ab332bd411d6c7d4190c.js +1 -0
  152. package/assets/esri/core/workers/chunks/{777f2fdf1f4b9f243893.js → ab3a6ce7bc2a27b92469.js} +1 -1
  153. package/assets/esri/core/workers/chunks/{15f4f7e34e14e3cf52e6.js → abd2f8fae6b918fbdd6d.js} +1 -1
  154. package/assets/esri/core/workers/chunks/{b13d2da33ec07e9d41ff.js → b0da2b089a89d643df1e.js} +1 -1
  155. package/assets/esri/core/workers/chunks/{65f4ca7201e7267bfc81.js → b5fcf4165ac72654742d.js} +1 -1
  156. package/assets/esri/core/workers/chunks/b82b523b6837ed1f28d3.js +2 -0
  157. package/assets/esri/core/workers/chunks/{527b87fddf33bb5d519e.js → ba77a8892cb23c7a297d.js} +1 -1
  158. package/assets/esri/core/workers/chunks/bb8089929ded0613d8e7.js +1 -0
  159. package/assets/esri/core/workers/chunks/bc7ca87d3bfe8a4aec81.js +1 -0
  160. package/assets/esri/core/workers/chunks/bc9b96a539f28afcb8cb.js +1 -0
  161. package/assets/esri/core/workers/chunks/{2d07d5a9ec67c39ef10c.js → bd4f29d2681e5596591a.js} +1 -1
  162. package/assets/esri/core/workers/chunks/bf9eba555aebca2c132b.js +1 -0
  163. package/assets/esri/core/workers/chunks/{903c7bd079888f65fef1.js → c3fbd81bb5820e48038f.js} +1 -1
  164. package/assets/esri/core/workers/chunks/c9df18e9ff7367a004b6.js +1 -0
  165. package/assets/esri/core/workers/chunks/ca8061e0a6d78d646ebf.js +1 -0
  166. package/assets/esri/core/workers/chunks/cc73ac8404615dc392d2.js +1 -0
  167. package/assets/esri/core/workers/chunks/{e823c9ccb7bc348d8824.js → ccb26860518dce6d01c0.js} +1 -1
  168. package/assets/esri/core/workers/chunks/cded34b161fcc790e672.js +1 -0
  169. package/assets/esri/core/workers/chunks/{1bf5c0a4bc5a960a3fa2.js → d1d4979e9dcabe5e4619.js} +1 -1
  170. package/assets/esri/core/workers/chunks/d2865c604849ce79183f.js +1 -0
  171. package/assets/esri/core/workers/chunks/{9b81bd62a2c72f592db1.js → d826f6d32b4c5885276a.js} +1 -1
  172. package/assets/esri/core/workers/chunks/d92540d3ffc4af980dd8.js +1 -0
  173. package/assets/esri/core/workers/chunks/dc7853795439ae77ace9.js +1 -0
  174. package/assets/esri/core/workers/chunks/dd55737fba0a8fe68101.js +1684 -0
  175. package/assets/esri/core/workers/chunks/dd8d19eb6b8e955c8067.js +1 -0
  176. package/assets/esri/core/workers/chunks/dda269a088275c823b40.js +1 -0
  177. package/assets/esri/core/workers/chunks/{97e41500fc2d24a88938.js → de95dee8db92cf8f796f.js} +1 -1
  178. package/assets/esri/core/workers/chunks/e1c8767143f9f9d1f049.js +1 -0
  179. package/assets/esri/core/workers/chunks/e5b6fa57cc4028fbd401.js +1 -0
  180. package/assets/esri/core/workers/chunks/{2cf2f2842c19be84ab4d.js → e6cb31c727f799c1297c.js} +1 -1
  181. package/assets/esri/core/workers/chunks/e7fdad0c07beb3614b60.js +1 -0
  182. package/assets/esri/core/workers/chunks/e934ef66d130c212c05b.js +1 -0
  183. package/assets/esri/core/workers/chunks/{7c56446184abcd14678b.js → ea77654c8964cc39b9a6.js} +1 -1
  184. package/assets/esri/core/workers/chunks/eb167f9f6132a6348d2e.js +1 -0
  185. package/assets/esri/core/workers/chunks/ed5ac1efd3cba49be756.js +1 -0
  186. package/assets/esri/core/workers/chunks/ef24fd6c0322e5de9fdf.js +2 -0
  187. package/assets/esri/core/workers/chunks/f219ba010c480bb75684.js +1 -0
  188. package/assets/esri/core/workers/chunks/f331c24247d132589859.js +1 -0
  189. package/assets/esri/core/workers/chunks/fbf2d90240d36f8b423f.js +1 -0
  190. package/assets/esri/core/workers/chunks/{4ee99e654dad6f09abee.js → fc042b9936686785c39e.js} +1 -1
  191. package/assets/esri/core/workers/chunks/fc1658eae7b312502fab.js +1 -0
  192. package/assets/esri/core/workers/chunks/{1ab8307ba9981124f669.js → fd4d124c5bf810d9e352.js} +1 -1
  193. package/assets/esri/core/workers/chunks/ffa35ecc681ec1c4739a.js +1 -0
  194. package/assets/esri/core/workers/chunks/ffca0b2333e760b66d3a.js +1 -0
  195. package/chunks/{GlowBlur.glsl.js → BlurEmission.glsl.js} +1 -1
  196. package/chunks/EmissionComposite.glsl.js +3 -3
  197. package/chunks/Fog.glsl.js +5 -3
  198. package/chunks/RibbonLine.glsl.js +52 -52
  199. package/config.js +1 -1
  200. package/core/timeUtils.d.ts +62 -0
  201. package/core/timeUtils.js +1 -1
  202. package/editing/sharedTemplates/executor/builders/bufferLineToPolygon.js +1 -1
  203. package/editing/sharedTemplates/executor/builders/bufferPointToPolygon.js +1 -1
  204. package/editing/sharedTemplates/executor/builders/bufferPolygonToPolygon.js +1 -1
  205. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  206. package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
  207. package/editing/sharedTemplates/executor/support/createPresetServiceEdit.js +1 -1
  208. package/geometry/Polygon.js +1 -1
  209. package/geometry/geometryEngine.d.ts +36 -36
  210. package/geometry/operators/affineTransformOperator.d.ts +30 -1
  211. package/geometry/operators/affineTransformOperator.js +1 -1
  212. package/geometry/operators/alphaShapeOperator.d.ts +49 -5
  213. package/geometry/operators/alphaShapeOperator.js +1 -1
  214. package/geometry/operators/areaOperator.d.ts +28 -4
  215. package/geometry/operators/areaOperator.js +1 -1
  216. package/geometry/operators/autoCompleteOperator.d.ts +25 -2
  217. package/geometry/operators/autoCompleteOperator.js +1 -1
  218. package/geometry/operators/boundaryOperator.d.ts +40 -2
  219. package/geometry/operators/boundaryOperator.js +1 -1
  220. package/geometry/operators/bufferOperator.d.ts +51 -6
  221. package/geometry/operators/bufferOperator.js +1 -1
  222. package/geometry/operators/centroidOperator.d.ts +23 -2
  223. package/geometry/operators/centroidOperator.js +1 -1
  224. package/geometry/operators/clipOperator.d.ts +34 -2
  225. package/geometry/operators/clipOperator.js +1 -1
  226. package/geometry/operators/containsOperator.d.ts +32 -2
  227. package/geometry/operators/containsOperator.js +1 -1
  228. package/geometry/operators/convexHullOperator.d.ts +47 -4
  229. package/geometry/operators/convexHullOperator.js +1 -1
  230. package/geometry/operators/crossesOperator.d.ts +35 -2
  231. package/geometry/operators/crossesOperator.js +1 -1
  232. package/geometry/operators/cutOperator.d.ts +23 -2
  233. package/geometry/operators/cutOperator.js +1 -1
  234. package/geometry/operators/densifyOperator.d.ts +61 -6
  235. package/geometry/operators/densifyOperator.js +1 -1
  236. package/geometry/operators/differenceOperator.d.ts +34 -2
  237. package/geometry/operators/differenceOperator.js +1 -1
  238. package/geometry/operators/disjointOperator.d.ts +33 -2
  239. package/geometry/operators/disjointOperator.js +1 -1
  240. package/geometry/operators/distanceOperator.d.ts +29 -4
  241. package/geometry/operators/distanceOperator.js +1 -1
  242. package/geometry/operators/equalsOperator.d.ts +32 -2
  243. package/geometry/operators/equalsOperator.js +1 -1
  244. package/geometry/operators/extendOperator.d.ts +29 -3
  245. package/geometry/operators/extendOperator.js +1 -1
  246. package/geometry/operators/generalizeOperator.d.ts +46 -5
  247. package/geometry/operators/generalizeOperator.js +1 -1
  248. package/geometry/operators/geodesicBufferOperator.d.ts +71 -7
  249. package/geometry/operators/geodesicBufferOperator.js +1 -1
  250. package/geometry/operators/geodesicProximityOperator.d.ts +106 -14
  251. package/geometry/operators/geodesicProximityOperator.js +1 -1
  252. package/geometry/operators/geodeticAreaOperator.d.ts +51 -5
  253. package/geometry/operators/geodeticAreaOperator.js +1 -1
  254. package/geometry/operators/geodeticDensifyOperator.d.ts +65 -6
  255. package/geometry/operators/geodeticDensifyOperator.js +1 -1
  256. package/geometry/operators/geodeticDistanceOperator.d.ts +52 -5
  257. package/geometry/operators/geodeticDistanceOperator.js +1 -1
  258. package/geometry/operators/geodeticLengthOperator.d.ts +51 -5
  259. package/geometry/operators/geodeticLengthOperator.js +1 -1
  260. package/geometry/operators/geodeticUtilsOperator.d.ts +79 -9
  261. package/geometry/operators/geodeticUtilsOperator.js +1 -1
  262. package/geometry/operators/graphicBufferOperator.d.ts +47 -4
  263. package/geometry/operators/graphicBufferOperator.js +1 -1
  264. package/geometry/operators/integrateOperator.d.ts +24 -2
  265. package/geometry/operators/integrateOperator.js +1 -1
  266. package/geometry/operators/intersectionOperator.d.ts +88 -3
  267. package/geometry/operators/intersectionOperator.js +1 -1
  268. package/geometry/operators/intersectsOperator.d.ts +32 -2
  269. package/geometry/operators/intersectsOperator.js +1 -1
  270. package/geometry/operators/isNearOperator.d.ts +31 -4
  271. package/geometry/operators/isNearOperator.js +1 -1
  272. package/geometry/operators/json/bufferOperator.js +1 -1
  273. package/geometry/operators/json/containsOperator.js +1 -1
  274. package/geometry/operators/json/convexHullOperator.js +1 -1
  275. package/geometry/operators/json/crossesOperator.js +1 -1
  276. package/geometry/operators/json/disjointOperator.js +1 -1
  277. package/geometry/operators/json/generalizeOperator.js +1 -1
  278. package/geometry/operators/json/geodesicBufferOperator.js +1 -1
  279. package/geometry/operators/json/graphicBufferOperator.js +1 -1
  280. package/geometry/operators/json/intersectionOperator.js +1 -1
  281. package/geometry/operators/json/intersectsOperator.js +1 -1
  282. package/geometry/operators/json/lengthOperator.js +1 -1
  283. package/geometry/operators/json/offsetOperator.js +1 -1
  284. package/geometry/operators/json/overlapsOperator.js +1 -1
  285. package/geometry/operators/json/projectOperator.js +1 -1
  286. package/geometry/operators/json/simplifyOperator.js +1 -1
  287. package/geometry/operators/json/simplifyOperatorOGC.js +1 -1
  288. package/geometry/operators/json/touchesOperator.js +1 -1
  289. package/geometry/operators/json/unionOperator.js +1 -1
  290. package/geometry/operators/json/withinOperator.js +1 -1
  291. package/geometry/operators/labelPointOperator.d.ts +32 -2
  292. package/geometry/operators/labelPointOperator.js +1 -1
  293. package/geometry/operators/lengthOperator.d.ts +28 -4
  294. package/geometry/operators/lengthOperator.js +1 -1
  295. package/geometry/operators/linesToPolygonsOperator.d.ts +23 -2
  296. package/geometry/operators/linesToPolygonsOperator.js +1 -1
  297. package/geometry/operators/locateBetweenOperator.d.ts +28 -2
  298. package/geometry/operators/locateBetweenOperator.js +1 -1
  299. package/geometry/operators/minimumBoundingCircleOperator.d.ts +38 -4
  300. package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
  301. package/geometry/operators/multiPartToSinglePartOperator.d.ts +33 -4
  302. package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
  303. package/geometry/operators/offsetOperator.d.ts +50 -5
  304. package/geometry/operators/offsetOperator.js +1 -1
  305. package/geometry/operators/overlapsOperator.d.ts +33 -2
  306. package/geometry/operators/overlapsOperator.js +1 -1
  307. package/geometry/operators/polygonOverlayOperator.d.ts +31 -5
  308. package/geometry/operators/polygonOverlayOperator.js +1 -1
  309. package/geometry/operators/polygonSlicerOperator.d.ts +72 -10
  310. package/geometry/operators/polygonSlicerOperator.js +1 -1
  311. package/geometry/operators/projectOperator.d.ts +63 -3
  312. package/geometry/operators/projectOperator.js +1 -1
  313. package/geometry/operators/proximityOperator.d.ts +71 -9
  314. package/geometry/operators/proximityOperator.js +1 -1
  315. package/geometry/operators/relateOperator.d.ts +41 -2
  316. package/geometry/operators/relateOperator.js +1 -1
  317. package/geometry/operators/reshapeOperator.d.ts +28 -2
  318. package/geometry/operators/reshapeOperator.js +1 -1
  319. package/geometry/operators/shapePreservingProjectOperator.d.ts +64 -6
  320. package/geometry/operators/shapePreservingProjectOperator.js +1 -1
  321. package/geometry/operators/simplifyOGCOperator.d.ts +72 -6
  322. package/geometry/operators/simplifyOGCOperator.js +1 -1
  323. package/geometry/operators/simplifyOperator.d.ts +72 -4
  324. package/geometry/operators/simplifyOperator.js +1 -1
  325. package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
  326. package/geometry/operators/support/Transformation.d.ts +17 -11
  327. package/geometry/operators/support/jsonConverter.js +1 -1
  328. package/geometry/operators/symmetricDifferenceOperator.d.ts +33 -2
  329. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  330. package/geometry/operators/touchesOperator.d.ts +32 -2
  331. package/geometry/operators/touchesOperator.js +1 -1
  332. package/geometry/operators/types.d.ts +4 -1
  333. package/geometry/operators/unionOperator.d.ts +33 -2
  334. package/geometry/operators/unionOperator.js +1 -1
  335. package/geometry/operators/withinOperator.d.ts +32 -2
  336. package/geometry/operators/withinOperator.js +1 -1
  337. package/geometry/projectionUtils.js +1 -1
  338. package/geometry/support/geometryUtils.js +1 -1
  339. package/geometry/support/normalizeUtils.d.ts +5 -3
  340. package/geometry/support/normalizeUtils.js +1 -1
  341. package/interfaces.d.ts +202 -202
  342. package/kernel.js +1 -1
  343. package/layers/AnnotationFeatureLayer.d.ts +0 -1
  344. package/layers/graphics/data/QueryEngineResult.js +1 -1
  345. package/layers/graphics/data/queryUtils.js +1 -1
  346. package/layers/graphics/data/spatialQuerySupport.js +1 -1
  347. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  348. package/layers/mixins/ArcGISImageService.js +1 -1
  349. package/layers/mixins/TiledImagery.js +1 -1
  350. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  351. package/layers/raster/datasets/FunctionRaster.js +1 -1
  352. package/layers/raster/datasets/pixelReader.js +1 -1
  353. package/layers/raster/functions/clipUtils.js +1 -1
  354. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  355. package/layers/support/Sublayer.js +1 -1
  356. package/layers/video/videoUtils.js +1 -1
  357. package/package.json +4 -4
  358. package/popup/FeatureContentCollection.d.ts +3 -3
  359. package/popup/FeatureContentCollection.js +1 -1
  360. package/rest/imageService/fetchRasterInfo.js +1 -1
  361. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  362. package/support/revision.js +1 -1
  363. package/support/tests/serviceMockDependencies.js +1 -1
  364. package/support/tests/setupServiceMocksMesh.js +1 -1
  365. package/symbols/cim/CIMEffects.js +1 -1
  366. package/symbols/cim/effects/EffectBuffer.js +1 -1
  367. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  368. package/symbols/cim/effects/EffectDonut.js +1 -1
  369. package/symbols/cim/effects/EffectEnclosingPolygon.js +1 -1
  370. package/symbols/cim/effects/EffectOffset.js +1 -1
  371. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  372. package/symbols/cim/types.d.ts +2 -1
  373. package/views/2d/analysis/AreaMeasurement/AreaMeasurementController.js +1 -1
  374. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementController.js +1 -1
  375. package/views/2d/engine/webgl/Overlay.js +1 -1
  376. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  377. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  378. package/views/2d/layers/TileLayerView2D.js +1 -1
  379. package/views/2d/layers/support/RouteLayerWaypointVisualization.js +1 -1
  380. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  381. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementController.js +1 -1
  382. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  383. package/views/3d/layers/ElevationLayerView3DModifications.js +1 -1
  384. package/views/3d/layers/I3SMeshView3D.js +1 -1
  385. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  386. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  387. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  388. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  389. package/views/3d/state/ViewStateManager.js +1 -1
  390. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  391. package/views/3d/webgl/RenderCamera.js +1 -1
  392. package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +1 -5
  393. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  394. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  395. package/views/3d/webgl-engine/effects/fog/FogTechnique.js +1 -1
  396. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  397. package/views/3d/webgl-engine/effects/glow/{GlowBlur.glsl.js → BlurEmission.glsl.js} +1 -1
  398. package/views/3d/webgl-engine/effects/glow/BlurEmission.js +2 -0
  399. package/views/3d/webgl-engine/effects/glow/BlurEmissionTechnique.js +2 -0
  400. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +37 -0
  401. package/views/3d/webgl-engine/lib/BufferGeometry.js +2 -0
  402. package/views/3d/webgl-engine/lib/EmissionComposite.glsl.js +1 -1
  403. package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
  404. package/views/3d/webgl-engine/lib/EmissionCompositeTechnique.js +1 -1
  405. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  406. package/views/3d/webgl-engine/lib/GeometryBaseInstance.js +1 -1
  407. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  408. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  409. package/views/3d/webgl-engine/lib/rendererUtils.js +1 -1
  410. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  411. package/views/3d/webgl-engine/materials/renderers/Instance.js +1 -1
  412. package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
  413. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  414. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  415. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  416. package/views/3d/webgl-engine/shaders/EmissiveTechniqueConfiguration.js +1 -1
  417. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  418. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  419. package/views/3d/webgl-engine/shaders/floatBlendScale.glsl.js +1 -1
  420. package/views/MapView.d.ts +3 -3
  421. package/views/SceneView.d.ts +1 -0
  422. package/views/SceneView.js +1 -1
  423. package/views/VideoView.js +1 -1
  424. package/views/View2D.d.ts +22 -22
  425. package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
  426. package/views/draw/DrawTool.js +1 -1
  427. package/views/draw/support/createUtils.js +1 -1
  428. package/views/layers/SceneLayerView.js +1 -1
  429. package/views/support/GeometryWorker.js +1 -1
  430. package/views/support/imageReprojection.js +1 -1
  431. package/views/video/VideoOperationalDataView.js +1 -1
  432. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  433. package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
  434. package/widgets/BatchAttributeForm/expressions/expressionUtils.js +1 -1
  435. package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
  436. package/widgets/BatchAttributeForm/templates/FieldElementTemplate.js +1 -1
  437. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  438. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  439. package/widgets/Editor/support/mergeFeaturesUtils.js +1 -1
  440. package/widgets/Editor/support/splitFeatureUtils.js +1 -1
  441. package/widgets/ElevationProfile/support/ElevationProfileView.js +1 -1
  442. package/widgets/ElevationProfile/support/InputRepresentation2D.js +1 -1
  443. package/widgets/ElevationProfile/support/InputRepresentation3D.js +1 -1
  444. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  445. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  446. package/widgets/Features/FeaturesViewModel.js +1 -1
  447. package/widgets/Features.js +1 -1
  448. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  449. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  450. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  451. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  452. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  453. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  454. package/widgets/OrientedImageryViewer/support/panConstraint.js +1 -1
  455. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
  456. package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
  457. package/widgets/Print.js +1 -1
  458. package/widgets/Search/SearchViewModel.js +1 -1
  459. package/widgets/Search/support/layerSearchUtils.js +1 -1
  460. package/widgets/Search/support/locatorUtils.js +1 -1
  461. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  462. package/widgets/support/FilterBuilder/FilterBuilderViewModel.d.ts +104 -0
  463. package/widgets/support/FilterBuilder/FilterBuilderViewModel.js +1 -1
  464. package/widgets/support/FilterBuilder.js +1 -1
  465. package/widgets/support/FilterCondition/FilterConditionViewModel.d.ts +145 -0
  466. package/widgets/support/FilterCondition/FilterConditionViewModel.js +1 -1
  467. package/widgets/support/FilterCondition/types.d.ts +20 -0
  468. package/widgets/support/ItemList.js +1 -1
  469. package/widgets/support/SelectionList/FeatureItem.d.ts +17 -68
  470. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  471. package/widgets/support/SelectionList/GroupLayerItem.d.ts +12 -50
  472. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  473. package/widgets/support/SelectionList/ItemBase.d.ts +14 -44
  474. package/widgets/support/SelectionList/ItemBase.js +1 -1
  475. package/widgets/support/SelectionList/LayerItem.d.ts +10 -56
  476. package/widgets/support/SelectionList/LayerItem.js +1 -1
  477. package/widgets/support/SelectionList/types.d.ts +4 -4
  478. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  479. package/assets/esri/core/workers/chunks/0336f4f8498a22347720.js +0 -1
  480. package/assets/esri/core/workers/chunks/090ea7a131f8f60203ed.js +0 -1
  481. package/assets/esri/core/workers/chunks/0b4a7209b99227a842ad.js +0 -1
  482. package/assets/esri/core/workers/chunks/0be98adfef79fc5036f0.js +0 -1
  483. package/assets/esri/core/workers/chunks/0d2e2d90a4e4a28e2c0c.js +0 -1
  484. package/assets/esri/core/workers/chunks/0d7763d39a5a8586a0ae.js +0 -1
  485. package/assets/esri/core/workers/chunks/0d95f72e1c07ab867d21.js +0 -1
  486. package/assets/esri/core/workers/chunks/0dbbac7a2378728571a7.js +0 -1
  487. package/assets/esri/core/workers/chunks/104d74bc36c28c519396.js +0 -1
  488. package/assets/esri/core/workers/chunks/1554feab934e8e1bcd28.js +0 -1
  489. package/assets/esri/core/workers/chunks/1670e9867efde4d7a6d6.js +0 -1
  490. package/assets/esri/core/workers/chunks/188c6ff5f4664827c254.js +0 -2
  491. package/assets/esri/core/workers/chunks/19ab024f6f732fd6c69b.js +0 -1
  492. package/assets/esri/core/workers/chunks/1e192ac0533a5c0b5a7a.js +0 -1
  493. package/assets/esri/core/workers/chunks/1fe077f57a087c0e9119.js +0 -1
  494. package/assets/esri/core/workers/chunks/20f7b5fe64a217cb3d3d.js +0 -1
  495. package/assets/esri/core/workers/chunks/212222b64039d436b9a6.js +0 -1
  496. package/assets/esri/core/workers/chunks/22c94f9a69b2157f8dbd.js +0 -1
  497. package/assets/esri/core/workers/chunks/24944b625ed8dcd904f0.js +0 -1
  498. package/assets/esri/core/workers/chunks/24c44541046576fee7e0.js +0 -2
  499. package/assets/esri/core/workers/chunks/2754ba5cc094028a7a3c.js +0 -1
  500. package/assets/esri/core/workers/chunks/2bc3e7f394386fa75447.js +0 -1
  501. package/assets/esri/core/workers/chunks/2ec44ebc48beeba11201.js +0 -1
  502. package/assets/esri/core/workers/chunks/30af0f7c4cfa541c9efd.js +0 -1
  503. package/assets/esri/core/workers/chunks/30d816bdeea00f6fa1ca.js +0 -1
  504. package/assets/esri/core/workers/chunks/349b0c7febc46267441d.js +0 -1684
  505. package/assets/esri/core/workers/chunks/35d46c2f658a8e92d913.js +0 -1
  506. package/assets/esri/core/workers/chunks/3869dca884d7ca6488f5.js +0 -1
  507. package/assets/esri/core/workers/chunks/3a65693964e3976d8035.js +0 -1
  508. package/assets/esri/core/workers/chunks/3f5234120d3a14186c1c.js +0 -1
  509. package/assets/esri/core/workers/chunks/45c1c90ac6c14657f3ff.js +0 -1
  510. package/assets/esri/core/workers/chunks/48726010778d6004e347.js +0 -2
  511. package/assets/esri/core/workers/chunks/4a40b894ec89b0a4f9bf.js +0 -1
  512. package/assets/esri/core/workers/chunks/5165d367328ac7badf47.js +0 -1
  513. package/assets/esri/core/workers/chunks/545bec045167c433af8f.js +0 -1
  514. package/assets/esri/core/workers/chunks/5782c0362a1799ceef41.js +0 -1
  515. package/assets/esri/core/workers/chunks/59598023c0aea62a6297.js +0 -1
  516. package/assets/esri/core/workers/chunks/59f0a2bd40b033ce77e4.js +0 -1
  517. package/assets/esri/core/workers/chunks/5aa23b0f4521ba9a07ad.js +0 -1
  518. package/assets/esri/core/workers/chunks/5af16937904c06fb06f6.js +0 -1
  519. package/assets/esri/core/workers/chunks/5bf2ce280ea35ea4c96b.js +0 -1
  520. package/assets/esri/core/workers/chunks/607acd9f615f87e14075.js +0 -1
  521. package/assets/esri/core/workers/chunks/62ee6c247f783acabb74.js +0 -1
  522. package/assets/esri/core/workers/chunks/6564f17c4700dc8d9c0e.js +0 -2
  523. package/assets/esri/core/workers/chunks/6a2d890640b2cd6c5ccb.js +0 -1
  524. package/assets/esri/core/workers/chunks/6b84982dfaf084a61b93.js +0 -1
  525. package/assets/esri/core/workers/chunks/6b9dbf43c0659e55c539.js +0 -1
  526. package/assets/esri/core/workers/chunks/6cbc30b31f0bb39c73ca.js +0 -1
  527. package/assets/esri/core/workers/chunks/75b90fb05e4a2d32b7bb.js +0 -1
  528. package/assets/esri/core/workers/chunks/75bddfe2be64379db8fd.js +0 -1
  529. package/assets/esri/core/workers/chunks/76e7d3cde2da4bdd7820.js +0 -1
  530. package/assets/esri/core/workers/chunks/7cf903db44f3647c8fd4.js +0 -1
  531. package/assets/esri/core/workers/chunks/7e41cee4a0ae75e1490d.js +0 -1
  532. package/assets/esri/core/workers/chunks/7eae9053065d3d38e54e.js +0 -1
  533. package/assets/esri/core/workers/chunks/87e9f7e85221bc7e6709.js +0 -1
  534. package/assets/esri/core/workers/chunks/88f03352a4dc6184ea1f.js +0 -1
  535. package/assets/esri/core/workers/chunks/909ee7d2a0eec773037a.js +0 -1
  536. package/assets/esri/core/workers/chunks/91ac9328afff8a51bd96.js +0 -1
  537. package/assets/esri/core/workers/chunks/91de343844ac578e7c93.js +0 -1
  538. package/assets/esri/core/workers/chunks/9246e2468528650bdc7c.js +0 -1
  539. package/assets/esri/core/workers/chunks/94ddfe165ac25aef8229.js +0 -1
  540. package/assets/esri/core/workers/chunks/9509bef285929c52c244.js +0 -1
  541. package/assets/esri/core/workers/chunks/95a3f09751bff63f4fab.js +0 -1
  542. package/assets/esri/core/workers/chunks/98d614d6fc9de8ebaf94.js +0 -1
  543. package/assets/esri/core/workers/chunks/99966339b061eb9945b8.js +0 -1
  544. package/assets/esri/core/workers/chunks/99f627938dbf0152fc02.js +0 -1
  545. package/assets/esri/core/workers/chunks/9e2b3754a76e0dd4a94a.js +0 -1
  546. package/assets/esri/core/workers/chunks/a0565137027c83108953.js +0 -1
  547. package/assets/esri/core/workers/chunks/a0eb882a5a81d25b9153.js +0 -1
  548. package/assets/esri/core/workers/chunks/a785e827f0215a73103d.js +0 -1
  549. package/assets/esri/core/workers/chunks/abe7670db06b27c0c8c8.js +0 -1
  550. package/assets/esri/core/workers/chunks/b19cff0e43fab2632660.js +0 -1
  551. package/assets/esri/core/workers/chunks/b6af90be328ebda26b8d.js +0 -1
  552. package/assets/esri/core/workers/chunks/bd7d87d175ba933ab2ce.js +0 -1
  553. package/assets/esri/core/workers/chunks/bdfffa5f88b559a4b42d.js +0 -1
  554. package/assets/esri/core/workers/chunks/c30b6bbabd05e4976fba.js +0 -1
  555. package/assets/esri/core/workers/chunks/c352696478b48a2090d5.js +0 -1
  556. package/assets/esri/core/workers/chunks/c35553d07ad169910742.js +0 -1
  557. package/assets/esri/core/workers/chunks/c4fef90cf08bbe4f0bb5.js +0 -1
  558. package/assets/esri/core/workers/chunks/c5c2fed38e0ccf84f1fa.js +0 -1
  559. package/assets/esri/core/workers/chunks/c88bfa51d2a8a024fc24.js +0 -1
  560. package/assets/esri/core/workers/chunks/c91042f8bf886056a29c.js +0 -1
  561. package/assets/esri/core/workers/chunks/ca36d85a47179d95f2fc.js +0 -1
  562. package/assets/esri/core/workers/chunks/cd02a6078443b8f63927.js +0 -1
  563. package/assets/esri/core/workers/chunks/d0cf9ff48f051adbd455.js +0 -1
  564. package/assets/esri/core/workers/chunks/d1304d414b1fa725168a.js +0 -1
  565. package/assets/esri/core/workers/chunks/d24125a791247019e2ca.js +0 -1
  566. package/assets/esri/core/workers/chunks/d26be8313526ecea9c68.js +0 -1
  567. package/assets/esri/core/workers/chunks/d2cb3d5ef0a9285afb78.js +0 -1
  568. package/assets/esri/core/workers/chunks/d44338bf5edafa3ca926.js +0 -1
  569. package/assets/esri/core/workers/chunks/d4b0012ae1d3b8a9ba01.js +0 -1
  570. package/assets/esri/core/workers/chunks/d58d6b55b2749a535eb3.js +0 -1
  571. package/assets/esri/core/workers/chunks/d7d5275d8b3c9430de1f.js +0 -1
  572. package/assets/esri/core/workers/chunks/da8a314800944706511b.js +0 -1
  573. package/assets/esri/core/workers/chunks/e018cbd97e6e0e4ca5c4.js +0 -1
  574. package/assets/esri/core/workers/chunks/e39bccc000c768120a32.js +0 -1
  575. package/assets/esri/core/workers/chunks/e4380706b629729f2212.js +0 -1
  576. package/assets/esri/core/workers/chunks/e90076ac1cf88a83a7f9.js +0 -1
  577. package/assets/esri/core/workers/chunks/ea1877ce00da3b585a30.js +0 -1
  578. package/assets/esri/core/workers/chunks/ea91c57a0b31f3f65ee5.js +0 -1
  579. package/assets/esri/core/workers/chunks/ec77222776f755dc372c.js +0 -1
  580. package/assets/esri/core/workers/chunks/ef851a2cff76fd211c07.js +0 -1
  581. package/assets/esri/core/workers/chunks/f3e53be08ab9dbdf17ae.js +0 -1
  582. package/assets/esri/core/workers/chunks/f53010adb70463b75bb9.js +0 -1
  583. package/assets/esri/core/workers/chunks/f5a058a0ce006bce2a2a.js +0 -1
  584. package/assets/esri/core/workers/chunks/f5f5b54cab722abe88e0.js +0 -1
  585. package/assets/esri/core/workers/chunks/f60ed579981913d44675.js +0 -1
  586. package/assets/esri/core/workers/chunks/f6f56f3e011dcef90bbb.js +0 -1
  587. package/assets/esri/core/workers/chunks/f83c3597e9332bd991eb.js +0 -1
  588. package/assets/esri/core/workers/chunks/f9a4387f850d85c44ca5.js +0 -1
  589. package/assets/esri/core/workers/chunks/fbc7576ed12964059da6.js +0 -1
  590. package/assets/esri/core/workers/chunks/fdd0e6d9927d3c43b0d3.js +0 -1
  591. package/assets/esri/core/workers/chunks/ff83d0337ac489ab08de.js +0 -2
  592. package/chunks/GlowComposite.glsl.js +0 -2
  593. package/geometry/operators/importUtils.js +0 -2
  594. package/views/3d/webgl-engine/effects/glow/Glow.js +0 -2
  595. package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +0 -2
  596. package/views/3d/webgl-engine/effects/glow/GlowComposite.glsl.js +0 -2
  597. package/views/3d/webgl-engine/effects/glow/GlowCompositeTechnique.js +0 -2
  598. package/views/3d/webgl-engine/effects/glow/blurEmission.glsl.js +0 -38
  599. /package/assets/esri/core/workers/chunks/{188c6ff5f4664827c254.js.LICENSE.txt → 1082bb0858585bd4fa21.js.LICENSE.txt} +0 -0
  600. /package/assets/esri/core/workers/chunks/{24c44541046576fee7e0.js.LICENSE.txt → 2e2349387a2b9903f13c.js.LICENSE.txt} +0 -0
  601. /package/assets/esri/core/workers/chunks/{ff83d0337ac489ab08de.js.LICENSE.txt → 411bbdecba340df11d95.js.LICENSE.txt} +0 -0
  602. /package/assets/esri/core/workers/chunks/{a89dbef8155d7c4354da.js.LICENSE.txt → 476535cfb06ced74d611.js.LICENSE.txt} +0 -0
  603. /package/assets/esri/core/workers/chunks/{6564f17c4700dc8d9c0e.js.LICENSE.txt → b82b523b6837ed1f28d3.js.LICENSE.txt} +0 -0
  604. /package/assets/esri/core/workers/chunks/{48726010778d6004e347.js.LICENSE.txt → ef24fd6c0322e5de9fdf.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import i from"../../../core/Accessor.js";import e from"../../../core/Logger.js";import{lerp as r}from"../../../core/mathUtils.js";import{createScreenPointArray as s,createRenderScreenPointArray3 as o}from"../../../core/screenUtils.js";import{property as n,subclass as h}from"../../../core/accessorSupport/decorators.js";import{copy as a,invertOrIdentity as p,multiply as u,invert as l,transpose as _,frustum as v,exactEquals as c,lookAt as w}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as y}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as d,exactEquals as g}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as m}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{subtract as f,set as x,distance as M,copy as D,exactEquals as j,sub as R,dot as P,sqrLen as V,sqrDist as F,scale as C,length as b,cross as S,normalize as T,direction as I}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as E,UNIT_Z as A}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{scale as O,equals as U,exactEquals as z,copy as H,squaredDistance as q,transformMat4 as W}from"../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as Y,create as k}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as L,copy as X,fromMatrix as G}from"../../../geometry/support/frustumPlanes.js";import{create as N}from"../../../geometry/support/ray.js";import{projectPointSignedLength as B}from"../../../geometry/support/vector.js";import{viewAngle as J}from"../state/utils/viewUtils.js";import{fovd2fovx as K,fovx2fovd as Q,fovd2fovy as Z,fovy2fovd as $}from"../webgl-engine/lib/fov.js";var tt;let it=tt=class extends i{constructor(t){super(t),this._ray=N(),this._viewport=Y(0,0,1,1),this._padding=Y(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=m(1,1e3),this._viewDirty=!0,this._viewMatrix=y(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=y(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=y(),this._frustumDirty=!0,this._frustum=L(),this._fullViewport=k(),this._fullViewportDirty=!0,this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=E(),this._up=E(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}get rows(){return this._rows}set rows(t){this._rows=Math.max(1,t)}get columns(){return this._columns}set columns(t){this._columns=Math.max(1,t)}get eye(){return this._ray.origin}set eye(t){this._compareAndSetView(t,this._ray.origin,"eye")}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center,"_center")}get ray(){return f(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){a(this._viewMatrix,t),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get inverseViewMatrix(){return p(y(),this.viewMatrix)||this._get("inverseViewMatrix")||y()}get viewForward(){return this._ensureViewClean(),x(E(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),x(E(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),x(E(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(t){this._nearFar[0]!==t&&(this._nearFar[0]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(t){this._nearFar[1]!==t&&(this._nearFar[1]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(t){this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const t=O(k(),this._viewport,1/this.pixelRatio),i=this._get("screenViewport");return i&&U(t,i)?i:t}get screenPadding(){if(1===this.pixelRatio)return this._padding;const t=O(k(),this._padding,1/this.pixelRatio),i=this._get("screenPadding");return i&&U(t,i)?i:t}get x(){return this._viewport[0]}set x(t){t+=this._padding[3],this._viewport[0]!==t&&(this._viewport[0]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(t){t+=this._padding[2],this._viewport[1]!==t&&(this._viewport[1]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(t){this._viewport[2]!==t&&(this._viewport[2]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(t){this._viewport[3]!==t&&(this._viewport[3]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(t){this.width=t-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(t){this.height=t-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewportDirty&&(this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this._viewport[2]+this._padding[1]+this._padding[3],this._fullViewport[3]=this._viewport[3]+this._padding[0]+this._padding[2],this._fullViewportDirty=!1),this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(t){z(this._padding,t)||(this._viewport[0]+=t[3]-this._padding[3],this._viewport[1]+=t[2]-this._padding[2],this._viewport[2]-=t[1]+t[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=t[0]+t[2]-(this._padding[0]+this._padding[2]),H(this._padding,t),this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&(u(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return l(y(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||y()}get fov(){return this._fov}set fov(t){this._fov=t,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return K(this._fov,this.width,this.height)}set fovX(t){this._fov=Q(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return Z(this._fov,this.width,this.height)}set fovY(t){this._fov=$(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return M(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(l(this._viewInverseTransposeMatrix,this.viewMatrix),_(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const{near:i,far:e}=this;return 2*i*e/(e+i-t*(e-i))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const t=this.width,i=this.height,e=this.near*Math.tan(this.fovY/2)*2,r=e*this._aspect,s=e/this.rows,o=r/this.columns,n=-r/2+this.column*o,h=n+o,a=-e/2+this.row*s,p=a+s,u=v(y(),n*(1+2*this._padding[3]/t),h*(1+2*this._padding[1]/t),a*(1+2*this._padding[2]/i),p*(1+2*this._padding[0]/i),this.near,this.far),l=this._get("projectionMatrix");return l&&c(l,u)?l:u}copyFrom(t){D(this._ray.origin,t.eye),this.center=t.center,this.up=t.up,H(this._viewport,t.viewport),this.notifyChange("_viewport"),H(this._padding,t.padding),this.notifyChange("_padding"),this._fullViewportDirty=!0,d(this._nearFar,t.nearFar),this.notifyChange("_nearFar"),this._fov=t.fov,this.row=t.row,this.column=t.column,this.rows=t.rows,this.columns=t.columns,this.relativeElevation=t.relativeElevation;const i=t;return this._viewDirty=i._viewDirty,this._viewDirty||(a(this._viewMatrix,t.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=i._frustumDirty,this._frustumDirty||(X(this._frustum,t.frustum),this._frustumDirty=!1),i._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:(a(this._viewInverseTransposeMatrix,t.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this.pixelRatio=t.pixelRatio,this}copyViewFrom(t){this.eye=t.eye,this.center=t.center,this.up=t.up,this.fov=t.fov}clone(){return(new tt).copyFrom(this)}equals(t){return j(this.eye,t.eye)&&j(this.center,t.center)&&j(this.up,t.up)&&z(this._viewport,t.viewport)&&z(this._padding,t.padding)&&g(this.nearFar,t.nearFar)&&this._fov===t.fov&&this.pixelRatio===t.pixelRatio&&this.relativeElevation===t.relativeElevation&&this.row===t.row&&this.column===t.column&&this.rows===t.rows&&this.columns===t.columns}equalsView(t){return j(this.eye,t.eye)&&j(this.center,t.center)&&j(this.up,t.up)&&this._fov===t.fov}almostEquals(t){const i=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||q(t.screenPadding,this.screenPadding)>=i||q(this.screenViewport,t.screenViewport)>=i||this.row!==t.row||this.column!==t.column||this.rows!==t.rows||this.columns!==t.columns)return!1;R(st,t.eye,t.center),R(ot,this.eye,this.center);const e=P(st,ot),r=V(st),s=V(ot),o=5e-4;return e*e>=(1-1e-10)*r*s&&F(t.eye,this.eye)<Math.max(r,s)*o*o}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perRenderPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs(B(this.viewForward,f(st,t,this.eye)))}computeScreenPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeDistanceFromRadius(t,i){return t/Math.tan(Math.min(this.fovX,this.fovY)/(2*(i||1)))}getScreenCenter(t=s()){return t[0]=(this.padding[3]+this.width/2)/this.pixelRatio,t[1]=(this.padding[0]+this.height/2)/this.pixelRatio,t}getRenderCenter(t,i=.5,e=.5){return t[0]=this.padding[3]+this.width*i,t[1]=this.padding[2]+this.height*e,t[2]=.5,t}setGLViewport(t){const i=this.viewport,e=this.padding;t.setViewport(i[0]-e[3],i[1]-e[2],i[2]+e[1]+e[3],i[3]+e[0]+e[2])}applyProjection(t,i){t!==et&&D(et,t),et[3]=1,W(et,et,this.projectionMatrix);const e=Math.abs(et[3]);C(et,et,1/e);const s=this.fullViewport;i[0]=r(0,s[0]+s[2],.5+.5*et[0]),i[1]=r(0,s[1]+s[3],.5+.5*et[1]),i[2]=.5*(et[2]+1),i[3]=e}unapplyProjection(t,i){const e=this.fullViewport;et[0]=(t[0]/(e[0]+e[2])*2-1)*t[3],et[1]=(t[1]/(e[1]+e[3])*2-1)*t[3],et[2]=(2*t[2]-1)*t[3],et[3]=t[3],null!=this.inverseProjectionMatrix&&(W(et,et,this.inverseProjectionMatrix),i[0]=et[0],i[1]=et[1],i[2]=et[2])}projectToScreen(t,i){return null==this.projectToRenderScreen(t,nt)?null:(this.renderToScreen(nt,i),i)}projectToRenderScreen(t,i){if(et[0]=t[0],et[1]=t[1],et[2]=t[2],et[3]=1,W(et,et,this.viewProjectionMatrix),0===et[3])return null;const e=et;C(e,e,1/Math.abs(et[3]));const s=this.fullViewport,o=r(0,s[0]+s[2],.5+.5*e[0]),n=r(0,s[1]+s[3],.5+.5*e[1]);return"x"in i?(i.x=o,i.y=n):(i[0]=o,i[1]=n,i.length>2&&(i[2]=.5*(e[2]+1))),i}unprojectFromScreen(t,i){return this.unprojectFromRenderScreen(this.screenToRender(t,nt),i)}unprojectFromRenderScreen(t,i){if(u(rt,this.projectionMatrix,this.viewMatrix),!l(rt,rt))return null;const e=this.fullViewport;return et[0]=2*(t[0]-e[0])/e[2]-1,et[1]=2*(t[1]-e[1])/e[3]-1,et[2]=2*t[2]-1,et[3]=1,W(et,et,rt),0===et[3]?null:(i[0]=et[0]/et[3],i[1]=et[1]/et[3],i[2]=et[2]/et[3],i)}constrainWindowSize(t,i,e,r){const s=t*this.pixelRatio,o=i*this.pixelRatio,n=Math.max(s-e/2,0),h=Math.max(this.fullHeight-o-r/2,0),a=-Math.min(s-e/2,0),p=-Math.min(this.fullHeight-o-r/2,0),u=e-a- -Math.min(this.fullWidth-s-e/2,0),l=r-p- -Math.min(o-r/2,0);return[Math.round(n),Math.round(h),Math.round(u),Math.round(l)]}computeUp(t){1===t?this._computeUpGlobal():this._computeUpLocal()}screenToRender(t,i){const e=t[0]*this.pixelRatio,r=this.fullHeight-t[1]*this.pixelRatio;return i[0]=e,i[1]=r,i}renderToScreen(t,i){const e=t[0]/this.pixelRatio,r=(this.fullHeight-t[1])/this.pixelRatio;i[0]=e,i[1]=r}sphereFrustumCoverage(t,i){const{center:e,eye:r,distance:s,fovY:o}=this,n=Math.abs(Math.PI/2-J(i,e,r));return t.frustumCoverage(n,s,o)}_computeUpGlobal(){f(st,this.center,this.eye);const t=b(this.center);t<1?j(this._up,A)&&(D(this._up,A),this._markViewDirty(),this.notifyChange("_up")):Math.abs(P(st,this.center))>.9999*b(st)*t||(S(ot,st,this.center),S(ot,ot,st),T(ot,ot),j(this._up,ot)||(D(this._up,ot),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){I(st,this.eye,this.center),Math.abs(st[2])<=.9999&&(C(st,st,st[2]),x(st,-st[0],-st[1],1-st[2]),T(st,st),j(this._up,st)||(D(this._up,st),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(t,i,r){"number"==typeof t[0]&&isFinite(t[0])&&"number"==typeof t[1]&&isFinite(t[1])&&"number"==typeof t[2]&&isFinite(t[2])?j(t,i)||(D(i,t),this._markViewDirty(),this.notifyChange(r)):e.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&(G(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&(w(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};t([n()],it.prototype,"_viewport",void 0),t([n()],it.prototype,"_padding",void 0),t([n()],it.prototype,"_fov",void 0),t([n()],it.prototype,"_nearFar",void 0),t([n()],it.prototype,"_viewDirty",void 0),t([n()],it.prototype,"_viewMatrix",void 0),t([n()],it.prototype,"_pixelRatio",void 0),t([n()],it.prototype,"pixelRatio",null),t([n()],it.prototype,"row",void 0),t([n()],it.prototype,"column",void 0),t([n()],it.prototype,"_rows",void 0),t([n()],it.prototype,"rows",null),t([n()],it.prototype,"_columns",void 0),t([n()],it.prototype,"columns",null),t([n()],it.prototype,"eye",null),t([n()],it.prototype,"center",null),t([n()],it.prototype,"_center",void 0),t([n()],it.prototype,"up",null),t([n()],it.prototype,"_up",void 0),t([n()],it.prototype,"viewMatrix",null),t([n({readOnly:!0})],it.prototype,"inverseViewMatrix",null),t([n({readOnly:!0})],it.prototype,"viewForward",null),t([n({readOnly:!0})],it.prototype,"viewUp",null),t([n({readOnly:!0})],it.prototype,"viewRight",null),t([n({readOnly:!0})],it.prototype,"nearFar",null),t([n()],it.prototype,"near",null),t([n()],it.prototype,"far",null),t([n()],it.prototype,"viewport",null),t([n({readOnly:!0})],it.prototype,"screenViewport",null),t([n({readOnly:!0})],it.prototype,"screenPadding",null),t([n()],it.prototype,"x",null),t([n()],it.prototype,"y",null),t([n()],it.prototype,"width",null),t([n()],it.prototype,"height",null),t([n()],it.prototype,"fullWidth",null),t([n()],it.prototype,"fullHeight",null),t([n({readOnly:!0})],it.prototype,"_aspect",null),t([n()],it.prototype,"padding",null),t([n({readOnly:!0})],it.prototype,"projectionMatrix",null),t([n({readOnly:!0})],it.prototype,"inverseProjectionMatrix",null),t([n()],it.prototype,"fov",null),t([n()],it.prototype,"fovX",null),t([n()],it.prototype,"fovY",null),t([n()],it.prototype,"viewInverseTransposeMatrix",null),t([n({readOnly:!0})],it.prototype,"_projectionMatrixInternal",null),t([n()],it.prototype,"relativeElevation",void 0),it=tt=t([h("esri.views.3d.webgl.RenderCamera")],it);const et=k(),rt=y(),st=E(),ot=E(),nt=o();export{it as default};
2
+ import{__decorate as t}from"tslib";import i from"../../../core/Accessor.js";import e from"../../../core/Logger.js";import{lerp as r}from"../../../core/mathUtils.js";import{createScreenPointArray as s,createRenderScreenPointArray3 as o}from"../../../core/screenUtils.js";import{property as n,subclass as h}from"../../../core/accessorSupport/decorators.js";import{copy as a,invertOrIdentity as p,multiply as l,invert as u,transpose as _,frustum as v,exactEquals as c,lookAt as w}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as y}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as d,exactEquals as g}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as m}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{subtract as f,set as x,distance as M,copy as D,exactEquals as j,sub as R,dot as P,sqrLen as V,sqrDist as F,scale as C,length as S,cross as b,normalize as T,direction as I}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as E,UNIT_Z as A}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{scale as O,equals as U,exactEquals as z,copy as H,squaredDistance as q,transformMat4 as W}from"../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as Y,create as k}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as L,copy as X,fromMatrix as G}from"../../../geometry/support/frustumPlanes.js";import{create as N}from"../../../geometry/support/ray.js";import{projectPointSignedLength as B}from"../../../geometry/support/vector.js";import{viewAngle as J}from"../state/utils/viewUtils.js";import{fovd2fovx as K,fovx2fovd as Q,fovd2fovy as Z,fovy2fovd as $}from"../webgl-engine/lib/fov.js";var tt;let it=tt=class extends i{constructor(t){super(t),this._ray=N(),this._viewport=Y(0,0,1,1),this._padding=Y(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=m(1,1e3),this._viewDirty=!0,this._viewMatrix=y(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=y(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=y(),this._frustumDirty=!0,this._frustum=L(),this._fullViewport=k(),this._fullViewportDirty=!0,this._pixelRatio=1,this.pixelScale=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=E(),this._up=E(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}get rows(){return this._rows}set rows(t){this._rows=Math.max(1,t)}get columns(){return this._columns}set columns(t){this._columns=Math.max(1,t)}get eye(){return this._ray.origin}set eye(t){this._compareAndSetView(t,this._ray.origin,"eye")}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center,"_center")}get ray(){return f(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){a(this._viewMatrix,t),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get inverseViewMatrix(){return p(y(),this.viewMatrix)||this._get("inverseViewMatrix")||y()}get viewForward(){return this._ensureViewClean(),x(E(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),x(E(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),x(E(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(t){this._nearFar[0]!==t&&(this._nearFar[0]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(t){this._nearFar[1]!==t&&(this._nearFar[1]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(t){this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const t=O(k(),this._viewport,1/this.pixelRatio),i=this._get("screenViewport");return i&&U(t,i)?i:t}get screenPadding(){if(1===this.pixelRatio)return this._padding;const t=O(k(),this._padding,1/this.pixelRatio),i=this._get("screenPadding");return i&&U(t,i)?i:t}get x(){return this._viewport[0]}set x(t){t+=this._padding[3],this._viewport[0]!==t&&(this._viewport[0]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(t){t+=this._padding[2],this._viewport[1]!==t&&(this._viewport[1]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(t){this._viewport[2]!==t&&(this._viewport[2]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(t){this._viewport[3]!==t&&(this._viewport[3]=t,this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(t){this.width=t-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(t){this.height=t-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewportDirty&&(this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this._viewport[2]+this._padding[1]+this._padding[3],this._fullViewport[3]=this._viewport[3]+this._padding[0]+this._padding[2],this._fullViewportDirty=!1),this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(t){z(this._padding,t)||(this._viewport[0]+=t[3]-this._padding[3],this._viewport[1]+=t[2]-this._padding[2],this._viewport[2]-=t[1]+t[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=t[0]+t[2]-(this._padding[0]+this._padding[2]),H(this._padding,t),this._fullViewportDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&(l(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return u(y(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||y()}get fov(){return this._fov}set fov(t){this._fov=t,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return K(this._fov,this.width,this.height)}set fovX(t){this._fov=Q(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return Z(this._fov,this.width,this.height)}set fovY(t){this._fov=$(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return M(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(u(this._viewInverseTransposeMatrix,this.viewMatrix),_(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const{near:i,far:e}=this;return 2*i*e/(e+i-t*(e-i))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const t=this.width,i=this.height,e=this.near*Math.tan(this.fovY/2)*2,r=e*this._aspect,s=e/this.rows,o=r/this.columns,n=-r/2+this.column*o,h=n+o,a=-e/2+this.row*s,p=a+s,l=v(y(),n*(1+2*this._padding[3]/t),h*(1+2*this._padding[1]/t),a*(1+2*this._padding[2]/i),p*(1+2*this._padding[0]/i),this.near,this.far),u=this._get("projectionMatrix");return u&&c(u,l)?u:l}copyFrom(t){D(this._ray.origin,t.eye),this.center=t.center,this.up=t.up,H(this._viewport,t.viewport),this.notifyChange("_viewport"),H(this._padding,t.padding),this.notifyChange("_padding"),this._fullViewportDirty=!0,d(this._nearFar,t.nearFar),this.notifyChange("_nearFar"),this._fov=t.fov,this.row=t.row,this.column=t.column,this.rows=t.rows,this.columns=t.columns,this.relativeElevation=t.relativeElevation;const i=t;return this._viewDirty=i._viewDirty,this._viewDirty||(a(this._viewMatrix,t.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=i._frustumDirty,this._frustumDirty||(X(this._frustum,t.frustum),this._frustumDirty=!1),i._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:(a(this._viewInverseTransposeMatrix,t.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this.pixelRatio=t.pixelRatio,this.pixelScale=t.pixelScale,this}copyViewFrom(t){this.eye=t.eye,this.center=t.center,this.up=t.up,this.fov=t.fov}clone(){return(new tt).copyFrom(this)}equals(t){return j(this.eye,t.eye)&&j(this.center,t.center)&&j(this.up,t.up)&&z(this._viewport,t.viewport)&&z(this._padding,t.padding)&&g(this.nearFar,t.nearFar)&&this._fov===t.fov&&this.pixelRatio===t.pixelRatio&&this.relativeElevation===t.relativeElevation&&this.row===t.row&&this.column===t.column&&this.rows===t.rows&&this.columns===t.columns}equalsView(t){return j(this.eye,t.eye)&&j(this.center,t.center)&&j(this.up,t.up)&&this._fov===t.fov}almostEquals(t){const i=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||q(t.screenPadding,this.screenPadding)>=i||q(this.screenViewport,t.screenViewport)>=i||this.row!==t.row||this.column!==t.column||this.rows!==t.rows||this.columns!==t.columns)return!1;R(st,t.eye,t.center),R(ot,this.eye,this.center);const e=P(st,ot),r=V(st),s=V(ot),o=5e-4;return e*e>=(1-1e-10)*r*s&&F(t.eye,this.eye)<Math.max(r,s)*o*o}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perRenderPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs(B(this.viewForward,f(st,t,this.eye)))}computeScreenPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeDistanceFromRadius(t,i){return t/Math.tan(Math.min(this.fovX,this.fovY)/(2*(i||1)))}getScreenCenter(t=s()){return t[0]=(this.padding[3]+this.width/2)/this.pixelRatio,t[1]=(this.padding[0]+this.height/2)/this.pixelRatio,t}getRenderCenter(t,i=.5,e=.5){return t[0]=this.padding[3]+this.width*i,t[1]=this.padding[2]+this.height*e,t[2]=.5,t}setGLViewport(t){const i=this.viewport,e=this.padding;t.setViewport(i[0]-e[3],i[1]-e[2],i[2]+e[1]+e[3],i[3]+e[0]+e[2])}applyProjection(t,i){t!==et&&D(et,t),et[3]=1,W(et,et,this.projectionMatrix);const e=Math.abs(et[3]);C(et,et,1/e);const s=this.fullViewport;i[0]=r(0,s[0]+s[2],.5+.5*et[0]),i[1]=r(0,s[1]+s[3],.5+.5*et[1]),i[2]=.5*(et[2]+1),i[3]=e}unapplyProjection(t,i){const e=this.fullViewport;et[0]=(t[0]/(e[0]+e[2])*2-1)*t[3],et[1]=(t[1]/(e[1]+e[3])*2-1)*t[3],et[2]=(2*t[2]-1)*t[3],et[3]=t[3],null!=this.inverseProjectionMatrix&&(W(et,et,this.inverseProjectionMatrix),i[0]=et[0],i[1]=et[1],i[2]=et[2])}projectToScreen(t,i){return null==this.projectToRenderScreen(t,nt)?null:(this.renderToScreen(nt,i),i)}projectToRenderScreen(t,i){if(et[0]=t[0],et[1]=t[1],et[2]=t[2],et[3]=1,W(et,et,this.viewProjectionMatrix),0===et[3])return null;const e=et;C(e,e,1/Math.abs(et[3]));const s=this.fullViewport,o=r(0,s[0]+s[2],.5+.5*e[0]),n=r(0,s[1]+s[3],.5+.5*e[1]);return"x"in i?(i.x=o,i.y=n):(i[0]=o,i[1]=n,i.length>2&&(i[2]=.5*(e[2]+1))),i}unprojectFromScreen(t,i){return this.unprojectFromRenderScreen(this.screenToRender(t,nt),i)}unprojectFromRenderScreen(t,i){if(l(rt,this.projectionMatrix,this.viewMatrix),!u(rt,rt))return null;const e=this.fullViewport;return et[0]=2*(t[0]-e[0])/e[2]-1,et[1]=2*(t[1]-e[1])/e[3]-1,et[2]=2*t[2]-1,et[3]=1,W(et,et,rt),0===et[3]?null:(i[0]=et[0]/et[3],i[1]=et[1]/et[3],i[2]=et[2]/et[3],i)}constrainWindowSize(t,i,e,r){const s=t*this.pixelRatio,o=i*this.pixelRatio,n=Math.max(s-e/2,0),h=Math.max(this.fullHeight-o-r/2,0),a=-Math.min(s-e/2,0),p=-Math.min(this.fullHeight-o-r/2,0),l=e-a- -Math.min(this.fullWidth-s-e/2,0),u=r-p- -Math.min(o-r/2,0);return[Math.round(n),Math.round(h),Math.round(l),Math.round(u)]}computeUp(t){1===t?this._computeUpGlobal():this._computeUpLocal()}screenToRender(t,i){const e=t[0]*this.pixelRatio,r=this.fullHeight-t[1]*this.pixelRatio;return i[0]=e,i[1]=r,i}renderToScreen(t,i){const e=t[0]/this.pixelRatio,r=(this.fullHeight-t[1])/this.pixelRatio;i[0]=e,i[1]=r}sphereFrustumCoverage(t,i){const{center:e,eye:r,distance:s,fovY:o}=this,n=Math.abs(Math.PI/2-J(i,e,r));return t.frustumCoverage(n,s,o)}_computeUpGlobal(){f(st,this.center,this.eye);const t=S(this.center);t<1?j(this._up,A)&&(D(this._up,A),this._markViewDirty(),this.notifyChange("_up")):Math.abs(P(st,this.center))>.9999*S(st)*t||(b(ot,st,this.center),b(ot,ot,st),T(ot,ot),j(this._up,ot)||(D(this._up,ot),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){I(st,this.eye,this.center),Math.abs(st[2])<=.9999&&(C(st,st,st[2]),x(st,-st[0],-st[1],1-st[2]),T(st,st),j(this._up,st)||(D(this._up,st),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(t,i,r){"number"==typeof t[0]&&isFinite(t[0])&&"number"==typeof t[1]&&isFinite(t[1])&&"number"==typeof t[2]&&isFinite(t[2])?j(t,i)||(D(i,t),this._markViewDirty(),this.notifyChange(r)):e.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&(G(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&(w(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};t([n()],it.prototype,"_viewport",void 0),t([n()],it.prototype,"_padding",void 0),t([n()],it.prototype,"_fov",void 0),t([n()],it.prototype,"_nearFar",void 0),t([n()],it.prototype,"_viewDirty",void 0),t([n()],it.prototype,"_viewMatrix",void 0),t([n()],it.prototype,"pixelRatio",null),t([n()],it.prototype,"_pixelRatio",void 0),t([n()],it.prototype,"pixelScale",void 0),t([n()],it.prototype,"row",void 0),t([n()],it.prototype,"column",void 0),t([n()],it.prototype,"_rows",void 0),t([n()],it.prototype,"rows",null),t([n()],it.prototype,"_columns",void 0),t([n()],it.prototype,"columns",null),t([n()],it.prototype,"eye",null),t([n()],it.prototype,"center",null),t([n()],it.prototype,"_center",void 0),t([n()],it.prototype,"up",null),t([n()],it.prototype,"_up",void 0),t([n()],it.prototype,"viewMatrix",null),t([n({readOnly:!0})],it.prototype,"inverseViewMatrix",null),t([n({readOnly:!0})],it.prototype,"viewForward",null),t([n({readOnly:!0})],it.prototype,"viewUp",null),t([n({readOnly:!0})],it.prototype,"viewRight",null),t([n({readOnly:!0})],it.prototype,"nearFar",null),t([n()],it.prototype,"near",null),t([n()],it.prototype,"far",null),t([n()],it.prototype,"viewport",null),t([n({readOnly:!0})],it.prototype,"screenViewport",null),t([n({readOnly:!0})],it.prototype,"screenPadding",null),t([n()],it.prototype,"x",null),t([n()],it.prototype,"y",null),t([n()],it.prototype,"width",null),t([n()],it.prototype,"height",null),t([n()],it.prototype,"fullWidth",null),t([n()],it.prototype,"fullHeight",null),t([n({readOnly:!0})],it.prototype,"_aspect",null),t([n()],it.prototype,"padding",null),t([n({readOnly:!0})],it.prototype,"projectionMatrix",null),t([n({readOnly:!0})],it.prototype,"inverseProjectionMatrix",null),t([n()],it.prototype,"fov",null),t([n()],it.prototype,"fovX",null),t([n()],it.prototype,"fovY",null),t([n()],it.prototype,"viewInverseTransposeMatrix",null),t([n({readOnly:!0})],it.prototype,"_projectionMatrixInternal",null),t([n()],it.prototype,"relativeElevation",void 0),it=tt=t([h("esri.views.3d.webgl.RenderCamera")],it);const et=k(),rt=y(),st=E(),ot=E(),nt=o();export{it as default};
@@ -1,9 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{glsl as e}from"../../shaderModules/glsl.js";function r(r,c){c.spherical?r.vertex.code.add(e`vec3 getLocalUp(in vec3 pos, in vec3 origin) {
3
- return normalize(pos + origin);
4
- }`):r.vertex.code.add(e`vec3 getLocalUp(in vec3 pos, in vec3 origin) {
5
- return vec3(0.0, 0.0, 1.0);
6
- }`),c.spherical?r.vertex.code.add(e`mat3 getTBNMatrix(in vec3 n) {
2
+ import{glsl as e}from"../../shaderModules/glsl.js";function r(r,{spherical:n}){r.vertex.code.add(n?"vec3 getLocalUp(in vec3 pos, in vec3 origin) { return normalize(pos + origin); }":"vec3 getLocalUp(in vec3 pos, in vec3 origin) { return vec3(0.0, 0.0, 1.0); }"),n?r.vertex.code.add(e`mat3 getTBNMatrix(in vec3 n) {
7
3
  vec3 t = normalize(cross(vec3(0.0, 0.0, 1.0), n));
8
4
  vec3 b = normalize(cross(n, t));
9
5
  return mat3(t, b, n);
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/util/ColorConversion.glsl.js";import"../../core/shaderModules/Float3PassUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../raymarching/DistanceFalloff.glsl.js";import"../../shaders/ScreenSpacePassAtmosphere.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{F as FogPassParameters,b as build}from"../../../../../chunks/Fog.glsl.js";
2
+ import"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/util/ColorConversion.glsl.js";import"../../core/shaderModules/Float3PassUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../glow/applyEmissiveGlow.glsl.js";import"../raymarching/DistanceFalloff.glsl.js";import"../../shaders/ScreenSpacePassAtmosphere.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{F as FogPassParameters,b as build}from"../../../../../chunks/Fog.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{smoothstep as t,lerp as s}from"../../../../../core/mathUtils.js";import{releaseMaybe as r}from"../../../../../core/maybe.js";import{watch as a,syncAndInitial as i}from"../../../../../core/reactiveUtils.js";import{signal as n}from"../../../../../core/signal.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{add as h,normalize as m,length as p,dot as c,scale as l,lerp as u}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g,fromValues as d}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as _}from"../../../../../geometry/ellipsoidUtils.js";import{heightLimit as f}from"../../../environment/weather.js";import{TransparentEnvironment as P}from"../TransparentEnvironment.js";import{betaRayleigh as v,betaCombined as w}from"../atmosphere/atmosphereUtils.js";import{F as b}from"../../../../../chunks/Fog.glsl.js";import{FogTechnique as y}from"./FogTechnique.js";import{EmissiveTechniqueConfiguration as j}from"../../shaders/EmissiveTechniqueConfiguration.js";import{floatBlendReductionFactor as F}from"../../shaders/floatBlendScale.glsl.js";import{DepthStencilAttachment as B,ColorAttachment1 as q,SizedPixelFormat as E}from"../../../../webgl/enums.js";const x=.9*f,C=1.1*f;let R=class extends P{constructor(e){super(e),this._configuration=new j,this._newParameters=new T,this._oldParameters=new T,this._fadedParameters=new T,this._parameters=this._newParameters,this._passParameters=new b;const t=_(e.view.spatialReference);this._planetRadius=t.radius,this._atmosphereRadius=t.radius+t.atmosphereHeight}initialize(){this.addHandles([a(()=>this.view.environment.atmosphereEnabled,()=>this._updateEnabled(),i),a(()=>this.view.environment.weather,()=>this._updateEnabled(),i),a(()=>this._updateFogParameters(),()=>{},i)]),this.addHandles(a(()=>this._fadeFactor,e=>this._fade(e),i))}_updateEnabled(){this.view.environment.atmosphereEnabled&&this.view.environment.weather?this._enable():this._disable()}get _fadeFactor(){return this.view.stage?.renderer.renderContext.bind.clouds.fadeFactor??1}_fade(e){const{_newParameters:t,_oldParameters:s}=this;e>=1?(this._parameters=t,this._oldParameters.copy(this._newParameters)):e<=0?this._parameters=s:(this._fadedParameters.lerp(s,t,e),this._parameters=this._fadedParameters)}_updateFogParameters(){const{weather:e,weatherAvailable:t}=this.view.environment,s="foggy"===e.type||"snowy"===e.type||"rainy"===e.type;this._newParameters.strength.value=t?e.scattering:0,this._newParameters.amount.value=s?1:0,"foggy"!==e.type&&"snowy"!==e.type||(this._newParameters.fogBrightness=M),"rainy"===e.type&&(this._newParameters.fogBrightness=D),this._fadeFactor>=1&&this._oldParameters.copy(this._newParameters),this.requestRender(2)}get strength(){return this._parameters.strength.value*this._heightFade}get amount(){return this._parameters.amount.value*this._heightFade}get _heightFade(){const e=p(this.bindParameters.camera.eye);return 1-t(x,C,Math.abs(e-this._planetRadius))}precompile(){this._update(),this._passParameters.amount>0&&this.techniques.precompile(y,this._configuration)}render(){const e=this.input,t=this._getTechnique();if(!t)return e;const s=this.renderingContext,a=e.getAttachment(B);if(this._passParameters.emission=e.obtainAttachment(q),this._passParameters.inputScale=this._passParameters.emission?.attachment.descriptor.internalFormat===E.RGBA8?F:1,this._passParameters.emission){const t=1===this._passParameters.inputScale?8:5;e.acquireColor(q,t,"emissive")}return e.attachDepth(null),s.bindFramebuffer(e.fbo),s.bindTechnique(t,this.bindParameters,this._passParameters),s.screen.draw(),this._passParameters.emission=r(this._passParameters.emission),e.attachDepth(a),this.fboCache.debugCallback?.("fog-color",e.fbo),e}_getTechnique(){return this._update(),this._passParameters.amount>0?this.techniques.get(y,this._configuration):null}_update(){const e=this.bindParameters.camera;m(A,e.eye);const t=Math.max(0,c(A,this.bindParameters.lighting.mainLight.direction)),s=this._parameters.fogBrightness;l(this._passParameters.color,H,s),l(S,H,.1*s),u(this._passParameters.color,S,this._passParameters.color,t);const r=p(e.eye);this._passParameters.atmosphereC=r**2-this._atmosphereRadius**2,this._passParameters.amount=this.amount,this._passParameters.strength=this.strength,this._configuration.hasEmissive=this.bindParameters.hasEmission}get test(){return{parameters:this._passParameters}}};R=e([o("esri.views.3d.webgl-engine.effects.fog.Fog")],R);class T{constructor(){this.fogBrightness=0,this.strength=n(0),this.amount=n(0)}copy(e){this.fogBrightness=e.fogBrightness,this.strength.value=e.strength.value,this.amount.value=e.amount.value}lerp(e,t,r){this.fogBrightness=s(e.fogBrightness,t.fogBrightness,r),this.strength.value=s(e.strength.value,t.strength.value,r),this.amount.value=s(e.amount.value,t.amount.value,r)}}const A=g(),S=g(),U=d(3e-4,3e-4,3e-4),H=g();h(H,w,v),h(H,H,U),m(H,H);const k=H.reduce((e,t)=>e+t,0)/3,D=.5/k,M=1.5/k;export{R as Fog,T as FogParameters};
2
+ import{__decorate as e}from"tslib";import{smoothstep as t,lerp as s}from"../../../../../core/mathUtils.js";import{releaseMaybe as r}from"../../../../../core/maybe.js";import{watch as a,syncAndInitial as i}from"../../../../../core/reactiveUtils.js";import{signal as o}from"../../../../../core/signal.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{add as h,normalize as m,length as p,dot as l,scale as u,lerp as c}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g,fromValues as _}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ZEROS as d}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{heightLimit as f}from"../../../environment/weather.js";import{betaRayleigh as P,betaCombined as v}from"../atmosphere/atmosphereUtils.js";import{F as b}from"../../../../../chunks/Fog.glsl.js";import{FogTechnique as w}from"./FogTechnique.js";import{BlurEmission as y}from"../glow/BlurEmission.js";import{EmissiveTechniqueConfiguration as F}from"../../shaders/EmissiveTechniqueConfiguration.js";import{floatBlendReductionFactor as j}from"../../shaders/floatBlendScale.glsl.js";import{ColorAttachment1 as B,SizedPixelFormat as C,ColorAttachment0 as q,DepthStencilAttachment as x}from"../../../../webgl/enums.js";const E=.9*f,T=1.1*f;let A=class extends y{constructor(){super(...arguments),this._configuration=new F,this._newParameters=new M,this._oldParameters=new M,this._fadedParameters=new M,this._parameters=this._newParameters,this._passParameters=new b}initialize(){this.addHandles([a(()=>this.view.environment.atmosphereEnabled,()=>this._updateEnabled(),i),a(()=>this.view.environment.weather,()=>this._updateEnabled(),i),a(()=>this._updateFogParameters(),()=>{},i),a(()=>this._fadeFactor,e=>this._fade(e),i)])}_updateEnabled(){this.view.environment.atmosphereEnabled&&this.view.environment.weather?this._enable():this._disable()}get _fadeFactor(){return this.view.stage?.renderer.renderContext.bind.clouds.fadeFactor??1}_fade(e){const{_newParameters:t,_oldParameters:s}=this;e>=1?(this._parameters=t,this._oldParameters.copy(this._newParameters)):e<=0?this._parameters=s:(this._fadedParameters.lerp(s,t,e),this._parameters=this._fadedParameters)}_updateFogParameters(){const{weather:e,weatherAvailable:t}=this.view.environment,s="foggy"===e.type||"snowy"===e.type||"rainy"===e.type;this._newParameters.strength.value=t?e.scattering:0,this._newParameters.amount.value=s?1:0,"foggy"!==e.type&&"snowy"!==e.type||(this._newParameters.fogBrightness=G),"rainy"===e.type&&(this._newParameters.fogBrightness=z),this._fadeFactor>=1&&this._oldParameters.copy(this._newParameters),this.requestRender(2)}get strength(){return this._parameters.strength.value*this._heightFade}get amount(){return this._parameters.amount.value*this._heightFade}get _heightFade(){const e=p(this.bindParameters.camera.eye);return 1-t(E,T,Math.abs(e-this._ellipsoid.radius))}precompile(){this._update(),this._passParameters.amount>0&&(super.precompile(),this.techniques.precompile(w,this._configuration))}render(){const e=this.input,t=this._getTechnique();if(!t)return e;this._passParameters.emission=e.obtainAttachment(B),this._passParameters.inputScale=this._passParameters.emission?.attachment.descriptor.internalFormat===C.RGBA8?j:1;const s=this.renderingContext;this._passParameters.emission&&(this._renderEmissionMipMap(),this._configuration.useFloatBlend?(e.acquireColor(B,8,"emissive"),s.clearBuffer(1,d)):(this._passParameters.color=e.obtainAttachment(q),e.acquireColor(q,5),e.acquireColor(B,8,"emissive")));const a=e.getAttachment(x);return e.attachDepth(null),s.bindFramebuffer(e.fbo),s.bindTechnique(t,this.bindParameters,this._passParameters),s.screen.draw(),this._passParameters.color=r(this._passParameters.color),this._passParameters.emission=r(this._passParameters.emission),this._passParameters.mipmapTexture=r(this._passParameters.mipmapTexture),e.attachDepth(a),this.fboCache.debugCallback?.("fog-color",e.fbo),e}_getTechnique(){return this.renders?this.techniques.get(w,this._configuration):null}get renders(){return this._update(),this._passParameters.amount>0}_update(){const e=this.bindParameters.camera;m(R,e.eye);const t=Math.max(0,l(R,this.bindParameters.lighting.mainLight.direction)),s=this._parameters.fogBrightness;u(this._passParameters.fogColor,k,s),u(S,k,.1*s),c(this._passParameters.fogColor,S,this._passParameters.fogColor,t);const r=p(e.eye);this._passParameters.atmosphereC=r**2-this._atmosphereRadius**2,this._passParameters.amount=this.amount,this._passParameters.strength=this.strength,this._configuration.hasEmissive=this.bindParameters.hasEmission,this._configuration.useFloatBlend=this.bindParameters.useFloatBlend.value}get test(){return{parameters:this._passParameters}}};A=e([n("esri.views.3d.webgl-engine.effects.fog.Fog")],A);class M{constructor(){this.fogBrightness=0,this.strength=o(0),this.amount=o(0)}copy(e){this.fogBrightness=e.fogBrightness,this.strength.value=e.strength.value,this.amount.value=e.amount.value}lerp(e,t,r){this.fogBrightness=s(e.fogBrightness,t.fogBrightness,r),this.strength.value=s(e.strength.value,t.strength.value,r),this.amount.value=s(e.amount.value,t.amount.value,r)}}const R=g(),S=g(),U=_(3e-4,3e-4,3e-4),k=g();h(k,v,P),h(k,k,U),m(k,k);const D=k.reduce((e,t)=>e+t,0)/3,z=.5/D,G=1.5/D;export{A as Fog,M as FogParameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as o}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as i}from"../../../../../chunks/Fog.glsl.js";import{makePipelineState as t,defaultColorWrite as c,separateBlendingParams as n}from"../../../../webgl/renderState.js";let l=class extends s{constructor(){super(...arguments),this.shader=new o(i,()=>import("./Fog.glsl.js"))}initializePipeline(){return t({blending:n(770,0,771,1),colorWrite:c})}};l=e([r("esri.views.3d.webgl-engine.effects.fog.FogTechnique")],l);export{l as FogTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as o}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as i}from"../../../../../chunks/Fog.glsl.js";import{makePipelineState as t,defaultColorWrite as n,separateBlendingParams as c}from"../../../../webgl/renderState.js";let l=class extends s{constructor(){super(...arguments),this.shader=new o(i,()=>import("./Fog.glsl.js"))}initializePipeline(){const{useFloatBlend:e,hasEmissive:r}=this._configuration;return t(e||!r?{blending:c(770,0,771,1),colorWrite:n}:{colorWrite:n})}};l=e([r("esri.views.3d.webgl-engine.effects.fog.FogTechnique")],l);export{l as FogTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{releaseMaybe as t}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{property as a,subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{set as l}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{InternalRenderCategory as o}from"../../../webgl.js";import u from"../../../webgl/RenderNode.js";import{G as n}from"../../../../../chunks/GlobalIllumination.glsl.js";import{G as m}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as h}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as c}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as p}from"./GlobalIlluminationTechniqueConfiguration.js";import{G as _}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as d}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as f,ColorAttachment1 as b}from"../../../../webgl/enums.js";const g=1,w=100;let P=class extends u{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=o.AMBIENT_ILLUMINATION,this._passParameters=new n,this._drawParameters=new m,this._drawParametersUpscale=new _,this._maxFrames=256,this._lowQualityResolutionScale=.25,this._configuration=new p,this._lastOutput=null,this._isGlobalIlluminationUpdate=!1,this._resetBuffer=!1}initialize(){this.addHandles(s(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this._reset(),this._requestRender()},r))}destroy(){this._lastOutput=t(this._lastOutput)}resetAccumulatedFrames(){this._isGlobalIlluminationUpdate||!(this._passParameters.accumulatedFrames>w)&&this._configuration.hasEmission||this._reset()}render(e){if(this._passParameters.accumulatedFrames>=this._maxFrames)return this._lastOutput?.retain(),this._lastOutput;const t=e.find(({name:e})=>"normals"===e),s=t?.getTexture(),r=t?.getTexture(f),a=this._mode;if(!s||!r)return this._emptyOutput;if(0===a)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this._requestRender(),this._emptyOutput;const i=this.bindParameters;this._configuration.hasEmission=!!i.reprojection.lastFrameEmission;const u=this.techniques.getCompiled(c,this._configuration),n=this.techniques.getCompiled(h),m=1===a,p=m?this._lowQualityResolutionScale:1,_=m?this.techniques.getCompiled(d):null;if(!u||!n||m&&!_)return this._requestRender(),this._emptyOutput;const w=this.renderingContext,{camera:P}=i;this._passParameters.normalTexture=s,this._passParameters.depthTexture=r,this._passParameters.projScale=1/P.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=p;const{fullWidth:I,fullHeight:x}=P,T=Math.max(1,Math.floor(I*p)),q=Math.max(1,Math.floor(x*p)),F=this.fboCache.acquire(T,q,"global illumination input").acquireColor(b,2);w.bindFramebuffer(F.fbo),w.setViewport(0,0,T,q),w.bindTechnique(u,i,this._passParameters,this._drawParameters),w.screen.draw();const O=F.obtainAttachment(b),C=Math.max(1,Math.round(T/g)),G=Math.max(1,Math.round(q/g)),j=this.fboCache.acquire(C,G,"global illumination blur horizontal");w.bindFramebuffer(j.fbo),this._drawParameters.texture=F.getTexture(),this._drawParameters.weightTexture=O.attachment,l(this._drawParameters.blurSize,0,g/q),w.bindTechnique(n,i,this._passParameters,this._drawParameters),w.setViewport(0,0,C,G),w.screen.draw(),F.release();const y=m?"global illumination blur vertical":o.AMBIENT_ILLUMINATION,M=this.fboCache.acquire(C,G,y);w.bindFramebuffer(M.fbo),w.setViewport(0,0,C,G),w.setClearColor(1,1,1,0),w.clear(16384),this._drawParameters.texture=j.getTexture(),this._drawParameters.weightTexture=O.attachment,l(this._drawParameters.blurSize,g/C,0),w.bindTechnique(n,i,this._passParameters,this._drawParameters),w.setViewport(0,0,C,G),w.screen.draw(),j.release(),M.attachColor(O,b),O.release();let R=M;return _&&(R=this.fboCache.acquire(I,x,o.AMBIENT_ILLUMINATION).acquireColor(b,2),w.bindFramebuffer(R.fbo),w.setViewport(0,0,I,x),w.setClearColor(1,1,1,0),w.clear(16384),this._drawParametersUpscale.colorTexture=M.getTexture(),this._drawParametersUpscale.weightTexture=M.getTexture(b),w.bindTechnique(_,i,this._passParameters,this._drawParametersUpscale),w.screen.draw(),M.release()),w.setViewport4fv(P.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,++this._passParameters.accumulatedFrames,this._storeOutput(R),this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),R}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_storeOutput(e){this._lastOutput!==e&&(this._lastOutput=t(this._lastOutput),this._lastOutput=e,this._lastOutput.retain())}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:s}=this.bindParameters.camera,r=this.fboCache.acquire(t,s,o.AMBIENT_ILLUMINATION).acquireColor(b,2);return e.bindFramebuffer(r.fbo),e.setViewport(0,0,t,s),e.clearBuffer(0,[0,0,0,1]),e.clearBuffer(1,[0,0,0,0]),r}get _canRender(){const{reprojection:e,hasEmission:t,globalIllumination:s}=this.bindParameters;return!(!e.lastFrameColor||t&&!e.lastFrameEmission||!e.lastFrameDepth||!s||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}_reset(){this._passParameters.accumulatedFrames=0,this._lastOutput=t(this._lastOutput)}get test(){const e=this;return{passParameters:this._passParameters,configuration:this._configuration,get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},get mode(){return e._mode},restartAccumulation:()=>{this._reset(),this._passParameters.temporalSampleFrame=0,this._resetBuffer=!0,this._requestRender()}}}};e([a()],P.prototype,"consumes",void 0),e([a()],P.prototype,"produces",void 0),P=e([i("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],P);export{P as GlobalIllumination,g as blurSizePixels};
2
+ import{__decorate as e}from"tslib";import{releaseMaybe as t}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{property as a,subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{set as l}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{UNIT_W as o,ZEROS as u}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as n}from"../../../webgl.js";import m from"../../../webgl/RenderNode.js";import{G as h}from"../../../../../chunks/GlobalIllumination.glsl.js";import{G as c}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as p}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as _}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as d}from"./GlobalIlluminationTechniqueConfiguration.js";import{G as f}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as b}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as g,ColorAttachment1 as w}from"../../../../webgl/enums.js";const P=1,I=100;let x=class extends m{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=n.AMBIENT_ILLUMINATION,this._passParameters=new h,this._drawParameters=new c,this._drawParametersUpscale=new f,this._maxFrames=256,this._lowQualityResolutionScale=.25,this._configuration=new d,this._lastOutput=null,this._isGlobalIlluminationUpdate=!1,this._resetBuffer=!1}initialize(){this.addHandles(s(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this._reset(),this._requestRender()},r))}destroy(){this._lastOutput=t(this._lastOutput)}resetAccumulatedFrames(){this._isGlobalIlluminationUpdate||!(this._passParameters.accumulatedFrames>I)&&this._configuration.hasEmission||this._reset()}render(e){if(this._passParameters.accumulatedFrames>=this._maxFrames)return this._lastOutput?.retain(),this._lastOutput;const t=e.find(({name:e})=>"normals"===e),s=t?.getTexture(),r=t?.getTexture(g),a=this._mode;if(!s||!r)return this._emptyOutput;if(0===a)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this._requestRender(),this._emptyOutput;const i=this.bindParameters;this._configuration.hasEmission=!!i.reprojection.lastFrameEmission;const o=this.techniques.getCompiled(_,this._configuration),u=this.techniques.getCompiled(p),m=1===a,h=m?this._lowQualityResolutionScale:1,c=m?this.techniques.getCompiled(b):null;if(!o||!u||m&&!c)return this._requestRender(),this._emptyOutput;const d=this.renderingContext,{camera:f}=i;this._passParameters.normalTexture=s,this._passParameters.depthTexture=r,this._passParameters.projScale=1/f.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=h;const{fullWidth:I,fullHeight:x}=f,T=Math.max(1,Math.floor(I*h)),q=Math.max(1,Math.floor(x*h)),F=this.fboCache.acquire(T,q,"global illumination input").acquireColor(w,2);d.bindFramebuffer(F.fbo),d.setViewport(0,0,T,q),d.bindTechnique(o,i,this._passParameters,this._drawParameters),d.screen.draw();const O=F.obtainAttachment(w),C=Math.max(1,Math.round(T/P)),G=Math.max(1,Math.round(q/P)),j=this.fboCache.acquire(C,G,"global illumination blur horizontal");d.bindFramebuffer(j.fbo),this._drawParameters.texture=F.getTexture(),this._drawParameters.weightTexture=O.attachment,l(this._drawParameters.blurSize,0,P/q),d.bindTechnique(u,i,this._passParameters,this._drawParameters),d.setViewport(0,0,C,G),d.screen.draw(),F.release();const y=m?"global illumination blur vertical":n.AMBIENT_ILLUMINATION,M=this.fboCache.acquire(C,G,y);d.bindFramebuffer(M.fbo),d.setViewport(0,0,C,G),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParameters.texture=j.getTexture(),this._drawParameters.weightTexture=O.attachment,l(this._drawParameters.blurSize,P/C,0),d.bindTechnique(u,i,this._passParameters,this._drawParameters),d.setViewport(0,0,C,G),d.screen.draw(),j.release(),M.attachColor(O,w),O.release();let R=M;return c&&(R=this.fboCache.acquire(I,x,n.AMBIENT_ILLUMINATION).acquireColor(w,2),d.bindFramebuffer(R.fbo),d.setViewport(0,0,I,x),d.setClearColor(1,1,1,0),d.clear(16384),this._drawParametersUpscale.colorTexture=M.getTexture(),this._drawParametersUpscale.weightTexture=M.getTexture(w),d.bindTechnique(c,i,this._passParameters,this._drawParametersUpscale),d.screen.draw(),M.release()),d.setViewport4fv(f.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,++this._passParameters.accumulatedFrames,this._storeOutput(R),this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),R}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_storeOutput(e){this._lastOutput!==e&&(this._lastOutput=t(this._lastOutput),this._lastOutput=e,this._lastOutput.retain())}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:s}=this.bindParameters.camera,r=this.fboCache.acquire(t,s,n.AMBIENT_ILLUMINATION).acquireColor(w,2);return e.bindFramebuffer(r.fbo),e.setViewport(0,0,t,s),e.clearBuffer(0,o),e.clearBuffer(1,u),r}get _canRender(){const{reprojection:e,hasEmission:t,globalIllumination:s}=this.bindParameters;return!(!e.lastFrameColor||t&&!e.lastFrameEmission||!e.lastFrameDepth||!s||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}_reset(){this._passParameters.accumulatedFrames=0,this._lastOutput=t(this._lastOutput)}get test(){const e=this;return{passParameters:this._passParameters,configuration:this._configuration,get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},get mode(){return e._mode},restartAccumulation:()=>{this._reset(),this._passParameters.temporalSampleFrame=0,this._resetBuffer=!0,this._requestRender()}}}};e([a()],x.prototype,"consumes",void 0),e([a()],x.prototype,"produces",void 0),x=e([i("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],x);export{x as GlobalIllumination,P as blurSizePixels};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../../core/arrayUtils.js";import"../../../../../core/mathUtils.js";import"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/BooleanDrawUniform.js";import"../../core/shaderModules/Float2DrawUniform.js";import"../../core/shaderModules/FloatDrawUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DDrawUniform.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{G as GlowBlurDrawParameters,b as build}from"../../../../../chunks/GlowBlur.glsl.js";
2
+ import"../../../../../core/arrayUtils.js";import"../../../../../core/mathUtils.js";import"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/BooleanDrawUniform.js";import"../../core/shaderModules/Float2DrawUniform.js";import"../../core/shaderModules/FloatDrawUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DDrawUniform.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{B as BlurEmissionDrawParameters,b as build}from"../../../../../chunks/BlurEmission.glsl.js";
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as r,initial as s}from"../../../../../core/reactiveUtils.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{set as a}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{getReferenceEllipsoid as o}from"../../../../../geometry/ellipsoidUtils.js";import{TransparentEnvironment as h}from"../TransparentEnvironment.js";import{B as n}from"../../../../../chunks/BlurEmission.glsl.js";import{BlurEmissionTechnique as l}from"./BlurEmissionTechnique.js";import{floatBlendReductionFactor as m}from"../../shaders/floatBlendScale.glsl.js";import{noParameters as p}from"../../../../webgl/NoParameters.js";let d=class extends h{constructor(e){super(e),this._glowBoost={realistic:0,cartographicMin:.5,cartographicDefault:2.5,cartographicMax:5},this._drawParameters=new n,this._ellipsoid=o(e.view.spatialReference)}initialize(){this.addHandles([r(()=>this._boost,e=>{this._passParameters.boost=e,this.requestRender(1)},s),r(()=>this.view.stage.renderView.fog?.strength??0,e=>{this._passParameters.scattering=e,this.requestRender(1)},s)])}precompile(){this.techniques.precompile(l)}get _atmosphereRadius(){return this._ellipsoid.radius+this._ellipsoid.atmosphereHeight}_renderEmissionMipMap(){const e=this._passParameters.emission?.attachment;if(!e)return;this._drawParameters.input=e,this._drawParameters.inputScale=this.bindParameters.useFloatBlend.value?1:m,this._drawParameters.level=0,a(this._drawParameters.size,1,1);const t=Math.floor(.5*e.descriptor.width),r=Math.floor(.5*e.descriptor.height),s=this.fboCache,i=s.acquire(t,e.descriptor.height,"blur horizontal",8);let o,h=t,n=e.descriptor.height;const d=this.renderingContext,c=this.techniques.get(l),g=d.bindTechnique(c,this.bindParameters,p);for(;h>=1&&n>=1;)this._drawParameters.isHorizontal=!0,this._setupFBO(i,h,n),g.bindDraw(this.bindParameters,p,this._drawParameters),d.screen.draw(),n=Math.floor(.5*n),this._drawParameters.input=i.getTexture(),this._drawParameters.inputScale=1,this._drawParameters.isHorizontal=!1,a(this._drawParameters.size,h/t,n/r),o??=s.acquire(h,n,"blur mipmap",9),this._setupFBO(o,h,n,this._drawParameters.level),g.bindDraw(this.bindParameters,p,this._drawParameters),d.screen.draw(),s.debugCallback?.(o.name,o.fbo),h=Math.floor(.5*h),this._drawParameters.input=o.getTexture(),++this._drawParameters.level;i.release(),o&&(o.fbo.level=0),this._passParameters.mipmapLevels=this._drawParameters.level,this._passParameters.mipmapTexture=o,d.setViewport(0,0,e.descriptor.width,e.descriptor.height)}get _boost(){return 0===this._mode?this._glowBoost.realistic:this._intensity<=.5?t(this._glowBoost.cartographicMin,this._glowBoost.cartographicDefault,2*this._intensity):t(this._glowBoost.cartographicDefault,this._glowBoost.cartographicMax,2*(this._intensity-.5))}get _mode(){return null==this.view.environment.lighting.glow?this.view.environment.atmosphereEnabled?0:2:1}get _hasBlur(){return 2!==this._mode}get _intensity(){return this.view.environment.lighting.glow?.intensity??0}_setupFBO(e,t,r,s=0){e.fbo.level=s;const i=this.renderingContext;i.bindFramebuffer(e.fbo),i.setViewport(0,0,t,r),i.setClearColor(0,0,0,0),i.clear(16384)}};d=e([i("esri.views.3d.webgl-engine.effects.glow.BlurEmission")],d);export{d as BlurEmission};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as i}from"../../../../../chunks/BlurEmission.glsl.js";import{makePipelineState as t,defaultColorWrite as l}from"../../../../webgl/renderState.js";let n=class extends o{constructor(){super(...arguments),this.shader=new s(i,()=>import("./BlurEmission.glsl.js"))}initializePipeline(){return t({colorWrite:l})}};n=e([r("esri.views.3d.webgl-engine.effects.glow.BlurEmissionTechnique")],n);export{n as BlurEmissionTechnique};
@@ -0,0 +1,37 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import e from"../../../environment/FoggyWeather.js";import{ReadDepth as t}from"../../core/shaderLibrary/output/ReadDepth.glsl.js";import{FloatBindUniform as a}from"../../core/shaderModules/FloatBindUniform.js";import{FloatPassUniform as o}from"../../core/shaderModules/FloatPassUniform.js";import{glsl as i}from"../../core/shaderModules/glsl.js";import{Texture2DBindUniform as r}from"../../core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as l}from"../../core/shaderModules/Texture2DPassUniform.js";import{DistanceFalloffPassParameters as s,getDistanceFalloff as n}from"../raymarching/DistanceFalloff.glsl.js";import{floatBlendScale as m}from"../../shaders/floatBlendScale.glsl.js";import{ToneMapping as p}from"../../shaders/ToneMapping.glsl.js";class c extends s{constructor(){super(...arguments),this.mipmapLevels=1,this.boost=1,this.scattering=1e-4}}function d(s,c){s.include(m,c),s.include(n),s.include(t),s.include(p),s.uniforms.add(new l("emissionTexture",({emission:e})=>e?.attachment),new r("depthTexture",({mainDepth:e})=>e),new o("scattering",({scattering:e})=>e),new o("boost",({boost:e})=>1+.5*e),new o("levels",({mipmapLevels:e},{camera:t})=>e+1+Math.log2(t.pixelScale)),new a("pixelRatioCorrection",({camera:e})=>Math.log2(e.pixelScale)),new l("mipmapTexture",({mipmapTexture:e})=>e?.getTexture())).constants.add("maxScattering","float",e.maxScattering).constants.add("weightEpsilon","float",.005).code.add(i`vec3 readEmission(float level) {
3
+ level *= levels;
4
+ level = max(0.0, level - pixelRatioCorrection);
5
+ return level < 1.0 ?
6
+ texture(emissionTexture, uv).rgb * floatBlendInputScale * (1.0 - level) +
7
+ textureLod(mipmapTexture, uv, 0.0).rgb * level * 0.5 :
8
+ textureLod(mipmapTexture, uv, level - 1.0).rgb / pow(2.0, level);
9
+ }
10
+ float gauss(float x, float sigmaSq) {
11
+ float expon = -(pow(x, 2.0) / (2.0 * sigmaSq));
12
+ return exp(expon) / sqrt(6.283185307179586 * sigmaSq);
13
+ }
14
+ vec3 applyEmissiveGlow() {
15
+ float mainDepth = -1.0;
16
+ float depthSample = depthFromTexture(depthTexture, uv);
17
+ if(depthSample < 1.0 && depthSample > 0.0){
18
+ vec3 cameraSpaceRay = normalize(eyeDir);
19
+ cameraSpaceRay /= cameraSpaceRay.z;
20
+ cameraSpaceRay *= linearizeDepth(depthSample);
21
+ mainDepth = max(0.0, length(cameraSpaceRay));
22
+ }
23
+ vec3 rayDir = normalize(worldRay);
24
+ float dispersionPerPixel = getDistanceFalloff(mainDepth, rayDir, scattering * 0.5);
25
+ float mainPoint = pow(dispersionPerPixel, 2.0);
26
+ vec3 emission = vec3(0.0);
27
+ float weights = 0.0;
28
+ float sigmaSq = (0.1 / maxScattering * scattering + 0.003) + 0.03 * (boost - 1.0);
29
+ for(float level = floor(mainPoint); level < levels; ++level) {
30
+ float point = level / levels;
31
+ float dist = abs(point - mainPoint);
32
+ float weight = gauss(dist, sigmaSq);
33
+ emission += readEmission(point) * weight;
34
+ weights += weight;
35
+ }
36
+ return emission * boost / weights;
37
+ }`)}export{c as BlurEmissionPassParameters,d as applyEmissiveGlow};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{generateUID as i}from"../../../../core/uid.js";import{add as t}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{getContinuousIndexArray as e}from"../../../../geometry/support/Indices.js";import{BoundingInfo as s}from"./BoundingInfo.js";import{Object3DHighlightStateID as h}from"./Object3DStateID.js";import{assert as n}from"./Util.js";class o{constructor(t,e,s){this.material=t,this._buffers=e,this.localOrigin=s,this.id=i(),this.type=1,this.baseGeometry=null,this.layerViewUid=null,this.graphicUid=null,this.castShadow=!1,this._readPrimitivePosition=null,this._boundingInfo=null,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0;const h=t?.useIndexing??!1,o=null!=e.index;n(h===o,"Material index requirement and BufferGeometry.buffers.index must match")}get buffers(){return this._buffers}get indexCount(){return this._buffers.index?.length??this._buffers.vertex.count??0}get readPrimitivePosition(){return this._readPrimitivePosition??=this.material.createPrimitivePositionReader(this.buffers),this._readPrimitivePosition}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}_calculateBoundingInfo(){const i=this.indexCount;if(0===i)return null;const t=this.material.primitiveVertexCount;n(i%t===0,"Indexing error: "+i+" not divisible by "+t);const h=e(i/t);return new s(h,t,this.readPrimitivePosition)}invalidateBoundingInfo(){this._boundingInfo=null}computeAttachmentOrigin(i){return!!this.material.computeAttachmentOrigin(i,this.readPrimitivePosition,this.indexCount)&&(t(i,i,this.localOrigin.vec3),!0)}get highlights(){return this._highlights||r}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}forEachHighlightOption(i){this._highlightOptionsCounts?.forEach((t,e)=>i(e))}allocateIdAndHighlight(i){const t=new h(i);return this.addHighlight(t)}addHighlight(i){this._ensureHighlights().add(i);const{highlightName:t}=i,e=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,e),i}_ensureHighlights(){let i=this._highlights;return i||(i=new Set,this._highlights=i),i}_ensureHighlightOptionsCounts(){let i=this._highlightOptionsCounts;return i||(i=new Map,this._highlightOptionsCounts=i),i}removeHighlight(i){if(this._highlights?.delete(i)){const{highlightName:t}=i,e=this._highlightOptionsCounts?.get(t)??0;e<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,e-1)}}}const r=new Set;export{o as BufferGeometry};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/shading/Gamma.glsl.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../shaders/ToneMapping.glsl.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{E as EmissionCompositePassParameters,b as build}from"../../../../chunks/EmissionComposite.glsl.js";
2
+ import"tslib";import"../core/shaderLibrary/shading/Gamma.glsl.js";import"../core/shaderModules/FloatBindUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import"../effects/glow/applyEmissiveGlow.glsl.js";import"../shaders/floatBlendScale.glsl.js";import"../shaders/ScreenSpacePassAtmosphere.glsl.js";import"../shaders/ToneMapping.glsl.js";import"../../../webgl/ShaderBuilder.js";export{a as EmissionCompositePassParameters,E as EmissionCompositeTechniqueConfiguration,c as build}from"../../../../chunks/EmissionComposite.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as s}from"tslib";import{watch as e,syncAndInitial as t}from"../../../../core/reactiveUtils.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{RenderNodeOutput as o}from"../../webgl.js";import a from"../../webgl/RenderNode.js";import{E as m}from"../../../../chunks/EmissionComposite.glsl.js";import{EmissionCompositeTechnique as n}from"./EmissionCompositeTechnique.js";import{floatBlendReductionFactor as p}from"../shaders/floatBlendScale.glsl.js";import{ColorAttachment1 as c,ColorAttachment0 as h,SizedPixelFormat as d}from"../../../webgl/enums.js";let l=class extends a{constructor(){super(...arguments),this.produces=o.COMPOSITE,this.consumes={required:[o.COMPOSITE]},this._passParameters=new m}initialize(){this.addHandles([e(()=>0!==this.bindParameters.emissions,s=>this.produces=s?o.COMPOSITE:"disabled",t)])}precompile(){0!==this.bindParameters.emissions&&this.techniques.precompile(n)}render(){const s=this.input,e=s.getAttachment(c);if(!e?.attachment)return s;this._passParameters.color=s.getAttachment(h)?.attachment,this._passParameters.emission=e.attachment,this._passParameters.inputScale=this._passParameters.emission?.descriptor.internalFormat===d.RGBA8?p:1;const t=this.renderingContext,r=this.techniques.get(n),i=this.acquireOutputFramebuffer();return t.clear(16384),t.bindTechnique(r,this.bindParameters,this._passParameters),t.screen.draw(),i.moveAttachments(s),i}};s([r()],l.prototype,"produces",void 0),s([r()],l.prototype,"consumes",void 0),l=s([i("esri.views.3d.webgl-engine.lib.EmissionComposite")],l);export{l as EmissionComposite};
2
+ import{__decorate as s}from"tslib";import{releaseMaybe as e}from"../../../../core/maybe.js";import{watch as t,syncAndInitial as r}from"../../../../core/reactiveUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{length as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{RenderNodeOutput as m}from"../../webgl.js";import{BlurEmission as n}from"../effects/glow/BlurEmission.js";import{E as p,a as c}from"../../../../chunks/EmissionComposite.glsl.js";import{EmissionCompositeTechnique as h}from"./EmissionCompositeTechnique.js";import{ColorAttachment1 as u,ColorAttachment0 as l}from"../../../webgl/enums.js";let d=class extends n{constructor(){super(...arguments),this.produces=m.COMPOSITE,this.consumes={required:[m.COMPOSITE]},this._configuration=new p,this._passParameters=new c}initialize(){this.addHandles([t(()=>0!==this.bindParameters.emissions,s=>this.produces=s?m.COMPOSITE:"disabled",r)])}precompile(){0!==this.bindParameters.emissions&&(this._configuration.applyBlur=!this.view.stage.renderView.fog?.renders&&this._hasBlur,this._configuration.applyBlur&&super.precompile(),this._configuration.useFloatBlend=this.bindParameters.useFloatBlend.value,this.techniques.precompile(h,this._configuration))}render(){const s=this.input,t=s.getAttachment(u);if(!t?.attachment)return s;const r=a(this.bindParameters.camera.eye);this._passParameters.atmosphereC=r**2-this._atmosphereRadius**2,this._passParameters.color=s.getAttachment(l)?.attachment,this._passParameters.emission=t,this._configuration.applyBlur&&this._renderEmissionMipMap();const i=this.renderingContext,o=this.techniques.get(h,this._configuration),m=this.acquireOutputFramebuffer();return i.clear(16384),i.bindTechnique(o,this.bindParameters,this._passParameters),i.screen.draw(),this._passParameters.mipmapTexture=e(this._passParameters.mipmapTexture),m.moveAttachments(s),m}};s([i()],d.prototype,"produces",void 0),s([i()],d.prototype,"consumes",void 0),d=s([o("esri.views.3d.webgl-engine.lib.EmissionComposite")],d);export{d as EmissionComposite};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{a as i}from"../../../../chunks/EmissionComposite.glsl.js";import{makePipelineState as t,defaultColorWrite as m}from"../../../webgl/renderState.js";let n=class extends o{constructor(){super(...arguments),this.shader=new r(i,()=>import("./EmissionComposite.glsl.js"))}initializePipeline(){return t({colorWrite:m})}};n=e([s("esri.views.3d.webgl-engine.lib.EmissionCompositeTechnique")],n);export{n as EmissionCompositeTechnique};
2
+ import{__decorate as e}from"tslib";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{b as i}from"../../../../chunks/EmissionComposite.glsl.js";import{makePipelineState as t,defaultColorWrite as m}from"../../../webgl/renderState.js";let n=class extends o{constructor(){super(...arguments),this.shader=new r(i,()=>import("./EmissionComposite.glsl.js"))}initializePipeline(){return t({colorWrite:m})}};n=e([s("esri.views.3d.webgl-engine.lib.EmissionCompositeTechnique")],n);export{n as EmissionCompositeTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{IDENTITY as t,clone as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{getContinuousIndexArray as s}from"../../../../geometry/support/Indices.js";import{cloneAttributeData as n}from"./AttributeArray.js";import{BoundingInfo as o}from"./BoundingInfo.js";import{GeometryBaseInstance as r}from"./GeometryBaseInstance.js";import{Object3DHighlightStateID as h}from"./Object3DStateID.js";import{createPositionAttributeReader as a}from"./PositionReader.js";import{assert as u}from"./Util.js";import{webglDebugEnabled as g}from"../../../webgl/checkWebGLError.js";class l extends r{constructor(t,i,e=null,s=-1,n,o){super(i),this.material=t,this.mapPositions=e,this.edgeIndicesLength=s,this.baseGeometry=n,this.drawIndices=o,this._readPrimitivePosition=null,this._vertexPositionIndicesCache=void 0,this._transformation=void 0,this.localOrigin=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0,this._boundingInfo=null,u((t?.useIndexing??!1)===(null!=o),"Material index requirement and Geometry must match"),this.edgeIndicesLength<0&&(this.edgeIndicesLength=this.indexCount)}get readPrimitivePosition(){return this._readPrimitivePosition??=a(this.positionAttribute,this.drawIndices),this._readPrimitivePosition}_invalidateReadPrimitivePosition(){this._readPrimitivePosition=null}instantiate(t={}){const i=new l(t.material||this.material,[],this.mapPositions,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((t,e)=>{t.exclusive=!1,i._attributes.set(e,t)}),i._boundingInfo=this._boundingInfo,i.transformation=t.transformation||this.transformation,i}getMutableAttribute(t){let i=this._attributes.get(t);return i&&!i.exclusive&&(i={...i,exclusive:!0,data:n(i.data)},this._attributes.set(t,i),"position"===t&&this._invalidateReadPrimitivePosition()),i}setAttributeData(t,i){const e=this._attributes.get(t);e?(this._attributes.set(t,{...e,exclusive:!0,data:i}),"position"===t&&this._invalidateReadPrimitivePosition()):g()&&console.warn(`Setting undefined attribute ${t} data`)}get primitivePositionIndices(){return void 0!==this._vertexPositionIndicesCache||(this._vertexPositionIndicesCache=this._computePrimitivePositionIndices()),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){const{drawIndices:t}=this,i=this.positionAttribute;if(null!=t&&null!=i){const e=new Array;for(const s of t)e.push(i.indices[s]);return e}return i?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const t=this.drawIndices??this.positionAttribute?.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(t){return!!this.material.computeAttachmentOrigin(t,this.readPrimitivePosition,this.indexCount)&&(null!=this._transformation&&e(t,t,this._transformation),!0)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const t=this.positionAttribute,i=this.indexCount;if(!t||0===i)return null;const e=this.material.primitiveVertexCount;u(i%e===0,"Indexing error: "+i+" not divisible by "+e);const n=s(i/e);return new o(n,e,this.readPrimitivePosition)}get transformation(){return this._transformation??t}set transformation(e){this._transformation=e&&e!==t?i(e):null}get highlights(){return this._highlights||d}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(t){this._highlightOptionsCounts?.forEach((i,e)=>t(e))}allocateIdAndHighlight(t){const i=new h(t);return this.addHighlight(i)}addHighlight(t){this._ensureHighlights().add(t);const{highlightName:i}=t,e=(this._highlightOptionsCounts?.get(i)??0)+1;return this._ensureHighlightOptionsCounts().set(i,e),t}_ensureHighlights(){let t=this._highlights;return t||(t=new Set,this._highlights=t),t}_ensureHighlightOptionsCounts(){let t=this._highlightOptionsCounts;return t||(t=new Map,this._highlightOptionsCounts=t),t}removeHighlight(t){if(this._highlights?.delete(t)){const{highlightName:i}=t,e=this._highlightOptionsCounts?.get(i)??0;e<=1?this._highlightOptionsCounts?.delete(i):this._ensureHighlightOptionsCounts().set(i,e-1)}}}const d=new Set;export{l as Geometry};
2
+ import{IDENTITY as t,clone as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{getContinuousIndexArray as s}from"../../../../geometry/support/Indices.js";import{cloneAttributeData as n}from"./AttributeArray.js";import{BoundingInfo as o}from"./BoundingInfo.js";import{GeometryBaseInstance as r}from"./GeometryBaseInstance.js";import{Object3DHighlightStateID as h}from"./Object3DStateID.js";import{createPositionAttributeReader as a}from"./PositionReader.js";import{assert as u}from"./Util.js";import{webglDebugEnabled as g}from"../../../webgl/checkWebGLError.js";class l extends r{constructor(t,i,e=null,s=-1,n,o){super(i),this.material=t,this.mapPositions=e,this.edgeIndicesLength=s,this.baseGeometry=n,this.drawIndices=o,this._readPrimitivePosition=null,this._vertexPositionIndicesCache=void 0,this._transformation=void 0,this.localOrigin=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0,this._boundingInfo=null,u((t?.useIndexing??!1)===(null!=o),"Material index requirement and Geometry must match"),this.edgeIndicesLength<0&&(this.edgeIndicesLength=this.indexCount)}get readPrimitivePosition(){return this._readPrimitivePosition??=a(this.positionAttribute,this.drawIndices),this._readPrimitivePosition}_invalidateReadPrimitivePosition(){this._readPrimitivePosition=null}instantiate(t={}){const i=new l(t.material||this.material,[],this.mapPositions,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((t,e)=>{t.exclusive=!1,i._attributes.set(e,t)}),i._boundingInfo=this._boundingInfo,i.transformation=t.transformation||this.transformation,i}getMutableAttribute(t){let i=this._attributes.get(t);return i&&!i.exclusive&&(i={...i,exclusive:!0,data:n(i.data)},this._attributes.set(t,i),"position"===t&&this._invalidateReadPrimitivePosition()),i}setAttributeData(t,i){const e=this._attributes.get(t);e?(this._attributes.set(t,{...e,exclusive:!0,data:i}),"position"===t&&this._invalidateReadPrimitivePosition()):g()&&console.warn(`Setting undefined attribute ${t} data`)}get primitivePositionIndices(){return void 0!==this._vertexPositionIndicesCache||(this._vertexPositionIndicesCache=this._computePrimitivePositionIndices()),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){const{drawIndices:t}=this,i=this.positionAttribute;if(null!=t&&null!=i){const e=new Array;for(const s of t)e.push(i.indices[s]);return e}return i?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const t=this.drawIndices??this.positionAttribute?.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(t){return!!this.material.computeAttachmentOrigin(t,this.readPrimitivePosition,this.indexCount)&&(null!=this._transformation&&e(t,t,this._transformation),!0)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const t=this.positionAttribute,i=this.indexCount;if(!t||0===i)return null;const e=this.material.primitiveVertexCount;u(i%e===0,"Indexing error: "+i+" not divisible by "+e);const n=s(i/e);return new o(n,e,this.readPrimitivePosition)}get transformation(){return this._transformation??t}set transformation(e){this._transformation=e&&e!==t?i(e):null}get highlights(){return this._highlights||d}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}forEachHighlightOption(t){this._highlightOptionsCounts?.forEach((i,e)=>t(e))}allocateIdAndHighlight(t){const i=new h(t);return this.addHighlight(i)}addHighlight(t){this._ensureHighlights().add(t);const{highlightName:i}=t,e=(this._highlightOptionsCounts?.get(i)??0)+1;return this._ensureHighlightOptionsCounts().set(i,e),t}_ensureHighlights(){let t=this._highlights;return t||(t=new Set,this._highlights=t),t}_ensureHighlightOptionsCounts(){let t=this._highlightOptionsCounts;return t||(t=new Map,this._highlightOptionsCounts=t),t}removeHighlight(t){if(this._highlights?.delete(t)){const{highlightName:i}=t,e=this._highlightOptionsCounts?.get(i)??0;e<=1?this._highlightOptionsCounts?.delete(i):this._ensureHighlightOptionsCounts().set(i,e-1)}}}const d=new Set;export{l as Geometry};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{generateUID as t}from"../../../../core/uid.js";import{compactIndices as s}from"../../../../geometry/support/Indices.js";class i{constructor(i){this.id=t(),this._attributes=new Map;for(const[t,r]of i)this._attributes.set(t,{...r,indices:s(r.indices)})}get attributes(){return this._attributes}}export{i as GeometryBaseInstance};
2
+ import{generateUID as t}from"../../../../core/uid.js";import{compactIndices as s}from"../../../../geometry/support/Indices.js";class i{constructor(i){this.id=t(),this.type=0,this._attributes=new Map;for(const[t,r]of i)this._attributes.set(t,{...r,indices:s(r.indices)})}get attributes(){return this._attributes}}export{i as GeometryBaseInstance};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{generateUID as t}from"../../../../core/uid.js";import{copy as r,multiply as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as o}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{NullSphere as s,Sphere as n}from"../../../../geometry/support/sphere.js";import{maxScale as a}from"../../support/mathUtils.js";class h{constructor(r,e={}){this.geometry=r,this._transformation=i(),this._shaderTransformation=null,this._boundingSphere=null,this.id=t(),this.layerViewUid=e.layerViewUid,this.graphicUid=e.graphicUid,this.castShadow=e.castShadow??!1,e.objectShaderTransformation&&this.objectShaderTransformationChanged(e.objectShaderTransformation)}get indexCount(){return this.geometry.indexCount}get faceCount(){return this.geometry.faceCount}get transformation(){return this._transformation}set transformation(t){r(this._transformation,t),this._boundingSphere=null}get boundingInfo(){return this.geometry.boundingInfo}objectShaderTransformationChanged(t){null==t?this._shaderTransformation=null:(this._shaderTransformation??=i(),e(this._shaderTransformation,t,this.geometry.transformation)),this._boundingSphere=null}get boundingSphere(){return this.boundingInfo?(null==this._boundingSphere&&(this._boundingSphere??=new n,o(this._boundingSphere.center,this.boundingInfo.sphere.center,this.shaderTransformation),this._boundingSphere.radius=this.boundingInfo.sphere.radius*a(this.shaderTransformation)),this._boundingSphere):s}get material(){return this.geometry.material}get shaderTransformation(){return this._shaderTransformation??this.transformation}get attributes(){return this.geometry.attributes}foreachHighlightOptions(t){this.geometry.foreachHighlightOptions(t)}get hasHighlights(){return this.geometry.hasHighlights}get occludees(){return this.geometry.occludees}get visible(){return this.geometry.visible}set visible(t){this.geometry.visible=t}get readPrimitivePosition(){return this.geometry.readPrimitivePosition}}class m extends h{}export{h as RenderGeometry,m as ValidatedRenderGeometry};
2
+ import{generateUID as t}from"../../../../core/uid.js";import{copy as r,multiply as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as o}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{NullSphere as s,Sphere as n}from"../../../../geometry/support/sphere.js";import{maxScale as a}from"../../support/mathUtils.js";class h{get type(){return 0}constructor(r,e={}){this.geometry=r,this._transformation=i(),this._shaderTransformation=null,this._boundingSphere=null,this.id=t(),this.layerViewUid=e.layerViewUid,this.graphicUid=e.graphicUid,this.castShadow=e.castShadow??!1,e.objectShaderTransformation&&this.objectShaderTransformationChanged(e.objectShaderTransformation)}get indexCount(){return this.geometry.indexCount}get faceCount(){return this.geometry.faceCount}get transformation(){return this._transformation}set transformation(t){r(this._transformation,t),this._boundingSphere=null}get boundingInfo(){return this.geometry.boundingInfo}objectShaderTransformationChanged(t){null==t?this._shaderTransformation=null:(this._shaderTransformation??=i(),e(this._shaderTransformation,t,this.geometry.transformation)),this._boundingSphere=null}get boundingSphere(){return this.boundingInfo?(null==this._boundingSphere&&(this._boundingSphere??=new n,o(this._boundingSphere.center,this.boundingInfo.sphere.center,this.shaderTransformation),this._boundingSphere.radius=this.boundingInfo.sphere.radius*a(this.shaderTransformation)),this._boundingSphere):s}get material(){return this.geometry.material}get shaderTransformation(){return this._shaderTransformation??this.transformation}get attributes(){return this.geometry.attributes}forEachHighlightOption(t){this.geometry.forEachHighlightOption(t)}get hasHighlights(){return this.geometry.hasHighlights}get occludees(){return this.geometry.occludees}get visible(){return this.geometry.visible}set visible(t){this.geometry.visible=t}get readPrimitivePosition(){return this.geometry.readPrimitivePosition}}class m extends h{}export{h as RenderGeometry,m as ValidatedRenderGeometry};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as s}from"../../../../core/asyncUtils.js";import has from"../../../../core/has.js";import{removeMaybe as i,abortMaybe as r,destroyMaybe as a,releaseMaybe as n,releaseReferencedMaybe as h}from"../../../../core/maybe.js";import{throwIfAborted as o}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as l,initial as u,sync as _}from"../../../../core/reactiveUtils.js";import{signal as m}from"../../../../core/signal.js";import{property as p,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{equals as b,invert as f,multiply as g,copy as P}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as A,create as I}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as w}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as E,ZEROS as C}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as S}from"../../../../geometry/support/Indices.js";import{RenderNodeOutput as T,InternalRenderCategory as D,AllRenderNodeOutputs as O,AllInternalRenderNodeOutputs as R}from"../../webgl.js";import{minNearDistanceInMeters as N}from"../../state/NearFarHeuristic.js";import{debugFlags as G}from"../../support/debugFlags.js";import{FBOCache as F}from"../core/FBOCache.js";import{RenderPassManager as H}from"../core/renderPasses/RenderPassManager.js";import{isColor as x}from"../core/shaderLibrary/ShaderOutput.js";import{distanceFadeEnd as y}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as v}from"../effects/RenderNodes.js";import{RenderPluginManager as M}from"../effects/RenderPluginManager.js";import{WeatherFader as L}from"../effects/WeatherFader.js";import{innerAtmosphereFadeStart as U}from"../effects/atmosphere/atmosphereUtils.js";import{Blit as q}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as j,renderHighlightBuffer as B}from"../effects/highlight/Highlight.js";import{OITBlend as V}from"../effects/transparency/OITBlend.js";import{AnimationTimer as k}from"./AnimationTimer.js";import{AnimationTimeStep as W}from"./AnimationTimeStep.js";import{BoundingInfo as Q}from"./BoundingInfo.js";import{Compositor as z}from"./Compositor.js";import{DepthRange as Y}from"./DepthRange.js";import{depthRangeFromScene as K}from"./depthRangeUtils.js";import{MainFramebuffer as J}from"./MainFramebuffer.js";import{NavigationDepthCache as X}from"./NavigationDepthCache.js";import{blendingColorAlphaClear as $}from"./OrderIndependentTransparency.js";import{RenderContext as Z,defaultRenderOccludedMask as ee}from"./RenderContext.js";import{RendererBase as te}from"./RendererBase.js";import{setupFeatureDefaults as se}from"./RenderFeature.js";import{RenderPluginInput as ie}from"./RenderPluginInput.js";import{ShadowMap as re}from"./ShadowMap.js";import ae from"./SliceHelper.js";import{MergedRenderer as ne}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as he}from"../parts/renderUtils.js";import{RendererPerformanceInfo as oe,PerformanceCategory as de}from"../statistics/RendererPerformanceInfo.js";import{ColorAttachment1 as le,PixelType as ue,ColorAttachment0 as _e,ColorAttachment2 as me,DrawBufferNone as pe}from"../../../webgl/enums.js";const ce=has("disable-feature:async-navigation-3d-depth-readback");let be=class extends te{constructor(e,t,s,i,r){super({stage:e}),this._techniques=s,this._rctx=i,this._requestRender=r,this._pluginsHas={occludedHudElements:!1,hudElements:!1,water:!1},this.renderPassManager=new H,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=E(0,0,0,1),this._sliceHelper=new ae,this._shadowAccumulator=null,this._shadowCastOptions=null,this.sceneDepthRange=m(Y.Infinite),this._state=m(2),this._hasGlobalIlluminationFlag=!!has("enable-feature:global-illumination"),this._hasAnimations=!1,this._animationTimestep=new W,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=m(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new ie,this._hasTransparentGeometry=!1,this._releaseNodeInputs=e=>{for(const t of Oe)e.some(({name:e})=>e===t)&&this._pluginInput.release(t)},this._testsNeedsDepth=!1,this._fboCache=new F(i),this._compositor=new z(i,s),this._renderStateFeatures=m(se(e.view.qualityProfile));const a=new re(this._fboCache,e.viewingMode);this._renderContext=new Z(this._rctx,a,s),this._framebuffer=new J(this._fboCache,this._bindParameters),this._performanceInfo=new oe(this._rctx),this._blit=new q(s),this.navigationDepthCache=new X(this._rctx,this._fboCache,s,()=>this._requestRender(0)),this._nodes=new v(this._renderContext),this._plugins=new M({renderContext:this._renderContext,techniques:s,materials:t,requestRender:r,controller:e}),this._plugins.add(this.renderPassManager),this.weatherFader=new L({view:e.view,context:this._renderContext}),this.addHandles([d(()=>e.view.state.camera,()=>r(),l),d(()=>G.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},r()},u),d(()=>e.view.environment.background?.color,e=>{const t=e?e.toUnitRGBA():C;w(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),r()},l),d(()=>e.view.environmentManager.shadowsAvailable,e=>{this._bindParameters.shadowMap.enabled=e,this._requestRender(1)},l),d(()=>e.view.state.camera.relativeElevation,e=>this._inGlobeView=(e??1/0)>=y,l),d(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},_),d(()=>this._bindParameters.clouds.data?.state,()=>r(),_),d(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,r()},u),d(()=>"sun"===e.view.environment.lighting?.type,e=>{this._bindParameters.enableFillLights=e,this._requestRender()},l)])}destroy(){this._gpuTimerHandle=i(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowAccumulator=null,this._shadowCastOptions=null,this._loadEdgeViewTask=r(this._loadEdgeViewTask),this._edgeView=a(this._edgeView),this.renderPassManager.dispose(),this.weatherFader=a(this.weatherFader),this._releaseFBOs(),this._disposeOffscreenBuffers(),this.navigationDepthCache.destroy(),this._fboCache.destroy(),this._fboCache=null,this._renderContext.destroy(),this._plugins.destroy(),this._pluginInput=null,this._oitBlendOrNil=null,this._nodes=null,this._framebuffer=null,this._performanceInfo=null,Q.prune(),ne.prune(),S()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _oitBlend(){return this._oitBlendOrNil??=new V(this._techniques),this._oitBlendOrNil}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=se(e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,s){this._renderStateFeatures.mutate(i=>i.set(t,e,s)),this._requestRender()}setTime(e){this._renderContext.time=e}get hasReflections(){return this._bindParameters.screenSpaceReflections.enabled=this._pluginsHas.water&&this.isFeatureEnabled(4),this._bindParameters.screenSpaceReflections.enabled}get _hasHighlights(){return this._plugins.produces(10,2,4,18,12,13,14)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(10,12,13,14)}get hasAmbientIllumination(){return this.isFeatureEnabled(3)&&!this._inGlobeView}get hasGlobalIllumination(){return this._hasGlobalIlluminationFlag&&this.hasAmbientIllumination}get hasGlobalIlluminationHighQuality(){return this.hasGlobalIllumination&&this.isFeatureEnabled(10)}get _keepGlobalIlluminationShadingAlive(){return this._hasGlobalIlluminationFlag&&!this._inGlobeView}get hasSMAA(){return this.isFeatureEnabled(0)}get _emissions(){const e=this._plugins.emissions;return this._hasTransparentGeometry?e:1===e||3===e?1:0}get hasFloatBlend(){return this._rctx.driverTest.floatBufferBlend.result&&this.isFeatureEnabled(9)}get highResolutionAtmosphere(){return this.isFeatureEnabled(2)}get fboCache(){return this._fboCache}setShadowAccumulator(e){this._shadowAccumulator=e,this._shadowCastOptions&&e.setParameters(this._shadowCastOptions)}_releaseFBOs(){this._bindParameters.hudOcclusion=n(this._bindParameters.hudOcclusion),this._bindParameters.depth=null}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._bindParameters.globalIllumination=n(this._bindParameters.globalIllumination),this._bindParameters.reprojection.lastFrameDepth=n(this._bindParameters.reprojection.lastFrameDepth),this._bindParameters.reprojection.lastFrameEmission=n(this._bindParameters.reprojection.lastFrameEmission),this._disposeBindBuffers()}_disposeBindBuffers(){this._bindParameters.shadowMap.disposeOutputs()}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._plugins.updating||this.weatherFader?.readyToRun||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=s(async e=>{const{EdgeView:t}=await(import("./edgeRendering/EdgeView.js"));o(e);const s=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:He(this.stage.view.resourceController)});return this.addHandles(d(()=>s.updating,()=>this._requestRender(),_)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(s)),this._edgeViewCallbacks.length=0,s})),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&b(this._bindParameters.reprojection.matrix,A)}set _reprojectionMatrix(e){t(this._bindParameters.reprojection.matrix,e)&&this._reprojectionMatrixVersion.value++}get shadowsEnabled(){return!!this._bindParameters.shadowMap.enabled}setParameters(e){e.shadowCast&&(this._shadowCastOptions={...this._shadowCastOptions,...e.shadowCast},this._shadowAccumulator?.setParameters(e.shadowCast))}set slice(e){this._sliceHelper.update(e)&&this._requestRender()}get plugins(){return this._plugins}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}addRenderer(e){this._plugins.add(e)}removeRenderer(e){this._plugins.remove(e)}get occludedRequiresStencil(){return this._occludedRequiresOccludeeStencil||this.occludedRequiresIntegratedMeshStencil}get _occludedRequiresOccludeeStencil(){return this._bindParameters.hasOccludees&&!!(8&this.plugins.renderOccludedFlags)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,9)}updateHasFlags(){const has=this._pluginsHas;has.occludedHudElements=this._plugins.produces(0,13),has.hudElements=has.occludedHudElements||this._plugins.produces(0,...Ee),has.water=this._plugins.produces(4,19),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new k(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const s=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==s&&(this._gpuTimerHandle=s?i(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,s=!1){try{return this._isRendering=!0,this._render(e,t,s)}catch(i){console.error(`Exception during rendering: ${i}:\n${i.stack}`)}finally{this._isRendering=!1}return new he(this._pluginInput.get(T.FINAL),null)}_render(e,t,s){const i=0===t;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=i,this._disposeBindBuffers();const{camera:r,contentCamera:a,mode:o,alignPixelEnabled:d}=e;this._state.value=o,this._bindParameters.frameRendererTarget=t,this._bindParameters.output=0,this._bindParameters.emissions=this._emissions,this._bindParameters.alignPixelEnabled=d,this._bindParameters.decorations=!s,this._bindParameters.mainDepth=null,this._bindParameters.useFloatBlend.value=this.hasFloatBlend;const l=!s||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=l?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(D.VIEWSHED),this._bindParameters.cutFillComputationEnabled=this._nodes.produces(D.CUTFILL_COMPUTATION),this._bindParameters.cutFillVisualizationEnabled=this._nodes.produces(D.CUTFILL),this._ensureBindParameters(r,a),this._plugins.sortTestsTransparentOrderedSlots(Se),this._plugins.prepareRender(),this._hasTransparentGeometry=this._plugins.produces(1,...ge),this._renderOverlay(),r.setGLViewport(this._rctx);const u=this._framebuffer,_=u.initialize(r.fullWidth,r.fullHeight,this._backgroundColor),m=this._needsLastFrameColor;m?(_?.retain(m-1),_?.setName("last frame color"),this._bindParameters.reprojection.lastFrameColor?.release(),this._bindParameters.reprojection.lastFrameColor=_):_?.release(),this._bindParameters.hasShadowHighlights=this._needsShadowHighlight&&!s,this._precompilePrepasses(),this.performanceInfo.advance(de.PREPARE);const p=this._computeShadowDepthRange(r);this._pluginInput.set("normals",this._renderNormals()),this._renderAmbientIlluminationAndDepth(),this._renderShadowMap(r,a,this._bindParameters.lighting.mainLight.direction,p),this._renderShadowAccumulation(p),u.bind(),this._bindParameters.mainDepth=u.depth.attachment,this._precompileShaders(i),this._bindParameters.output=0,this._renderOpaque(),this._renderPreTransparent(),this._renderTransparent(),this.hasReflections&&(this._bindParameters.depth=h(this._bindParameters.depth),this._bindParameters.reprojection.lastFrameColor=h(this._bindParameters.reprojection.lastFrameColor)),this._bindParameters.shadowMap.disposeOutput(5),u.update(e=>this._renderNodes(D.CUTFILL_COMPUTATION,e)),this._pluginInput.set(D.FOCUSAREA_MASK,this._renderFocusAreaMask()),u.update(e=>this._renderNodes(D.TRANSPARENT_ENVIRONMENT,e)),u.update(e=>this._renderNodes(D.VIEWSHED,e)),u.update(e=>this._renderNodes(D.LASERLINES,e)),this._nodes.requireGeometryDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),u.update(e=>this._renderNodes(D.FOCUSAREA,e)),this._pluginInput.release(D.FOCUSAREA_MASK),u.update(e=>this._renderNodes(D.CUTFILL,e)),this._pluginInput.release(D.GROUND_DEPTH),u.update(e=>this._renderNodes(D.OCCLUDED,e)),this._pluginInput.set("highlights",this._renderHighlightPrepass());const c=2===t?this._renderObjectAndLayerIdColor():null;u.update(e=>this._renderNodes(T.COMPOSITE,e)),this._bindParameters.shadowMap.disposeOutputs(),this._bindParameters.shadowHighlight=n(this._bindParameters.shadowHighlight),u.update(e=>this._renderNodes(D.ANTIALIASING,e));const b=this._hasTransparentGeometry?2:1,f=this._bindParameters.emissions;let g;return this._bindParameters.emissions=0,this._hasHUDHighlights&&u.update(e=>this._renderHUD(b,e)),u.update(e=>this._renderNodes(D.HIGHLIGHT,e)),this._hasHUDHighlights||u.update(e=>this._renderHUD(b,e)),this._bindParameters.emissions=f,u.update(e=>this._renderNodes(D.MAGNIFIER,e)),u.update(e=>this._renderNodes(T.FINAL,e)),i&&(this._blit.toFramebuffer(u.color,this._bindParameters),ce||2!==o&&0!==o||this.navigationDepthCache.update(this._bindParameters,u.depth.attachment,this._renderContext.time)),this._bindParameters.reprojection.lastFrameDepth?.release(),this._bindParameters.reprojection.lastFrameEmission?.release(),this.hasGlobalIllumination&&(this._bindParameters.reprojection.lastFrameDepth?.release(),this._bindParameters.reprojection.lastFrameDepth=this._bindParameters.depth,0!==this._emissions&&(this._bindParameters.reprojection.lastFrameEmission?.release(),this._bindParameters.reprojection.lastFrameEmission=u.color.obtainAttachment(le))),this._testsNeedsDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),this._releaseFBOs(),u.releaseDepth(),this._bindParameters.reprojection.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),i||(g=u.color,g.retain(),this._releaseFBOs(),this._disposeOffscreenBuffers()),this.performanceInfo.finishFrame(),new he(g,c)}_precompileShaders(e){++this._plugins.context.techniques.precompiling;const t=this._bindParameters;t.output=0;const s=t.emissions;if(this._precompileOpaqueGeometry(),this._nodes.precompile(D.OPAQUE_ENVIRONMENT,D.GAUSSIAN_SPLAT,D.OPAQUE_OCCLUSION_QUERY,D.VOXEL),this._precompileOpaqueGeometry(),t.output=3,this._plugins.precompile(...Pe),t.output=0,this._plugins.precompile(...Pe),this._hasTransparentGeometry){const e=this._pluginsHas.occludedHudElements;this._oitBlend.precompile(t,e,0),this._pluginsHas.hudElements&&this._oitBlend.precompile(t,!1,1),this._precompileTransparentGeometry(),t.hasTransparentEmission&&(t.emissions=3)}this._nodes.precompile(D.FOCUSAREA_MASK),this._compositor.precompile(this._usesPremultipliedAlphaBlit,!!this._needsEdges,t),this._hasTransparentGeometry||this._plugins.precompile(15),this._nodes.precompile(D.TRANSPARENT_ENVIRONMENT,D.VIEWSHED,D.CUTFILL_COMPUTATION,D.CUTFILL,D.LASERLINES,D.FOCUSAREA,D.OCCLUDED,D.ANTIALIASING),t.highlightMixTexture=t.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(0),t.emissions=0,this._precompileHUD(0),this._precompileHUD(1),t.emissions=s,this._hasHighlights&&(t.highlights.forEach((e,s)=>{t.highlightLevel=s,this._precompileAllGeometry(10),this._hasHUDHighlights&&this._plugins.precompile(13,12)}),t.highlightLevel=null,this._nodes.precompile(D.HIGHLIGHT)),t.highlightMixTexture=null,this._nodes.precompile(T.COMPOSITE,D.MAGNIFIER),this._nodes.precompile(D.TRANSPARENT_NO_DEPTH),this._plugins.precompile(8),t.hasOpaqueEmission&&(t.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.precompile(8),t.transparentWithoutDepthEmissionDimmingPass=!1),e&&this._blit.precompile(),--this._plugins.context.techniques.precompiling}_renderFocusAreaMask(){const e=this._nodes.produce(D.FOCUSAREA_MASK,this._pluginInput);return e&&this.performanceInfo.advance(de.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces(D.OBJECT_AND_LAYER_ID_COLOR))return null;const e=this._bindParameters.output;++this._techniques.precompiling;const{width:t,height:s}=this._framebuffer.size;let i=this.fboCache.acquire(t,s,D.OBJECT_AND_LAYER_ID_COLOR).acquireDepth(14);return i=this._renderNodes(D.OBJECT_AND_LAYER_ID_COLOR,i),--this._techniques.precompiling,this._bindParameters.output=e,i}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,s=0===e;if(s||t){const e=s?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const r=Math.max(e,i);this._animationTimestep.frame(r,s)}}readAccumulatedShadow(e){return this._shadowAccumulator?.readAccumulatedShadow(e[0],e[1])??0}readMainDepth(e,t){const{mainDepth:s,camera:i}=this._bindParameters;if(!s)return;const r=this.fboCache.acquire(this._framebuffer.size.width,this._framebuffer.size.height,"linear depth");this._rctx.bindFramebuffer(r.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(C),this._compositor.blitDepthToLinearDepth(this._bindParameters,s),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),r.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,ue.UNSIGNED_BYTE,t),r.release()}get _needsEdges(){return this._edgeView?.shouldRender()?this._edgeView:null}_renderEdges(e){const t=this._needsEdges;if(!t)return;const{width:s,height:i}=this._framebuffer.size,r=this.fboCache.acquire(s,i,"edges");r.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(C),t.render(this._bindParameters,e),r.detachDepth(),this._framebuffer.bind(),this._compositor.composite(this._bindParameters,r.getTexture()),r.release(),this.performanceInfo.advance(1===e?de.OPAQUE_EDGES:de.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(de.OVERLAY)}_renderShadowMap(e,t,s,i){if(!this.shadowsEnabled)return;const r=this._bindParameters.shadowMap;if(r.start(e,s,i,this.isFeatureEnabled(5),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight){this._renderShadowCascades(6,r),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t);const s=this._bindParameters.output;this._bindParameters.output=0,this._bindParameters.shadowHighlight=this._nodes.produce(D.SHADOW_HIGHLIGHT,this._pluginInput),this._bindParameters.output=s,r.disposeOutput(6),r.clear(),this._renderShadowCascades(7,r)}else this._renderShadowCascades(5);e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this._needsShadowHighlight&&(this._bindParameters.depth=h(this._bindParameters.depth)),this.performanceInfo.advance(D.SHADOWMAP)}_precompileShadowCascades(e){0!==this._bindParameters.shadowMap.cascades.length&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._bindParameters.shadowMap){const s=this._bindParameters.output,i=6!==e;t.bindFramebuffer();for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e),i&&this._renderShadowNodes(t.renderTarget);t.finish(e),this._bindParameters.output=s}_renderShadowNodes(e){this._renderInternalNodeCategory(D.SHADOWMAP,e)}get _needsLastFrameColor(){return+this.hasReflections+ +this.hasGlobalIllumination}get _needsDepth(){return+this._nodes.requireGeometryDepth+ +this.hasReflections+ +this.hasGlobalIllumination+ +this._testsNeedsDepth+ +this._needsShadowHighlight}get _usesPremultipliedAlphaBlit(){return this._pluginsHas.hudElements}_renderAmbientIlluminationAndDepth(){this._bindParameters.depth=n(this._bindParameters.depth);const e=this._pluginInput.get("normals");if(e){this._pluginInput.set(D.AMBIENT_ILLUMINATION,this._hasGlobalIlluminationFlag?this._renderGlobalIllumination():this._renderSSAO());const t=this._needsDepth;if(t){const s=e.obtainAttachment(_e);this._rctx.bindFramebuffer(e.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(3),this._bindParameters.depth=e.obtainDepthTexture(),this._bindParameters.depth?.retain(t-1),e.attachColor(s,_e),s?.release(),this.performanceInfo.advance(de.DEPTH)}else e.detachDepth();this.hasAmbientIllumination&&this._pluginInput.release("normals")}else this._hasGlobalIlluminationFlag&&(this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive),this._renderAllGeometryDepth()}_renderAllGeometryDepth(){const e=this._needsDepth;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"geometry depth",14);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(1280),this.renderAllGeometry(3),this._renderGaussianSplatPrepassDepth(i),this._bindParameters.depth=i.obtainDepthTexture(),this._bindParameters.depth?.retain(e-1),i.release(),this.performanceInfo.advance(de.DEPTH)}_renderGaussianSplatPrepassDepth(e){const t=this._shadowAccumulator;if(!t?.active||!t.requireGeometryDepth)return;const s=this._bindParameters.output;this._bindParameters.output=3,this._renderInternalNodeCategory(D.GAUSSIAN_SPLAT_DEPTH,e),this._bindParameters.output=s}_renderGaussianSplatDepthAndNormals(e){const t=this._bindParameters.output;this._bindParameters.output=4,this._renderInternalNodeCategory(D.GAUSSIAN_SPLAT_DEPTH,e),this._bindParameters.output=t}get _needsShadowDepthRange(){return this._bindParameters.shadowMap.enabled||!!this._shadowAccumulator?.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return Y.Zero;const t=K(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),t.union(this._nodes.queryDepthRange(D.SHADOWMAP,e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}updateSceneDepthRange(e){if(!this.stage.view.state.isGlobal)return void(this.sceneDepthRange.value=Y.Infinite);if((this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<U)return void(this.sceneDepthRange.value=Y.Infinite);const t=e.clone();t.near=N,t.far=1e10;const s=K(t,this._plugins.plugins,this.stage.layers,1);s.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(s)||(this.sceneDepthRange.value=s)}get _normalsRequired(){return this._nodes.require("normals",...O,D.VIEWSHED,D.LASERLINES)+(this.hasAmbientIllumination?1:0)}_precompilePrepasses(){const e=!!this._normalsRequired;if(e?(this._precompilePlugins(4,Ae),this._needsDepth&&this._precompilePlugins(3,Ie)):this._needsDepth&&this._precompileAllGeometry(3),this.shadowsEnabled&&(this._needsShadowHighlight?(this._nodes.precompile(D.SHADOW_HIGHLIGHT),this._precompileShadowCascades(6),this._precompileShadowCascades(7)):this._precompileShadowCascades(5)),this._shadowAccumulator?.active&&(this._nodes.precompile(D.SHADOW_ACCUMULATION),this._precompileAllGeometry(5)),this._shadowAccumulator?.active||e){const t=this._bindParameters.output;this._bindParameters.output=e?4:3,this._nodes.precompile(D.GAUSSIAN_SPLAT_DEPTH),this._bindParameters.output=t}(this.shadowsEnabled||this._shadowAccumulator?.active)&&this._nodes.precompile(D.SHADOWMAP),this.hasAmbientIllumination&&e&&this._nodes.precompile(D.AMBIENT_ILLUMINATION)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"normals");i.acquireDepth(14),this._rctx.bindFramebuffer(i.fbo),this._rctx.clearFramebuffer(C,!0,!0),this._bindParameters.output=4,this._plugins.render(...Ae),this._renderGaussianSplatDepthAndNormals(i);const r=this._nodes.optional("normals",...O,D.VIEWSHED);return i.retain(e+r-1),this.performanceInfo.advance(de.NORMALS),i}_renderSSAO(){this._bindParameters.globalIlluminationEnabled=!1;const e=this._pluginInput.get("normals");return this.hasAmbientIllumination&&e?(this._bindParameters.ssao=this._nodes.produce(D.AMBIENT_ILLUMINATION,this._pluginInput),this._bindParameters.ssao&&this.performanceInfo.advance(de.AMBIENT_ILLUMINATION),this._bindParameters.ssao):null}_renderGlobalIllumination(){const e=this._bindParameters;if(!this.hasGlobalIllumination)return this._releaseGlobalIlluminationBuffers(),e.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive,null;const t=this._nodes.produce(D.AMBIENT_ILLUMINATION,this._pluginInput);return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIllumination=t,this._bindParameters.globalIlluminationEnabled=!0,this.performanceInfo.advance(this.hasGlobalIlluminationHighQuality?de.AMBIENT_ILLUMINATION_HIGH_QUALITY:de.AMBIENT_ILLUMINATION),e.globalIllumination}_releaseGlobalIlluminationBuffers(){const e=this._bindParameters;e.reprojection.lastFrameColor=h(e.reprojection.lastFrameColor),e.reprojection.lastFrameDepth=n(e.reprojection.lastFrameDepth),e.reprojection.lastFrameEmission=n(e.reprojection.lastFrameEmission),e.globalIllumination=h(e.globalIllumination),e.globalIlluminationEnabled=!1}_precompileAllGeometry(e){const t=this._bindParameters.output;this._bindParameters.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...Pe),this._bindParameters.output=t}renderAllGeometry(e){this._bindParameters.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const s of t)this._renderContext.renderOccludedMask=s,this.precompileSlots(e,...we);this._renderContext.renderOccludedMask=ee}renderSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.forAll(e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t)})}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>1&&this._plugins.render(9),this.renderSlots(e,...we),this._renderContext.renderOccludedMask=ee}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...Te[e])}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(16),this.renderHUD(e),this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){const e=this._bindParameters.output;this._bindParameters.output=8,this._precompileAllGeometry(8),this._nodes.precompile(D.SHADOWMAP),this._bindParameters.output=e}precompileCutFillDepth(){this._precompilePlugins(9,De)}_precompilePlugins(e,t){const s=this._bindParameters.output;this._bindParameters.output=e,this._plugins.precompile(...t),this._bindParameters.output=s}renderViewshedShadowMap(e,t){const{camera:s,contentCamera:i}=this._bindParameters,r=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(8),this._renderShadowNodes(t),this._ensureBindParametersCamera(s,i),this._bindParameters.camera.setGLViewport(this._rctx),this._bindParameters.output=r}renderCutFillDepth(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._bindParameters.output=9,this._plugins.render(...De),this._ensureBindParametersCamera(t,s),t.setGLViewport(this._rctx),this._bindParameters.output=i}get _needsGroundDepth(){return this._bindParameters.cutFillVisualizationEnabled}_blitGroundDepth(){if(!this._needsGroundDepth)return null;const{width:e,height:t}=this._framebuffer.size,s=this.fboCache.acquire(e,t,D.GROUND_DEPTH,14);return this._rctx.blitFramebuffer(this._framebuffer.color.fbo,s.fbo,256),this._framebuffer.bind(),s}_renderOpaqueAndTransparentGeometry(e){this._bindParameters.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._bindParameters.output=e,this._plugins.render(...Ie)}_precompileOpaqueGeometry(){this._needsOpaquePass&&(this._plugins.precompile(...fe),this._nodes.precompile("opaque-color"))}_renderOpaqueGeometry(){this._plugins.render(...fe)}_renderTransparentGeometry(){this._plugins.render(...ge),this._hasTransparentGeometry&&this._plugins.render(15)}_renderTransparentGround(){this._plugins.render(...Pe)}_precompileHUD(e){if(!this._pluginsHas.hudElements)return;const t=this._bindParameters.output,s=this._bindParameters.hudRenderStyle,i=this._bindParameters.emissions;this._bindParameters.emissions=0,this._bindParameters.hudRenderStyle=e,this._bindParameters.output=1,this._plugins.precompile(...Ee),this._bindParameters.output=2,this._plugins.precompile(...Ee),this._bindParameters.output=0,this._oitBlend.precompile(this._bindParameters,!1,1),this._hasHighlights&&(this._bindParameters.output=10,this._plugins.precompile(...Ee)),this._bindParameters.emissions=i,this._bindParameters.output=t,this._bindParameters.hudRenderStyle=s}_renderHUD(e,t){if(!this._pluginsHas.hudElements)return t;const s=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo);const i=!!t.getTexture(le);return this._compositor.compositePreMultipliedAlpha(this._bindParameters,s.getTexture(),i),s.release(),this.performanceInfo.advance(0===e?de.HUD_OCCLUDED:de.HUD),t}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(6,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:s}=this,{width:i,height:r}=this._framebuffer.size,{highlights:a}=s,n=a.length>j?3:1,h=e.acquire(i,r,"highlights",n);h.acquireDepth(14);const o=this._plugins.produces(10,0);return o&&this._framebuffer.color.fbo&&h.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,h.fbo,1024),t.bindFramebuffer(h.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),o||t.clear(1024),this._bindParameters.output=10,t.bindFramebuffer(h.fbo),B(t,e,i,r,s,()=>this._renderHighlightGeometries()),h.detachDepth(),this.performanceInfo.advance(de.HIGHLIGHTS),h.retain(this._nodes.require("highlights",...R)+this._nodes.optional("highlights",...R)-1),h}_renderHighlightGeometries(){this._plugins.render(...Ce),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e){const t=this._shadowAccumulator;if(!t)return;t.updateDepthRange(e);const s=t.requireGeometryDepth;this._bindParameters.output=0;const i=this._nodes.produce(D.SHADOW_ACCUMULATION,this._pluginInput);t.didAccumulate&&this.performanceInfo.advance(de.ACCUMULATED_SHADOWS),this._pluginInput.set(D.SHADOW_ACCUMULATION,null),i?.release(),s&&(this._bindParameters.depth=h(this._bindParameters.depth))}renderShadowAccumulationShadowMap(e,t,s,i,r){const a=this.stage.view.qualitySettings.maximumPixelRatio;this._bindParameters.renderingShadowAnalysisMap=!0;try{s.start(e,i,r,!0,a),this._renderShadowCascades(5,s),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t)}finally{this._bindParameters.renderingShadowAnalysisMap=!1}}_precompileTransparentGeometry(){x(this._bindParameters.output)?(this._bindParameters.output=1,this._plugins.precompile(...ge),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=2,this._plugins.precompile(...ge),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=0):this._plugins.precompile(...ge)}_renderOIT(e,t=2){const s=1===e,{width:i,height:r}=this._framebuffer.size,a=s?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=h.useFloatBlend.value?8:5,d=h.output;h.output=1;const l=s?"oit hud":"oit",u=this.fboCache.acquire(i,r,l,o).acquireColor(le,this.hasFloatBlend?7:0,"oit alpha"),_=h.hasEmission&&(0===e||1!==t);_&&u.acquireColor(me,o,"oit emissive"),s||u.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(u.fbo),this._rctx.clearFramebuffer($),_&&this._rctx.clearBuffer(2,$),a(),u.detachDepth(),h.output=2;const m=this.fboCache.acquire(i,r,s?"oit front hud":"oit front");_&&m.acquireColor(le,o,"oit front emissive"),s?m.acquireDepth(this._hudDepthFormat):m.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(m.fbo),this._rctx.clearFramebuffer(C,s),a(),m.detachDepth();const p=this._pluginsHas.occludedHudElements&&!s,c=p&&0!==h.emissions?me:le;let b;return h.hudOcclusion=n(this._bindParameters.hudOcclusion),h.output=0,s?(b=this.fboCache.acquire(i,r,"oit composite hud"),this._rctx.bindFramebuffer(b.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):(0!==h.emissions&&this._framebuffer.ensureEmissionAttachment(),p&&(this._framebuffer.color.acquireColor(c,0,"hud occlusion"),this._rctx.clearBuffer(c-_e,C)),this._framebuffer.bind()),this._oitBlend.blend(this._rctx,u,m,h,p,e,this._fboCache.debugCallback),b?.detachDepth(),s||(_&&(this._bindParameters.emissions=3),p&&(h.hudOcclusion=this._framebuffer.color.obtainAttachment(c))),m.release(),u.release(),h.output=d,b}get _hudDepthFormat(){return this.isFeatureEnabled(7)?14:13}get _needsOpaquePass(){return this.plugins.produces(0,...fe)||this.plugins.produces(5,...fe)||this.plugins.produces(3,3)}_renderOpaque(){const e=this._needsOpaquePass;e&&(this._plugins.render(0,1),this._pluginInput.set(D.GROUND_DEPTH,this._blitGroundDepth()),this._plugins.render(2,3));const t=this._framebuffer;t.update(t=>this._renderNodes(T.OPAQUE,t,e)),this.fboCache.debugCallback?.(T.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(D.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(D.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderPreTransparent(){this._framebuffer.update(e=>this._renderNodes(D.GAUSSIAN_SPLAT,e)),this.fboCache.debugCallback?.(D.GAUSSIAN_SPLAT,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(D.OPAQUE_OCCLUSION_QUERY,e)),this.fboCache.debugCallback?.(D.OPAQUE_OCCLUSION_QUERY,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(D.VOXEL,e)),this.fboCache.debugCallback?.(D.VOXEL,this._framebuffer.color.fbo)}_renderTransparent(){const e=this._framebuffer;if(this._renderHiddenTransparentEdges(),this._hasTransparentGeometry&&this._renderOIT(0),e.update(e=>this._renderNodes(T.TRANSPARENT,e,this._hasTransparentGeometry)),this.fboCache.debugCallback?.(T.TRANSPARENT,e.color.fbo),this._hasTransparentGeometry||this._plugins.render(15),this._renderEdges(0),this._bindParameters.ssao=n(this._bindParameters.ssao),e.update(e=>this._renderNodes(D.TRANSPARENT_NO_DEPTH,e)),this.fboCache.debugCallback?.(D.TRANSPARENT_NO_DEPTH,e.color.fbo),this._framebuffer.bind(),this._plugins.render(8),this._bindParameters.hasEmission){const e=this._rctx.setDrawBuffers([pe,le]);this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.render(8),this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!1,this._rctx.setDrawBuffers(e)}this.performanceInfo.advance(de.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderNodes(e,t,s=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return s&&this.performanceInfo.advance(e),t;const i=this._nodes.render(t,this._pluginInput,this._releaseNodeInputs);return this.performanceInfo.advance(e),this._fboCache.debugCallback?.(e,i.fbo),i}_renderInternalNodeCategory(e,t){if(!t)return;const s=t.name;try{this._renderNodes(e,t)}finally{this._pluginInput.set(e,null),t.setName(s)}}_ensureBindParameters(e,t){this._ensureBindParametersCamera(e,t),this._ensureBindParametersWeatherFader(),this._ensureBindParametersScreenSpaceReflections(),this._ensureBindParametersReprojection()}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersWeatherFader(){1===this.stage.viewingMode&&(this._bindParameters.clouds.data&&(this._bindParameters.clouds.fade(this._bindParameters.camera,this.renderContext.time,this.stage.view.qualitySettings.fadeDuration,this.stage.view.state.stationary),this.weatherFader?.cleanupCubemap()),this._bindParameters.snowCover=this.weatherFader?.snowCover??0)}_ensureBindParametersScreenSpaceReflections(){const{time:e}=this.renderContext,{screenSpaceReflections:t}=this._bindParameters;if(this.hasReflections){null==this._ssrEnableTime&&(this._ssrEnableTime=e);const s=this.stage.view.qualitySettings.fadeDuration;t.fadeFactor=s>0?Math.min(s,e-this._ssrEnableTime)/s:1,t.fadeFactor<1&&this._requestRender()}else this._ssrEnableTime=null}_ensureBindParametersReprojection(){if(!(this.hasReflections||this.hasGlobalIllumination))return void(this._reprojectionMatrix=A);const{reprojection:e,camera:t}=this._bindParameters,{lastFrameCamera:s}=e,i=!s.equals(t);if(i?(f(Ne,t.viewMatrix),f(Re,t.projectionMatrix),g(Ge,Ne,Re),g(Ge,s.viewMatrix,Ge),g(Ge,s.projectionMatrix,Ge),this._reprojectionMatrix=Ge):this._reprojectionMatrix=A,this.hasGlobalIllumination){const{viewMatrix:t}=e;i?(g(Fe,s.viewMatrix,Ne),P(t,Fe)):P(t,A)}}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,s,i){this._bindParameters.updateLighting(e,t,s,i),this._requestRender(1)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0,clouds:this.weatherFader?.usedMemory??0}}get test(){}};e([p()],be.prototype,"_inGlobeView",void 0),e([p({readOnly:!0})],be.prototype,"highResolutionAtmosphere",null),e([p()],be.prototype,"_edgeView",void 0),e([p()],be.prototype,"updating",null),be=e([c("esri.views.3d.webgl-engine.lib.Renderer")],be);const fe=[0,1,2,3],ge=[7,6,4,5],Pe=[7,6],Ae=[0,1,2,4,...Pe],Ie=[3,5],we=[2,4,8],Ee=[16,12,14,13],Ce=[4,5,2,3,0,1,...Pe],Se=[4,8,5,11],Te={0:[13],1:[12],2:[13,12],3:[13,12]},De=[0,1,...Pe],Oe=["normals","highlights"],Re=I(),Ne=I(),Ge=I(),Fe=I();function He(e){return t=>e.immediate.schedule(t)}export{be as Renderer};
2
+ import{__decorate as e}from"tslib";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as s}from"../../../../core/asyncUtils.js";import has from"../../../../core/has.js";import{removeMaybe as i,abortMaybe as r,destroyMaybe as a,releaseMaybe as n,releaseReferencedMaybe as h}from"../../../../core/maybe.js";import{throwIfAborted as o}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as l,initial as u,sync as _}from"../../../../core/reactiveUtils.js";import{signal as m}from"../../../../core/signal.js";import{property as p,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{equals as b,invert as f,multiply as g,copy as P}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as A,create as I}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as w}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as E,ZEROS as C}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as S}from"../../../../geometry/support/Indices.js";import{RenderNodeOutput as T,InternalRenderCategory as D,AllRenderNodeOutputs as O,AllInternalRenderNodeOutputs as R}from"../../webgl.js";import{minNearDistanceInMeters as N}from"../../state/NearFarHeuristic.js";import{debugFlags as G}from"../../support/debugFlags.js";import{FBOCache as F}from"../core/FBOCache.js";import{RenderPassManager as H}from"../core/renderPasses/RenderPassManager.js";import{isColor as x}from"../core/shaderLibrary/ShaderOutput.js";import{distanceFadeEnd as y}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as v}from"../effects/RenderNodes.js";import{RenderPluginManager as M}from"../effects/RenderPluginManager.js";import{WeatherFader as L}from"../effects/WeatherFader.js";import{innerAtmosphereFadeStart as U}from"../effects/atmosphere/atmosphereUtils.js";import{Blit as q}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as j,renderHighlightBuffer as B}from"../effects/highlight/Highlight.js";import{OITBlend as V}from"../effects/transparency/OITBlend.js";import{AnimationTimer as k}from"./AnimationTimer.js";import{AnimationTimeStep as W}from"./AnimationTimeStep.js";import{BoundingInfo as Q}from"./BoundingInfo.js";import{Compositor as z}from"./Compositor.js";import{DepthRange as Y}from"./DepthRange.js";import{depthRangeFromScene as K}from"./depthRangeUtils.js";import{MainFramebuffer as J}from"./MainFramebuffer.js";import{NavigationDepthCache as X}from"./NavigationDepthCache.js";import{blendingColorAlphaClear as $}from"./OrderIndependentTransparency.js";import{RenderContext as Z,defaultRenderOccludedMask as ee}from"./RenderContext.js";import{RendererBase as te}from"./RendererBase.js";import{setupFeatureDefaults as se}from"./RenderFeature.js";import{RenderPluginInput as ie}from"./RenderPluginInput.js";import{ShadowMap as re}from"./ShadowMap.js";import ae from"./SliceHelper.js";import{MergedRenderer as ne}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as he}from"../parts/renderUtils.js";import{RendererPerformanceInfo as oe,PerformanceCategory as de}from"../statistics/RendererPerformanceInfo.js";import{ColorAttachment1 as le,PixelType as ue,ColorAttachment0 as _e,ColorAttachment2 as me,DrawBufferNone as pe}from"../../../webgl/enums.js";const ce=has("disable-feature:async-navigation-3d-depth-readback");let be=class extends te{constructor(e,t,s,i,r){super({stage:e}),this._techniques=s,this._rctx=i,this._requestRender=r,this._pluginsHas={occludedHudElements:!1,hudElements:!1,water:!1},this.renderPassManager=new H,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=E(0,0,0,1),this._sliceHelper=new ae,this._shadowAccumulator=null,this._shadowCastOptions=null,this.sceneDepthRange=m(Y.Infinite),this._state=m(2),this._hasGlobalIlluminationFlag=!!has("enable-feature:global-illumination"),this._hasAnimations=!1,this._animationTimestep=new W,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=m(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new ie,this._hasTransparentGeometry=!1,this._releaseNodeInputs=e=>{for(const t of Oe)e.some(({name:e})=>e===t)&&this._pluginInput.release(t)},this._testsNeedsDepth=!1,this._fboCache=new F(i),this._compositor=new z(i,s),this._renderStateFeatures=m(se(e.view.qualityProfile));const a=new re(this._fboCache,e.viewingMode);this._renderContext=new Z(this._rctx,a,s),this._framebuffer=new J(this._fboCache,this._bindParameters),this._performanceInfo=new oe(this._rctx),this._blit=new q(s),this.navigationDepthCache=new X(this._rctx,this._fboCache,s,()=>this._requestRender(0)),this._nodes=new v(this._renderContext),this._plugins=new M({renderContext:this._renderContext,techniques:s,materials:t,requestRender:r,controller:e}),this._plugins.add(this.renderPassManager),this.weatherFader=new L({view:e.view,context:this._renderContext}),this.addHandles([d(()=>e.view.state.camera,()=>r(),l),d(()=>G.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES,e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(0):()=>{},r()},u),d(()=>e.view.environment.background?.color,e=>{const t=e?e.toUnitRGBA():C;w(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),r()},l),d(()=>e.view.environmentManager.shadowsAvailable,e=>{this._bindParameters.shadowMap.enabled=e,this._requestRender(1)},l),d(()=>e.view.state.camera.relativeElevation,e=>this._inGlobeView=(e??1/0)>=y,l),d(()=>this._bindParameters.clouds.fadeFactor,()=>{this._bindParameters.fadeLighting(),this._requestRender(2)},_),d(()=>this._bindParameters.clouds.data?.state,()=>r(),_),d(()=>e.view.state.highlights,e=>{this._bindParameters.highlights=e,r()},u),d(()=>"sun"===e.view.environment.lighting?.type,e=>{this._bindParameters.enableFillLights=e,this._requestRender()},l)])}destroy(){this._gpuTimerHandle=i(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowAccumulator=null,this._shadowCastOptions=null,this._loadEdgeViewTask=r(this._loadEdgeViewTask),this._edgeView=a(this._edgeView),this.renderPassManager.dispose(),this.weatherFader=a(this.weatherFader),this._releaseFBOs(),this._disposeOffscreenBuffers(),this.navigationDepthCache.destroy(),this._fboCache.destroy(),this._fboCache=null,this._renderContext.destroy(),this._plugins.destroy(),this._pluginInput=null,this._oitBlendOrNil=null,this._nodes=null,this._framebuffer=null,this._performanceInfo=null,Q.prune(),ne.prune(),S()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _oitBlend(){return this._oitBlendOrNil??=new V(this._techniques),this._oitBlendOrNil}get performanceInfo(){return this._performanceInfo}updateRenderFeatures(e){this._renderStateFeatures.value=se(e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,s){this._renderStateFeatures.mutate(i=>i.set(t,e,s)),this._requestRender()}setTime(e){this._renderContext.time=e}get hasReflections(){return this._bindParameters.screenSpaceReflections.enabled=this._pluginsHas.water&&this.isFeatureEnabled(4),this._bindParameters.screenSpaceReflections.enabled}get _hasHighlights(){return this._plugins.produces(10,2,4,18,12,13,14)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(10,12,13,14)}get hasAmbientIllumination(){return this.isFeatureEnabled(3)&&!this._inGlobeView}get hasGlobalIllumination(){return this._hasGlobalIlluminationFlag&&this.hasAmbientIllumination}get hasGlobalIlluminationHighQuality(){return this.hasGlobalIllumination&&this.isFeatureEnabled(10)}get _keepGlobalIlluminationShadingAlive(){return this._hasGlobalIlluminationFlag&&!this._inGlobeView}get hasSMAA(){return this.isFeatureEnabled(0)}get _emissions(){const e=this._plugins.emissions;return this._hasTransparentGeometry?e:1===e||3===e?1:0}get hasFloatBlend(){return this._rctx.driverTest.floatBufferBlend.result&&this.isFeatureEnabled(9)}get highResolutionAtmosphere(){return this.isFeatureEnabled(2)}get fboCache(){return this._fboCache}setShadowAccumulator(e){this._shadowAccumulator=e,this._shadowCastOptions&&e.setParameters(this._shadowCastOptions)}_releaseFBOs(){this._bindParameters.hudOcclusion=n(this._bindParameters.hudOcclusion),this._bindParameters.depth=null}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._bindParameters.globalIllumination=n(this._bindParameters.globalIllumination),this._bindParameters.reprojection.lastFrameDepth=n(this._bindParameters.reprojection.lastFrameDepth),this._bindParameters.reprojection.lastFrameEmission=n(this._bindParameters.reprojection.lastFrameEmission),this._disposeBindBuffers()}_disposeBindBuffers(){this._bindParameters.shadowMap.disposeOutputs()}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._plugins.updating||this.weatherFader?.readyToRun||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=s(async e=>{const{EdgeView:t}=await(import("./edgeRendering/EdgeView.js"));o(e);const s=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:He(this.stage.view.resourceController)});return this.addHandles(d(()=>s.updating,()=>this._requestRender(),_)),this._requestRender(),this._edgeViewCallbacks.forEach(e=>e(s)),this._edgeViewCallbacks.length=0,s})),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView().catch(()=>{}),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&b(this._bindParameters.reprojection.matrix,A)}set _reprojectionMatrix(e){t(this._bindParameters.reprojection.matrix,e)&&this._reprojectionMatrixVersion.value++}get shadowsEnabled(){return!!this._bindParameters.shadowMap.enabled}setParameters(e){e.shadowCast&&(this._shadowCastOptions={...this._shadowCastOptions,...e.shadowCast},this._shadowAccumulator?.setParameters(e.shadowCast))}set slice(e){this._sliceHelper.update(e)&&this._requestRender()}get plugins(){return this._plugins}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}addRenderer(e){this._plugins.add(e)}removeRenderer(e){this._plugins.remove(e)}get occludedRequiresStencil(){return this._occludedRequiresOccludeeStencil||this.occludedRequiresIntegratedMeshStencil}get _occludedRequiresOccludeeStencil(){return this._bindParameters.hasOccludees&&!!(8&this.plugins.renderOccludedFlags)}get occludedRequiresIntegratedMeshStencil(){return this._plugins.produces(0,0)&&this._plugins.produces(0,9)}updateHasFlags(){const has=this._pluginsHas;has.occludedHudElements=this._plugins.produces(0,13),has.hudElements=has.occludedHudElements||this._plugins.produces(0,...Ee),has.water=this._plugins.produces(4,19),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new k(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const s=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==s&&(this._gpuTimerHandle=s?i(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,s=!1){try{return this._isRendering=!0,this._render(e,t,s)}catch(i){console.error(`Exception during rendering: ${i}:\n${i.stack}`)}finally{this._isRendering=!1}return new he(this._pluginInput.get(T.FINAL),null)}_render(e,t,s){const i=0===t;this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=i,this._disposeBindBuffers();const{camera:r,contentCamera:a,mode:o,alignPixelEnabled:d}=e;this._state.value=o,this._bindParameters.frameRendererTarget=t,this._bindParameters.output=0,this._bindParameters.emissions=this._emissions,this._bindParameters.alignPixelEnabled=d,this._bindParameters.decorations=!s,this._bindParameters.mainDepth=null,this._bindParameters.useFloatBlend.value=this.hasFloatBlend;const l=!s||!this._sliceHelper.isDecoration;this._bindParameters.slicePlane=l?this._sliceHelper.plane:null,this._bindParameters.viewshedEnabled=this._nodes.produces(D.VIEWSHED),this._bindParameters.cutFillComputationEnabled=this._nodes.produces(D.CUTFILL_COMPUTATION),this._bindParameters.cutFillVisualizationEnabled=this._nodes.produces(D.CUTFILL),this._ensureBindParameters(r,a),this._plugins.sortTestsTransparentOrderedSlots(Se),this._plugins.prepareRender(),this._hasTransparentGeometry=this._plugins.produces(1,...ge),this._renderOverlay(),r.setGLViewport(this._rctx);const u=this._framebuffer,_=u.initialize(r.fullWidth,r.fullHeight,this._backgroundColor),m=this._needsLastFrameColor;m?(_?.retain(m-1),_?.setName("last frame color"),this._bindParameters.reprojection.lastFrameColor?.release(),this._bindParameters.reprojection.lastFrameColor=_):_?.release(),this._bindParameters.hasShadowHighlights=this._needsShadowHighlight&&!s,this._precompilePrepasses(),this.performanceInfo.advance(de.PREPARE);const p=this._computeShadowDepthRange(r);this._pluginInput.set("normals",this._renderNormals()),this._renderAmbientIlluminationAndDepth(),this._renderShadowMap(r,a,this._bindParameters.lighting.mainLight.direction,p),this._renderShadowAccumulation(p),u.bind(),this._bindParameters.mainDepth=u.depth.attachment,this._precompileShaders(i),this._bindParameters.output=0,this._renderOpaque(),this._renderPreTransparent(),this._renderTransparent(),this.hasReflections&&(this._bindParameters.depth=h(this._bindParameters.depth),this._bindParameters.reprojection.lastFrameColor=h(this._bindParameters.reprojection.lastFrameColor)),this._bindParameters.shadowMap.disposeOutput(5),u.update(e=>this._renderNodes(D.CUTFILL_COMPUTATION,e)),this._pluginInput.set(D.FOCUSAREA_MASK,this._renderFocusAreaMask()),u.update(e=>this._renderNodes(D.TRANSPARENT_ENVIRONMENT,e)),u.update(e=>this._renderNodes(D.VIEWSHED,e)),u.update(e=>this._renderNodes(D.LASERLINES,e)),this._nodes.requireGeometryDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),u.update(e=>this._renderNodes(D.FOCUSAREA,e)),this._pluginInput.release(D.FOCUSAREA_MASK),u.update(e=>this._renderNodes(D.CUTFILL,e)),this._pluginInput.release(D.GROUND_DEPTH),u.update(e=>this._renderNodes(D.OCCLUDED,e)),this._pluginInput.set("highlights",this._renderHighlightPrepass());const c=2===t?this._renderObjectAndLayerIdColor():null;u.update(e=>this._renderNodes(T.COMPOSITE,e)),this._bindParameters.shadowMap.disposeOutputs(),this._bindParameters.shadowHighlight=n(this._bindParameters.shadowHighlight),u.update(e=>this._renderNodes(D.ANTIALIASING,e));const b=this._hasTransparentGeometry?2:1,f=this._bindParameters.emissions;let g;return this._bindParameters.emissions=0,this._hasHUDHighlights&&u.update(e=>this._renderHUD(b,e)),u.update(e=>this._renderNodes(D.HIGHLIGHT,e)),this._hasHUDHighlights||u.update(e=>this._renderHUD(b,e)),this._bindParameters.emissions=f,u.update(e=>this._renderNodes(D.MAGNIFIER,e)),u.update(e=>this._renderNodes(T.FINAL,e)),i&&(this._blit.toFramebuffer(u.color,this._bindParameters),ce||2!==o&&0!==o||this.navigationDepthCache.update(this._bindParameters,u.depth.attachment,this._renderContext.time)),this._bindParameters.reprojection.lastFrameDepth?.release(),this._bindParameters.reprojection.lastFrameEmission?.release(),this.hasGlobalIllumination&&(this._bindParameters.reprojection.lastFrameDepth?.release(),this._bindParameters.reprojection.lastFrameDepth=this._bindParameters.depth,0!==this._emissions&&(this._bindParameters.reprojection.lastFrameEmission?.release(),this._bindParameters.reprojection.lastFrameEmission=u.color.obtainAttachment(le))),this._testsNeedsDepth&&(this._bindParameters.depth=h(this._bindParameters.depth)),this._releaseFBOs(),u.releaseDepth(),this._bindParameters.reprojection.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),i||(g=u.color,g.retain(),this._releaseFBOs(),this._disposeOffscreenBuffers()),this.performanceInfo.finishFrame(),new he(g,c)}_precompileShaders(e){++this._plugins.context.techniques.precompiling;const t=this._bindParameters;t.output=0;const s=t.emissions;if(this._precompileOpaqueGeometry(),this._nodes.precompile(D.OPAQUE_ENVIRONMENT,D.GAUSSIAN_SPLAT,D.OPAQUE_OCCLUSION_QUERY,D.VOXEL),this._precompileOpaqueGeometry(),t.output=3,this._plugins.precompile(...Pe),t.output=0,this._plugins.precompile(...Pe),this._hasTransparentGeometry){const e=this._pluginsHas.occludedHudElements;this._oitBlend.precompile(t,e,0),this._pluginsHas.hudElements&&this._oitBlend.precompile(t,!1,1),this._precompileTransparentGeometry(),t.hasTransparentEmission&&(t.emissions=3)}this._nodes.precompile(D.FOCUSAREA_MASK),this._compositor.precompile(this._usesPremultipliedAlphaBlit,!!this._needsEdges,t),this._hasTransparentGeometry||this._plugins.precompile(15),this._nodes.precompile(D.TRANSPARENT_ENVIRONMENT,D.VIEWSHED,D.CUTFILL_COMPUTATION,D.CUTFILL,D.LASERLINES,D.FOCUSAREA,D.OCCLUDED,D.ANTIALIASING),t.highlightMixTexture=t.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(0),t.emissions=0,this._precompileHUD(0),this._precompileHUD(1),t.emissions=s,this._hasHighlights&&(t.highlights.forEach((e,s)=>{t.highlightLevel=s,this._precompileAllGeometry(10),this._hasHUDHighlights&&this._plugins.precompile(13,12)}),t.highlightLevel=null,this._nodes.precompile(D.HIGHLIGHT)),t.highlightMixTexture=null,this._nodes.precompile(T.COMPOSITE,D.MAGNIFIER),this._nodes.precompile(D.TRANSPARENT_NO_DEPTH),this._plugins.precompile(8),t.hasOpaqueEmission&&(t.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.precompile(8),t.transparentWithoutDepthEmissionDimmingPass=!1),e&&this._blit.precompile(),--this._plugins.context.techniques.precompiling}_renderFocusAreaMask(){const e=this._nodes.produce(D.FOCUSAREA_MASK,this._pluginInput);return e&&this.performanceInfo.advance(de.FOCUS_AREA_MASK),e}_renderObjectAndLayerIdColor(){if(!this._nodes.produces(D.OBJECT_AND_LAYER_ID_COLOR))return null;const e=this._bindParameters.output;++this._techniques.precompiling;const{width:t,height:s}=this._framebuffer.size;let i=this.fboCache.acquire(t,s,D.OBJECT_AND_LAYER_ID_COLOR).acquireDepth(14);return i=this._renderNodes(D.OBJECT_AND_LAYER_ID_COLOR,i),--this._techniques.precompiling,this._bindParameters.output=e,i}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,s=0===e;if(s||t){const e=s?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const r=Math.max(e,i);this._animationTimestep.frame(r,s)}}readAccumulatedShadow(e){return this._shadowAccumulator?.readAccumulatedShadow(e[0],e[1])??0}readMainDepth(e,t){const{mainDepth:s,camera:i}=this._bindParameters;if(!s)return;const r=this.fboCache.acquire(this._framebuffer.size.width,this._framebuffer.size.height,"linear depth");this._rctx.bindFramebuffer(r.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(C),this._compositor.blitDepthToLinearDepth(this._bindParameters,s),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),r.fbo?.readPixels(e[0],e[1],e[2],e[3],6408,ue.UNSIGNED_BYTE,t),r.release()}get _needsEdges(){return this._edgeView?.shouldRender()?this._edgeView:null}_renderEdges(e){const t=this._needsEdges;if(!t)return;const{width:s,height:i}=this._framebuffer.size,r=this.fboCache.acquire(s,i,"edges");r.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(C),t.render(this._bindParameters,e),r.detachDepth(),this._framebuffer.bind(),this._compositor.composite(this._bindParameters,r.getTexture()),r.release(),this.performanceInfo.advance(1===e?de.OPAQUE_EDGES:de.TRANSPARENT_EDGES)}_renderOverlay(){this._bindParameters.overlay=this.overlay?.render(this._renderContext.time),this._bindParameters.overlay&&this.performanceInfo.advance(de.OVERLAY)}_renderShadowMap(e,t,s,i){if(!this.shadowsEnabled)return;const r=this._bindParameters.shadowMap;if(r.start(e,s,i,this.isFeatureEnabled(5),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight){this._renderShadowCascades(6,r),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t);const s=this._bindParameters.output;this._bindParameters.output=0,this._bindParameters.shadowHighlight=this._nodes.produce(D.SHADOW_HIGHLIGHT,this._pluginInput),this._bindParameters.output=s,r.disposeOutput(6),r.clear(),this._renderShadowCascades(7,r)}else this._renderShadowCascades(5);e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,this._bindParameters.contentCamera),this._needsShadowHighlight&&(this._bindParameters.depth=h(this._bindParameters.depth)),this.performanceInfo.advance(D.SHADOWMAP)}_precompileShadowCascades(e){0!==this._bindParameters.shadowMap.cascades.length&&this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._bindParameters.shadowMap){const s=this._bindParameters.output,i=6!==e;t.bindFramebuffer();for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e),i&&this._renderShadowNodes(t.renderTarget);t.finish(e),this._bindParameters.output=s}_renderShadowNodes(e){this._renderInternalNodeCategory(D.SHADOWMAP,e)}get _needsLastFrameColor(){return+this.hasReflections+ +this.hasGlobalIllumination}get _needsDepth(){return+this._nodes.requireGeometryDepth+ +this.hasReflections+ +this.hasGlobalIllumination+ +this._testsNeedsDepth+ +this._needsShadowHighlight}get _usesPremultipliedAlphaBlit(){return this._pluginsHas.hudElements}_renderAmbientIlluminationAndDepth(){this._bindParameters.depth=n(this._bindParameters.depth);const e=this._pluginInput.get("normals");if(e){this._pluginInput.set(D.AMBIENT_ILLUMINATION,this._hasGlobalIlluminationFlag?this._renderGlobalIllumination():this._renderSSAO());const t=this._needsDepth;if(t){const s=e.obtainAttachment(_e);this._rctx.bindFramebuffer(e.fbo),this._rctx.clear(1024),this._renderGeometryWithoutNormals(3),this._bindParameters.depth=e.obtainDepthTexture(),this._bindParameters.depth?.retain(t-1),e.attachColor(s,_e),s?.release(),this.performanceInfo.advance(de.DEPTH)}else e.detachDepth();this.hasAmbientIllumination&&this._pluginInput.release("normals")}else this._hasGlobalIlluminationFlag&&(this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive),this._renderAllGeometryDepth()}_renderAllGeometryDepth(){const e=this._needsDepth;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"geometry depth",14);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(1280),this.renderAllGeometry(3),this._renderGaussianSplatPrepassDepth(i),this._bindParameters.depth=i.obtainDepthTexture(),this._bindParameters.depth?.retain(e-1),i.release(),this.performanceInfo.advance(de.DEPTH)}_renderGaussianSplatPrepassDepth(e){const t=this._shadowAccumulator;if(!t?.active||!t.requireGeometryDepth)return;const s=this._bindParameters.output;this._bindParameters.output=3,this._renderInternalNodeCategory(D.GAUSSIAN_SPLAT_DEPTH,e),this._bindParameters.output=s}_renderGaussianSplatDepthAndNormals(e){const t=this._bindParameters.output;this._bindParameters.output=4,this._renderInternalNodeCategory(D.GAUSSIAN_SPLAT_DEPTH,e),this._bindParameters.output=t}get _needsShadowDepthRange(){return this._bindParameters.shadowMap.enabled||!!this._shadowAccumulator?.active}_computeShadowDepthRange(e){if(!this._needsShadowDepthRange)return Y.Zero;const t=K(e,this._plugins.plugins,this.stage.layers,0);return t.union(this._plugins.queryDepthRange(e)),t.union(this._nodes.queryDepthRange(D.SHADOWMAP,e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}updateSceneDepthRange(e){if(!this.stage.view.state.isGlobal)return void(this.sceneDepthRange.value=Y.Infinite);if((this.stage.view.renderCoordsHelper?.getAltitude(e.eye)??0)<U)return void(this.sceneDepthRange.value=Y.Infinite);const t=e.clone();t.near=N,t.far=1e10;const s=K(t,this._plugins.plugins,this.stage.layers,1);s.union(this._plugins.queryDepthRange(t)),this.sceneDepthRange.value.equals(s)||(this.sceneDepthRange.value=s)}get _normalsRequired(){return this._nodes.require("normals",...O,D.VIEWSHED,D.LASERLINES)+(this.hasAmbientIllumination?1:0)}_precompilePrepasses(){const e=!!this._normalsRequired;if(e?(this._precompilePlugins(4,Ae),this._needsDepth&&this._precompilePlugins(3,Ie)):this._needsDepth&&this._precompileAllGeometry(3),this.shadowsEnabled&&(this._needsShadowHighlight?(this._nodes.precompile(D.SHADOW_HIGHLIGHT),this._precompileShadowCascades(6),this._precompileShadowCascades(7)):this._precompileShadowCascades(5)),this._shadowAccumulator?.active&&(this._nodes.precompile(D.SHADOW_ACCUMULATION),this._precompileAllGeometry(5)),this._shadowAccumulator?.active||e){const t=this._bindParameters.output;this._bindParameters.output=e?4:3,this._nodes.precompile(D.GAUSSIAN_SPLAT_DEPTH),this._bindParameters.output=t}(this.shadowsEnabled||this._shadowAccumulator?.active)&&this._nodes.precompile(D.SHADOWMAP),this.hasAmbientIllumination&&e&&this._nodes.precompile(D.AMBIENT_ILLUMINATION)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const{width:t,height:s}=this._framebuffer.size,i=this.fboCache.acquire(t,s,"normals");i.acquireDepth(14),this._rctx.bindFramebuffer(i.fbo),this._rctx.clearFramebuffer(C,!0,!0),this._bindParameters.output=4,this._plugins.render(...Ae),this._renderGaussianSplatDepthAndNormals(i);const r=this._nodes.optional("normals",...O,D.VIEWSHED);return i.retain(e+r-1),this.performanceInfo.advance(de.NORMALS),i}_renderSSAO(){this._bindParameters.globalIlluminationEnabled=!1;const e=this._pluginInput.get("normals");return this.hasAmbientIllumination&&e?(this._bindParameters.ssao=this._nodes.produce(D.AMBIENT_ILLUMINATION,this._pluginInput),this._bindParameters.ssao&&this.performanceInfo.advance(de.AMBIENT_ILLUMINATION),this._bindParameters.ssao):null}_renderGlobalIllumination(){const e=this._bindParameters;if(!this.hasGlobalIllumination)return this._releaseGlobalIlluminationBuffers(),e.globalIlluminationEnabled=this._keepGlobalIlluminationShadingAlive,null;const t=this._nodes.produce(D.AMBIENT_ILLUMINATION,this._pluginInput);return this._releaseGlobalIlluminationBuffers(),this._bindParameters.globalIllumination=t,this._bindParameters.globalIlluminationEnabled=!0,this.performanceInfo.advance(this.hasGlobalIlluminationHighQuality?de.AMBIENT_ILLUMINATION_HIGH_QUALITY:de.AMBIENT_ILLUMINATION),e.globalIllumination}_releaseGlobalIlluminationBuffers(){const e=this._bindParameters;e.reprojection.lastFrameColor=h(e.reprojection.lastFrameColor),e.reprojection.lastFrameDepth=n(e.reprojection.lastFrameDepth),e.reprojection.lastFrameEmission=n(e.reprojection.lastFrameEmission),e.globalIllumination=h(e.globalIllumination),e.globalIlluminationEnabled=!1}_precompileAllGeometry(e){const t=this._bindParameters.output;this._bindParameters.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(...Pe),this._bindParameters.output=t}renderAllGeometry(e){this._bindParameters.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentGround()}precompileSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const s of t)this._renderContext.renderOccludedMask=s,this.precompileSlots(e,...we);this._renderContext.renderOccludedMask=ee}renderSlots(e,...t){for(const s of t)this._bindParameters.slot=s,e.forAll(e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t)})}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>1&&this._plugins.render(9),this.renderSlots(e,...we),this._renderContext.renderOccludedMask=ee}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(...Te[e])}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(16),this.renderHUD(e),this._bindParameters.hudRenderStyle=e,this._plugins.render(14)}precompileViewshedShadowMap(){const e=this._bindParameters.output;this._bindParameters.output=8,this._precompileAllGeometry(8),this._nodes.precompile(D.SHADOWMAP),this._bindParameters.output=e}precompileCutFillDepth(){this._precompilePlugins(9,De)}_precompilePlugins(e,t){const s=this._bindParameters.output;this._bindParameters.output=e,this._plugins.precompile(...t),this._bindParameters.output=s}renderViewshedShadowMap(e,t){const{camera:s,contentCamera:i}=this._bindParameters,r=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(8),this._renderShadowNodes(t),this._ensureBindParametersCamera(s,i),this._bindParameters.camera.setGLViewport(this._rctx),this._bindParameters.output=r}renderCutFillDepth(e){const{camera:t,contentCamera:s}=this._bindParameters,i=this._bindParameters.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this._bindParameters.output=9,this._plugins.render(...De),this._ensureBindParametersCamera(t,s),t.setGLViewport(this._rctx),this._bindParameters.output=i}get _needsGroundDepth(){return this._bindParameters.cutFillVisualizationEnabled}_blitGroundDepth(){if(!this._needsGroundDepth)return null;const{width:e,height:t}=this._framebuffer.size,s=this.fboCache.acquire(e,t,D.GROUND_DEPTH,14);return this._rctx.blitFramebuffer(this._framebuffer.color.fbo,s.fbo,256),this._framebuffer.bind(),s}_renderOpaqueAndTransparentGeometry(e){this._bindParameters.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithoutNormals(e){this._bindParameters.output=e,this._plugins.render(...Ie)}_precompileOpaqueGeometry(){this._needsOpaquePass&&(this._plugins.precompile(...fe),this._nodes.precompile("opaque-color"))}_renderOpaqueGeometry(){this._plugins.render(...fe)}_renderTransparentGeometry(){this._plugins.render(...ge),this._hasTransparentGeometry&&this._plugins.render(15)}_renderTransparentGround(){this._plugins.render(...Pe)}_precompileHUD(e){if(!this._pluginsHas.hudElements)return;const t=this._bindParameters.output,s=this._bindParameters.hudRenderStyle,i=this._bindParameters.emissions;this._bindParameters.emissions=0,this._bindParameters.hudRenderStyle=e,this._bindParameters.output=1,this._plugins.precompile(...Ee),this._bindParameters.output=2,this._plugins.precompile(...Ee),this._bindParameters.output=0,this._oitBlend.precompile(this._bindParameters,!1,1),this._hasHighlights&&(this._bindParameters.output=10,this._plugins.precompile(...Ee)),this._bindParameters.emissions=i,this._bindParameters.output=t,this._bindParameters.hudRenderStyle=s}_renderHUD(e,t){if(!this._pluginsHas.hudElements)return t;const s=this._renderOIT(1,e);this._rctx.bindFramebuffer(t.fbo);const i=!!t.getTexture(le);return this._compositor.compositePreMultipliedAlpha(this._bindParameters,s.getTexture(),i),s.release(),this.performanceInfo.advance(0===e?de.HUD_OCCLUDED:de.HUD),t}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(6,2)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:s}=this,{width:i,height:r}=this._framebuffer.size,{highlights:a}=s,n=a.length>j?3:1,h=e.acquire(i,r,"highlights",n);h.acquireDepth(14);const o=this._plugins.produces(10,0);return o&&this._framebuffer.color.fbo&&h.fbo&&t.blitFramebuffer(this._framebuffer.color.fbo,h.fbo,1024),t.bindFramebuffer(h.fbo),t.gl.clearBufferuiv(6144,0,[0,0,0,0]),o||t.clear(1024),this._bindParameters.output=10,t.bindFramebuffer(h.fbo),B(t,e,i,r,s,()=>this._renderHighlightGeometries()),h.detachDepth(),this.performanceInfo.advance(de.HIGHLIGHTS),h.retain(this._nodes.require("highlights",...R)+this._nodes.optional("highlights",...R)-1),h}_renderHighlightGeometries(){this._plugins.render(...Ce),this._rctx.clear(256),this._renderHUDElements(2)}_renderShadowAccumulation(e){const t=this._shadowAccumulator;if(!t)return;t.updateDepthRange(e);const s=t.requireGeometryDepth;this._bindParameters.output=0;const i=this._nodes.produce(D.SHADOW_ACCUMULATION,this._pluginInput);t.didAccumulate&&this.performanceInfo.advance(de.ACCUMULATED_SHADOWS),this._pluginInput.set(D.SHADOW_ACCUMULATION,null),i?.release(),s&&(this._bindParameters.depth=h(this._bindParameters.depth))}renderShadowAccumulationShadowMap(e,t,s,i,r){const a=this.stage.view.qualitySettings.maximumPixelRatio;this._bindParameters.renderingShadowAnalysisMap=!0;try{s.start(e,i,r,!0,a),this._renderShadowCascades(5,s),e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,t)}finally{this._bindParameters.renderingShadowAnalysisMap=!1}}_precompileTransparentGeometry(){x(this._bindParameters.output)?(this._bindParameters.output=1,this._plugins.precompile(...ge),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=2,this._plugins.precompile(...ge),this._hasTransparentGeometry&&this._plugins.precompile(15),this._bindParameters.output=0):this._plugins.precompile(...ge)}_renderOIT(e,t=2){const s=1===e,{width:i,height:r}=this._framebuffer.size,a=s?()=>this._renderHUDElements(t):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=h.useFloatBlend.value?8:5,d=h.output;h.output=1;const l=s?"oit hud":"oit",u=this.fboCache.acquire(i,r,l,o).acquireColor(le,this.hasFloatBlend?7:0,"oit alpha"),_=h.hasEmission&&(0===e||1!==t);_&&u.acquireColor(me,o,"oit emissive"),s||u.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(u.fbo),this._rctx.clearFramebuffer($),_&&this._rctx.clearBuffer(2,$),a(),u.detachDepth(),h.output=2;const m=this.fboCache.acquire(i,r,s?"oit front hud":"oit front");_&&m.acquireColor(le,o,"oit front emissive"),s?m.acquireDepth(this._hudDepthFormat):m.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(m.fbo),this._rctx.clearFramebuffer(C,s),a(),m.detachDepth();const p=this._pluginsHas.occludedHudElements&&!s,c=p&&0!==h.emissions?me:le;let b;return h.hudOcclusion=n(this._bindParameters.hudOcclusion),h.output=0,s?(b=this.fboCache.acquire(i,r,"oit composite hud"),this._rctx.bindFramebuffer(b.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(16384)):(0!==h.emissions&&this._framebuffer.ensureEmissionAttachment(),p&&(this._framebuffer.color.acquireColor(c,0,"hud occlusion"),this._rctx.clearBuffer(c-_e,C)),this._framebuffer.bind()),this._oitBlend.blend(this._rctx,u,m,h,p,e,this._fboCache.debugCallback),b?.detachDepth(),s||(_&&(this._bindParameters.emissions=3),p&&(h.hudOcclusion=this._framebuffer.color.obtainAttachment(c))),m.release(),u.release(),h.output=d,b}get _hudDepthFormat(){return this.isFeatureEnabled(7)?14:13}get _needsOpaquePass(){return this.plugins.produces(0,...fe)||this.plugins.produces(5,...fe)||this.plugins.produces(3,3)}_renderOpaque(){const e=this._needsOpaquePass;e&&(this._plugins.render(0,1),this._pluginInput.set(D.GROUND_DEPTH,this._blitGroundDepth()),this._plugins.render(2,3));const t=this._framebuffer;t.update(t=>this._renderNodes(T.OPAQUE,t,e)),this.fboCache.debugCallback?.(T.OPAQUE,t.color.fbo),t.update(e=>this._renderNodes(D.OPAQUE_ENVIRONMENT,e)),this.fboCache.debugCallback?.(D.OPAQUE_ENVIRONMENT,t.color.fbo),this._renderEdges(1)}_renderPreTransparent(){this._framebuffer.update(e=>this._renderNodes(D.GAUSSIAN_SPLAT,e)),this.fboCache.debugCallback?.(D.GAUSSIAN_SPLAT,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(D.OPAQUE_OCCLUSION_QUERY,e)),this.fboCache.debugCallback?.(D.OPAQUE_OCCLUSION_QUERY,this._framebuffer.color.fbo),this._framebuffer.update(e=>this._renderNodes(D.VOXEL,e)),this.fboCache.debugCallback?.(D.VOXEL,this._framebuffer.color.fbo)}_renderTransparent(){const e=this._framebuffer;if(this._renderHiddenTransparentEdges(),this._hasTransparentGeometry&&this._renderOIT(0),e.update(e=>this._renderNodes(T.TRANSPARENT,e,this._hasTransparentGeometry)),this.fboCache.debugCallback?.(T.TRANSPARENT,e.color.fbo),this._hasTransparentGeometry||this._plugins.render(15),this._renderEdges(0),this._bindParameters.ssao=n(this._bindParameters.ssao),e.update(e=>this._renderNodes(D.TRANSPARENT_NO_DEPTH,e)),this.fboCache.debugCallback?.(D.TRANSPARENT_NO_DEPTH,e.color.fbo),this._framebuffer.bind(),this._plugins.render(8),this._bindParameters.hasEmission){const e=this._rctx.setDrawBuffers([pe,le]);this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!0,this._plugins.render(8),this._bindParameters.transparentWithoutDepthEmissionDimmingPass=!1,this._rctx.setDrawBuffers(e)}this.performanceInfo.advance(de.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderNodes(e,t,s=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return s&&this.performanceInfo.advance(e),t;const i=this._nodes.render(t,this._pluginInput,this._releaseNodeInputs);return this.performanceInfo.advance(e),this._fboCache.debugCallback?.(e,i.fbo),i}_renderInternalNodeCategory(e,t){if(!t)return;const s=t.name;try{this._renderNodes(e,t)}finally{this._pluginInput.set(e,null),t.setName(s)}}_ensureBindParameters(e,t){this._ensureBindParametersCamera(e,t),this._ensureBindParametersWeatherFader(),this._ensureBindParametersScreenSpaceReflections(),this._ensureBindParametersReprojection()}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersWeatherFader(){1===this.stage.viewingMode&&(this._bindParameters.clouds.data&&(this._bindParameters.clouds.fade(this._bindParameters.camera,this.renderContext.time,this.stage.view.qualitySettings.fadeDuration,this.stage.view.state.stationary),this.weatherFader?.cleanupCubemap()),this._bindParameters.snowCover=this.weatherFader?.snowCover??0)}_ensureBindParametersScreenSpaceReflections(){const{time:e}=this.renderContext,{screenSpaceReflections:t}=this._bindParameters;if(this.hasReflections){null==this._ssrEnableTime&&(this._ssrEnableTime=e);const s=this.stage.view.qualitySettings.fadeDuration;t.fadeFactor=s>0?Math.min(s,e-this._ssrEnableTime)/s:1,t.fadeFactor<1&&this._requestRender()}else this._ssrEnableTime=null}_ensureBindParametersReprojection(){if(!(this.hasReflections||this.hasGlobalIllumination))return void(this._reprojectionMatrix=A);const{reprojection:e,camera:t}=this._bindParameters,{lastFrameCamera:s}=e,i=!s.equals(t);if(i?(f(Ne,t.viewMatrix),f(Re,t.projectionMatrix),g(Ge,Ne,Re),g(Ge,s.viewMatrix,Ge),g(Ge,s.projectionMatrix,Ge),this._reprojectionMatrix=Ge):this._reprojectionMatrix=A,this.hasGlobalIllumination){const{viewMatrix:t}=e;i?(g(Fe,s.viewMatrix,Ne),P(t,Fe)):P(t,A)}}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,s,i){this._bindParameters.updateLighting(e,t,s,i),this._requestRender(1)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0,clouds:this.weatherFader?.usedMemory??0}}get test(){}};e([p()],be.prototype,"_inGlobeView",void 0),e([p({readOnly:!0})],be.prototype,"highResolutionAtmosphere",null),e([p()],be.prototype,"_edgeView",void 0),e([p()],be.prototype,"updating",null),be=e([c("esri.views.3d.webgl-engine.lib.Renderer")],be);const fe=[0,1,2,3],ge=[7,6,4,5],Pe=[7,6],Ae=[0,1,2,4,...Pe],Ie=[3,5],we=[2,4,8],Ee=[16,12,14,13],Ce=[4,5,2,3,0,1,...Pe],Se=[4,8,5,11],Te={0:[13],1:[12],2:[13,12],3:[13,12]},De=[0,1,...Pe],Oe=["normals","highlights"],Re=I(),Ne=I(),Ge=I(),Fe=I();function He(e){return t=>e.immediate.schedule(t)}export{be as Renderer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{MaterialChangeSet as e}from"./ChangeSet.js";function r(r){const a=new Map,n=t=>{let n=a.get(t);return n||(n=new e(r),a.set(t,n)),n};return r.removes.forEach(e=>{t(e)&&n(e.material).removes.push(e)}),r.adds.forEach(e=>{t(e)&&n(e.material).adds.push(e)}),r.updates.forEach(e=>{t(e.renderGeometry)&&n(e.renderGeometry.material).updates.push(e)}),a}function t(e){return e.geometry.indexCount>=1}export{r as splitRenderGeometryChangeSetByMaterial};
2
+ import{MaterialChangeSet as e}from"./ChangeSet.js";function r(r){const a=new Map,n=t=>{let n=a.get(t);return n||(n=new e(r),a.set(t,n)),n};return r.removes.forEach(e=>{t(e)&&n(e.material).removes.push(e)}),r.adds.forEach(e=>{t(e)&&n(e.material).adds.push(e)}),r.updates.forEach(e=>{t(e.renderGeometry)&&n(e.renderGeometry.material).updates.push(e)}),a}function t(e){return e.indexCount>=1}export{r as splitRenderGeometryChangeSetByMaterial};