@arcgis/core 4.28.0-next.20230821 → 4.28.0-next.20230823

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 (668) hide show
  1. package/Basemap.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/arcade/functions/geomasync.js +1 -1
  4. package/arcade/portalUtils.js +1 -1
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/0746319459dbcd3ab6f7.js +1 -0
  7. package/assets/esri/core/workers/chunks/{587437526ea77f764986.js → 0759d4ab9695096d2bbd.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{d0c4367a197b193e95d4.js → 10c014a6d8767ae8a666.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{5ffabd1a90c5b08109aa.js → 196937631ac20795e0ae.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{e05b54a0b834b4e4268e.js → 1c2b69dfcd0db58150e2.js} +1 -1
  11. package/assets/esri/core/workers/chunks/1c2f7c95825fdac790be.js +1 -0
  12. package/assets/esri/core/workers/chunks/1f9c80815f90fd0886d7.js +1 -0
  13. package/assets/esri/core/workers/chunks/217910f88fe2c03e6bdd.js +1 -0
  14. package/assets/esri/core/workers/chunks/238966b2fc6cc3dfcc05.js +1 -0
  15. package/assets/esri/core/workers/chunks/2c9f709d64954b3c1650.js +1 -0
  16. package/assets/esri/core/workers/chunks/35faede04d4539aab6e8.js +1 -0
  17. package/assets/esri/core/workers/chunks/3e3edcbacf8eaf275b97.js +1 -0
  18. package/assets/esri/core/workers/chunks/{b78dc6cbe14e5817b4d9.js → 4968018bc693c053fdd2.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{c35b850fbfcb28133235.js → 49a1ba3e7ea204adeddb.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{12b8fe0374fa9ab4ca09.js → 49cf3ae224f56f45f65b.js} +1 -1
  21. package/assets/esri/core/workers/chunks/5330040eeacc9c03fbdb.js +1 -0
  22. package/assets/esri/core/workers/chunks/54aaa21144431b29b6ed.js +1 -0
  23. package/assets/esri/core/workers/chunks/{6c40f16e6d10321295d8.js → 5b13d28cf5efc312a21c.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{d6c96a20e9640b433719.js → 67c6618339d323460d45.js} +57 -57
  25. package/assets/esri/core/workers/chunks/{dd86f43505b636eb41c0.js → 7714c16f9c8860efd461.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{752d389c7bdcbe7004dc.js → 83e0af5522a672c2c73b.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{873111ddf4813cdd4903.js → 872d0d4bf364be43a92e.js} +1 -1
  28. package/assets/esri/core/workers/chunks/8a784ddd5607f1ddbb5b.js +1 -0
  29. package/assets/esri/core/workers/chunks/{0cad2b991d0d0fd07846.js → 8c9c4162617f31e3f5f2.js} +1 -1
  30. package/assets/esri/core/workers/chunks/8db3ee2931be5cca3f5e.js +1 -0
  31. package/assets/esri/core/workers/chunks/{fd3920159ab9748402a2.js → 92350664e2719a9e860e.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{ff755962fd1c771f5be5.js → a3b461174984a1cb92b3.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{dd4c6d000222798a0317.js → a47aff9c97c5ce52d0dc.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{028534e3d4e13c9ea687.js → a645f08a7678f2ca037c.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{d9fe6cfbc9ad2920ca9c.js → aca45e54ec925002df9a.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{40ff0e7c948615b8bfc0.js → b07d32a60307d04391fc.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{fdc703330bf194a48e0e.js → b086e798f43dacb0175f.js} +1 -1
  38. package/assets/esri/core/workers/chunks/bd0b9647880cbbec95e2.js +1 -0
  39. package/assets/esri/core/workers/chunks/{ab420bacdd63ee8fbd8b.js → bf9b5e2803a5444bd944.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{c58ca2685eb7e559f428.js → c0a2a737a3085690afc5.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{e04e8af4224fff8c3ec3.js → c34615c0b7ad83d1ad24.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{05ab09713d599687afa3.js → d105ee2e394e2c48303c.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{ef03b78659c72de93076.js → d183144fa504064d23d3.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{4f5207abb034375927c7.js → d8495c6dcd4d9bec8dd6.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{1a485d63330f5e7fe4e3.js → dba61fa8cbb57dde54b2.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{8a306e3aa210861b8c17.js → deb0bd575c63d9dbcde5.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{d0a2f9ca338b60f2ba2a.js → e302fe771d92ccf945a3.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{cb0a5bc6deaa98026bb5.js → ed0dea88b2865fc6e06b.js} +1 -1
  49. package/assets/esri/core/workers/chunks/ed733eea5d065131b159.js +1 -0
  50. package/assets/esri/core/workers/chunks/{1c51c52fb2233153d7ae.js → f3ec53ee9567bb7e4d2f.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{4922a0fed7cbc6895882.js → f701a5afa1b730c51a49.js} +1 -1
  52. package/assets/esri/t9n/common.json +1 -1
  53. package/assets/esri/t9n/common_ar.json +1 -1
  54. package/assets/esri/t9n/common_bg.json +1 -1
  55. package/assets/esri/t9n/common_ca.json +1 -1
  56. package/assets/esri/t9n/common_cs.json +1 -1
  57. package/assets/esri/t9n/common_da.json +1 -1
  58. package/assets/esri/t9n/common_de.json +1 -1
  59. package/assets/esri/t9n/common_el.json +1 -1
  60. package/assets/esri/t9n/common_en.json +1 -1
  61. package/assets/esri/t9n/common_es.json +1 -1
  62. package/assets/esri/t9n/common_et.json +1 -1
  63. package/assets/esri/t9n/common_fi.json +1 -1
  64. package/assets/esri/t9n/common_fr.json +1 -1
  65. package/assets/esri/t9n/common_he.json +1 -1
  66. package/assets/esri/t9n/common_hr.json +1 -1
  67. package/assets/esri/t9n/common_hu.json +1 -1
  68. package/assets/esri/t9n/common_id.json +1 -1
  69. package/assets/esri/t9n/common_it.json +1 -1
  70. package/assets/esri/t9n/common_ja.json +1 -1
  71. package/assets/esri/t9n/common_ko.json +1 -1
  72. package/assets/esri/t9n/common_lt.json +1 -1
  73. package/assets/esri/t9n/common_lv.json +1 -1
  74. package/assets/esri/t9n/common_nb.json +1 -1
  75. package/assets/esri/t9n/common_nl.json +1 -1
  76. package/assets/esri/t9n/common_pl.json +1 -1
  77. package/assets/esri/t9n/common_pt-BR.json +1 -1
  78. package/assets/esri/t9n/common_pt-PT.json +1 -1
  79. package/assets/esri/t9n/common_ro.json +1 -1
  80. package/assets/esri/t9n/common_ru.json +1 -1
  81. package/assets/esri/t9n/common_sk.json +1 -1
  82. package/assets/esri/t9n/common_sl.json +1 -1
  83. package/assets/esri/t9n/common_sr.json +1 -1
  84. package/assets/esri/t9n/common_sv.json +1 -1
  85. package/assets/esri/t9n/common_th.json +1 -1
  86. package/assets/esri/t9n/common_tr.json +1 -1
  87. package/assets/esri/t9n/common_uk.json +1 -1
  88. package/assets/esri/t9n/common_vi.json +1 -1
  89. package/assets/esri/t9n/common_zh-CN.json +1 -1
  90. package/assets/esri/t9n/common_zh-TW.json +1 -1
  91. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +10 -17
  92. package/assets/esri/themes/dark/main.css +1 -1
  93. package/assets/esri/themes/light/main.css +1 -1
  94. package/assets/esri/themes/light/view.css +1 -1
  95. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ar.json +1 -0
  96. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_bg.json +1 -0
  97. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_bs.json +1 -0
  98. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ca.json +1 -0
  99. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_cs.json +1 -0
  100. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_da.json +1 -0
  101. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_de.json +1 -0
  102. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_el.json +1 -0
  103. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_es.json +1 -0
  104. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_et.json +1 -0
  105. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_fi.json +1 -0
  106. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_fr.json +1 -0
  107. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_he.json +1 -0
  108. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_hr.json +1 -0
  109. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_hu.json +1 -0
  110. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_id.json +1 -0
  111. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_it.json +1 -0
  112. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ja.json +1 -0
  113. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ko.json +1 -0
  114. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_lt.json +1 -0
  115. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_lv.json +1 -0
  116. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_nb.json +1 -0
  117. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_nl.json +1 -0
  118. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pl.json +1 -0
  119. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pt-BR.json +1 -0
  120. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_pt-PT.json +1 -0
  121. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ro.json +1 -0
  122. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_ru.json +1 -0
  123. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sk.json +1 -0
  124. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sl.json +1 -0
  125. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sr.json +1 -0
  126. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_sv.json +1 -0
  127. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_th.json +1 -0
  128. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_tr.json +1 -0
  129. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_uk.json +1 -0
  130. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_vi.json +1 -0
  131. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-CN.json +1 -0
  132. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-HK.json +1 -0
  133. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_zh-TW.json +1 -0
  134. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  135. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  136. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  137. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  138. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  139. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  140. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  141. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  142. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  143. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  144. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  145. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  146. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  147. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  148. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  149. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  150. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  151. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  152. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  153. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  154. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  155. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  156. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  157. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  158. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  159. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  160. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  161. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  162. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  163. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  164. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  165. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  166. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  167. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  168. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  169. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  170. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  171. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  172. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  173. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ar.json +1 -1
  174. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bg.json +1 -1
  175. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bs.json +1 -1
  176. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ca.json +1 -1
  177. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_cs.json +1 -1
  178. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_da.json +1 -1
  179. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_de.json +1 -1
  180. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_el.json +1 -1
  181. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_es.json +1 -1
  182. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_et.json +1 -1
  183. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fi.json +1 -1
  184. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fr.json +1 -1
  185. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_he.json +1 -1
  186. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hr.json +1 -1
  187. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hu.json +1 -1
  188. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_id.json +1 -1
  189. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_it.json +1 -1
  190. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ja.json +1 -1
  191. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ko.json +1 -1
  192. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lt.json +1 -1
  193. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lv.json +1 -1
  194. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nb.json +1 -1
  195. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nl.json +1 -1
  196. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pl.json +1 -1
  197. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-BR.json +1 -1
  198. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-PT.json +1 -1
  199. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ro.json +1 -1
  200. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ru.json +1 -1
  201. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sk.json +1 -1
  202. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sl.json +1 -1
  203. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sr.json +1 -1
  204. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sv.json +1 -1
  205. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_th.json +1 -1
  206. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_tr.json +1 -1
  207. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_uk.json +1 -1
  208. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_vi.json +1 -1
  209. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-CN.json +1 -1
  210. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-HK.json +1 -1
  211. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-TW.json +1 -1
  212. package/chunks/ChapmanAtmosphere.glsl.js +1 -1
  213. package/chunks/Clouds.glsl.js +1 -1
  214. package/chunks/CloudsComposition.glsl.js +2 -2
  215. package/chunks/ComponentShader.glsl.js +36 -36
  216. package/chunks/Fog.glsl.js +1 -1
  217. package/chunks/LaserlinePath.glsl.js +1 -1
  218. package/chunks/Laserlines.glsl.js +1 -1
  219. package/chunks/LineSeries.js +1 -1
  220. package/chunks/NativeLine.glsl.js +8 -20
  221. package/chunks/PointRenderer.glsl.js +1 -1
  222. package/chunks/Precipitation.glsl.js +2 -2
  223. package/chunks/SSAOBlur.glsl.js +1 -1
  224. package/chunks/ShadowCastAccumulate.glsl.js +1 -1
  225. package/chunks/ShadowCastVisualize.glsl.js +2 -2
  226. package/chunks/ShadowHighlight.glsl.js +1 -1
  227. package/chunks/Stars.glsl.js +1 -1
  228. package/chunks/Terrain.glsl.js +35 -35
  229. package/chunks/TextureOnly.glsl.js +1 -1
  230. package/chunks/Theme.js +1 -1
  231. package/chunks/boundedPlane.js +1 -1
  232. package/chunks/cameraUtilsPlanar.js +1 -1
  233. package/chunks/cameraUtilsSpherical.js +1 -1
  234. package/chunks/chartUtilsAm5.js +1 -1
  235. package/chunks/mat3.js +1 -1
  236. package/chunks/mat3f64.js +1 -1
  237. package/chunks/mat4.js +1 -1
  238. package/chunks/mat4f64.js +1 -1
  239. package/chunks/quat.js +1 -1
  240. package/chunks/quat2.js +1 -1
  241. package/chunks/quatf64.js +1 -1
  242. package/chunks/sphere.js +1 -1
  243. package/chunks/terrainUtilsPlanar.js +1 -1
  244. package/chunks/vec3.js +1 -1
  245. package/chunks/vec3f64.js +1 -1
  246. package/chunks/vec4.js +1 -1
  247. package/chunks/vec4f64.js +1 -1
  248. package/core/VectorStack.js +1 -1
  249. package/core/accessorSupport/decorators/persistable.js +1 -1
  250. package/core/accessorSupport/testSupport.js +1 -1
  251. package/core/colorUtils.js +1 -1
  252. package/core/libs/gl-matrix-2/factories/mat3f64.js +1 -1
  253. package/core/libs/gl-matrix-2/factories/mat4f64.js +1 -1
  254. package/core/libs/gl-matrix-2/factories/quatf64.js +1 -1
  255. package/core/libs/gl-matrix-2/factories/vec3f64.js +1 -1
  256. package/core/libs/gl-matrix-2/factories/vec4f64.js +1 -1
  257. package/core/libs/gl-matrix-2/math/mat3.js +1 -1
  258. package/core/libs/gl-matrix-2/math/mat4.js +1 -1
  259. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  260. package/core/libs/gl-matrix-2/math/vec4.js +1 -1
  261. package/core/mathUtils.js +1 -1
  262. package/core/perspectiveUtils.js +1 -1
  263. package/form/elements/inputs/DatePickerInput.d.ts +4 -0
  264. package/form/elements/inputs/DatePickerInput.js +5 -0
  265. package/form/elements/inputs/DateTimeOffsetPickerInput.d.ts +4 -0
  266. package/form/elements/inputs/DateTimeOffsetPickerInput.js +5 -0
  267. package/form/elements/inputs/TimePickerInput.d.ts +4 -0
  268. package/form/elements/inputs/TimePickerInput.js +5 -0
  269. package/form/elements/support/inputs.js +1 -1
  270. package/geometry/projection/computeTranslationToOriginAndRotation.js +1 -1
  271. package/geometry/projection/projectDirection.js +1 -1
  272. package/geometry/support/MeshTransform.js +1 -1
  273. package/geometry/support/axisAngle.js +1 -1
  274. package/geometry/support/axisAngleDegrees.js +1 -1
  275. package/geometry/support/clipRay.js +1 -1
  276. package/geometry/support/coordinateSystem.js +1 -1
  277. package/geometry/support/frustum.js +1 -1
  278. package/geometry/support/lineSegment.js +1 -1
  279. package/geometry/support/meshUtils/centerAt.js +1 -1
  280. package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
  281. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  282. package/geometry/support/meshUtils/exporters/gltf/node.js +1 -1
  283. package/geometry/support/meshUtils/georeference.js +1 -1
  284. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  285. package/geometry/support/meshUtils/merge.js +1 -1
  286. package/geometry/support/meshUtils/offset.js +1 -1
  287. package/geometry/support/meshUtils/primitives.js +1 -1
  288. package/geometry/support/meshUtils/projection.js +1 -1
  289. package/geometry/support/meshUtils/rotate.js +1 -1
  290. package/geometry/support/meshUtils/scale.js +1 -1
  291. package/geometry/support/meshVertexSpaceUtils.js +1 -1
  292. package/geometry/support/plane.js +1 -1
  293. package/geometry/support/ray.js +1 -1
  294. package/geometry/support/triangle.js +1 -1
  295. package/geometry/support/vector.js +1 -1
  296. package/interfaces.d.ts +405 -7
  297. package/layers/VoxelWasmPerSceneView.js +1 -1
  298. package/layers/mixins/SceneService.js +1 -1
  299. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  300. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  301. package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
  302. package/layers/orientedImagery/transformations/utils.js +1 -1
  303. package/layers/support/ControlPointsGeoreference.js +1 -1
  304. package/layers/support/ImageElement.js +1 -1
  305. package/layers/support/SceneFilter.js +1 -1
  306. package/layers/support/layerUtils.js +1 -1
  307. package/layers/video/VideoCameraSensorModel.js +1 -1
  308. package/layers/voxel/VoxelVolume.js +1 -1
  309. package/layers/voxel/voxelPlaneUtils.js +1 -1
  310. package/package.json +1 -1
  311. package/portal/support/resourceExtension.js +1 -1
  312. package/portal/support/resourceUtils.js +1 -1
  313. package/portal/support/utils.js +5 -0
  314. package/smartMapping/popup/support/utils.js +1 -1
  315. package/smartMapping/raster/renderers/classBreaks.js +1 -1
  316. package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
  317. package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
  318. package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
  319. package/support/revision.js +1 -1
  320. package/symbols/cim/CIMImageColorSubstitutionHelper.js +1 -1
  321. package/symbols/support/previewSymbol3D.js +1 -1
  322. package/views/2d/ViewState.js +1 -1
  323. package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
  324. package/views/2d/engine/imagery/RasterVFTile.js +1 -1
  325. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  326. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  327. package/views/2d/engine/vectorTiles/VectorTileRendererHelper3D.js +1 -1
  328. package/views/2d/engine/webgl/Overlay.js +1 -1
  329. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  330. package/views/2d/engine/webgl/TiledDisplayObject.js +1 -1
  331. package/views/2d/engine/webgl/WGLTile.js +1 -1
  332. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  333. package/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol.js +1 -1
  334. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  335. package/views/2d/interactive/editingTools/manipulations/RotateManipulation.js +1 -1
  336. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  337. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  338. package/views/2d/layers/support/DebugOverlay.js +1 -1
  339. package/views/2d/navigation/actions/Pan.js +1 -1
  340. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  341. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  342. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  343. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  344. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  345. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  346. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  347. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
  348. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  349. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  350. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  351. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  352. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  353. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  354. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  355. package/views/3d/analysis/images/Factory.js +5 -0
  356. package/views/3d/analysis/support/measurementUtils.js +1 -1
  357. package/views/3d/analysis/support/viewUtils.js +1 -1
  358. package/views/3d/animation/pointToPoint/Animation.js +1 -1
  359. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  360. package/views/3d/camera/constraintUtils/altitude.js +1 -1
  361. package/views/3d/camera/constraintUtils/common.js +1 -1
  362. package/views/3d/camera/constraintUtils/distance.js +1 -1
  363. package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
  364. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  365. package/views/3d/camera/intersectionUtils.js +1 -1
  366. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  367. package/views/3d/environment/CloudsGenerator.js +1 -1
  368. package/views/3d/environment/CloudsParameters.js +1 -1
  369. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  370. package/views/3d/environment/Fog.js +1 -1
  371. package/views/3d/environment/LocalAtmosphere.js +1 -1
  372. package/views/3d/environment/MarsAtmosphere.js +1 -1
  373. package/views/3d/environment/SceneViewEnvironment.js +1 -1
  374. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  375. package/views/3d/environment/Stars.js +1 -1
  376. package/views/3d/environment/StarsTechnique.js +1 -1
  377. package/views/3d/externalRenderers.js +1 -1
  378. package/views/3d/glTF/internal/Resource.js +1 -1
  379. package/views/3d/interactive/Manipulator3D.js +1 -1
  380. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  381. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  382. package/views/3d/interactive/editingTools/lineGraphicVisualElementUtils.js +1 -1
  383. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  384. package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
  385. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  386. package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
  387. package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
  388. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  389. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  390. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
  391. package/views/3d/interactive/editingTools/transformGraphic/undoRecords.js +1 -1
  392. package/views/3d/interactive/manipulatorUtils.js +1 -1
  393. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  394. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  395. package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
  396. package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
  397. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  398. package/views/3d/interactive/visualElements/MarkerVisualElement.js +1 -1
  399. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  400. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  401. package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
  402. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  403. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  404. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  405. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  406. package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
  407. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  408. package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
  409. package/views/3d/interactive/visualElements/support/Segment.js +1 -1
  410. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  411. package/views/3d/layers/I3SMeshView3D.js +1 -1
  412. package/views/3d/layers/MediaLayerView3D.js +1 -1
  413. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  414. package/views/3d/layers/PointCloudWorker.js +1 -1
  415. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  416. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  417. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  418. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  419. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  420. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  421. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  422. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  423. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  424. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  425. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  426. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  427. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  428. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  429. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  430. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  431. package/views/3d/layers/graphics/LabelParameters.js +1 -1
  432. package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
  433. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  434. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  435. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  436. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  437. package/views/3d/layers/i3s/I3SElevationProvider.js +1 -1
  438. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  439. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  440. package/views/3d/layers/i3s/I3SProjectionUtil.js +1 -1
  441. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  442. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  443. package/views/3d/layers/i3s/LoDUtil.js +1 -1
  444. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  445. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  446. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  447. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  448. package/views/3d/layers/support/I3STreeDebugger.js +1 -1
  449. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  450. package/views/3d/layers/support/edgeUtils.js +1 -1
  451. package/views/3d/layers/support/patternUtils.js +1 -1
  452. package/views/3d/layers/support/uvUtils.js +1 -1
  453. package/views/3d/state/Frustum.js +1 -1
  454. package/views/3d/state/NearFarHeuristic.js +1 -1
  455. package/views/3d/state/ViewStateManager.js +1 -1
  456. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  457. package/views/3d/state/controllers/RotateController.js +1 -1
  458. package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
  459. package/views/3d/state/controllers/global/ZoomController.js +1 -1
  460. package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
  461. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  462. package/views/3d/state/controllers/local/ZoomController.js +1 -1
  463. package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
  464. package/views/3d/state/controllers/momentum/PanPlanarMomentumController.js +1 -1
  465. package/views/3d/state/controllers/momentum/PanSphericalMomentumController.js +1 -1
  466. package/views/3d/state/controllers/momentum/RotationMomentumController.js +1 -1
  467. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  468. package/views/3d/state/controllers/momentum/ZoomSphericalMomentumController.js +1 -1
  469. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  470. package/views/3d/state/utils/navigationUtils.js +1 -1
  471. package/views/3d/state/utils/viewUtils.js +1 -1
  472. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  473. package/views/3d/support/LaserLineRenderer.js +1 -1
  474. package/views/3d/support/LaserlinePathData.js +1 -1
  475. package/views/3d/support/RenderCoordsHelper.js +1 -1
  476. package/views/3d/support/StreamTextureCollection.js +1 -1
  477. package/views/3d/support/TextureCollection.js +1 -1
  478. package/views/3d/support/cameraUtils.js +1 -1
  479. package/views/3d/support/cameraUtilsInternal.js +1 -1
  480. package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
  481. package/views/3d/support/geometryUtils/ray.js +1 -1
  482. package/views/3d/support/intersectionUtils.js +1 -1
  483. package/views/3d/support/mathUtils.js +1 -1
  484. package/views/3d/support/orientedBoundingBox.js +1 -1
  485. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  486. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  487. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  488. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  489. package/views/3d/support/sunUtils.js +1 -1
  490. package/views/3d/support/viewpointUtils.js +1 -1
  491. package/views/3d/terrain/Overlay.js +1 -1
  492. package/views/3d/terrain/OverlayContent.js +5 -0
  493. package/views/3d/terrain/OverlayManager.js +1 -1
  494. package/views/3d/terrain/OverlayRenderTarget.js +1 -1
  495. package/views/3d/terrain/OverlayRenderer.js +1 -1
  496. package/views/3d/terrain/PatchGeometry.js +1 -1
  497. package/views/3d/terrain/PatchRenderData.js +1 -1
  498. package/views/3d/terrain/SphericalPatch.js +1 -1
  499. package/views/3d/terrain/TerrainRenderer.js +1 -1
  500. package/views/3d/terrain/TerrainSurface.js +1 -1
  501. package/views/3d/terrain/TextureReference.js +1 -1
  502. package/views/3d/terrain/Tile.js +1 -1
  503. package/views/3d/terrain/TileCompositor.js +1 -1
  504. package/views/3d/terrain/TileOverlayData.js +1 -1
  505. package/views/3d/terrain/TileRenderInfo.js +1 -1
  506. package/views/3d/terrain/interfaces.js +1 -1
  507. package/views/3d/terrain/support/MultiSizeFramebuffer.js +1 -1
  508. package/views/3d/webgl-engine/Stage.js +1 -1
  509. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  510. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  511. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  512. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  513. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  514. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +1 -1
  515. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +1 -1
  516. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +1 -1
  517. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +1 -1
  518. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
  519. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +32 -53
  520. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +6 -6
  521. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Terrain.glsl.js +1 -1
  522. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
  523. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  524. package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
  525. package/views/3d/webgl-engine/effects/highlight/HighlightPassParameters.js +1 -1
  526. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  527. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
  528. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  529. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  530. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  531. package/views/3d/webgl-engine/lib/CascadeCamera.js +1 -1
  532. package/views/3d/webgl-engine/lib/ContentObject.js +1 -1
  533. package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
  534. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  535. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  536. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  537. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  538. package/views/3d/webgl-engine/lib/ITexture.js +5 -0
  539. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  540. package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
  541. package/views/3d/webgl-engine/lib/LocalOriginManager.js +1 -1
  542. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  543. package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +1 -1
  544. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  545. package/views/3d/webgl-engine/lib/Path.js +1 -1
  546. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  547. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  548. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  549. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  550. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  551. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  552. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  553. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  554. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  555. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  556. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  557. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  558. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  559. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderParameters.js +1 -1
  560. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  561. package/views/3d/webgl-engine/lib/edgeRendering/edgeBufferWriters.js +1 -1
  562. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  563. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  564. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  565. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  566. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  567. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  568. package/views/3d/webgl-engine/lib/octreeUtils.js +1 -1
  569. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  570. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  571. package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
  572. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  573. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  574. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  575. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  576. package/views/3d/webgl-engine/materials/LineDrawParameters.js +1 -1
  577. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  578. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  579. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  580. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  581. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  582. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  583. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  584. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  585. package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
  586. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  587. package/views/3d/webgl-engine/parts/Model.js +1 -1
  588. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  589. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
  590. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  591. package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +1 -1
  592. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  593. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  594. package/views/GroundView.js +1 -1
  595. package/views/SceneView.js +1 -1
  596. package/views/draw/DrawManipulator.js +1 -1
  597. package/views/draw/support/createUtils.js +1 -1
  598. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  599. package/views/interactive/GraphicManipulator.js +1 -1
  600. package/views/interactive/ManipulatorCollection.js +1 -1
  601. package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
  602. package/views/interactive/coordinateHelper.js +1 -1
  603. package/views/interactive/dragEventPipeline.js +1 -1
  604. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  605. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  606. package/views/interactive/sketch/constraints.js +1 -1
  607. package/views/interactive/sketch/normalizedPoint.js +1 -1
  608. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  609. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  610. package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
  611. package/views/interactive/snapping/candidates/RightAngleTriangleSnappingCandidate.js +1 -1
  612. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  613. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  614. package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
  615. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  616. package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
  617. package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
  618. package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
  619. package/views/interactive/support/viewUtils.js +1 -1
  620. package/views/interactive/tooltip/constraintUtils.js +1 -1
  621. package/views/navigation/PanPlanarMomentumEstimator.js +1 -1
  622. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  623. package/views/navigation/gamepadAndKeyboardUtils.js +1 -1
  624. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  625. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  626. package/views/support/geometry3dUtils.js +1 -1
  627. package/views/support/layerViewUtils.js +1 -1
  628. package/webdoc/support/saveUtils.js +1 -1
  629. package/webscene/Slide.js +1 -1
  630. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  631. package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
  632. package/widgets/Editor/EditorViewModel.js +1 -1
  633. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  634. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  635. package/widgets/Editor/UpdateWorkflow.js +1 -1
  636. package/widgets/Editor/workflowUtils.js +1 -1
  637. package/widgets/Editor.js +1 -1
  638. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  639. package/widgets/ElevationProfile/support/constants.js +1 -1
  640. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  641. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  642. package/widgets/OrientedImageryViewer.js +1 -1
  643. package/widgets/Sketch.js +1 -1
  644. package/widgets/smartMapping/BinaryColorSizeSlider/BinaryColorSizeSliderViewModel.d.ts +4 -0
  645. package/widgets/smartMapping/BinaryColorSizeSlider.d.ts +4 -0
  646. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  647. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  648. package/widgets/support/templateUtils.js +5 -0
  649. package/assets/esri/core/workers/chunks/19857e5420cdf23c5f2e.js +0 -1
  650. package/assets/esri/core/workers/chunks/26289742b9280f0b5247.js +0 -1
  651. package/assets/esri/core/workers/chunks/46f6b77e586d78aeb75c.js +0 -1
  652. package/assets/esri/core/workers/chunks/4e39252f40bc57be9d12.js +0 -1
  653. package/assets/esri/core/workers/chunks/54513578f735d274a20e.js +0 -1
  654. package/assets/esri/core/workers/chunks/8dab0acdbbd5c282645a.js +0 -1
  655. package/assets/esri/core/workers/chunks/8e4b01a0cb8c8926f2b6.js +0 -1
  656. package/assets/esri/core/workers/chunks/a3a1d4f32e518e97d071.js +0 -1
  657. package/assets/esri/core/workers/chunks/b2d4a56197dcabdbae35.js +0 -1
  658. package/assets/esri/core/workers/chunks/be0565d923afba7ca300.js +0 -1
  659. package/assets/esri/core/workers/chunks/c99fa4189a114370b004.js +0 -1
  660. package/assets/esri/core/workers/chunks/daa79c14150c12d8bc3d.js +0 -1
  661. package/assets/esri/core/workers/chunks/ebd006fcd568a7731115.js +0 -1
  662. package/assets/esri/core/workers/chunks/f67388c4b7103fda6633.js +0 -1
  663. package/views/3d/analysis/Slice/images/Factory.js +0 -5
  664. /package/assets/esri/views/3d/analysis/{Slice/images → images}/heading-rotate.ts.svg +0 -0
  665. /package/assets/esri/views/3d/analysis/{Slice/images → images}/tilt-rotate.ts.svg +0 -0
  666. /package/views/3d/analysis/{Slice/images → images}/generateTextures.js +0 -0
  667. /package/views/3d/analysis/{Slice/images → images}/heading-rotate-svg.js +0 -0
  668. /package/views/3d/analysis/{Slice/images → images}/tilt-rotate-svg.js +0 -0
@@ -2,26 +2,26 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{OverlaySource as e}from"../../../../terrain/Overlay.js";import{ReadShadowMapPassParameters as t}from"../shading/ReadShadowMap.glsl.js";import{BackgroundGrid as o}from"./BackgroundGrid.glsl.js";import{TileBlendInput as r}from"./TileBlendInput.js";import{glsl as c}from"../../shaderModules/interfaces.js";import{Uniform as n}from"../../shaderModules/Uniform.js";class s extends t{constructor(){super(...arguments),this.overlayOpacity=1,this.overlaySource=e.None}}function a(e,t){const{vertex:n,fragment:s,varyings:a}=e;a.add("vtc","vec2"),n.uniforms.add(new l("texOffsetAndScale")),s.uniforms.add(new u("tex")),s.uniforms.add(new i("textureOpacities"));const x=t.textureFadingEnabled&&!t.renderOccluded;x&&(n.uniforms.add(new l("nextTexOffsetAndScale")),a.add("nvtc","vec2"),s.uniforms.add(new u("texNext")),s.uniforms.add(new i("nextTexOpacities")),s.uniforms.add(new d("fadeFactor")));const f=t.tileBlendInput===r.ColorComposite,v=t.tileBlendInput===r.GridComposite;v&&s.include(o),f&&s.uniforms.add(new i("backgroundColor")),n.code.add(c`
5
+ import{ReadShadowMapPassParameters as e}from"../shading/ReadShadowMap.glsl.js";import{BackgroundGrid as t}from"./BackgroundGrid.glsl.js";import{TileBlendInput as o}from"./TileBlendInput.js";import{glsl as r}from"../../shaderModules/interfaces.js";import{Uniform as c}from"../../shaderModules/Uniform.js";class n extends e{constructor(){super(...arguments),this.overlayOpacity=1}}function s(e,c){const{vertex:n,fragment:s,varyings:u}=e;u.add("vtc","vec2"),n.uniforms.add(new i("texOffsetAndScale")),s.uniforms.add(new l("tex")),s.uniforms.add(new a("textureOpacities"));const x=c.textureFadingEnabled&&!c.renderOccluded;x&&(n.uniforms.add(new i("nextTexOffsetAndScale")),u.add("nvtc","vec2"),s.uniforms.add(new l("texNext")),s.uniforms.add(new a("nextTexOpacities")),s.uniforms.add(new d("fadeFactor")));const f=c.tileBlendInput===o.ColorComposite,v=c.tileBlendInput===o.GridComposite;v&&s.include(t),f&&s.uniforms.add(new a("backgroundColor")),n.code.add(r`
6
6
  void forwardTextureCoordinatesWithTransform(in vec2 uv) {
7
7
  vtc = uv * texOffsetAndScale.zw + texOffsetAndScale.xy;
8
- ${x?c`nvtc = uv * nextTexOffsetAndScale.zw + nextTexOffsetAndScale.xy;`:c``}
9
- }`),s.code.add(c`
8
+ ${x?r`nvtc = uv * nextTexOffsetAndScale.zw + nextTexOffsetAndScale.xy;`:r``}
9
+ }`),s.code.add(r`
10
10
  vec4 getColor(vec4 color, vec2 uv, vec3 opacities) {
11
- ${v||f?c`
11
+ ${v||f?r`
12
12
  if (opacities.y <= 0.0) {
13
13
  return color * opacities.z * opacities.x;
14
14
  }
15
- vec4 bg = vec4(${f?c`backgroundColor`:c`gridColor(uv)`} * opacities.y, opacities.y);
15
+ vec4 bg = vec4(${f?r`backgroundColor`:r`gridColor(uv)`} * opacities.y, opacities.y);
16
16
  vec4 layer = color * opacities.z;
17
- return (bg * (1.0 - layer.a) + layer) * opacities.x;`:c`return color;`}
18
- }`),x?s.code.add(c`vec4 getTileColor() {
17
+ return (bg * (1.0 - layer.a) + layer) * opacities.x;`:r`return color;`}
18
+ }`),x?s.code.add(r`vec4 getTileColor() {
19
19
  vec4 color = getColor(texture(tex, vtc), vtc, textureOpacities);
20
20
  if (fadeFactor >= 1.0) {
21
21
  return color;
22
22
  }
23
23
  vec4 nextColor = getColor(texture(texNext, nvtc), nvtc, nextTexOpacities);
24
24
  return mix(nextColor, color, fadeFactor);
25
- }`):s.code.add(c`vec4 getTileColor() {
25
+ }`):s.code.add(r`vec4 getTileColor() {
26
26
  return getColor(texture(tex, vtc), vtc, textureOpacities);
27
- }`)}class d extends n{constructor(e){super(e,"float")}}class i extends n{constructor(e){super(e,"vec3")}}class l extends n{constructor(e){super(e,"vec4")}}class u extends n{constructor(e){super(e,"sampler2D")}}export{i as Float3Uniform,s as OverlayTerrainPassParameters,a as TerrainTexture,u as Texture2DUniform};
27
+ }`)}class d extends c{constructor(e){super(e,"float")}}class a extends c{constructor(e){super(e,"vec3")}}class i extends c{constructor(e){super(e,"vec4")}}class l extends c{constructor(e){super(e,"sampler2D")}}export{a as Float3Uniform,n as OverlayTerrainPassParameters,s as TerrainTexture,l as Texture2DUniform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{w as r}from"../../../../../../chunks/mat4.js";import{c as a}from"../../../../../../chunks/mat4f64.js";import{s as e}from"../../../../../../chunks/vec3.js";import{Z as i,c as o}from"../../../../../../chunks/vec3f64.js";import{Float3DrawUniform as s}from"../../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as n}from"../../shaderModules/Float3PassUniform.js";import{FloatPassUniform as t}from"../../shaderModules/FloatPassUniform.js";import{Matrix4DrawUniform as m}from"../../shaderModules/Matrix4DrawUniform.js";import{Matrix4PassUniform as c}from"../../shaderModules/Matrix4PassUniform.js";function f(r,a){a.instancedDoublePrecision?r.constants.add("cameraPosition","vec3",i):r.uniforms.add(new s("cameraPosition",((r,a)=>e(w,a.camera.viewInverseTransposeMatrix[3]-r.origin[0],a.camera.viewInverseTransposeMatrix[7]-r.origin[1],a.camera.viewInverseTransposeMatrix[11]-r.origin[2]))))}function d(a,i){if(!i.instancedDoublePrecision)return void a.uniforms.add(new c("proj",((r,a)=>a.camera.projectionMatrix)),new m("view",((a,e)=>r(v,e.camera.viewMatrix,a.origin))),new s("localOrigin",(r=>r.origin)));const o=r=>e(w,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]);a.uniforms.add(new c("proj",((r,a)=>a.camera.projectionMatrix)),new c("view",((a,e)=>r(v,e.camera.viewMatrix,o(e)))),new n("localOrigin",((r,a)=>o(a))))}const v=a(),w=o();function p(r){r.uniforms.add(new c("viewNormal",((r,a)=>a.camera.viewInverseTransposeMatrix)))}function u(r){r.uniforms.add(new t("pixelRatio",((r,a)=>a.camera.pixelRatio/a.overlayStretch)))}export{f as addCameraPosition,u as addPixelRatio,d as addProjViewLocalOrigin,p as addViewNormal};
5
+ import{w as r}from"../../../../../../chunks/mat4.js";import{a}from"../../../../../../chunks/mat4f64.js";import{s as e}from"../../../../../../chunks/vec3.js";import{Z as i,c as o}from"../../../../../../chunks/vec3f64.js";import{Float3DrawUniform as s}from"../../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as n}from"../../shaderModules/Float3PassUniform.js";import{FloatPassUniform as t}from"../../shaderModules/FloatPassUniform.js";import{Matrix4DrawUniform as m}from"../../shaderModules/Matrix4DrawUniform.js";import{Matrix4PassUniform as c}from"../../shaderModules/Matrix4PassUniform.js";function f(r,a){a.instancedDoublePrecision?r.constants.add("cameraPosition","vec3",i):r.uniforms.add(new s("cameraPosition",((r,a)=>e(w,a.camera.viewInverseTransposeMatrix[3]-r.origin[0],a.camera.viewInverseTransposeMatrix[7]-r.origin[1],a.camera.viewInverseTransposeMatrix[11]-r.origin[2]))))}function d(a,i){if(!i.instancedDoublePrecision)return void a.uniforms.add(new c("proj",((r,a)=>a.camera.projectionMatrix)),new m("view",((a,e)=>r(v,e.camera.viewMatrix,a.origin))),new s("localOrigin",(r=>r.origin)));const o=r=>e(w,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]);a.uniforms.add(new c("proj",((r,a)=>a.camera.projectionMatrix)),new c("view",((a,e)=>r(v,e.camera.viewMatrix,o(e)))),new n("localOrigin",((r,a)=>o(a))))}const v=a(),w=o();function p(r){r.uniforms.add(new c("viewNormal",((r,a)=>a.camera.viewInverseTransposeMatrix)))}function u(r){r.uniforms.add(new t("pixelRatio",((r,a)=>a.camera.pixelRatio/a.overlayStretch)))}export{f as addCameraPosition,u as addPixelRatio,d as addProjViewLocalOrigin,p as addViewNormal};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{i as s,A as t,e as h,b as i}from"../../../../../chunks/vec3.js";import{c as o}from"../../../../../chunks/vec3f32.js";import{c as r}from"../../../../../chunks/vec3f64.js";class e{constructor(s){this._low=r(),this._high=r(),s&&this.set(s)}get low(){return this._low}get high(){return this._high}set(h){s(this._low,s(c,h));const i=t(c,h,this._low);s(this._high,i)}get(s){return h(s,this._low,this._high)}getLowScaled(s){return i(s,this._low,1)}}const c=o();export{e as TwoVectorPosition};
5
+ import{c as s,r as t,g as h,i}from"../../../../../chunks/vec3.js";import{c as o}from"../../../../../chunks/vec3f32.js";import{c as r}from"../../../../../chunks/vec3f64.js";class c{constructor(s){this._low=r(),this._high=r(),s&&this.set(s)}get low(){return this._low}get high(){return this._high}set(h){s(this._low,s(e,h));const i=t(e,h,this._low);s(this._high,i)}get(s){return h(s,this._low,this._high)}getLowScaled(s){return i(s,this._low,1)}}const e=o();export{c as TwoVectorPosition};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{f as s}from"../../../../../chunks/vec4f64.js";import{NoParameters as t}from"../../core/shaderModules/interfaces.js";class c extends t{constructor(){super(...arguments),this.color=s(1,0,1,1),this.haloColor=s(1,0,1,1),this.haloOpacity=1,this.haloOpacityOccluded=.25,this.fillOpacity=.2,this.fillOpacityOccluded=.05}}export{c as HighlightPassParameters};
5
+ import{a as s}from"../../../../../chunks/vec4f64.js";import{NoParameters as t}from"../../core/shaderModules/interfaces.js";class c extends t{constructor(){super(...arguments),this.color=s(1,0,1,1),this.haloColor=s(1,0,1,1),this.haloOpacity=1,this.haloOpacityOccluded=.25,this.fillOpacity=.2,this.fillOpacityOccluded=.05}}export{c as HighlightPassParameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../chunks/tslib.es6.js";import{unitRGBAFromColor as e}from"../../../../../core/colorUtils.js";import{smoothstep as s,clamp as i}from"../../../../../core/mathUtils.js";import{watch as r,syncAndInitial as a}from"../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as h}from"../../../../../core/accessorSupport/decorators/subclass.js";import{n as c,s as n,d as p}from"../../../../../chunks/vec3.js";import{c as d}from"../../../../../chunks/vec3f64.js";import{ViewingMode as m}from"../../../../ViewingMode.js";import{ShaderOutput as l}from"../../core/shaderLibrary/ShaderOutput.js";import{ReadShadowMapDrawParameters as u}from"../../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{SyncRenderPlugin as _}from"../RenderPlugin.js";import{defaultShadowOpacity as w,defaultShadowDifference as g,defaultShadowColor as f}from"./HighlightDefaults.js";import{ShadowHighlightPassParameters as y,ShadowHighlightTechnique as O}from"./ShadowHighlightTechnique.js";import{RenderSlot as x}from"../../lib/RenderSlot.js";const b=.001953125,P=4e4,j=5e4;let v=class extends _{constructor(t){super(t),this.renderSlots=[x.SHADOW_HIGHLIGHT],this._maxOpacity=1,this._passParameters=new y,this._drawParameters=new u,this._shadowDifference=.2,this._context=null}produces(t){return t===x.SHADOW_HIGHLIGHT&&this._isVisible}consumes(t){return t===l.Highlight}initializeRenderContext(t){this._context=t,this.addHandles([r((()=>this.view.highlightOptions.shadowOpacity),(t=>{this._passParameters.shadowOpacity=t??w,this._updateOccludedShadowOpacity(),this._updateMaxOpacity()}),a),r((()=>this.view.highlightOptions.shadowDifference),(t=>{this._shadowDifference=t??g,this._updateOccludedShadowOpacity(),this._updateMaxOpacity()}),a),r((()=>this.view.highlightOptions.shadowColor),(t=>{this._passParameters.shadowColor=e(t??f),this._updateMaxOpacity()}),a)])}_updateOccludedShadowOpacity(){this._passParameters.occludedShadowOpacity=this._passParameters.shadowOpacity*(1-this._shadowDifference)}_updateMaxOpacity(){const t=Math.max(this._passParameters.shadowOpacity,this._passParameters.occludedShadowOpacity);this._maxOpacity=t*this._passParameters.shadowColor[3]}uninitializeRenderContext(){this._context=null}enable(){this._context&&null==this._technique&&(this._technique=this._context.techniqueRepository.acquire(O))}render(t,e,s,i){if(!(this._context&&s&&s.highlightTexture&&this._isVisible))return;if(!this._technique?.compiled)return void this._context.requestRender();const r=t.bindParameters;if(!r.shadowMap.enabled||!r.linearDepth)return;const a=t.rctx,o=this._technique;this._passParameters.highlight=s.highlightTexture,this._drawParameters.origin=r.camera.center,a.bindFramebuffer(i),a.bindTechnique(o,this._passParameters,r).bindDraw(this._drawParameters,r,this._passParameters),a.screen.draw()}updateParameters(t,e){this._passParameters.opacityElevation=1-s(P,j,t.relativeElevation);const r=this.viewingMode===m.Global?c(S,t.center):n(S,0,0,1),a=p(r,e);this._passParameters.dayNightTerminator=s(0,1,i(30*a,0,1)),this._isVisible&&this.enable()}get _isVisible(){const{opacityElevation:t,dayNightTerminator:e}=this._passParameters;return this._maxOpacity*t*e>=b}};t([o()],v.prototype,"_context",void 0),t([o()],v.prototype,"view",void 0),t([o()],v.prototype,"viewingMode",void 0),v=t([h("esri.views.3d.webgl-engine.lib.ShadowHighlight")],v);const S=d();export{v as ShadowHighlight};
5
+ import{_ as t}from"../../../../../chunks/tslib.es6.js";import{unitRGBAFromColor as e}from"../../../../../core/colorUtils.js";import{smoothstep as s,clamp as i}from"../../../../../core/mathUtils.js";import{watch as r,syncAndInitial as a}from"../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as h}from"../../../../../core/accessorSupport/decorators/subclass.js";import{n as c,s as n,j as p}from"../../../../../chunks/vec3.js";import{c as d}from"../../../../../chunks/vec3f64.js";import{ViewingMode as m}from"../../../../ViewingMode.js";import{ShaderOutput as l}from"../../core/shaderLibrary/ShaderOutput.js";import{ReadShadowMapDrawParameters as u}from"../../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{SyncRenderPlugin as _}from"../RenderPlugin.js";import{defaultShadowOpacity as w,defaultShadowDifference as g,defaultShadowColor as f}from"./HighlightDefaults.js";import{ShadowHighlightPassParameters as y,ShadowHighlightTechnique as O}from"./ShadowHighlightTechnique.js";import{RenderSlot as x}from"../../lib/RenderSlot.js";const b=.001953125,P=4e4,j=5e4;let v=class extends _{constructor(t){super(t),this.renderSlots=[x.SHADOW_HIGHLIGHT],this._maxOpacity=1,this._passParameters=new y,this._drawParameters=new u,this._shadowDifference=.2,this._context=null}produces(t){return t===x.SHADOW_HIGHLIGHT&&this._isVisible}consumes(t){return t===l.Highlight}initializeRenderContext(t){this._context=t,this.addHandles([r((()=>this.view.highlightOptions.shadowOpacity),(t=>{this._passParameters.shadowOpacity=t??w,this._updateOccludedShadowOpacity(),this._updateMaxOpacity()}),a),r((()=>this.view.highlightOptions.shadowDifference),(t=>{this._shadowDifference=t??g,this._updateOccludedShadowOpacity(),this._updateMaxOpacity()}),a),r((()=>this.view.highlightOptions.shadowColor),(t=>{this._passParameters.shadowColor=e(t??f),this._updateMaxOpacity()}),a)])}_updateOccludedShadowOpacity(){this._passParameters.occludedShadowOpacity=this._passParameters.shadowOpacity*(1-this._shadowDifference)}_updateMaxOpacity(){const t=Math.max(this._passParameters.shadowOpacity,this._passParameters.occludedShadowOpacity);this._maxOpacity=t*this._passParameters.shadowColor[3]}uninitializeRenderContext(){this._context=null}enable(){this._context&&null==this._technique&&(this._technique=this._context.techniqueRepository.acquire(O))}render(t,e,s,i){if(!(this._context&&s&&s.highlightTexture&&this._isVisible))return;if(!this._technique?.compiled)return void this._context.requestRender();const r=t.bindParameters;if(!r.shadowMap.enabled||!r.linearDepth)return;const a=t.rctx,o=this._technique;this._passParameters.highlight=s.highlightTexture,this._drawParameters.origin=r.camera.center,a.bindFramebuffer(i),a.bindTechnique(o,this._passParameters,r).bindDraw(this._drawParameters,r,this._passParameters),a.screen.draw()}updateParameters(t,e){this._passParameters.opacityElevation=1-s(P,j,t.relativeElevation);const r=this.viewingMode===m.Global?c(S,t.center):n(S,0,0,1),a=p(r,e);this._passParameters.dayNightTerminator=s(0,1,i(30*a,0,1)),this._isVisible&&this.enable()}get _isVisible(){const{opacityElevation:t,dayNightTerminator:e}=this._passParameters;return this._maxOpacity*t*e>=b}};t([o()],v.prototype,"_context",void 0),t([o()],v.prototype,"view",void 0),t([o()],v.prototype,"viewingMode",void 0),v=t([h("esri.views.3d.webgl-engine.lib.ShadowHighlight")],v);const S=d();export{v as ShadowHighlight};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{f as r}from"../../../../../chunks/vec4f64.js";import{ReadShadowMapPassParameters as e}from"../../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{ReloadableShaderModule as i}from"../../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t}from"../../core/shaderTechnique/ShaderTechnique.js";import{Default3D as o}from"../../lib/DefaultVertexAttributeLocations.js";import{Program as s}from"../../lib/Program.js";import{ShadowConfiguration as a}from"../../shaders/ShadowConfiguration.js";import{S as h}from"../../../../../chunks/ShadowHighlight.glsl.js";import{BlendFactor as n,PrimitiveType as d}from"../../../../webgl/enums.js";import{makePipelineState as l,separateBlendingParams as m,defaultColorWriteParams as c}from"../../../../webgl/renderState.js";class p extends e{constructor(){super(...arguments),this.shadowColor=r(1,0,1,1),this.shadowOpacity=.2,this.occludedShadowOpacity=.1,this.opacityElevation=1,this.dayNightTerminator=1}}class u extends t{constructor(r){super(r,new a,(()=>this.destroy()))}initializeProgram(r){return new s(r.rctx,u.shader.get().build(this.configuration),o)}initializePipeline(){return l({blending:m(n.SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA),colorWrite:c,depthTest:null,depthWrite:null})}get primitiveType(){return d.TRIANGLE_STRIP}}u.shader=new i(h,(()=>import("../../shaders/ShadowHighlight.glsl.js")));export{p as ShadowHighlightPassParameters,u as ShadowHighlightTechnique};
5
+ import{a as r}from"../../../../../chunks/vec4f64.js";import{ReadShadowMapPassParameters as e}from"../../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{ReloadableShaderModule as i}from"../../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t}from"../../core/shaderTechnique/ShaderTechnique.js";import{Default3D as o}from"../../lib/DefaultVertexAttributeLocations.js";import{Program as s}from"../../lib/Program.js";import{ShadowConfiguration as a}from"../../shaders/ShadowConfiguration.js";import{S as h}from"../../../../../chunks/ShadowHighlight.glsl.js";import{BlendFactor as n,PrimitiveType as d}from"../../../../webgl/enums.js";import{makePipelineState as l,separateBlendingParams as m,defaultColorWriteParams as c}from"../../../../webgl/renderState.js";class p extends e{constructor(){super(...arguments),this.shadowColor=r(1,0,1,1),this.shadowOpacity=.2,this.occludedShadowOpacity=.1,this.opacityElevation=1,this.dayNightTerminator=1}}class u extends t{constructor(r){super(r,new a,(()=>this.destroy()))}initializeProgram(r){return new s(r.rctx,u.shader.get().build(this.configuration),o)}initializePipeline(){return l({blending:m(n.SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA),colorWrite:c,depthTest:null,depthWrite:null})}get primitiveType(){return d.TRIANGLE_STRIP}}u.shader=new i(h,(()=>import("../../shaders/ShadowHighlight.glsl.js")));export{p as ShadowHighlightPassParameters,u as ShadowHighlightTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{c as i}from"../../../../chunks/mat4f64.js";import{a as t}from"../../../../chunks/vec2f64.js";import{CloudsParameters as s}from"../../environment/CloudsParameters.js";import{HUDRenderStyle as e}from"../core/shaderLibrary/hud/HUDRenderStyle.js";import{MultipassGeometryUniforms as r}from"../core/shaderLibrary/shading/MultipassGeometryTest.glsl.js";import{MultipassTerrainUniforms as h}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{Decorations as n}from"./basicInterfaces.js";import{Camera as a}from"./Camera.js";import{RenderSlot as o}from"./RenderSlot.js";import{TransparencyPassType as g}from"./TransparencyPassType.js";import{SceneLighting as l}from"../lighting/SceneLighting.js";class m{constructor(i,m){this.shadowMap=i,this.slicePlane=m,this.slot=o.OPAQUE_MATERIAL,this.hasOccludees=!1,this.enableFillLights=!0,this.transparencyPassType=g.NONE,this.alignPixelEnabled=!1,this.decorations=n.ON,this.overlayStretch=1,this._camera=new a,this._inverseViewport=t(),this.oldLighting=new l,this.newLighting=new l,this._fadedLighting=new l,this._lighting=this.newLighting,this.ssr=new c,this.multipassEnabled=!1,this.multipassTerrain=new h,this.multipassGeometry=new r,this.overlays=[],this.hudRenderStyle=e.Occluded,this.cloudsFade=new s}get camera(){return this._camera}set camera(i){this._camera=i,this._inverseViewport[0]=1/i.fullViewport[2],this._inverseViewport[1]=1/i.fullViewport[3]}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}get weatherFading(){return this._lighting===this._fadedLighting}fadeLighting(i){const{oldLighting:t,newLighting:s}=this;i>=1?this._lighting=s:(this._fadedLighting.lerpLighting(t,s,i),this._lighting=this._fadedLighting)}}class c{constructor(){this.fadeFactor=1,this.reprojectionMatrix=i()}}export{m as BindParameters};
5
+ import{a as i}from"../../../../chunks/mat4f64.js";import{a as t}from"../../../../chunks/vec2f64.js";import{CloudsParameters as s}from"../../environment/CloudsParameters.js";import{HUDRenderStyle as e}from"../core/shaderLibrary/hud/HUDRenderStyle.js";import{MultipassGeometryUniforms as r}from"../core/shaderLibrary/shading/MultipassGeometryTest.glsl.js";import{MultipassTerrainUniforms as h}from"../core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{Decorations as n}from"./basicInterfaces.js";import{Camera as a}from"./Camera.js";import{RenderSlot as o}from"./RenderSlot.js";import{TransparencyPassType as g}from"./TransparencyPassType.js";import{SceneLighting as l}from"../lighting/SceneLighting.js";class m{constructor(i,m){this.shadowMap=i,this.slicePlane=m,this.slot=o.OPAQUE_MATERIAL,this.hasOccludees=!1,this.enableFillLights=!0,this.transparencyPassType=g.NONE,this.alignPixelEnabled=!1,this.decorations=n.ON,this.overlayStretch=1,this._camera=new a,this._inverseViewport=t(),this.oldLighting=new l,this.newLighting=new l,this._fadedLighting=new l,this._lighting=this.newLighting,this.ssr=new c,this.multipassEnabled=!1,this.multipassTerrain=new h,this.multipassGeometry=new r,this.overlays=[],this.hudRenderStyle=e.Occluded,this.cloudsFade=new s}get camera(){return this._camera}set camera(i){this._camera=i,this._inverseViewport[0]=1/i.fullViewport[2],this._inverseViewport[1]=1/i.fullViewport[3]}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}get weatherFading(){return this._lighting===this._fadedLighting}fadeLighting(i){const{oldLighting:t,newLighting:s}=this;i>=1?this._lighting=s:(this._fadedLighting.lerpLighting(t,s,i),this._lighting=this._fadedLighting)}}class c{constructor(){this.fadeFactor=1,this.reprojectionMatrix=i()}}export{m as BindParameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import i from"../../../../core/PooledArray.js";import{f as t,a as s}from"../../../../chunks/vec3.js";import{f as e,a as n,c as r}from"../../../../chunks/vec3f64.js";import{assert as h}from"./Util.js";class o{constructor(i,s,o,c){this.primitiveIndices=i,this._numIndexPerPrimitive=s,this.indices=o,this.position=c,this._children=void 0,h(i.length>=1),h(o.length%this._numIndexPerPrimitive==0),h(o.length>=i.length*this._numIndexPerPrimitive),h(3===c.size||4===c.size);const{data:l,size:d}=c,m=i.length;let u=d*o[this._numIndexPerPrimitive*i[0]];a.clear(),a.push(u);const f=e(l[u],l[u+1],l[u+2]),x=n(f);for(let t=0;t<m;++t){const s=this._numIndexPerPrimitive*i[t];for(let i=0;i<this._numIndexPerPrimitive;++i){u=d*o[s+i],a.push(u);let t=l[u];f[0]=Math.min(t,f[0]),x[0]=Math.max(t,x[0]),t=l[u+1],f[1]=Math.min(t,f[1]),x[1]=Math.max(t,x[1]),t=l[u+2],f[2]=Math.min(t,f[2]),x[2]=Math.max(t,x[2])}}this.bbMin=f,this.bbMax=x;const P=t(r(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(x[0]-f[0],x[1]-f[1]),x[2]-f[2]);let v=this.radius*this.radius;for(let t=0;t<a.length;++t){u=a.at(t);const i=l[u]-P[0],s=l[u+1]-P[1],e=l[u+2]-P[2],n=i*i+s*s+e*e;if(n<=v)continue;const r=Math.sqrt(n),h=.5*(r-this.radius);this.radius=this.radius+h,v=this.radius*this.radius;const o=h/r;P[0]+=i*o,P[1]+=s*o,P[2]+=e*o}this.center=P,a.clear()}getChildren(){if(this._children||s(this.bbMin,this.bbMax)<=1)return this._children;const i=t(r(),this.bbMin,this.bbMax,.5),e=this.primitiveIndices.length,n=new Uint8Array(e),h=new Array(8);for(let t=0;t<8;++t)h[t]=0;const{data:a,size:c}=this.position;for(let t=0;t<e;++t){let s=0;const e=this._numIndexPerPrimitive*this.primitiveIndices[t];let r=c*this.indices[e],o=a[r],l=a[r+1],d=a[r+2];for(let i=1;i<this._numIndexPerPrimitive;++i){r=c*this.indices[e+i];const t=a[r],s=a[r+1],n=a[r+2];t<o&&(o=t),s<l&&(l=s),n<d&&(d=n)}o<i[0]&&(s|=1),l<i[1]&&(s|=2),d<i[2]&&(s|=4),n[t]=s,++h[s]}let l=0;for(let t=0;t<8;++t)h[t]>0&&++l;if(l<2)return;const d=new Array(8);for(let t=0;t<8;++t)d[t]=h[t]>0?new Uint32Array(h[t]):void 0;for(let t=0;t<8;++t)h[t]=0;for(let t=0;t<e;++t){const i=n[t];d[i][h[i]++]=this.primitiveIndices[t]}this._children=new Array;for(let t=0;t<8;++t)void 0!==d[t]&&this._children.push(new o(d[t],this._numIndexPerPrimitive,this.indices,this.position));return this._children}static prune(){a.prune()}}const a=new i({deallocator:null});export{o as BoundingInfo};
5
+ import i from"../../../../core/PooledArray.js";import{p as t,a as s}from"../../../../chunks/vec3.js";import{f as e,g as n,c as r}from"../../../../chunks/vec3f64.js";import{assert as h}from"./Util.js";class o{constructor(i,s,o,c){this.primitiveIndices=i,this._numIndexPerPrimitive=s,this.indices=o,this.position=c,this._children=void 0,h(i.length>=1),h(o.length%this._numIndexPerPrimitive==0),h(o.length>=i.length*this._numIndexPerPrimitive),h(3===c.size||4===c.size);const{data:l,size:d}=c,m=i.length;let u=d*o[this._numIndexPerPrimitive*i[0]];a.clear(),a.push(u);const f=e(l[u],l[u+1],l[u+2]),x=n(f);for(let t=0;t<m;++t){const s=this._numIndexPerPrimitive*i[t];for(let i=0;i<this._numIndexPerPrimitive;++i){u=d*o[s+i],a.push(u);let t=l[u];f[0]=Math.min(t,f[0]),x[0]=Math.max(t,x[0]),t=l[u+1],f[1]=Math.min(t,f[1]),x[1]=Math.max(t,x[1]),t=l[u+2],f[2]=Math.min(t,f[2]),x[2]=Math.max(t,x[2])}}this.bbMin=f,this.bbMax=x;const P=t(r(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(x[0]-f[0],x[1]-f[1]),x[2]-f[2]);let p=this.radius*this.radius;for(let t=0;t<a.length;++t){u=a.at(t);const i=l[u]-P[0],s=l[u+1]-P[1],e=l[u+2]-P[2],n=i*i+s*s+e*e;if(n<=p)continue;const r=Math.sqrt(n),h=.5*(r-this.radius);this.radius=this.radius+h,p=this.radius*this.radius;const o=h/r;P[0]+=i*o,P[1]+=s*o,P[2]+=e*o}this.center=P,a.clear()}getChildren(){if(this._children||s(this.bbMin,this.bbMax)<=1)return this._children;const i=t(r(),this.bbMin,this.bbMax,.5),e=this.primitiveIndices.length,n=new Uint8Array(e),h=new Array(8);for(let t=0;t<8;++t)h[t]=0;const{data:a,size:c}=this.position;for(let t=0;t<e;++t){let s=0;const e=this._numIndexPerPrimitive*this.primitiveIndices[t];let r=c*this.indices[e],o=a[r],l=a[r+1],d=a[r+2];for(let i=1;i<this._numIndexPerPrimitive;++i){r=c*this.indices[e+i];const t=a[r],s=a[r+1],n=a[r+2];t<o&&(o=t),s<l&&(l=s),n<d&&(d=n)}o<i[0]&&(s|=1),l<i[1]&&(s|=2),d<i[2]&&(s|=4),n[t]=s,++h[s]}let l=0;for(let t=0;t<8;++t)h[t]>0&&++l;if(l<2)return;const d=new Array(8);for(let t=0;t<8;++t)d[t]=h[t]>0?new Uint32Array(h[t]):void 0;for(let t=0;t<8;++t)h[t]=0;for(let t=0;t<e;++t){const i=n[t];d[i][h[i]++]=this.primitiveIndices[t]}this._children=new Array;for(let t=0;t<8;++t)void 0!==d[t]&&this._children.push(new o(d[t],this._numIndexPerPrimitive,this.indices,this.position));return this._children}static prune(){a.prune()}}const a=new i({deallocator:null});export{o as BoundingInfo};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";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 h}from"../../../../core/screenUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{c as a,m as p,q as _,j as u,a as v,t as l,u as c}from"../../../../chunks/mat4.js";import{c as w}from"../../../../chunks/mat4f64.js";import{j as d,m as g}from"../../../../chunks/vec2.js";import{f as y}from"../../../../chunks/vec2f64.js";import{g as f,h as m,i as x,k as M,A as T,d as D,F as j,z as R,b as P,l as F,s as O,c as V,n as S,x as C}from"../../../../chunks/vec3.js";import{c as I}from"../../../../chunks/vec3f64.js";import{b,h as E,g as L,c as k,i as H,t as U}from"../../../../chunks/vec4.js";import{f as A,c as B}from"../../../../chunks/vec4f64.js";import{create as G,copy as z,fromMatrix as W}from"../../../../geometry/support/frustum.js";import{create as X}from"../../../../geometry/support/ray.js";import{projectPointSignedLength as Y}from"../../../../geometry/support/vector.js";import{ViewingMode as q}from"../../../ViewingMode.js";import{fovd2fovx as N,fovx2fovd as J,fovd2fovy as K,fovy2fovd as Q}from"./fov.js";var Z;let $=Z=class extends i{constructor(t={}){super(t),this._center=I(),this._up=I(),this._viewUp=I(),this._viewForward=I(),this._viewRight=I(),this._ray=X(),this._viewport=A(0,0,1,1),this._padding=A(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=y(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=G(),this._fullViewport=B(),this._pixelRatio=1,this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}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 f(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){a(this._viewMatrix,t),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),this._viewForward}get viewUp(){return this._ensureViewClean(),this._viewUp}get viewRight(){return this._ensureViewClean(),this._viewRight}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=b(B(),this._viewport,1/this.pixelRatio),i=this._get("screenViewport");return i&&E(t,i)?i:t}get screenPadding(){if(1===this.pixelRatio)return this._padding;const t=b(B(),this._padding,1/this.pixelRatio),i=this._get("screenPadding");return i&&E(t,i)?i:t}get x(){return this._viewport[0]}set x(t){t+=this._padding[ht.LEFT],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[ht.BOTTOM],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[ht.RIGHT]+this._padding[ht.LEFT]}set fullWidth(t){this.width=t-(this._padding[ht.RIGHT]+this._padding[ht.LEFT])}get fullHeight(){return this._viewport[3]+this._padding[ht.TOP]+this._padding[ht.BOTTOM]}set fullHeight(t){this.height=t-(this._padding[ht.TOP]+this._padding[ht.BOTTOM])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[ht.LEFT],this._fullViewport[1]=this._viewport[1]-this._padding[ht.BOTTOM],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){L(this._padding,t)||(this._viewport[0]+=t[ht.LEFT]-this._padding[ht.LEFT],this._viewport[1]+=t[ht.BOTTOM]-this._padding[ht.BOTTOM],this._viewport[2]-=t[ht.RIGHT]+t[ht.LEFT]-(this._padding[ht.RIGHT]+this._padding[ht.LEFT]),this._viewport[3]-=t[ht.TOP]+t[ht.BOTTOM]-(this._padding[ht.TOP]+this._padding[ht.BOTTOM]),k(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(){const t=this.width,i=this.height,e=this.near*Math.tan(this.fovY/2),r=e*this._aspect,s=_(w(),-r*(1+2*this._padding[ht.LEFT]/t),r*(1+2*this._padding[ht.RIGHT]/t),-e*(1+2*this._padding[ht.BOTTOM]/i),e*(1+2*this._padding[ht.TOP]/i),this.near,this.far),h=this._get("projectionMatrix");return h&&u(h,s)?h:s}get inverseProjectionMatrix(){return v(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 N(this._fov,this.width,this.height)}set fovX(t){this._fov=J(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return K(this._fov,this.width,this.height)}set fovY(t){this._fov=Q(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return m(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(v(this._viewInverseTransposeMatrix,this.viewMatrix),l(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const i=2*t-1;return 2*this.near*this.far/(this.far+this.near-i*(this.far-this.near))}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}copyFrom(t){x(this._ray.origin,t.eye),this.center=t.center,this.up=t.up,k(this._viewport,t.viewport),this.notifyChange("_viewport"),k(this._padding,t.padding),this.notifyChange("_padding"),d(this._nearFar,t.nearFar),this.notifyChange("_nearFar"),this._fov=t.fov,this.relativeElevation=t.relativeElevation;const i=t;return this._viewDirty=i._viewDirty,this._viewDirty||(a(this._viewMatrix,t.viewMatrix),x(this._viewRight,t.viewRight),x(this._viewUp,t.viewUp),x(this._viewForward,t.viewForward)),this._viewProjectionDirty=!0,this._frustumDirty=i._frustumDirty,this._frustumDirty||(z(this._frustum,t.frustum),this._frustumDirty=!1),i._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:(a(this._viewInverseTransposeMatrix,t.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),k(this._fullViewport,t.fullViewport),this.pixelRatio=t.pixelRatio,this}copyViewFrom(t){this.eye=t.eye,this.center=t.center,this.up=t.up}clone(){return(new Z).copyFrom(this)}equals(t){return M(this.eye,t.eye)&&M(this.center,t.center)&&M(this.up,t.up)&&L(this._viewport,t.viewport)&&L(this._padding,t.padding)&&g(this.nearFar,t.nearFar)&&this._fov===t.fov&&this.pixelRatio===t.pixelRatio&&this.relativeElevation===t.relativeElevation}almostEquals(t){const i=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||H(t.screenPadding,this.screenPadding)>=i||H(this.screenViewport,t.screenViewport)>=i)return!1;T(et,t.eye,t.center),T(rt,this.eye,this.center);const e=D(et,rt),r=j(et),s=j(rt),h=5e-4;return e*e>=(1-1e-10)*r*s&&R(t.eye,this.eye)<Math.max(r,s)*h*h}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs(Y(this.viewForward,f(et,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[ht.LEFT]+this.width/2)/this.pixelRatio,t[1]=(this.padding[ht.TOP]+this.height/2)/this.pixelRatio,t}getRenderCenter(t,i=.5,e=.5){return t[0]=this.padding[ht.LEFT]+this.width*i,t[1]=this.padding[ht.BOTTOM]+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!==tt&&x(tt,t),tt[3]=1,U(tt,tt,this.projectionMatrix);const e=Math.abs(tt[3]);P(tt,tt,1/e);const s=this.fullViewport;i[0]=r(0,s[0]+s[2],.5+.5*tt[0]),i[1]=r(0,s[1]+s[3],.5+.5*tt[1]),i[2]=.5*(tt[2]+1),i[3]=e}unapplyProjection(t,i){const e=this.fullViewport;tt[0]=(t[0]/(e[0]+e[2])*2-1)*t[3],tt[1]=(t[1]/(e[1]+e[3])*2-1)*t[3],tt[2]=(2*t[2]-1)*t[3],tt[3]=t[3],null!=this.inverseProjectionMatrix&&(U(tt,tt,this.inverseProjectionMatrix),i[0]=tt[0],i[1]=tt[1],i[2]=tt[2])}projectToScreen(t,i){return this.projectToRenderScreen(t,st),this.renderToScreen(st,i),i}projectToRenderScreen(t,i){if(tt[0]=t[0],tt[1]=t[1],tt[2]=t[2],tt[3]=1,U(tt,tt,this.viewProjectionMatrix),0===tt[3])return null;P(tt,tt,1/Math.abs(tt[3]));const e=this.fullViewport;return"x"in i?(i.x=r(0,e[0]+e[2],.5+.5*tt[0]),i.y=r(0,e[1]+e[3],.5+.5*tt[1])):(i[0]=r(0,e[0]+e[2],.5+.5*tt[0]),i[1]=r(0,e[1]+e[3],.5+.5*tt[1]),i.length>2&&(i[2]=.5*(tt[2]+1))),i}unprojectFromScreen(t,i){return this.unprojectFromRenderScreen(this.screenToRender(t,st),i)}unprojectFromRenderScreen(t,i){if(p(it,this.projectionMatrix,this.viewMatrix),!v(it,it))return null;const e=this.fullViewport;return tt[0]=2*(t[0]-e[0])/e[2]-1,tt[1]=2*(t[1]-e[1])/e[3]-1,tt[2]=2*t[2]-1,tt[3]=1,U(tt,tt,it),0===tt[3]?null:(i[0]=tt[0]/tt[3],i[1]=tt[1]/tt[3],i[2]=tt[2]/tt[3],i)}constrainWindowSize(t,i,e,r){const s=t*this.pixelRatio,h=i*this.pixelRatio,o=Math.max(s-e/2,0),n=Math.max(this.fullHeight-h-r/2,0),a=-Math.min(s-e/2,0),p=-Math.min(this.fullHeight-h-r/2,0);return[o,n,e-a- -Math.min(this.fullWidth-s-e/2,0),r-p- -Math.min(h-r/2,0)]}computeUp(t){t===q.Global?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}_computeUpGlobal(){f(et,this.center,this.eye);const t=F(this.center);t<1?(O(this._up,0,0,1),this._markViewDirty(),this.notifyChange("_up")):Math.abs(D(et,this.center))>.9999*F(et)*t||(V(this._up,et,this.center),V(this._up,this._up,et),S(this._up,this._up),this.notifyChange("_up"),this._markViewDirty())}_computeUpLocal(){C(et,this.eye,this.center),Math.abs(et[2])<=.9999&&(P(et,et,et[2]),O(this._up,-et[0],-et[1],1-et[2]),S(this._up,this._up),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])?M(t,i)||(x(i,t),this._markViewDirty(),r.length&&this.notifyChange(r)):e.getLogger("esri.views.3d.webgl-engine.lib.Camera").warn("Camera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&(W(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&(c(this._viewMatrix,this.eye,this.center,this.up),O(this._viewForward,-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10]),O(this._viewUp,this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9]),O(this._viewRight,this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8]),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};t([o()],$.prototype,"_center",void 0),t([o()],$.prototype,"_up",void 0),t([o()],$.prototype,"_viewport",void 0),t([o()],$.prototype,"_padding",void 0),t([o()],$.prototype,"_fov",void 0),t([o()],$.prototype,"_nearFar",void 0),t([o()],$.prototype,"_pixelRatio",void 0),t([o()],$.prototype,"pixelRatio",null),t([o()],$.prototype,"eye",null),t([o()],$.prototype,"center",null),t([o()],$.prototype,"up",null),t([o({readOnly:!0})],$.prototype,"nearFar",null),t([o()],$.prototype,"near",null),t([o()],$.prototype,"far",null),t([o()],$.prototype,"viewport",null),t([o({readOnly:!0})],$.prototype,"screenViewport",null),t([o({readOnly:!0})],$.prototype,"screenPadding",null),t([o()],$.prototype,"x",null),t([o()],$.prototype,"y",null),t([o()],$.prototype,"width",null),t([o()],$.prototype,"height",null),t([o()],$.prototype,"fullWidth",null),t([o()],$.prototype,"fullHeight",null),t([o({readOnly:!0})],$.prototype,"_aspect",null),t([o()],$.prototype,"padding",null),t([o({readOnly:!0})],$.prototype,"projectionMatrix",null),t([o({readOnly:!0})],$.prototype,"inverseProjectionMatrix",null),t([o()],$.prototype,"fov",null),t([o()],$.prototype,"fovX",null),t([o()],$.prototype,"fovY",null),$=Z=t([n("esri.views.3d.webgl-engine.lib.Camera")],$);const tt=B(),it=w(),et=I(),rt=I(),st=h();var ht;!function(t){t[t.TOP=0]="TOP",t[t.RIGHT=1]="RIGHT",t[t.BOTTOM=2]="BOTTOM",t[t.LEFT=3]="LEFT"}(ht||(ht={}));export{$ as Camera,ht as PaddingSide};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";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 h}from"../../../../core/screenUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{h as a,m as p,q as _,a as u,i as v,t as l,u as c}from"../../../../chunks/mat4.js";import{a as w}from"../../../../chunks/mat4f64.js";import{j as d,m as y}from"../../../../chunks/vec2.js";import{f as g}from"../../../../chunks/vec2f64.js";import{f,m,c as x,h as M,r as T,j as D,F as j,x as R,i as P,l as F,s as O,b as V,n as S,C}from"../../../../chunks/vec3.js";import{c as I}from"../../../../chunks/vec3f64.js";import{b,e as E,h as L,c as H,i as k,t as U}from"../../../../chunks/vec4.js";import{a as B,c as G}from"../../../../chunks/vec4f64.js";import{create as A,copy as z,fromMatrix as W}from"../../../../geometry/support/frustum.js";import{create as X}from"../../../../geometry/support/ray.js";import{projectPointSignedLength as Y}from"../../../../geometry/support/vector.js";import{ViewingMode as q}from"../../../ViewingMode.js";import{fovd2fovx as N,fovx2fovd as J,fovd2fovy as K,fovy2fovd as Q}from"./fov.js";var Z;let $=Z=class extends i{constructor(t={}){super(t),this._center=I(),this._up=I(),this._viewUp=I(),this._viewForward=I(),this._viewRight=I(),this._ray=X(),this._viewport=B(0,0,1,1),this._padding=B(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=A(),this._fullViewport=G(),this._pixelRatio=1,this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}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 f(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){a(this._viewMatrix,t),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),this._viewForward}get viewUp(){return this._ensureViewClean(),this._viewUp}get viewRight(){return this._ensureViewClean(),this._viewRight}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=b(G(),this._viewport,1/this.pixelRatio),i=this._get("screenViewport");return i&&E(t,i)?i:t}get screenPadding(){if(1===this.pixelRatio)return this._padding;const t=b(G(),this._padding,1/this.pixelRatio),i=this._get("screenPadding");return i&&E(t,i)?i:t}get x(){return this._viewport[0]}set x(t){t+=this._padding[ht.LEFT],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[ht.BOTTOM],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[ht.RIGHT]+this._padding[ht.LEFT]}set fullWidth(t){this.width=t-(this._padding[ht.RIGHT]+this._padding[ht.LEFT])}get fullHeight(){return this._viewport[3]+this._padding[ht.TOP]+this._padding[ht.BOTTOM]}set fullHeight(t){this.height=t-(this._padding[ht.TOP]+this._padding[ht.BOTTOM])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[ht.LEFT],this._fullViewport[1]=this._viewport[1]-this._padding[ht.BOTTOM],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){L(this._padding,t)||(this._viewport[0]+=t[ht.LEFT]-this._padding[ht.LEFT],this._viewport[1]+=t[ht.BOTTOM]-this._padding[ht.BOTTOM],this._viewport[2]-=t[ht.RIGHT]+t[ht.LEFT]-(this._padding[ht.RIGHT]+this._padding[ht.LEFT]),this._viewport[3]-=t[ht.TOP]+t[ht.BOTTOM]-(this._padding[ht.TOP]+this._padding[ht.BOTTOM]),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(){const t=this.width,i=this.height,e=this.near*Math.tan(this.fovY/2),r=e*this._aspect,s=_(w(),-r*(1+2*this._padding[ht.LEFT]/t),r*(1+2*this._padding[ht.RIGHT]/t),-e*(1+2*this._padding[ht.BOTTOM]/i),e*(1+2*this._padding[ht.TOP]/i),this.near,this.far),h=this._get("projectionMatrix");return h&&u(h,s)?h:s}get inverseProjectionMatrix(){return v(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 N(this._fov,this.width,this.height)}set fovX(t){this._fov=J(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return K(this._fov,this.width,this.height)}set fovY(t){this._fov=Q(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return m(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(v(this._viewInverseTransposeMatrix,this.viewMatrix),l(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const i=2*t-1;return 2*this.near*this.far/(this.far+this.near-i*(this.far-this.near))}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}copyFrom(t){x(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.relativeElevation=t.relativeElevation;const i=t;return this._viewDirty=i._viewDirty,this._viewDirty||(a(this._viewMatrix,t.viewMatrix),x(this._viewRight,t.viewRight),x(this._viewUp,t.viewUp),x(this._viewForward,t.viewForward)),this._viewProjectionDirty=!0,this._frustumDirty=i._frustumDirty,this._frustumDirty||(z(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}clone(){return(new Z).copyFrom(this)}equals(t){return M(this.eye,t.eye)&&M(this.center,t.center)&&M(this.up,t.up)&&L(this._viewport,t.viewport)&&L(this._padding,t.padding)&&y(this.nearFar,t.nearFar)&&this._fov===t.fov&&this.pixelRatio===t.pixelRatio&&this.relativeElevation===t.relativeElevation}almostEquals(t){const i=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||k(t.screenPadding,this.screenPadding)>=i||k(this.screenViewport,t.screenViewport)>=i)return!1;T(et,t.eye,t.center),T(rt,this.eye,this.center);const e=D(et,rt),r=j(et),s=j(rt),h=5e-4;return e*e>=(1-1e-10)*r*s&&R(t.eye,this.eye)<Math.max(r,s)*h*h}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs(Y(this.viewForward,f(et,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[ht.LEFT]+this.width/2)/this.pixelRatio,t[1]=(this.padding[ht.TOP]+this.height/2)/this.pixelRatio,t}getRenderCenter(t,i=.5,e=.5){return t[0]=this.padding[ht.LEFT]+this.width*i,t[1]=this.padding[ht.BOTTOM]+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!==tt&&x(tt,t),tt[3]=1,U(tt,tt,this.projectionMatrix);const e=Math.abs(tt[3]);P(tt,tt,1/e);const s=this.fullViewport;i[0]=r(0,s[0]+s[2],.5+.5*tt[0]),i[1]=r(0,s[1]+s[3],.5+.5*tt[1]),i[2]=.5*(tt[2]+1),i[3]=e}unapplyProjection(t,i){const e=this.fullViewport;tt[0]=(t[0]/(e[0]+e[2])*2-1)*t[3],tt[1]=(t[1]/(e[1]+e[3])*2-1)*t[3],tt[2]=(2*t[2]-1)*t[3],tt[3]=t[3],null!=this.inverseProjectionMatrix&&(U(tt,tt,this.inverseProjectionMatrix),i[0]=tt[0],i[1]=tt[1],i[2]=tt[2])}projectToScreen(t,i){return this.projectToRenderScreen(t,st),this.renderToScreen(st,i),i}projectToRenderScreen(t,i){if(tt[0]=t[0],tt[1]=t[1],tt[2]=t[2],tt[3]=1,U(tt,tt,this.viewProjectionMatrix),0===tt[3])return null;P(tt,tt,1/Math.abs(tt[3]));const e=this.fullViewport;return"x"in i?(i.x=r(0,e[0]+e[2],.5+.5*tt[0]),i.y=r(0,e[1]+e[3],.5+.5*tt[1])):(i[0]=r(0,e[0]+e[2],.5+.5*tt[0]),i[1]=r(0,e[1]+e[3],.5+.5*tt[1]),i.length>2&&(i[2]=.5*(tt[2]+1))),i}unprojectFromScreen(t,i){return this.unprojectFromRenderScreen(this.screenToRender(t,st),i)}unprojectFromRenderScreen(t,i){if(p(it,this.projectionMatrix,this.viewMatrix),!v(it,it))return null;const e=this.fullViewport;return tt[0]=2*(t[0]-e[0])/e[2]-1,tt[1]=2*(t[1]-e[1])/e[3]-1,tt[2]=2*t[2]-1,tt[3]=1,U(tt,tt,it),0===tt[3]?null:(i[0]=tt[0]/tt[3],i[1]=tt[1]/tt[3],i[2]=tt[2]/tt[3],i)}constrainWindowSize(t,i,e,r){const s=t*this.pixelRatio,h=i*this.pixelRatio,o=Math.max(s-e/2,0),n=Math.max(this.fullHeight-h-r/2,0),a=-Math.min(s-e/2,0),p=-Math.min(this.fullHeight-h-r/2,0);return[o,n,e-a- -Math.min(this.fullWidth-s-e/2,0),r-p- -Math.min(h-r/2,0)]}computeUp(t){t===q.Global?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}_computeUpGlobal(){f(et,this.center,this.eye);const t=F(this.center);t<1?(O(this._up,0,0,1),this._markViewDirty(),this.notifyChange("_up")):Math.abs(D(et,this.center))>.9999*F(et)*t||(V(this._up,et,this.center),V(this._up,this._up,et),S(this._up,this._up),this.notifyChange("_up"),this._markViewDirty())}_computeUpLocal(){C(et,this.eye,this.center),Math.abs(et[2])<=.9999&&(P(et,et,et[2]),O(this._up,-et[0],-et[1],1-et[2]),S(this._up,this._up),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])?M(t,i)||(x(i,t),this._markViewDirty(),r.length&&this.notifyChange(r)):e.getLogger("esri.views.3d.webgl-engine.lib.Camera").warn("Camera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&(W(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&(c(this._viewMatrix,this.eye,this.center,this.up),O(this._viewForward,-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10]),O(this._viewUp,this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9]),O(this._viewRight,this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8]),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};t([o()],$.prototype,"_center",void 0),t([o()],$.prototype,"_up",void 0),t([o()],$.prototype,"_viewport",void 0),t([o()],$.prototype,"_padding",void 0),t([o()],$.prototype,"_fov",void 0),t([o()],$.prototype,"_nearFar",void 0),t([o()],$.prototype,"_pixelRatio",void 0),t([o()],$.prototype,"pixelRatio",null),t([o()],$.prototype,"eye",null),t([o()],$.prototype,"center",null),t([o()],$.prototype,"up",null),t([o({readOnly:!0})],$.prototype,"nearFar",null),t([o()],$.prototype,"near",null),t([o()],$.prototype,"far",null),t([o()],$.prototype,"viewport",null),t([o({readOnly:!0})],$.prototype,"screenViewport",null),t([o({readOnly:!0})],$.prototype,"screenPadding",null),t([o()],$.prototype,"x",null),t([o()],$.prototype,"y",null),t([o()],$.prototype,"width",null),t([o()],$.prototype,"height",null),t([o()],$.prototype,"fullWidth",null),t([o()],$.prototype,"fullHeight",null),t([o({readOnly:!0})],$.prototype,"_aspect",null),t([o()],$.prototype,"padding",null),t([o({readOnly:!0})],$.prototype,"projectionMatrix",null),t([o({readOnly:!0})],$.prototype,"inverseProjectionMatrix",null),t([o()],$.prototype,"fov",null),t([o()],$.prototype,"fovX",null),t([o()],$.prototype,"fovY",null),$=Z=t([n("esri.views.3d.webgl-engine.lib.Camera")],$);const tt=G(),it=w(),et=I(),rt=I(),st=h();var ht;!function(t){t[t.TOP=0]="TOP",t[t.RIGHT=1]="RIGHT",t[t.BOTTOM=2]="BOTTOM",t[t.LEFT=3]="LEFT"}(ht||(ht={}));export{$ as Camera,ht as PaddingSide};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../../../chunks/tslib.es6.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as t}from"../../../../core/accessorSupport/decorators/subclass.js";import{c as e}from"../../../../chunks/mat4f64.js";import{Camera as s}from"./Camera.js";let p=class extends s{constructor(){super(...arguments),this._projectionMatrix=e()}get projectionMatrix(){return this._projectionMatrix}};r([o()],p.prototype,"_projectionMatrix",void 0),r([o({readOnly:!0})],p.prototype,"projectionMatrix",null),p=r([t("esri.views.3d.webgl-engine.lib.CascadeCamera")],p);export{p as CascadeCamera};
5
+ import{_ as r}from"../../../../chunks/tslib.es6.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as t}from"../../../../core/accessorSupport/decorators/subclass.js";import{a as e}from"../../../../chunks/mat4f64.js";import{Camera as s}from"./Camera.js";let p=class extends s{constructor(){super(...arguments),this._projectionMatrix=e()}get projectionMatrix(){return this._projectionMatrix}};r([o()],p.prototype,"_projectionMatrix",void 0),r([o({readOnly:!0})],p.prototype,"projectionMatrix",null),p=r([t("esri.views.3d.webgl-engine.lib.CascadeCamera")],p);export{p as CascadeCamera};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{generateUID as o}from"../../../../core/uid.js";class r{constructor(){this.id=o()}unload(){}}export{r as ContentObject};
5
+ import{generateUID as o}from"../../../../core/uid.js";class r{constructor(){this.id=o()}}export{r as ContentObject};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Logger.js";import{disposeMaybe as t}from"../../../../core/maybe.js";import{NestedMap as r}from"../../../../core/NestedMap.js";import{assert as i}from"./Util.js";class s{constructor(e,t,i,s){this._textureRepository=e,this._techniqueRepository=t,this.materialChanged=i,this.requestRender=s,this._id2glMaterialRef=new r}dispose(){this._textureRepository.destroy()}acquire(e,t,r){if(this._ownMaterial(e),!e.produces(t,r))return null;let i=this._id2glMaterialRef.get(r,e.id);if(null==i){const t=e.createGLMaterial({material:e,techniqueRep:this._techniqueRepository,textureRep:this._textureRepository,output:r});i=new o(t),this._id2glMaterialRef.set(r,e.id,i)}return i.ref(),i.glMaterial}release(e,r){const i=this._id2glMaterialRef.get(r,e.id);null!=i&&(i.unref(),i.referenced||(t(i.glMaterial),this._id2glMaterialRef.delete(r,e.id)))}_ownMaterial(t){null!=t.repository&&t.repository!==this&&e.getLogger("esri.views.3d.webgl-engine.lib.GLMaterialRepository").error("Material is already owned by a different material repository"),t.repository=this}}class o{constructor(e){this.glMaterial=e,this._refCnt=0}ref(){++this._refCnt}unref(){--this._refCnt,i(this._refCnt>=0)}get referenced(){return this._refCnt>0}}export{s as GLMaterialRepository};
5
+ import e from"../../../../core/Logger.js";import{disposeMaybe as t}from"../../../../core/maybe.js";import{NestedMap as r}from"../../../../core/NestedMap.js";import{assert as i}from"./Util.js";class s{constructor(e,t,i,s){this._textureRepository=e,this._techniqueRepository=t,this.materialChanged=i,this.requestRender=s,this._id2glMaterialRef=new r}dispose(){this._textureRepository.destroy()}acquire(e,t,r){if(this._ownMaterial(e),!e.produces(t,r))return null;let i=this._id2glMaterialRef.get(r,e.id);if(null==i){const t=e.createGLMaterial({material:e,techniqueRep:this._techniqueRepository,textureRepository:this._textureRepository,output:r});i=new o(t),this._id2glMaterialRef.set(r,e.id,i)}return i.ref(),i.glMaterial}release(e,r){const i=this._id2glMaterialRef.get(r,e.id);null!=i&&(i.unref(),i.referenced||(t(i.glMaterial),this._id2glMaterialRef.delete(r,e.id)))}_ownMaterial(t){null!=t.repository&&t.repository!==this&&e.getLogger("esri.views.3d.webgl-engine.lib.GLMaterialRepository").error("Material is already owned by a different material repository"),t.repository=this}}class o{constructor(e){this.glMaterial=e,this._refCnt=0}ref(){++this._refCnt}unref(){--this._refCnt,i(this._refCnt>=0)}get referenced(){return this._refCnt>0}}export{s as GLMaterialRepository};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{releaseMaybe as t}from"../../../../core/maybe.js";import{isPromiseLike as e}from"../../../../core/promiseUtils.js";import{NoParameters as s}from"../core/shaderModules/interfaces.js";import{ResourceState as i}from"./basicInterfaces.js";import u from"./GLMaterial.js";class r extends u{constructor(t){super(t),this._numLoading=0,this._disposed=!1,this._textureRepository=t.textureRep,this._textureId=t.textureId,this._acquire(t.textureId,(t=>this._texture=t)),this._acquire(t.normalTextureId,(t=>this._textureNormal=t)),this._acquire(t.emissiveTextureId,(t=>this._textureEmissive=t)),this._acquire(t.occlusionTextureId,(t=>this._textureOcclusion=t)),this._acquire(t.metallicRoughnessTextureId,(t=>this._textureMetallicRoughness=t))}dispose(){this._texture=t(this._texture),this._textureNormal=t(this._textureNormal),this._textureEmissive=t(this._textureEmissive),this._textureOcclusion=t(this._textureOcclusion),this._textureMetallicRoughness=t(this._textureMetallicRoughness),this._disposed=!0}ensureResources(t){return 0===this._numLoading?i.LOADED:i.LOADING}get textureBindParameters(){return new l(null!=this._texture?this._texture.glTexture:null,null!=this._textureNormal?this._textureNormal.glTexture:null,null!=this._textureEmissive?this._textureEmissive.glTexture:null,null!=this._textureOcclusion?this._textureOcclusion.glTexture:null,null!=this._textureMetallicRoughness?this._textureMetallicRoughness.glTexture:null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=t(this._texture),this._textureId=e,this._acquire(this._textureId,(t=>this._texture=t)))}_acquire(s,i){if(null==s)return void i(null);const u=this._textureRepository.acquire(s);if(e(u))return++this._numLoading,void u.then((e=>{if(this._disposed)return t(e),void i(null);i(e)})).finally((()=>--this._numLoading));i(u)}}class l extends s{constructor(t=null,e=null,s=null,i=null,u=null){super(),this.texture=t,this.textureNormal=e,this.textureEmissive=s,this.textureOcclusion=i,this.textureMetallicRoughness=u}}export{r as GLTextureMaterial,l as GLTextureMaterialBindParameters};
5
+ import{releaseMaybe as t}from"../../../../core/maybe.js";import{isPromiseLike as e}from"../../../../core/promiseUtils.js";import{NoParameters as s}from"../core/shaderModules/interfaces.js";import{ResourceState as i}from"./basicInterfaces.js";import u from"./GLMaterial.js";class r extends u{constructor(t){super(t),this._numLoading=0,this._disposed=!1,this._textureRepository=t.textureRepository,this._textureId=t.textureId,this._acquire(t.textureId,(t=>this._texture=t)),this._acquire(t.normalTextureId,(t=>this._textureNormal=t)),this._acquire(t.emissiveTextureId,(t=>this._textureEmissive=t)),this._acquire(t.occlusionTextureId,(t=>this._textureOcclusion=t)),this._acquire(t.metallicRoughnessTextureId,(t=>this._textureMetallicRoughness=t))}dispose(){this._texture=t(this._texture),this._textureNormal=t(this._textureNormal),this._textureEmissive=t(this._textureEmissive),this._textureOcclusion=t(this._textureOcclusion),this._textureMetallicRoughness=t(this._textureMetallicRoughness),this._disposed=!0}ensureResources(t){return 0===this._numLoading?i.LOADED:i.LOADING}get textureBindParameters(){return new l(null!=this._texture?this._texture.glTexture:null,null!=this._textureNormal?this._textureNormal.glTexture:null,null!=this._textureEmissive?this._textureEmissive.glTexture:null,null!=this._textureOcclusion?this._textureOcclusion.glTexture:null,null!=this._textureMetallicRoughness?this._textureMetallicRoughness.glTexture:null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=t(this._texture),this._textureId=e,this._acquire(this._textureId,(t=>this._texture=t)))}_acquire(s,i){if(null==s)return void i(null);const u=this._textureRepository.acquire(s);if(e(u))return++this._numLoading,void u.then((e=>{if(this._disposed)return t(e),void i(null);i(e)})).finally((()=>--this._numLoading));i(u)}}class l extends s{constructor(t=null,e=null,s=null,i=null,u=null){super(),this.texture=t,this.textureNormal=e,this.textureEmissive=s,this.textureOcclusion=i,this.textureMetallicRoughness=u}}export{r as GLTextureMaterial,l as GLTextureMaterialBindParameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{I as t,b as e}from"../../../../chunks/mat4f64.js";import{m as i}from"../../../../chunks/vec3.js";import{getContinuousIndexArray as s,compactIndices as n}from"../../../../geometry/support/Indices.js";import{cloneAttributeData as r}from"./AttributeArray.js";import{Object3DState as o}from"./basicInterfaces.js";import{BoundingInfo as h}from"./BoundingInfo.js";import{ContentObject as u}from"./ContentObject.js";import{ContentObjectType as a}from"./ContentObjectType.js";import{computeAttachmentOriginTriangles as g,computeAttachmentOriginLines as c,computeAttachmentOriginPoints as l}from"./geometryDataUtils.js";import{Object3DStateID as d}from"./Object3DStateID.js";import{assert as m}from"./Util.js";import{VertexAttribute as f}from"./VertexAttribute.js";import{addObject3DStateID as I,removeObject3DStateID as b}from"../materials/renderers/utils.js";class _ extends u{constructor(t,e,i=[],r=null,o=a.Mesh,h=null,u=-1){super(),this.material=t,this.mapPositions=r,this.type=o,this.objectAndLayerIdColor=h,this.edgeIndicesLength=u,this.visible=!0,this._vertexAttributes=new Map,this._indices=new Map,this._boundingInfo=null;for(const[s,n]of e)n&&this._vertexAttributes.set(s,{...n});if(null==i||0===i.length){const t=p(this._vertexAttributes),e=s(t);this.edgeIndicesLength=this.edgeIndicesLength<0?t:this.edgeIndicesLength;for(const i of this._vertexAttributes.keys())this._indices.set(i,e)}else for(const[s,a]of i)a&&(this._indices.set(s,n(a)),s===f.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._indices.get(s).length:this.edgeIndicesLength))}instantiate(t={}){const e=new _(t.material||this.material,[],void 0,this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._vertexAttributes.forEach(((t,i)=>{t.exclusive=!1,e._vertexAttributes.set(i,t)})),this._indices.forEach(((t,i)=>e._indices.set(i,t))),e._boundingInfo=this._boundingInfo,e.transformation=t.transformation||this.transformation,e}get vertexAttributes(){return this._vertexAttributes}getMutableAttribute(t){let e=this._vertexAttributes.get(t);return e&&!e.exclusive&&(e={...e,exclusive:!0,data:r(e.data)},this._vertexAttributes.set(t,e)),e}setAttributeData(t,e){const i=this._vertexAttributes.get(t);i&&this._vertexAttributes.set(t,{...i,exclusive:!0,data:e})}get indices(){return this._indices}get indexCount(){const t=this._indices.values().next().value;return t?t.length:0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(t){return!!(this.type===a.Mesh?this._computeAttachmentOriginTriangles(t):this.type===a.Line?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t))&&(null!=this._transformation&&i(t,t,this._transformation),!0)}_computeAttachmentOriginTriangles(t){const e=this.indices.get(f.POSITION),i=this.vertexAttributes.get(f.POSITION);return g(i,e,t)}_computeAttachmentOriginLines(t){const e=this.vertexAttributes.get(f.POSITION),i=this.indices.get(f.POSITION);return c(e,i,i&&v(this.material.parameters,e,i),t)}_computeAttachmentOriginPoints(t){const e=this.indices.get(f.POSITION),i=this.vertexAttributes.get(f.POSITION);return l(i,e,t)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const t=this.indices.get(f.POSITION),e=this.vertexAttributes.get(f.POSITION);if(!t||0===t.length||!e)return null;const i=this.type===a.Mesh?3:1;m(t.length%i==0,"Indexing error: "+t.length+" not divisible by "+i);const n=s(t.length/i);return new h(n,i,t,e)}get transformation(){return this._transformation??t}set transformation(i){this._transformation=i&&i!==t?e(i):null}addHighlight(){const t=new d(o.Highlight);return this.highlights=I(this.highlights,t),t}removeHighlight(t){this.highlights=b(this.highlights,t)}}function p(t){const e=t.values().next().value;return null==e?0:e.data.length/e.size}function v(t,e,i){return!(!("isClosed"in t)||!t.isClosed)&&(i?i.length>2:e.data.length>6)}export{_ as Geometry};
5
+ import{I as t,b as e}from"../../../../chunks/mat4f64.js";import{e as i}from"../../../../chunks/vec3.js";import{getContinuousIndexArray as s,compactIndices as n}from"../../../../geometry/support/Indices.js";import{cloneAttributeData as r}from"./AttributeArray.js";import{Object3DState as o}from"./basicInterfaces.js";import{BoundingInfo as h}from"./BoundingInfo.js";import{ContentObject as u}from"./ContentObject.js";import{ContentObjectType as a}from"./ContentObjectType.js";import{computeAttachmentOriginTriangles as g,computeAttachmentOriginLines as c,computeAttachmentOriginPoints as l}from"./geometryDataUtils.js";import{Object3DStateID as d}from"./Object3DStateID.js";import{assert as m}from"./Util.js";import{VertexAttribute as f}from"./VertexAttribute.js";import{addObject3DStateID as I,removeObject3DStateID as b}from"../materials/renderers/utils.js";class _ extends u{constructor(t,e,i=[],r=null,o=a.Mesh,h=null,u=-1){super(),this.material=t,this.mapPositions=r,this.type=o,this.objectAndLayerIdColor=h,this.edgeIndicesLength=u,this.visible=!0,this._vertexAttributes=new Map,this._indices=new Map,this._boundingInfo=null;for(const[s,n]of e)n&&this._vertexAttributes.set(s,{...n});if(null==i||0===i.length){const t=p(this._vertexAttributes),e=s(t);this.edgeIndicesLength=this.edgeIndicesLength<0?t:this.edgeIndicesLength;for(const i of this._vertexAttributes.keys())this._indices.set(i,e)}else for(const[s,a]of i)a&&(this._indices.set(s,n(a)),s===f.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._indices.get(s).length:this.edgeIndicesLength))}instantiate(t={}){const e=new _(t.material||this.material,[],void 0,this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._vertexAttributes.forEach(((t,i)=>{t.exclusive=!1,e._vertexAttributes.set(i,t)})),this._indices.forEach(((t,i)=>e._indices.set(i,t))),e._boundingInfo=this._boundingInfo,e.transformation=t.transformation||this.transformation,e}get vertexAttributes(){return this._vertexAttributes}getMutableAttribute(t){let e=this._vertexAttributes.get(t);return e&&!e.exclusive&&(e={...e,exclusive:!0,data:r(e.data)},this._vertexAttributes.set(t,e)),e}setAttributeData(t,e){const i=this._vertexAttributes.get(t);i&&this._vertexAttributes.set(t,{...i,exclusive:!0,data:e})}get indices(){return this._indices}get indexCount(){const t=this._indices.values().next().value;return t?t.length:0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(t){return!!(this.type===a.Mesh?this._computeAttachmentOriginTriangles(t):this.type===a.Line?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t))&&(null!=this._transformation&&i(t,t,this._transformation),!0)}_computeAttachmentOriginTriangles(t){const e=this.indices.get(f.POSITION),i=this.vertexAttributes.get(f.POSITION);return g(i,e,t)}_computeAttachmentOriginLines(t){const e=this.vertexAttributes.get(f.POSITION),i=this.indices.get(f.POSITION);return c(e,i,i&&v(this.material.parameters,e,i),t)}_computeAttachmentOriginPoints(t){const e=this.indices.get(f.POSITION),i=this.vertexAttributes.get(f.POSITION);return l(i,e,t)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const t=this.indices.get(f.POSITION),e=this.vertexAttributes.get(f.POSITION);if(!t||0===t.length||!e)return null;const i=this.type===a.Mesh?3:1;m(t.length%i==0,"Indexing error: "+t.length+" not divisible by "+i);const n=s(t.length/i);return new h(n,i,t,e)}get transformation(){return this._transformation??t}set transformation(i){this._transformation=i&&i!==t?e(i):null}addHighlight(){const t=new d(o.Highlight);return this.highlights=I(this.highlights,t),t}removeHighlight(t){this.highlights=b(this.highlights,t)}}function p(t){const e=t.values().next().value;return null==e?0:e.data.length/e.size}function v(t,e,i){return!(!("isClosed"in t)||!t.isClosed)&&(i?i.length>2:e.data.length>6)}export{_ as Geometry};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{g as t,c as n,n as e,b as s,e as o,d as r,s as h,i as l,m as u}from"../../../../chunks/vec3.js";import{f as c,c as a,a as p}from"../../../../chunks/vec3f32.js";import{c as f}from"../../../../chunks/vec3f64.js";import{newDoubleArray as O}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as i,floatArrayFrom as I}from"../../../../geometry/support/FloatArray.js";import{getZeroIndexArray as w,getContinuousIndexArray as g}from"../../../../geometry/support/Indices.js";import{create as M,fromPositionAndNormal as A,intersectRay as m}from"../../../../geometry/support/plane.js";import{wrap as N}from"../../../../geometry/support/ray.js";import{Attribute as y}from"./Attribute.js";import{Vec3Compact as P}from"./BufferVectorMath.js";import{ContentObjectType as T}from"./ContentObjectType.js";import{Geometry as S}from"./Geometry.js";import{assert as R}from"./Util.js";import{VertexAttribute as L}from"./VertexAttribute.js";const b=P,d=[[-.5,-.5,.5],[.5,-.5,.5],[.5,.5,.5],[-.5,.5,.5],[-.5,-.5,-.5],[.5,-.5,-.5],[.5,.5,-.5],[-.5,.5,-.5]],j=[0,0,1,-1,0,0,1,0,0,0,-1,0,0,1,0,0,0,-1],U=[0,0,1,0,1,1,0,1],V=[0,1,2,2,3,0,4,0,3,3,7,4,1,5,6,6,2,1,1,0,4,4,5,1,3,2,6,6,7,3,5,4,7,7,6,5],v=new Array(36);for(let At=0;At<6;At++)for(let t=0;t<6;t++)v[6*At+t]=At;const x=new Array(36);for(let At=0;At<6;At++)x[6*At]=0,x[6*At+1]=1,x[6*At+2]=2,x[6*At+3]=2,x[6*At+4]=3,x[6*At+5]=0;function F(t,n){Array.isArray(n)||(n=[n,n,n]);const e=new Array(24);for(let s=0;s<8;s++)e[3*s]=d[s][0]*n[0],e[3*s+1]=d[s][1]*n[1],e[3*s+2]=d[s][2]*n[2];return new S(t,[[L.POSITION,new y(e,3,!0)],[L.NORMAL,new y(j,3)],[L.UV0,new y(U,2)]],[[L.POSITION,V],[L.NORMAL,v],[L.UV0,x]])}const C=[[-.5,0,-.5],[.5,0,-.5],[.5,0,.5],[-.5,0,.5],[0,-.5,0],[0,.5,0]],E=[0,1,-1,1,1,0,0,1,1,-1,1,0,0,-1,-1,1,-1,0,0,-1,1,-1,-1,0],G=[5,1,0,5,2,1,5,3,2,5,0,3,4,0,1,4,1,2,4,2,3,4,3,0],k=[0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7];function q(t,n){Array.isArray(n)||(n=[n,n,n]);const e=new Array(18);for(let s=0;s<6;s++)e[3*s]=C[s][0]*n[0],e[3*s+1]=C[s][1]*n[1],e[3*s+2]=C[s][2]*n[2];return new S(t,[[L.POSITION,new y(e,3,!0)],[L.NORMAL,new y(E,3)]],[[L.POSITION,G],[L.NORMAL,k]])}const B=c(-.5,0,-.5),z=c(.5,0,-.5),D=c(0,0,.5),X=c(0,.5,0),Z=a(),H=a(),J=a(),K=a(),Q=a();t(Z,B,X),t(H,B,z),n(J,Z,H),e(J,J),t(Z,z,X),t(H,z,D),n(K,Z,H),e(K,K),t(Z,D,X),t(H,D,B),n(Q,Z,H),e(Q,Q);const W=[B,z,D,X],Y=[0,-1,0,J[0],J[1],J[2],K[0],K[1],K[2],Q[0],Q[1],Q[2]],$=[0,1,2,3,1,0,3,2,1,3,0,2],_=[0,0,0,1,1,1,2,2,2,3,3,3];function tt(t,n){Array.isArray(n)||(n=[n,n,n]);const e=new Array(12);for(let s=0;s<4;s++)e[3*s]=W[s][0]*n[0],e[3*s+1]=W[s][1]*n[1],e[3*s+2]=W[s][2]*n[2];return new S(t,[[L.POSITION,new y(e,3,!0)],[L.NORMAL,new y(Y,3)]],[[L.POSITION,$],[L.NORMAL,_]])}function nt(t,n,e,s,o={uv:!0}){const r=-Math.PI,h=2*Math.PI,l=-Math.PI/2,u=Math.PI,c=Math.max(3,Math.floor(e)),a=Math.max(2,Math.floor(s)),p=(c+1)*(a+1),f=i(3*p),O=i(3*p),I=i(2*p),g=[];let M=0;for(let i=0;i<=a;i++){const t=[],e=i/a,s=l+e*u,o=Math.cos(s);for(let l=0;l<=c;l++){const u=l/c,a=r+u*h,p=Math.cos(a)*o,i=Math.sin(s),w=-Math.sin(a)*o;f[3*M]=p*n,f[3*M+1]=i*n,f[3*M+2]=w*n,O[3*M]=p,O[3*M+1]=i,O[3*M+2]=w,I[2*M]=u,I[2*M+1]=e,t.push(M),++M}g.push(t)}const A=new Array;for(let i=0;i<a;i++)for(let t=0;t<c;t++){const n=g[i][t],e=g[i][t+1],s=g[i+1][t+1],o=g[i+1][t];0===i?(A.push(n),A.push(s),A.push(o)):i===a-1?(A.push(n),A.push(e),A.push(s)):(A.push(n),A.push(e),A.push(s),A.push(s),A.push(o),A.push(n))}const m=[[L.POSITION,A],[L.NORMAL,A]],N=[[L.POSITION,new y(f,3,!0)],[L.NORMAL,new y(O,3,!0)]];return o.uv&&(N.push([L.UV0,new y(I,2,!0)]),m.push([L.UV0,A])),o.offset&&(m[0][0]=L.OFFSET,N[0][0]=L.OFFSET,m.push([L.POSITION,w(A.length)]),N.push([L.POSITION,new y(Float64Array.from(o.offset),3,!0)])),new S(t,N,m)}function et(t,n,e,s){const{vertexAttributes:o,indices:r}=st(n,e,s);return new S(t,o,r)}function st(t,n,e){const s=t;let o,r;if(e)o=[0,-1,0,1,0,0,0,0,1,-1,0,0,0,0,-1,0,1,0],r=[0,1,2,0,2,3,0,3,4,0,4,1,1,5,2,2,5,3,3,5,4,4,5,1];else{const t=s*(1+Math.sqrt(5))/2;o=[-s,t,0,s,t,0,-s,-t,0,s,-t,0,0,-s,t,0,s,t,0,-s,-t,0,s,-t,t,0,-s,t,0,s,-t,0,-s,-t,0,s],r=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1]}for(let a=0;a<o.length;a+=3)b.scale(o,a,t/b.length(o,a));let h={};function l(n,e){n>e&&([n,e]=[e,n]);const s=n.toString()+"."+e.toString();if(h[s])return h[s];let r=o.length;return o.length+=3,b.add(o,3*n,o,3*e,o,r),b.scale(o,r,t/b.length(o,r)),r/=3,h[s]=r,r}for(let a=0;a<n;a++){const t=r.length,n=new Array(4*t);for(let e=0;e<t;e+=3){const t=r[e],s=r[e+1],o=r[e+2],h=l(t,s),u=l(s,o),c=l(o,t),a=4*e;n[a]=t,n[a+1]=h,n[a+2]=c,n[a+3]=s,n[a+4]=u,n[a+5]=h,n[a+6]=o,n[a+7]=c,n[a+8]=u,n[a+9]=h,n[a+10]=u,n[a+11]=c}r=n,h={}}const u=I(o);for(let a=0;a<u.length;a+=3)b.normalize(u,a);const c=[[L.POSITION,r],[L.NORMAL,r]];return{vertexAttributes:[[L.POSITION,new y(I(o),3,!0)],[L.NORMAL,new y(u,3,!0)]],indices:c}}function ot(t,n,e,s,o,r,h,l,u=null){const c=e?[e[0],e[1],e[2]]:[0,0,0],a=n?[n[0],n[1],n[2]]:[0,0,1];h=h||[0,0];const p=s?[255*s[0],255*s[1],255*s[2],s.length>3?255*s[3]:255]:[255,255,255,255],f=null!=o&&2===o.length?o:[1,1],O=[[L.POSITION,new y(c,3,!0)],[L.NORMAL,new y(a,3,!0)],[L.UV0,new y(h,h.length)],[L.COLOR,new y(p,4,!0)],[L.SIZE,new y(f,2)]];if(null!=r){const t=[r[0],r[1],r[2],r[3]];O.push([L.AUXPOS1,new y(t,4)])}if(null!=l){const t=[l[0],l[1],l[2],l[3]];O.push([L.FEATUREATTRIBUTE,new y(t,4)])}return new S(t,O,null,null,T.Point,u)}const rt=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0]];function ht(t,n=rt){const e=new Array(12);for(let a=0;a<4;a++)for(let t=0;t<3;t++)e[3*a+t]=n[a][t];const s=[0,1,2,2,3,0],o=[0,0,1],r=[0,0,0,0,0,0],h=[0,0,1,0,1,1,0,1],l=[255,255,255,255],u=[[L.POSITION,s],[L.NORMAL,r],[L.UV0,s],[L.COLOR,r]],c=[[L.POSITION,new y(e,3,!0)],[L.NORMAL,new y(o,3,!0)],[L.UV0,new y(h,2,!0)],[L.COLOR,new y(l,4,!0)]];return new S(t,c,u)}function lt(t,n,e,s,o,r=!0,h=!0){let l=0;const u=e,a=n;let p=c(0,l,0),f=c(0,l+a,0),O=c(0,-1,0),I=c(0,1,0);o&&(l=a,f=c(0,0,0),p=c(0,l,0),O=c(0,1,0),I=c(0,-1,0));const w=[f,p],g=[O,I],M=s+2,A=Math.sqrt(a*a+u*u);if(o)for(let i=s-1;i>=0;i--){const t=i*(2*Math.PI/s),n=c(Math.cos(t)*u,l,Math.sin(t)*u);w.push(n);const e=c(a*Math.cos(t)/A,-u/A,a*Math.sin(t)/A);g.push(e)}else for(let i=0;i<s;i++){const t=i*(2*Math.PI/s),n=c(Math.cos(t)*u,l,Math.sin(t)*u);w.push(n);const e=c(a*Math.cos(t)/A,u/A,a*Math.sin(t)/A);g.push(e)}const m=new Array,N=new Array;if(r){for(let t=3;t<w.length;t++)m.push(1),m.push(t-1),m.push(t),N.push(0),N.push(0),N.push(0);m.push(w.length-1),m.push(2),m.push(1),N.push(0),N.push(0),N.push(0)}if(h){for(let t=3;t<w.length;t++)m.push(t),m.push(t-1),m.push(0),N.push(t),N.push(t-1),N.push(1);m.push(0),m.push(2),m.push(w.length-1),N.push(1),N.push(2),N.push(g.length-1)}const P=i(3*M);for(let c=0;c<M;c++)P[3*c]=w[c][0],P[3*c+1]=w[c][1],P[3*c+2]=w[c][2];const T=i(3*M);for(let c=0;c<M;c++)T[3*c]=g[c][0],T[3*c+1]=g[c][1],T[3*c+2]=g[c][2];const R=[[L.POSITION,m],[L.NORMAL,N]],b=[[L.POSITION,new y(P,3,!0)],[L.NORMAL,new y(T,3,!0)]];return new S(t,b,R)}function ut(t,l,u,f,O,I,w){const g=O?p(O):c(1,0,0),M=I?p(I):c(0,0,0);w??=!0;const A=a();e(A,g);const m=a();s(m,A,Math.abs(l));const N=a();s(N,m,-.5),o(N,N,M);const P=c(0,1,0);Math.abs(1-r(A,P))<.2&&h(P,0,0,1);const T=a();n(T,A,P),e(T,T),n(P,T,A);const R=2*f+(w?2:0),b=f+(w?2:0),d=i(3*R),j=i(3*b),U=i(2*R),V=new Array(3*f*(w?4:2)),v=new Array(3*f*(w?4:2));w&&(d[3*(R-2)]=N[0],d[3*(R-2)+1]=N[1],d[3*(R-2)+2]=N[2],U[2*(R-2)]=0,U[2*(R-2)+1]=0,d[3*(R-1)]=d[3*(R-2)]+m[0],d[3*(R-1)+1]=d[3*(R-2)+1]+m[1],d[3*(R-1)+2]=d[3*(R-2)+2]+m[2],U[2*(R-1)]=1,U[2*(R-1)+1]=1,j[3*(b-2)]=-A[0],j[3*(b-2)+1]=-A[1],j[3*(b-2)+2]=-A[2],j[3*(b-1)]=A[0],j[3*(b-1)+1]=A[1],j[3*(b-1)+2]=A[2]);const x=(t,n,e)=>{V[t]=n,v[t]=e};let F=0;const C=a(),E=a();for(let n=0;n<f;n++){const t=n*(2*Math.PI/f);s(C,P,Math.sin(t)),s(E,T,Math.cos(t)),o(C,C,E),j[3*n]=C[0],j[3*n+1]=C[1],j[3*n+2]=C[2],s(C,C,u),o(C,C,N),d[3*n]=C[0],d[3*n+1]=C[1],d[3*n+2]=C[2],U[2*n]=n/f,U[2*n+1]=0,d[3*(n+f)]=d[3*n]+m[0],d[3*(n+f)+1]=d[3*n+1]+m[1],d[3*(n+f)+2]=d[3*n+2]+m[2],U[2*(n+f)]=n/f,U[2*n+1]=1;const e=(n+1)%f;x(F++,n,n),x(F++,n+f,n),x(F++,e,e),x(F++,e,e),x(F++,n+f,n),x(F++,e+f,e)}if(w){for(let t=0;t<f;t++){const n=(t+1)%f;x(F++,R-2,b-2),x(F++,t,b-2),x(F++,n,b-2)}for(let t=0;t<f;t++){const n=(t+1)%f;x(F++,t+f,b-1),x(F++,R-1,b-1),x(F++,n+f,b-1)}}const G=[[L.POSITION,V],[L.NORMAL,v],[L.UV0,V]],k=[[L.POSITION,new y(d,3,!0)],[L.NORMAL,new y(j,3,!0)],[L.UV0,new y(U,2,!0)]];return new S(t,k,G)}function ct(t,n,e,s,o,r){s=s||10,o=null==o||o,R(n.length>1);const h=[[0,0,0]],l=[],u=[];for(let c=0;c<s;c++){l.push([0,-c-1,-(c+1)%s-1]);const t=c/s*2*Math.PI;u.push([Math.cos(t)*e,Math.sin(t)*e])}return at(t,u,n,h,l,o,r)}function at(r,u,p,O,I,w,g=c(0,0,0)){const P=u.length,T=i(p.length*P*3+(6*O.length||0)),R=i(p.length*P*3+(O?6:0)),b=new Array,d=new Array;let j=0,U=0;const V=a(),v=a(),x=a(),F=a(),C=a(),E=a(),G=a(),k=f(),q=a(),B=a(),z=a(),D=a(),X=a(),Z=M();h(q,0,1,0),t(v,p[1],p[0]),e(v,v),w?(o(k,p[0],g),e(x,k)):h(x,0,0,1),wt(v,x,q,q,C,x,gt),l(F,x),l(D,C);for(let t=0;t<O.length;t++)s(E,C,O[t][0]),s(k,x,O[t][2]),o(E,E,k),o(E,E,p[0]),T[j++]=E[0],T[j++]=E[1],T[j++]=E[2];R[U++]=-v[0],R[U++]=-v[1],R[U++]=-v[2];for(let t=0;t<I.length;t++)b.push(I[t][0]>0?I[t][0]:-I[t][0]-1+O.length),b.push(I[t][1]>0?I[t][1]:-I[t][1]-1+O.length),b.push(I[t][2]>0?I[t][2]:-I[t][2]-1+O.length),d.push(0),d.push(0),d.push(0);let H=O.length;const J=O.length-1;for(let h=0;h<p.length;h++){let r=!1;if(h>0){l(V,v),h<p.length-1?(t(v,p[h+1],p[h]),e(v,v)):r=!0,o(B,V,v),e(B,B),o(z,p[h-1],F),A(p[h],B,Z);m(Z,N(z,V),k)?(t(k,k,p[h]),e(x,k),n(C,B,x),e(C,C)):wt(B,F,D,q,C,x,gt),l(F,x),l(D,C)}w&&(o(k,p[h],g),e(X,k));for(let t=0;t<P;t++)if(s(E,C,u[t][0]),s(k,x,u[t][1]),o(E,E,k),e(G,E),R[U++]=G[0],R[U++]=G[1],R[U++]=G[2],o(E,E,p[h]),T[j++]=E[0],T[j++]=E[1],T[j++]=E[2],!r){const n=(t+1)%P;b.push(H+t),b.push(H+P+t),b.push(H+n),b.push(H+n),b.push(H+P+t),b.push(H+P+n);for(let t=0;t<6;t++){const n=b.length-6;d.push(b[n+t]-J)}}H+=P}const K=p[p.length-1];for(let t=0;t<O.length;t++)s(E,C,O[t][0]),s(k,x,O[t][1]),o(E,E,k),o(E,E,K),T[j++]=E[0],T[j++]=E[1],T[j++]=E[2];const Q=U/3;R[U++]=v[0],R[U++]=v[1],R[U++]=v[2];const W=H-P;for(let t=0;t<I.length;t++)b.push(I[t][0]>=0?H+I[t][0]:-I[t][0]-1+W),b.push(I[t][2]>=0?H+I[t][2]:-I[t][2]-1+W),b.push(I[t][1]>=0?H+I[t][1]:-I[t][1]-1+W),d.push(Q),d.push(Q),d.push(Q);const Y=[[L.POSITION,b],[L.NORMAL,d]],$=[[L.POSITION,new y(T,3,!0)],[L.NORMAL,new y(R,3,!0)]];return new S(r,$,Y)}function pt(t,n,e,s){R(n.length>1,"createPolylineGeometry(): polyline needs at least 2 points"),R(3===n[0].length,"createPolylineGeometry(): malformed vertex"),R(null==e||e.length===n.length,"createPolylineGeometry: need same number of points and normals"),R(null==e||3===e[0].length,"createPolylineGeometry(): malformed normal");const o=O(3*n.length),r=new Array(2*(n.length-1));let h=0,l=0;for(let a=0;a<n.length;a++){for(let t=0;t<3;t++)o[h++]=n[a][t];a>0&&(r[l++]=a-1,r[l++]=a)}const u=[],c=[];if(u.push([L.POSITION,r]),c.push([L.POSITION,new y(o,3,!0)]),e){const t=i(3*e.length);let s=0;for(let o=0;o<n.length;o++)for(let n=0;n<3;n++)t[s++]=e[o][n];u.push([L.NORMAL,r]),c.push([L.NORMAL,new y(t,3,!0)])}return s&&(c.push([L.COLOR,new y(s,4)]),u.push([L.COLOR,g(s.length/4)])),new S(t,c,u,null,T.Line)}function ft(t,n,e,s,o,r=0){const h=new Array(18),l=[[-e,r,o/2],[s,r,o/2],[0,n+r,o/2],[-e,r,-o/2],[s,r,-o/2],[0,n+r,-o/2]],u=[0,1,2,3,0,2,2,5,3,1,4,5,5,2,1,1,0,3,3,4,1,4,3,5];for(let c=0;c<6;c++)h[3*c]=l[c][0],h[3*c+1]=l[c][1],h[3*c+2]=l[c][2];return new S(t,[[L.POSITION,new y(h,3,!0)]],[[L.POSITION,u]])}function Ot(t,n){const e=t.getMutableAttribute(L.POSITION).data;for(let s=0;s<e.length;s+=3){const t=e[s],o=e[s+1],r=e[s+2];h(Mt,t,o,r),u(Mt,Mt,n),e[s]=Mt[0],e[s+1]=Mt[1],e[s+2]=Mt[2]}}function it(t,n=t){const e=t.vertexAttributes,s=e.get(L.POSITION).data,o=e.get(L.NORMAL).data;if(o){const t=n.getMutableAttribute(L.NORMAL).data;for(let n=0;n<o.length;n+=3){const e=o[n+1];t[n+1]=-o[n+2],t[n+2]=e}}if(s){const t=n.getMutableAttribute(L.POSITION).data;for(let n=0;n<s.length;n+=3){const e=s[n+1];t[n+1]=-s[n+2],t[n+2]=e}}}function It(t,s,o,h,l){return!(Math.abs(r(s,t))>l)&&(n(o,t,s),e(o,o),n(h,o,t),e(h,h),!0)}function wt(t,n,e,s,o,r,h){return It(t,n,o,r,h)||It(t,e,o,r,h)||It(t,s,o,r,h)}const gt=.99619469809,Mt=a();export{it as cgToGIS,F as createBoxGeometry,lt as createConeGeometry,ut as createCylinderGeometry,q as createDiamondGeometry,ft as createExtrudedTriangle,at as createPathExtrusionGeometry,ot as createPointGeometry,st as createPolySphereData,et as createPolySphereGeometry,pt as createPolylineGeometry,nt as createSphereGeometry,ht as createSquareGeometry,tt as createTetrahedronGeometry,ct as createTubeGeometry,wt as makeOrthoBasisDirUpFallback,Ot as transformInPlace};
5
+ import{f as t,b as n,n as e,i as s,g as o,j as r,s as h,c as l,e as u}from"../../../../chunks/vec3.js";import{f as c,c as a,a as p}from"../../../../chunks/vec3f32.js";import{c as f}from"../../../../chunks/vec3f64.js";import{newDoubleArray as O}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as i,floatArrayFrom as I}from"../../../../geometry/support/FloatArray.js";import{getZeroIndexArray as w,getContinuousIndexArray as g}from"../../../../geometry/support/Indices.js";import{create as M,fromPositionAndNormal as A,intersectRay as N}from"../../../../geometry/support/plane.js";import{wrap as m}from"../../../../geometry/support/ray.js";import{Attribute as y}from"./Attribute.js";import{Vec3Compact as P}from"./BufferVectorMath.js";import{ContentObjectType as T}from"./ContentObjectType.js";import{Geometry as S}from"./Geometry.js";import{assert as R}from"./Util.js";import{VertexAttribute as L}from"./VertexAttribute.js";const b=P,j=[[-.5,-.5,.5],[.5,-.5,.5],[.5,.5,.5],[-.5,.5,.5],[-.5,-.5,-.5],[.5,-.5,-.5],[.5,.5,-.5],[-.5,.5,-.5]],d=[0,0,1,-1,0,0,1,0,0,0,-1,0,0,1,0,0,0,-1],U=[0,0,1,0,1,1,0,1],V=[0,1,2,2,3,0,4,0,3,3,7,4,1,5,6,6,2,1,1,0,4,4,5,1,3,2,6,6,7,3,5,4,7,7,6,5],v=new Array(36);for(let At=0;At<6;At++)for(let t=0;t<6;t++)v[6*At+t]=At;const x=new Array(36);for(let At=0;At<6;At++)x[6*At]=0,x[6*At+1]=1,x[6*At+2]=2,x[6*At+3]=2,x[6*At+4]=3,x[6*At+5]=0;function F(t,n){Array.isArray(n)||(n=[n,n,n]);const e=new Array(24);for(let s=0;s<8;s++)e[3*s]=j[s][0]*n[0],e[3*s+1]=j[s][1]*n[1],e[3*s+2]=j[s][2]*n[2];return new S(t,[[L.POSITION,new y(e,3,!0)],[L.NORMAL,new y(d,3)],[L.UV0,new y(U,2)]],[[L.POSITION,V],[L.NORMAL,v],[L.UV0,x]])}const C=[[-.5,0,-.5],[.5,0,-.5],[.5,0,.5],[-.5,0,.5],[0,-.5,0],[0,.5,0]],E=[0,1,-1,1,1,0,0,1,1,-1,1,0,0,-1,-1,1,-1,0,0,-1,1,-1,-1,0],G=[5,1,0,5,2,1,5,3,2,5,0,3,4,0,1,4,1,2,4,2,3,4,3,0],k=[0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7];function q(t,n){Array.isArray(n)||(n=[n,n,n]);const e=new Array(18);for(let s=0;s<6;s++)e[3*s]=C[s][0]*n[0],e[3*s+1]=C[s][1]*n[1],e[3*s+2]=C[s][2]*n[2];return new S(t,[[L.POSITION,new y(e,3,!0)],[L.NORMAL,new y(E,3)]],[[L.POSITION,G],[L.NORMAL,k]])}const B=c(-.5,0,-.5),z=c(.5,0,-.5),D=c(0,0,.5),X=c(0,.5,0),Z=a(),H=a(),J=a(),K=a(),Q=a();t(Z,B,X),t(H,B,z),n(J,Z,H),e(J,J),t(Z,z,X),t(H,z,D),n(K,Z,H),e(K,K),t(Z,D,X),t(H,D,B),n(Q,Z,H),e(Q,Q);const W=[B,z,D,X],Y=[0,-1,0,J[0],J[1],J[2],K[0],K[1],K[2],Q[0],Q[1],Q[2]],$=[0,1,2,3,1,0,3,2,1,3,0,2],_=[0,0,0,1,1,1,2,2,2,3,3,3];function tt(t,n){Array.isArray(n)||(n=[n,n,n]);const e=new Array(12);for(let s=0;s<4;s++)e[3*s]=W[s][0]*n[0],e[3*s+1]=W[s][1]*n[1],e[3*s+2]=W[s][2]*n[2];return new S(t,[[L.POSITION,new y(e,3,!0)],[L.NORMAL,new y(Y,3)]],[[L.POSITION,$],[L.NORMAL,_]])}function nt(t,n,e,s,o={uv:!0}){const r=-Math.PI,h=2*Math.PI,l=-Math.PI/2,u=Math.PI,c=Math.max(3,Math.floor(e)),a=Math.max(2,Math.floor(s)),p=(c+1)*(a+1),f=i(3*p),O=i(3*p),I=i(2*p),g=[];let M=0;for(let i=0;i<=a;i++){const t=[],e=i/a,s=l+e*u,o=Math.cos(s);for(let l=0;l<=c;l++){const u=l/c,a=r+u*h,p=Math.cos(a)*o,i=Math.sin(s),w=-Math.sin(a)*o;f[3*M]=p*n,f[3*M+1]=i*n,f[3*M+2]=w*n,O[3*M]=p,O[3*M+1]=i,O[3*M+2]=w,I[2*M]=u,I[2*M+1]=e,t.push(M),++M}g.push(t)}const A=new Array;for(let i=0;i<a;i++)for(let t=0;t<c;t++){const n=g[i][t],e=g[i][t+1],s=g[i+1][t+1],o=g[i+1][t];0===i?(A.push(n),A.push(s),A.push(o)):i===a-1?(A.push(n),A.push(e),A.push(s)):(A.push(n),A.push(e),A.push(s),A.push(s),A.push(o),A.push(n))}const N=[[L.POSITION,A],[L.NORMAL,A]],m=[[L.POSITION,new y(f,3,!0)],[L.NORMAL,new y(O,3,!0)]];return o.uv&&(m.push([L.UV0,new y(I,2,!0)]),N.push([L.UV0,A])),o.offset&&(N[0][0]=L.OFFSET,m[0][0]=L.OFFSET,N.push([L.POSITION,w(A.length)]),m.push([L.POSITION,new y(Float64Array.from(o.offset),3,!0)])),new S(t,m,N)}function et(t,n,e,s){const{vertexAttributes:o,indices:r}=st(n,e,s);return new S(t,o,r)}function st(t,n,e){const s=t;let o,r;if(e)o=[0,-1,0,1,0,0,0,0,1,-1,0,0,0,0,-1,0,1,0],r=[0,1,2,0,2,3,0,3,4,0,4,1,1,5,2,2,5,3,3,5,4,4,5,1];else{const t=s*(1+Math.sqrt(5))/2;o=[-s,t,0,s,t,0,-s,-t,0,s,-t,0,0,-s,t,0,s,t,0,-s,-t,0,s,-t,t,0,-s,t,0,s,-t,0,-s,-t,0,s],r=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1]}for(let a=0;a<o.length;a+=3)b.scale(o,a,t/b.length(o,a));let h={};function l(n,e){n>e&&([n,e]=[e,n]);const s=n.toString()+"."+e.toString();if(h[s])return h[s];let r=o.length;return o.length+=3,b.add(o,3*n,o,3*e,o,r),b.scale(o,r,t/b.length(o,r)),r/=3,h[s]=r,r}for(let a=0;a<n;a++){const t=r.length,n=new Array(4*t);for(let e=0;e<t;e+=3){const t=r[e],s=r[e+1],o=r[e+2],h=l(t,s),u=l(s,o),c=l(o,t),a=4*e;n[a]=t,n[a+1]=h,n[a+2]=c,n[a+3]=s,n[a+4]=u,n[a+5]=h,n[a+6]=o,n[a+7]=c,n[a+8]=u,n[a+9]=h,n[a+10]=u,n[a+11]=c}r=n,h={}}const u=I(o);for(let a=0;a<u.length;a+=3)b.normalize(u,a);const c=[[L.POSITION,r],[L.NORMAL,r]];return{vertexAttributes:[[L.POSITION,new y(I(o),3,!0)],[L.NORMAL,new y(u,3,!0)]],indices:c}}function ot(t,n,e,s,o,r,h,l,u=null){const c=e?[e[0],e[1],e[2]]:[0,0,0],a=n?[n[0],n[1],n[2]]:[0,0,1];h=h||[0,0];const p=s?[255*s[0],255*s[1],255*s[2],s.length>3?255*s[3]:255]:[255,255,255,255],f=null!=o&&2===o.length?o:[1,1],O=[[L.POSITION,new y(c,3,!0)],[L.NORMAL,new y(a,3,!0)],[L.UV0,new y(h,h.length)],[L.COLOR,new y(p,4,!0)],[L.SIZE,new y(f,2)]];if(null!=r){const t=[r[0],r[1],r[2],r[3]];O.push([L.AUXPOS1,new y(t,4)])}if(null!=l){const t=[l[0],l[1],l[2],l[3]];O.push([L.FEATUREATTRIBUTE,new y(t,4)])}return new S(t,O,null,null,T.Point,u)}const rt=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0]];function ht(t,n=rt){const e=new Array(12);for(let a=0;a<4;a++)for(let t=0;t<3;t++)e[3*a+t]=n[a][t];const s=[0,1,2,2,3,0],o=[0,0,1],r=[0,0,0,0,0,0],h=[0,0,1,0,1,1,0,1],l=[255,255,255,255],u=[[L.POSITION,s],[L.NORMAL,r],[L.UV0,s],[L.COLOR,r]],c=[[L.POSITION,new y(e,3,!0)],[L.NORMAL,new y(o,3,!0)],[L.UV0,new y(h,2,!0)],[L.COLOR,new y(l,4,!0)]];return new S(t,c,u)}function lt(t,n,e,s,o,r=!0,h=!0){let l=0;const u=e,a=n;let p=c(0,l,0),f=c(0,l+a,0),O=c(0,-1,0),I=c(0,1,0);o&&(l=a,f=c(0,0,0),p=c(0,l,0),O=c(0,1,0),I=c(0,-1,0));const w=[f,p],g=[O,I],M=s+2,A=Math.sqrt(a*a+u*u);if(o)for(let i=s-1;i>=0;i--){const t=i*(2*Math.PI/s),n=c(Math.cos(t)*u,l,Math.sin(t)*u);w.push(n);const e=c(a*Math.cos(t)/A,-u/A,a*Math.sin(t)/A);g.push(e)}else for(let i=0;i<s;i++){const t=i*(2*Math.PI/s),n=c(Math.cos(t)*u,l,Math.sin(t)*u);w.push(n);const e=c(a*Math.cos(t)/A,u/A,a*Math.sin(t)/A);g.push(e)}const N=new Array,m=new Array;if(r){for(let t=3;t<w.length;t++)N.push(1),N.push(t-1),N.push(t),m.push(0),m.push(0),m.push(0);N.push(w.length-1),N.push(2),N.push(1),m.push(0),m.push(0),m.push(0)}if(h){for(let t=3;t<w.length;t++)N.push(t),N.push(t-1),N.push(0),m.push(t),m.push(t-1),m.push(1);N.push(0),N.push(2),N.push(w.length-1),m.push(1),m.push(2),m.push(g.length-1)}const P=i(3*M);for(let c=0;c<M;c++)P[3*c]=w[c][0],P[3*c+1]=w[c][1],P[3*c+2]=w[c][2];const T=i(3*M);for(let c=0;c<M;c++)T[3*c]=g[c][0],T[3*c+1]=g[c][1],T[3*c+2]=g[c][2];const R=[[L.POSITION,N],[L.NORMAL,m]],b=[[L.POSITION,new y(P,3,!0)],[L.NORMAL,new y(T,3,!0)]];return new S(t,b,R)}function ut(t,l,u,f,O,I,w){const g=O?p(O):c(1,0,0),M=I?p(I):c(0,0,0);w??=!0;const A=a();e(A,g);const N=a();s(N,A,Math.abs(l));const m=a();s(m,N,-.5),o(m,m,M);const P=c(0,1,0);Math.abs(1-r(A,P))<.2&&h(P,0,0,1);const T=a();n(T,A,P),e(T,T),n(P,T,A);const R=2*f+(w?2:0),b=f+(w?2:0),j=i(3*R),d=i(3*b),U=i(2*R),V=new Array(3*f*(w?4:2)),v=new Array(3*f*(w?4:2));w&&(j[3*(R-2)]=m[0],j[3*(R-2)+1]=m[1],j[3*(R-2)+2]=m[2],U[2*(R-2)]=0,U[2*(R-2)+1]=0,j[3*(R-1)]=j[3*(R-2)]+N[0],j[3*(R-1)+1]=j[3*(R-2)+1]+N[1],j[3*(R-1)+2]=j[3*(R-2)+2]+N[2],U[2*(R-1)]=1,U[2*(R-1)+1]=1,d[3*(b-2)]=-A[0],d[3*(b-2)+1]=-A[1],d[3*(b-2)+2]=-A[2],d[3*(b-1)]=A[0],d[3*(b-1)+1]=A[1],d[3*(b-1)+2]=A[2]);const x=(t,n,e)=>{V[t]=n,v[t]=e};let F=0;const C=a(),E=a();for(let n=0;n<f;n++){const t=n*(2*Math.PI/f);s(C,P,Math.sin(t)),s(E,T,Math.cos(t)),o(C,C,E),d[3*n]=C[0],d[3*n+1]=C[1],d[3*n+2]=C[2],s(C,C,u),o(C,C,m),j[3*n]=C[0],j[3*n+1]=C[1],j[3*n+2]=C[2],U[2*n]=n/f,U[2*n+1]=0,j[3*(n+f)]=j[3*n]+N[0],j[3*(n+f)+1]=j[3*n+1]+N[1],j[3*(n+f)+2]=j[3*n+2]+N[2],U[2*(n+f)]=n/f,U[2*n+1]=1;const e=(n+1)%f;x(F++,n,n),x(F++,n+f,n),x(F++,e,e),x(F++,e,e),x(F++,n+f,n),x(F++,e+f,e)}if(w){for(let t=0;t<f;t++){const n=(t+1)%f;x(F++,R-2,b-2),x(F++,t,b-2),x(F++,n,b-2)}for(let t=0;t<f;t++){const n=(t+1)%f;x(F++,t+f,b-1),x(F++,R-1,b-1),x(F++,n+f,b-1)}}const G=[[L.POSITION,V],[L.NORMAL,v],[L.UV0,V]],k=[[L.POSITION,new y(j,3,!0)],[L.NORMAL,new y(d,3,!0)],[L.UV0,new y(U,2,!0)]];return new S(t,k,G)}function ct(t,n,e,s,o,r){s=s||10,o=null==o||o,R(n.length>1);const h=[[0,0,0]],l=[],u=[];for(let c=0;c<s;c++){l.push([0,-c-1,-(c+1)%s-1]);const t=c/s*2*Math.PI;u.push([Math.cos(t)*e,Math.sin(t)*e])}return at(t,u,n,h,l,o,r)}function at(r,u,p,O,I,w,g=c(0,0,0)){const P=u.length,T=i(p.length*P*3+(6*O.length||0)),R=i(p.length*P*3+(O?6:0)),b=new Array,j=new Array;let d=0,U=0;const V=a(),v=a(),x=a(),F=a(),C=a(),E=a(),G=a(),k=f(),q=a(),B=a(),z=a(),D=a(),X=a(),Z=M();h(q,0,1,0),t(v,p[1],p[0]),e(v,v),w?(o(k,p[0],g),e(x,k)):h(x,0,0,1),wt(v,x,q,q,C,x,gt),l(F,x),l(D,C);for(let t=0;t<O.length;t++)s(E,C,O[t][0]),s(k,x,O[t][2]),o(E,E,k),o(E,E,p[0]),T[d++]=E[0],T[d++]=E[1],T[d++]=E[2];R[U++]=-v[0],R[U++]=-v[1],R[U++]=-v[2];for(let t=0;t<I.length;t++)b.push(I[t][0]>0?I[t][0]:-I[t][0]-1+O.length),b.push(I[t][1]>0?I[t][1]:-I[t][1]-1+O.length),b.push(I[t][2]>0?I[t][2]:-I[t][2]-1+O.length),j.push(0),j.push(0),j.push(0);let H=O.length;const J=O.length-1;for(let h=0;h<p.length;h++){let r=!1;if(h>0){l(V,v),h<p.length-1?(t(v,p[h+1],p[h]),e(v,v)):r=!0,o(B,V,v),e(B,B),o(z,p[h-1],F),A(p[h],B,Z);N(Z,m(z,V),k)?(t(k,k,p[h]),e(x,k),n(C,B,x),e(C,C)):wt(B,F,D,q,C,x,gt),l(F,x),l(D,C)}w&&(o(k,p[h],g),e(X,k));for(let t=0;t<P;t++)if(s(E,C,u[t][0]),s(k,x,u[t][1]),o(E,E,k),e(G,E),R[U++]=G[0],R[U++]=G[1],R[U++]=G[2],o(E,E,p[h]),T[d++]=E[0],T[d++]=E[1],T[d++]=E[2],!r){const n=(t+1)%P;b.push(H+t),b.push(H+P+t),b.push(H+n),b.push(H+n),b.push(H+P+t),b.push(H+P+n);for(let t=0;t<6;t++){const n=b.length-6;j.push(b[n+t]-J)}}H+=P}const K=p[p.length-1];for(let t=0;t<O.length;t++)s(E,C,O[t][0]),s(k,x,O[t][1]),o(E,E,k),o(E,E,K),T[d++]=E[0],T[d++]=E[1],T[d++]=E[2];const Q=U/3;R[U++]=v[0],R[U++]=v[1],R[U++]=v[2];const W=H-P;for(let t=0;t<I.length;t++)b.push(I[t][0]>=0?H+I[t][0]:-I[t][0]-1+W),b.push(I[t][2]>=0?H+I[t][2]:-I[t][2]-1+W),b.push(I[t][1]>=0?H+I[t][1]:-I[t][1]-1+W),j.push(Q),j.push(Q),j.push(Q);const Y=[[L.POSITION,b],[L.NORMAL,j]],$=[[L.POSITION,new y(T,3,!0)],[L.NORMAL,new y(R,3,!0)]];return new S(r,$,Y)}function pt(t,n,e,s){R(n.length>1,"createPolylineGeometry(): polyline needs at least 2 points"),R(3===n[0].length,"createPolylineGeometry(): malformed vertex"),R(null==e||e.length===n.length,"createPolylineGeometry: need same number of points and normals"),R(null==e||3===e[0].length,"createPolylineGeometry(): malformed normal");const o=O(3*n.length),r=new Array(2*(n.length-1));let h=0,l=0;for(let a=0;a<n.length;a++){for(let t=0;t<3;t++)o[h++]=n[a][t];a>0&&(r[l++]=a-1,r[l++]=a)}const u=[],c=[];if(u.push([L.POSITION,r]),c.push([L.POSITION,new y(o,3,!0)]),e){const t=i(3*e.length);let s=0;for(let o=0;o<n.length;o++)for(let n=0;n<3;n++)t[s++]=e[o][n];u.push([L.NORMAL,r]),c.push([L.NORMAL,new y(t,3,!0)])}return s&&(c.push([L.COLOR,new y(s,4)]),u.push([L.COLOR,g(s.length/4)])),new S(t,c,u,null,T.Line)}function ft(t,n,e,s,o,r=0){const h=new Array(18),l=[[-e,r,o/2],[s,r,o/2],[0,n+r,o/2],[-e,r,-o/2],[s,r,-o/2],[0,n+r,-o/2]],u=[0,1,2,3,0,2,2,5,3,1,4,5,5,2,1,1,0,3,3,4,1,4,3,5];for(let c=0;c<6;c++)h[3*c]=l[c][0],h[3*c+1]=l[c][1],h[3*c+2]=l[c][2];return new S(t,[[L.POSITION,new y(h,3,!0)]],[[L.POSITION,u]])}function Ot(t,n){const e=t.getMutableAttribute(L.POSITION).data;for(let s=0;s<e.length;s+=3){const t=e[s],o=e[s+1],r=e[s+2];h(Mt,t,o,r),u(Mt,Mt,n),e[s]=Mt[0],e[s+1]=Mt[1],e[s+2]=Mt[2]}}function it(t,n=t){const e=t.vertexAttributes,s=e.get(L.POSITION).data,o=e.get(L.NORMAL).data;if(o){const t=n.getMutableAttribute(L.NORMAL).data;for(let n=0;n<o.length;n+=3){const e=o[n+1];t[n+1]=-o[n+2],t[n+2]=e}}if(s){const t=n.getMutableAttribute(L.POSITION).data;for(let n=0;n<s.length;n+=3){const e=s[n+1];t[n+1]=-s[n+2],t[n+2]=e}}}function It(t,s,o,h,l){return!(Math.abs(r(s,t))>l)&&(n(o,t,s),e(o,o),n(h,o,t),e(h,h),!0)}function wt(t,n,e,s,o,r,h){return It(t,n,o,r,h)||It(t,e,o,r,h)||It(t,s,o,r,h)}const gt=.99619469809,Mt=a();export{it as cgToGIS,F as createBoxGeometry,lt as createConeGeometry,ut as createCylinderGeometry,q as createDiamondGeometry,ft as createExtrudedTriangle,at as createPathExtrusionGeometry,ot as createPointGeometry,st as createPolySphereData,et as createPolySphereGeometry,pt as createPolylineGeometry,nt as createSphereGeometry,ht as createSquareGeometry,tt as createTetrahedronGeometry,ct as createTubeGeometry,wt as makeOrthoBasisDirUpFallback,Ot as transformInPlace};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{generateUID as t}from"../../../../core/uid.js";import{g as i}from"../../../../chunks/vec3.js";import{c as r}from"../../../../chunks/vec3f64.js";import{f as o}from"../../../../chunks/vec4f64.js";import{projectBuffer as s}from"../../../../geometry/projection/projectBuffer.js";import{Attribute as e}from"./Attribute.js";import{ContentObjectType as n}from"./ContentObjectType.js";import{Geometry as a}from"./Geometry.js";import{fromValues as h}from"./LocalOriginFactory.js";import{Object3D as m}from"./Object3D.js";import{gridLocalOriginFactory as c}from"./testUtils.js";import{VertexAttribute as g}from"./VertexAttribute.js";import{WebGLLayer as d}from"./WebGLLayer.js";import{RibbonLineMaterial as f}from"../materials/RibbonLineMaterial.js";class _{constructor(i){this._originSR=i,this._origins=new Map,this._objects=new Map,this._gridSize=5e5,this._rootOriginId="root/"+t()}getOrigin(t){const r=this._origins.get(this._rootOriginId);if(null==r){const i=c.rootOrigin;if(null!=i)return this._origins.set(this._rootOriginId,h(i[0],i[1],i[2],this._rootOriginId)),this.getOrigin(t);const r=h(t[0]+Math.random()-.5,t[1]+Math.random()-.5,t[2]+Math.random()-.5,this._rootOriginId);return this._origins.set(this._rootOriginId,r),r}const o=this._gridSize,s=Math.round(t[0]/o),e=Math.round(t[1]/o),n=Math.round(t[2]/o),a=`${s}/${e}/${n}`;let m=this._origins.get(a);const g=.5*o;if(i(p,t,r.vec3),p[0]=Math.abs(p[0]),p[1]=Math.abs(p[1]),p[2]=Math.abs(p[2]),p[0]<g&&p[1]<g&&p[2]<g){if(m){const r=Math.max(...p);i(p,t,m.vec3),p[0]=Math.abs(p[0]),p[1]=Math.abs(p[1]),p[2]=Math.abs(p[2]);if(Math.max(...p)<r)return m}return r}return m||(m=h(s*o,e*o,n*o,a),this._origins.set(a,m)),m}_drawOriginBox(t,i=o(1,1,0,1)){const r=window.view,h=r._stage,c=i.toString();if(!this._objects.has(c)){this._material=new f({width:2,color:i}),h.add(this._material);const t=new d(h,{pickable:!1}),r=new m({castShadow:!1});h.add(r),t.add(r),this._objects.set(c,r)}const _=this._objects.get(c),p=[0,1,5,4,0,2,1,7,6,2,0,1,3,7,5,4,6,2,0],j=p.length,u=new Array(3*j),l=new Array,b=.5*this._gridSize;for(let o=0;o<j;o++)u[3*o]=t[0]+(1&p[o]?b:-b),u[3*o+1]=t[1]+(2&p[o]?b:-b),u[3*o+2]=t[2]+(4&p[o]?b:-b),o>0&&l.push(o-1,o);s(u,this._originSR,0,u,r.renderSpatialReference,0,j);const M=new a(this._material,[[g.POSITION,new e(u,3,!0)]],[[g.POSITION,l]],null,n.Line);h.add(M),_.addGeometry(M)}get test(){const t=this;return{set gridSize(i){t._gridSize=i}}}}const p=r();export{_ as GridLocalOriginFactory};
5
+ import{generateUID as t}from"../../../../core/uid.js";import{f as i}from"../../../../chunks/vec3.js";import{c as r}from"../../../../chunks/vec3f64.js";import{a as o}from"../../../../chunks/vec4f64.js";import{projectBuffer as s}from"../../../../geometry/projection/projectBuffer.js";import{Attribute as e}from"./Attribute.js";import{ContentObjectType as n}from"./ContentObjectType.js";import{Geometry as a}from"./Geometry.js";import{fromValues as h}from"./LocalOriginFactory.js";import{Object3D as m}from"./Object3D.js";import{gridLocalOriginFactory as c}from"./testUtils.js";import{VertexAttribute as g}from"./VertexAttribute.js";import{WebGLLayer as d}from"./WebGLLayer.js";import{RibbonLineMaterial as f}from"../materials/RibbonLineMaterial.js";class _{constructor(i){this._originSR=i,this._rootOriginId="root/"+t(),this._origins=new Map,this._objects=new Map,this._gridSize=5e5}getOrigin(t){const r=this._origins.get(this._rootOriginId);if(null==r){const i=c.rootOrigin;if(null!=i)return this._origins.set(this._rootOriginId,h(i[0],i[1],i[2],this._rootOriginId)),this.getOrigin(t);const r=h(t[0]+Math.random()-.5,t[1]+Math.random()-.5,t[2]+Math.random()-.5,this._rootOriginId);return this._origins.set(this._rootOriginId,r),r}const o=this._gridSize,s=Math.round(t[0]/o),e=Math.round(t[1]/o),n=Math.round(t[2]/o),a=`${s}/${e}/${n}`;let m=this._origins.get(a);const g=.5*o;if(i(p,t,r.vec3),p[0]=Math.abs(p[0]),p[1]=Math.abs(p[1]),p[2]=Math.abs(p[2]),p[0]<g&&p[1]<g&&p[2]<g){if(m){const r=Math.max(...p);i(p,t,m.vec3),p[0]=Math.abs(p[0]),p[1]=Math.abs(p[1]),p[2]=Math.abs(p[2]);if(Math.max(...p)<r)return m}return r}return m||(m=h(s*o,e*o,n*o,a),this._origins.set(a,m)),m}_drawOriginBox(t,i=o(1,1,0,1)){const r=window.view,h=r._stage,c=i.toString();if(!this._objects.has(c)){this._material=new f({width:2,color:i}),h.add(this._material);const t=new d(h,{pickable:!1}),r=new m({castShadow:!1});h.add(r),t.add(r),this._objects.set(c,r)}const _=this._objects.get(c),p=[0,1,5,4,0,2,1,7,6,2,0,1,3,7,5,4,6,2,0],j=p.length,u=new Array(3*j),l=new Array,b=.5*this._gridSize;for(let o=0;o<j;o++)u[3*o]=t[0]+(1&p[o]?b:-b),u[3*o+1]=t[1]+(2&p[o]?b:-b),u[3*o+2]=t[2]+(4&p[o]?b:-b),o>0&&l.push(o-1,o);s(u,this._originSR,0,u,r.renderSpatialReference,0,j);const M=new a(this._material,[[g.POSITION,new e(u,3,!0)]],[[g.POSITION,l]],null,n.Line);h.add(M),_.addGeometry(M)}get test(){const t=this;return{set gridSize(i){t._gridSize=i}}}}const p=r();export{_ as GridLocalOriginFactory};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
+ */
5
+ function e(e){return!!e.frameUpdate}export{e as isFrameUpdateTexture};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{c as t}from"../../../../chunks/mat4.js";import{c as r,I as s}from"../../../../chunks/mat4f64.js";import{e as i,m as e,b as n,l as a,i as o,n as h}from"../../../../chunks/vec3.js";import{c as d,U as c}from"../../../../chunks/vec3f64.js";import{t as l}from"../../../../chunks/vec4.js";import{c as m}from"../../../../chunks/vec4f64.js";import{create as f,fromPoints as u,copy as y}from"../../../../geometry/support/ray.js";import{ViewingMode as p}from"../../../ViewingMode.js";import{IntersectorOptions as _,StoreResults as g,IntersectorType as O}from"./IntersectorInterfaces.js";import{HudTarget as L}from"./IntersectorTarget.js";import{isValidIntersectorResult as v}from"./intersectorUtils.js";import{IntersectorTransform as j,getVerticalOffsetObject3D as E}from"./verticalOffsetUtils.js";const w=1e-5;class b{constructor(t){this.options=new _,this._results=new T,this.transform=new j,this.tolerance=w,this.verticalOffset=null,this._ray=f(),this._rayEnd=d(),this._rayBeginTransformed=d(),this._rayEndTransformed=d(),this.viewingMode=t??p.Global}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(t,r,s){this.resetWithRay(u(t,r,this._ray),s)}resetWithRay(t,r){this.camera=r,t!==this._ray&&y(t,this._ray),0!==this.options.verticalOffset?this.viewingMode===p.Local?this._ray.origin[2]-=this.options.verticalOffset:this.verticalOffset=this.options.verticalOffset:this.verticalOffset=null,i(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray)}intersect(t=null,r,s,i,e){this.point=r,this.filterPredicate=i,this.tolerance=s??w;const n=E(this.verticalOffset);if(t&&t.length>0){const r=e?t=>{e(t)&&this.intersectObject(t)}:t=>{this.intersectObject(t)};for(const s of t){const t=s.getSpatialQueryAccelerator&&s.getSpatialQueryAccelerator();null!=t?(null!=n?t.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,r,n):t.forEachAlongRay(this._ray.origin,this._ray.direction,r),this.options.selectionMode&&this.options.hud&&t.forEachDegenerateObject(r)):s.objects.forAll((t=>r(t)))}}this.sortResults()}intersectObject(t){const r=t.geometries;if(!r)return;const i=t.effectiveTransformation,n=E(this.verticalOffset);for(const a of r){if(!a.visible)continue;const{material:r,id:o}=a;this.transform.setAndInvalidateLazyTransforms(i,a.transformation),e(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),e(this._rayEndTransformed,this.rayEnd,this.transform.inverse);const h=this.transform.transform;null!=n&&(n.objectTransform=this.transform),r.intersect(a,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,((r,i,e,n,a,d)=>{if(r>=0){if(null!=this.filterPredicate&&!this.filterPredicate(this._ray.origin,this._rayEnd,r))return;const c=n?this._results.hud:this._results,l=n?n=>{const h=new L(t,o,e,d);n.set(O.HUD,h,r,i,s,a)}:s=>s.set(O.OBJECT,{object:t,geometryId:o,triangleNr:e},r,i,h,a);if((null==c.min.drapedLayerOrder||a>=c.min.drapedLayerOrder)&&(null==c.min.dist||r<c.min.dist)&&l(c.min),this.options.store!==g.MIN&&(null==c.max.drapedLayerOrder||a<c.max.drapedLayerOrder)&&(null==c.max.dist||r>c.max.dist)&&l(c.max),this.options.store===g.ALL)if(n){const t=new I(this._ray);l(t),this._results.hud.all.push(t)}else{const t=new x(this._ray);l(t),this._results.all.push(t)}}}))}}sortResults(t=this._results.all){t.sort(((t,r)=>t.dist!==r.dist?(t.dist??0)-(r.dist??0):t.drapedLayerOrder!==r.drapedLayerOrder?(t.drapedLayerOrder??Number.MAX_VALUE)-(r.drapedLayerOrder??Number.MAX_VALUE):(r.drapedLayerGraphicOrder??Number.MIN_VALUE)-(t.drapedLayerGraphicOrder??Number.MIN_VALUE)))}}function A(t){return new b(t)}class T{constructor(){this.min=new x(f()),this.max=new x(f()),this.hud={min:new I(f()),max:new I(f()),all:new Array},this.ground=new x(f()),this.all=[]}init(t){this.min.init(t),this.max.init(t),this.ground.init(t),this.all.length=0,this.hud.min.init(t),this.hud.max.init(t),this.hud.all.length=0}}class x{get ray(){return this._ray}get distanceInRenderSpace(){return null!=this.dist?(n(N,this.ray.direction,this.dist),a(N)):null}getIntersectionPoint(t){return!!v(this)&&(n(N,this.ray.direction,this.dist),i(t,this.ray.origin,N),!0)}getTransformedNormal(t){return o(U,this.normal),U[3]=0,l(U,U,this.transformation),o(t,U),h(t,t)}constructor(t){this.intersector=O.OBJECT,this.normal=d(),this.transformation=r(),this._ray=f(),this.init(t)}init(t){this.dist=null,this.target=null,this.drapedLayerOrder=null,this.drapedLayerGraphicOrder=null,this.intersector=O.OBJECT,y(t,this._ray)}set(r,i,e,n,a,h,d){this.intersector=r,this.dist=e,o(this.normal,n??c),t(this.transformation,a??s),this.target=i,this.drapedLayerOrder=h,this.drapedLayerGraphicOrder=d}copy(r){y(r.ray,this._ray),this.intersector=r.intersector,this.dist=r.dist,this.target=r.target,this.drapedLayerOrder=r.drapedLayerOrder,this.drapedLayerGraphicOrder=r.drapedLayerGraphicOrder,o(this.normal,r.normal),t(this.transformation,r.transformation)}}class I extends x{constructor(){super(...arguments),this.intersector=O.HUD}}function M(t){return new x(t)}const N=d(),U=m();export{w as DEFAULT_TOLERANCE,A as newIntersector,M as newIntersectorResult};
5
+ import{h as t}from"../../../../chunks/mat4.js";import{a as r,I as s}from"../../../../chunks/mat4f64.js";import{g as i,e,i as a,l as n,c as o,n as h}from"../../../../chunks/vec3.js";import{c as d,d as l}from"../../../../chunks/vec3f64.js";import{t as c}from"../../../../chunks/vec4.js";import{c as m}from"../../../../chunks/vec4f64.js";import{create as f,fromPoints as u,copy as y}from"../../../../geometry/support/ray.js";import{ViewingMode as p}from"../../../ViewingMode.js";import{IntersectorOptions as g,StoreResults as _,IntersectorType as O}from"./IntersectorInterfaces.js";import{HudTarget as L}from"./IntersectorTarget.js";import{isValidIntersectorResult as v}from"./intersectorUtils.js";import{IntersectorTransform as j,getVerticalOffsetObject3D as E}from"./verticalOffsetUtils.js";const w=1e-5;class A{constructor(t){this.options=new g,this._results=new b,this.transform=new j,this.tolerance=w,this.verticalOffset=null,this._ray=f(),this._rayEnd=d(),this._rayBeginTransformed=d(),this._rayEndTransformed=d(),this.viewingMode=t??p.Global}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(t,r,s){this.resetWithRay(u(t,r,this._ray),s)}resetWithRay(t,r){this.camera=r,t!==this._ray&&y(t,this._ray),0!==this.options.verticalOffset?this.viewingMode===p.Local?this._ray.origin[2]-=this.options.verticalOffset:this.verticalOffset=this.options.verticalOffset:this.verticalOffset=null,i(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray)}intersect(t=null,r,s,i,e){this.point=r,this.filterPredicate=i,this.tolerance=s??w;const a=E(this.verticalOffset);if(t&&t.length>0){const r=e?t=>{e(t)&&this.intersectObject(t)}:t=>{this.intersectObject(t)};for(const s of t){const t=s.getSpatialQueryAccelerator&&s.getSpatialQueryAccelerator();null!=t?(null!=a?t.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,r,a):t.forEachAlongRay(this._ray.origin,this._ray.direction,r),this.options.selectionMode&&this.options.hud&&t.forEachDegenerateObject(r)):s.objects.forAll((t=>r(t)))}}this.sortResults()}intersectObject(t){const r=t.geometries;if(!r)return;const i=t.effectiveTransformation,a=E(this.verticalOffset);for(const n of r){if(!n.visible)continue;const{material:r,id:o}=n;this.transform.setAndInvalidateLazyTransforms(i,n.transformation),e(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),e(this._rayEndTransformed,this.rayEnd,this.transform.inverse);const h=this.transform.transform;null!=a&&(a.objectTransform=this.transform),r.intersect(n,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,((r,i,e,a,n,d)=>{if(r>=0){if(null!=this.filterPredicate&&!this.filterPredicate(this._ray.origin,this._rayEnd,r))return;const l=a?this._results.hud:this._results,c=a?a=>{const h=new L(t,o,e,d);a.set(O.HUD,h,r,i,s,n)}:s=>s.set(O.OBJECT,{object:t,geometryId:o,triangleNr:e},r,i,h,n);if((null==l.min.drapedLayerOrder||n>=l.min.drapedLayerOrder)&&(null==l.min.dist||r<l.min.dist)&&c(l.min),this.options.store!==_.MIN&&(null==l.max.drapedLayerOrder||n<l.max.drapedLayerOrder)&&(null==l.max.dist||r>l.max.dist)&&c(l.max),this.options.store===_.ALL)if(a){const t=new I(this._ray);c(t),this._results.hud.all.push(t)}else{const t=new x(this._ray);c(t),this._results.all.push(t)}}}))}}sortResults(t=this._results.all){t.sort(((t,r)=>t.dist!==r.dist?(t.dist??0)-(r.dist??0):t.drapedLayerOrder!==r.drapedLayerOrder?(t.drapedLayerOrder??Number.MAX_VALUE)-(r.drapedLayerOrder??Number.MAX_VALUE):(r.drapedLayerGraphicOrder??Number.MIN_VALUE)-(t.drapedLayerGraphicOrder??Number.MIN_VALUE)))}}function T(t){return new A(t)}class b{constructor(){this.min=new x(f()),this.max=new x(f()),this.hud={min:new I(f()),max:new I(f()),all:new Array},this.ground=new x(f()),this.all=[]}init(t){this.min.init(t),this.max.init(t),this.ground.init(t),this.all.length=0,this.hud.min.init(t),this.hud.max.init(t),this.hud.all.length=0}}class x{get ray(){return this._ray}get distanceInRenderSpace(){return null!=this.dist?(a(N,this.ray.direction,this.dist),n(N)):null}getIntersectionPoint(t){return!!v(this)&&(a(N,this.ray.direction,this.dist),i(t,this.ray.origin,N),!0)}getTransformedNormal(t){return o(B,this.normal),B[3]=0,c(B,B,this.transformation),o(t,B),h(t,t)}constructor(t){this.intersector=O.OBJECT,this.normal=d(),this.transformation=r(),this._ray=f(),this.init(t)}init(t){this.dist=null,this.target=null,this.drapedLayerOrder=null,this.drapedLayerGraphicOrder=null,this.intersector=O.OBJECT,y(t,this._ray)}set(r,i,e,a,n,h,d){this.intersector=r,this.dist=e,o(this.normal,a??l),t(this.transformation,n??s),this.target=i,this.drapedLayerOrder=h,this.drapedLayerGraphicOrder=d}copy(r){y(r.ray,this._ray),this.intersector=r.intersector,this.dist=r.dist,this.target=r.target,this.drapedLayerOrder=r.drapedLayerOrder,this.drapedLayerGraphicOrder=r.drapedLayerGraphicOrder,o(this.normal,r.normal),t(this.transformation,r.transformation)}}class I extends x{constructor(){super(...arguments),this.intersector=O.HUD}}function M(t){return new x(t)}const N=d(),B=m();export{w as DEFAULT_TOLERANCE,T as newIntersector,M as newIntersectorResult};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{a as s}from"../../../../chunks/vec3f64.js";class t{constructor(s,t,r){this.object=s,this.geometryId=t,this.triangleNr=r}}class r extends t{constructor(t,r,c,e){super(t,r,c),this.center=null!=e?s(e):null}}class c extends r{}class e{constructor(s){this.layerUid=s}}class o extends e{constructor(s,t){super(s),this.graphicUid=t}}export{o as Graphic3DTarget,r as HudTarget,e as LayerTarget,t as ObjectTarget,c as ValidHudTarget};
5
+ import{g as s}from"../../../../chunks/vec3f64.js";class t{constructor(s,t,r){this.object=s,this.geometryId=t,this.triangleNr=r}}class r extends t{constructor(t,r,c,e){super(t,r,c),this.center=null!=e?s(e):null}}class c extends r{}class e{constructor(s){this.layerUid=s}}class o extends e{constructor(s,t){super(s),this.graphicUid=t}}export{o as Graphic3DTarget,r as HudTarget,e as LayerTarget,t as ObjectTarget,c as ValidHudTarget};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{c as i}from"../../../../chunks/mat4.js";import{c as t}from"../../../../chunks/mat4f64.js";import{applyToViewMatrix as r}from"./localOriginHelper.js";class e{constructor(i){this._factory=i,this._originData=new Map}acquire(i){return this.register(this._factory.getOrigin(i))}register(i){const t=this._originData.get(i.id)||new s(i);return t.refCount++,this._originData.has(t.origin.id)||this._originData.set(t.origin.id,t),t}release(i){i.refCount--,0===i.refCount&&this._originData.delete(i.origin.id)}updateViewMatrices(t){this._originData.forEach((e=>{i(e.viewMatrix,t),r(e.origin.vec3,e.viewMatrix)}))}}class s{constructor(i){this.origin=i,this.refCount=0,this.viewMatrix=t()}}export{e as LocalOriginManager,s as OriginData};
5
+ import{h as i}from"../../../../chunks/mat4.js";import{a as t}from"../../../../chunks/mat4f64.js";import{applyToViewMatrix as r}from"./localOriginHelper.js";class a{constructor(i){this._factory=i,this._originData=new Map}acquire(i){return this.register(this._factory.getOrigin(i))}register(i){const t=this._originData.get(i.id)||new e(i);return t.refCount++,this._originData.has(t.origin.id)||this._originData.set(t.origin.id,t),t}release(i){i.refCount--,0===i.refCount&&this._originData.delete(i.origin.id)}updateViewMatrices(t){this._originData.forEach((a=>{i(a.viewMatrix,t),r(a.origin.vec3,a.viewMatrix)}))}}class e{constructor(i){this.origin=i,this.refCount=0,this.viewMatrix=t()}}export{a as LocalOriginManager,e as OriginData};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{c as t,m as e,y as i}from"../../../../chunks/mat4.js";import{I as s,c as o}from"../../../../chunks/mat4f64.js";import{f as r,m as n,h as a,s as h,e as m,k as c,i as l}from"../../../../chunks/vec3.js";import{f as d,c as u}from"../../../../chunks/vec3f64.js";import{c as f}from"../../../../chunks/sphere.js";import{maxScale as g}from"../../support/mathUtils.js";import{Object3DState as b}from"./basicInterfaces.js";import{ContentObject as _}from"./ContentObject.js";import{ContentObjectType as p}from"./ContentObjectType.js";import{Object3DStateID as v}from"./Object3DStateID.js";import{assert as j}from"./Util.js";import{addObject3DStateID as y,removeObject3DStateID as S}from"../materials/renderers/utils.js";class x extends _{get geometries(){return this._geometries}get transformation(){return this._transformation??s}set transformation(e){this._transformation=t(this._transformation??o(),e),this._invalidateBoundingVolume(),this._emit("objectTransformation",this)}get shaderTransformation(){return this._shaderTransformation}set shaderTransformation(e){this._shaderTransformation=e?t(this._shaderTransformation??o(),e):null,this._invalidateBoundingVolume(),this._emit("objectShaderTransformation",this)}get effectiveTransformation(){return this.shaderTransformation??this.transformation}constructor(t={}){super(),this.type=p.Object,this._shaderTransformation=null,this._parentLayer=null,this._visible=!0,this.castShadow=t.castShadow??!0,this.usesVerticalDistanceToGround=t.usesVerticalDistanceToGround??!1,this.graphicUid=t.graphicUid,this.layerUid=t.layerUid,t.isElevationSource&&(this.lastValidElevationBB=new O),this._geometries=t.geometries?Array.from(t.geometries):new Array}dispose(){this._geometries.length=0}get parentLayer(){return this._parentLayer}set parentLayer(t){j(null==this._parentLayer||null==t,"Object3D can only be added to a single Layer"),this._parentLayer=t}addGeometry(t){t.visible=this._visible,this._geometries.push(t),this._emit("objectGeometryAdded",{object:this,geometry:t}),this._invalidateBoundingVolume()}removeGeometry(t){const e=this._geometries.splice(t,1)[0];e&&(this._emit("objectGeometryRemoved",{object:this,geometry:e}),this._invalidateBoundingVolume())}removeAllGeometries(){for(;this._geometries.length>0;)this.removeGeometry(0)}geometryVertexAttrsUpdated(t){this._emit("objectGeometryUpdated",{object:this,geometry:t}),this._invalidateBoundingVolume()}get visible(){return this._visible}set visible(t){if(this._visible!==t){this._visible=t;for(const t of this._geometries)t.visible=this._visible;this._emit("visibilityChanged",this)}}maskOccludee(){const t=new v(b.MaskOccludee);for(const e of this._geometries)e.occludees=y(e.occludees,t);return this._emit("occlusionChanged",this),t}removeOcclude(t){for(const e of this._geometries)e.occludees=S(e.occludees,t);this._emit("occlusionChanged",this)}highlight(){const t=new v(b.Highlight);for(const e of this._geometries)e.highlights=y(e.highlights,t);return this._emit("highlightChanged",this),t}removeHighlight(t){for(const e of this._geometries)e.highlights=S(e.highlights,t);this._emit("highlightChanged",this)}getCombinedStaticTransformation(t,i){return e(i,this.transformation,t.transformation)}getCombinedShaderTransformation(t,i=o()){return e(i,this.effectiveTransformation,t.transformation)}get boundingVolumeWorldSpace(){return this._bvWorldSpace||(this._bvWorldSpace=this._bvWorldSpace||new V,this._validateBoundingVolume(this._bvWorldSpace,B.WorldSpace)),this._bvWorldSpace}get boundingVolumeObjectSpace(){return this._bvObjectSpace||(this._bvObjectSpace=this._bvObjectSpace||new V,this._validateBoundingVolume(this._bvObjectSpace,B.ObjectSpace)),this._bvObjectSpace}_validateBoundingVolume(t,e){const i=e===B.ObjectSpace;for(const s of this._geometries){const e=s.boundingInfo;e&&M(e,t,i?s.transformation:this.getCombinedShaderTransformation(s))}r(t.bounds,t.min,t.max,.5);for(const s of this._geometries){const e=s.boundingInfo;if(null==e)continue;const o=i?s.transformation:this.getCombinedShaderTransformation(s),r=g(o);n(U,e.center,o);const h=a(U,t.bounds),m=e.radius*r;t.bounds[3]=Math.max(t.bounds[3],h+m)}}_invalidateBoundingVolume(){const t=this._bvWorldSpace?.bounds;this._bvObjectSpace=this._bvWorldSpace=void 0,this._parentLayer&&t&&this._parentLayer.notifyObjectBBChanged(this,t)}_emit(t,e){this._parentLayer&&this._parentLayer.events.emit(t,e)}get test(){const t=this;return{hasGeometry:e=>t._geometries.includes(e),getGeometryIndex:e=>t._geometries.indexOf(e)}}}class O{constructor(){this.min=d(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this.max=d(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE)}isEmpty(){return this.max[0]<this.min[0]&&this.max[1]<this.min[1]&&this.max[2]<this.min[2]}}class V extends O{constructor(){super(...arguments),this.bounds=f()}}function M(t,e,s){const o=t.bbMin,r=t.bbMax;if(i(s)){const t=h(T,s[12],s[13],s[14]);m(A,o,t),m(L,r,t);for(let i=0;i<3;++i)e.min[i]=Math.min(e.min[i],A[i]),e.max[i]=Math.max(e.max[i],L[i])}else if(n(A,o,s),c(o,r))for(let i=0;i<3;++i)e.min[i]=Math.min(e.min[i],A[i]),e.max[i]=Math.max(e.max[i],A[i]);else{n(L,r,s);for(let t=0;t<3;++t)e.min[t]=Math.min(e.min[t],A[t],L[t]),e.max[t]=Math.max(e.max[t],A[t],L[t]);for(let t=0;t<3;++t){l(A,o),l(L,r),A[t]=r[t],L[t]=o[t],n(A,A,s),n(L,L,s);for(let t=0;t<3;++t)e.min[t]=Math.min(e.min[t],A[t],L[t]),e.max[t]=Math.max(e.max[t],A[t],L[t])}}}const T=u(),A=u(),L=u(),U=u();var B;!function(t){t[t.WorldSpace=0]="WorldSpace",t[t.ObjectSpace=1]="ObjectSpace"}(B||(B={}));export{x as Object3D};
5
+ import{h as t,m as e,y as i}from"../../../../chunks/mat4.js";import{I as s,a as o}from"../../../../chunks/mat4f64.js";import{p as r,e as n,m as a,s as h,g as m,h as c,c as l}from"../../../../chunks/vec3.js";import{f as d,c as u}from"../../../../chunks/vec3f64.js";import{c as g}from"../../../../chunks/sphere.js";import{maxScale as f}from"../../support/mathUtils.js";import{Object3DState as b}from"./basicInterfaces.js";import{ContentObject as _}from"./ContentObject.js";import{ContentObjectType as p}from"./ContentObjectType.js";import{Object3DStateID as v}from"./Object3DStateID.js";import{assert as j}from"./Util.js";import{addObject3DStateID as y,removeObject3DStateID as S}from"../materials/renderers/utils.js";class x extends _{get geometries(){return this._geometries}get transformation(){return this._transformation??s}set transformation(e){this._transformation=t(this._transformation??o(),e),this._invalidateBoundingVolume(),this._emit("objectTransformation",this)}get shaderTransformation(){return this._shaderTransformation}set shaderTransformation(e){this._shaderTransformation=e?t(this._shaderTransformation??o(),e):null,this._invalidateBoundingVolume(),this._emit("objectShaderTransformation",this)}get effectiveTransformation(){return this.shaderTransformation??this.transformation}constructor(t={}){super(),this.type=p.Object,this._shaderTransformation=null,this._parentLayer=null,this._visible=!0,this.castShadow=t.castShadow??!0,this.usesVerticalDistanceToGround=t.usesVerticalDistanceToGround??!1,this.graphicUid=t.graphicUid,this.layerUid=t.layerUid,t.isElevationSource&&(this.lastValidElevationBB=new O),this._geometries=t.geometries?Array.from(t.geometries):new Array}dispose(){this._geometries.length=0}get parentLayer(){return this._parentLayer}set parentLayer(t){j(null==this._parentLayer||null==t,"Object3D can only be added to a single Layer"),this._parentLayer=t}addGeometry(t){t.visible=this._visible,this._geometries.push(t),this._emit("objectGeometryAdded",{object:this,geometry:t}),this._invalidateBoundingVolume()}removeGeometry(t){const e=this._geometries.splice(t,1)[0];e&&(this._emit("objectGeometryRemoved",{object:this,geometry:e}),this._invalidateBoundingVolume())}removeAllGeometries(){for(;this._geometries.length>0;)this.removeGeometry(0)}geometryVertexAttrsUpdated(t){this._emit("objectGeometryUpdated",{object:this,geometry:t}),this._invalidateBoundingVolume()}get visible(){return this._visible}set visible(t){if(this._visible!==t){this._visible=t;for(const t of this._geometries)t.visible=this._visible;this._emit("visibilityChanged",this)}}maskOccludee(){const t=new v(b.MaskOccludee);for(const e of this._geometries)e.occludees=y(e.occludees,t);return this._emit("occlusionChanged",this),t}removeOcclude(t){for(const e of this._geometries)e.occludees=S(e.occludees,t);this._emit("occlusionChanged",this)}highlight(){const t=new v(b.Highlight);for(const e of this._geometries)e.highlights=y(e.highlights,t);return this._emit("highlightChanged",this),t}removeHighlight(t){for(const e of this._geometries)e.highlights=S(e.highlights,t);this._emit("highlightChanged",this)}getCombinedStaticTransformation(t,i){return e(i,this.transformation,t.transformation)}getCombinedShaderTransformation(t,i=o()){return e(i,this.effectiveTransformation,t.transformation)}get boundingVolumeWorldSpace(){return this._bvWorldSpace||(this._bvWorldSpace=this._bvWorldSpace||new V,this._validateBoundingVolume(this._bvWorldSpace,B.WorldSpace)),this._bvWorldSpace}get boundingVolumeObjectSpace(){return this._bvObjectSpace||(this._bvObjectSpace=this._bvObjectSpace||new V,this._validateBoundingVolume(this._bvObjectSpace,B.ObjectSpace)),this._bvObjectSpace}_validateBoundingVolume(t,e){const i=e===B.ObjectSpace;for(const s of this._geometries){const e=s.boundingInfo;e&&M(e,t,i?s.transformation:this.getCombinedShaderTransformation(s))}r(t.bounds,t.min,t.max,.5);for(const s of this._geometries){const e=s.boundingInfo;if(null==e)continue;const o=i?s.transformation:this.getCombinedShaderTransformation(s),r=f(o);n(U,e.center,o);const h=a(U,t.bounds),m=e.radius*r;t.bounds[3]=Math.max(t.bounds[3],h+m)}}_invalidateBoundingVolume(){const t=this._bvWorldSpace?.bounds;this._bvObjectSpace=this._bvWorldSpace=void 0,this._parentLayer&&t&&this._parentLayer.notifyObjectBBChanged(this,t)}_emit(t,e){this._parentLayer&&this._parentLayer.events.emit(t,e)}get test(){const t=this;return{hasGeometry:e=>t._geometries.includes(e),getGeometryIndex:e=>t._geometries.indexOf(e)}}}class O{constructor(){this.min=d(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this.max=d(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE)}isEmpty(){return this.max[0]<this.min[0]&&this.max[1]<this.min[1]&&this.max[2]<this.min[2]}}class V extends O{constructor(){super(...arguments),this.bounds=g()}}function M(t,e,s){const o=t.bbMin,r=t.bbMax;if(i(s)){const t=h(T,s[12],s[13],s[14]);m(A,o,t),m(L,r,t);for(let i=0;i<3;++i)e.min[i]=Math.min(e.min[i],A[i]),e.max[i]=Math.max(e.max[i],L[i])}else if(n(A,o,s),c(o,r))for(let i=0;i<3;++i)e.min[i]=Math.min(e.min[i],A[i]),e.max[i]=Math.max(e.max[i],A[i]);else{n(L,r,s);for(let t=0;t<3;++t)e.min[t]=Math.min(e.min[t],A[t],L[t]),e.max[t]=Math.max(e.max[t],A[t],L[t]);for(let t=0;t<3;++t){l(A,o),l(L,r),A[t]=r[t],L[t]=o[t],n(A,A,s),n(L,L,s);for(let t=0;t<3;++t)e.min[t]=Math.min(e.min[t],A[t],L[t]),e.max[t]=Math.max(e.max[t],A[t],L[t])}}}const T=u(),A=u(),L=u(),U=u();var B;!function(t){t[t.WorldSpace=0]="WorldSpace",t[t.ObjectSpace=1]="ObjectSpace"}(B||(B={}));export{x as Object3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Logger.js";import{f as r}from"../../../../chunks/vec4f64.js";import{BufferViewVec4u8 as t}from"../../../../geometry/support/buffer/BufferView.js";class o{constructor(){this.declaredClass="esri.views.3d.webgl-engine.lib.ObjectAndLayerIdRenderHelper",this.colorZero=new t(new ArrayBuffer(4)),this._uidToRenderColor=new Map,this._colorToUID=new Map,this._layerUidToGraphicsUidToObjectId=new Map,this._layerUidToId=new Map,this._layerUidToPopupEnabled=new Map}setUidToObjectAndLayerId(e,r,t,o,i,d=null,a=null,n=null){if(!(e&&r&&t&&o))return;if(this._layerUidToId.set(o,t),this._layerUidToPopupEnabled.set(o,i),!i)return;let s=this._layerUidToGraphicsUidToObjectId.get(o);s||(s=new Map,this._layerUidToGraphicsUidToObjectId.set(o,s)),s.set(r,{objectId:e,attributeNodeId:d,attributeIndex:a,subLayerId:n})}getObjectAndLayerIdColor(e){const t=this.getObjectAndLayerIdColorArray(e);return r(t.get(0,1),t.get(0,2),t.get(0,3),255)}getObjectAndLayerIdColorArray(r){if(!r.layerUid||!r.graphicUid)return this.colorZero;const o=this._layerUidToPopupEnabled.get(r.layerUid);if(void 0===o)return e.getLogger(this).warn("popupEnabled is undefined for layerUid "+r.layerUid),this.colorZero;if(!1===o)return this.colorZero;let i=this._uidToRenderColor.get(r.layerUid);i||(i=new Map,this._uidToRenderColor.set(r.layerUid,i));let d=i.get(r.graphicUid);if(!d){for(;!d;){const e=Math.floor(16777214*Math.random())+1;this._colorToUID.has(e)||(d=e)}if(d>16777215)throw new Error("Object ID Overflow");i.set(r.graphicUid,d),this._colorToUID.set(d,r)}const a=new ArrayBuffer(4);new DataView(a).setUint32(0,d,!1);return new t(a)}getColorToObjectAndLayerIdMapping(){const r=new Map;for(const[t,o]of this._colorToUID.entries()){const i=this._layerUidToGraphicsUidToObjectId.get(o.layerUid);let d=null;i?(d=i.get(o.graphicUid),d||e.getLogger(this).warn("getColorMapping: no entry found for graphicsId "+o.graphicUid)):e.getLogger(this).warn("getColorMapping: no entry found for layerUid "+o.layerUid);const a=this._layerUidToId.get(o.layerUid);a||e.getLogger(this).warn("no layerId found for uid "+o.layerUid),d&&a&&r.set(t,d.attributeNodeId?{type:"object-and-layer-and-i3s-id",oid:d.objectId,lid:a,attrId:d.attributeNodeId,attrIdx:d.attributeIndex,subLayerId:d.subLayerId}:{type:"object-and-layer-id",oid:d.objectId,lid:a})}return r}}export{o as ObjectAndLayerIdRenderHelper};
5
+ import e from"../../../../core/Logger.js";import{a as r}from"../../../../chunks/vec4f64.js";import{BufferViewVec4u8 as t}from"../../../../geometry/support/buffer/BufferView.js";class o{constructor(){this.declaredClass="esri.views.3d.webgl-engine.lib.ObjectAndLayerIdRenderHelper",this.colorZero=new t(new ArrayBuffer(4)),this._uidToRenderColor=new Map,this._colorToUID=new Map,this._layerUidToGraphicsUidToObjectId=new Map,this._layerUidToId=new Map,this._layerUidToPopupEnabled=new Map}setUidToObjectAndLayerId(e,r,t,o,i,d=null,a=null,n=null){if(!(e&&r&&t&&o))return;if(this._layerUidToId.set(o,t),this._layerUidToPopupEnabled.set(o,i),!i)return;let s=this._layerUidToGraphicsUidToObjectId.get(o);s||(s=new Map,this._layerUidToGraphicsUidToObjectId.set(o,s)),s.set(r,{objectId:e,attributeNodeId:d,attributeIndex:a,subLayerId:n})}getObjectAndLayerIdColor(e){const t=this.getObjectAndLayerIdColorArray(e);return r(t.get(0,1),t.get(0,2),t.get(0,3),255)}getObjectAndLayerIdColorArray(r){if(!r.layerUid||!r.graphicUid)return this.colorZero;const o=this._layerUidToPopupEnabled.get(r.layerUid);if(void 0===o)return e.getLogger(this).warn("popupEnabled is undefined for layerUid "+r.layerUid),this.colorZero;if(!1===o)return this.colorZero;let i=this._uidToRenderColor.get(r.layerUid);i||(i=new Map,this._uidToRenderColor.set(r.layerUid,i));let d=i.get(r.graphicUid);if(!d){for(;!d;){const e=Math.floor(16777214*Math.random())+1;this._colorToUID.has(e)||(d=e)}if(d>16777215)throw new Error("Object ID Overflow");i.set(r.graphicUid,d),this._colorToUID.set(d,r)}const a=new ArrayBuffer(4);new DataView(a).setUint32(0,d,!1);return new t(a)}getColorToObjectAndLayerIdMapping(){const r=new Map;for(const[t,o]of this._colorToUID.entries()){const i=this._layerUidToGraphicsUidToObjectId.get(o.layerUid);let d=null;i?(d=i.get(o.graphicUid),d||e.getLogger(this).warn("getColorMapping: no entry found for graphicsId "+o.graphicUid)):e.getLogger(this).warn("getColorMapping: no entry found for layerUid "+o.layerUid);const a=this._layerUidToId.get(o.layerUid);a||e.getLogger(this).warn("no layerId found for uid "+o.layerUid),d&&a&&r.set(t,d.attributeNodeId?{type:"object-and-layer-and-i3s-id",oid:d.objectId,lid:a,attrId:d.attributeNodeId,attrIdx:d.attributeIndex,subLayerId:d.subLayerId}:{type:"object-and-layer-id",oid:d.objectId,lid:a})}return r}}export{o as ObjectAndLayerIdRenderHelper};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/ObjectPool.js";import t from"../../../../core/PooledArray.js";import{b as o,e as n,a as i,i as s,f as r}from"../../../../chunks/vec3.js";import{c as h,f as a}from"../../../../chunks/vec3f64.js";import{intersectsSphere as d}from"../../../../geometry/support/frustum.js";import{wrap as l}from"../../../../geometry/support/ray.js";import{h as u,a as c,g as f,j as m,c as _}from"../../../../chunks/sphere.js";import{rayBoxTest as p}from"./Util.js";class b{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(e,t){this.objectToBoundingSphere=e,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new g,this._objectCount=0,t&&(void 0!==t.maximumObjectsPerNode&&(this._maximumObjectsPerNode=t.maximumObjectsPerNode),void 0!==t.maximumDepth&&(this._maximumDepth=t.maximumDepth))}destroy(){this._degenerateObjects.clear(),g.clearPool(),B[0]=null,P.prune(),H.prune()}add(e,t=e.length){this._objectCount+=t,this._grow(e,t);const o=g.acquire();for(let n=0;n<t;n++){const t=e[n];this._isDegenerate(t)?this._degenerateObjects.add(t):(o.init(this._root),this._add(t,o))}g.release(o)}remove(e,t=null){this._objectCount-=e.length;const o=g.acquire();for(const n of e){const e=null!=t?t:u(this.objectToBoundingSphere(n),w);E(e[3])?(o.init(this._root),this._remove(n,e,o)):this._degenerateObjects.delete(n)}g.release(o),this._shrink()}update(e,t){if(!E(t[3])&&this._isDegenerate(e))return;const o=R(e);this.remove(o,t),this.add(o)}forEachAlongRay(e,t,o){const n=l(e,t);this._forEachNode(this._root,(e=>{if(!this._intersectsNode(n,e))return!1;const t=e.node;return t.terminals.forAll((e=>{this._intersectsObject(n,e)&&o(e)})),null!==t.residents&&t.residents.forAll((e=>{this._intersectsObject(n,e)&&o(e)})),!0}))}forEachAlongRayWithVerticalOffset(e,t,o,n){const i=l(e,t);this._forEachNode(this._root,(e=>{if(!this._intersectsNodeWithOffset(i,e,n))return!1;const t=e.node;return t.terminals.forAll((e=>{this._intersectsObjectWithOffset(i,e,n)&&o(e)})),null!==t.residents&&t.residents.forAll((e=>{this._intersectsObjectWithOffset(i,e,n)&&o(e)})),!0}))}forEach(e){this._forEachNode(this._root,(t=>{const o=t.node;return o.terminals.forAll(e),null!==o.residents&&o.residents.forAll(e),!0})),this._degenerateObjects.forEach(e)}forEachDegenerateObject(e){this._degenerateObjects.forEach(e)}findClosest(e,t,i,s=(()=>!0),r=1/0){let h=1/0,a=1/0,l=null;const u=T(e,t),c=o=>{if(--r,!s(o))return;const n=this.objectToBoundingSphere(o);if(!d(i,n))return;const u=z(e,t,f(n)),c=u-n[3],m=u+n[3];c<h&&(h=c,a=m,l=o)};return this._forEachNodeDepthOrdered(this._root,(s=>{if(r<=0||!d(i,s.bounds))return!1;o(v,u,s.halfSize),n(v,v,s.bounds);if(z(e,t,v)>a)return!1;const h=s.node;return h.terminals.forAll((e=>c(e))),null!==h.residents&&h.residents.forAll((e=>c(e))),!0}),e,t),l}forEachInDepthRange(e,t,i,s,r,h,a){let l=-1/0,u=1/0;const c={setRange:e=>{i===b.DepthOrder.FRONT_TO_BACK?(l=Math.max(l,e.near),u=Math.min(u,e.far)):(l=Math.max(l,-e.far),u=Math.min(u,-e.near))}};c.setRange(s);const m=z(t,i,e),_=T(t,i),p=T(t,-i),g=e=>{if(!a(e))return;const o=this.objectToBoundingSphere(e),n=f(o),s=z(t,i,n)-m,_=s-o[3],p=s+o[3];_>u||p<l||!d(h,o)||r(e,c)};this._forEachNodeDepthOrdered(this._root,(e=>{if(!d(h,e.bounds))return!1;o(v,_,e.halfSize),n(v,v,e.bounds);if(z(t,i,v)-m>u)return!1;o(v,p,e.halfSize),n(v,v,e.bounds);if(z(t,i,v)-m<l)return!1;const s=e.node;return s.terminals.forAll((e=>g(e))),null!==s.residents&&s.residents.forAll((e=>g(e))),!0}),t,i)}forEachNode(e){this._forEachNode(this._root,(t=>e(t.node,t.bounds,t.halfSize,t.depth)))}forEachNeighbor(e,t){const o=c(t),n=f(t),s=t=>{const s=this.objectToBoundingSphere(t),r=c(s),h=o+r;return!(i(f(s),n)-h*h<=0)||e(t)};let r=!0;const h=e=>{r&&(r=s(e))};this._forEachNode(this._root,(e=>{const t=c(e.bounds),s=o+t;if(i(f(e.bounds),n)-s*s>0)return!1;const a=e.node;return a.terminals.forAll(h),r&&null!==a.residents&&a.residents.forAll(h),r})),r&&this.forEachDegenerateObject(h)}_intersectsNode(e,t){return j(t.bounds,2*-t.halfSize,C),j(t.bounds,2*t.halfSize,y),p(e.origin,e.direction,C,y)}_intersectsNodeWithOffset(e,t,o){return j(t.bounds,2*-t.halfSize,C),j(t.bounds,2*t.halfSize,y),o.applyToMinMax(C,y),p(e.origin,e.direction,C,y)}_intersectsObject(e,t){const o=this.objectToBoundingSphere(t);return!(o[3]>0)||m(o,e)}_intersectsObjectWithOffset(e,t,o){const n=this.objectToBoundingSphere(t);return!(n[3]>0)||m(o.applyToBoundingSphere(n),e)}_forEachNode(e,t){let o=g.acquire().init(e);const n=[o];for(;0!==n.length;){if(o=n.pop(),t(o)&&!o.isLeaf())for(let e=0;e<o.node.children.length;e++){o.node.children[e]&&n.push(g.acquire().init(o).advance(e))}g.release(o)}}_forEachNodeDepthOrdered(e,t,o,n=b.DepthOrder.FRONT_TO_BACK){let i=g.acquire().init(e);const s=[i];for(N(o,n,K);0!==s.length;){if(i=s.pop(),t(i)&&!i.isLeaf())for(let e=7;e>=0;--e){const t=K[e];i.node.children[t]&&s.push(g.acquire().init(i).advance(t))}g.release(i)}}_remove(e,t,o){P.clear();const n=o.advanceTo(t,((e,t)=>{P.push(e.node),P.push(t)}))?o.node.terminals:o.node.residents;if(n.removeUnordered(e),0===n.length)for(let i=P.length-2;i>=0;i-=2){const e=P.data[i],t=P.data[i+1];if(!this._purge(e,t))break}}_nodeIsEmpty(e){if(0!==e.terminals.length)return!1;if(null!==e.residents)return 0===e.residents.length;for(let t=0;t<e.children.length;t++)if(e.children[t])return!1;return!0}_purge(e,o){return o>=0&&(e.children[o]=null),!!this._nodeIsEmpty(e)&&(null===e.residents&&(e.residents=new t({shrink:!0})),!0)}_add(e,t){t.advanceTo(this.objectToBoundingSphere(e))?t.node.terminals.push(e):(t.node.residents.push(e),t.node.residents.length>this._maximumObjectsPerNode&&t.depth<this._maximumDepth&&this._split(t))}_split(e){const t=e.node.residents;e.node.residents=null;for(let o=0;o<t.length;o++){const n=g.acquire().init(e);this._add(t.at(o),n),g.release(n)}}_grow(e,t){if(0!==t&&(x(e,t,(e=>this.objectToBoundingSphere(e)),k),E(k[3])&&!this._fitsInsideTree(k)))if(this._nodeIsEmpty(this._root.node))u(k,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const e=this._rootBoundsForRootAsSubNode(k);this._placingRootViolatesMaxDepth(e)?this._rebuildTree(k,e):this._growRootAsSubNode(e),g.release(e)}}_rebuildTree(e,t){s(q,t.bounds),q[3]=t.halfSize,x([e,q],2,(e=>e),I);const o=g.acquire().init(this._root);this._root.initFrom(null,I,I[3]),this._root.increaseHalfSize(1.25),this._forEachNode(o,(e=>(this.add(e.node.terminals.data,e.node.terminals.length),null!==e.node.residents&&this.add(e.node.residents.data,e.node.residents.length),!0))),g.release(o)}_placingRootViolatesMaxDepth(e){const t=Math.log(e.halfSize/this._root.halfSize)*Math.LOG2E;let o=0;return this._forEachNode(this._root,(e=>(o=Math.max(o,e.depth),o+t<=this._maximumDepth))),o+t>this._maximumDepth}_rootBoundsForRootAsSubNode(e){const t=e[3],o=e;let n=-1/0;const i=this._root.bounds,s=this._root.halfSize;for(let h=0;h<3;h++){const e=i[h]-s-(o[h]-t),r=o[h]+t-(i[h]+s),a=Math.max(0,Math.ceil(e/(2*s))),d=Math.max(0,Math.ceil(r/(2*s)))+1,l=2**Math.ceil(Math.log(a+d)*Math.LOG2E);n=Math.max(n,l),L[h].min=a,L[h].max=d}for(let h=0;h<3;h++){let e=L[h].min,t=L[h].max;const o=(n-(e+t))/2;e+=Math.ceil(o),t+=Math.floor(o);const r=i[h]-s-e*s*2;F[h]=r+(t+e)*s}const r=n*s;return F[3]=r*A,g.acquire().initFrom(null,F,r,0)}_growRootAsSubNode(e){const t=this._root.node;s(k,this._root.bounds),k[3]=this._root.halfSize,this._root.init(e),e.advanceTo(k,null,!0),e.node.children=t.children,e.node.residents=t.residents,e.node.terminals=t.terminals}_shrink(){for(;;){const e=this._findShrinkIndex();if(-1===e)break;this._root.advance(e),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let e=null;const t=this._root.node.children;let o=0,n=0;for(;n<t.length&&null==e;)o=n++,e=t[o];for(;n<t.length;)if(t[n++])return-1;return o}_isDegenerate(e){return!E(this.objectToBoundingSphere(e)[3])}_fitsInsideTree(e){const t=this._root.bounds,o=this._root.halfSize;return e[3]<=o&&e[0]>=t[0]-o&&e[0]<=t[0]+o&&e[1]>=t[1]-o&&e[1]<=t[1]+o&&e[2]>=t[2]-o&&e[2]<=t[2]+o}toJSON(){const{maximumDepth:e,maximumObjectsPerNode:t,_objectCount:o}=this,n=this._nodeToJSON(this._root.node);return{maximumDepth:e,maximumObjectsPerNode:t,objectCount:o,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:n}}}_nodeToJSON(e){const t=e.children.map((e=>e?this._nodeToJSON(e):null)),o=e.residents?.map((e=>this.objectToBoundingSphere(e))),n=e.terminals?.map((e=>this.objectToBoundingSphere(e)));return{children:t,residents:o,terminals:n}}static fromJSON(e){const t=new b((e=>e),{maximumDepth:e.maximumDepth,maximumObjectsPerNode:e.maximumObjectsPerNode});return t._objectCount=e.objectCount,t._root.initFrom(e.root.node,e.root.bounds,e.root.halfSize,e.root.depth),t}}class g{constructor(){this.bounds=_(),this.halfSize=0,this.initFrom(null,null,0,0)}init(e){return this.initFrom(e.node,e.bounds,e.halfSize,e.depth)}initFrom(e,t,o,n=this.depth){return this.node=null!=e?e:g.createEmptyNode(),null!=t&&u(t,this.bounds),this.halfSize=o,this.depth=n,this}increaseHalfSize(e){this.halfSize*=e,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*A}advance(e){let t=this.node.children[e];t||(t=g.createEmptyNode(),this.node.children[e]=t),this.node=t,this.halfSize/=2,this.depth++;const o=M[e];return this.bounds[0]+=o[0]*this.halfSize,this.bounds[1]+=o[1]*this.halfSize,this.bounds[2]+=o[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(e,t,o=!1){for(;;){if(this.isTerminalFor(e))return t&&t(this,-1),!0;if(this.isLeaf()){if(!o)return t&&t(this,-1),!1;this.node.residents=null}const n=this._childIndex(e);t&&t(this,n),this.advance(n)}}isLeaf(){return null!=this.node.residents}isTerminalFor(e){return e[3]>this.halfSize/2}_childIndex(e){const t=this.bounds;return(t[0]<e[0]?1:0)+(t[1]<e[1]?2:0)+(t[2]<e[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new t({shrink:!0}),residents:new t({shrink:!0})}}static acquire(){return g._pool.acquire()}static release(e){g._pool.release(e)}static clearPool(){g._pool.prune()}}function S(e,t){e[0]=Math.min(e[0],t[0]-t[3]),e[1]=Math.min(e[1],t[1]-t[3]),e[2]=Math.min(e[2],t[2]-t[3])}function O(e,t){e[0]=Math.max(e[0],t[0]+t[3]),e[1]=Math.max(e[1],t[1]+t[3]),e[2]=Math.max(e[2],t[2]+t[3])}function j(e,t,o){o[0]=e[0]+t,o[1]=e[1]+t,o[2]=e[2]+t}function x(e,t,o,n){if(1===t){const t=o(e[0]);u(t,n)}else{C[0]=1/0,C[1]=1/0,C[2]=1/0,y[0]=-1/0,y[1]=-1/0,y[2]=-1/0;for(let n=0;n<t;n++){const t=o(e[n]);E(t[3])&&(S(C,t),O(y,t))}r(n,C,y,.5),n[3]=Math.max(y[0]-C[0],y[1]-C[1],y[2]-C[2])/2}}function N(e,t,o){if(!H.length)for(let n=0;n<8;++n)H.push({index:0,distance:0});for(let n=0;n<8;++n){const o=M[n];H.data[n].index=n,H.data[n].distance=z(e,t,o)}H.sort(((e,t)=>e.distance-t.distance));for(let n=0;n<8;++n)o[n]=H.data[n].index}function T(e,t){let o,n=1/0;for(let i=0;i<8;++i){const s=z(e,t,D[i]);s<n&&(n=s,o=D[i])}return o}function z(e,t,o){return t*(e[0]*o[0]+e[1]*o[1]+e[2]*o[2])}function E(e){return!isNaN(e)&&e!==-1/0&&e!==1/0&&e>0}g._pool=new e(g),function(e){var t;(t=e.DepthOrder||(e.DepthOrder={}))[t.FRONT_TO_BACK=1]="FRONT_TO_BACK",t[t.BACK_TO_FRONT=-1]="BACK_TO_FRONT"}(b||(b={}));const M=[a(-1,-1,-1),a(1,-1,-1),a(-1,1,-1),a(1,1,-1),a(-1,-1,1),a(1,-1,1),a(-1,1,1),a(1,1,1)],D=[a(-1,-1,-1),a(-1,-1,1),a(-1,1,-1),a(-1,1,1),a(1,-1,-1),a(1,-1,1),a(1,1,-1),a(1,1,1)],A=Math.sqrt(3),B=[null];function R(e){return B[0]=e,B}const F=_(),v=h(),C=h(),y=h(),P=new t,w=_(),k=_(),q=_(),I=_(),L=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],H=new t,K=[0,0,0,0,0,0,0,0],W=b;export{W as default};
5
+ import e from"../../../../core/ObjectPool.js";import t from"../../../../core/PooledArray.js";import{i as o,g as n,a as i,c as s,p as r}from"../../../../chunks/vec3.js";import{c as h,f as a}from"../../../../chunks/vec3f64.js";import{intersectsSphere as d}from"../../../../geometry/support/frustum.js";import{wrap as l}from"../../../../geometry/support/ray.js";import{h as u,a as c,g as f,j as m,c as _}from"../../../../chunks/sphere.js";import{rayBoxTest as p}from"./Util.js";class b{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(e,t){this.objectToBoundingSphere=e,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new g,this._objectCount=0,t&&(void 0!==t.maximumObjectsPerNode&&(this._maximumObjectsPerNode=t.maximumObjectsPerNode),void 0!==t.maximumDepth&&(this._maximumDepth=t.maximumDepth))}destroy(){this._degenerateObjects.clear(),g.clearPool(),B[0]=null,P.prune(),H.prune()}add(e,t=e.length){this._objectCount+=t,this._grow(e,t);const o=g.acquire();for(let n=0;n<t;n++){const t=e[n];this._isDegenerate(t)?this._degenerateObjects.add(t):(o.init(this._root),this._add(t,o))}g.release(o)}remove(e,t=null){this._objectCount-=e.length;const o=g.acquire();for(const n of e){const e=null!=t?t:u(this.objectToBoundingSphere(n),w);E(e[3])?(o.init(this._root),this._remove(n,e,o)):this._degenerateObjects.delete(n)}g.release(o),this._shrink()}update(e,t){if(!E(t[3])&&this._isDegenerate(e))return;const o=R(e);this.remove(o,t),this.add(o)}forEachAlongRay(e,t,o){const n=l(e,t);this._forEachNode(this._root,(e=>{if(!this._intersectsNode(n,e))return!1;const t=e.node;return t.terminals.forAll((e=>{this._intersectsObject(n,e)&&o(e)})),null!==t.residents&&t.residents.forAll((e=>{this._intersectsObject(n,e)&&o(e)})),!0}))}forEachAlongRayWithVerticalOffset(e,t,o,n){const i=l(e,t);this._forEachNode(this._root,(e=>{if(!this._intersectsNodeWithOffset(i,e,n))return!1;const t=e.node;return t.terminals.forAll((e=>{this._intersectsObjectWithOffset(i,e,n)&&o(e)})),null!==t.residents&&t.residents.forAll((e=>{this._intersectsObjectWithOffset(i,e,n)&&o(e)})),!0}))}forEach(e){this._forEachNode(this._root,(t=>{const o=t.node;return o.terminals.forAll(e),null!==o.residents&&o.residents.forAll(e),!0})),this._degenerateObjects.forEach(e)}forEachDegenerateObject(e){this._degenerateObjects.forEach(e)}findClosest(e,t,i,s=(()=>!0),r=1/0){let h=1/0,a=1/0,l=null;const u=T(e,t),c=o=>{if(--r,!s(o))return;const n=this.objectToBoundingSphere(o);if(!d(i,n))return;const u=z(e,t,f(n)),c=u-n[3],m=u+n[3];c<h&&(h=c,a=m,l=o)};return this._forEachNodeDepthOrdered(this._root,(s=>{if(r<=0||!d(i,s.bounds))return!1;o(v,u,s.halfSize),n(v,v,s.bounds);if(z(e,t,v)>a)return!1;const h=s.node;return h.terminals.forAll((e=>c(e))),null!==h.residents&&h.residents.forAll((e=>c(e))),!0}),e,t),l}forEachInDepthRange(e,t,i,s,r,h,a){let l=-1/0,u=1/0;const c={setRange:e=>{i===b.DepthOrder.FRONT_TO_BACK?(l=Math.max(l,e.near),u=Math.min(u,e.far)):(l=Math.max(l,-e.far),u=Math.min(u,-e.near))}};c.setRange(s);const m=z(t,i,e),_=T(t,i),p=T(t,-i),g=e=>{if(!a(e))return;const o=this.objectToBoundingSphere(e),n=f(o),s=z(t,i,n)-m,_=s-o[3],p=s+o[3];_>u||p<l||!d(h,o)||r(e,c)};this._forEachNodeDepthOrdered(this._root,(e=>{if(!d(h,e.bounds))return!1;o(v,_,e.halfSize),n(v,v,e.bounds);if(z(t,i,v)-m>u)return!1;o(v,p,e.halfSize),n(v,v,e.bounds);if(z(t,i,v)-m<l)return!1;const s=e.node;return s.terminals.forAll((e=>g(e))),null!==s.residents&&s.residents.forAll((e=>g(e))),!0}),t,i)}forEachNode(e){this._forEachNode(this._root,(t=>e(t.node,t.bounds,t.halfSize,t.depth)))}forEachNeighbor(e,t){const o=c(t),n=f(t),s=t=>{const s=this.objectToBoundingSphere(t),r=c(s),h=o+r;return!(i(f(s),n)-h*h<=0)||e(t)};let r=!0;const h=e=>{r&&(r=s(e))};this._forEachNode(this._root,(e=>{const t=c(e.bounds),s=o+t;if(i(f(e.bounds),n)-s*s>0)return!1;const a=e.node;return a.terminals.forAll(h),r&&null!==a.residents&&a.residents.forAll(h),r})),r&&this.forEachDegenerateObject(h)}_intersectsNode(e,t){return j(t.bounds,2*-t.halfSize,C),j(t.bounds,2*t.halfSize,y),p(e.origin,e.direction,C,y)}_intersectsNodeWithOffset(e,t,o){return j(t.bounds,2*-t.halfSize,C),j(t.bounds,2*t.halfSize,y),o.applyToMinMax(C,y),p(e.origin,e.direction,C,y)}_intersectsObject(e,t){const o=this.objectToBoundingSphere(t);return!(o[3]>0)||m(o,e)}_intersectsObjectWithOffset(e,t,o){const n=this.objectToBoundingSphere(t);return!(n[3]>0)||m(o.applyToBoundingSphere(n),e)}_forEachNode(e,t){let o=g.acquire().init(e);const n=[o];for(;0!==n.length;){if(o=n.pop(),t(o)&&!o.isLeaf())for(let e=0;e<o.node.children.length;e++){o.node.children[e]&&n.push(g.acquire().init(o).advance(e))}g.release(o)}}_forEachNodeDepthOrdered(e,t,o,n=b.DepthOrder.FRONT_TO_BACK){let i=g.acquire().init(e);const s=[i];for(N(o,n,K);0!==s.length;){if(i=s.pop(),t(i)&&!i.isLeaf())for(let e=7;e>=0;--e){const t=K[e];i.node.children[t]&&s.push(g.acquire().init(i).advance(t))}g.release(i)}}_remove(e,t,o){P.clear();const n=o.advanceTo(t,((e,t)=>{P.push(e.node),P.push(t)}))?o.node.terminals:o.node.residents;if(n.removeUnordered(e),0===n.length)for(let i=P.length-2;i>=0;i-=2){const e=P.data[i],t=P.data[i+1];if(!this._purge(e,t))break}}_nodeIsEmpty(e){if(0!==e.terminals.length)return!1;if(null!==e.residents)return 0===e.residents.length;for(let t=0;t<e.children.length;t++)if(e.children[t])return!1;return!0}_purge(e,o){return o>=0&&(e.children[o]=null),!!this._nodeIsEmpty(e)&&(null===e.residents&&(e.residents=new t({shrink:!0})),!0)}_add(e,t){t.advanceTo(this.objectToBoundingSphere(e))?t.node.terminals.push(e):(t.node.residents.push(e),t.node.residents.length>this._maximumObjectsPerNode&&t.depth<this._maximumDepth&&this._split(t))}_split(e){const t=e.node.residents;e.node.residents=null;for(let o=0;o<t.length;o++){const n=g.acquire().init(e);this._add(t.at(o),n),g.release(n)}}_grow(e,t){if(0!==t&&(x(e,t,(e=>this.objectToBoundingSphere(e)),k),E(k[3])&&!this._fitsInsideTree(k)))if(this._nodeIsEmpty(this._root.node))u(k,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const e=this._rootBoundsForRootAsSubNode(k);this._placingRootViolatesMaxDepth(e)?this._rebuildTree(k,e):this._growRootAsSubNode(e),g.release(e)}}_rebuildTree(e,t){s(q,t.bounds),q[3]=t.halfSize,x([e,q],2,(e=>e),I);const o=g.acquire().init(this._root);this._root.initFrom(null,I,I[3]),this._root.increaseHalfSize(1.25),this._forEachNode(o,(e=>(this.add(e.node.terminals.data,e.node.terminals.length),null!==e.node.residents&&this.add(e.node.residents.data,e.node.residents.length),!0))),g.release(o)}_placingRootViolatesMaxDepth(e){const t=Math.log(e.halfSize/this._root.halfSize)*Math.LOG2E;let o=0;return this._forEachNode(this._root,(e=>(o=Math.max(o,e.depth),o+t<=this._maximumDepth))),o+t>this._maximumDepth}_rootBoundsForRootAsSubNode(e){const t=e[3],o=e;let n=-1/0;const i=this._root.bounds,s=this._root.halfSize;for(let h=0;h<3;h++){const e=i[h]-s-(o[h]-t),r=o[h]+t-(i[h]+s),a=Math.max(0,Math.ceil(e/(2*s))),d=Math.max(0,Math.ceil(r/(2*s)))+1,l=2**Math.ceil(Math.log(a+d)*Math.LOG2E);n=Math.max(n,l),L[h].min=a,L[h].max=d}for(let h=0;h<3;h++){let e=L[h].min,t=L[h].max;const o=(n-(e+t))/2;e+=Math.ceil(o),t+=Math.floor(o);const r=i[h]-s-e*s*2;F[h]=r+(t+e)*s}const r=n*s;return F[3]=r*A,g.acquire().initFrom(null,F,r,0)}_growRootAsSubNode(e){const t=this._root.node;s(k,this._root.bounds),k[3]=this._root.halfSize,this._root.init(e),e.advanceTo(k,null,!0),e.node.children=t.children,e.node.residents=t.residents,e.node.terminals=t.terminals}_shrink(){for(;;){const e=this._findShrinkIndex();if(-1===e)break;this._root.advance(e),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let e=null;const t=this._root.node.children;let o=0,n=0;for(;n<t.length&&null==e;)o=n++,e=t[o];for(;n<t.length;)if(t[n++])return-1;return o}_isDegenerate(e){return!E(this.objectToBoundingSphere(e)[3])}_fitsInsideTree(e){const t=this._root.bounds,o=this._root.halfSize;return e[3]<=o&&e[0]>=t[0]-o&&e[0]<=t[0]+o&&e[1]>=t[1]-o&&e[1]<=t[1]+o&&e[2]>=t[2]-o&&e[2]<=t[2]+o}toJSON(){const{maximumDepth:e,maximumObjectsPerNode:t,_objectCount:o}=this,n=this._nodeToJSON(this._root.node);return{maximumDepth:e,maximumObjectsPerNode:t,objectCount:o,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:n}}}_nodeToJSON(e){const t=e.children.map((e=>e?this._nodeToJSON(e):null)),o=e.residents?.map((e=>this.objectToBoundingSphere(e))),n=e.terminals?.map((e=>this.objectToBoundingSphere(e)));return{children:t,residents:o,terminals:n}}static fromJSON(e){const t=new b((e=>e),{maximumDepth:e.maximumDepth,maximumObjectsPerNode:e.maximumObjectsPerNode});return t._objectCount=e.objectCount,t._root.initFrom(e.root.node,e.root.bounds,e.root.halfSize,e.root.depth),t}}class g{constructor(){this.bounds=_(),this.halfSize=0,this.initFrom(null,null,0,0)}init(e){return this.initFrom(e.node,e.bounds,e.halfSize,e.depth)}initFrom(e,t,o,n=this.depth){return this.node=null!=e?e:g.createEmptyNode(),null!=t&&u(t,this.bounds),this.halfSize=o,this.depth=n,this}increaseHalfSize(e){this.halfSize*=e,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*A}advance(e){let t=this.node.children[e];t||(t=g.createEmptyNode(),this.node.children[e]=t),this.node=t,this.halfSize/=2,this.depth++;const o=M[e];return this.bounds[0]+=o[0]*this.halfSize,this.bounds[1]+=o[1]*this.halfSize,this.bounds[2]+=o[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(e,t,o=!1){for(;;){if(this.isTerminalFor(e))return t&&t(this,-1),!0;if(this.isLeaf()){if(!o)return t&&t(this,-1),!1;this.node.residents=null}const n=this._childIndex(e);t&&t(this,n),this.advance(n)}}isLeaf(){return null!=this.node.residents}isTerminalFor(e){return e[3]>this.halfSize/2}_childIndex(e){const t=this.bounds;return(t[0]<e[0]?1:0)+(t[1]<e[1]?2:0)+(t[2]<e[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new t({shrink:!0}),residents:new t({shrink:!0})}}static acquire(){return g._pool.acquire()}static release(e){g._pool.release(e)}static clearPool(){g._pool.prune()}}function S(e,t){e[0]=Math.min(e[0],t[0]-t[3]),e[1]=Math.min(e[1],t[1]-t[3]),e[2]=Math.min(e[2],t[2]-t[3])}function O(e,t){e[0]=Math.max(e[0],t[0]+t[3]),e[1]=Math.max(e[1],t[1]+t[3]),e[2]=Math.max(e[2],t[2]+t[3])}function j(e,t,o){o[0]=e[0]+t,o[1]=e[1]+t,o[2]=e[2]+t}function x(e,t,o,n){if(1===t){const t=o(e[0]);u(t,n)}else{C[0]=1/0,C[1]=1/0,C[2]=1/0,y[0]=-1/0,y[1]=-1/0,y[2]=-1/0;for(let n=0;n<t;n++){const t=o(e[n]);E(t[3])&&(S(C,t),O(y,t))}r(n,C,y,.5),n[3]=Math.max(y[0]-C[0],y[1]-C[1],y[2]-C[2])/2}}function N(e,t,o){if(!H.length)for(let n=0;n<8;++n)H.push({index:0,distance:0});for(let n=0;n<8;++n){const o=M[n];H.data[n].index=n,H.data[n].distance=z(e,t,o)}H.sort(((e,t)=>e.distance-t.distance));for(let n=0;n<8;++n)o[n]=H.data[n].index}function T(e,t){let o,n=1/0;for(let i=0;i<8;++i){const s=z(e,t,D[i]);s<n&&(n=s,o=D[i])}return o}function z(e,t,o){return t*(e[0]*o[0]+e[1]*o[1]+e[2]*o[2])}function E(e){return!isNaN(e)&&e!==-1/0&&e!==1/0&&e>0}g._pool=new e(g),function(e){var t;(t=e.DepthOrder||(e.DepthOrder={}))[t.FRONT_TO_BACK=1]="FRONT_TO_BACK",t[t.BACK_TO_FRONT=-1]="BACK_TO_FRONT"}(b||(b={}));const M=[a(-1,-1,-1),a(1,-1,-1),a(-1,1,-1),a(1,1,-1),a(-1,-1,1),a(1,-1,1),a(-1,1,1),a(1,1,1)],D=[a(-1,-1,-1),a(-1,-1,1),a(-1,1,-1),a(-1,1,1),a(1,-1,-1),a(1,-1,1),a(1,1,-1),a(1,1,1)],A=Math.sqrt(3),B=[null];function R(e){return B[0]=e,B}const F=_(),v=h(),C=h(),y=h(),P=new t,w=_(),k=_(),q=_(),I=_(),L=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],H=new t,K=[0,0,0,0,0,0,0,0],W=b;export{W as default};