@arcgis/core 5.1.0-next.119 → 5.1.0-next.120

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 (740) hide show
  1. package/arcade/Dictionary.js +1 -1
  2. package/arcade/Feature.js +1 -1
  3. package/arcade/Pixel.js +1 -1
  4. package/arcade/Voxel.js +1 -1
  5. package/arcade/arcade.js +1 -1
  6. package/arcade/arcadeAsyncRuntime.js +1 -1
  7. package/arcade/arcadeCompiler.js +1 -1
  8. package/arcade/arcadeRuntime.js +1 -1
  9. package/arcade/containerUtils.js +1 -1
  10. package/arcade/debug.js +1 -1
  11. package/arcade/deepClone.js +1 -1
  12. package/arcade/featureSetUtils.js +1 -1
  13. package/arcade/featureset/actions/GroupBy.js +1 -1
  14. package/arcade/featureset/actions/OrderBy.js +1 -1
  15. package/arcade/functions/convertdirection.js +1 -1
  16. package/arcade/functions/date.js +1 -1
  17. package/arcade/functions/feature.js +1 -1
  18. package/arcade/functions/featuresetbase.js +1 -1
  19. package/arcade/functions/featuresetgeom.js +1 -1
  20. package/arcade/functions/featuresetstats.js +1 -1
  21. package/arcade/functions/featuresetstring.js +1 -1
  22. package/arcade/functions/fieldStats.js +1 -1
  23. package/arcade/functions/geomasync.js +1 -1
  24. package/arcade/functions/geometry.js +1 -1
  25. package/arcade/functions/geomsync.js +1 -1
  26. package/arcade/functions/knowledgegraph.js +1 -1
  27. package/arcade/functions/maths.js +1 -1
  28. package/arcade/functions/stats.js +1 -1
  29. package/arcade/functions/string.js +1 -1
  30. package/arcade/functions/track.js +1 -1
  31. package/arcade/geometry/constructors.js +1 -1
  32. package/arcade/geometry/functions.js +1 -1
  33. package/arcade/geometry/operators.js +1 -1
  34. package/arcade/languageUtils.js +1 -1
  35. package/assets/esri/core/workers/RemoteClient.js +1 -1
  36. package/assets/esri/core/workers/chunks/013708f40f811158d42c.js +1 -0
  37. package/assets/esri/core/workers/chunks/08feff1d2f67cbfdc707.js +1 -0
  38. package/assets/esri/core/workers/chunks/{7e0daf0864005cdd63c5.js → 0a780a883abfcdf0b900.js} +1 -1
  39. package/assets/esri/core/workers/chunks/0d9d33f29124d464a4cb.js +1 -0
  40. package/assets/esri/core/workers/chunks/{20e2d11f6de438ee883e.js → 0ded58ccb83f624f1460.js} +1 -1
  41. package/assets/esri/core/workers/chunks/106fc271e0b9300ef97c.js +1 -0
  42. package/assets/esri/core/workers/chunks/119d352dd586f2bb61ec.js +1 -0
  43. package/assets/esri/core/workers/chunks/{8cbaaea72f4ca2f023be.js → 129fdd1636e67997337c.js} +1 -1
  44. package/assets/esri/core/workers/chunks/130784a27661de6b52a5.js +1 -0
  45. package/assets/esri/core/workers/chunks/{942e527b9b92999886c7.js → 145364aa20b4435294c2.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{9a3344f1dd22c425b8cc.js → 1595dc499a06b23b6a96.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{6c97b5bc408f051606d2.js → 166a0df6e37627e18976.js} +1 -1
  48. package/assets/esri/core/workers/chunks/168be2eac0fa3c67ae27.js +1 -0
  49. package/assets/esri/core/workers/chunks/{017f50aae082d6664cfe.js → 16b90d8f628a412ba4ba.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{aea8e0577fb48d5c9577.js → 181e948d076a9a7aae8a.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{176e676879666f784599.js → 18e7784f13a57a75585a.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{d66f68a811c90739951a.js → 1c029b03ed836f393a50.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{d41fe5a248221c0a1714.js → 1c1515e020e32e177b54.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{0aaee272520c6e5bb617.js → 1c64e10f966e26af6fed.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{a0296e6d6c37b861c5fb.js → 1dacc0b64bd27ce2de3a.js} +1 -1
  56. package/assets/esri/core/workers/chunks/1eeb1edca0ad5db6917c.js +1 -0
  57. package/assets/esri/core/workers/chunks/1f55d60d3adc31283296.js +1 -0
  58. package/assets/esri/core/workers/chunks/20d0adc678f11981059c.js +1 -0
  59. package/assets/esri/core/workers/chunks/{696967c8c6f53b94f851.js → 227eff8aa4a6f5f03bc2.js} +1 -1
  60. package/assets/esri/core/workers/chunks/24646a1176ce34039155.js +1 -0
  61. package/assets/esri/core/workers/chunks/{93826180cfd66a6d2596.js → 24647e7424798dccdaf5.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{7601408e242dca1d25bd.js → 249616ea2d90d40a8299.js} +1 -1
  63. package/assets/esri/core/workers/chunks/24eaf1349ffe10e616e6.js +1 -0
  64. package/assets/esri/core/workers/chunks/{a320c69bc7528ff0d0cf.js → 2c8584ec1c3c9fd5aba2.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{6ca81e34854ce7ec6f6e.js → 2ce845c990bb4d701362.js} +1 -1
  66. package/assets/esri/core/workers/chunks/2d374cc8c54a722a7afe.js +1 -0
  67. package/assets/esri/core/workers/chunks/{0bd2b035c6ee89c725f9.js → 31442f25d550ead58fc4.js} +1 -1
  68. package/assets/esri/core/workers/chunks/319ff04282dc8ae38b56.js +2 -0
  69. package/assets/esri/core/workers/chunks/33b4f5dfe1a16b59b010.js +1 -0
  70. package/assets/esri/core/workers/chunks/359d3acb3953e64e5a78.js +1 -0
  71. package/assets/esri/core/workers/chunks/388e71e8f2ec41bfa5a9.js +1 -0
  72. package/assets/esri/core/workers/chunks/{dd58bc675b85b4d90afa.js → 39974d1e5d3820ef1680.js} +1 -1
  73. package/assets/esri/core/workers/chunks/3aacaa1be5efeac23a37.js +1 -0
  74. package/assets/esri/core/workers/chunks/{2562d8905bd05ef6fd07.js → 3b3986276e70297d573b.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{d19600336cb6023d3e34.js → 3b765a8cac9e92f644f2.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{b7a0a5b895ddd2d3d038.js → 3df5394b17e9659ecb8f.js} +1 -1
  77. package/assets/esri/core/workers/chunks/3e012cd3ca4451f89f59.js +1 -0
  78. package/assets/esri/core/workers/chunks/{c06ae3a6ecc4a4fc67b2.js → 40910c69307e2d2d3f28.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{0881929a4a457f94f317.js → 4301cb9670fa7c907460.js} +1 -1
  80. package/assets/esri/core/workers/chunks/45a8d80f1328b0b4b055.js +1 -0
  81. package/assets/esri/core/workers/chunks/46d0a25d33b5b328cfce.js +1 -0
  82. package/assets/esri/core/workers/chunks/{d9d716bfd0aab30b6caf.js → 47656ec12401e53f4bd3.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{c0d7e4afbad0b20e2502.js → 47dd2bfecc5c4b5f10f0.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{f7698c855800e0af3038.js → 4845df00f6ebcce6ea3e.js} +1 -1
  85. package/assets/esri/core/workers/chunks/49f6c9e9980b8c624fd7.js +1 -0
  86. package/assets/esri/core/workers/chunks/4a23b27bfbcfa08fd9a7.js +1 -0
  87. package/assets/esri/core/workers/chunks/{8b5ee6be52e892fbd325.js → 4a9dd9f8aa98882218f3.js} +1 -1
  88. package/assets/esri/core/workers/chunks/4c54cb80c4dc9bbbd395.js +1 -0
  89. package/assets/esri/core/workers/chunks/{daec09750a5a70cdb0f0.js → 50dc9893e13396f5e35d.js} +2 -2
  90. package/assets/esri/core/workers/chunks/{169c9eb6cd000e067c4b.js → 51ee6102f5f4840a5b47.js} +1 -1
  91. package/assets/esri/core/workers/chunks/{b5d0898406c7d6e6a717.js → 5359ff9492383c5bd9b1.js} +1 -1
  92. package/assets/esri/core/workers/chunks/54d7f07e3348ddb6d9a2.js +1 -0
  93. package/assets/esri/core/workers/chunks/{48440a071a37590846ff.js → 54dad475dc806a38c287.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{2b2a09ce14d00b4b1187.js → 58155f24f8ed6aca7a21.js} +1 -1
  95. package/assets/esri/core/workers/chunks/{224a9f39876aa426a9bc.js → 5838f46d341d2fde42ee.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{47d49777a3b3cd8e18bd.js → 58994b6bfcda5f2ada80.js} +1 -1
  97. package/assets/esri/core/workers/chunks/592a599f514de373dead.js +1 -0
  98. package/assets/esri/core/workers/chunks/{1ff61d8a8ea060e78b83.js → 5aba23584e0b230c75f5.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{566c36032b456ec5b5d7.js → 5abe34bb0110694f7b42.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{7dc2c21d61ba66a3f461.js → 5b238f9c345f10c5c2fa.js} +1 -1
  101. package/assets/esri/core/workers/chunks/5f9bacee6fbf9ac1bca0.js +1 -0
  102. package/assets/esri/core/workers/chunks/60915a3708a34da1977e.js +1 -0
  103. package/assets/esri/core/workers/chunks/65520a443e3811255bea.js +1 -0
  104. package/assets/esri/core/workers/chunks/6637f19b82555738a1d5.js +1 -0
  105. package/assets/esri/core/workers/chunks/{7c86099ed17f420b0489.js → 67ebde34377f98d17cda.js} +1 -1
  106. package/assets/esri/core/workers/chunks/{cdef9c3f80588ae45a04.js → 6c9933f948efd7923aa1.js} +1 -1
  107. package/assets/esri/core/workers/chunks/{fe2325efd0d8ad8369ed.js → 6cab67fc7044ee9b863b.js} +1 -1
  108. package/assets/esri/core/workers/chunks/{f239a8ecad8b692d5eaa.js → 6db274f6767102a39021.js} +1 -1
  109. package/assets/esri/core/workers/chunks/{aea384f4d88121da8f54.js → 6f0341cfa4c68e6e60b3.js} +1 -1
  110. package/assets/esri/core/workers/chunks/737de87bfb9b5f5a9c6c.js +1 -0
  111. package/assets/esri/core/workers/chunks/{aca6ff64495580d873d1.js → 73c355b895fd6a34fcb8.js} +1 -1
  112. package/assets/esri/core/workers/chunks/{85bba0db8a7a5fc1be44.js → 7601278ebced0c0c31cf.js} +1 -1
  113. package/assets/esri/core/workers/chunks/{b09ae8eb5e97fb27382f.js → 76589434d573111a8fb4.js} +1 -1
  114. package/assets/esri/core/workers/chunks/79f2d4b3af5776ec2045.js +1 -0
  115. package/assets/esri/core/workers/chunks/{c8dedc010fcc2382af24.js → 7b564226def99fcf79d8.js} +1 -1
  116. package/assets/esri/core/workers/chunks/7cadb872b9ca96eedca5.js +1 -0
  117. package/assets/esri/core/workers/chunks/7ed3d6c72f23c628df3b.js +1 -0
  118. package/assets/esri/core/workers/chunks/{062aadf426fe97a76bbb.js → 8351012ceb466f01b8fd.js} +1 -1
  119. package/assets/esri/core/workers/chunks/8407c91cce31e087b41b.js +1 -0
  120. package/assets/esri/core/workers/chunks/{24acf3dd541347c2b297.js → 882ee7ed8a3a0215f9b9.js} +1 -1
  121. package/assets/esri/core/workers/chunks/{a0b6eef4890cc61609dc.js → 8905acc6161c999b6c4a.js} +1 -1
  122. package/assets/esri/core/workers/chunks/{ae74f722fb385e45fcf1.js → 893c0d28a5bf3f9f29f1.js} +1 -1
  123. package/assets/esri/core/workers/chunks/{98b4408e12684e37b395.js → 8a48a6760c33ed50b650.js} +1 -1
  124. package/assets/esri/core/workers/chunks/8bdca6f06c8b5fedd917.js +1 -0
  125. package/assets/esri/core/workers/chunks/8c5a41ae68775bac3446.js +1 -0
  126. package/assets/esri/core/workers/chunks/{2ee9514396d22638870c.js → 8f94c90fdb0333da2d0f.js} +1 -1
  127. package/assets/esri/core/workers/chunks/9482a6d7baa24bbf5693.js +1 -0
  128. package/assets/esri/core/workers/chunks/94fac056e14caed09682.js +1 -0
  129. package/assets/esri/core/workers/chunks/{f931d560f3f14598f454.js → 9dcfaca1f4fa8c8026ac.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{5570d47533efab56c732.js → 9f4681713f03365a2a53.js} +1 -1
  131. package/assets/esri/core/workers/chunks/a0fa60a24e58f7a47e41.js +1 -0
  132. package/assets/esri/core/workers/chunks/{b32a13972cb3de652339.js → a320998f18922a35899f.js} +1 -1
  133. package/assets/esri/core/workers/chunks/{aa55923ca939a0d4606c.js → a3a28c4887f802e8d96d.js} +1 -1
  134. package/assets/esri/core/workers/chunks/{8795c4895df229cb471c.js → ab94c9f62462d7a98f6a.js} +1 -1
  135. package/assets/esri/core/workers/chunks/{2a8f198f6c272f92bad5.js → abdb05754c50776c3edd.js} +1 -1
  136. package/assets/esri/core/workers/chunks/af8ef6701631ed5e5b80.js +1 -0
  137. package/assets/esri/core/workers/chunks/{a95398214e530f896a2d.js → af96cbc4fb7bef726635.js} +1 -1
  138. package/assets/esri/core/workers/chunks/{5784ddd18395f4d76016.js → b08a1255dacf6cfcf139.js} +5 -5
  139. package/assets/esri/core/workers/chunks/b098469e0010a6b44df9.js +1 -0
  140. package/assets/esri/core/workers/chunks/{170f8dc97614e9609443.js → b0ac4b0b7aec70cfe6eb.js} +1 -1
  141. package/assets/esri/core/workers/chunks/{bfc2b75e4f7531dbd37f.js → b1f1271434af302938e8.js} +1 -1
  142. package/assets/esri/core/workers/chunks/{2f925a424b60b4a5e8e5.js → b803e7b0d489bb628d72.js} +1 -1
  143. package/assets/esri/core/workers/chunks/bb24972603fb35dd8dcf.js +1 -0
  144. package/assets/esri/core/workers/chunks/bca6abc185dedec0f41b.js +1 -0
  145. package/assets/esri/core/workers/chunks/{79b64a52ff57c40c7800.js → bf706a5d065a357de51b.js} +1 -1
  146. package/assets/esri/core/workers/chunks/bfbd1ca28ed2f263e58f.js +1 -0
  147. package/assets/esri/core/workers/chunks/c1189316d24fb4cdb2a0.js +1 -0
  148. package/assets/esri/core/workers/chunks/{f142f892e9e896052ddc.js → c27cb2a83a1d2e004501.js} +1 -1
  149. package/assets/esri/core/workers/chunks/{2a2981f0987dd1eaa75a.js → c83fea0d0ebd0d8e43fd.js} +1 -1
  150. package/assets/esri/core/workers/chunks/cb8c4d8334fab9bd9a04.js +1 -0
  151. package/assets/esri/core/workers/chunks/{c1ffb879e0283fb2815f.js → cc62e5095e328bed3e01.js} +1 -1
  152. package/assets/esri/core/workers/chunks/{8d4881c879c86b353e08.js → cda99b543a0e1979346c.js} +1 -1
  153. package/assets/esri/core/workers/chunks/{a53a3e5548fef65a2710.js → cf826787ab8d4b27ad80.js} +1 -1
  154. package/assets/esri/core/workers/chunks/{d6d87bfa9e6d233385a9.js → d1ac98f48bb6d43d97c8.js} +2 -2
  155. package/assets/esri/core/workers/chunks/d1d135a54233092ad637.js +1 -0
  156. package/assets/esri/core/workers/chunks/d35c475f004367e333eb.js +1 -0
  157. package/assets/esri/core/workers/chunks/d56780290e0218d3e9de.js +1 -0
  158. package/assets/esri/core/workers/chunks/{bbaf8baa3ca6195467e4.js → d64613209a9eb1eafb11.js} +1 -1
  159. package/assets/esri/core/workers/chunks/{cb26966cc205bd338c76.js → d81291dac1932350eccd.js} +1 -1
  160. package/assets/esri/core/workers/chunks/dddb57ff637643ccfc87.js +1 -0
  161. package/assets/esri/core/workers/chunks/{0ded5c114cbb7574f2f4.js → dfeddb7b17fa9eaae64c.js} +1 -1
  162. package/assets/esri/core/workers/chunks/{c528b04d42dffbb491da.js → e246c3663f2645248f17.js} +5 -5
  163. package/assets/esri/core/workers/chunks/{7f54d3835c0ce573a942.js → e25bcfdd8f20f8a08b19.js} +1 -1
  164. package/assets/esri/core/workers/chunks/{e0bd550b10dd402c48f1.js → e38836bfcc7a15a2fd1f.js} +1 -1
  165. package/assets/esri/core/workers/chunks/e3b713a590cce6245ee2.js +1 -0
  166. package/assets/esri/core/workers/chunks/{a40003dfe3c081d1a1d2.js → e638391801ad83fe4a68.js} +1 -1
  167. package/assets/esri/core/workers/chunks/{0b76534b60014d74ecb9.js → e7712467db46e1385cf4.js} +1 -1
  168. package/assets/esri/core/workers/chunks/e785f76c1a75cb1d1e1f.js +1 -0
  169. package/assets/esri/core/workers/chunks/{76a9b64fd573775bf6cd.js → e82488b9b3bb0c1dedb4.js} +1 -1
  170. package/assets/esri/core/workers/chunks/{15fa8b5b472131aaa68e.js → e92698f50089484c4901.js} +1 -1
  171. package/assets/esri/core/workers/chunks/ed2cb60e4f17f46fb78d.js +1 -0
  172. package/assets/esri/core/workers/chunks/edcde00495727d506c46.js +1 -0
  173. package/assets/esri/core/workers/chunks/{65a9a94162985b54571e.js → eedee0af459e6b8a6116.js} +1 -1
  174. package/assets/esri/core/workers/chunks/{009250a7bded12099dd1.js → f1fb2f12371f4c562079.js} +1 -1
  175. package/assets/esri/core/workers/chunks/{798e8bf3a7ad83d810e3.js → f31a8e76f1dde23c0900.js} +1 -1
  176. package/assets/esri/core/workers/chunks/{3eabc8af82512dc12355.js → f3dfe1bd1146a6927407.js} +1 -1
  177. package/assets/esri/core/workers/chunks/{6b5d2df9123dfe7e00b3.js → f563dd6cace047108b3c.js} +1 -1
  178. package/assets/esri/core/workers/chunks/f60292d97bcdbf19165b.js +1 -0
  179. package/assets/esri/core/workers/chunks/f79bd469b25099a31274.js +1 -0
  180. package/assets/esri/core/workers/chunks/f9e22cf59e2e2782d70f.js +1 -0
  181. package/assets/esri/core/workers/chunks/{a730235da6ba2b2d9f47.js → fea74a2bbb67d381e837.js} +1 -1
  182. package/assets/esri/core/workers/chunks/{e227ae2c1a63e30e62d9.js → ff48334528d2554db4fe.js} +1 -1
  183. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +18 -14
  184. package/assets/esri/themes/dark/main.css +1 -1
  185. package/assets/esri/themes/light/main.css +1 -1
  186. package/assets/esri/themes/light/view.css +1 -1
  187. package/chunks/AtmosphereCompositing.glsl.js +1 -1
  188. package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
  189. package/chunks/Centroid-DZi-eb9F.js +1 -1
  190. package/chunks/Clouds.glsl.js +1 -1
  191. package/chunks/Compositing.glsl.js +1 -1
  192. package/chunks/CutFillComposition.glsl.js +1 -1
  193. package/chunks/CutFillDepth.glsl.js +1 -1
  194. package/chunks/CutFillMask.glsl.js +1 -1
  195. package/chunks/CutFillReduction.glsl.js +1 -1
  196. package/chunks/CutFillTargetDepth.glsl.js +1 -1
  197. package/chunks/Distance2DCalculator-CXhBP-8I.js +1 -1
  198. package/chunks/Envelope.js +1 -1
  199. package/chunks/Envelope2D.js +1 -1
  200. package/chunks/FlatGeometry.js +1 -1
  201. package/chunks/FocusAreaColor.glsl.js +1 -1
  202. package/chunks/FocusAreaMask.glsl.js +1 -1
  203. package/chunks/Fog.glsl.js +1 -1
  204. package/chunks/GaussianSplat.glsl.js +1 -1
  205. package/chunks/GaussianSplatShadow.glsl.js +1 -1
  206. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  207. package/chunks/GeodeticUtils.js +1 -1
  208. package/chunks/Geometry.js +1 -1
  209. package/chunks/GeometryCleaner-BEJM7I4l.js +1 -1
  210. package/chunks/GlobalIllumination.glsl.js +1 -1
  211. package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
  212. package/chunks/GlobalIlluminationUpscale.glsl.js +1 -1
  213. package/chunks/GlowBlur.glsl.js +1 -1
  214. package/chunks/GlowComposition.glsl.js +1 -1
  215. package/chunks/HazeCompositing.glsl.js +1 -1
  216. package/chunks/HighlightBlur.glsl.js +1 -1
  217. package/chunks/HighlightDownsample.glsl.js +1 -1
  218. package/chunks/Magnifier.glsl.js +1 -1
  219. package/chunks/MultiPathImpl.js +1 -1
  220. package/chunks/NoiseTextureAtlas.glsl.js +1 -1
  221. package/chunks/OITBlend.glsl.js +2 -2
  222. package/chunks/OITBlendEmission.glsl.js +1 -1
  223. package/chunks/OITDimOpaque.glsl.js +1 -1
  224. package/chunks/OperatorClip.js +1 -1
  225. package/chunks/OperatorCrosses.js +1 -1
  226. package/chunks/OperatorCut.js +1 -1
  227. package/chunks/OperatorDensify.js +1 -1
  228. package/chunks/OperatorGeneralize.js +1 -1
  229. package/chunks/OperatorGeodesicBuffer.js +1 -1
  230. package/chunks/OperatorGeodeticArea.js +1 -1
  231. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  232. package/chunks/OperatorGeodeticDistance.js +1 -1
  233. package/chunks/OperatorGeodeticLength.js +1 -1
  234. package/chunks/OperatorIntegrate.js +1 -1
  235. package/chunks/OperatorIntersects.js +1 -1
  236. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  237. package/chunks/OperatorOverlaps.js +1 -1
  238. package/chunks/OperatorProject.js +1 -1
  239. package/chunks/OperatorProximity.js +1 -1
  240. package/chunks/OperatorProximityGeodesic.js +1 -1
  241. package/chunks/OperatorShapePreservingDensify.js +1 -1
  242. package/chunks/OperatorShapePreservingLength.js +1 -1
  243. package/chunks/OperatorShapePreservingProject.js +1 -1
  244. package/chunks/OperatorSimplifyOGC.js +1 -1
  245. package/chunks/OperatorTouches.js +1 -1
  246. package/chunks/OperatorWithin.js +1 -1
  247. package/chunks/OverlayCompositing.glsl.js +1 -1
  248. package/chunks/Point2D.js +1 -1
  249. package/chunks/PointRenderer.glsl.js +1 -1
  250. package/chunks/ProjectionTransformation.js +1 -1
  251. package/chunks/RasterColorizer.glsl.js +1 -1
  252. package/chunks/ShadowCastAccumulate.glsl.js +1 -1
  253. package/chunks/ShadowCastVisualize.glsl.js +2 -2
  254. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  255. package/chunks/SimpleAtmosphere.glsl.js +1 -1
  256. package/chunks/SpatialReference.js +1 -1
  257. package/chunks/Terrain.glsl.js +1 -1
  258. package/chunks/Texture.glsl.js +1 -1
  259. package/chunks/Transformation2D.js +1 -1
  260. package/chunks/Viewshed.glsl.js +1 -1
  261. package/chunks/aiServices.js +1 -1
  262. package/chunks/arcade.js +1 -1
  263. package/chunks/array.js +1 -1
  264. package/chunks/boundedPlane.js +1 -1
  265. package/chunks/bundle.js +1 -1
  266. package/chunks/bundle2.js +1 -1
  267. package/chunks/constants.js +1 -1
  268. package/chunks/containsOperator.js +1 -1
  269. package/chunks/disjointOperator.js +1 -1
  270. package/chunks/distanceOperator.js +1 -1
  271. package/chunks/equalsOperator.js +1 -1
  272. package/chunks/languageUtils.js +1 -1
  273. package/chunks/pe.js +1 -1
  274. package/chunks/persistableUrlUtils.js +1 -1
  275. package/chunks/relateOperator.js +1 -1
  276. package/chunks/symmetricDifferenceOperator.js +1 -1
  277. package/chunks/unionOperator.js +1 -1
  278. package/chunks/vec2.js +1 -1
  279. package/chunks/vec3.js +1 -1
  280. package/chunks/vec4.js +1 -1
  281. package/config.js +1 -1
  282. package/core/accessorSupport/decorators/persistable.js +1 -1
  283. package/core/mapCollectionUtils.js +1 -1
  284. package/core/quantityFormatUtils.js +1 -1
  285. package/core/unitFormatUtils.js +1 -1
  286. package/editing/sharedTemplates/templateDefinitions/FeatureTemplateDefinition.js +1 -1
  287. package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
  288. package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
  289. package/effects/FocusArea.js +1 -1
  290. package/geometry/Circle.js +1 -1
  291. package/geometry/coordinateFormatter.js +1 -1
  292. package/geometry/geodesicUtils.js +1 -1
  293. package/geometry/operators/extendOperator.js +1 -1
  294. package/geometry/operators/gx/geodeticUtils.js +1 -1
  295. package/geometry/operators/gx/operatorAffineTransform.js +1 -1
  296. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  297. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  298. package/geometry/operators/gx/operatorBoundary.js +1 -1
  299. package/geometry/operators/gx/operatorBuffer.js +1 -1
  300. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  301. package/geometry/operators/gx/operatorDifference.js +1 -1
  302. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  303. package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
  304. package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
  305. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  306. package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
  307. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  308. package/geometry/operators/gx/operatorIntersection.js +1 -1
  309. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  310. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  311. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  312. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  313. package/geometry/operators/gx/operatorOffset.js +1 -1
  314. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  315. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  316. package/geometry/operators/gx/operatorProject.js +1 -1
  317. package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
  318. package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
  319. package/geometry/operators/gx/operatorSimplify.js +1 -1
  320. package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
  321. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  322. package/geometry/operators/gx/operatorUnion.js +1 -1
  323. package/geometry/operators/isNearOperator.js +1 -1
  324. package/geometry/operators/json/containsOperator.js +1 -1
  325. package/geometry/operators/json/disjointOperator.js +1 -1
  326. package/geometry/operators/locateBetweenOperator.js +1 -1
  327. package/geometry/operators/offsetOperator.js +1 -1
  328. package/geometry/operators/reshapeOperator.js +1 -1
  329. package/geometry/operators/support/apiConverter.js +1 -1
  330. package/geometry/operators/support/geographicTransformationUtils.js +1 -1
  331. package/geometry/operators/support/initNoPeFactory.js +1 -1
  332. package/geometry/operators/support/jsonConverter.js +1 -1
  333. package/geometry/operators/support/projectionTransformation.js +1 -1
  334. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  335. package/geometry/operators/unionOperator.js +1 -1
  336. package/geometry/pe.js +1 -1
  337. package/geometry/support/MeshTexture.js +1 -1
  338. package/geometry/support/boundedPlane.js +1 -1
  339. package/geometry/support/buffer/math/vec3.js +1 -1
  340. package/geometry/support/buffer/math/vec4.js +1 -1
  341. package/geometry/support/buffer/utils/vec2.js +1 -1
  342. package/geometry/support/coordinateSystem.js +1 -1
  343. package/geometry/support/frustum.js +1 -1
  344. package/geometry/support/meshUtils/extent.js +1 -1
  345. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  346. package/geometry/support/meshUtils/projection.js +1 -1
  347. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  348. package/geometry/support/spatialReferenceUtils.js +1 -1
  349. package/kernel.js +1 -1
  350. package/layers/CSVLayer.d.ts +6 -0
  351. package/layers/CatalogLayer.d.ts +6 -0
  352. package/layers/FeatureLayer.d.ts +37 -1
  353. package/layers/GeoJSONLayer.d.ts +6 -0
  354. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  355. package/layers/IntegratedMeshLayer.js +1 -1
  356. package/layers/KnowledgeGraphLayer.js +1 -1
  357. package/layers/LinkChartLayer.js +1 -1
  358. package/layers/OrientedImageryLayer.d.ts +28 -1
  359. package/layers/ParquetLayer.d.ts +7 -1
  360. package/layers/SubtypeGroupLayer.d.ts +6 -0
  361. package/layers/UnsupportedLayer.d.ts +10 -2
  362. package/layers/WFSLayer.d.ts +6 -0
  363. package/layers/catalog/CatalogFootprintLayer.d.ts +20 -1
  364. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  365. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +6 -0
  366. package/layers/mixins/ArcGISImageService.d.ts +7 -1
  367. package/layers/orientedImagery/transformations/utils.js +1 -1
  368. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  369. package/layers/support/FeatureReductionBinning.d.ts +12 -0
  370. package/layers/support/FeatureReductionCluster.d.ts +12 -0
  371. package/layers/support/ImageElement.js +1 -1
  372. package/layers/support/MosaicRule.d.ts +0 -2
  373. package/layers/support/ParquetFilesData.js +1 -1
  374. package/layers/support/SceneFilter.js +1 -1
  375. package/layers/support/SubtypeSublayer.d.ts +14 -1
  376. package/libs/parquet/loadParquetModule.js +1 -1
  377. package/libs/text/loadTextModule.js +1 -1
  378. package/linkChart/LinkChartProperties.js +1 -1
  379. package/package.json +2 -2
  380. package/portal/PortalItem.js +1 -1
  381. package/renderers/UniqueValueRenderer.js +1 -1
  382. package/rest/knowledgeGraph/CreateReplicaResponse.d.ts +1 -1
  383. package/rest/knowledgeGraph/GraphProperty.d.ts +5 -1
  384. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
  385. package/rest/knowledgeGraph/wasmInterface/wasmToQueryResponseObjFactories.js +1 -1
  386. package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +1 -1
  387. package/rest/support/AttributeBinsQuery.d.ts +16 -2
  388. package/rest/support/IdentifyParameters.js +1 -1
  389. package/rest/support/IdentifyResult.js +1 -1
  390. package/rest/support/Query.d.ts +16 -2
  391. package/rest/support/TopFeaturesQuery.d.ts +16 -2
  392. package/smartMapping/renderers/type.js +1 -1
  393. package/smartMapping/renderers/univariateColorSize.js +1 -1
  394. package/support/arcadeUtils.js +1 -1
  395. package/support/persistableUrlUtils.js +1 -1
  396. package/support/revision.js +1 -1
  397. package/symbols/Symbol3D.js +1 -1
  398. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  399. package/symbols/cim/CIMSymbolHelper.js +1 -1
  400. package/symbols/support/IconSymbol3DLayerResource.js +1 -1
  401. package/symbols/support/previewSymbol2D.js +1 -1
  402. package/symbols/support/urlUtils.js +1 -1
  403. package/symbols/support/webStyleSymbolUtils.js +1 -1
  404. package/views/2d/MapViewConstraints.d.ts +29 -25
  405. package/views/2d/ViewStateManager.js +1 -1
  406. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  407. package/views/2d/engine/flow/styles/Particles.js +1 -1
  408. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  409. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  410. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  411. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  412. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +1 -1
  413. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  414. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
  415. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
  416. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  417. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
  418. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
  419. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  420. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  421. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js +1 -1
  422. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlitShader.js +1 -1
  423. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +1 -1
  424. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlurShader.js +1 -1
  425. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ClipShader.js +1 -1
  426. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js +1 -1
  427. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
  428. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
  429. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js +1 -1
  430. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
  431. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientFillShader.js +1 -1
  432. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
  433. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js +1 -1
  434. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
  435. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapResolveShader.js +1 -1
  436. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  437. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js +1 -1
  438. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js +1 -1
  439. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  440. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OverlayShader.js +1 -1
  441. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternFillShader.js +1 -1
  442. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternOutlineFillShader.js +1 -1
  443. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PostProcessingShader.js +1 -1
  444. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader.js +1 -1
  445. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js +1 -1
  446. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js +1 -1
  447. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js +1 -1
  448. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js +1 -1
  449. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowParticlesShader.js +1 -1
  450. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js +1 -1
  451. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowUtils.js +1 -1
  452. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  453. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MultiRasterMixin.js +1 -1
  454. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
  455. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vvUtils.js +1 -1
  456. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  457. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  458. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  459. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  460. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  461. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  462. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  463. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  464. package/views/2d/navigation/ZoomBox.js +1 -1
  465. package/views/2d/navigation/actions/Pan.js +1 -1
  466. package/views/2d/navigation/actions/Pinch.js +1 -1
  467. package/views/2d/navigation/actions/Rotate.js +1 -1
  468. package/views/3d/analysis/AnalysisView3D.js +1 -1
  469. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  470. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  471. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  472. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  473. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  474. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  475. package/views/3d/analysis/LineOfSightAnalysisResult.js +1 -1
  476. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  477. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  478. package/views/3d/analysis/Slice/SliceController.js +1 -1
  479. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  480. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  481. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  482. package/views/3d/analysis/Viewshed/ViewshedPlacementOperation.js +1 -1
  483. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
  484. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  485. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  486. package/views/3d/analysis/Viewshed/ViewshedTool2.js +1 -1
  487. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  488. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  489. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  490. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.js +1 -1
  491. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  492. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  493. package/views/3d/focusAreaUtils.js +1 -1
  494. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
  495. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  496. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  497. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  498. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  499. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  500. package/views/3d/layers/DrapedSubView3D.js +1 -1
  501. package/views/3d/layers/FlowSubView3D.js +1 -1
  502. package/views/3d/layers/I3SMeshView3D.js +1 -1
  503. package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
  504. package/views/3d/layers/ImagerySubView3D.js +1 -1
  505. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  506. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  507. package/views/3d/layers/SceneLayerWorker.js +1 -1
  508. package/views/3d/layers/SubView3D.js +1 -1
  509. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  510. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  511. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  512. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  513. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  514. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  515. package/views/3d/layers/i3s/I3SQueryFeatureStore.js +1 -1
  516. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  517. package/views/3d/layers/i3s/meshUtils.js +1 -1
  518. package/views/3d/layers/support/FeatureTile.js +1 -1
  519. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  520. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  521. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  522. package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
  523. package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.js +1 -1
  524. package/views/3d/layers/support/edgeUtils.js +1 -1
  525. package/views/3d/state/ScreenSizePerspective.js +1 -1
  526. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  527. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  528. package/views/3d/state/utils/navigationUtils.js +1 -1
  529. package/views/3d/support/ViewSlice.js +1 -1
  530. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  531. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  532. package/views/3d/support/sunUtils.js +1 -1
  533. package/views/3d/terrain/OverlayRenderer.js +1 -1
  534. package/views/3d/terrain/RasterColorizer.glsl.js +1 -1
  535. package/views/3d/terrain/RasterTile.js +1 -1
  536. package/views/3d/terrain/TerrainRenderer.js +1 -1
  537. package/views/3d/webgl/RenderCamera.js +1 -1
  538. package/views/3d/webgl/RenderNode.js +1 -1
  539. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  540. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  541. package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
  542. package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
  543. package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +1 -1
  544. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  545. package/views/3d/webgl-engine/effects/clouds/Clouds.glsl.js +1 -1
  546. package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
  547. package/views/3d/webgl-engine/effects/clouds/CloudsTechnique.js +1 -1
  548. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.glsl.js +1 -1
  549. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
  550. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlasTechnique.js +1 -1
  551. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColor.glsl.js +1 -1
  552. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  553. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
  554. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.glsl.js +1 -1
  555. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  556. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  557. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  558. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  559. package/views/3d/webgl-engine/effects/fog/FogTechnique.js +1 -1
  560. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  561. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  562. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  563. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlurTechnique.js +1 -1
  564. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechnique.js +1 -1
  565. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
  566. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscale.glsl.js +1 -1
  567. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscaleTechnique.js +1 -1
  568. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  569. package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
  570. package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +1 -1
  571. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  572. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
  573. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  574. package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
  575. package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
  576. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  577. package/views/3d/webgl-engine/effects/highlight/HighlightBlur.glsl.js +1 -1
  578. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
  579. package/views/3d/webgl-engine/effects/highlight/HighlightDownsample.glsl.js +1 -1
  580. package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
  581. package/views/3d/webgl-engine/effects/magnifier/Magnifier.glsl.js +1 -1
  582. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  583. package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
  584. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
  585. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  586. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  587. package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
  588. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +1 -1
  589. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  590. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  591. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  592. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  593. package/views/3d/webgl-engine/lib/GaussianSplatShadowRenderNode.js +1 -1
  594. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  595. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  596. package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
  597. package/views/3d/webgl-engine/lib/Texture.glsl.js +1 -1
  598. package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
  599. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  600. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  601. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  602. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
  603. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
  604. package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
  605. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  606. package/views/3d/webgl-engine/shaders/CutFillComposition.glsl.js +1 -1
  607. package/views/3d/webgl-engine/shaders/CutFillCompositionTechnique.js +1 -1
  608. package/views/3d/webgl-engine/shaders/CutFillDepth.glsl.js +1 -1
  609. package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +1 -1
  610. package/views/3d/webgl-engine/shaders/CutFillDepthTechniqueConfiguration.js +1 -1
  611. package/views/3d/webgl-engine/shaders/CutFillMask.glsl.js +1 -1
  612. package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
  613. package/views/3d/webgl-engine/shaders/CutFillReduction.glsl.js +1 -1
  614. package/views/3d/webgl-engine/shaders/CutFillReductionTechnique.js +1 -1
  615. package/views/3d/webgl-engine/shaders/CutFillReductionTechniqueConfiguration.js +1 -1
  616. package/views/3d/webgl-engine/shaders/CutFillTargetDepth.glsl.js +1 -1
  617. package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +1 -1
  618. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  619. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +1 -1
  620. package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
  621. package/views/3d/webgl-engine/shaders/GaussianSplatShadowTechnique.js +1 -1
  622. package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
  623. package/views/3d/webgl-engine/shaders/OverlayCompositing.glsl.js +1 -1
  624. package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
  625. package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
  626. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  627. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
  628. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
  629. package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +1 -1
  630. package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
  631. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
  632. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  633. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  634. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  635. package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
  636. package/views/Theme.js +1 -1
  637. package/views/View.js +1 -1
  638. package/views/View2D.d.ts +62 -54
  639. package/views/analysis/LengthDimensionResult.js +1 -1
  640. package/views/draw/drawSurfaces.js +1 -1
  641. package/views/interactive/Tooltip.js +1 -1
  642. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  643. package/views/interactive/sketch/SketchLabelOptions.js +1 -1
  644. package/views/interactive/sketch/constraints.js +1 -1
  645. package/views/interactive/sketch/normalizedPoint.js +1 -1
  646. package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
  647. package/views/interactive/support/utils.js +1 -1
  648. package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
  649. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  650. package/views/interactive/tooltip/fields/fields.js +1 -1
  651. package/views/interactive/tooltip/fields/parsingAndFormattingUtils.js +1 -1
  652. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  653. package/views/layers/BuildingComponentSublayerView.js +1 -1
  654. package/views/layers/FeatureLikeLayerView.d.ts +6 -3
  655. package/views/layers/FeatureLikeLayerView.js +1 -1
  656. package/views/layers/GraphicsLayerView.d.ts +6 -3
  657. package/views/layers/GroupLayerView.js +1 -1
  658. package/views/layers/ImageryLayerView.d.ts +4 -0
  659. package/views/layers/SceneLayerView.js +1 -1
  660. package/views/overlay/CrosshairOverlayItem.js +1 -1
  661. package/views/overlay/LineOverlayItem.js +1 -1
  662. package/views/support/angularMeasurementUtils.js +1 -1
  663. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  664. package/views/support/flow/dataUtils.js +1 -1
  665. package/views/support/geometry2dUtils.js +1 -1
  666. package/views/support/geometry3dUtils.js +1 -1
  667. package/views/webgl/RenderingContext.js +1 -1
  668. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +1 -1
  669. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  670. package/widgets/BatchAttributeForm/css.js +1 -1
  671. package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +1 -1
  672. package/widgets/BatchAttributeForm/types.d.ts +1 -1
  673. package/widgets/BatchAttributeForm.js +1 -1
  674. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  675. package/widgets/BuildingExplorer/BuildingLevelPicker/constants.js +1 -1
  676. package/widgets/Editor/components/Settings.js +1 -1
  677. package/widgets/Histogram/HistogramViewModel.js +1 -1
  678. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  679. package/widgets/Sketch.js +1 -1
  680. package/widgets/support/ContingentValuesManager.js +1 -1
  681. package/assets/esri/core/workers/chunks/069459519477bb3dc91b.js +0 -1
  682. package/assets/esri/core/workers/chunks/0b445c1cf281f158c1f1.js +0 -1
  683. package/assets/esri/core/workers/chunks/115664cb7d7b22a315bb.js +0 -1
  684. package/assets/esri/core/workers/chunks/123a67e84ed68b96ac59.js +0 -1
  685. package/assets/esri/core/workers/chunks/13940660fe88cfc0d9f3.js +0 -1
  686. package/assets/esri/core/workers/chunks/18201119828664373165.js +0 -1
  687. package/assets/esri/core/workers/chunks/19f07c8d0f32ec889861.js +0 -1
  688. package/assets/esri/core/workers/chunks/1bebf7202d5f94b15674.js +0 -1
  689. package/assets/esri/core/workers/chunks/1f537c05c2f643acb5e7.js +0 -1
  690. package/assets/esri/core/workers/chunks/241aeff6afd074ce105b.js +0 -1
  691. package/assets/esri/core/workers/chunks/2855357a2c1f2ab03fb7.js +0 -1
  692. package/assets/esri/core/workers/chunks/290163964ec7f05f96d6.js +0 -1
  693. package/assets/esri/core/workers/chunks/29615df388a0df022d8c.js +0 -1
  694. package/assets/esri/core/workers/chunks/30e191d36aa95823c018.js +0 -1
  695. package/assets/esri/core/workers/chunks/315bf08dff4757ffbed3.js +0 -1
  696. package/assets/esri/core/workers/chunks/31c01885ee6d70a2bde2.js +0 -1
  697. package/assets/esri/core/workers/chunks/3292b3883f203637b5a7.js +0 -1
  698. package/assets/esri/core/workers/chunks/35527a01d61cabbfd33e.js +0 -1
  699. package/assets/esri/core/workers/chunks/3f1d533efe4300d19e6a.js +0 -1
  700. package/assets/esri/core/workers/chunks/4364a3e706294bb6ae41.js +0 -1
  701. package/assets/esri/core/workers/chunks/453c9e8d438d061e1736.js +0 -1
  702. package/assets/esri/core/workers/chunks/479e34b0abc10499bd3a.js +0 -1
  703. package/assets/esri/core/workers/chunks/49675e77a351abda2728.js +0 -1
  704. package/assets/esri/core/workers/chunks/4cdf80e2e60501dd4756.js +0 -1
  705. package/assets/esri/core/workers/chunks/4e314e7cf477ad54541d.js +0 -1
  706. package/assets/esri/core/workers/chunks/51edfe21d4c6ee22c83d.js +0 -1
  707. package/assets/esri/core/workers/chunks/53246ce4d2c7d2d2fc62.js +0 -1
  708. package/assets/esri/core/workers/chunks/5524a71d1abc9568ce26.js +0 -1
  709. package/assets/esri/core/workers/chunks/578ab400e1998d0bcd62.js +0 -1
  710. package/assets/esri/core/workers/chunks/5dc86a3a40d16b576bb5.js +0 -1
  711. package/assets/esri/core/workers/chunks/6182d39e2095d4460b88.js +0 -1
  712. package/assets/esri/core/workers/chunks/621d71d26bd20e296138.js +0 -1
  713. package/assets/esri/core/workers/chunks/67dffb896b6ef4b2038b.js +0 -1
  714. package/assets/esri/core/workers/chunks/694f9571e2723d3d4b02.js +0 -1
  715. package/assets/esri/core/workers/chunks/69ad5930ff6040c6c561.js +0 -1
  716. package/assets/esri/core/workers/chunks/78af4b7a379c40f497a7.js +0 -1
  717. package/assets/esri/core/workers/chunks/86f2de7dda7992ae706c.js +0 -1
  718. package/assets/esri/core/workers/chunks/895114ccd2603830960f.js +0 -1
  719. package/assets/esri/core/workers/chunks/8cc6a00c2991ce3fde67.js +0 -1
  720. package/assets/esri/core/workers/chunks/979bab62cad788180770.js +0 -1
  721. package/assets/esri/core/workers/chunks/9d70247d820085a2c190.js +0 -1
  722. package/assets/esri/core/workers/chunks/a0aaf14c8f9a007d88ac.js +0 -1
  723. package/assets/esri/core/workers/chunks/adac8583750783b9c599.js +0 -2
  724. package/assets/esri/core/workers/chunks/af45110f07e4b5162bae.js +0 -1
  725. package/assets/esri/core/workers/chunks/b0c647af49c9d563b852.js +0 -1
  726. package/assets/esri/core/workers/chunks/b640651c7d86cfe654bf.js +0 -1
  727. package/assets/esri/core/workers/chunks/c13c532fe38ddc5d7ca6.js +0 -1
  728. package/assets/esri/core/workers/chunks/c5b7ff8650235c464dbf.js +0 -1
  729. package/assets/esri/core/workers/chunks/cc48354c54358777e996.js +0 -1
  730. package/assets/esri/core/workers/chunks/d2dd6e252d5fecfc0f83.js +0 -1
  731. package/assets/esri/core/workers/chunks/d5423df247be82fa085a.js +0 -1
  732. package/assets/esri/core/workers/chunks/da4f7d7099ba88f31f45.js +0 -1
  733. package/assets/esri/core/workers/chunks/dbb1ac41fd5da4fd849b.js +0 -1
  734. package/assets/esri/core/workers/chunks/de41c3f5b34c49175833.js +0 -1
  735. package/assets/esri/core/workers/chunks/e0036fa0324a96a88248.js +0 -1
  736. package/assets/esri/core/workers/chunks/e29d182460564c2a52ad.js +0 -1
  737. package/assets/esri/core/workers/chunks/f0b5c140a5ba174572b6.js +0 -1
  738. package/assets/esri/core/workers/chunks/f286680e363eefdf27df.js +0 -1
  739. /package/assets/esri/core/workers/chunks/{adac8583750783b9c599.js.LICENSE.txt → 319ff04282dc8ae38b56.js.LICENSE.txt} +0 -0
  740. /package/assets/esri/core/workers/chunks/{daec09750a5a70cdb0f0.js.LICENSE.txt → 50dc9893e13396f5e35d.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{deg2rad as a,lerp as r,clamp as s}from"../../../core/mathUtils.js";import{watch as i,syncAndInitial as l}from"../../../core/reactiveUtils.js";import{property as n,subclass as c}from"../../../core/accessorSupport/decorators.js";import{d as o}from"../../../chunks/boundedPlane.js";import{Sphere as u}from"../../../geometry/support/sphere.js";import{ScreenSizePerspectiveParameters as m}from"../webgl-engine/lib/screenSizePerspectiveUtils.js";let f=class extends t{get parameters(){return this._parameters}get labelParameters(){return this._labelParameters}get _calculations(){return this.view.state.isGlobal?new d(this.view.renderCoordsHelper?.referenceEllipsoid.radius??0):new p}constructor(e){super(e),this._parameters=new m,this._labelParameters=new m}initialize(){this.addHandles([i(()=>({distance:this.view.pointsOfInterest?.centerOnSurfaceInfrequent?.distance??0,fovY:this.view.state.camera.fovY}),e=>this._update(e),l)])}_update(e){const t=this._updateParameters(this._parameters,h,e),a=this._updateParameters(this._labelParameters,F,e);return t||a}_updateParameters(e,t,a){if(e&&e.camera.fovY===a.fovY&&e.camera.distance===a.distance)return!1;const{scaleStart:r,scaleFallOffRange:s}=t,{fovY:i,distance:l}=a;this._calculations.calculateCurvatureDependentParameters(g,t,a);const n=this._calculations.surfaceCoverageCompensation(a,g),{tiltAngle:c,scaleFallOffFactor:o}=g,u=Math.sin(c)*l,m=.5*Math.PI-c-i*(.5-r*n),f=u/Math.cos(m),p=m+i*s*n,d=(f-o*(u/Math.cos(p)))/(1-o);return e.camera.fovY=a.fovY,e.camera.distance=a.distance,e.offset=d,e.divisor=f-d,e.minPixelSize=t.minPixelSize,!0}};e([n({constructOnly:!0})],f.prototype,"view",void 0),e([n()],f.prototype,"_calculations",null),f=e([c("esri.views.3d.state.ScreenSizePerspective")],f);class p{surfaceCoverageCompensation(e,t){return o(t.tiltAngle,e.fovY)}calculateCurvatureDependentParameters(e,t){e.tiltAngle=t.curvatureDependent.min.tiltAngle,e.scaleFallOffFactor=t.curvatureDependent.min.scaleFallOffFactor}}class d{constructor(e){this._ellipsoidRadius=e}surfaceCoverageCompensation(e,t){return P.radius=this._ellipsoidRadius,P.frustumCoverage(t.tiltAngle,e.distance,e.fovY)}calculateCurvatureDependentParameters(e,t,a){const i=t.curvatureDependent,l=1+a.distance/this._ellipsoidRadius,n=Math.sqrt(l*l-1),[c,o]=[i.min.curvature,i.max.curvature],u=s((n-c)/(o-c),0,1),[m,f]=[i.min,i.max];e.tiltAngle=r(m.tiltAngle,f.tiltAngle,u),e.scaleFallOffFactor=r(m.scaleFallOffFactor,f.scaleFallOffFactor,u)}}class v{constructor(){this.tiltAngle=0,this.scaleFallOffFactor=0}}const h={curvatureDependent:{min:{curvature:a(10),tiltAngle:a(12),scaleFallOffFactor:.5},max:{curvature:a(70),tiltAngle:a(40),scaleFallOffFactor:.8}},scaleStart:.3,scaleFallOffRange:.65,minPixelSize:0},F={...h,curvatureDependent:{min:{...h.curvatureDependent.min,scaleFallOffFactor:.7},max:{...h.curvatureDependent.max,scaleFallOffFactor:.95}},minPixelSize:14},g=new v,P=new u;export{f as ScreenSizePerspective};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{deg2rad as a,lerp as r,clamp as s}from"../../../core/mathUtils.js";import{watch as i,syncAndInitial as l}from"../../../core/reactiveUtils.js";import{property as n,subclass as c}from"../../../core/accessorSupport/decorators.js";import{j as o}from"../../../chunks/boundedPlane.js";import{Sphere as u}from"../../../geometry/support/sphere.js";import{ScreenSizePerspectiveParameters as m}from"../webgl-engine/lib/screenSizePerspectiveUtils.js";let f=class extends t{get parameters(){return this._parameters}get labelParameters(){return this._labelParameters}get _calculations(){return this.view.state.isGlobal?new d(this.view.renderCoordsHelper?.referenceEllipsoid.radius??0):new p}constructor(e){super(e),this._parameters=new m,this._labelParameters=new m}initialize(){this.addHandles([i(()=>({distance:this.view.pointsOfInterest?.centerOnSurfaceInfrequent?.distance??0,fovY:this.view.state.camera.fovY}),e=>this._update(e),l)])}_update(e){const t=this._updateParameters(this._parameters,h,e),a=this._updateParameters(this._labelParameters,F,e);return t||a}_updateParameters(e,t,a){if(e&&e.camera.fovY===a.fovY&&e.camera.distance===a.distance)return!1;const{scaleStart:r,scaleFallOffRange:s}=t,{fovY:i,distance:l}=a;this._calculations.calculateCurvatureDependentParameters(g,t,a);const n=this._calculations.surfaceCoverageCompensation(a,g),{tiltAngle:c,scaleFallOffFactor:o}=g,u=Math.sin(c)*l,m=.5*Math.PI-c-i*(.5-r*n),f=u/Math.cos(m),p=m+i*s*n,d=(f-o*(u/Math.cos(p)))/(1-o);return e.camera.fovY=a.fovY,e.camera.distance=a.distance,e.offset=d,e.divisor=f-d,e.minPixelSize=t.minPixelSize,!0}};e([n({constructOnly:!0})],f.prototype,"view",void 0),e([n()],f.prototype,"_calculations",null),f=e([c("esri.views.3d.state.ScreenSizePerspective")],f);class p{surfaceCoverageCompensation(e,t){return o(t.tiltAngle,e.fovY)}calculateCurvatureDependentParameters(e,t){e.tiltAngle=t.curvatureDependent.min.tiltAngle,e.scaleFallOffFactor=t.curvatureDependent.min.scaleFallOffFactor}}class d{constructor(e){this._ellipsoidRadius=e}surfaceCoverageCompensation(e,t){return P.radius=this._ellipsoidRadius,P.frustumCoverage(t.tiltAngle,e.distance,e.fovY)}calculateCurvatureDependentParameters(e,t,a){const i=t.curvatureDependent,l=1+a.distance/this._ellipsoidRadius,n=Math.sqrt(l*l-1),[c,o]=[i.min.curvature,i.max.curvature],u=s((n-c)/(o-c),0,1),[m,f]=[i.min,i.max];e.tiltAngle=r(m.tiltAngle,f.tiltAngle,u),e.scaleFallOffFactor=r(m.scaleFallOffFactor,f.scaleFallOffFactor,u)}}class v{constructor(){this.tiltAngle=0,this.scaleFallOffFactor=0}}const h={curvatureDependent:{min:{curvature:a(10),tiltAngle:a(12),scaleFallOffFactor:.5},max:{curvature:a(70),tiltAngle:a(40),scaleFallOffFactor:.8}},scaleStart:.3,scaleFallOffRange:.65,minPixelSize:0},F={...h,curvatureDependent:{min:{...h.curvatureDependent.min,scaleFallOffFactor:.7},max:{...h.curvatureDependent.max,scaleFallOffFactor:.95}},minPixelSize:14},g=new v,P=new u;export{f as ScreenSizePerspective};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{clamp as i}from"../../../../core/mathUtils.js";import{createScreenPointArray as r}from"../../../../core/screenUtils.js";import{subclass as e}from"../../../../core/accessorSupport/decorators.js";import{copy as s,distance as n}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{normalize as o,subtract as h,length as c,scale as m,add as p}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as l}from"../../../../geometry/ellipsoidUtils.js";import{create as u,fromPoints as P}from"../../../../geometry/support/axisAngle.js";import{Sphere as y}from"../../../../geometry/support/sphere.js";import{pixelDistanceToInteractionFactor as C,applyAll as g}from"../../camera/constraintUtils.js";import{ConstraintOptions as d}from"../../camera/constraintUtils/ConstraintOptions.js";import{applySurfaceCollisionConstraint as f}from"../../camera/constraintUtils/surfaceCollision.js";import{InteractiveController as v}from"./InteractiveController.js";import{normalizeCoordinate as R,pickPointAndInitSphere as w,excludeTerrain as D,inferNavigationMode as k,zoomPivotDistanceClamp as j,getTiltScaleFactor as A,maxZoomPivotDistanceModifier as b,pivotSearchAreaSize as x,distanceComparisonTolerance as M,sphereOrPlanePointFromScreenPoint as O,applyRotation as U}from"../utils/navigationUtils.js";import{fromScreenAtEye as z}from"../../support/geometryUtils/ray.js";const H=12;let B=class extends v{constructor(){super(...arguments),this._pickPoint=_(),this._tmpP0=a(),this._panAxisAngle=u(),this._tmpRayDir=_(),this._tmpRayDirPick=_(),this._targetOnSphere=_(),this._navigationMode=1,this._tmpRay={origin:_(),direction:_()},this.dragBeginPoint=r(),this._normalizedAnchorPoint=a(),this._constraintOptions=new d(7,1,0,this.startCamera),this._sphere=new y,this._hasPickPoint=!1}get _intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.running)return;s(this.dragBeginPoint,t),R(this.startCamera,t,this._normalizedAnchorPoint);const r=l(this.view.spatialReference),e=w(this._intersectionHelper,this.startCamera,t,r.radius,0,this.view.basemapTerrain.invisible?D:{});if(this._navigationMode=k(this.startCamera,t,this.view.renderCoordsHelper,this.view.viewingMode),1===this._navigationMode)this._hasPickPoint=!!e.scenePickPoint,this._pickPoint=e.scenePickPoint??this._pickPoint,this._sphere=e.sphere;else{let r;z(this.startCamera,t,this._tmpRay),o(this._tmpRay.direction,this._tmpRay.direction),null!=e.scenePickPoint&&(h(this._tmpRayDirPick,this.startCamera.eye,e.scenePickPoint),r=c(this._tmpRayDirPick));const s=Math.abs(this.view.camera.position.z);this.view.renderCoordsHelper.worldUpAtPosition(this.startCamera.eye,F);const n=i(A(F,this._tmpRay.direction,b)*s,j[0],j[1]),a=this.view.stage.renderView.getMinimalDepthForArea(null,t[0],t[1],this.view.state.camera,x);let _=null!=a?a:n;null!=r&&(_=Math.min(_,r)),this._hasPickPoint=!0,m(this._tmpRay.direction,this._tmpRay.direction,_),p(this._pickPoint,this._tmpRay.origin,this._tmpRay.direction)}}update(t){if(this.running){if(this.currentCamera.eye=this.startCamera.eye,this.currentCamera.center=this.startCamera.center,this.currentCamera.up=this.startCamera.up,1===this._navigationMode){h(this._tmpRayDir,this.currentCamera.center,this.currentCamera.eye);const i=c(this._tmpRayDir);R(this.currentCamera,t,this._tmpP0);const r=(this._normalizedAnchorPoint[1]-this._tmpP0[1])*H;let e=i*2**r;const s=this.view.state.constraints.minimumPoiDistance;if(r<0&&e<s&&(e=s),Math.abs(i-e)<M)return;if(this._hasPickPoint&&e<i){const t=1-(1-e/i)*(1-this._sphere.radius/c(this.currentCamera.center));this.currentCamera.center=m(S,this.currentCamera.center,t)}m(this._tmpRayDir,this._tmpRayDir,-e/i),this.currentCamera.eye=p(S,this.currentCamera.center,this._tmpRayDir),this._constraintOptions.interactionFactor=C(n(this.dragBeginPoint,t)),g(this.view,this.currentCamera,this._constraintOptions),this._hasPickPoint&&(O(this._sphere,this.currentCamera,this.dragBeginPoint,this._targetOnSphere),P(this._pickPoint,this._targetOnSphere,this._panAxisAngle),U(this.currentCamera,this._sphere.center,this._panAxisAngle))}else{const i=c(this._tmpRay.direction);R(this.currentCamera,t,this._tmpP0);const r=(this._normalizedAnchorPoint[1]-this._tmpP0[1])*H;let e=i*2**r;const s=this.view.state.constraints.minimumPoiDistance;if(r<0&&e<s&&(e=s),Math.abs(i-e)<M)return;m(this._tmpRayDir,this._tmpRay.direction,1-e/i),this.currentCamera.eye=p(S,this.currentCamera.eye,this._tmpRayDir),this.currentCamera.center=p(S,this.currentCamera.center,this._tmpRayDir),o(this._tmpRayDir,this._tmpRayDir),this._constraintOptions.interactionDirection=this._tmpRayDir,g(this.view,this.currentCamera,this._constraintOptions),this._constraintOptions.interactionDirection=null}f(this.view,this.currentCamera),this.commitCamera()}}finish(){this.running&&this.finishController()}};B=t([e("esri.views.3d.state.controllers.ZoomControllerGlobal")],B);const S=_(),F=_();export{B as ZoomControllerGlobal};
2
+ import{__decorate as t}from"tslib";import{clamp as i}from"../../../../core/mathUtils.js";import{createScreenPointArray as r}from"../../../../core/screenUtils.js";import{subclass as e}from"../../../../core/accessorSupport/decorators.js";import{copy as s,distance as n}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{normalize as o,subtract as h,length as c,scale as m,add as p}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as l}from"../../../../geometry/ellipsoidUtils.js";import{create as u,fromPoints as P}from"../../../../geometry/support/axisAngle.js";import{Sphere as y}from"../../../../geometry/support/sphere.js";import{pixelDistanceToInteractionFactor as C,applyAll as g}from"../../camera/constraintUtils.js";import{ConstraintOptions as d}from"../../camera/constraintUtils/ConstraintOptions.js";import{applySurfaceCollisionConstraint as f}from"../../camera/constraintUtils/surfaceCollision.js";import{InteractiveController as v}from"./InteractiveController.js";import{normalizeCoordinate as R,pickPointAndInitSphere as w,excludeTerrain as D,inferNavigationMode as k,zoomPivotDistanceClamp as j,getTiltScaleFactor as A,pivotSearchAreaSize as b,distanceComparisonTolerance as x,sphereOrPlanePointFromScreenPoint as M,applyRotation as O,maxZoomPivotDistanceModifier as U}from"../utils/navigationUtils.js";import{fromScreenAtEye as z}from"../../support/geometryUtils/ray.js";const H=12;let B=class extends v{constructor(){super(...arguments),this._pickPoint=_(),this._tmpP0=a(),this._panAxisAngle=u(),this._tmpRayDir=_(),this._tmpRayDirPick=_(),this._targetOnSphere=_(),this._navigationMode=1,this._tmpRay={origin:_(),direction:_()},this.dragBeginPoint=r(),this._normalizedAnchorPoint=a(),this._constraintOptions=new d(7,1,0,this.startCamera),this._sphere=new y,this._hasPickPoint=!1}get _intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.running)return;s(this.dragBeginPoint,t),R(this.startCamera,t,this._normalizedAnchorPoint);const r=l(this.view.spatialReference),e=w(this._intersectionHelper,this.startCamera,t,r.radius,0,this.view.basemapTerrain.invisible?D:{});if(this._navigationMode=k(this.startCamera,t,this.view.renderCoordsHelper,this.view.viewingMode),1===this._navigationMode)this._hasPickPoint=!!e.scenePickPoint,this._pickPoint=e.scenePickPoint??this._pickPoint,this._sphere=e.sphere;else{let r;z(this.startCamera,t,this._tmpRay),o(this._tmpRay.direction,this._tmpRay.direction),null!=e.scenePickPoint&&(h(this._tmpRayDirPick,this.startCamera.eye,e.scenePickPoint),r=c(this._tmpRayDirPick));const s=Math.abs(this.view.camera.position.z);this.view.renderCoordsHelper.worldUpAtPosition(this.startCamera.eye,F);const n=i(A(F,this._tmpRay.direction,U)*s,j[0],j[1]),a=this.view.stage.renderView.getMinimalDepthForArea(null,t[0],t[1],this.view.state.camera,b);let _=null!=a?a:n;null!=r&&(_=Math.min(_,r)),this._hasPickPoint=!0,m(this._tmpRay.direction,this._tmpRay.direction,_),p(this._pickPoint,this._tmpRay.origin,this._tmpRay.direction)}}update(t){if(this.running){if(this.currentCamera.eye=this.startCamera.eye,this.currentCamera.center=this.startCamera.center,this.currentCamera.up=this.startCamera.up,1===this._navigationMode){h(this._tmpRayDir,this.currentCamera.center,this.currentCamera.eye);const i=c(this._tmpRayDir);R(this.currentCamera,t,this._tmpP0);const r=(this._normalizedAnchorPoint[1]-this._tmpP0[1])*H;let e=i*2**r;const s=this.view.state.constraints.minimumPoiDistance;if(r<0&&e<s&&(e=s),Math.abs(i-e)<x)return;if(this._hasPickPoint&&e<i){const t=1-(1-e/i)*(1-this._sphere.radius/c(this.currentCamera.center));this.currentCamera.center=m(S,this.currentCamera.center,t)}m(this._tmpRayDir,this._tmpRayDir,-e/i),this.currentCamera.eye=p(S,this.currentCamera.center,this._tmpRayDir),this._constraintOptions.interactionFactor=C(n(this.dragBeginPoint,t)),g(this.view,this.currentCamera,this._constraintOptions),this._hasPickPoint&&(M(this._sphere,this.currentCamera,this.dragBeginPoint,this._targetOnSphere),P(this._pickPoint,this._targetOnSphere,this._panAxisAngle),O(this.currentCamera,this._sphere.center,this._panAxisAngle))}else{const i=c(this._tmpRay.direction);R(this.currentCamera,t,this._tmpP0);const r=(this._normalizedAnchorPoint[1]-this._tmpP0[1])*H;let e=i*2**r;const s=this.view.state.constraints.minimumPoiDistance;if(r<0&&e<s&&(e=s),Math.abs(i-e)<x)return;m(this._tmpRayDir,this._tmpRay.direction,1-e/i),this.currentCamera.eye=p(S,this.currentCamera.eye,this._tmpRayDir),this.currentCamera.center=p(S,this.currentCamera.center,this._tmpRayDir),o(this._tmpRayDir,this._tmpRayDir),this._constraintOptions.interactionDirection=this._tmpRayDir,g(this.view,this.currentCamera,this._constraintOptions),this._constraintOptions.interactionDirection=null}f(this.view,this.currentCamera),this.commitCamera()}}finish(){this.running&&this.finishController()}};B=t([e("esri.views.3d.state.controllers.ZoomControllerGlobal")],B);const S=_(),F=_();export{B as ZoomControllerGlobal};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{clamp as i}from"../../../../core/mathUtils.js";import{Milliseconds as e}from"../../../../core/time.js";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{copy as s,normalize as o,scale as a,length as n,subtract as m,add as h,squaredDistance as p}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as _}from"../../../../geometry/ellipsoidUtils.js";import{create as l}from"../../../../geometry/support/ray.js";import{Sphere as y}from"../../../../geometry/support/sphere.js";import{applyAll as d}from"../../camera/constraintUtils.js";import{ConstraintOptions as w}from"../../camera/constraintUtils/ConstraintOptions.js";import{applySurfaceCollisionConstraint as g}from"../../camera/constraintUtils/surfaceCollision.js";import{PointToPointAnimationController as f}from"./PointToPointAnimationController.js";import{excludeTerrain as u,isHitOnSamePlanetSide as D,inferNavigationMode as C,zoomStepDistanceClamp as v,getTiltScaleFactor as R,distanceComparisonTolerance as j,panToPosition as b,maxZoomStepDistanceModifier as M}from"../utils/navigationUtils.js";import{fromScreenAtEye as z}from"../../support/geometryUtils/ray.js";import{intersectScreen as O}from"../../support/geometryUtils/sphere.js";import V from"../../webgl/RenderCamera.js";import{Intersector as U}from"../../webgl-engine/lib/Intersector.js";import{outExpo as L}from"../../../animation/easing.js";const S=.6,x=4,F=60;let H=class extends f{constructor(){super(...arguments),this._zoomLocation=c(),this._tmpCamera=new V,this._tmpViewDir=c(),this._tmpRayDir=l(),this._targetOnSphere=c(),this._tmpCenter=c(),this._beginCamera=new V,this._constraintOptions=new w(7,1,null,this._beginCamera),this._sphere=new y}initialize(){this._intersector=new U(this.view.state.viewingMode)}step(t,i){if(!this.running)return;const e=this.view.state;this.animation.finished?this._beginCamera.copyFrom(e.camera):this.animation.cameraAt(1,this._beginCamera);let r=!1,o=!1;this._intersectionHelper.intersectScreen(i,this._zoomLocation,0===this.view.map.ground.opacity?u:{})&&D(e.camera.eye,this._zoomLocation,_(this.view.spatialReference).radius)&&(r=t>0,o=!0),this._tmpCamera.copyFrom(e.camera),r?this._intersectionHelper.intersectRay(this._tmpCamera.ray,this._intersector,this._tmpCenter)&&(this._tmpCamera.center=this._tmpCenter):this._intersectionHelper.intersectRay(this._tmpCamera.ray,this._intersector,this._zoomLocation)?this._tmpCamera.center=this._zoomLocation:s(this._zoomLocation,this._tmpCamera.center),this._updateCamera(this._tmpCamera,t,i,o),this.begin(this._tmpCamera)}animationSettings(){return{duration:e(600),easing:L}}_updateCamera(t,e,r,s){const c=C(t,r,this.view.renderCoordsHelper,this.view.viewingMode),_=Math.abs(this.view.camera.position.z),l=this._zoomLocation;o(P,t.eye),a(P,P,-1),z(t,r,this._tmpRayDir),o(this._tmpRayDir.direction,this._tmpRayDir.direction);const y=i(R(P,this._tmpRayDir.direction,M)*_,v[0],v[1]);if(1===c){let i=S**e;this._sphere.radius=n(l),m(this._tmpViewDir,t.center,t.eye);const s=Math.min(n(this._tmpViewDir),y);let o=s*i;if(i<=1&&o<x&&(o=x,i=o/s),Math.abs(s-o)<j)return;const c=n(t.center);if(this._sphere.radius!==c){const e=this._sphere.radius+i*(c-this._sphere.radius);t.center=a(A,t.center,e/c)}a(this._tmpViewDir,this._tmpViewDir,-i),t.eye=h(A,t.center,this._tmpViewDir),d(this.view,t,this._constraintOptions),p(l,t.center)>1e-12&&O(this._sphere,t,r,this._targetOnSphere)&&b(this._sphere,t,l,this._targetOnSphere,this.view.camera.heading,this.view.camera.tilt,!0)}else{let i=S**Math.abs(e);const p=e>0?1:-1;m(this._tmpViewDir,l,t.eye);const c=n(this._tmpViewDir),_=this.view.stage.renderView.getMinimalDepthForArea(null,r[0],r[1],this.view.state.camera,F);let w=null!=_?_:y;s&&e>0&&(w=Math.min(w,c)),a(this._tmpRayDir.direction,this._tmpRayDir.direction,w),h(l,this._tmpRayDir.origin,this._tmpRayDir.direction);let g=w*i;const f=Math.max(x,1.01*t.nearFar[0]);if(e>0&&g<f&&(g=f,i=g/w),Math.abs(w-g)<j)return;a(this._tmpRayDir.direction,this._tmpRayDir.direction,p*(1-i)),t.eye=h(A,t.eye,this._tmpRayDir.direction),t.center=h(A,t.center,this._tmpRayDir.direction),o(this._tmpRayDir.direction,this._tmpRayDir.direction),this._constraintOptions.interactionDirection=this._tmpRayDir.direction,d(this.view,t,this._constraintOptions),this._constraintOptions.interactionDirection=null}g(this.view,t)}};H=t([r("esri.views.3d.state.controllers.ZoomStepControllerGlobal")],H);const A=c(),P=c();export{H as ZoomStepControllerGlobal};
2
+ import{__decorate as t}from"tslib";import{clamp as i}from"../../../../core/mathUtils.js";import{Milliseconds as e}from"../../../../core/time.js";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{copy as s,normalize as o,scale as a,length as n,subtract as m,add as h,squaredDistance as p}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as _}from"../../../../geometry/ellipsoidUtils.js";import{create as l}from"../../../../geometry/support/ray.js";import{Sphere as y}from"../../../../geometry/support/sphere.js";import{applyAll as d}from"../../camera/constraintUtils.js";import{ConstraintOptions as w}from"../../camera/constraintUtils/ConstraintOptions.js";import{applySurfaceCollisionConstraint as g}from"../../camera/constraintUtils/surfaceCollision.js";import{PointToPointAnimationController as f}from"./PointToPointAnimationController.js";import{excludeTerrain as u,isHitOnSamePlanetSide as D,inferNavigationMode as C,zoomStepDistanceClamp as v,getTiltScaleFactor as R,maxZoomStepDistanceModifier as j,distanceComparisonTolerance as b,panToPosition as M}from"../utils/navigationUtils.js";import{fromScreenAtEye as z}from"../../support/geometryUtils/ray.js";import{intersectScreen as O}from"../../support/geometryUtils/sphere.js";import V from"../../webgl/RenderCamera.js";import{Intersector as U}from"../../webgl-engine/lib/Intersector.js";import{outExpo as L}from"../../../animation/easing.js";const S=.6,x=4,F=60;let H=class extends f{constructor(){super(...arguments),this._zoomLocation=c(),this._tmpCamera=new V,this._tmpViewDir=c(),this._tmpRayDir=l(),this._targetOnSphere=c(),this._tmpCenter=c(),this._beginCamera=new V,this._constraintOptions=new w(7,1,null,this._beginCamera),this._sphere=new y}initialize(){this._intersector=new U(this.view.state.viewingMode)}step(t,i){if(!this.running)return;const e=this.view.state;this.animation.finished?this._beginCamera.copyFrom(e.camera):this.animation.cameraAt(1,this._beginCamera);let r=!1,o=!1;this._intersectionHelper.intersectScreen(i,this._zoomLocation,0===this.view.map.ground.opacity?u:{})&&D(e.camera.eye,this._zoomLocation,_(this.view.spatialReference).radius)&&(r=t>0,o=!0),this._tmpCamera.copyFrom(e.camera),r?this._intersectionHelper.intersectRay(this._tmpCamera.ray,this._intersector,this._tmpCenter)&&(this._tmpCamera.center=this._tmpCenter):this._intersectionHelper.intersectRay(this._tmpCamera.ray,this._intersector,this._zoomLocation)?this._tmpCamera.center=this._zoomLocation:s(this._zoomLocation,this._tmpCamera.center),this._updateCamera(this._tmpCamera,t,i,o),this.begin(this._tmpCamera)}animationSettings(){return{duration:e(600),easing:L}}_updateCamera(t,e,r,s){const c=C(t,r,this.view.renderCoordsHelper,this.view.viewingMode),_=Math.abs(this.view.camera.position.z),l=this._zoomLocation;o(P,t.eye),a(P,P,-1),z(t,r,this._tmpRayDir),o(this._tmpRayDir.direction,this._tmpRayDir.direction);const y=i(R(P,this._tmpRayDir.direction,j)*_,v[0],v[1]);if(1===c){let i=S**e;this._sphere.radius=n(l),m(this._tmpViewDir,t.center,t.eye);const s=Math.min(n(this._tmpViewDir),y);let o=s*i;if(i<=1&&o<x&&(o=x,i=o/s),Math.abs(s-o)<b)return;const c=n(t.center);if(this._sphere.radius!==c){const e=this._sphere.radius+i*(c-this._sphere.radius);t.center=a(A,t.center,e/c)}a(this._tmpViewDir,this._tmpViewDir,-i),t.eye=h(A,t.center,this._tmpViewDir),d(this.view,t,this._constraintOptions),p(l,t.center)>1e-12&&O(this._sphere,t,r,this._targetOnSphere)&&M(this._sphere,t,l,this._targetOnSphere,this.view.camera.heading,this.view.camera.tilt,!0)}else{let i=S**Math.abs(e);const p=e>0?1:-1;m(this._tmpViewDir,l,t.eye);const c=n(this._tmpViewDir),_=this.view.stage.renderView.getMinimalDepthForArea(null,r[0],r[1],this.view.state.camera,F);let w=null!=_?_:y;s&&e>0&&(w=Math.min(w,c)),a(this._tmpRayDir.direction,this._tmpRayDir.direction,w),h(l,this._tmpRayDir.origin,this._tmpRayDir.direction);let g=w*i;const f=Math.max(x,1.01*t.nearFar[0]);if(e>0&&g<f&&(g=f,i=g/w),Math.abs(w-g)<b)return;a(this._tmpRayDir.direction,this._tmpRayDir.direction,p*(1-i)),t.eye=h(A,t.eye,this._tmpRayDir.direction),t.center=h(A,t.center,this._tmpRayDir.direction),o(this._tmpRayDir.direction,this._tmpRayDir.direction),this._constraintOptions.interactionDirection=this._tmpRayDir.direction,d(this.view,t,this._constraintOptions),this._constraintOptions.interactionDirection=null}g(this.view,t)}};H=t([r("esri.views.3d.state.controllers.ZoomStepControllerGlobal")],H);const A=c(),P=c();export{H as ZoomStepControllerGlobal};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{cyclicalPI as t}from"../../../../core/Cyclical.js";import{deg2rad as e,clamp as n,acosClamped as r,asinClamped as o}from"../../../../core/mathUtils.js";import{createScreenPointArray as i}from"../../../../core/screenUtils.js";import{fromRotation as a,exactEquals as s,rotate as c,multiply as l}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as u,create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as f}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{distance as h,length as M,dot as g,subtract as y,transformMat4 as d,add as b,normalize as x,squaredDistance as j,copy as v,cross as P,scale as z,lerp as w,set as I}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as R}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as A,fromPoints as H,axis as S,wrapAxisAngle as T}from"../../../../geometry/support/axisAngle.js";import{coordinateSystemFromOneAxisAndNormalVector as U,vectorCoordinates as G}from"../../../../geometry/support/coordinateSystem.js";import{create as k,fromNormalAndOffset as E,intersectRay as q}from"../../../../geometry/support/plane.js";import{Sphere as C}from"../../../../geometry/support/sphere.js";import{sm4d as F,sv3d as O}from"../../../../geometry/support/vectorStacks.js";import{fromScreenAtEye as W,fromScreen as B}from"../../support/geometryUtils/ray.js";import{intersectScreen as D}from"../../support/geometryUtils/sphere.js";import J from"../../webgl/RenderCamera.js";import{terrainId as K}from"../../webgl-engine/lib/verticalOffsetUtils.js";const L=30,N=[1,3e8],Q=8,V=[200,1508e5],X=5,Y=50,Z=5,$=10,_=80,tt=90,et=1e-6,nt={exclude:new Set([K])};function rt(t,e,n){return n[0]=e[0]/(t.fullWidth/t.pixelRatio),n[1]=e[1]/(t.fullHeight/t.pixelRatio),n}function ot(t){for(;t>Math.PI;)t-=2*Math.PI;for(;t<-Math.PI;)t+=2*Math.PI;return t}function it(t,e,n){const r=a(F.get(),n[3],S(n));null==r||s(r,u)||(y(fe,t.eye,e),d(fe,fe,r),t.eye=b(fe,fe,e),y(fe,t.center,e),d(fe,fe,r),t.center=b(fe,fe,e),t.up=d(fe,t.up,r))}function at(t,e,n,r){return q(t,B(e,n,de),r)}function st(t,e,n,r){return q(t,W(e,n,de),r)}function ct(t,e,n,r){const o=O.get();let i=1-n;y(o,e,t.eye);const a=M(o);let s=a*(1-i);i>=0&&s<r&&(s=r,i=-(s-a)/a),Math.abs(a-s)<et||(z(o,o,i),t.eye=b(fe,t.eye,o),t.center=w(fe,t.center,e,i))}function lt(t,e,n){e.getScreenCenter(ut),D(t,e,ut,fe)&&(e.center=fe);const r=e.distance,o=r*n;if(Math.abs(r-o)<et)return;const i=z(O.get(),e.viewForward,o);e.eye=y(fe,e.center,i)}const ut=i();function mt(t,e){I(e,0,0,0);for(const n of t)b(e,e,n);z(e,e,1/t.length)}function ft(t,e,n,r){return Math.sin(t/M(e))*(n+r.radius)}function pt(t,e,n,r){return ft(Math.PI/2,e,n,r)+(t-Math.PI/2)}const ht={Elevation:3e4,Angle:e(16)},Mt=.05,gt=12,yt=12,dt=e(80);function bt(t,e,n,r,o,i){const a=R(),s=new C;let c=!0,l=!0;const{eye:u}=e;return t.intersectScreen(n,a,i)&&Zt(u,a,r)?s.radius=M(a):(l=!1,e.aboveGround&&0!==o?s.radius=Math.max(M(e.center),.9*r):s.radius=M(e.eye)-e.relativeElevation,1===o?Pt(s,e,n,a):c=D(s,e,n,a)),{sphere:s,scenePickPoint:c?a:null,hasGeometryIntersection:l}}function xt(t,e,n,r){const o=t.relativeElevation;if(o>ht.Elevation&&"global"===r)return 1;W(t,e,be);const i=Math.sign(o),a=n.worldUpAtPosition(t.eye,fe);return-i*g(a,be.direction)<Math.sin(ht.Angle)*M(be.direction)?0:1}function jt(t,e,n){y(vt,n,e),t.eye=y(fe,t.eye,vt),t.center=y(fe,t.center,vt)}const vt=R();function Pt(t,e,n,r){const o=W(e,n,de);return null!=o&&(t.closestPointOnSilhouette(o,zt),t.intersectRay(o,r)?!(j(zt,o.origin)<j(r,o.origin))||(v(r,zt),!1):(y(wt,e.eye,e.center),x(wt,wt),E(wt,-g(x(wt,wt),zt),It),q(It,o,r),!1))}const zt=R(),wt=R(),It=k();function Rt(t,e){const n=t.fullHeight/t.pixelRatio,r=e(0),o=e(n);if(r||!o)return null;let i=0,a=n;for(let s=0;s<yt;s++){const t=.5*(i+a);e(t)?a=t:i=t}return a}function At(t,e,n){return e?t>n:t<n}function Ht(t,e){const n=t.fullHeight/t.pixelRatio,r=Math.max(e,n-e);return Math.max(gt,Mt*r)}function St(t,e){const n=t.fullHeight/t.pixelRatio;return Math.min(n,e+Ht(t,e))}function Tt(t,e){return Math.max(0,e-Ht(t,e))}function Ut(t,e,n,r){return xe[0]=n,xe[1]=r,t.intersectRay(W(e,xe,de),fe)}function Gt(t,e,n,r){return xe[0]=n,xe[1]=r,q(t,W(e,xe,de),fe)}function kt(i,a,s,c,l,u){let m=0;if(P(Me,i,a),y(pe,i,a),M(i)<=l||!c.aboveGround){P(s,pe,c.eye);const f=g(i,a)/(M(i)*M(a));if(f<.9999)m=r(f);else{const t=M(P(R(),i,a))/(M(i)*M(a));m=o(t)}const p=Math.cos(n(t.normalize(e(u)),0,dt));m=-m-Math.max(0,M(a)-l)/(p*l)}else y(Et,c.eye,c.center),P(s,pe,Et),m=-M(pe)/l;return x(s,s),z(s,s,M(Me)),m}const Et=R();function qt(o,i,a,s){let c,l;const u=Math.cos(n(t.normalize(e(s)),0,dt));return c=i>a?-(i-a)/(u*a):i<-a?Math.PI-(i+a)/(u*a):r(i/a),l=o>a?-(o-a)/(u*a):o<-a?Math.PI-(o+a)/(u*a):r(o/a),(l-c)*a}function Ct(t,e,n,r,o,i,a,s,c,l){const u=qt(t[2],e[2],i.radius,s),m=c?qt(t[0],e[0],i.radius,180):e[0]-t[0],p=Math.sin(a)*m-Math.cos(a)*u,h=Math.cos(a)*m+Math.sin(a)*u;x(fe,o);const M=c?p/Math.sqrt(Math.abs(i.radius**2-g(n,fe)**2)):p/i.radius,y=h/Math.sqrt(Math.abs(i.radius**2-g(n,r)**2));f(l,M,y)}function Ft(t,e,n,r,o,i,a,s,c,l){P(Me,t,e),U(i.up,i.eye,ee,ne,re),U([0,0,1],i.eye,$t,_t,te),v(n,_t),v(r,$t),x(n,n),z(n,n,M(Me)),G(t,x(ne,ne),x(re,re),x(ee,ee),oe),G(e,ne,re,ee,ie),Ct(oe,ie,t,$t,_t,a,s,c,l,o)}function Ot(t,e,n,r,o,i,s){a(ce,o,r),a(le,s,i),l(ue,ce,le),y(e,t,n),d(e,e,ue),b(e,e,n)}function Wt(t,e,n,r,o,i){a(ce,r,n),a(le,i,o),l(ue,ce,le),y(fe,t.eye,e),d(fe,fe,ue),t.eye=b(fe,fe,e),y(fe,t.center,e),d(fe,fe,ue),t.center=b(fe,fe,e),y(fe,t.up,e),d(fe,fe,ue),t.up=b(fe,fe,e)}const Bt={Pole:.95,Angle:e(18),Tilt:45,TiltHysteresisMargin:1e-7};let Dt=!1;function Jt(t,e,n,r,o,i){const a=Math.abs(r)>Math.PI-Bt.Angle||Math.abs(r)<Bt.Angle,s=(Math.abs(t[2])<n*Bt.Pole||Math.abs(e)>n)&&i;return a&&s?!Dt&&o<Bt.Tilt-Bt.TiltHysteresisMargin?Dt=!0:Dt&&o>Bt.Tilt+Bt.TiltHysteresisMargin&&(Dt=!1):Dt=!1,Dt}function Kt(t,e,n,r,o,i){if(i)H(n,r,se),it(e,t.center,se);else{const i=kt(n,r,ge,e,t.radius,o);it(e,t.center,T(ge,i))}}function Lt(t,e,n,r,o,i,a){const s=a?20:1,c=1e-12;let l,u;v(me,r),he.copyFrom(e);for(let m=0;m<s&&j(n,me)>c&&(l=j(n,me),Ft(n,me,_t,$t,ae,he,t,o,i,a),Wt(he,t.center,$t,ae[1],_t,ae[0]),Ot(me,me,t.center,$t,ae[1],_t,ae[0]),u=j(n,me),u<l||0===m);m++)e.copyFrom(he)}function Nt(n,r,o,i,a,s,c){Jt(o,g(r.up,o),n.radius,-t.normalize(e(a)),s,r.aboveGround)?Lt(n,r,o,i,-t.normalize(e(a)),s,c):Kt(n,r,o,i,s,c)}function Qt(t,e,n,r,o,i){const{eye:a}=t;U([0,0,1],a,$t,_t,te);const s=e.translation[0]*n.pan,l="zoom"===o.mode?0:e.translation[1]*n.pan,u=Math.max(Math.sqrt(Math.abs(1-g(t.center,$t)**2/M(t.center)**2)),.5),m=(Math.sin(i)*l+Math.cos(i)*s)/u,f=-Math.cos(i)*l+Math.sin(i)*s;switch(c(r.pan.matrix,r.pan.matrix,m,$t),r.pan.enabled=!0,o.mode){case"pan":c(r.pan.matrix,r.pan.matrix,f,_t),r.pan.enabled=!0;break;case"zoom":r.zoom=-e.translation[1]*n.zoom}}function Vt(t,e,n,r,o){const{eye:i,viewRight:a}=t,s=P(O.get(),a,i),l=e.translation[0]*n.pan;switch(0!==l&&(c(r.pan.matrix,r.pan.matrix,-l,s),r.pan.enabled=!0),o.mode){case"pan":{const t=e.translation[1]*n.pan;0!==t&&(c(r.pan.matrix,r.pan.matrix,t,a),r.pan.enabled=!0);break}case"zoom":r.zoom=-e.translation[1]*n.zoom}}function Xt(n,r,o,i,a,s,c,l,u){Jt(n.center,g(n.up,n.center),M(n.center),-t.normalize(e(s)),c,r.aboveGround)?Qt(r,o,i,l,u,-t.normalize(e(a))):Vt(r,o,i,l,u)}function Yt(t,e,n=1/0){const r=Math.abs(g(t,e));return Math.min(n,1/r)}function Zt(t,e,n){const r=h(t,e),o=M(t);return r<Math.max(o,n)}const $t=R(),_t=R(),te=R(),ee=R(),ne=R(),re=R(),oe=R(),ie=R(),ae=p(),se=A(),ce=m(),le=m(),ue=m(),me=R(),fe=R(),pe=R();let he=new J;const Me=R(),ge=R();function ye(){he=new J}const de={origin:R(),direction:R()},be={origin:R(),direction:R()},xe=i();export{dt as TiltThresholdPanningSpeed,ht as VerticalPanTresholds,jt as applyPanPlanar,Kt as applyPanSphericalDirectRotation,Lt as applyPanSphericalPreserveHeading,it as applyRotation,Wt as applyRotationWithTwoAxes,lt as applyZoomOnSphere,ct as applyZoomToPoint,mt as centroid,ye as cleanupNavigationUtils,Tt as computeHorizonDownLimitScreenY,Ht as computeHorizonPadding,St as computeHorizonUpLimitScreenY,et as distanceComparisonTolerance,nt as excludeTerrain,Rt as findHorizonScreenY,Yt as getTiltScaleFactor,xt as inferNavigationMode,at as intersectPlaneFromScreenPoint,st as intersectPlaneFromScreenPointAtEye,Gt as intersectsPlaneAtScreenPoint,Ut as intersectsSphereAtScreenPoint,Zt as isHitOnSamePlanetSide,qt as lengthFromPoints,X as maxPanDistanceModifier,Z as maxRotatePivotDistanceModifier,L as maxZoomPivotDistanceModifier,Q as maxZoomStepDistanceModifier,Y as minPinchAndPanCameraHeight,$ as minRotatePivotDistance,rt as normalizeCoordinate,ot as normalizeRotationDelta,pt as offSurfaceTiltToEyeTiltGlobal,ft as onSurfaceTiltToEyeTiltGlobal,Xt as panMotionToRotationMatrix,Nt as panToPosition,bt as pickPointAndInitSphere,_ as pivotSearchAreaSize,Bt as preservingHeadingThresholds,Mt as relativeHorizonPanPadding,tt as rotatePivotSearchAreaSize,Ot as rotatePointAroundTwoAxes,kt as rotationAngleAndAxisDirectRotation,Ft as rotationAnglesAndAxesHeadingPreserving,Ct as rotationAnglesHeadingPreserving,At as shouldClampScreenY,Jt as shouldPreserveHeading,Pt as sphereOrPlanePointFromScreenPoint,N as zoomPivotDistanceClamp,V as zoomStepDistanceClamp};
2
+ import{cyclicalPI as t}from"../../../../core/Cyclical.js";import{deg2rad as e,clamp as n,acosClamped as r,asinClamped as o}from"../../../../core/mathUtils.js";import{createScreenPointArray as i}from"../../../../core/screenUtils.js";import{fromRotation as a,exactEquals as s,rotate as c,multiply as l}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as u,create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as f}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{length as h,dot as M,subtract as g,normalize as y,squaredDistance as d,copy as b,transformMat4 as x,add as j,distance as v,cross as P,scale as z,lerp as w,set as I}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as R}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as A,axis as H,fromPoints as S,wrapAxisAngle as T}from"../../../../geometry/support/axisAngle.js";import{coordinateSystemFromOneAxisAndNormalVector as U,vectorCoordinates as G}from"../../../../geometry/support/coordinateSystem.js";import{create as k,fromNormalAndOffset as E,intersectRay as q}from"../../../../geometry/support/plane.js";import{Sphere as C}from"../../../../geometry/support/sphere.js";import{sm4d as F,sv3d as O}from"../../../../geometry/support/vectorStacks.js";import{fromScreenAtEye as W,fromScreen as B}from"../../support/geometryUtils/ray.js";import{intersectScreen as D}from"../../support/geometryUtils/sphere.js";import J from"../../webgl/RenderCamera.js";import{terrainId as K}from"../../webgl-engine/lib/verticalOffsetUtils.js";const L=30,N=[1,3e8],Q=8,V=[200,1508e5],X=5,Y=50,Z=5,$=10,_=80,tt=90,et=1e-6,nt={exclude:new Set([K])};function rt(t,e,n){return n[0]=e[0]/(t.fullWidth/t.pixelRatio),n[1]=e[1]/(t.fullHeight/t.pixelRatio),n}function ot(t){for(;t>Math.PI;)t-=2*Math.PI;for(;t<-Math.PI;)t+=2*Math.PI;return t}function it(t,e,n){const r=a(F.get(),n[3],H(n));null==r||s(r,u)||(g(fe,t.eye,e),x(fe,fe,r),t.eye=j(fe,fe,e),g(fe,t.center,e),x(fe,fe,r),t.center=j(fe,fe,e),t.up=x(fe,t.up,r))}function at(t,e,n,r){return q(t,B(e,n,de),r)}function st(t,e,n,r){return q(t,W(e,n,de),r)}function ct(t,e,n,r){const o=O.get();let i=1-n;g(o,e,t.eye);const a=h(o);let s=a*(1-i);i>=0&&s<r&&(s=r,i=-(s-a)/a),Math.abs(a-s)<et||(z(o,o,i),t.eye=j(fe,t.eye,o),t.center=w(fe,t.center,e,i))}function lt(t,e,n){e.getScreenCenter(ut),D(t,e,ut,fe)&&(e.center=fe);const r=e.distance,o=r*n;if(Math.abs(r-o)<et)return;const i=z(O.get(),e.viewForward,o);e.eye=g(fe,e.center,i)}const ut=i();function mt(t,e){I(e,0,0,0);for(const n of t)j(e,e,n);z(e,e,1/t.length)}function ft(t,e,n,r){return Math.sin(t/h(e))*(n+r.radius)}function pt(t,e,n,r){return ft(Math.PI/2,e,n,r)+(t-Math.PI/2)}const ht={Elevation:3e4,Angle:e(16)},Mt=.05,gt=12,yt=12,dt=e(80);function bt(t,e,n,r,o,i){const a=R(),s=new C;let c=!0,l=!0;const{eye:u}=e;return t.intersectScreen(n,a,i)&&Zt(u,a,r)?s.radius=h(a):(l=!1,e.aboveGround&&0!==o?s.radius=Math.max(h(e.center),.9*r):s.radius=h(e.eye)-e.relativeElevation,1===o?Pt(s,e,n,a):c=D(s,e,n,a)),{sphere:s,scenePickPoint:c?a:null,hasGeometryIntersection:l}}function xt(t,e,n,r){const o=t.relativeElevation;if(o>ht.Elevation&&"global"===r)return 1;W(t,e,be);const i=Math.sign(o),a=n.worldUpAtPosition(t.eye,fe);return-i*M(a,be.direction)<Math.sin(ht.Angle)*h(be.direction)?0:1}function jt(t,e,n){g(vt,n,e),t.eye=g(fe,t.eye,vt),t.center=g(fe,t.center,vt)}const vt=R();function Pt(t,e,n,r){const o=W(e,n,de);return null!=o&&(t.closestPointOnSilhouette(o,zt),t.intersectRay(o,r)?!(d(zt,o.origin)<d(r,o.origin))||(b(r,zt),!1):(g(wt,e.eye,e.center),y(wt,wt),E(wt,-M(y(wt,wt),zt),It),q(It,o,r),!1))}const zt=R(),wt=R(),It=k();function Rt(t,e){const n=t.fullHeight/t.pixelRatio,r=e(0),o=e(n);if(r||!o)return null;let i=0,a=n;for(let s=0;s<yt;s++){const t=.5*(i+a);e(t)?a=t:i=t}return a}function At(t,e,n){return e?t>n:t<n}function Ht(t,e){const n=t.fullHeight/t.pixelRatio,r=Math.max(e,n-e);return Math.max(gt,Mt*r)}function St(t,e){const n=t.fullHeight/t.pixelRatio;return Math.min(n,e+Ht(t,e))}function Tt(t,e){return Math.max(0,e-Ht(t,e))}function Ut(t,e,n,r){return xe[0]=n,xe[1]=r,t.intersectRay(W(e,xe,de),fe)}function Gt(t,e,n,r){return xe[0]=n,xe[1]=r,q(t,W(e,xe,de),fe)}function kt(i,a,s,c,l,u){let m=0;if(P(Me,i,a),g(pe,i,a),h(i)<=l||!c.aboveGround){P(s,pe,c.eye);const f=M(i,a)/(h(i)*h(a));if(f<.9999)m=r(f);else{const t=h(P(R(),i,a))/(h(i)*h(a));m=o(t)}const p=Math.cos(n(t.normalize(e(u)),0,dt));m=-m-Math.max(0,h(a)-l)/(p*l)}else g(Et,c.eye,c.center),P(s,pe,Et),m=-h(pe)/l;return y(s,s),z(s,s,h(Me)),m}const Et=R();function qt(o,i,a,s){let c,l;const u=Math.cos(n(t.normalize(e(s)),0,dt));return c=i>a?-(i-a)/(u*a):i<-a?Math.PI-(i+a)/(u*a):r(i/a),l=o>a?-(o-a)/(u*a):o<-a?Math.PI-(o+a)/(u*a):r(o/a),(l-c)*a}function Ct(t,e,n,r,o,i,a,s,c,l){const u=qt(t[2],e[2],i.radius,s),m=c?qt(t[0],e[0],i.radius,180):e[0]-t[0],p=Math.sin(a)*m-Math.cos(a)*u,h=Math.cos(a)*m+Math.sin(a)*u;y(fe,o);const g=c?p/Math.sqrt(Math.abs(i.radius**2-M(n,fe)**2)):p/i.radius,d=h/Math.sqrt(Math.abs(i.radius**2-M(n,r)**2));f(l,g,d)}function Ft(t,e,n,r,o,i,a,s,c,l){P(Me,t,e),U(i.up,i.eye,ee,ne,re),U([0,0,1],i.eye,$t,_t,te),b(n,_t),b(r,$t),y(n,n),z(n,n,h(Me)),G(t,y(ne,ne),y(re,re),y(ee,ee),oe),G(e,ne,re,ee,ie),Ct(oe,ie,t,$t,_t,a,s,c,l,o)}function Ot(t,e,n,r,o,i,s){a(ce,o,r),a(le,s,i),l(ue,ce,le),g(e,t,n),x(e,e,ue),j(e,e,n)}function Wt(t,e,n,r,o,i){a(ce,r,n),a(le,i,o),l(ue,ce,le),g(fe,t.eye,e),x(fe,fe,ue),t.eye=j(fe,fe,e),g(fe,t.center,e),x(fe,fe,ue),t.center=j(fe,fe,e),g(fe,t.up,e),x(fe,fe,ue),t.up=j(fe,fe,e)}const Bt={Pole:.95,Angle:e(18),Tilt:45,TiltHysteresisMargin:1e-7};let Dt=!1;function Jt(t,e,n,r,o,i){const a=Math.abs(r)>Math.PI-Bt.Angle||Math.abs(r)<Bt.Angle,s=(Math.abs(t[2])<n*Bt.Pole||Math.abs(e)>n)&&i;return a&&s?!Dt&&o<Bt.Tilt-Bt.TiltHysteresisMargin?Dt=!0:Dt&&o>Bt.Tilt+Bt.TiltHysteresisMargin&&(Dt=!1):Dt=!1,Dt}function Kt(t,e,n,r,o,i){if(i)S(n,r,se),it(e,t.center,se);else{const i=kt(n,r,ge,e,t.radius,o);it(e,t.center,T(ge,i))}}function Lt(t,e,n,r,o,i,a){const s=a?20:1,c=1e-12;let l,u;b(me,r),he.copyFrom(e);for(let m=0;m<s&&d(n,me)>c&&(l=d(n,me),Ft(n,me,_t,$t,ae,he,t,o,i,a),Wt(he,t.center,$t,ae[1],_t,ae[0]),Ot(me,me,t.center,$t,ae[1],_t,ae[0]),u=d(n,me),u<l||0===m);m++)e.copyFrom(he)}function Nt(n,r,o,i,a,s,c){Jt(o,M(r.up,o),n.radius,-t.normalize(e(a)),s,r.aboveGround)?Lt(n,r,o,i,-t.normalize(e(a)),s,c):Kt(n,r,o,i,s,c)}function Qt(t,e,n,r,o,i){const{eye:a}=t;U([0,0,1],a,$t,_t,te);const s=e.translation[0]*n.pan,l="zoom"===o.mode?0:e.translation[1]*n.pan,u=Math.max(Math.sqrt(Math.abs(1-M(t.center,$t)**2/h(t.center)**2)),.5),m=(Math.sin(i)*l+Math.cos(i)*s)/u,f=-Math.cos(i)*l+Math.sin(i)*s;switch(c(r.pan.matrix,r.pan.matrix,m,$t),r.pan.enabled=!0,o.mode){case"pan":c(r.pan.matrix,r.pan.matrix,f,_t),r.pan.enabled=!0;break;case"zoom":r.zoom=-e.translation[1]*n.zoom}}function Vt(t,e,n,r,o){const{eye:i,viewRight:a}=t,s=P(O.get(),a,i),l=e.translation[0]*n.pan;switch(0!==l&&(c(r.pan.matrix,r.pan.matrix,-l,s),r.pan.enabled=!0),o.mode){case"pan":{const t=e.translation[1]*n.pan;0!==t&&(c(r.pan.matrix,r.pan.matrix,t,a),r.pan.enabled=!0);break}case"zoom":r.zoom=-e.translation[1]*n.zoom}}function Xt(n,r,o,i,a,s,c,l,u){Jt(n.center,M(n.up,n.center),h(n.center),-t.normalize(e(s)),c,r.aboveGround)?Qt(r,o,i,l,u,-t.normalize(e(a))):Vt(r,o,i,l,u)}function Yt(t,e,n=1/0){const r=Math.abs(M(t,e));return Math.min(n,1/r)}function Zt(t,e,n){const r=v(t,e),o=h(t);return r<Math.max(o,n)}const $t=R(),_t=R(),te=R(),ee=R(),ne=R(),re=R(),oe=R(),ie=R(),ae=p(),se=A(),ce=m(),le=m(),ue=m(),me=R(),fe=R(),pe=R();let he=new J;const Me=R(),ge=R();function ye(){he=new J}const de={origin:R(),direction:R()},be={origin:R(),direction:R()},xe=i();export{dt as TiltThresholdPanningSpeed,ht as VerticalPanTresholds,jt as applyPanPlanar,Kt as applyPanSphericalDirectRotation,Lt as applyPanSphericalPreserveHeading,it as applyRotation,Wt as applyRotationWithTwoAxes,lt as applyZoomOnSphere,ct as applyZoomToPoint,mt as centroid,ye as cleanupNavigationUtils,Tt as computeHorizonDownLimitScreenY,Ht as computeHorizonPadding,St as computeHorizonUpLimitScreenY,et as distanceComparisonTolerance,nt as excludeTerrain,Rt as findHorizonScreenY,Yt as getTiltScaleFactor,xt as inferNavigationMode,at as intersectPlaneFromScreenPoint,st as intersectPlaneFromScreenPointAtEye,Gt as intersectsPlaneAtScreenPoint,Ut as intersectsSphereAtScreenPoint,Zt as isHitOnSamePlanetSide,qt as lengthFromPoints,X as maxPanDistanceModifier,Z as maxRotatePivotDistanceModifier,L as maxZoomPivotDistanceModifier,Q as maxZoomStepDistanceModifier,Y as minPinchAndPanCameraHeight,$ as minRotatePivotDistance,rt as normalizeCoordinate,ot as normalizeRotationDelta,pt as offSurfaceTiltToEyeTiltGlobal,ft as onSurfaceTiltToEyeTiltGlobal,Xt as panMotionToRotationMatrix,Nt as panToPosition,bt as pickPointAndInitSphere,_ as pivotSearchAreaSize,Bt as preservingHeadingThresholds,Mt as relativeHorizonPanPadding,tt as rotatePivotSearchAreaSize,Ot as rotatePointAroundTwoAxes,kt as rotationAngleAndAxisDirectRotation,Ft as rotationAnglesAndAxesHeadingPreserving,Ct as rotationAnglesHeadingPreserving,At as shouldClampScreenY,Jt as shouldPreserveHeading,Pt as sphereOrPlanePointFromScreenPoint,N as zoomPivotDistanceClamp,V as zoomStepDistanceClamp};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as o}from"tslib";import e from"../../../core/Accessor.js";import{destroyHandle as s}from"../../../core/handleUtils.js";import{property as r,subclass as t}from"../../../core/accessorSupport/decorators.js";import{i,g as p}from"../../../chunks/boundedPlane.js";import{PropertiesPool as l}from"../../support/PropertiesPool.js";let n=class extends e{constructor(o){super(o),this._propertiesPool=new l({plane:()=>i()},this),this.isDecoration=!0,this.addHandles(s(this._propertiesPool))}set plane(o){if(!o)return void this._set("plane",o);const e=this._propertiesPool.get("plane");p(o,e),this._set("plane",e)}};o([r()],n.prototype,"plane",null),o([r()],n.prototype,"isDecoration",void 0),n=o([t("esri.views.3d.support.ViewSlice")],n);export{n as ViewSlice};
2
+ import{__decorate as o}from"tslib";import e from"../../../core/Accessor.js";import{destroyHandle as s}from"../../../core/handleUtils.js";import{property as r,subclass as t}from"../../../core/accessorSupport/decorators.js";import{c as i,a as p}from"../../../chunks/boundedPlane.js";import{PropertiesPool as l}from"../../support/PropertiesPool.js";let n=class extends e{constructor(o){super(o),this._propertiesPool=new l({plane:()=>i()},this),this.isDecoration=!0,this.addHandles(s(this._propertiesPool))}set plane(o){if(!o)return void this._set("plane",o);const e=this._propertiesPool.get("plane");p(o,e),this._set("plane",e)}};o([r()],n.prototype,"plane",null),o([r()],n.prototype,"isDecoration",void 0),n=o([t("esri.views.3d.support.ViewSlice")],n);export{n as ViewSlice};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{makeHandle as t}from"../../../../core/handleUtils.js";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import i from"../../layers/FlowSubView3D.js";import{loadImagery as s}from"../../../support/flow/dataUtils.js";let o=class extends i{constructor(e){super(e)}initialize(){this.updatingHandles.add(()=>this.renderedTiles,()=>this.triggerLoad()),this.updatingHandles.add(()=>this.elevationInfo.mode,e=>this._updatePopupDrapeSource(e),{initial:!0})}_updatePopupDrapeSource(e){if("on-the-ground"===e)return void this.removeHandles(a);if(this.hasHandles(a))return;const r={destroyed:!1,drapeSourceType:2,updatePolicy:0,layer:this.layer},i=this.layerView.view.overlayManager;i.registerGeometryDrapeSource(r),this.addHandles(t(()=>i.unregisterDrapeSource(r)),a)}async fetchDataAndGenerateStreamlines(e,t){const{needsMagnitude:r}=this,i=this.getSimulationSettings(e),{size:o,extent:a,timeExtent:n}=e;if(null==i)return;const l=await s(this.layer,a,o[0],o[1],n,t);if(null==l)return null;const d={simulationSettings:i,flowExtentInfo:e.flowExtentInfo,flowData:l,needsMagnitude:r,startPositions:this.startPositions(e)},{streamlines:u}=await this.workerHandle.generateStreamlines(d,t);return u}};o=e([r("esri.views.3d.support.flow.FlowSubViewExtent3D")],o);const a=Symbol("popupDrapeSource");export{o as default};
2
+ import{__decorate as e}from"tslib";import{makeHandle as t}from"../../../../core/handleUtils.js";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import i from"../../layers/FlowSubView3D.js";import{loadImagery as s}from"../../../support/flow/dataUtils.js";let o=class extends i{constructor(e){super(e)}initialize(){this.updatingHandles.add(()=>this.renderedTiles,()=>this.triggerLoad()),this.updatingHandles.add(()=>this.elevationInfo.mode,e=>this._updatePopupDrapeSource(e),{initial:!0})}_updatePopupDrapeSource(e){if("on-the-ground"===e)return void this.removeHandles(n);if(this.hasHandles(n))return;const r={destroyed:!1,drapeSourceType:2,updatePolicy:0,layer:this.layer},i=this.layerView.view.overlayManager;i.registerGeometryDrapeSource(r),this.addHandles(t(()=>i.unregisterDrapeSource(r)),n)}async fetchDataAndGenerateStreamlines(e,t){const{needsMagnitude:r}=this,i=this.getSimulationSettings(e),{size:o,extent:a,timeExtent:n}=e;if(null==i)return;const l=await s(this.layer,a,o[0],o[1],n,t);if(null==l)return null;const d={simulationSettings:i,flowExtentInfo:e.flowExtentInfo,flowData:l,needsMagnitude:r,startPositions:this.startPositions(e)},{streamlines:u}=await this.workerHandle.generateStreamlines(d,t);return u}};o=e([r("esri.views.3d.support.flow.FlowSubViewExtent3D")],o);const a=o,n=Symbol("popupDrapeSource");export{a as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{watch as t,syncAndInitial as s,when as i,sync as l}from"../../../../core/reactiveUtils.js";import{throttle as a}from"../../../../core/throttle.js";import{property as r,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{clone as n,create as d}from"../../../../geometry/support/aaBoundingRect.js";import h from"../../layers/FlowSubView3D.js";import{getFeatureTileId as u}from"../../layers/support/FeatureTileDescriptor.js";import{tilesWaitingTime as c}from"./constants.js";import{FlowDataTile as p}from"./loadUtils.js";import{isRasterTile as f}from"../../terrain/TerrainData.js";import{descendantsAtLevel as T}from"../../terrain/tileUtils.js";import{toFlowData as _}from"../../../support/flow/dataUtils.js";const m={type:"delete"};let g=class extends h{constructor(e){super(e),this._flowDataTiles=y(),this._throttling=!1,this._resetTileData=!0}initialize(){this.addHandles([this.surface.on("tile-data-changed",({tile:e,layerIndex:t,layerClass:s})=>{if(t!==this._layerIndex||1!==s)return;const i=this.frameTask.schedule(()=>{this._applyTileDataUpdate(e)&&this.triggerLoad()});this.updatingHandles.consumePromise(i)}),t(()=>this.renderedTiles,e=>{const t=this.frameTask.scheduleGenerator(this.loadAllTiles?t=>this._applyTileDataUpdates(e,t):t=>this._syncToTiles(e,t));this.updatingHandles.consumePromise(t)},s),i(()=>null!=this.renderedTiles&&null!=this.extent&&this.loadAllTiles,()=>{const e=this.frameTask.scheduleGenerator(e=>this._enterAllTilesMode(e));this.updatingHandles.consumePromise(e)},s),t(()=>this._pixelSize,()=>{this.invalidateTileData(),this._resetTileData=!0},l),this.layerView.on("data-changed",()=>{this.invalidateTileData(),this._resetTileData=!0})]),this._throttledTriggerLoad=a(()=>{super.triggerLoad(),this._throttling=!1},()=>this._throttling=!0,c,this),this.addHandles(this._throttledTriggerLoad)}clear(){super.clear(),this._resetTileData=!1}*_enterAllTilesMode(e){const{targetTiles:t,_flowDataTiles:s}=this,i=y();for(const[l,a]of s)t.has(l)&&i.set(l,a);this._setFlowDataTiles(i),e.madeProgress(),e.done&&(e=yield),yield*this._applyTileDataUpdates(new Set(this.surface.allTiles),e),this.triggerLoad()}*_syncToTiles(e,t){const s=y();for(const i of e??[]){const e=this._flowDataTiles.get(i.key),l=null==e||"delete"===e.type||"invalid"===e.type?this._getLoadedState(i):e;null!=l&&s.set(i.key,l),t.madeProgress(),t.done&&(t=yield)}this._setFlowDataTiles(s),this.triggerLoad()}*_applyTileDataUpdates(e,t){let s=!1;for(const i of e??[]){const e=this._applyTileDataUpdate(i);s||=e,t.madeProgress(),t.done&&(t=yield)}s&&this.triggerLoad()}abort(){super.abort(),this._throttling=!1}get _layerIndex(){return this.surface.getLayerIndexByUID(1,this.layerView.uid)}get _pixelSize(){return this.surface.tilingScheme.pixelSize}doRefresh(){this.invalidateTileData(),super.doRefresh()}triggerLoad(){const{_throttledTriggerLoad:e}=this;null!=e?this._allTilesLoaded?(e.hasPendingUpdates()||e(),e.forceUpdate()):e():super.triggerLoad()}async fetchDataAndGenerateStreamlines(e,t){const{_flowDataTiles:s,needsMagnitude:i}=this,l=this.getSimulationSettings(e);if(null==l)return;const a=this._resetTileData;if(!a&&0===s.size)return;const r=y();s.forEach((e,t)=>{"delete"===e.type?(r.set(t,m),s.delete(t)):(a||"on-worker"!==e.type&&"invalid"!==e.type)&&(r.set(t,e),s.set(t,"invalid"===e.type?{type:"invalid",memory:e.memory}:{type:"on-worker",sourceLevel:e.sourceLevel,memory:e.memory}))});const o={simulationSettings:l,flowExtentInfo:e.flowExtentInfo,flowDataTiles:r,reset:a,needsMagnitude:i,startPositions:this.startPositions(e)};this._resetTileData=!1;const{streamlines:n}=await this.workerHandle.generateTiledStreamlines(o,t);return n}hasWork(){const e=!this.suspended&&super.loadRequirementsMet&&this.tilesIntersectDataBounds;return super.hasWork()||this._throttling||this._resetTileData&&e}get loadRequirementsMet(){return super.loadRequirementsMet&&(this._flowDataTiles.size>0||this._resetTileData)}_getLoadedState(e){const{_layerIndex:t}=this;if(null==t||e.isDisposed)return null;const s=e.getLayerInfo(t,1);if(null==s)return null;const i=this._getRasterTile(s,e,t);if(null==i)return this._upsampleFlowData(t,s.upsampleInfo,e.lij,e.extent);const l=this._createFlowDataTile(i,e.lij,e.extent,this._pixelSize);return{type:"loaded",memory:w(l),data:l,sourceLevel:e.level}}_upsampleFlowData(e,t,s,i){if(null==t)return null;const l=t.tile;if(null==l)return null;const a=l.getLayerInfo(e,1);if(null==a)return null;const r=this._getRasterTile(a,l,e);if(null==r)return null;const{scale:o,offset:n}=t,d=Math.max(Math.floor(this._pixelSize*o),1),h=r.source,u=Math.floor(n[0]*h.width),c=Math.floor((1-n[1]-o)*h.height),p=this._createFlowDataTile(r,s,i,d,u,c);return{type:"loaded",memory:w(p),data:p,sourceLevel:l.level}}_getRasterTile(e,t,s){const{data:i}=e;return!e.dataMissing&&t.hasLayerData(s,1)&&f(i)?i:null}_createFlowDataTile(e,t,s,i,l,a){const r=_(this.layer.serviceRasterInfo.dataType,e.source,i,i,l,a),o=r.mask.slice();return new p(r.data,o,r.width,r.height,t,n(s))}_applyTileDataUpdate(e){const{renderedTiles:t,_layerIndex:s,loadAllTiles:i,loadAllTilesLevel:l}=this;if(null==t||null==s||i&&e.level>l)return!1;if(t.has(e))return this._updateRenderedTile(e);const a=e.key;let r=this._setTileData(a,m);const o=this._updateUpsampledTiles(t,e,s);r||=o;const n=i&&this._updateDescendants(e,s);return r||=n,r}_updateRenderedTile(e){const t=e.key,{_flowDataTiles:s}=this;if(D(s.get(t),e))return!1;const i=this._getLoadedState(e);return this._setTileData(t,i)}_updateUpsampledTiles(e,t,s){const{_flowDataTiles:i}=this;let l=!1;for(const a of e.values()){const e=a.key;if(D(i.get(e),t))continue;const r=a.getLayerInfo(s,1);if(null==r)continue;if(null!=this._getRasterTile(r,a,s))continue;const o=r.upsampleInfo?.tile;if(o!==t)continue;const n=this._getLoadedState(a),d=this._setTileData(e,n);l||=d}return l}_updateDescendants(e,t){let s=!1;const{tilingScheme:i,upsampleInfoPool:l}=this.surface,{targetTiles:a,_flowDataTiles:r,loadAllTilesLevel:o}=this,n=e.lij,h=T(n,o).map(e=>[u(e[0],e[1],e[2]),e]).filter(([e])=>a.has(e));if(0===h.length)return s;const c=1<<o-n[0],p=1/c,f=n[1]*c,_=n[2]*c,m=l.acquire();for(const[u,T]of h){if(D(r.get(u),e))continue;const l=d();i.getExtent(T[0],T[1],T[2],l);const a=1-(T[1]-f)*p-p,o=(T[2]-_)*p;m.init(e,o,a,p);const n=this._upsampleFlowData(t,m,T,l),h=this._setTileData(u,n);s||=h}return l.release(m),s}_setTileData(e,t){if(null==t)return!1;const{_flowDataTiles:s}=this;return(null!=s.get(e)||"delete"!==t.type)&&(s.set(e,t),!0)}_setFlowDataTiles(e){const t=this._flowDataTiles.size!==e.size||Array.from(e).some(([e,t])=>this._flowDataTiles.get(e)!==t);this._flowDataTiles=e,t&&(this._resetTileData=!0)}get _allTilesLoaded(){let e=0;for(const t of this._flowDataTiles.values()??[])"delete"!==t.type&&"invalid"!==t.type&&e++;return this.loadAllTiles?e===this.targetTiles.size:e===this.renderedTiles?.size}invalidateTileData(){const{_flowDataTiles:e}=this;for(const[t,s]of e.entries())"delete"!==s.type&&e.set(t,{type:"invalid",memory:s.memory})}get usedMemory(){let e=0;return this._flowDataTiles.forEach(t=>{"delete"!==t.type&&(e+=t.memory)}),super.usedMemory+e}get test(){return{...super.test,loadedTiles:this._flowDataTiles}}};function y(){return new Map}function D(e,t){return null!=e&&("loaded"===e.type||"on-worker"===e.type)&&e.sourceLevel>=t.level}function w(e){return e.width*e.height*9}e([r()],g.prototype,"_throttling",void 0),e([r()],g.prototype,"_resetTileData",void 0),g=e([o("esri.views.3d.support.flow.FlowSubViewTiles3D")],g);export{g as default};
2
+ import{__decorate as e}from"tslib";import{watch as t,syncAndInitial as s,when as i,sync as l}from"../../../../core/reactiveUtils.js";import{throttle as a}from"../../../../core/throttle.js";import{property as r,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{clone as n,create as d}from"../../../../geometry/support/aaBoundingRect.js";import h from"../../layers/FlowSubView3D.js";import{getFeatureTileId as u}from"../../layers/support/FeatureTileDescriptor.js";import{tilesWaitingTime as c}from"./constants.js";import{FlowDataTile as p}from"./loadUtils.js";import{isRasterTile as f}from"../../terrain/TerrainData.js";import{descendantsAtLevel as T}from"../../terrain/tileUtils.js";import{toFlowData as _}from"../../../support/flow/dataUtils.js";const m={type:"delete"};let g=class extends h{constructor(e){super(e),this._flowDataTiles=D(),this._throttling=!1,this._resetTileData=!0}initialize(){this.addHandles([this.surface.on("tile-data-changed",({tile:e,layerIndex:t,layerClass:s})=>{if(t!==this._layerIndex||1!==s)return;const i=this.frameTask.schedule(()=>{this._applyTileDataUpdate(e)&&this.triggerLoad()});this.updatingHandles.consumePromise(i)}),t(()=>this.renderedTiles,e=>{const t=this.frameTask.scheduleGenerator(this.loadAllTiles?t=>this._applyTileDataUpdates(e,t):t=>this._syncToTiles(e,t));this.updatingHandles.consumePromise(t)},s),i(()=>null!=this.renderedTiles&&null!=this.extent&&this.loadAllTiles,()=>{const e=this.frameTask.scheduleGenerator(e=>this._enterAllTilesMode(e));this.updatingHandles.consumePromise(e)},s),t(()=>this._pixelSize,()=>{this.invalidateTileData(),this._resetTileData=!0},l),this.layerView.on("data-changed",()=>{this.invalidateTileData(),this._resetTileData=!0})]),this._throttledTriggerLoad=a(()=>{super.triggerLoad(),this._throttling=!1},()=>this._throttling=!0,c,this),this.addHandles(this._throttledTriggerLoad)}clear(){super.clear(),this._resetTileData=!1}*_enterAllTilesMode(e){const{targetTiles:t,_flowDataTiles:s}=this,i=D();for(const[l,a]of s)t.has(l)&&i.set(l,a);this._setFlowDataTiles(i),e.madeProgress(),e.done&&(e=yield),yield*this._applyTileDataUpdates(new Set(this.surface.allTiles),e),this.triggerLoad()}*_syncToTiles(e,t){const s=D();for(const i of e??[]){const e=this._flowDataTiles.get(i.key),l=null==e||"delete"===e.type||"invalid"===e.type?this._getLoadedState(i):e;null!=l&&s.set(i.key,l),t.madeProgress(),t.done&&(t=yield)}this._setFlowDataTiles(s),this.triggerLoad()}*_applyTileDataUpdates(e,t){let s=!1;for(const i of e??[]){const e=this._applyTileDataUpdate(i);s||=e,t.madeProgress(),t.done&&(t=yield)}s&&this.triggerLoad()}abort(){super.abort(),this._throttling=!1}get _layerIndex(){return this.surface.getLayerIndexByUID(1,this.layerView.uid)}get _pixelSize(){return this.surface.tilingScheme.pixelSize}doRefresh(){this.invalidateTileData(),super.doRefresh()}triggerLoad(){const{_throttledTriggerLoad:e}=this;null!=e?this._allTilesLoaded?(e.hasPendingUpdates()||e(),e.forceUpdate()):e():super.triggerLoad()}async fetchDataAndGenerateStreamlines(e,t){const{_flowDataTiles:s,needsMagnitude:i}=this,l=this.getSimulationSettings(e);if(null==l)return;const a=this._resetTileData;if(!a&&0===s.size)return;const r=D();s.forEach((e,t)=>{"delete"===e.type?(r.set(t,m),s.delete(t)):(a||"on-worker"!==e.type&&"invalid"!==e.type)&&(r.set(t,e),s.set(t,"invalid"===e.type?{type:"invalid",memory:e.memory}:{type:"on-worker",sourceLevel:e.sourceLevel,memory:e.memory}))});const o={simulationSettings:l,flowExtentInfo:e.flowExtentInfo,flowDataTiles:r,reset:a,needsMagnitude:i,startPositions:this.startPositions(e)};this._resetTileData=!1;const{streamlines:n}=await this.workerHandle.generateTiledStreamlines(o,t);return n}hasWork(){const e=!this.suspended&&super.loadRequirementsMet&&this.tilesIntersectDataBounds;return super.hasWork()||this._throttling||this._resetTileData&&e}get loadRequirementsMet(){return super.loadRequirementsMet&&(this._flowDataTiles.size>0||this._resetTileData)}_getLoadedState(e){const{_layerIndex:t}=this;if(null==t||e.isDisposed)return null;const s=e.getLayerInfo(t,1);if(null==s)return null;const i=this._getRasterTile(s,e,t);if(null==i)return this._upsampleFlowData(t,s.upsampleInfo,e.lij,e.extent);const l=this._createFlowDataTile(i,e.lij,e.extent,this._pixelSize);return{type:"loaded",memory:v(l),data:l,sourceLevel:e.level}}_upsampleFlowData(e,t,s,i){if(null==t)return null;const l=t.tile;if(null==l)return null;const a=l.getLayerInfo(e,1);if(null==a)return null;const r=this._getRasterTile(a,l,e);if(null==r)return null;const{scale:o,offset:n}=t,d=Math.max(Math.floor(this._pixelSize*o),1),h=r.source,u=Math.floor(n[0]*h.width),c=Math.floor((1-n[1]-o)*h.height),p=this._createFlowDataTile(r,s,i,d,u,c);return{type:"loaded",memory:v(p),data:p,sourceLevel:l.level}}_getRasterTile(e,t,s){const{data:i}=e;return!e.dataMissing&&t.hasLayerData(s,1)&&f(i)?i:null}_createFlowDataTile(e,t,s,i,l,a){const r=_(this.layer.serviceRasterInfo.dataType,e.source,i,i,l,a),o=r.mask.slice();return new p(r.data,o,r.width,r.height,t,n(s))}_applyTileDataUpdate(e){const{renderedTiles:t,_layerIndex:s,loadAllTiles:i,loadAllTilesLevel:l}=this;if(null==t||null==s||i&&e.level>l)return!1;if(t.has(e))return this._updateRenderedTile(e);const a=e.key;let r=this._setTileData(a,m);const o=this._updateUpsampledTiles(t,e,s);r||=o;const n=i&&this._updateDescendants(e,s);return r||=n,r}_updateRenderedTile(e){const t=e.key,{_flowDataTiles:s}=this;if(w(s.get(t),e))return!1;const i=this._getLoadedState(e);return this._setTileData(t,i)}_updateUpsampledTiles(e,t,s){const{_flowDataTiles:i}=this;let l=!1;for(const a of e.values()){const e=a.key;if(w(i.get(e),t))continue;const r=a.getLayerInfo(s,1);if(null==r)continue;if(null!=this._getRasterTile(r,a,s))continue;const o=r.upsampleInfo?.tile;if(o!==t)continue;const n=this._getLoadedState(a),d=this._setTileData(e,n);l||=d}return l}_updateDescendants(e,t){let s=!1;const{tilingScheme:i,upsampleInfoPool:l}=this.surface,{targetTiles:a,_flowDataTiles:r,loadAllTilesLevel:o}=this,n=e.lij,h=T(n,o).map(e=>[u(e[0],e[1],e[2]),e]).filter(([e])=>a.has(e));if(0===h.length)return s;const c=1<<o-n[0],p=1/c,f=n[1]*c,_=n[2]*c,m=l.acquire();for(const[u,T]of h){if(w(r.get(u),e))continue;const l=d();i.getExtent(T[0],T[1],T[2],l);const a=1-(T[1]-f)*p-p,o=(T[2]-_)*p;m.init(e,o,a,p);const n=this._upsampleFlowData(t,m,T,l),h=this._setTileData(u,n);s||=h}return l.release(m),s}_setTileData(e,t){if(null==t)return!1;const{_flowDataTiles:s}=this;return(null!=s.get(e)||"delete"!==t.type)&&(s.set(e,t),!0)}_setFlowDataTiles(e){const t=this._flowDataTiles.size!==e.size||Array.from(e).some(([e,t])=>this._flowDataTiles.get(e)!==t);this._flowDataTiles=e,t&&(this._resetTileData=!0)}get _allTilesLoaded(){let e=0;for(const t of this._flowDataTiles.values()??[])"delete"!==t.type&&"invalid"!==t.type&&e++;return this.loadAllTiles?e===this.targetTiles.size:e===this.renderedTiles?.size}invalidateTileData(){const{_flowDataTiles:e}=this;for(const[t,s]of e.entries())"delete"!==s.type&&e.set(t,{type:"invalid",memory:s.memory})}get usedMemory(){let e=0;return this._flowDataTiles.forEach(t=>{"delete"!==t.type&&(e+=t.memory)}),super.usedMemory+e}get test(){return{...super.test,loadedTiles:this._flowDataTiles}}};e([r()],g.prototype,"_throttling",void 0),e([r()],g.prototype,"_resetTileData",void 0),g=e([o("esri.views.3d.support.flow.FlowSubViewTiles3D")],g);const y=g;function D(){return new Map}function w(e,t){return null!=e&&("loaded"===e.type||"on-worker"===e.type)&&e.sourceLevel>=t.level}function v(e){return e.width*e.height*9}export{y as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import t from"../../../core/Logger.js";import{lerp as e,clamp as i}from"../../../core/mathUtils.js";import{fromRotation as o,identity as n,rotateX as a,rotateY as r,rotateZ as l}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as s,lerp as m}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as u,create as g}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as d,lerp as f,normalize as h,scale as b,transformMat4 as p,add as y,copy as A}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as w,clone as v,create as x}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{S as M}from"../../../chunks/SunCalc.js";import{angle as N}from"./mathUtils.js";const T={local:{altitude:1500,ambientAtNight:.1,ambientAtNoon:.45,ambientAtTwilight:.2,directAtNoon:.65,directAtTwilight:.7},global:{altitude:8e5,ambient:.015,direct:.75},planarDirection:{localAltitude:1e4,globalAltitude:1e6,globalAngles:{azimuth:1.3*Math.PI,altitude:.6*Math.PI}}};class O{constructor(t,e){this.direct=t,this.ambient=e}}function S(t,o,n,a,r,l){d(l.ambient.color,1,1,1),l.ambient.intensity=T.global.ambient,d(l.direct.color,1,1,1),l.direct.intensity=T.global.direct;const c=o[2],s=i((Math.abs(c)-T.local.altitude)/(T.global.altitude-T.local.altitude),0,1);let m;if(l.globalFactor=s,null!=t&&(m=M.getTimes(t,o[1],o[0])),s<1){let i;if(null!=t)i=ot(t,m,a);else{const t=R(a);i={direct:{intensity:T.local.directAtNoon*t.direct,color:w(1,1,1)},ambient:{intensity:T.local.ambientAtNoon*t.ambient,color:w(1,1,1)},timeOfDay:"early afternoon"}}f(l.ambient.color,i.ambient.color,l.ambient.color,s),l.ambient.intensity=e(i.ambient.intensity,l.ambient.intensity,s),f(l.direct.color,i.direct.color,l.direct.color,s),l.direct.intensity=e(i.direct.intensity,l.direct.intensity,s),l.specularStrength="rainy"===a||"snowy"===a||"foggy"===a?0:1,l.environmentStrength="rainy"===a?.7:"snowy"===a||"foggy"===a?.75:1}l.noonFactor=null!=t?F(t,m):1,null!=t?P(t,o,n,l.direct.directionToLightSource):j(r,n,l.direct.directionToLightSource)}function j(t,e,i){1===e?h(rt,t.eye):d(rt,0,0,1),b(lt,t.viewForward,-1);const n=N(lt,rt),a=Math.max(n-2*st,0),r=.85*a/(a+1),l=Math.max(st,n-st-r);o(at,-l,t.viewRight),p(i,lt,at),y(i,i,b(ct,t.viewRight,mt)),h(i,i)}function P(t,e,o,c){const s=H,m=n(L);if(1===o)M.getPosition(t,0,0,s),d(c,0,0,-1),a(m,m,-s.azimuth),r(m,m,-s.altitude),p(c,c,m);else{const o=T.planarDirection,n=o.globalAngles,r=e[2];let u=(Math.abs(r)-o.localAltitude)/(o.globalAltitude-o.localAltitude);u=i(u,0,1),u<1?(M.getPosition(t,e[1],e[0],s),s.azimuth=(1-u)*s.azimuth+u*n.azimuth,s.altitude=(1-u)*s.altitude+u*n.altitude):(s.azimuth=n.azimuth,s.altitude=n.altitude),d(c,0,-1,0),l(m,m,-s.azimuth),a(m,m,-s.altitude),p(c,c,m)}}function z(t,e){if(1===e)return!0;const i=T.planarDirection;return Math.abs(t)<i.localAltitude}function D(e,i,o,n,a,r){const l=e.getTime(),c=Math.max(0,i.getTime()-l),s=Math.floor(c/o)+1,m=Math.min(r,s),u=new Array(m),g=1===m?0:c/(m-1);s>m&&t.getLogger("esri.views.3d.support.sunUtils").warnOnce("computeDirectionsOverTime",`Requested interval ${o} exceeds maximum supported interval of ${Math.floor(g)} based on the provided time range.`);for(let t=0;t<m;++t)nt.setTime(l+g*t),u[t]=x(),P(nt,n,a,u[t]);return u}const E=w(.5773502691896258,-.5773502691896258,.5773502691896258);class I{constructor(){this.ambient={color:w(1,1,1),intensity:.55},this.direct={color:w(1,1,1),intensity:.55,directionToLightSource:v(E)},this.noonFactor=.5,this.globalFactor=0,this.specularStrength=1,this.environmentStrength=1}}const L=c(),H={azimuth:0,altitude:0};function F(t,e){const o=t.valueOf();let n,a;e.polarException===M.PolarException.MIDNIGHT_SUN?(n=o-60*(t.getHours()+48)*60*1e3-60*t.getMinutes()*1e3,a=n+432e6):e.polarException===M.PolarException.POLAR_NIGHT?(n=o-2,a=o-1):(n=e.sunrise.valueOf(),a=e.sunset.valueOf());const r=n+(a-n)/2;return 1-i(Math.abs(o-r)/432e5,0,1)}function R(t){switch(t){case"disabled":case"sunny":case"cloudy":return new O(1,1);case"rainy":return new O(.4,1.2);case"snowy":return new O(.5,1.3);case"foggy":return new O(.2,1.6)}}function U(t,e){const i=(t[0]+t[1]+t[2])/3;t[0]+=(i-t[0])*e,t[1]+=(i-t[1])*e,t[2]+=(i-t[2])*e}const G=w(.01,.01,.01),_=w(1,.6,.5),k=w(1,.98,.98),$=w(1,1,1),q=w(.8,.8,1),C=w(.8,.8,1),V=w(.98,.98,1),B=w(1,1,1),J=u(.01,T.local.ambientAtNight),K=u(T.local.directAtTwilight,T.local.ambientAtTwilight),Q=u(.9*T.local.directAtNoon,T.local.ambientAtNoon),W=u(T.local.directAtNoon,T.local.ambientAtNoon),X=Q,Y=k,Z=V,tt=K,et=_,it=C;function ot(t,e,i){const o=t.valueOf();let n,a;e.polarException===M.PolarException.MIDNIGHT_SUN?(n=o-60*(t.getHours()+48)*60*1e3-60*t.getMinutes()*1e3,a=n+432e6):e.polarException===M.PolarException.POLAR_NIGHT?(n=o-2,a=o-1):(n=e.sunrise.valueOf(),a=e.sunset.valueOf());const r=a-n,l=n+r/2,c=r/4,u=l-c,d=l+c,h=.06*r,b=n-h/2,p=n+h/2,y=a-h/2,w=a+h/2,v=g(),N=x(),T=x();let O="";if(o<b||o>w)s(v,J),A(N,G),A(T,q),O="night";else if(o<p){const t=(o-b)/(p-b);m(v,J,K,t),f(N,G,_,t),f(T,q,C,t),O="sun rising"}else if(o<u){const t=(o-p)/(u-p);m(v,K,Q,t),f(N,_,k,t),f(T,C,V,t),O="early morning"}else if(o<l){const t=(o-u)/(l-u);m(v,Q,W,t),f(N,k,$,t),f(T,V,B,t),O="late morning"}else if(o<d){const t=(o-l)/(d-l);m(v,W,X,t),f(N,$,Y,t),f(T,B,Z,t),O="early afternoon"}else if(o<y){const t=(o-d)/(y-d);m(v,X,tt,t),f(N,Y,et,t),f(T,Z,it,t),O="late afternoon"}else if(o<w){const t=(o-y)/(w-y);m(v,tt,J,t),f(N,et,G,t),f(T,it,q,t),O="sun setting"}let S=0;switch(i){case"rainy":case"foggy":S=.8;break;case"snowy":S=.5}S>0&&(U(N,S),U(T,S));const j=R(i);return{direct:{intensity:v[0]*j.direct,color:N},ambient:{intensity:v[1]*j.ambient,color:T},timeOfDay:O}}const nt=new Date(0),at=c(),rt=x(),lt=x(),ct=x(),st=.25,mt=.2;export{I as ColorAndIntensity,S as computeColorAndIntensity,D as computeDirectionsOverTime,z as computeShadowsEnabled,j as computeVirtualLightDirection};
2
+ import t from"../../../core/Logger.js";import{lerp as e,clamp as i}from"../../../core/mathUtils.js";import{identity as o,rotateX as n,rotateY as a,rotateZ as r,fromRotation as l}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as s,lerp as m}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as u,create as g}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as d,transformMat4 as f,lerp as h,normalize as b,scale as p,add as y,copy as A}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as w,fromValues as v,clone as x}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{S as M}from"../../../chunks/SunCalc.js";import{angle as N}from"./mathUtils.js";const T={local:{altitude:1500,ambientAtNight:.1,ambientAtNoon:.45,ambientAtTwilight:.2,directAtNoon:.65,directAtTwilight:.7},global:{altitude:8e5,ambient:.015,direct:.75},planarDirection:{localAltitude:1e4,globalAltitude:1e6,globalAngles:{azimuth:1.3*Math.PI,altitude:.6*Math.PI}}};class O{constructor(t,e){this.direct=t,this.ambient=e}}function S(t,o,n,a,r,l){d(l.ambient.color,1,1,1),l.ambient.intensity=T.global.ambient,d(l.direct.color,1,1,1),l.direct.intensity=T.global.direct;const c=o[2],s=i((Math.abs(c)-T.local.altitude)/(T.global.altitude-T.local.altitude),0,1);let m;if(l.globalFactor=s,null!=t&&(m=M.getTimes(t,o[1],o[0])),s<1){let i;if(null!=t)i=ot(t,m,a);else{const t=R(a);i={direct:{intensity:T.local.directAtNoon*t.direct,color:v(1,1,1)},ambient:{intensity:T.local.ambientAtNoon*t.ambient,color:v(1,1,1)},timeOfDay:"early afternoon"}}h(l.ambient.color,i.ambient.color,l.ambient.color,s),l.ambient.intensity=e(i.ambient.intensity,l.ambient.intensity,s),h(l.direct.color,i.direct.color,l.direct.color,s),l.direct.intensity=e(i.direct.intensity,l.direct.intensity,s),l.specularStrength="rainy"===a||"snowy"===a||"foggy"===a?0:1,l.environmentStrength="rainy"===a?.7:"snowy"===a||"foggy"===a?.75:1}l.noonFactor=null!=t?F(t,m):1,null!=t?P(t,o,n,l.direct.directionToLightSource):j(r,n,l.direct.directionToLightSource)}function j(t,e,i){1===e?b(rt,t.eye):d(rt,0,0,1),p(lt,t.viewForward,-1);const o=N(lt,rt),n=Math.max(o-2*st,0),a=.85*n/(n+1),r=Math.max(st,o-st-a);l(at,-r,t.viewRight),f(i,lt,at),y(i,i,p(ct,t.viewRight,mt)),b(i,i)}function P(t,e,l,c){const s=H,m=o(L);if(1===l)M.getPosition(t,0,0,s),d(c,0,0,-1),n(m,m,-s.azimuth),a(m,m,-s.altitude),f(c,c,m);else{const o=T.planarDirection,a=o.globalAngles,l=e[2];let u=(Math.abs(l)-o.localAltitude)/(o.globalAltitude-o.localAltitude);u=i(u,0,1),u<1?(M.getPosition(t,e[1],e[0],s),s.azimuth=(1-u)*s.azimuth+u*a.azimuth,s.altitude=(1-u)*s.altitude+u*a.altitude):(s.azimuth=a.azimuth,s.altitude=a.altitude),d(c,0,-1,0),r(m,m,-s.azimuth),n(m,m,-s.altitude),f(c,c,m)}}function z(t,e){if(1===e)return!0;const i=T.planarDirection;return Math.abs(t)<i.localAltitude}function D(e,i,o,n,a,r){const l=e.getTime(),c=Math.max(0,i.getTime()-l),s=Math.floor(c/o)+1,m=Math.min(r,s),u=new Array(m),g=1===m?0:c/(m-1);s>m&&t.getLogger("esri.views.3d.support.sunUtils").warnOnce("computeDirectionsOverTime",`Requested interval ${o} exceeds maximum supported interval of ${Math.floor(g)} based on the provided time range.`);for(let t=0;t<m;++t)nt.setTime(l+g*t),u[t]=w(),P(nt,n,a,u[t]);return u}const E=v(.5773502691896258,-.5773502691896258,.5773502691896258);class I{constructor(){this.ambient={color:v(1,1,1),intensity:.55},this.direct={color:v(1,1,1),intensity:.55,directionToLightSource:x(E)},this.noonFactor=.5,this.globalFactor=0,this.specularStrength=1,this.environmentStrength=1}}const L=c(),H={azimuth:0,altitude:0};function F(t,e){const o=t.valueOf();let n,a;e.polarException===M.PolarException.MIDNIGHT_SUN?(n=o-60*(t.getHours()+48)*60*1e3-60*t.getMinutes()*1e3,a=n+432e6):e.polarException===M.PolarException.POLAR_NIGHT?(n=o-2,a=o-1):(n=e.sunrise.valueOf(),a=e.sunset.valueOf());const r=n+(a-n)/2;return 1-i(Math.abs(o-r)/432e5,0,1)}function R(t){switch(t){case"disabled":case"sunny":case"cloudy":return new O(1,1);case"rainy":return new O(.4,1.2);case"snowy":return new O(.5,1.3);case"foggy":return new O(.2,1.6)}}function U(t,e){const i=(t[0]+t[1]+t[2])/3;t[0]+=(i-t[0])*e,t[1]+=(i-t[1])*e,t[2]+=(i-t[2])*e}const G=v(.01,.01,.01),_=v(1,.6,.5),k=v(1,.98,.98),$=v(1,1,1),q=v(.8,.8,1),C=v(.8,.8,1),V=v(.98,.98,1),B=v(1,1,1),J=u(.01,T.local.ambientAtNight),K=u(T.local.directAtTwilight,T.local.ambientAtTwilight),Q=u(.9*T.local.directAtNoon,T.local.ambientAtNoon),W=u(T.local.directAtNoon,T.local.ambientAtNoon),X=Q,Y=k,Z=V,tt=K,et=_,it=C;function ot(t,e,i){const o=t.valueOf();let n,a;e.polarException===M.PolarException.MIDNIGHT_SUN?(n=o-60*(t.getHours()+48)*60*1e3-60*t.getMinutes()*1e3,a=n+432e6):e.polarException===M.PolarException.POLAR_NIGHT?(n=o-2,a=o-1):(n=e.sunrise.valueOf(),a=e.sunset.valueOf());const r=a-n,l=n+r/2,c=r/4,u=l-c,d=l+c,f=.06*r,b=n-f/2,p=n+f/2,y=a-f/2,v=a+f/2,x=g(),N=w(),T=w();let O="";if(o<b||o>v)s(x,J),A(N,G),A(T,q),O="night";else if(o<p){const t=(o-b)/(p-b);m(x,J,K,t),h(N,G,_,t),h(T,q,C,t),O="sun rising"}else if(o<u){const t=(o-p)/(u-p);m(x,K,Q,t),h(N,_,k,t),h(T,C,V,t),O="early morning"}else if(o<l){const t=(o-u)/(l-u);m(x,Q,W,t),h(N,k,$,t),h(T,V,B,t),O="late morning"}else if(o<d){const t=(o-l)/(d-l);m(x,W,X,t),h(N,$,Y,t),h(T,B,Z,t),O="early afternoon"}else if(o<y){const t=(o-d)/(y-d);m(x,X,tt,t),h(N,Y,et,t),h(T,Z,it,t),O="late afternoon"}else if(o<v){const t=(o-y)/(v-y);m(x,tt,J,t),h(N,et,G,t),h(T,it,q,t),O="sun setting"}let S=0;switch(i){case"rainy":case"foggy":S=.8;break;case"snowy":S=.5}S>0&&(U(N,S),U(T,S));const j=R(i);return{direct:{intensity:x[0]*j.direct,color:N},ambient:{intensity:x[1]*j.ambient,color:T},timeOfDay:O}}const nt=new Date(0),at=c(),rt=w(),lt=w(),ct=w(),st=.25,mt=.2;export{I as ColorAndIntensity,S as computeColorAndIntensity,D as computeDirectionsOverTime,z as computeShadowsEnabled,j as computeVirtualLightDirection};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{unique as r}from"../../../core/arrayUtils.js";import{EventEmitter as t}from"../../../core/Evented.js";import"../../../core/has.js";import{someMap as s,everyMap as i}from"../../../core/MapUtils.js";import{disposeMaybe as n}from"../../../core/maybe.js";import o from"../../../core/PooledArray.js";import{watch as a,syncAndInitial as h,on as d,initial as l}from"../../../core/reactiveUtils.js";import{someSet as c}from"../../../core/SetUtils.js";import{property as u,subclass as p}from"../../../core/accessorSupport/decorators.js";import{ortho as _,fromTranslation as g}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{set as m}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ones as y}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{debugFlags as f}from"../support/debugFlags.js";import{Overlay as R}from"./Overlay.js";import{OverlayRenderTargets as v}from"./OverlayRenderTargets.js";import w from"../webgl/RenderCamera.js";import{SyncRenderPlugin as x}from"../webgl-engine/effects/RenderPlugin.js";import{trackHighlightOptions as T,renderHighlightBuffer as b}from"../webgl-engine/effects/highlight/Highlight.js";import{GLMaterialRepository as S}from"../webgl-engine/lib/GLMaterialRepository.js";import{GridLocalOriginFactory as O}from"../webgl-engine/lib/GridLocalOriginFactory.js";import{RenderContext as D,defaultRenderOccludedMask as C}from"../webgl-engine/lib/RenderContext.js";import{ShadowMap as P}from"../webgl-engine/lib/ShadowMap.js";import{a as j}from"../../../chunks/Texture.glsl.js";import{TextureTechnique as E}from"../webgl-engine/lib/TextureTechnique.js";import{TextureTechniqueConfiguration as F}from"../webgl-engine/lib/TextureTechniqueConfiguration.js";import{AmbientLight as M}from"../webgl-engine/lighting/Lightsources.js";import{a as W}from"../../../chunks/OverlayCompositing.glsl.js";import{OverlayCompositingTechnique as V}from"../webgl-engine/shaders/OverlayCompositingTechnique.js";import{TaskPriority as q}from"../../support/Scheduler.js";import A from"../../webgl/Texture.js";import{TextureDescriptor as G}from"../../webgl/TextureDescriptor.js";let k=class extends x{constructor(e){super(e),this._overlays=null,this._renderTargets=null,this._overlayParameters=new W,this.hasHighlights=!1,this.renderOccludedFlags=1,this._hasWater=!1,this._renderers=new Map,this._sortedDrapeSourceRenderersDirty=!1,this._sortedRenderers=new o,this._passParameters=new j,this._screenToWorldRatio=1,this._localOriginFactory=null,this.unloadedMemory=0,this.ignoresMemoryFactor=!1,this._camera=new w,this.events=new t,this.longitudeCyclical=null,this.produces=new Map([[18,e=>10!==e||this.hasHighlights],[19,()=>this._hasWater]]),this._hasTargetWithoutRasterImage=!1,this._hasDrapedFeatureSource=!1,this._hasDrapedRasterSource=!1,this._hasDrapedFlowSource=!1;const{state:r,stage:s}=e.parent.view,i=s.renderer.fboCache,n=s.renderView.renderingContext,a=s.renderView.techniques;this._renderContext=new D(n,new P(i,r.viewingMode),a)}initialize(){const e=this._view,r=e.stage.renderView.waterTextures;this.addHandles([a(()=>r.updating,()=>this.events.emit("content-changed"),h),a(()=>this._spatialReference,e=>this._localOriginFactory=new O(e),h),d(()=>e.allLayerViews,"after-changes",()=>this._sortedDrapeSourceRenderersDirty=!0),a(()=>T(e.state.highlights),()=>this._sortedDrapeSourceRenderersDirty=!0,l),a(()=>e.state.highlights,e=>{this._bindParameters.highlights=e},l),e.resourceController.scheduler.registerTask(q.OVERLAY_RENDERER,this)]);const t=this._camera;t.near=1,t.far=1e4,t.relativeElevation=null,this._bindParameters.slot=18,this._bindParameters.camera=t,this._bindParameters.updateLighting(new M(y()),0,0,0)}destroy(){this._renderers.forEach(e=>e.destroy()),this._renderers.clear(),this._passParameters.texture=n(this._passParameters.texture),this.disposeOverlays(),this._renderContext.destroy(),this._sortedRenderers.prune()}get _bindParameters(){return this._renderContext.bind}get _rctx(){return this._stage.renderView.renderingContext}get _view(){return this.parent.view}get _stage(){return this.parent.view.stage}get _spatialReference(){return this.parent.spatialReference}get _techniques(){return this._stage.renderView.techniques}get rctx(){return this._rctx}get materials(){return this._pluginContext.materials}get screenToWorldRatio(){return this._screenToWorldRatio}get localOriginFactory(){return this._localOriginFactory}set time(e){this._renderContext.time=e}get pluginContext(){return this._pluginContext}initializeRenderContext(e){const r=new S(this._view.stage.renderView.textures,this._techniques,()=>{this._onMaterialOrContentChanged(),this.events.emit("content-changed"),this.notifyChange("updating"),this.notifyChange("isEmpty")},()=>this.events.emit("content-changed"));this._pluginContext={...e,materials:r},this._techniques.precompile(V)}uninitializeRenderContext(){}acquireTechniques(){return[]}render(){}get updating(){return this._sortedDrapeSourceRenderersDirty||s(this._renderers,e=>e.updating||e.canCompact)}get hasOverlays(){return null!=this._overlays&&null!=this._renderTargets}getMaterialRenderer(e){for(const r of this._renderers.values()){const t=r.getMaterialRenderer(e);if(t)return t}return null}get layers(){return this._sortedDrapeSourceRenderersDirty&&this._updateSortedDrapeSourceRenderers(),r(this._sortedRenderers.map(e=>e.drapeSource.layer).filter(e=>!!e))}registerDrapeSource(e,r){const t=this._renderers.get(e);null!=t&&t.destroy(),this._renderers.set(e,r),this._sortedDrapeSourceRenderersDirty=!0,"fullOpacity"in e&&this.addHandles(a(()=>e.fullOpacity,()=>this.events.emit("content-changed")),e)}removeDrapeSourceRenderer(e){if(null==e)return;const r=this._renderers.get(e);null!=r&&(this._sortedDrapeSourceRenderersDirty=!0,this._renderers.delete(e),this.removeHandles(e),r.destroy())}computeValidity(){return this._renderTargets?.computeValidity()??0}releaseRenderTargets(e){this._renderTargets?.dispose(e)}get overlays(){return this._overlays??[]}ensureDrapeTargets(e){this._hasTargetWithoutRasterImage=!!this._overlays&&c(e,e=>1===e.drapeTargetType)}ensureDrapeSources(e){this._overlays?(this._hasDrapedFeatureSource=c(e,e=>1===e.drapeSourceType),this._hasDrapedRasterSource=c(e,e=>0===e.drapeSourceType),this._hasDrapedFlowSource=c(e,e=>2===e.drapeSourceType)):this._hasDrapedFeatureSource=this._hasDrapedRasterSource=this._hasDrapedFlowSource=!1}get _needsColorWithoutRasterImage(){return this._hasDrapedRasterSource&&this._hasDrapedFeatureSource&&this._hasTargetWithoutRasterImage}ensureOverlays(e,r,t=this._bindParameters.overlayStretch){null==this._overlays&&(this._renderTargets=new v(this._stage.renderer.fboCache),this._overlays=[new R,new R]),this.ensureDrapeTargets(e),this.ensureDrapeSources(r),this._bindParameters.overlayStretch=t}disposeOverlays(){this._overlays=null,this._renderTargets?.dispose(1),this._renderTargets=null,this.events.emit("textures-disposed")}_useOverlayColorInsteadOfColorNoRasterImage(e){return 1===e&&!this._needsColorWithoutRasterImage&&this._hasDrapedFeatureSource}getTexture(e){const r=this._useOverlayColorInsteadOfColorNoRasterImage(e);return this._renderTargets?.getTexture(r?0:e)}get readyToRun(){return this.updating}runTask(e){this._processDrapeSources(()=>!0,e)}_onMaterialOrContentChanged(){this.renderOccludedFlags=s(this._renderers,e=>e.hasOccluders)?H:1}_processDrapeSources(e,r){let t=!1;for(const[s,i]of this._renderers){if(r?.done)break;(s.destroyed||e(s))&&(i.commitChanges()&&(t=!0,r?.madeProgress()))}this._sortedDrapeSourceRenderersDirty&&(this._sortedDrapeSourceRenderersDirty=!1,t=!0,this._updateSortedDrapeSourceRenderers(),r?.madeProgress()),r&&this.compact(r),t&&(null!=this._overlays&&0===this._renderers.size&&this.disposeOverlays(),this.notifyChange("updating"),this.notifyChange("isEmpty"),this._onMaterialOrContentChanged(),this.hasHighlights=s(this._renderers,e=>e.hasHighlights),this.events.emit("content-changed"))}compact(e){let r=!1;for(const t of this._renderers.values()){if(e.done)break;r=t.compact(e)||r}return r&&this.notifyChange("updating"),r}hasHighlight(e){return s(this._renderers,r=>r.hasHighlight(e))}processSyncDrapeSources(){this._processDrapeSources(e=>1===e.updatePolicy)}get isEmpty(){return!f.OVERLAY_DRAW_DEBUG_TEXTURE&&i(this._renderers,e=>e.isEmpty)}get hasWater(){const e=s(this._renderers,({hasWater:e})=>e);return e!==this._hasWater&&(this._hasWater=e,this.events.emit("has-water")),this._hasWater}renders(e){if(f.OVERLAY_DRAW_DEBUG_TEXTURE&&4!==e&&2!==e)return!0;if(!this._overlays)return!1;const r=this._overlays[0];for(const i of this._overlays)i.setupGeometryViews(this.longitudeCyclical);if(!r.hasSomeSizedView())return!1;const t=this._setOutput(this._renderTargets?.targets.find(r=>r.content===e)?.output??0);++this._techniques.precompiling;const s=this._sortedRenderers.some(({renderer:e})=>e.precompile(this._renderContext));return--this._techniques.precompiling,this._setOutput(t),s}_setOutput(e){const r=this._bindParameters.output;return this._bindParameters.output=e,this._bindParameters.slot=4===e?19:18,r}get mode(){return this.isEmpty?0:this.hasWater&&this.renders(3)?2:this._renderTargets?.getTexture(0)?1:0}updateAnimation(e){let r=!1;return this._renderers.forEach(t=>r=t.updateAnimation(e)||r),r&&this.parent.requestRender(0),r}updateDrapeSourceOrder(){this._sortedDrapeSourceRenderersDirty=!0}precompileShaders(e){if(!this._overlays||!this._renderTargets)return!1;const r=this._bindParameters;r.alignPixelEnabled=e.alignPixelEnabled,++this._techniques.precompiling;for(const t of this._renderTargets.targets){if(1===t.content&&!this._needsColorWithoutRasterImage)continue;const{output:e}=t;this._setOutput(e),10===e&&(r.highlightMixTexture=r.highlights.length>1?this._rctx.emptyTexture:null);const s=this._renderContext.renderOccludedMask;4===t.content&&(this._renderContext.renderOccludedMask=H),this._sortedRenderers.forAll(({drapeSource:e,renderer:r})=>{1===t.content&&0===e.drapeSourceType||4===t.content&&r.hasOnlyOccluders||r.precompile(this._renderContext)}),this._renderContext.renderOccludedMask=s,r.highlightMixTexture=null}return--this._techniques.precompiling,!0}drawOverlays(e,r){if(!this._overlays||!this._renderTargets)return;for(const s of this._overlays)s.setupGeometryViews(this.longitudeCyclical);this._bindParameters.alignPixelEnabled=e.alignPixelEnabled;const t=this.allSourcesOccluders;for(const s of this._renderTargets.targets){if(!(0===s.content&&this._hasDrapedFlowSource)&&!s.handleRenderRequest(r)||1===s.content&&!this._needsColorWithoutRasterImage||4===s.content&&t)continue;const e=this._drawTarget(0,s),i=this._drawTarget(1,s);(e||i)&&s.fbo.generateMipMap()}}_drawTarget(e,r){const t=this._overlays[e],s=t.canvasGeometries;if(0===s.numViews)return!1;const i=this._view.state.contentPixelRatio;this._screenToWorldRatio=i*t.mapUnitsPerPixel/this._bindParameters.overlayStretch;const{output:n,content:o}=r;if(this.isEmpty||4===n&&!this.hasWater||!t.hasSomeSizedView())return!1;const{_rctx:a,_camera:h,_renderContext:d,_bindParameters:l}=this;if(h.pixelRatio=t.pixelRatio*i,this._setOutput(n),l.screenToWorldRatio=this._screenToWorldRatio,l.screenToPCSRatio=this._screenToWorldRatio*this.parent.worldToPCSRatio,4===o&&(d.renderOccludedMask=H),!this.renders(o))return d.renderOccludedMask=C,!1;const{resolution:c}=t,u=0===e,p=u?0:c;a.setViewport(p,0,c,c),this._bindTargetFBO(r),u&&(10===n?a.gl.clearBufferuiv(a.gl.COLOR,0,[0,0,0,0]):(a.setClearColor(0,0,0,0),a.clear(16384)));if(f.OVERLAY_DRAW_DEBUG_TEXTURE&&4!==o&&2!==o){this._techniques.precompile(E,L);const r=this._techniques.get(E,L);for(let i=0;i<s.numViews;i++)this._setViewParameters(s.extents[i],t),this._ensureDebugPatternResources(t.resolution,U[e]),a.bindTechnique(r,l,this._passParameters),a.screen.draw()}if(10===n){const{fboCache:t}=this._stage.renderer,s=this._resolution;this._bindTargetFBO(r),b(a,t,s,s,l,()=>this._renderAllGeometry(e,r),p)}else this._renderAllGeometry(e,r);return a.bindFramebuffer(null),d.renderOccludedMask=C,!0}get allSourcesOccluders(){return i(this._renderers,e=>e.hasOnlyOccluders)}_renderAllGeometry(e,r){const t=this._overlays[e],s=t.canvasGeometries;this._sortedRenderers.forAll(({drapeSource:i,renderer:n})=>{if(1===r.content&&0===i.drapeSourceType)return;const{fullOpacity:o}=i,a=null!=o&&o<1&&0===r.output&&this._bindTemporaryFBO();for(let e=0;e<s.numViews;e++)this._setViewParameters(s.extents[e],t),n.render(this._renderContext);if(a){this._bindTargetFBO(r),this._overlayParameters.texture=a.getTexture(),this._overlayParameters.opacity=o,this._overlayParameters.overlayIndex=e;const t=this._techniques.get(V);this._rctx.bindTechnique(t,this._bindParameters,this._overlayParameters),this._rctx.screen.draw(),a.release()}})}_bindTargetFBO(e){const r=this._resolution,t=2*r;e.fbo.ensureFramebuffer(t,r),e.fbo.bind(this._rctx)}_bindTemporaryFBO(){const e=this._resolution,r=2*e,t=this._stage.renderer.fboCache,s=t.acquire(r,e,"overlay tmp");return t.rctx.bindFramebuffer(s.fbo),t.rctx.clear(16384),s}get _resolution(){return this._overlays?.[0].resolution??0}notifyContentChanged(){this.events.emit("content-changed")}intersect(e,r,t,s){this._sortedDrapeSourceRenderersDirty&&this._updateSortedDrapeSourceRenderers();let i=0;for(const{renderer:n}of this._sortedRenderers)i=n.intersect?.(e,r,t,s,i)??i}_updateSortedDrapeSourceRenderers(){if(this._sortedRenderers.clear(),0===this._renderers.size)return;const e=this._view.map.allLayers.map(e=>e.uid),r=e.length;this._renderers.forEach((t,s)=>{const i=e.indexOf(s.layer?.uid),n=i>=0,o=s.renderGroup??(n?0:1),a=s.drapeSourcePriorityOffset??0,h=r*o+(n?i:0)+a;this._sortedRenderers.push(new I(s,t,h))}),this._sortedRenderers.sort((e,r)=>e.index-r.index)}_setViewParameters(e,r){const t=this._camera;t.viewport=[0,0,r.resolution,r.resolution],_(t.projectionMatrix,0,e[2]-e[0],0,e[3]-e[1],t.near,t.far),g(t.viewMatrix,[-e[0],-e[1],0])}_ensureDebugPatternResources(e,r){if(m(this._passParameters.color,r[0],r[1],r[2]),this._passParameters.texture)return;const t=new Uint8Array(e*e*4);let s=0;for(let n=0;n<e;n++)for(let r=0;r<e;r++){const i=Math.floor(r/10),o=Math.floor(n/10);i<2||o<2||10*i>e-20||10*o>e-20?(t[s++]=255,t[s++]=255,t[s++]=255,t[s++]=255):(t[s++]=255,t[s++]=255,t[s++]=255,t[s++]=1&i&&1&o?1&r^1&n?0:255:1&i^1&o?0:128)}const i=new G(e);i.samplingMode=9728,this._passParameters.texture=new A(this._rctx,i,t)}get test(){}};e([u()],k.prototype,"hasHighlights",void 0),e([u()],k.prototype,"renderOccludedFlags",void 0),e([u()],k.prototype,"_sortedDrapeSourceRenderersDirty",void 0),e([u({constructOnly:!0})],k.prototype,"parent",void 0),e([u({readOnly:!0})],k.prototype,"_techniques",null),e([u({type:Boolean,readOnly:!0})],k.prototype,"updating",null),e([u()],k.prototype,"isEmpty",null),k=e([p("esri.views.3d.terrain.OverlayRenderer")],k);class I{constructor(e,r,t){this.drapeSource=e,this.renderer=r,this.index=t}}const U=[[1,.5,.5],[.5,.5,1]],B=-2,H=4,L=new F;L.hasAlpha=!0;export{k as OverlayRenderer,B as drapedZ,H as overlayRenderOccludedFlag};
2
+ import{__decorate as e}from"tslib";import{unique as r}from"../../../core/arrayUtils.js";import{EventEmitter as t}from"../../../core/Evented.js";import"../../../core/has.js";import{someMap as s,everyMap as i}from"../../../core/MapUtils.js";import{disposeMaybe as n}from"../../../core/maybe.js";import o from"../../../core/PooledArray.js";import{watch as a,syncAndInitial as h,on as d,initial as l}from"../../../core/reactiveUtils.js";import{someSet as c}from"../../../core/SetUtils.js";import{property as u,subclass as p}from"../../../core/accessorSupport/decorators.js";import{ortho as _,fromTranslation as g}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{set as m}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ones as y}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{debugFlags as f}from"../support/debugFlags.js";import{Overlay as R}from"./Overlay.js";import{OverlayRenderTargets as v}from"./OverlayRenderTargets.js";import w from"../webgl/RenderCamera.js";import{SyncRenderPlugin as x}from"../webgl-engine/effects/RenderPlugin.js";import{trackHighlightOptions as T,renderHighlightBuffer as b}from"../webgl-engine/effects/highlight/Highlight.js";import{GLMaterialRepository as S}from"../webgl-engine/lib/GLMaterialRepository.js";import{GridLocalOriginFactory as O}from"../webgl-engine/lib/GridLocalOriginFactory.js";import{RenderContext as D,defaultRenderOccludedMask as C}from"../webgl-engine/lib/RenderContext.js";import{ShadowMap as P}from"../webgl-engine/lib/ShadowMap.js";import{T as j}from"../../../chunks/Texture.glsl.js";import{TextureTechnique as E}from"../webgl-engine/lib/TextureTechnique.js";import{TextureTechniqueConfiguration as F}from"../webgl-engine/lib/TextureTechniqueConfiguration.js";import{AmbientLight as M}from"../webgl-engine/lighting/Lightsources.js";import{O as W}from"../../../chunks/OverlayCompositing.glsl.js";import{OverlayCompositingTechnique as V}from"../webgl-engine/shaders/OverlayCompositingTechnique.js";import{TaskPriority as q}from"../../support/Scheduler.js";import A from"../../webgl/Texture.js";import{TextureDescriptor as G}from"../../webgl/TextureDescriptor.js";let k=class extends x{constructor(e){super(e),this._overlays=null,this._renderTargets=null,this._overlayParameters=new W,this.hasHighlights=!1,this.renderOccludedFlags=1,this._hasWater=!1,this._renderers=new Map,this._sortedDrapeSourceRenderersDirty=!1,this._sortedRenderers=new o,this._passParameters=new j,this._screenToWorldRatio=1,this._localOriginFactory=null,this.unloadedMemory=0,this.ignoresMemoryFactor=!1,this._camera=new w,this.events=new t,this.longitudeCyclical=null,this.produces=new Map([[18,e=>10!==e||this.hasHighlights],[19,()=>this._hasWater]]),this._hasTargetWithoutRasterImage=!1,this._hasDrapedFeatureSource=!1,this._hasDrapedRasterSource=!1,this._hasDrapedFlowSource=!1;const{state:r,stage:s}=e.parent.view,i=s.renderer.fboCache,n=s.renderView.renderingContext,a=s.renderView.techniques;this._renderContext=new D(n,new P(i,r.viewingMode),a)}initialize(){const e=this._view,r=e.stage.renderView.waterTextures;this.addHandles([a(()=>r.updating,()=>this.events.emit("content-changed"),h),a(()=>this._spatialReference,e=>this._localOriginFactory=new O(e),h),d(()=>e.allLayerViews,"after-changes",()=>this._sortedDrapeSourceRenderersDirty=!0),a(()=>T(e.state.highlights),()=>this._sortedDrapeSourceRenderersDirty=!0,l),a(()=>e.state.highlights,e=>{this._bindParameters.highlights=e},l),e.resourceController.scheduler.registerTask(q.OVERLAY_RENDERER,this)]);const t=this._camera;t.near=1,t.far=1e4,t.relativeElevation=null,this._bindParameters.slot=18,this._bindParameters.camera=t,this._bindParameters.updateLighting(new M(y()),0,0,0)}destroy(){this._renderers.forEach(e=>e.destroy()),this._renderers.clear(),this._passParameters.texture=n(this._passParameters.texture),this.disposeOverlays(),this._renderContext.destroy(),this._sortedRenderers.prune()}get _bindParameters(){return this._renderContext.bind}get _rctx(){return this._stage.renderView.renderingContext}get _view(){return this.parent.view}get _stage(){return this.parent.view.stage}get _spatialReference(){return this.parent.spatialReference}get _techniques(){return this._stage.renderView.techniques}get rctx(){return this._rctx}get materials(){return this._pluginContext.materials}get screenToWorldRatio(){return this._screenToWorldRatio}get localOriginFactory(){return this._localOriginFactory}set time(e){this._renderContext.time=e}get pluginContext(){return this._pluginContext}initializeRenderContext(e){const r=new S(this._view.stage.renderView.textures,this._techniques,()=>{this._onMaterialOrContentChanged(),this.events.emit("content-changed"),this.notifyChange("updating"),this.notifyChange("isEmpty")},()=>this.events.emit("content-changed"));this._pluginContext={...e,materials:r},this._techniques.precompile(V)}uninitializeRenderContext(){}acquireTechniques(){return[]}render(){}get updating(){return this._sortedDrapeSourceRenderersDirty||s(this._renderers,e=>e.updating||e.canCompact)}get hasOverlays(){return null!=this._overlays&&null!=this._renderTargets}getMaterialRenderer(e){for(const r of this._renderers.values()){const t=r.getMaterialRenderer(e);if(t)return t}return null}get layers(){return this._sortedDrapeSourceRenderersDirty&&this._updateSortedDrapeSourceRenderers(),r(this._sortedRenderers.map(e=>e.drapeSource.layer).filter(e=>!!e))}registerDrapeSource(e,r){const t=this._renderers.get(e);null!=t&&t.destroy(),this._renderers.set(e,r),this._sortedDrapeSourceRenderersDirty=!0,"fullOpacity"in e&&this.addHandles(a(()=>e.fullOpacity,()=>this.events.emit("content-changed")),e)}removeDrapeSourceRenderer(e){if(null==e)return;const r=this._renderers.get(e);null!=r&&(this._sortedDrapeSourceRenderersDirty=!0,this._renderers.delete(e),this.removeHandles(e),r.destroy())}computeValidity(){return this._renderTargets?.computeValidity()??0}releaseRenderTargets(e){this._renderTargets?.dispose(e)}get overlays(){return this._overlays??[]}ensureDrapeTargets(e){this._hasTargetWithoutRasterImage=!!this._overlays&&c(e,e=>1===e.drapeTargetType)}ensureDrapeSources(e){this._overlays?(this._hasDrapedFeatureSource=c(e,e=>1===e.drapeSourceType),this._hasDrapedRasterSource=c(e,e=>0===e.drapeSourceType),this._hasDrapedFlowSource=c(e,e=>2===e.drapeSourceType)):this._hasDrapedFeatureSource=this._hasDrapedRasterSource=this._hasDrapedFlowSource=!1}get _needsColorWithoutRasterImage(){return this._hasDrapedRasterSource&&this._hasDrapedFeatureSource&&this._hasTargetWithoutRasterImage}ensureOverlays(e,r,t=this._bindParameters.overlayStretch){null==this._overlays&&(this._renderTargets=new v(this._stage.renderer.fboCache),this._overlays=[new R,new R]),this.ensureDrapeTargets(e),this.ensureDrapeSources(r),this._bindParameters.overlayStretch=t}disposeOverlays(){this._overlays=null,this._renderTargets?.dispose(1),this._renderTargets=null,this.events.emit("textures-disposed")}_useOverlayColorInsteadOfColorNoRasterImage(e){return 1===e&&!this._needsColorWithoutRasterImage&&this._hasDrapedFeatureSource}getTexture(e){const r=this._useOverlayColorInsteadOfColorNoRasterImage(e);return this._renderTargets?.getTexture(r?0:e)}get readyToRun(){return this.updating}runTask(e){this._processDrapeSources(()=>!0,e)}_onMaterialOrContentChanged(){this.renderOccludedFlags=s(this._renderers,e=>e.hasOccluders)?H:1}_processDrapeSources(e,r){let t=!1;for(const[s,i]of this._renderers){if(r?.done)break;(s.destroyed||e(s))&&(i.commitChanges()&&(t=!0,r?.madeProgress()))}this._sortedDrapeSourceRenderersDirty&&(this._sortedDrapeSourceRenderersDirty=!1,t=!0,this._updateSortedDrapeSourceRenderers(),r?.madeProgress()),r&&this.compact(r),t&&(null!=this._overlays&&0===this._renderers.size&&this.disposeOverlays(),this.notifyChange("updating"),this.notifyChange("isEmpty"),this._onMaterialOrContentChanged(),this.hasHighlights=s(this._renderers,e=>e.hasHighlights),this.events.emit("content-changed"))}compact(e){let r=!1;for(const t of this._renderers.values()){if(e.done)break;r=t.compact(e)||r}return r&&this.notifyChange("updating"),r}hasHighlight(e){return s(this._renderers,r=>r.hasHighlight(e))}processSyncDrapeSources(){this._processDrapeSources(e=>1===e.updatePolicy)}get isEmpty(){return!f.OVERLAY_DRAW_DEBUG_TEXTURE&&i(this._renderers,e=>e.isEmpty)}get hasWater(){const e=s(this._renderers,({hasWater:e})=>e);return e!==this._hasWater&&(this._hasWater=e,this.events.emit("has-water")),this._hasWater}renders(e){if(f.OVERLAY_DRAW_DEBUG_TEXTURE&&4!==e&&2!==e)return!0;if(!this._overlays)return!1;const r=this._overlays[0];for(const i of this._overlays)i.setupGeometryViews(this.longitudeCyclical);if(!r.hasSomeSizedView())return!1;const t=this._setOutput(this._renderTargets?.targets.find(r=>r.content===e)?.output??0);++this._techniques.precompiling;const s=this._sortedRenderers.some(({renderer:e})=>e.precompile(this._renderContext));return--this._techniques.precompiling,this._setOutput(t),s}_setOutput(e){const r=this._bindParameters.output;return this._bindParameters.output=e,this._bindParameters.slot=4===e?19:18,r}get mode(){return this.isEmpty?0:this.hasWater&&this.renders(3)?2:this._renderTargets?.getTexture(0)?1:0}updateAnimation(e){let r=!1;return this._renderers.forEach(t=>r=t.updateAnimation(e)||r),r&&this.parent.requestRender(0),r}updateDrapeSourceOrder(){this._sortedDrapeSourceRenderersDirty=!0}precompileShaders(e){if(!this._overlays||!this._renderTargets)return!1;const r=this._bindParameters;r.alignPixelEnabled=e.alignPixelEnabled,++this._techniques.precompiling;for(const t of this._renderTargets.targets){if(1===t.content&&!this._needsColorWithoutRasterImage)continue;const{output:e}=t;this._setOutput(e),10===e&&(r.highlightMixTexture=r.highlights.length>1?this._rctx.emptyTexture:null);const s=this._renderContext.renderOccludedMask;4===t.content&&(this._renderContext.renderOccludedMask=H),this._sortedRenderers.forAll(({drapeSource:e,renderer:r})=>{1===t.content&&0===e.drapeSourceType||4===t.content&&r.hasOnlyOccluders||r.precompile(this._renderContext)}),this._renderContext.renderOccludedMask=s,r.highlightMixTexture=null}return--this._techniques.precompiling,!0}drawOverlays(e,r){if(!this._overlays||!this._renderTargets)return;for(const s of this._overlays)s.setupGeometryViews(this.longitudeCyclical);this._bindParameters.alignPixelEnabled=e.alignPixelEnabled;const t=this.allSourcesOccluders;for(const s of this._renderTargets.targets){if(!(0===s.content&&this._hasDrapedFlowSource)&&!s.handleRenderRequest(r)||1===s.content&&!this._needsColorWithoutRasterImage||4===s.content&&t)continue;const e=this._drawTarget(0,s),i=this._drawTarget(1,s);(e||i)&&s.fbo.generateMipMap()}}_drawTarget(e,r){const t=this._overlays[e],s=t.canvasGeometries;if(0===s.numViews)return!1;const i=this._view.state.contentPixelRatio;this._screenToWorldRatio=i*t.mapUnitsPerPixel/this._bindParameters.overlayStretch;const{output:n,content:o}=r;if(this.isEmpty||4===n&&!this.hasWater||!t.hasSomeSizedView())return!1;const{_rctx:a,_camera:h,_renderContext:d,_bindParameters:l}=this;if(h.pixelRatio=t.pixelRatio*i,this._setOutput(n),l.screenToWorldRatio=this._screenToWorldRatio,l.screenToPCSRatio=this._screenToWorldRatio*this.parent.worldToPCSRatio,4===o&&(d.renderOccludedMask=H),!this.renders(o))return d.renderOccludedMask=C,!1;const{resolution:c}=t,u=0===e,p=u?0:c;a.setViewport(p,0,c,c),this._bindTargetFBO(r),u&&(10===n?a.gl.clearBufferuiv(a.gl.COLOR,0,[0,0,0,0]):(a.setClearColor(0,0,0,0),a.clear(16384)));if(f.OVERLAY_DRAW_DEBUG_TEXTURE&&4!==o&&2!==o){this._techniques.precompile(E,L);const r=this._techniques.get(E,L);for(let i=0;i<s.numViews;i++)this._setViewParameters(s.extents[i],t),this._ensureDebugPatternResources(t.resolution,U[e]),a.bindTechnique(r,l,this._passParameters),a.screen.draw()}if(10===n){const{fboCache:t}=this._stage.renderer,s=this._resolution;this._bindTargetFBO(r),b(a,t,s,s,l,()=>this._renderAllGeometry(e,r),p)}else this._renderAllGeometry(e,r);return a.bindFramebuffer(null),d.renderOccludedMask=C,!0}get allSourcesOccluders(){return i(this._renderers,e=>e.hasOnlyOccluders)}_renderAllGeometry(e,r){const t=this._overlays[e],s=t.canvasGeometries;this._sortedRenderers.forAll(({drapeSource:i,renderer:n})=>{if(1===r.content&&0===i.drapeSourceType)return;const{fullOpacity:o}=i,a=null!=o&&o<1&&0===r.output&&this._bindTemporaryFBO();for(let e=0;e<s.numViews;e++)this._setViewParameters(s.extents[e],t),n.render(this._renderContext);if(a){this._bindTargetFBO(r),this._overlayParameters.texture=a.getTexture(),this._overlayParameters.opacity=o,this._overlayParameters.overlayIndex=e;const t=this._techniques.get(V);this._rctx.bindTechnique(t,this._bindParameters,this._overlayParameters),this._rctx.screen.draw(),a.release()}})}_bindTargetFBO(e){const r=this._resolution,t=2*r;e.fbo.ensureFramebuffer(t,r),e.fbo.bind(this._rctx)}_bindTemporaryFBO(){const e=this._resolution,r=2*e,t=this._stage.renderer.fboCache,s=t.acquire(r,e,"overlay tmp");return t.rctx.bindFramebuffer(s.fbo),t.rctx.clear(16384),s}get _resolution(){return this._overlays?.[0].resolution??0}notifyContentChanged(){this.events.emit("content-changed")}intersect(e,r,t,s){this._sortedDrapeSourceRenderersDirty&&this._updateSortedDrapeSourceRenderers();let i=0;for(const{renderer:n}of this._sortedRenderers)i=n.intersect?.(e,r,t,s,i)??i}_updateSortedDrapeSourceRenderers(){if(this._sortedRenderers.clear(),0===this._renderers.size)return;const e=this._view.map.allLayers.map(e=>e.uid),r=e.length;this._renderers.forEach((t,s)=>{const i=e.indexOf(s.layer?.uid),n=i>=0,o=s.renderGroup??(n?0:1),a=s.drapeSourcePriorityOffset??0,h=r*o+(n?i:0)+a;this._sortedRenderers.push(new I(s,t,h))}),this._sortedRenderers.sort((e,r)=>e.index-r.index)}_setViewParameters(e,r){const t=this._camera;t.viewport=[0,0,r.resolution,r.resolution],_(t.projectionMatrix,0,e[2]-e[0],0,e[3]-e[1],t.near,t.far),g(t.viewMatrix,[-e[0],-e[1],0])}_ensureDebugPatternResources(e,r){if(m(this._passParameters.color,r[0],r[1],r[2]),this._passParameters.texture)return;const t=new Uint8Array(e*e*4);let s=0;for(let n=0;n<e;n++)for(let r=0;r<e;r++){const i=Math.floor(r/10),o=Math.floor(n/10);i<2||o<2||10*i>e-20||10*o>e-20?(t[s++]=255,t[s++]=255,t[s++]=255,t[s++]=255):(t[s++]=255,t[s++]=255,t[s++]=255,t[s++]=1&i&&1&o?1&r^1&n?0:255:1&i^1&o?0:128)}const i=new G(e);i.samplingMode=9728,this._passParameters.texture=new A(this._rctx,i,t)}get test(){}};e([u()],k.prototype,"hasHighlights",void 0),e([u()],k.prototype,"renderOccludedFlags",void 0),e([u()],k.prototype,"_sortedDrapeSourceRenderersDirty",void 0),e([u({constructOnly:!0})],k.prototype,"parent",void 0),e([u({readOnly:!0})],k.prototype,"_techniques",null),e([u({type:Boolean,readOnly:!0})],k.prototype,"updating",null),e([u()],k.prototype,"isEmpty",null),k=e([p("esri.views.3d.terrain.OverlayRenderer")],k);class I{constructor(e,r,t){this.drapeSource=e,this.renderer=r,this.index=t}}const U=[[1,.5,.5],[.5,.5,1]],B=-2,H=4,L=new F;L.hasAlpha=!0;export{k as OverlayRenderer,B as drapedZ,H as overlayRenderOccludedFlag};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../webgl-engine/core/shaderLibrary/raster/Colormap.glsl.js";import"../webgl-engine/core/shaderLibrary/raster/Common.glsl.js";import"../webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js";import"../webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import"../webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import"../webgl-engine/core/shaderModules/BooleanPassUniform.js";import"../webgl-engine/core/shaderModules/Float2PassUniform.js";import"../webgl-engine/core/shaderModules/Float3PassUniform.js";import"../webgl-engine/core/shaderModules/FloatPassUniform.js";import"../webgl-engine/core/shaderModules/FloatsPassUniform.js";import"../webgl-engine/core/shaderModules/glsl.js";import"../webgl-engine/core/shaderModules/IntegerPassUniform.js";import"../webgl-engine/core/shaderModules/Texture2DPassUniform.js";import"../../webgl/ShaderBuilder.js";export{C as ColorizerHillshadeUniforms,a as ColorizerStretchUniforms,b as ColorizerUniforms,c as build}from"../../../chunks/RasterColorizer.glsl.js";
2
+ import"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../webgl-engine/core/shaderLibrary/raster/Colormap.glsl.js";import"../webgl-engine/core/shaderLibrary/raster/Common.glsl.js";import"../webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js";import"../webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import"../webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import"../webgl-engine/core/shaderModules/BooleanPassUniform.js";import"../webgl-engine/core/shaderModules/Float2PassUniform.js";import"../webgl-engine/core/shaderModules/Float3PassUniform.js";import"../webgl-engine/core/shaderModules/FloatPassUniform.js";import"../webgl-engine/core/shaderModules/FloatsPassUniform.js";import"../webgl-engine/core/shaderModules/glsl.js";import"../webgl-engine/core/shaderModules/IntegerPassUniform.js";import"../webgl-engine/core/shaderModules/Texture2DPassUniform.js";import"../../webgl/ShaderBuilder.js";export{a as ColorizerHillshadeUniforms,b as ColorizerStretchUniforms,C as ColorizerUniforms,c as build}from"../../../chunks/RasterColorizer.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{disposeMaybe as t}from"../../../core/maybe.js";import{b as e}from"../../../chunks/RasterColorizer.glsl.js";import{createTransformTexture as r,getCommonUniforms as s,getColormapUniforms as i,getStretchUniforms as o,getShadedReliefUniforms as a,createRasterTexture as l,createColormapTexture as h}from"../../webgl/rasterUtils.js";const n={bandCount:3,minOutput:0,maxOutput:1,minCutOff:[0,0,0],maxCutOff:[255,255,255],factor:[1/255,1/255,1/255],useGamma:!1,gamma:[1,1,1],gammaCorrection:[1,1,1],colormap:null,colormapOffset:null,stretchType:"none",type:"stretch"};class u{constructor(t,e,r=null,s=null){this.lij=t,this.type="raster-tile",this._memoryUsed=null,this._source=null,this._symbolizerParameters=null,this._bandIds=null,this._interpolation=null,this._dirty=!1,this._transformGrid=null,this.isRenderedSource=!1,this.symbolizerRenderer=null,this.rawPixelData=null,this.opacity=1,this.source=e,this.width=r||e.width,this.height=s||e.height}get source(){return this._source}set source(e){this._source=e,this._rasterTexture=t(this._rasterTexture),this._memoryUsed=null}get symbolizerParameters(){return this.isRenderedSource?{...n,maxCutOff:[1,1,1],factor:[1,1,1]}:this._symbolizerParameters||n}set symbolizerParameters(t){this._symbolizerParameters=t}get bandIds(){return this._bandIds}set bandIds(t){if(null!=t&&t.length>0){this._bandIds&&t.every((t,e)=>!!this._bandIds?.[e]&&t===this._bandIds[e])||(this._bandIds=t,this._dirty=!0)}else this._bandIds=null}get interpolation(){return this._interpolation||"nearest"}set interpolation(t){if(this._interpolation=t,null!=this._rasterTexture){const e=this._getRasterTextureInterpolation(t);this._rasterTexture.setSamplingMode("bilinear"===e?9729:9728)}}get transformGrid(){return this._transformGrid}set transformGrid(e){this._transformGrid=e,this._transformGridTexture=t(this._transformGridTexture),this._memoryUsed=null}bind(t){return!!(this.source&&this.source.pixels&&this.source.pixels.length>0)&&((null==this._rasterTexture||this._dirty)&&this._updateRasterTexture(t,this.bandIds),null!=this._rasterTexture&&(this._updateColormapTexture(t),this.transformGrid&&null==this._transformGridTexture&&(this._transformGridTexture=r(t,this.transformGrid))),!0)}getUniforms(t){const{symbolizerParameters:r,transformGrid:l,width:h,height:n,opacity:u}=this,m=s(l,[h,n],[this.source.width,this.source.height],u),d=i(r.colormap,r.colormapOffset),_="stretch"===this.symbolizerParameters.type?o(this.symbolizerParameters):null,c="hillshade"===this.symbolizerParameters.type?a(this.symbolizerParameters):null,p=t.emptyTexture;return new e(m,d,_||c,this._rasterTexture??p,this._transformGridTexture??p,this._colormapTexture??p)}get isBilinearWithStretchColorRamp(){const{symbolizerParameters:t}=this;return"bilinear"===this.interpolation&&null!=t.colormap&&"stretch"===t.type}get memoryUsage(){if(null==this._memoryUsed){const t=[this._rasterTexture,this._transformGridTexture,this._colormapTexture];this._memoryUsed=t.map(t=>null!=t?t.descriptor.width*t.descriptor.height*4:0).reduce((t,e)=>t+e,0)}return this._memoryUsed}release(){return this._rasterTexture=t(this._rasterTexture),this._transformGridTexture=t(this._transformGridTexture),this._colormapTexture=t(this._colormapTexture),this.source=null,this.transformGrid=null,this.rawPixelData=null,!0}_updateRasterTexture(e,r){const s=this.source?this.source.extractBands(r):null;if(!(s?.pixels&&s.pixels.length>0))return void(this._rasterTexture=t(this._rasterTexture));const i=null==r&&null==this.bandIds||null!=r&&null!=this.bandIds&&r.join("")===this.bandIds.join("");if(null!=this._rasterTexture&&i)return;this._rasterTexture=t(this._rasterTexture);const o=this._getRasterTextureInterpolation(this.interpolation);this._rasterTexture=l(e,s,o,this.isRenderedSource||this.hasStretchTypeNone())}hasStretchTypeNone(){return"stretchType"in this.symbolizerParameters&&"none"===this.symbolizerParameters.stretchType&&!this.symbolizerParameters.useGamma&&"u8"===this.source.pixelType}_getRasterTextureInterpolation(t){return"lut"===this.symbolizerParameters.type||"nearest"===t||"majority"===t||this.isBilinearWithStretchColorRamp?"nearest":"bilinear"}_updateColormapTexture(e){const r=this._colormap,s=this.symbolizerParameters.colormap;return s?r?s.length!==r.length||s.some((t,e)=>t!==r[e])?(this._colormapTexture=t(this._colormapTexture),this._colormapTexture=h(e,s),void(this._colormap=s)):void 0:(this._colormapTexture=h(e,s),void(this._colormap=s)):(this._colormapTexture=t(this._colormapTexture),void(this._colormap=null))}}export{u as RasterTile};
2
+ import{disposeMaybe as t}from"../../../core/maybe.js";import{C as e}from"../../../chunks/RasterColorizer.glsl.js";import{createTransformTexture as r,getCommonUniforms as s,getColormapUniforms as i,getStretchUniforms as o,getShadedReliefUniforms as a,createRasterTexture as l,createColormapTexture as h}from"../../webgl/rasterUtils.js";const n={bandCount:3,minOutput:0,maxOutput:1,minCutOff:[0,0,0],maxCutOff:[255,255,255],factor:[1/255,1/255,1/255],useGamma:!1,gamma:[1,1,1],gammaCorrection:[1,1,1],colormap:null,colormapOffset:null,stretchType:"none",type:"stretch"};class u{constructor(t,e,r=null,s=null){this.lij=t,this.type="raster-tile",this._memoryUsed=null,this._source=null,this._symbolizerParameters=null,this._bandIds=null,this._interpolation=null,this._dirty=!1,this._transformGrid=null,this.isRenderedSource=!1,this.symbolizerRenderer=null,this.rawPixelData=null,this.opacity=1,this.source=e,this.width=r||e.width,this.height=s||e.height}get source(){return this._source}set source(e){this._source=e,this._rasterTexture=t(this._rasterTexture),this._memoryUsed=null}get symbolizerParameters(){return this.isRenderedSource?{...n,maxCutOff:[1,1,1],factor:[1,1,1]}:this._symbolizerParameters||n}set symbolizerParameters(t){this._symbolizerParameters=t}get bandIds(){return this._bandIds}set bandIds(t){if(null!=t&&t.length>0){this._bandIds&&t.every((t,e)=>!!this._bandIds?.[e]&&t===this._bandIds[e])||(this._bandIds=t,this._dirty=!0)}else this._bandIds=null}get interpolation(){return this._interpolation||"nearest"}set interpolation(t){if(this._interpolation=t,null!=this._rasterTexture){const e=this._getRasterTextureInterpolation(t);this._rasterTexture.setSamplingMode("bilinear"===e?9729:9728)}}get transformGrid(){return this._transformGrid}set transformGrid(e){this._transformGrid=e,this._transformGridTexture=t(this._transformGridTexture),this._memoryUsed=null}bind(t){return!!(this.source&&this.source.pixels&&this.source.pixels.length>0)&&((null==this._rasterTexture||this._dirty)&&this._updateRasterTexture(t,this.bandIds),null!=this._rasterTexture&&(this._updateColormapTexture(t),this.transformGrid&&null==this._transformGridTexture&&(this._transformGridTexture=r(t,this.transformGrid))),!0)}getUniforms(t){const{symbolizerParameters:r,transformGrid:l,width:h,height:n,opacity:u}=this,m=s(l,[h,n],[this.source.width,this.source.height],u),d=i(r.colormap,r.colormapOffset),_="stretch"===this.symbolizerParameters.type?o(this.symbolizerParameters):null,c="hillshade"===this.symbolizerParameters.type?a(this.symbolizerParameters):null,p=t.emptyTexture;return new e(m,d,_||c,this._rasterTexture??p,this._transformGridTexture??p,this._colormapTexture??p)}get isBilinearWithStretchColorRamp(){const{symbolizerParameters:t}=this;return"bilinear"===this.interpolation&&null!=t.colormap&&"stretch"===t.type}get memoryUsage(){if(null==this._memoryUsed){const t=[this._rasterTexture,this._transformGridTexture,this._colormapTexture];this._memoryUsed=t.map(t=>null!=t?t.descriptor.width*t.descriptor.height*4:0).reduce((t,e)=>t+e,0)}return this._memoryUsed}release(){return this._rasterTexture=t(this._rasterTexture),this._transformGridTexture=t(this._transformGridTexture),this._colormapTexture=t(this._colormapTexture),this.source=null,this.transformGrid=null,this.rawPixelData=null,!0}_updateRasterTexture(e,r){const s=this.source?this.source.extractBands(r):null;if(!(s?.pixels&&s.pixels.length>0))return void(this._rasterTexture=t(this._rasterTexture));const i=null==r&&null==this.bandIds||null!=r&&null!=this.bandIds&&r.join("")===this.bandIds.join("");if(null!=this._rasterTexture&&i)return;this._rasterTexture=t(this._rasterTexture);const o=this._getRasterTextureInterpolation(this.interpolation);this._rasterTexture=l(e,s,o,this.isRenderedSource||this.hasStretchTypeNone())}hasStretchTypeNone(){return"stretchType"in this.symbolizerParameters&&"none"===this.symbolizerParameters.stretchType&&!this.symbolizerParameters.useGamma&&"u8"===this.source.pixelType}_getRasterTextureInterpolation(t){return"lut"===this.symbolizerParameters.type||"nearest"===t||"majority"===t||this.isBilinearWithStretchColorRamp?"nearest":"bilinear"}_updateColormapTexture(e){const r=this._colormap,s=this.symbolizerParameters.colormap;return s?r?s.length!==r.length||s.some((t,e)=>t!==r[e])?(this._colormapTexture=t(this._colormapTexture),this._colormapTexture=h(e,s),void(this._colormap=s)):void 0:(this._colormapTexture=h(e,s),void(this._colormap=s)):(this._colormapTexture=t(this._colormapTexture),void(this._colormap=null))}}export{u as RasterTile};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import has from"../../../core/has.js";import{disposeMaybe as t}from"../../../core/maybe.js";import{MemCachePool as i}from"../../../core/MemCachePool.js";import r from"../../../core/ObjectPool.js";import{watch as s,sync as n}from"../../../core/reactiveUtils.js";import{property as a,subclass as l}from"../../../core/accessorSupport/decorators.js";import{subtract as o,set as c,dot as h}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as d,fromValues as u,create as _}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as g,ZEROS as f}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as p,set as m}from"../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as y}from"../../../geometry/support/buffer/BufferView.js";import{overlayRenderOccludedFlag as b}from"./OverlayRenderer.js";import{PatchRenderData as x}from"./PatchRenderData.js";import{TerrainAttributesCache as T}from"./TerrainAttributesCache.js";import{enableTerrainInternalChecks as R}from"./terrainUtils.js";import{TileRenderer as v}from"./TileRenderer.js";import{IteratorPreorder as P,fallsWithinLayerView as w,sortTiles as O,compareTiles as S}from"./tileUtils.js";import{getOverlayContentForOutputTerrain as D}from"../webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{SyncRenderPlugin as B}from"../webgl-engine/effects/RenderPlugin.js";import{Vertices as E}from"../webgl-engine/lib/Attribute.js";import{IntersectorResult as F}from"../webgl-engine/lib/IntersectorResult.js";import{intersectAabbInvDirBefore as j,MeshIntersectionOptions as q,intersectTriangles as C}from"../webgl-engine/lib/RayIntersections.js";import{TriangleIntersectionData as A}from"../webgl-engine/lib/TriangleIntersectionData.js";import{terrainId as M,getVerticalOffsetTerrain as G}from"../webgl-engine/lib/verticalOffsetUtils.js";import{DrawParameters as I}from"../webgl-engine/materials/DrawParameters.js";import{hasShadowHighlights as U}from"../webgl-engine/shaders/ReceiveShadowsConfiguration.js";import{a as k}from"../../../chunks/Terrain.glsl.js";import{TerrainTechnique as N}from"../webgl-engine/shaders/TerrainTechnique.js";import{TerrainTechniqueConfiguration as L}from"../webgl-engine/shaders/TerrainTechniqueConfiguration.js";import{PrimitiveType as V}from"../../webgl/enums.js";const H=7,z=10,Q=200,W=p();let Z=class extends B{get visibleTiles(){return Array.from(this._visiblePatchesByOrigin.values()).flat()}get _isGlobal(){return 1===this._stage.viewingMode}get _techniques(){return this._context.techniques}get _rctx(){return this._context.renderContext.rctx}get renderOccludedFlags(){return this._overlayRenderer.renderOccludedFlags}constructor(e,t,s,n,a){super({}),this._overlayRenderer=e,this._stage=t,this._allTiles=s,this._compressionTracker=n,this.type=7,this.isGround=!0,this._passParameters=new k,this._drawParameters=new I,this._renderDataPool=new r(()=>new x),this._visiblePatchesByOrigin=new Map,this._allPatchesByOrigin=new Map,this._patchesByOriginDirty=!0,this._patchSortingDirty=!0,this._tileIterator=new P,this._castShadows=!1,this._inViewshed=!1,this._cutFillEnabled=!1,this._tileRenderer=null,this._stencilEnabledLayerExtents=new Array,this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0,this.produces=new Map([[1,()=>1===this._desiredSlot],[7,()=>7===this._desiredSlot],[9,()=>this._produces()&&this.renderOccludedFlags===b]]),this._tileSize=256,this._configuration=new L(1===t.viewingMode),this._tileTextureCache=new i((e,t)=>a.newCache(e,t),"TileTexture"),this.tileGeometryCache=new T(a)}normalizeCtorArgs(){return{}}initialize(){this._stage.addRenderPlugin(this),this.addHandles(s(()=>this._overlayRenderer.renderOccludedFlags,()=>this.setNeedsRender(),n))}destroy(){this._stage.removeRenderPlugin(this),this._tileTextureCache.destroy(),this.tileGeometryCache.destroy(),this._allTiles.prune(),this._tileRenderer=null}_produces(){return this.visible&&!!this._rootTiles&&!this.renderingDisabled}set renderingDisabled(e){this._set("renderingDisabled",!!e),this.setDirty()}set visible(e){this._set("visible",!!e),this.setDirty()}updateHeading(e){this._tileRenderer?.updateHeading(e)}set transparency(e){this._configuration.transparencyMode!==e&&(this._configuration.transparencyMode=e,this.setNeedsRender())}get transparency(){return this._configuration.transparencyMode}get renderPatchBorders(){return this._configuration.tileBorders}set renderPatchBorders(e){this._configuration.tileBorders!==e&&(this._configuration.tileBorders=e,this.setNeedsRender(),this.notifyChange("renderPatchBorders"))}get layerViewUid(){return M}get slicePlaneEnabled(){return this._configuration.hasSlicePlane}set slicePlaneEnabled(e){this._configuration.hasSlicePlane!==e&&(this._configuration.hasSlicePlane=e,this.setNeedsRender())}set textureFadingEnabled(e){this._configuration.textureFadingEnabled!==e&&(this._configuration.textureFadingEnabled=e,this.setNeedsRender())}set pbrMode(e){this._configuration.pbrMode!==e&&(this._configuration.pbrMode=e,this.setNeedsRender())}setRootTiles(e){this._rootTiles=e,this.setDirty()}setStencilEnabledLayerExtents(e){this._stencilEnabledLayerExtents=e,this._setSortingDirty()}set tileSize(e){this._tileSize=e,null!=this._tileRenderer&&(this._tileRenderer.tileSize=e),this.setDirty()}get tileSize(){return this._tileSize}_ensureRenderData(e){e.renderData||(e.renderData=this._renderDataPool.acquire(),e.renderData.init(e,this._getLocalOriginOfTile(e)))}loadTile(e){this._ensureRenderData(e),this.updateTileGeometryState(e),this.reuseTextureFromParent(e)||this.updateTileTexture(e,32)}reuseTextureFromParent(e){const{parent:t}=e;if(!this._canReuseTextureFromParent(t,e))return!1;const i=g(1&e.lij[2]?.5:0,1&e.lij[1]?0:.5,.5,.5);return t.renderData?.reuseTexture(e.renderData,i)??!1}_canReuseTextureFromParent(e,t){if(!e)return!1;const{layerInfo:i,surface:r}=t;for(let s=0;s<i[1].length;s++){const i=r.layerViewByIndex(s,1);if(w(e,i)!==w(t,i))return!1}return!0}updateTileTexture(e,t){null!=this._tileRenderer&&(this._tileRenderer.updateTileTexture(e,32===t?0:2),this.setNeedsRender(),e.resetPendingUpdate(t))}updateTileGeometryState(e){for(const i of e.layerInfo[0])i.pendingUpdates&=-9;e.resetPendingUpdate(8);const t=e.renderData.updateGeometryState();return t&&this.setDirty(),t}updateGeometryIfNeeded(e){e.loaded&&e.renderData.updateGeometryIfNeeded(this._rctx)}unloadTile(e){const t=e.renderData;t&&(t.releaseGeometry(),this._renderDataPool.release(t),t.clear(),e.renderData=null,e.setMemoryDirty(),this.setDirty())}_getLocalOriginOfTile(e){const t=z-H,i=Math.max(0,Math.floor((e.level-t)/H)*H);if(this._isGlobal&&0===i)return d;for(;e.parent&&e.level>i;)e=e.parent;return e.centerAtSeaLevel}getStats(){return{numTilesRendered:this._numTilesRendered,numTilesCulled:this._numTilesCulled,numOriginsRendered:this._numOriginsRendered}}set wireframe(e){this._get("wireframe")!==e&&(this._set("wireframe",e),this.setNeedsRender())}setDirty(e=1){this._patchesByOriginDirty=!0,this._context.requestRender(e)}_setSortingDirty(e=1){this._patchSortingDirty=!0,this._context.requestRender(e)}setNeedsRender(e=1){this._context.requestRender(e)}initializeRenderContext(e){this._context=e,this._tileRenderer=new v(this._rctx,this._tileSize,this._techniques,this._tileTextureCache,this._compressionTracker),this.updateTileBackground()}uninitializeRenderContext(){this._tileRenderer=t(this._tileRenderer)}intersect(e,t,i,r){if(!this._rootTiles||e.options.selectOpaqueTerrainOnly&&e.options.selectionMode&&0!==this.transparency)return;const s=J,n=K;o(s,r,i),c(n,1/s[0],1/s[1],1/s[2]);const a=e.results.min,l=e.results.max,d=e.results.ground,u=0===e.options.store,_=!!e.results.ground.target,g=G(e.verticalOffset),f=e.tolerance;let p,b=u&&null!=a.distance?a.distance:1/0;const x=e.options,T=x.normalRequired||!x.backfacesTerrain,R=new q(f,!1,T),v=c=>{const _=c.renderData;if(!_?.vao)return;const v=_.geometry;m(W,v.boundingBox);const P=_.localOrigin;null!=g&&(g.localOrigin=P,g.applyToAabb(W));const w=W;if(X[0]=i[0]-P[0],X[1]=i[1]-P[1],X[2]=i[2]-P[2],!j(w,X,n,f,b))return;const O=(e,t,i)=>{e.set(this.type,c,t,i),b=u&&null!=a.distance?a.distance:1/0},S=(n,o,c)=>{if((!T||null!=o)&&n>=0&&(x.backfacesTerrain||h(o,s)<0)&&(x.invisibleTerrain||!x.selectionMode||null==t||t(i,r,n))){if((null==d.distance||n<d.distance)&&O(d,n,o),x.isFiltered)return;2===x.store&&(null==p?(p=new F(e.ray),O(p,n,o),e.results.all.push(p)):n<p.distance&&O(p,n,o)),(null==a.distance||n<a.distance)&&O(a,n,o),0!==x.store&&(null==l.distance||n>l.distance)&&O(l,n,o)}},D=Y;o(D,r,P);const{indices:B,indexCount:q}=v,M=v.vertexAttributes,G=M.getField("position",y),I=new E(G.typedBuffer,3,M.stride/4),U=q/3;if(!g&&U>Q){const e=c.renderData;e.intersectionData??=new A(B,U,I),e.intersectionData.intersectRay(X,D,R,S)}else C(X,D,0,U,B,I,g,R,S)},P=this._rootTiles;if(null!=P){(()=>{const t=this._tileIterator;t.reset(P);const r=e.options.invisibleTerrain;for(let e=t.next();e;e=t.next())!(e.visible||r&&e.intersectsClippingArea)||null==g&&!e.intersectsRay(i,s,f,b)||_&&this._useStencilForTile(e)?t.skipSubtree():v(e)})()}}processScaleRangeQueries(e,t){if(!t.done&&e)for(this._updatePatchGroups();e.updating&&!t.done;){e.prepare();for(const t of this._visiblePatchesByOrigin.values())for(const i of t)null!=i.renderData?.textureReference&&e.queriesForTile(i);e.process(),t.madeProgress()}}get _desiredSlot(){if(!this._produces())return null;switch(this.transparency){case 0:return 1;case 1:case 2:return 7;case 3:case 4:return null}}acquireTechniques(e){const{shadowMap:t,viewshedEnabled:i,cutFillComputationEnabled:r,slot:s,hasEmission:n,useFloatBlend:a}=e.bind,l=!!has("enable-feature:terrain-shadows")&&t.enabled;if(l!==this._castShadows&&(this._castShadows=l,this._patchesByOriginDirty=!0),this._inViewshed!==i&&(this._inViewshed=i,this._patchesByOriginDirty=!0),this._cutFillEnabled!==r&&(this._cutFillEnabled=r,this._patchesByOriginDirty=!0),3===this.transparency)return null;if(9===s){if(0===(e.renderOccludedMask&b))return null}else if(s!==this._desiredSlot)return null;const o=this._configuration;switch(o.screenSpaceReflections=o.cloudReflections=o.receiveShadows=o.hasShadowHighlights=o.receiveAmbientOcclusion=o.renderOccluded=o.hasHighlightMixTexture=o.hasEmission=!1,o.overlayMode=this._overlayRenderer.mode,o.useFloatBlend=a.value,e.output){case 0:case 1:case 2:{const i=e.bind;o.screenSpaceReflections=i.hasScreenSpaceReflections,o.cloudReflections=null!=i.clouds.data;const r=9===s;return o.receiveShadows=t.ready&&!r,o.hasShadowHighlights=U(o,e.bind),o.renderOccluded=r,o.receiveAmbientOcclusion=!r&&null!=i.ssao,o.receiveGlobalIllumination=!r&&i.globalIlluminationEnabled,o.hasEmission=n,this._acquireTechnique(e.output)}case 5:case 7:return this._castShadows?this._acquireTechnique(5):null;case 8:return this._inViewshed?this._acquireTechnique(8):null;case 9:return this._cutFillEnabled?this._acquireTechnique(9):null;case 3:case 4:return this._acquireTechnique(e.output);case 11:return this._acquireTechnique(11);case 10:return o.hasHighlightMixTexture=null!=e.bind.highlightMixTexture,this._overlayRenderer.hasHighlights?this._acquireTechnique(10):null}return null}render(e,t){switch(this._updatePatchGroups(),this._passParameters.useStencil=!1,this._passParameters.overlayContent=D(e.output,e.bind),e.output){case 0:case 1:case 2:return this._renderMaterialPass(e,t);case 3:case 4:case 11:return this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);case 10:{const i=e.bind.highlight?.name;i&&this._overlayRenderer.hasHighlights&&this._overlayRenderer.renders(2)&&this._overlayRenderer.hasHighlight(i)&&this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);break}case 5:case 7:case 8:case 9:return this._renderAuxiliaryPass(e,t,this._allPatchesByOrigin)}}updateTileBackground(e){if(null==this._tileRenderer)return;const t=this._tileRenderer;let i;if(null!=e){const t=e.toUnitRGBA();i=u(t[0]||0,t[1]||0,t[2]||0)}t.setBackground(i),this._allTiles.forAll(e=>t.updateTileTexture(e,0)),this._configuration.tileBlendInput=t.backgroundIsGrid?2:null!=t.backgroundColor?1:0,this.setNeedsRender()}_updatePatchGroups(){if(this._patchesByOriginDirty&&(this._rebuildPatchGroups(),this._patchesByOriginDirty=!1,this._patchSortingDirty=!0),this._patchSortingDirty){const e=Array.from(this._visiblePatchesByOrigin.values()),t=this._stencilEnabledLayerExtents;for(const i of e)O(i,t);e.sort((e,t)=>S(e[0],t[0])),this._visiblePatchesByOrigin=new Map(e.map(e=>[e[0].renderData.localOrigin,e])),this.notifyChange("visibleTiles"),this._patchSortingDirty=!1}}_rebuildPatchGroups(){const e=this._rootTiles;if(null!=e){e[0]?.surface.checkAllTilesWaterproofness(),this._visiblePatchesByOrigin.clear(),this._allPatchesByOrigin.clear();for(const t of e)this._rebuildPatchGroupsForRootTile(t)}}_rebuildPatchGroupsForRootTile(e){const t=this._tileIterator;for(t.resetOne(e);!t.done;){const e=t.next(),i=e.renderData;if(!i){this._numTilesCulled++;continue}const r=i.localOrigin;if(this._castShadows||this._inViewshed||this._cutFillEnabled){let t=this._allPatchesByOrigin.get(r);t||(t=[],this._allPatchesByOrigin.set(r,t)),t.push(e)}if(!e.visible){this._numTilesCulled++,t.skipSubtree();continue}let s=this._visiblePatchesByOrigin.get(r);s||(s=[],this._visiblePatchesByOrigin.set(r,s)),s.push(e),t.skipSubtree()}}_useStencilForTile(e){for(const t of this._stencilEnabledLayerExtents)if(e.intersectsExtent(t))return!0;return!1}_renderAuxiliaryPass(e,t,i){const{rctx:r,bind:s}=e;r.bindTechnique(t,s,this._passParameters);const n=this._stencilEnabledLayerExtents.length>0;i.forEach(i=>{this._drawParameters.origin=i[0].renderData.localOrigin,t.program.bindDraw(s,this._passParameters,this._drawParameters);for(let r=0;r<i.length;r++)this._renderPatch(e,t,i[r],V.TRIANGLES,n,null===this._passParameters.overlayContent)}),r.bindVAO(null)}_renderMaterialPass(e,t){const{rctx:i,bind:r}=e,s=i.bindTechnique(t,r,this._passParameters);this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0;const n=9===r.slot;n&&(s.bindTexture("tex",i.emptyTexture),s.setUniform3fv("textureOpacities",d),s.setUniform4fv("texOffsetAndScale",f));const a=null!=this._tileRenderer?.backgroundColor?this._tileRenderer.backgroundColor:d;1===this._configuration.tileBlendInput&&s.setUniform3fv("backgroundColor",a);const l=this._stencilEnabledLayerExtents.length>0,o=this.wireframe?V.LINES:V.TRIANGLES;this._configuration.textureFadingEnabled&&s.bindTexture("texNext",i.emptyTexture);const c=this._visiblePatchesByOrigin;for(const h of c.values()){const i=h[0].renderData.localOrigin;this._drawParameters.origin=i,t.program.bindDraw(r,this._passParameters,this._drawParameters),this._numOriginsRendered++;for(const r of h){const i=r.renderData,a=i.textureReference;if(null!=a){if(!n){s.setUniform4fv("texOffsetAndScale",a.offsetAndScale),s.bindTexture("tex",a.texture.texture);const e=i.textureFadeFactor,t=e<1?i.nextTextureReference:null;this._configuration.textureFadingEnabled&&t&&e<1?(s.setUniform1f("fadeFactor",e),s.setUniform4fv("nextTexOffsetAndScale",t.offsetAndScale),s.setUniform3fv("nextTexOpacities",t.opacities),s.bindTexture("texNext",t.texture.texture)):s.setUniform1f("fadeFactor",1),i.textureIsFading&&this.setNeedsRender(2),s.setUniform3fv("textureOpacities",a.opacities)}this._renderPatch(e,t,r,o,l),r.renderOrder=this._numTilesRendered,this._numTilesRendered++}}}i.bindVAO(null)}_renderPatch(e,t,i,r,s,n=!1){const a=i.renderData,l=a.vao,o=l?.indexBuffer;if(!l||null==o)return void(R&&console.error("Rendered tile with no indices: ",i.lij," : ",a));const c=t.program;n||this._overlayRenderer.isEmpty||this._bindOverlayPatchData(c,a.overlay);const{rctx:h,bind:d}=e;s&&(this._passParameters.useStencil=this._useStencilForTile(i),h.setPipelineState(t.getPipeline(d,this._passParameters)));const u=a.geometry.indexCount;h.bindVAO(l),c.assertCompatibleVertexAttributeLocations(l),h.drawElements(r,u,o.indexType,0)}_bindOverlayPatchData(e,t){e.setUniform4fv("overlayTexOffset",t.offsets),e.setUniform4fv("overlayTexScale",t.scales)}_acquireTechnique(e){return this._configuration.output=e,this._techniques.get(N,this._configuration)}get test(){}hasHighlight(e){return this._overlayRenderer.hasHighlight(e)}};e([a({readOnly:!0})],Z.prototype,"visibleTiles",null),e([a({readOnly:!0})],Z.prototype,"_isGlobal",null),e([a()],Z.prototype,"renderOccludedFlags",null),e([a({value:!1})],Z.prototype,"renderingDisabled",null),e([a({value:!0})],Z.prototype,"visible",null),e([a()],Z.prototype,"renderPatchBorders",null),e([a()],Z.prototype,"wireframe",null),Z=e([l("esri.views.3d.terrain.TerrainRenderer")],Z);const J=_(),K=_(),X=_(),Y=_();export{Z as TerrainRenderer};
2
+ import{__decorate as e}from"tslib";import has from"../../../core/has.js";import{disposeMaybe as t}from"../../../core/maybe.js";import{MemCachePool as i}from"../../../core/MemCachePool.js";import r from"../../../core/ObjectPool.js";import{watch as s,sync as n}from"../../../core/reactiveUtils.js";import{property as a,subclass as l}from"../../../core/accessorSupport/decorators.js";import{subtract as o,set as c,dot as h}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as d,fromValues as u,create as _}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as g,ZEROS as f}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as p,set as m}from"../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as y}from"../../../geometry/support/buffer/BufferView.js";import{overlayRenderOccludedFlag as b}from"./OverlayRenderer.js";import{PatchRenderData as x}from"./PatchRenderData.js";import{TerrainAttributesCache as T}from"./TerrainAttributesCache.js";import{enableTerrainInternalChecks as R}from"./terrainUtils.js";import{TileRenderer as v}from"./TileRenderer.js";import{IteratorPreorder as P,fallsWithinLayerView as w,sortTiles as O,compareTiles as S}from"./tileUtils.js";import{getOverlayContentForOutputTerrain as D}from"../webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{SyncRenderPlugin as B}from"../webgl-engine/effects/RenderPlugin.js";import{Vertices as E}from"../webgl-engine/lib/Attribute.js";import{IntersectorResult as F}from"../webgl-engine/lib/IntersectorResult.js";import{intersectAabbInvDirBefore as j,MeshIntersectionOptions as q,intersectTriangles as C}from"../webgl-engine/lib/RayIntersections.js";import{TriangleIntersectionData as A}from"../webgl-engine/lib/TriangleIntersectionData.js";import{terrainId as M,getVerticalOffsetTerrain as G}from"../webgl-engine/lib/verticalOffsetUtils.js";import{DrawParameters as I}from"../webgl-engine/materials/DrawParameters.js";import{hasShadowHighlights as U}from"../webgl-engine/shaders/ReceiveShadowsConfiguration.js";import{T as k}from"../../../chunks/Terrain.glsl.js";import{TerrainTechnique as N}from"../webgl-engine/shaders/TerrainTechnique.js";import{TerrainTechniqueConfiguration as L}from"../webgl-engine/shaders/TerrainTechniqueConfiguration.js";import{PrimitiveType as V}from"../../webgl/enums.js";const H=7,z=10,Q=200,W=p();let Z=class extends B{get visibleTiles(){return Array.from(this._visiblePatchesByOrigin.values()).flat()}get _isGlobal(){return 1===this._stage.viewingMode}get _techniques(){return this._context.techniques}get _rctx(){return this._context.renderContext.rctx}get renderOccludedFlags(){return this._overlayRenderer.renderOccludedFlags}constructor(e,t,s,n,a){super({}),this._overlayRenderer=e,this._stage=t,this._allTiles=s,this._compressionTracker=n,this.type=7,this.isGround=!0,this._passParameters=new k,this._drawParameters=new I,this._renderDataPool=new r(()=>new x),this._visiblePatchesByOrigin=new Map,this._allPatchesByOrigin=new Map,this._patchesByOriginDirty=!0,this._patchSortingDirty=!0,this._tileIterator=new P,this._castShadows=!1,this._inViewshed=!1,this._cutFillEnabled=!1,this._tileRenderer=null,this._stencilEnabledLayerExtents=new Array,this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0,this.produces=new Map([[1,()=>1===this._desiredSlot],[7,()=>7===this._desiredSlot],[9,()=>this._produces()&&this.renderOccludedFlags===b]]),this._tileSize=256,this._configuration=new L(1===t.viewingMode),this._tileTextureCache=new i((e,t)=>a.newCache(e,t),"TileTexture"),this.tileGeometryCache=new T(a)}normalizeCtorArgs(){return{}}initialize(){this._stage.addRenderPlugin(this),this.addHandles(s(()=>this._overlayRenderer.renderOccludedFlags,()=>this.setNeedsRender(),n))}destroy(){this._stage.removeRenderPlugin(this),this._tileTextureCache.destroy(),this.tileGeometryCache.destroy(),this._allTiles.prune(),this._tileRenderer=null}_produces(){return this.visible&&!!this._rootTiles&&!this.renderingDisabled}set renderingDisabled(e){this._set("renderingDisabled",!!e),this.setDirty()}set visible(e){this._set("visible",!!e),this.setDirty()}updateHeading(e){this._tileRenderer?.updateHeading(e)}set transparency(e){this._configuration.transparencyMode!==e&&(this._configuration.transparencyMode=e,this.setNeedsRender())}get transparency(){return this._configuration.transparencyMode}get renderPatchBorders(){return this._configuration.tileBorders}set renderPatchBorders(e){this._configuration.tileBorders!==e&&(this._configuration.tileBorders=e,this.setNeedsRender(),this.notifyChange("renderPatchBorders"))}get layerViewUid(){return M}get slicePlaneEnabled(){return this._configuration.hasSlicePlane}set slicePlaneEnabled(e){this._configuration.hasSlicePlane!==e&&(this._configuration.hasSlicePlane=e,this.setNeedsRender())}set textureFadingEnabled(e){this._configuration.textureFadingEnabled!==e&&(this._configuration.textureFadingEnabled=e,this.setNeedsRender())}set pbrMode(e){this._configuration.pbrMode!==e&&(this._configuration.pbrMode=e,this.setNeedsRender())}setRootTiles(e){this._rootTiles=e,this.setDirty()}setStencilEnabledLayerExtents(e){this._stencilEnabledLayerExtents=e,this._setSortingDirty()}set tileSize(e){this._tileSize=e,null!=this._tileRenderer&&(this._tileRenderer.tileSize=e),this.setDirty()}get tileSize(){return this._tileSize}_ensureRenderData(e){e.renderData||(e.renderData=this._renderDataPool.acquire(),e.renderData.init(e,this._getLocalOriginOfTile(e)))}loadTile(e){this._ensureRenderData(e),this.updateTileGeometryState(e),this.reuseTextureFromParent(e)||this.updateTileTexture(e,32)}reuseTextureFromParent(e){const{parent:t}=e;if(!this._canReuseTextureFromParent(t,e))return!1;const i=g(1&e.lij[2]?.5:0,1&e.lij[1]?0:.5,.5,.5);return t.renderData?.reuseTexture(e.renderData,i)??!1}_canReuseTextureFromParent(e,t){if(!e)return!1;const{layerInfo:i,surface:r}=t;for(let s=0;s<i[1].length;s++){const i=r.layerViewByIndex(s,1);if(w(e,i)!==w(t,i))return!1}return!0}updateTileTexture(e,t){null!=this._tileRenderer&&(this._tileRenderer.updateTileTexture(e,32===t?0:2),this.setNeedsRender(),e.resetPendingUpdate(t))}updateTileGeometryState(e){for(const i of e.layerInfo[0])i.pendingUpdates&=-9;e.resetPendingUpdate(8);const t=e.renderData.updateGeometryState();return t&&this.setDirty(),t}updateGeometryIfNeeded(e){e.loaded&&e.renderData.updateGeometryIfNeeded(this._rctx)}unloadTile(e){const t=e.renderData;t&&(t.releaseGeometry(),this._renderDataPool.release(t),t.clear(),e.renderData=null,e.setMemoryDirty(),this.setDirty())}_getLocalOriginOfTile(e){const t=z-H,i=Math.max(0,Math.floor((e.level-t)/H)*H);if(this._isGlobal&&0===i)return d;for(;e.parent&&e.level>i;)e=e.parent;return e.centerAtSeaLevel}getStats(){return{numTilesRendered:this._numTilesRendered,numTilesCulled:this._numTilesCulled,numOriginsRendered:this._numOriginsRendered}}set wireframe(e){this._get("wireframe")!==e&&(this._set("wireframe",e),this.setNeedsRender())}setDirty(e=1){this._patchesByOriginDirty=!0,this._context.requestRender(e)}_setSortingDirty(e=1){this._patchSortingDirty=!0,this._context.requestRender(e)}setNeedsRender(e=1){this._context.requestRender(e)}initializeRenderContext(e){this._context=e,this._tileRenderer=new v(this._rctx,this._tileSize,this._techniques,this._tileTextureCache,this._compressionTracker),this.updateTileBackground()}uninitializeRenderContext(){this._tileRenderer=t(this._tileRenderer)}intersect(e,t,i,r){if(!this._rootTiles||e.options.selectOpaqueTerrainOnly&&e.options.selectionMode&&0!==this.transparency)return;const s=J,n=K;o(s,r,i),c(n,1/s[0],1/s[1],1/s[2]);const a=e.results.min,l=e.results.max,d=e.results.ground,u=0===e.options.store,_=!!e.results.ground.target,g=G(e.verticalOffset),f=e.tolerance;let p,b=u&&null!=a.distance?a.distance:1/0;const x=e.options,T=x.normalRequired||!x.backfacesTerrain,R=new q(f,!1,T),v=c=>{const _=c.renderData;if(!_?.vao)return;const v=_.geometry;m(W,v.boundingBox);const P=_.localOrigin;null!=g&&(g.localOrigin=P,g.applyToAabb(W));const w=W;if(X[0]=i[0]-P[0],X[1]=i[1]-P[1],X[2]=i[2]-P[2],!j(w,X,n,f,b))return;const O=(e,t,i)=>{e.set(this.type,c,t,i),b=u&&null!=a.distance?a.distance:1/0},S=(n,o,c)=>{if((!T||null!=o)&&n>=0&&(x.backfacesTerrain||h(o,s)<0)&&(x.invisibleTerrain||!x.selectionMode||null==t||t(i,r,n))){if((null==d.distance||n<d.distance)&&O(d,n,o),x.isFiltered)return;2===x.store&&(null==p?(p=new F(e.ray),O(p,n,o),e.results.all.push(p)):n<p.distance&&O(p,n,o)),(null==a.distance||n<a.distance)&&O(a,n,o),0!==x.store&&(null==l.distance||n>l.distance)&&O(l,n,o)}},D=Y;o(D,r,P);const{indices:B,indexCount:q}=v,M=v.vertexAttributes,G=M.getField("position",y),I=new E(G.typedBuffer,3,M.stride/4),U=q/3;if(!g&&U>Q){const e=c.renderData;e.intersectionData??=new A(B,U,I),e.intersectionData.intersectRay(X,D,R,S)}else C(X,D,0,U,B,I,g,R,S)},P=this._rootTiles;if(null!=P){(()=>{const t=this._tileIterator;t.reset(P);const r=e.options.invisibleTerrain;for(let e=t.next();e;e=t.next())!(e.visible||r&&e.intersectsClippingArea)||null==g&&!e.intersectsRay(i,s,f,b)||_&&this._useStencilForTile(e)?t.skipSubtree():v(e)})()}}processScaleRangeQueries(e,t){if(!t.done&&e)for(this._updatePatchGroups();e.updating&&!t.done;){e.prepare();for(const t of this._visiblePatchesByOrigin.values())for(const i of t)null!=i.renderData?.textureReference&&e.queriesForTile(i);e.process(),t.madeProgress()}}get _desiredSlot(){if(!this._produces())return null;switch(this.transparency){case 0:return 1;case 1:case 2:return 7;case 3:case 4:return null}}acquireTechniques(e){const{shadowMap:t,viewshedEnabled:i,cutFillComputationEnabled:r,slot:s,hasEmission:n,useFloatBlend:a}=e.bind,l=!!has("enable-feature:terrain-shadows")&&t.enabled;if(l!==this._castShadows&&(this._castShadows=l,this._patchesByOriginDirty=!0),this._inViewshed!==i&&(this._inViewshed=i,this._patchesByOriginDirty=!0),this._cutFillEnabled!==r&&(this._cutFillEnabled=r,this._patchesByOriginDirty=!0),3===this.transparency)return null;if(9===s){if(0===(e.renderOccludedMask&b))return null}else if(s!==this._desiredSlot)return null;const o=this._configuration;switch(o.screenSpaceReflections=o.cloudReflections=o.receiveShadows=o.hasShadowHighlights=o.receiveAmbientOcclusion=o.renderOccluded=o.hasHighlightMixTexture=o.hasEmission=!1,o.overlayMode=this._overlayRenderer.mode,o.useFloatBlend=a.value,e.output){case 0:case 1:case 2:{const i=e.bind;o.screenSpaceReflections=i.hasScreenSpaceReflections,o.cloudReflections=null!=i.clouds.data;const r=9===s;return o.receiveShadows=t.ready&&!r,o.hasShadowHighlights=U(o,e.bind),o.renderOccluded=r,o.receiveAmbientOcclusion=!r&&null!=i.ssao,o.receiveGlobalIllumination=!r&&i.globalIlluminationEnabled,o.hasEmission=n,this._acquireTechnique(e.output)}case 5:case 7:return this._castShadows?this._acquireTechnique(5):null;case 8:return this._inViewshed?this._acquireTechnique(8):null;case 9:return this._cutFillEnabled?this._acquireTechnique(9):null;case 3:case 4:return this._acquireTechnique(e.output);case 11:return this._acquireTechnique(11);case 10:return o.hasHighlightMixTexture=null!=e.bind.highlightMixTexture,this._overlayRenderer.hasHighlights?this._acquireTechnique(10):null}return null}render(e,t){switch(this._updatePatchGroups(),this._passParameters.useStencil=!1,this._passParameters.overlayContent=D(e.output,e.bind),e.output){case 0:case 1:case 2:return this._renderMaterialPass(e,t);case 3:case 4:case 11:return this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);case 10:{const i=e.bind.highlight?.name;i&&this._overlayRenderer.hasHighlights&&this._overlayRenderer.renders(2)&&this._overlayRenderer.hasHighlight(i)&&this._renderAuxiliaryPass(e,t,this._visiblePatchesByOrigin);break}case 5:case 7:case 8:case 9:return this._renderAuxiliaryPass(e,t,this._allPatchesByOrigin)}}updateTileBackground(e){if(null==this._tileRenderer)return;const t=this._tileRenderer;let i;if(null!=e){const t=e.toUnitRGBA();i=u(t[0]||0,t[1]||0,t[2]||0)}t.setBackground(i),this._allTiles.forAll(e=>t.updateTileTexture(e,0)),this._configuration.tileBlendInput=t.backgroundIsGrid?2:null!=t.backgroundColor?1:0,this.setNeedsRender()}_updatePatchGroups(){if(this._patchesByOriginDirty&&(this._rebuildPatchGroups(),this._patchesByOriginDirty=!1,this._patchSortingDirty=!0),this._patchSortingDirty){const e=Array.from(this._visiblePatchesByOrigin.values()),t=this._stencilEnabledLayerExtents;for(const i of e)O(i,t);e.sort((e,t)=>S(e[0],t[0])),this._visiblePatchesByOrigin=new Map(e.map(e=>[e[0].renderData.localOrigin,e])),this.notifyChange("visibleTiles"),this._patchSortingDirty=!1}}_rebuildPatchGroups(){const e=this._rootTiles;if(null!=e){e[0]?.surface.checkAllTilesWaterproofness(),this._visiblePatchesByOrigin.clear(),this._allPatchesByOrigin.clear();for(const t of e)this._rebuildPatchGroupsForRootTile(t)}}_rebuildPatchGroupsForRootTile(e){const t=this._tileIterator;for(t.resetOne(e);!t.done;){const e=t.next(),i=e.renderData;if(!i){this._numTilesCulled++;continue}const r=i.localOrigin;if(this._castShadows||this._inViewshed||this._cutFillEnabled){let t=this._allPatchesByOrigin.get(r);t||(t=[],this._allPatchesByOrigin.set(r,t)),t.push(e)}if(!e.visible){this._numTilesCulled++,t.skipSubtree();continue}let s=this._visiblePatchesByOrigin.get(r);s||(s=[],this._visiblePatchesByOrigin.set(r,s)),s.push(e),t.skipSubtree()}}_useStencilForTile(e){for(const t of this._stencilEnabledLayerExtents)if(e.intersectsExtent(t))return!0;return!1}_renderAuxiliaryPass(e,t,i){const{rctx:r,bind:s}=e;r.bindTechnique(t,s,this._passParameters);const n=this._stencilEnabledLayerExtents.length>0;i.forEach(i=>{this._drawParameters.origin=i[0].renderData.localOrigin,t.program.bindDraw(s,this._passParameters,this._drawParameters);for(let r=0;r<i.length;r++)this._renderPatch(e,t,i[r],V.TRIANGLES,n,null===this._passParameters.overlayContent)}),r.bindVAO(null)}_renderMaterialPass(e,t){const{rctx:i,bind:r}=e,s=i.bindTechnique(t,r,this._passParameters);this._numTilesRendered=0,this._numTilesCulled=0,this._numOriginsRendered=0;const n=9===r.slot;n&&(s.bindTexture("tex",i.emptyTexture),s.setUniform3fv("textureOpacities",d),s.setUniform4fv("texOffsetAndScale",f));const a=null!=this._tileRenderer?.backgroundColor?this._tileRenderer.backgroundColor:d;1===this._configuration.tileBlendInput&&s.setUniform3fv("backgroundColor",a);const l=this._stencilEnabledLayerExtents.length>0,o=this.wireframe?V.LINES:V.TRIANGLES;this._configuration.textureFadingEnabled&&s.bindTexture("texNext",i.emptyTexture);const c=this._visiblePatchesByOrigin;for(const h of c.values()){const i=h[0].renderData.localOrigin;this._drawParameters.origin=i,t.program.bindDraw(r,this._passParameters,this._drawParameters),this._numOriginsRendered++;for(const r of h){const i=r.renderData,a=i.textureReference;if(null!=a){if(!n){s.setUniform4fv("texOffsetAndScale",a.offsetAndScale),s.bindTexture("tex",a.texture.texture);const e=i.textureFadeFactor,t=e<1?i.nextTextureReference:null;this._configuration.textureFadingEnabled&&t&&e<1?(s.setUniform1f("fadeFactor",e),s.setUniform4fv("nextTexOffsetAndScale",t.offsetAndScale),s.setUniform3fv("nextTexOpacities",t.opacities),s.bindTexture("texNext",t.texture.texture)):s.setUniform1f("fadeFactor",1),i.textureIsFading&&this.setNeedsRender(2),s.setUniform3fv("textureOpacities",a.opacities)}this._renderPatch(e,t,r,o,l),r.renderOrder=this._numTilesRendered,this._numTilesRendered++}}}i.bindVAO(null)}_renderPatch(e,t,i,r,s,n=!1){const a=i.renderData,l=a.vao,o=l?.indexBuffer;if(!l||null==o)return void(R&&console.error("Rendered tile with no indices: ",i.lij," : ",a));const c=t.program;n||this._overlayRenderer.isEmpty||this._bindOverlayPatchData(c,a.overlay);const{rctx:h,bind:d}=e;s&&(this._passParameters.useStencil=this._useStencilForTile(i),h.setPipelineState(t.getPipeline(d,this._passParameters)));const u=a.geometry.indexCount;h.bindVAO(l),c.assertCompatibleVertexAttributeLocations(l),h.drawElements(r,u,o.indexType,0)}_bindOverlayPatchData(e,t){e.setUniform4fv("overlayTexOffset",t.offsets),e.setUniform4fv("overlayTexScale",t.scales)}_acquireTechnique(e){return this._configuration.output=e,this._techniques.get(N,this._configuration)}get test(){}hasHighlight(e){return this._overlayRenderer.hasHighlight(e)}};e([a({readOnly:!0})],Z.prototype,"visibleTiles",null),e([a({readOnly:!0})],Z.prototype,"_isGlobal",null),e([a()],Z.prototype,"renderOccludedFlags",null),e([a({value:!1})],Z.prototype,"renderingDisabled",null),e([a({value:!0})],Z.prototype,"visible",null),e([a()],Z.prototype,"renderPatchBorders",null),e([a()],Z.prototype,"wireframe",null),Z=e([l("esri.views.3d.terrain.TerrainRenderer")],Z);const J=_(),K=_(),X=_(),Y=_();export{Z as TerrainRenderer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/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,multiply as p,invert as u,transpose as l,frustum as _,equals as c,lookAt as v}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as d,exactEquals as y}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as g}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{subtract as m,set as f,distance as x,copy as M,exactEquals as D,sub as j,dot as R,sqrLen as P,sqrDist as V,scale as F,length as C,cross as b,normalize as S,direction as T}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as I,UNIT_Z as A}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{scale as E,equals as O,exactEquals as U,copy as H,squaredDistance as z,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 q,copy as L,fromMatrix as X}from"../../../geometry/support/frustum.js";import{create as G}from"../../../geometry/support/ray.js";import{projectPointSignedLength as N}from"../../../geometry/support/vector.js";import{viewAngle as B}from"../state/utils/viewUtils.js";import{fovd2fovx as J,fovx2fovd as K,fovd2fovy as Q,fovy2fovd as Z}from"../webgl-engine/lib/fov.js";var $;let tt=$=class extends i{constructor(t){super(t),this._ray=G(),this._viewport=Y(0,0,1,1),this._padding=Y(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=g(1,1e3),this._viewDirty=!0,this._viewMatrix=w(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=w(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=w(),this._frustumDirty=!0,this._frustum=q(),this._fullViewport=k(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=I(),this._up=I(),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)}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center,"_center")}get ray(){return m(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 viewForward(){return this._ensureViewClean(),f(I(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),f(I(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),f(I(),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=E(k(),this._viewport,1/this.pixelRatio),i=this._get("screenViewport");return i&&O(t,i)?i:t}get screenPadding(){if(1===this.pixelRatio)return this._padding;const t=E(k(),this._padding,1/this.pixelRatio),i=this._get("screenPadding");return i&&O(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._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._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._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._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._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(t){U(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._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&(p(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return u(w(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||w()}get fov(){return this._fov}set fov(t){this._fov=t,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return J(this._fov,this.width,this.height)}set fovX(t){this._fov=K(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return Q(this._fov,this.width,this.height)}set fovY(t){this._fov=Z(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return x(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(u(this._viewInverseTransposeMatrix,this.viewMatrix),l(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=_(w(),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){M(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"),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||(L(this._frustum,t.frustum),this._frustumDirty=!1),i._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:(a(this._viewInverseTransposeMatrix,t.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),H(this._fullViewport,t.fullViewport),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 $).copyFrom(this)}equals(t){return D(this.eye,t.eye)&&D(this.center,t.center)&&D(this.up,t.up)&&U(this._viewport,t.viewport)&&U(this._padding,t.padding)&&y(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}almostEquals(t){const i=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||z(t.screenPadding,this.screenPadding)>=i||z(this.screenViewport,t.screenViewport)>=i||this.row!==t.row||this.column!==t.column||this.rows!==t.rows||this.columns!==t.columns)return!1;j(st,t.eye,t.center),j(ot,this.eye,this.center);const e=R(st,ot),r=P(st),s=P(ot),o=5e-4;return e*e>=(1-1e-10)*r*s&&V(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(N(this.viewForward,m(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&&M(et,t),et[3]=1,W(et,et,this.projectionMatrix);const e=Math.abs(et[3]);F(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 this.projectToRenderScreen(t,nt),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;F(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(p(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),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-B(i,e,r));return t.frustumCoverage(n,s,o)}_computeUpGlobal(){m(st,this.center,this.eye);const t=C(this.center);t<1?D(this._up,A)&&(M(this._up,A),this._markViewDirty(),this.notifyChange("_up")):Math.abs(R(st,this.center))>.9999*C(st)*t||(b(ot,st,this.center),b(ot,ot,st),S(ot,ot),D(this._up,ot)||(M(this._up,ot),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){T(st,this.eye,this.center),Math.abs(st[2])<=.9999&&(F(st,st,st[2]),f(st,-st[0],-st[1],1-st[2]),S(st,st),D(this._up,st)||(M(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])?D(t,i)||(M(i,t),this._markViewDirty(),r.length&&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&&(X(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&(v(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};t([n()],tt.prototype,"_viewport",void 0),t([n()],tt.prototype,"_padding",void 0),t([n()],tt.prototype,"_fov",void 0),t([n()],tt.prototype,"_nearFar",void 0),t([n()],tt.prototype,"_viewDirty",void 0),t([n()],tt.prototype,"_viewMatrix",void 0),t([n()],tt.prototype,"_pixelRatio",void 0),t([n()],tt.prototype,"pixelRatio",null),t([n()],tt.prototype,"row",void 0),t([n()],tt.prototype,"column",void 0),t([n()],tt.prototype,"_rows",void 0),t([n()],tt.prototype,"rows",null),t([n()],tt.prototype,"_columns",void 0),t([n()],tt.prototype,"columns",null),t([n()],tt.prototype,"eye",null),t([n()],tt.prototype,"center",null),t([n()],tt.prototype,"_center",void 0),t([n()],tt.prototype,"up",null),t([n()],tt.prototype,"_up",void 0),t([n()],tt.prototype,"viewMatrix",null),t([n({readOnly:!0})],tt.prototype,"viewForward",null),t([n({readOnly:!0})],tt.prototype,"viewUp",null),t([n({readOnly:!0})],tt.prototype,"viewRight",null),t([n({readOnly:!0})],tt.prototype,"nearFar",null),t([n()],tt.prototype,"near",null),t([n()],tt.prototype,"far",null),t([n()],tt.prototype,"viewport",null),t([n({readOnly:!0})],tt.prototype,"screenViewport",null),t([n({readOnly:!0})],tt.prototype,"screenPadding",null),t([n()],tt.prototype,"x",null),t([n()],tt.prototype,"y",null),t([n()],tt.prototype,"width",null),t([n()],tt.prototype,"height",null),t([n()],tt.prototype,"fullWidth",null),t([n()],tt.prototype,"fullHeight",null),t([n({readOnly:!0})],tt.prototype,"_aspect",null),t([n()],tt.prototype,"padding",null),t([n({readOnly:!0})],tt.prototype,"projectionMatrix",null),t([n({readOnly:!0})],tt.prototype,"inverseProjectionMatrix",null),t([n()],tt.prototype,"fov",null),t([n()],tt.prototype,"fovX",null),t([n()],tt.prototype,"fovY",null),t([n()],tt.prototype,"viewInverseTransposeMatrix",null),t([n({readOnly:!0})],tt.prototype,"_projectionMatrixInternal",null),t([n()],tt.prototype,"relativeElevation",void 0),tt=$=t([h("esri.views.3d.webgl.RenderCamera")],tt);const it=tt,et=k(),rt=w(),st=I(),ot=I(),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,multiply as p,invert as u,transpose as l,frustum as _,equals as c,lookAt as v}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as d,exactEquals as y}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as g}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{subtract as m,set as f,distance as x,copy as M,exactEquals as D,sub as j,dot as R,sqrLen as P,sqrDist as V,scale as F,length as C,cross as b,normalize as S,direction as T}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{create as I,UNIT_Z as A}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{scale as E,equals as O,exactEquals as U,copy as H,squaredDistance as z,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 q,copy as L,fromMatrix as X}from"../../../geometry/support/frustum.js";import{create as G}from"../../../geometry/support/ray.js";import{projectPointSignedLength as N}from"../../../geometry/support/vector.js";import{viewAngle as B}from"../state/utils/viewUtils.js";import{fovd2fovx as J,fovx2fovd as K,fovd2fovy as Q,fovy2fovd as Z}from"../webgl-engine/lib/fov.js";var $;let tt=$=class extends i{constructor(t){super(t),this._ray=G(),this._viewport=Y(0,0,1,1),this._padding=Y(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=g(1,1e3),this._viewDirty=!0,this._viewMatrix=w(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=w(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=w(),this._frustumDirty=!0,this._frustum=q(),this._fullViewport=k(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=I(),this._up=I(),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)}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center,"_center")}get ray(){return m(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 viewForward(){return this._ensureViewClean(),f(I(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),f(I(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),f(I(),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=E(k(),this._viewport,1/this.pixelRatio),i=this._get("screenViewport");return i&&O(t,i)?i:t}get screenPadding(){if(1===this.pixelRatio)return this._padding;const t=E(k(),this._padding,1/this.pixelRatio),i=this._get("screenPadding");return i&&O(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._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._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._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._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._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(t){U(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._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&(p(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return u(w(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||w()}get fov(){return this._fov}set fov(t){this._fov=t,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return J(this._fov,this.width,this.height)}set fovX(t){this._fov=K(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return Q(this._fov,this.width,this.height)}set fovY(t){this._fov=Z(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return x(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(u(this._viewInverseTransposeMatrix,this.viewMatrix),l(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=_(w(),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){M(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"),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||(L(this._frustum,t.frustum),this._frustumDirty=!1),i._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:(a(this._viewInverseTransposeMatrix,t.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),H(this._fullViewport,t.fullViewport),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 $).copyFrom(this)}equals(t){return D(this.eye,t.eye)&&D(this.center,t.center)&&D(this.up,t.up)&&U(this._viewport,t.viewport)&&U(this._padding,t.padding)&&y(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}almostEquals(t){const i=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||z(t.screenPadding,this.screenPadding)>=i||z(this.screenViewport,t.screenViewport)>=i||this.row!==t.row||this.column!==t.column||this.rows!==t.rows||this.columns!==t.columns)return!1;j(rt,t.eye,t.center),j(st,this.eye,this.center);const e=R(rt,st),r=P(rt),s=P(st),o=5e-4;return e*e>=(1-1e-10)*r*s&&V(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(N(this.viewForward,m(rt,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!==it&&M(it,t),it[3]=1,W(it,it,this.projectionMatrix);const e=Math.abs(it[3]);F(it,it,1/e);const s=this.fullViewport;i[0]=r(0,s[0]+s[2],.5+.5*it[0]),i[1]=r(0,s[1]+s[3],.5+.5*it[1]),i[2]=.5*(it[2]+1),i[3]=e}unapplyProjection(t,i){const e=this.fullViewport;it[0]=(t[0]/(e[0]+e[2])*2-1)*t[3],it[1]=(t[1]/(e[1]+e[3])*2-1)*t[3],it[2]=(2*t[2]-1)*t[3],it[3]=t[3],null!=this.inverseProjectionMatrix&&(W(it,it,this.inverseProjectionMatrix),i[0]=it[0],i[1]=it[1],i[2]=it[2])}projectToScreen(t,i){return this.projectToRenderScreen(t,ot),this.renderToScreen(ot,i),i}projectToRenderScreen(t,i){if(it[0]=t[0],it[1]=t[1],it[2]=t[2],it[3]=1,W(it,it,this.viewProjectionMatrix),0===it[3])return null;const e=it;F(e,e,1/Math.abs(it[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,ot),i)}unprojectFromRenderScreen(t,i){if(p(et,this.projectionMatrix,this.viewMatrix),!u(et,et))return null;const e=this.fullViewport;return it[0]=2*(t[0]-e[0])/e[2]-1,it[1]=2*(t[1]-e[1])/e[3]-1,it[2]=2*t[2]-1,it[3]=1,W(it,it,et),0===it[3]?null:(i[0]=it[0]/it[3],i[1]=it[1]/it[3],i[2]=it[2]/it[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-B(i,e,r));return t.frustumCoverage(n,s,o)}_computeUpGlobal(){m(rt,this.center,this.eye);const t=C(this.center);t<1?D(this._up,A)&&(M(this._up,A),this._markViewDirty(),this.notifyChange("_up")):Math.abs(R(rt,this.center))>.9999*C(rt)*t||(b(st,rt,this.center),b(st,st,rt),S(st,st),D(this._up,st)||(M(this._up,st),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){T(rt,this.eye,this.center),Math.abs(rt[2])<=.9999&&(F(rt,rt,rt[2]),f(rt,-rt[0],-rt[1],1-rt[2]),S(rt,rt),D(this._up,rt)||(M(this._up,rt),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])?D(t,i)||(M(i,t),this._markViewDirty(),r.length&&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&&(X(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&(v(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};t([n()],tt.prototype,"_viewport",void 0),t([n()],tt.prototype,"_padding",void 0),t([n()],tt.prototype,"_fov",void 0),t([n()],tt.prototype,"_nearFar",void 0),t([n()],tt.prototype,"_viewDirty",void 0),t([n()],tt.prototype,"_viewMatrix",void 0),t([n()],tt.prototype,"_pixelRatio",void 0),t([n()],tt.prototype,"pixelRatio",null),t([n()],tt.prototype,"row",void 0),t([n()],tt.prototype,"column",void 0),t([n()],tt.prototype,"_rows",void 0),t([n()],tt.prototype,"rows",null),t([n()],tt.prototype,"_columns",void 0),t([n()],tt.prototype,"columns",null),t([n()],tt.prototype,"eye",null),t([n()],tt.prototype,"center",null),t([n()],tt.prototype,"_center",void 0),t([n()],tt.prototype,"up",null),t([n()],tt.prototype,"_up",void 0),t([n()],tt.prototype,"viewMatrix",null),t([n({readOnly:!0})],tt.prototype,"viewForward",null),t([n({readOnly:!0})],tt.prototype,"viewUp",null),t([n({readOnly:!0})],tt.prototype,"viewRight",null),t([n({readOnly:!0})],tt.prototype,"nearFar",null),t([n()],tt.prototype,"near",null),t([n()],tt.prototype,"far",null),t([n()],tt.prototype,"viewport",null),t([n({readOnly:!0})],tt.prototype,"screenViewport",null),t([n({readOnly:!0})],tt.prototype,"screenPadding",null),t([n()],tt.prototype,"x",null),t([n()],tt.prototype,"y",null),t([n()],tt.prototype,"width",null),t([n()],tt.prototype,"height",null),t([n()],tt.prototype,"fullWidth",null),t([n()],tt.prototype,"fullHeight",null),t([n({readOnly:!0})],tt.prototype,"_aspect",null),t([n()],tt.prototype,"padding",null),t([n({readOnly:!0})],tt.prototype,"projectionMatrix",null),t([n({readOnly:!0})],tt.prototype,"inverseProjectionMatrix",null),t([n()],tt.prototype,"fov",null),t([n()],tt.prototype,"fovX",null),t([n()],tt.prototype,"fovY",null),t([n()],tt.prototype,"viewInverseTransposeMatrix",null),t([n({readOnly:!0})],tt.prototype,"_projectionMatrixInternal",null),t([n()],tt.prototype,"relativeElevation",void 0),tt=$=t([h("esri.views.3d.webgl.RenderCamera")],tt);const it=k(),et=w(),rt=I(),st=I(),ot=o();export{tt as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import t from"../../../core/Error.js";import{watch as i,initial as s}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{RenderNodeOutput as d}from"../webgl.js";import{getFramebufferDrawBuffers as a}from"../../webgl/RenderingContext.js";let u=class extends r{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=d.COMPOSITE,this._dirty=!0}initialize(){this.addHandles([i(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},s)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new t("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,r=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return this._bind(r),r}bindRenderTarget(){return this._bind(this._frameBuffer),this._frameBuffer}_bind({fbo:e}){e.initializeAndBind(),this.gl.drawBuffers(a(e))}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}get requireGeometryDepth(){return!1}queryDepthRange(e){return null}};e([n({constructOnly:!0})],u.prototype,"view",void 0),e([n({constructOnly:!0})],u.prototype,"consumes",void 0),e([n()],u.prototype,"produces",void 0),e([n({readOnly:!0})],u.prototype,"techniques",null),u=e([o("esri.views.3d.webgl.RenderNode")],u);const h=u;export{h as default};
2
+ import{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import t from"../../../core/Error.js";import{watch as i,initial as s}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{RenderNodeOutput as d}from"../webgl.js";import{getFramebufferDrawBuffers as a}from"../../webgl/RenderingContext.js";let u=class extends r{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=d.COMPOSITE,this._dirty=!0}initialize(){this.addHandles([i(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},s)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new t("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,r=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return this._bind(r),r}bindRenderTarget(){return this._bind(this._frameBuffer),this._frameBuffer}_bind({fbo:e}){e.initializeAndBind(),this.gl.drawBuffers(a(e))}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}get requireGeometryDepth(){return!1}queryDepthRange(e){return null}};e([n({constructOnly:!0})],u.prototype,"view",void 0),e([n({constructOnly:!0})],u.prototype,"consumes",void 0),e([n()],u.prototype,"produces",void 0),e([n({readOnly:!0})],u.prototype,"techniques",null),u=e([o("esri.views.3d.webgl.RenderNode")],u);export{u as default};