@arcgis/core 5.2.0-next.86 → 5.2.0-next.88

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 (691) hide show
  1. package/arcade/Dictionary.js +1 -1
  2. package/arcade/Feature.js +1 -1
  3. package/arcade/ImmutablePointArray.js +1 -1
  4. package/arcade/arcadeAsyncRuntime.js +1 -1
  5. package/arcade/arcadeCompiler.js +1 -1
  6. package/arcade/arcadeRuntime.js +1 -1
  7. package/arcade/containerUtils.js +1 -1
  8. package/arcade/debug.js +1 -1
  9. package/arcade/deepClone.js +1 -1
  10. package/arcade/featureset/actions/SpatialFilter.js +1 -1
  11. package/arcade/featureset/support/FeatureSet.js +1 -1
  12. package/arcade/functions/centroid.js +1 -1
  13. package/arcade/functions/date.js +1 -1
  14. package/arcade/functions/feature.js +1 -1
  15. package/arcade/functions/featuresetbase.js +1 -1
  16. package/arcade/functions/featuresetgeom.js +1 -1
  17. package/arcade/functions/featuresetstats.js +1 -1
  18. package/arcade/functions/featuresetstring.js +1 -1
  19. package/arcade/functions/fieldStats.js +1 -1
  20. package/arcade/functions/geomasync.js +1 -1
  21. package/arcade/functions/geometry.js +1 -1
  22. package/arcade/functions/geomsync.js +1 -1
  23. package/arcade/functions/knowledgegraph.js +1 -1
  24. package/arcade/functions/maths.js +1 -1
  25. package/arcade/functions/stats.js +1 -1
  26. package/arcade/functions/string.js +1 -1
  27. package/arcade/functions/track.js +1 -1
  28. package/arcade/geometry/adapters/accessor.js +2 -0
  29. package/arcade/geometry/adapters/dehydrated.js +2 -0
  30. package/arcade/geometry/adapters/gx.js +2 -0
  31. package/arcade/geometry/adapters/json.js +2 -0
  32. package/arcade/geometry/adapters/optimized.js +2 -0
  33. package/arcade/geometry/adapters/tuple.js +2 -0
  34. package/arcade/geometry/adapters/utils.js +2 -0
  35. package/arcade/geometry/arrayOfPointsConversions.js +2 -0
  36. package/arcade/geometry/constructors.js +1 -1
  37. package/arcade/geometry/functions.js +1 -1
  38. package/arcade/geometry/isSelfIntersecting.js +2 -0
  39. package/arcade/geometry/nearestCoordinate.js +2 -0
  40. package/arcade/geometry/nearestVertex.js +1 -1
  41. package/arcade/geometry/operators.js +1 -1
  42. package/arcade/geometry/operatorsWorker.js +1 -1
  43. package/arcade/geometry/rotate.js +1 -1
  44. package/arcade/geometry.js +2 -0
  45. package/arcade/languageUtils.js +1 -1
  46. package/arcade.js +1 -1
  47. package/arcgisGlobal.d.ts +1 -0
  48. package/assets/esri/core/workers/RemoteClient.js +1 -1
  49. package/assets/esri/core/workers/chunks/{0b8c9657975388f1e4c8.js → 00181785a180e934bf7c.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{01e648b258efa6408070.js → 0336f4f8498a22347720.js} +1 -1
  51. package/assets/esri/core/workers/chunks/0439d4f4dfd6e78be97e.js +1 -0
  52. package/assets/esri/core/workers/chunks/05393b23ab24126d4236.js +1 -0
  53. package/assets/esri/core/workers/chunks/08263c07d92c48806834.js +1 -0
  54. package/assets/esri/core/workers/chunks/09e01fd1c199be0c8e03.js +1 -0
  55. package/assets/esri/core/workers/chunks/{12d6d73ca1fa55640a4f.js → 0b4a7209b99227a842ad.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{073224c6ac77dc9e97af.js → 0b7860a3f18d252b774a.js} +1 -1
  57. package/assets/esri/core/workers/chunks/0d95f72e1c07ab867d21.js +1 -0
  58. package/assets/esri/core/workers/chunks/0dbbac7a2378728571a7.js +1 -0
  59. package/assets/esri/core/workers/chunks/0f15468ffefd3e9a17b8.js +29 -0
  60. package/assets/esri/core/workers/chunks/{3aeb934ebdab1d8c4608.js → 12a3b55195ce3244259d.js} +1 -1
  61. package/assets/esri/core/workers/chunks/13e92f6a9573a2818fb7.js +1 -0
  62. package/assets/esri/core/workers/chunks/19aa4072764937743bd8.js +1 -0
  63. package/assets/esri/core/workers/chunks/19e93d4d37018e3ee849.js +1 -0
  64. package/assets/esri/core/workers/chunks/{911f3a1b8dd4bc5c9782.js → 1bf5c0a4bc5a960a3fa2.js} +1 -1
  65. package/assets/esri/core/workers/chunks/1c378d489c5402888f76.js +1 -0
  66. package/assets/esri/core/workers/chunks/1d1e8d8b1fcf2d9f3dfc.js +1 -0
  67. package/assets/esri/core/workers/chunks/{e5c8f9fef88ca33624e9.js → 1e087fb13b7b0a5d6fec.js} +1 -1
  68. package/assets/esri/core/workers/chunks/1e192ac0533a5c0b5a7a.js +1 -0
  69. package/assets/esri/core/workers/chunks/1f9d6180a96d557838e9.js +1 -0
  70. package/assets/esri/core/workers/chunks/1fe077f57a087c0e9119.js +1 -0
  71. package/assets/esri/core/workers/chunks/212222b64039d436b9a6.js +1 -0
  72. package/assets/esri/core/workers/chunks/22c94f9a69b2157f8dbd.js +1 -0
  73. package/assets/esri/core/workers/chunks/25a2e02677a74834c8b5.js +1 -0
  74. package/assets/esri/core/workers/chunks/26ecc841396e5e719b6a.js +1 -0
  75. package/assets/esri/core/workers/chunks/{fcf7299e2ee904ab9882.js → 2724900f7992a79fc442.js} +1 -1
  76. package/assets/esri/core/workers/chunks/27c0bed59626c7f64125.js +1 -0
  77. package/assets/esri/core/workers/chunks/2bc3e7f394386fa75447.js +1 -0
  78. package/assets/esri/core/workers/chunks/2c9783e3b44986e86797.js +1 -0
  79. package/assets/esri/core/workers/chunks/2ceb07b125c84b51f02a.js +1 -0
  80. package/assets/esri/core/workers/chunks/2cf2f2842c19be84ab4d.js +1 -0
  81. package/assets/esri/core/workers/chunks/2d07d5a9ec67c39ef10c.js +1 -0
  82. package/assets/esri/core/workers/chunks/{a7c715648a07ed70b122.js → 2ec44ebc48beeba11201.js} +1 -1
  83. package/assets/esri/core/workers/chunks/2f2d699b072472fa710e.js +1 -0
  84. package/assets/esri/core/workers/chunks/2f3bbc1f7d4abbbeec2f.js +1 -0
  85. package/assets/esri/core/workers/chunks/304a36e862947fdb05c0.js +1 -0
  86. package/assets/esri/core/workers/chunks/30af0f7c4cfa541c9efd.js +1 -0
  87. package/assets/esri/core/workers/chunks/32f11b4aeae1ef00e466.js +1 -0
  88. package/assets/esri/core/workers/chunks/35d3e60d15294f268992.js +1 -0
  89. package/assets/esri/core/workers/chunks/37a2be4380796f14fe4e.js +1 -0
  90. package/assets/esri/core/workers/chunks/37adb55d9f83faad1712.js +1 -0
  91. package/assets/esri/core/workers/chunks/3869dca884d7ca6488f5.js +1 -0
  92. package/assets/esri/core/workers/chunks/3a9c6f58a1a065c14017.js +1 -0
  93. package/assets/esri/core/workers/chunks/3b552afffaa78bf4fe18.js +1 -0
  94. package/assets/esri/core/workers/chunks/{fe06cc2f90b2d551e4c1.js → 3bbd2d4a19c3b7ad82e4.js} +1 -1
  95. package/assets/esri/core/workers/chunks/3de07326da4c47cd2aab.js +1 -0
  96. package/assets/esri/core/workers/chunks/3f5234120d3a14186c1c.js +1 -0
  97. package/assets/esri/core/workers/chunks/414093fa4957d17bf551.js +1 -0
  98. package/assets/esri/core/workers/chunks/{dbd6bbd3e834ff9d220e.js → 41cf6163758d28fb1968.js} +1 -1
  99. package/assets/esri/core/workers/chunks/466bb1b69aabaeabad6a.js +1 -0
  100. package/assets/esri/core/workers/chunks/47e60b2acec18ef37b6c.js +1 -0
  101. package/assets/esri/core/workers/chunks/4849849fc8330d05a8e6.js +1 -0
  102. package/assets/esri/core/workers/chunks/497c5a9c95e9a89ac217.js +1 -0
  103. package/assets/esri/core/workers/chunks/49d36e54644dc2966128.js +1 -0
  104. package/assets/esri/core/workers/chunks/4aefe6fd4d725a107758.js +1 -0
  105. package/assets/esri/core/workers/chunks/4b6f433022a6822706cb.js +1 -0
  106. package/assets/esri/core/workers/chunks/4d4ebb4e4d83c1123b63.js +1 -0
  107. package/assets/esri/core/workers/chunks/4ee99e654dad6f09abee.js +1 -0
  108. package/assets/esri/core/workers/chunks/4f0804429d8989aa4c51.js +1 -0
  109. package/assets/esri/core/workers/chunks/50525b617ef78086d3c7.js +1 -0
  110. package/assets/esri/core/workers/chunks/5235b9c21ac4156c2375.js +1 -0
  111. package/assets/esri/core/workers/chunks/52422500ca3d6cf2e596.js +1 -0
  112. package/assets/esri/core/workers/chunks/527b87fddf33bb5d519e.js +1 -0
  113. package/assets/esri/core/workers/chunks/55572cefc752b755cf0a.js +1 -0
  114. package/assets/esri/core/workers/chunks/{a4bae2396fae48b57047.js → 595edbc1e9bba47d5676.js} +1 -1
  115. package/assets/esri/core/workers/chunks/59cf23cc8f91b5bea31a.js +1 -0
  116. package/assets/esri/core/workers/chunks/5af16937904c06fb06f6.js +1 -0
  117. package/assets/esri/core/workers/chunks/5d7a5aa608ed6192b016.js +1 -0
  118. package/assets/esri/core/workers/chunks/5d9c92c4e60a4696fdad.js +1 -0
  119. package/assets/esri/core/workers/chunks/5ed7bc9e6cb7cdee92e2.js +1 -0
  120. package/assets/esri/core/workers/chunks/{272c8ccdbd3dcc14e99b.js → 5ed89c862eee1345e3af.js} +1 -1
  121. package/assets/esri/core/workers/chunks/5fbd7d8d8896a224fff3.js +1 -0
  122. package/assets/esri/core/workers/chunks/64ce2d060ae7cdd412cf.js +1 -0
  123. package/assets/esri/core/workers/chunks/65f4ca7201e7267bfc81.js +1 -0
  124. package/assets/esri/core/workers/chunks/67efdd296007a809586c.js +1 -0
  125. package/assets/esri/core/workers/chunks/691434d4c6a38e63d819.js +1 -0
  126. package/assets/esri/core/workers/chunks/{ba67aaa08e4f11e1140a.js → 696cb3bf167327d5b0b9.js} +1 -1
  127. package/assets/esri/core/workers/chunks/69700ed16727ed0c4e3a.js +1 -0
  128. package/assets/esri/core/workers/chunks/6a2d890640b2cd6c5ccb.js +1 -0
  129. package/assets/esri/core/workers/chunks/6a4f007f87d9f2a6fbc4.js +1 -0
  130. package/assets/esri/core/workers/chunks/{7343a44a2382a1d68497.js → 6b9dbf43c0659e55c539.js} +1 -1
  131. package/assets/esri/core/workers/chunks/6de5c6af62776e1b9776.js +1 -0
  132. package/assets/esri/core/workers/chunks/70dc25f721c0ac5f3660.js +1 -0
  133. package/assets/esri/core/workers/chunks/71308dca3fd05687e7bd.js +1 -0
  134. package/assets/esri/core/workers/chunks/75bddfe2be64379db8fd.js +1 -0
  135. package/assets/esri/core/workers/chunks/78085f804969c9282700.js +1 -0
  136. package/assets/esri/core/workers/chunks/7aa9b61ca9b66f30449f.js +1 -0
  137. package/assets/esri/core/workers/chunks/7c1f989ee3d13dfe7ebd.js +1 -0
  138. package/assets/esri/core/workers/chunks/7c56446184abcd14678b.js +1 -0
  139. package/assets/esri/core/workers/chunks/7ce9c84f90e9dd1deb38.js +1 -0
  140. package/assets/esri/core/workers/chunks/7f55a150e4da02786311.js +1 -0
  141. package/assets/esri/core/workers/chunks/7fc3231768ce79e375ae.js +1 -0
  142. package/assets/esri/core/workers/chunks/7febb434f2de2436435f.js +1 -0
  143. package/assets/esri/core/workers/chunks/847b02d188ece9b563ad.js +1 -0
  144. package/assets/esri/core/workers/chunks/903c7bd079888f65fef1.js +1 -0
  145. package/assets/esri/core/workers/chunks/{bdafd4f03585351cecc3.js → 909a85cb6e0e9a3c8567.js} +1 -1
  146. package/assets/esri/core/workers/chunks/9226205850e35b7fc610.js +1 -0
  147. package/assets/esri/core/workers/chunks/922c24b9bb68f4201b03.js +1 -0
  148. package/assets/esri/core/workers/chunks/9407db0584c730591161.js +1 -0
  149. package/assets/esri/core/workers/chunks/9474c913e53f69679197.js +1 -0
  150. package/assets/esri/core/workers/chunks/94ddfe165ac25aef8229.js +1 -0
  151. package/assets/esri/core/workers/chunks/{75a2c43311f5f9058f62.js → 94f62ff81cc6fb83e73f.js} +1 -1
  152. package/assets/esri/core/workers/chunks/95ccac3734ac70387b03.js +1 -0
  153. package/assets/esri/core/workers/chunks/97c7dfd29ad4c2966cb4.js +1 -0
  154. package/assets/esri/core/workers/chunks/{1354b8442c2c501238f1.js → 986c5024f22bbfc49aba.js} +1 -1
  155. package/assets/esri/core/workers/chunks/9b81bd62a2c72f592db1.js +1 -0
  156. package/assets/esri/core/workers/chunks/{62596065747abce1964d.js → 9b8e33985310f281f084.js} +1 -1
  157. package/assets/esri/core/workers/chunks/9c7fc1c97125ea2a7b7e.js +1 -0
  158. package/assets/esri/core/workers/chunks/9e2b3754a76e0dd4a94a.js +1 -0
  159. package/assets/esri/core/workers/chunks/9eb3e6800f5034f1593f.js +1 -0
  160. package/assets/esri/core/workers/chunks/a0300fac6a06e7d89a52.js +1 -0
  161. package/assets/esri/core/workers/chunks/a03e7333e3328036f478.js +1 -0
  162. package/assets/esri/core/workers/chunks/a0565137027c83108953.js +1 -0
  163. package/assets/esri/core/workers/chunks/a3b403f8acb90af19adb.js +1 -0
  164. package/assets/esri/core/workers/chunks/a4596f028758649da099.js +1 -0
  165. package/assets/esri/core/workers/chunks/a46ac0be9aabc4cfedc7.js +1 -0
  166. package/assets/esri/core/workers/chunks/a4a22149077c7780481c.js +1 -0
  167. package/assets/esri/core/workers/chunks/a6ab627e965fe7e5bd52.js +1 -0
  168. package/assets/esri/core/workers/chunks/a7954ad55a241af9064f.js +1 -0
  169. package/assets/esri/core/workers/chunks/a8b878c12cb1a6ea012b.js +1 -0
  170. package/assets/esri/core/workers/chunks/{ec0803cfa5051c4d300d.js → aa0ef4493a7e9bed159f.js} +1 -1
  171. package/assets/esri/core/workers/chunks/aa8ab28e0c1ae3b55ac0.js +1 -0
  172. package/assets/esri/core/workers/chunks/ab9927a32350063cb5f0.js +1 -0
  173. package/assets/esri/core/workers/chunks/adc2620cbe735532004d.js +1 -0
  174. package/assets/esri/core/workers/chunks/add834f867900a7091d2.js +1 -0
  175. package/assets/esri/core/workers/chunks/{bbf4c2ee4d56bb0f1a81.js → afa6b74d9ca9ed0154af.js} +1 -1
  176. package/assets/esri/core/workers/chunks/b0e25ccb5a1e57a82628.js +1 -0
  177. package/assets/esri/core/workers/chunks/b17a9853250ab626d58d.js +1 -0
  178. package/assets/esri/core/workers/chunks/b19cff0e43fab2632660.js +1 -0
  179. package/assets/esri/core/workers/chunks/b2e2234fdf8e05bc3312.js +1 -0
  180. package/assets/esri/core/workers/chunks/b6063d1755def00d4889.js +1 -0
  181. package/assets/esri/core/workers/chunks/{7c3d46201b11a45f79d0.js → b6f67302d0d5d57add66.js} +74 -107
  182. package/assets/esri/core/workers/chunks/bb56ab53c5a10c9518a6.js +1 -0
  183. package/assets/esri/core/workers/chunks/bd2602195e265f8fdb15.js +1 -0
  184. package/assets/esri/core/workers/chunks/{f762f0f6c83748d8e328.js → bee411f08e2a9499f8f5.js} +1 -1
  185. package/assets/esri/core/workers/chunks/bf357afbabaa8dec4d75.js +1 -0
  186. package/assets/esri/core/workers/chunks/bf7875fda48b15271a10.js +1 -0
  187. package/assets/esri/core/workers/chunks/bfa59005a9b191d18546.js +1 -0
  188. package/assets/esri/core/workers/chunks/bfb8fc6b940bd5510e29.js +1 -0
  189. package/assets/esri/core/workers/chunks/{b311658b8a223efe35d6.js → c0e073a77484b0dfd383.js} +1 -1
  190. package/assets/esri/core/workers/chunks/c13aa45ccd5efb662f88.js +1 -0
  191. package/assets/esri/core/workers/chunks/c176df477bbbbc9c6922.js +1 -0
  192. package/assets/esri/core/workers/chunks/c35553d07ad169910742.js +1 -0
  193. package/assets/esri/core/workers/chunks/c4f582dec07895d3bb93.js +1 -0
  194. package/assets/esri/core/workers/chunks/c4fef90cf08bbe4f0bb5.js +1 -0
  195. package/assets/esri/core/workers/chunks/c5c2fed38e0ccf84f1fa.js +1 -0
  196. package/assets/esri/core/workers/chunks/c80277a313205853a857.js +1 -0
  197. package/assets/esri/core/workers/chunks/c91042f8bf886056a29c.js +1 -0
  198. package/assets/esri/core/workers/chunks/ca204c110438f7315790.js +1 -0
  199. package/assets/esri/core/workers/chunks/ca36d85a47179d95f2fc.js +1 -0
  200. package/assets/esri/core/workers/chunks/cb6fb04fe5c8d90d4196.js +1 -0
  201. package/assets/esri/core/workers/chunks/ccaeabc3be07f3c96f50.js +1 -0
  202. package/assets/esri/core/workers/chunks/{85f459297b0214141d43.js → cd02a6078443b8f63927.js} +1 -1
  203. package/assets/esri/core/workers/chunks/{e64ccdb8328eb6514e59.js → cd8b3c2fc27c239f9954.js} +1 -1
  204. package/assets/esri/core/workers/chunks/{3a36c132ceddef3d15c8.js → cdbcc4cd9145dd93db49.js} +1 -1
  205. package/assets/esri/core/workers/chunks/{e90feee1756a2209f93f.js → ce9fe1a89b474f9e7ee7.js} +1 -1
  206. package/assets/esri/core/workers/chunks/d04a01dc1b4947478264.js +1 -0
  207. package/assets/esri/core/workers/chunks/d0cf9ff48f051adbd455.js +1 -0
  208. package/assets/esri/core/workers/chunks/d119671a32a050517cca.js +1 -0
  209. package/assets/esri/core/workers/chunks/d26be8313526ecea9c68.js +1 -0
  210. package/assets/esri/core/workers/chunks/d270b49c037085503016.js +1 -0
  211. package/assets/esri/core/workers/chunks/{f5eee6e548bb24b5a003.js → d30a7fc8dab4ebb8893b.js} +1 -1
  212. package/assets/esri/core/workers/chunks/d344c3fd9f6b113bbcd7.js +1 -0
  213. package/assets/esri/core/workers/chunks/d36bbda9b7261534568f.js +1 -0
  214. package/assets/esri/core/workers/chunks/d4b0012ae1d3b8a9ba01.js +1 -0
  215. package/assets/esri/core/workers/chunks/d6b87134e0d120c68d2f.js +1 -0
  216. package/assets/esri/core/workers/chunks/d6f7aa280f1bd201d4ef.js +1 -0
  217. package/assets/esri/core/workers/chunks/da9aacdb0b4a04f42fb8.js +1 -0
  218. package/assets/esri/core/workers/chunks/daf7b647bd960d8bad56.js +1 -0
  219. package/assets/esri/core/workers/chunks/{10ac92dcd3738ec23dfb.js → db04c1bad40d068306ba.js} +1 -1
  220. package/assets/esri/core/workers/chunks/{3427f0c026301bcf7272.js → db180f8d25471cfa48af.js} +1 -1
  221. package/assets/esri/core/workers/chunks/db4c9a9103e979292948.js +1 -0
  222. package/assets/esri/core/workers/chunks/dceaa6b68eee090073b1.js +1 -0
  223. package/assets/esri/core/workers/chunks/ddf284648a73b6993737.js +1 -0
  224. package/assets/esri/core/workers/chunks/dfbe0efe453587ec5eb2.js +1 -0
  225. package/assets/esri/core/workers/chunks/e1682e94cc714197ebb4.js +1 -0
  226. package/assets/esri/core/workers/chunks/e2576c37cf13dc421f69.js +1 -0
  227. package/assets/esri/core/workers/chunks/e32a14770e036fce79d9.js +1 -0
  228. package/assets/esri/core/workers/chunks/e370a3337b3c90240e73.js +1 -0
  229. package/assets/esri/core/workers/chunks/e39bccc000c768120a32.js +1 -0
  230. package/assets/esri/core/workers/chunks/e40e08029325f43452d0.js +1 -0
  231. package/assets/esri/core/workers/chunks/{0d7d54e74b5639a0be6e.js → e707534a700a2de687ca.js} +1 -1
  232. package/assets/esri/core/workers/chunks/e823c9ccb7bc348d8824.js +1 -0
  233. package/assets/esri/core/workers/chunks/e88eee4c2fc4229c2a8b.js +1 -0
  234. package/assets/esri/core/workers/chunks/e9f29019aa78f07ace66.js +1 -0
  235. package/assets/esri/core/workers/chunks/ea75c23c44452f45a949.js +1 -0
  236. package/assets/esri/core/workers/chunks/ea91c57a0b31f3f65ee5.js +1 -0
  237. package/assets/esri/core/workers/chunks/eacf216dcd6397c7bd7f.js +1 -0
  238. package/assets/esri/core/workers/chunks/ee77999df3785468b2b6.js +1 -0
  239. package/assets/esri/core/workers/chunks/ef851a2cff76fd211c07.js +1 -0
  240. package/assets/esri/core/workers/chunks/eff359210893239ecec3.js +1 -0
  241. package/assets/esri/core/workers/chunks/f106cc7f559856f69b9f.js +1 -0
  242. package/assets/esri/core/workers/chunks/f210cd8afb86b6eaf7a2.js +1 -0
  243. package/assets/esri/core/workers/chunks/f247f3c5148fa0237a7c.js +1 -0
  244. package/assets/esri/core/workers/chunks/f250a7aa571889c5ad4b.js +1 -0
  245. package/assets/esri/core/workers/chunks/{a26dc2647a15b830390e.js → f253875feb11883deb84.js} +1 -1
  246. package/assets/esri/core/workers/chunks/f31330d628d7e741bf5b.js +1 -0
  247. package/assets/esri/core/workers/chunks/f3d57c5b9dffd12e45b4.js +1 -0
  248. package/assets/esri/core/workers/chunks/f43ae1c2f89e1c4396cc.js +1 -0
  249. package/assets/esri/core/workers/chunks/f60ed579981913d44675.js +1 -0
  250. package/assets/esri/core/workers/chunks/{147d1e7e2852a4197e5f.js → f665fb4c5633e0a459d8.js} +1 -1
  251. package/assets/esri/core/workers/chunks/f66e597e524b26e61cd3.js +1 -0
  252. package/assets/esri/core/workers/chunks/{bec140a69cfdb0519680.js → f74c7cbe4bd12f73ae90.js} +1 -1
  253. package/assets/esri/core/workers/chunks/{e6f6b38eda34708d61c5.js → f7f2102b16d201e5f531.js} +1 -1
  254. package/assets/esri/core/workers/chunks/f82ae237452b97cfc024.js +1 -0
  255. package/assets/esri/core/workers/chunks/f8f7b86bbd62106bc3d4.js +1 -0
  256. package/assets/esri/core/workers/chunks/f9a4387f850d85c44ca5.js +1 -0
  257. package/assets/esri/core/workers/chunks/fbc7576ed12964059da6.js +1 -0
  258. package/assets/esri/core/workers/chunks/fc4a5996fc03f6c32030.js +1 -0
  259. package/assets/esri/core/workers/chunks/fdd0e6d9927d3c43b0d3.js +1 -0
  260. package/assets/esri/core/workers/chunks/fddcb8be714ad18ad0c8.js +1 -0
  261. package/assets/esri/core/workers/chunks/{baa46edd87e97f922128.js → ffe749d790320dddfa74.js} +1 -1
  262. package/assets/esri/themes/base/widgets/_BuildingDisciplinesTree.scss +1 -1
  263. package/assets/esri/themes/base/widgets/_Daylight.scss +2 -2
  264. package/assets/esri/themes/base/widgets/_Editor.scss +1 -1
  265. package/assets/esri/themes/base/widgets/_Sketch.scss +1 -1
  266. package/assets/esri/themes/base/widgets/_SketchTooltipControls.scss +1 -1
  267. package/assets/esri/themes/base/widgets/_Slider.scss +1 -1
  268. package/assets/esri/themes/base/widgets/_SnappingControls.scss +1 -1
  269. package/assets/esri/themes/base/widgets/_TimezonePicker.scss +1 -1
  270. package/chunks/Bufferer-CclWhXVb.js +1 -1
  271. package/chunks/Distance2DCalculator-DjIp2uQi.js +1 -1
  272. package/chunks/EmissionComposite.glsl.js +2 -2
  273. package/chunks/Envelope.js +1 -1
  274. package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
  275. package/chunks/GeodeticUtils.js +1 -1
  276. package/chunks/GeographicTransformation.js +1 -1
  277. package/chunks/Geometry.js +1 -1
  278. package/chunks/GlobalIllumination.glsl.js +69 -102
  279. package/chunks/GlowComposite.glsl.js +9 -7
  280. package/chunks/MultiPathImpl.js +1 -1
  281. package/chunks/OperatorCentroid2D.js +1 -1
  282. package/chunks/OperatorContains.js +2 -0
  283. package/chunks/OperatorCrosses.js +1 -1
  284. package/chunks/OperatorCut.js +1 -1
  285. package/chunks/OperatorDisjoint.js +2 -0
  286. package/chunks/OperatorDistance.js +2 -0
  287. package/chunks/OperatorEquals.js +2 -0
  288. package/chunks/OperatorGeodesicBuffer.js +1 -1
  289. package/chunks/OperatorGeodeticArea.js +1 -1
  290. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  291. package/chunks/OperatorGeodeticLength.js +1 -1
  292. package/chunks/OperatorGraphicBuffer.js +1 -1
  293. package/chunks/OperatorIntegrate.js +1 -1
  294. package/chunks/OperatorIntersects.js +1 -1
  295. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  296. package/chunks/OperatorOverlaps.js +1 -1
  297. package/chunks/OperatorProximity.js +1 -1
  298. package/chunks/OperatorProximityGeodesic.js +1 -1
  299. package/chunks/OperatorRelate.js +2 -0
  300. package/chunks/OperatorShapePreservingLength.js +1 -1
  301. package/chunks/OperatorShapePreservingProject.js +1 -1
  302. package/chunks/OperatorSimplifyOGC.js +1 -1
  303. package/chunks/OperatorTouches.js +1 -1
  304. package/chunks/OperatorWithin.js +1 -1
  305. package/chunks/Point2D.js +1 -1
  306. package/chunks/ProjectionTransformation.js +1 -1
  307. package/chunks/RibbonLine.glsl.js +202 -141
  308. package/chunks/SideCalculator2D-DX0718xq.js +1 -1
  309. package/chunks/UnitFactory.js +1 -1
  310. package/chunks/aiServices.js +1 -1
  311. package/chunks/array.js +1 -1
  312. package/chunks/languageUtils.js +1 -1
  313. package/config.js +1 -1
  314. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  315. package/core/sql/TimeOnly.js +1 -1
  316. package/core/units.js +1 -1
  317. package/editing/sharedTemplates/executor/builders/bufferLineToPolygon.js +1 -1
  318. package/editing/sharedTemplates/executor/builders/bufferPointToPolygon.js +1 -1
  319. package/editing/sharedTemplates/executor/builders/bufferPolygonToPolygon.js +1 -1
  320. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  321. package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
  322. package/form/elements/inputs/inputUtils.js +1 -1
  323. package/geometry/operators/areaOperator.js +1 -1
  324. package/geometry/operators/bufferOperator.js +1 -1
  325. package/geometry/operators/centroidOperator.js +1 -1
  326. package/geometry/operators/clipOperator.js +1 -1
  327. package/geometry/operators/containsOperator.js +1 -1
  328. package/geometry/operators/convexHullOperator.js +1 -1
  329. package/geometry/operators/crossesOperator.js +1 -1
  330. package/geometry/operators/cutOperator.js +1 -1
  331. package/geometry/operators/densifyOperator.js +1 -1
  332. package/geometry/operators/differenceOperator.js +1 -1
  333. package/geometry/operators/disjointOperator.js +1 -1
  334. package/geometry/operators/distanceOperator.js +1 -1
  335. package/geometry/operators/equalsOperator.js +1 -1
  336. package/geometry/operators/generalizeOperator.js +1 -1
  337. package/geometry/operators/geodesicBufferOperator.js +1 -1
  338. package/geometry/operators/geodeticAreaOperator.js +1 -1
  339. package/geometry/operators/geodeticDensifyOperator.js +1 -1
  340. package/geometry/operators/geodeticDistanceOperator.js +1 -1
  341. package/geometry/operators/geodeticLengthOperator.js +1 -1
  342. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  343. package/geometry/operators/gx/operatorBuffer.js +1 -1
  344. package/geometry/operators/gx/operatorDifference.js +1 -1
  345. package/geometry/operators/gx/operatorIntersection.js +1 -1
  346. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  347. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  348. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  349. package/geometry/operators/gx/operatorSimplify.js +1 -1
  350. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  351. package/geometry/operators/gx/operatorUnion.js +1 -1
  352. package/geometry/operators/intersectionOperator.js +1 -1
  353. package/geometry/operators/intersectsOperator.js +1 -1
  354. package/geometry/operators/json/containsOperator.js +1 -1
  355. package/geometry/operators/json/crossesOperator.js +1 -1
  356. package/geometry/operators/json/disjointOperator.js +1 -1
  357. package/geometry/operators/json/intersectsOperator.js +1 -1
  358. package/geometry/operators/json/overlapsOperator.js +1 -1
  359. package/geometry/operators/json/touchesOperator.js +1 -1
  360. package/geometry/operators/json/unionOperator.js +1 -1
  361. package/geometry/operators/json/withinOperator.js +1 -1
  362. package/geometry/operators/labelPointOperator.js +1 -1
  363. package/geometry/operators/lengthOperator.js +1 -1
  364. package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
  365. package/geometry/operators/offsetOperator.js +1 -1
  366. package/geometry/operators/overlapsOperator.js +1 -1
  367. package/geometry/operators/projectOperator.d.ts +1 -1
  368. package/geometry/operators/proximityOperator.js +1 -1
  369. package/geometry/operators/relateOperator.js +1 -1
  370. package/geometry/operators/reshapeOperator.js +1 -1
  371. package/geometry/operators/shapePreservingProjectOperator.d.ts +15 -1
  372. package/geometry/operators/simplifyOGCOperator.js +1 -1
  373. package/geometry/operators/simplifyOperator.js +1 -1
  374. package/geometry/operators/support/GeographicTransformation.d.ts +4 -3
  375. package/geometry/operators/support/GeographicTransformationStep.d.ts +2 -1
  376. package/geometry/operators/support/apiConverter.js +1 -1
  377. package/geometry/operators/support/geographicTransformationUtils.d.ts +22 -15
  378. package/geometry/operators/support/jsonConverter.js +1 -1
  379. package/geometry/operators/support/projectionTransformation.js +1 -1
  380. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  381. package/geometry/operators/touchesOperator.js +1 -1
  382. package/geometry/operators/types.d.ts +2 -1
  383. package/geometry/operators/unionOperator.js +1 -1
  384. package/geometry/operators/withinOperator.js +1 -1
  385. package/geometry/support/convexPolyhedron.js +2 -0
  386. package/geometry/support/curves/circleUtils.js +1 -1
  387. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  388. package/geometry/support/frustum.js +1 -1
  389. package/geometry/support/webMercatorUtils.js +1 -1
  390. package/kernel.js +1 -1
  391. package/layers/LinkChartLayer.js +1 -1
  392. package/layers/VectorTileLayer.js +1 -1
  393. package/layers/graphics/hydratedFeatures.js +1 -1
  394. package/layers/mixins/DataSeriesLayer.js +1 -1
  395. package/layers/support/csvUtils.js +1 -1
  396. package/layers/support/fieldUtils.js +1 -1
  397. package/layers/support/mediaUtils.js +1 -1
  398. package/layers/video/VideoController.js +1 -1
  399. package/package.json +4 -4
  400. package/popup/FeatureContentCollection.js +1 -1
  401. package/support/ArcadeExpression.js +1 -1
  402. package/support/actions/ActionBase.d.ts +1 -1
  403. package/support/arcadeUtils.js +1 -1
  404. package/support/loadArcade.js +1 -1
  405. package/support/revision.js +1 -1
  406. package/support/tests/serviceMockDependencies.js +1 -1
  407. package/views/2d/analysis/AreaMeasurement/AreaMeasurementController.js +1 -1
  408. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementController.js +1 -1
  409. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  410. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  411. package/views/2d/layers/support/RouteLayerWaypointVisualization.js +1 -1
  412. package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
  413. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  414. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  415. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  416. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementController.js +1 -1
  417. package/views/3d/input/SceneInputManager.js +1 -1
  418. package/views/3d/input/handlers/RopePullNavigation.js +2 -0
  419. package/views/3d/layers/TiledLayerView3D.js +1 -1
  420. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  421. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  422. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  423. package/views/3d/layers/graphics/featureExpressionInfoUtils.js +1 -1
  424. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  425. package/views/3d/layers/i3s/I3SNode.js +1 -1
  426. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  427. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  428. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  429. package/views/3d/state/controllers/RopePullController.js +2 -0
  430. package/views/3d/state/utils/navigationUtils.js +1 -1
  431. package/views/3d/state/utils/ropePullUtils.js +2 -0
  432. package/views/3d/support/ElevationAgnosticVisibility.js +2 -0
  433. package/views/3d/support/engineContent/line.js +1 -1
  434. package/views/3d/support/sphericalTileUtils.js +2 -0
  435. package/views/3d/terrain/PlanarPatch.js +1 -1
  436. package/views/3d/terrain/SphericalPatch.js +1 -1
  437. package/views/3d/terrain/Tile.js +1 -1
  438. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js +9 -3
  439. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +5 -8
  440. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  441. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  442. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  443. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  444. package/views/3d/webgl-engine/lib/Material.js +1 -1
  445. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  446. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  447. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  448. package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
  449. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  450. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  451. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  452. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  453. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  454. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  455. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  456. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +39 -51
  457. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  458. package/views/SelectionManager.js +1 -1
  459. package/views/draw/DrawTool.js +1 -1
  460. package/views/draw/support/createUtils.js +1 -1
  461. package/views/popupAdapter.js +1 -1
  462. package/views/support/GeometryWorker.js +1 -1
  463. package/views/support/selectionUtils.js +1 -1
  464. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  465. package/widgets/BatchAttributeForm/expressions/ArcadeExecutorProvider.js +1 -1
  466. package/widgets/BatchAttributeForm/templates/FieldElementTemplate.js +1 -1
  467. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  468. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  469. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  470. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  471. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  472. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  473. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  474. package/widgets/OrientedImageryViewer/support/panConstraint.js +1 -1
  475. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
  476. package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
  477. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  478. package/widgets/support/SelectionList/selectionListUtils.d.ts +58 -0
  479. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  480. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  481. package/arcade/kernel.js +0 -2
  482. package/assets/esri/core/workers/chunks/01b7babaefe6500fd6eb.js +0 -1
  483. package/assets/esri/core/workers/chunks/05acc17cb66fa6c08845.js +0 -1
  484. package/assets/esri/core/workers/chunks/06e109e92de7fa0956e3.js +0 -1
  485. package/assets/esri/core/workers/chunks/0775d1e3034d5e7ef7bc.js +0 -1
  486. package/assets/esri/core/workers/chunks/09a0a1e794ddff65aa08.js +0 -1
  487. package/assets/esri/core/workers/chunks/0e57d33bd202d0972207.js +0 -1
  488. package/assets/esri/core/workers/chunks/11224af8b037ccbf252c.js +0 -1
  489. package/assets/esri/core/workers/chunks/151bac9e519a3b821baf.js +0 -1
  490. package/assets/esri/core/workers/chunks/156f85ac1885464f0072.js +0 -1
  491. package/assets/esri/core/workers/chunks/17a10916114754f1f216.js +0 -1
  492. package/assets/esri/core/workers/chunks/180eebd8b7badc2840c9.js +0 -1
  493. package/assets/esri/core/workers/chunks/19cb8963d5ec2246357b.js +0 -1
  494. package/assets/esri/core/workers/chunks/19d4ecee1c161ac0f33c.js +0 -1
  495. package/assets/esri/core/workers/chunks/19ece9f5313f53384cac.js +0 -1
  496. package/assets/esri/core/workers/chunks/1b4e050a3884fc6fa6cf.js +0 -1
  497. package/assets/esri/core/workers/chunks/1d770e8f0fe57d937daa.js +0 -1
  498. package/assets/esri/core/workers/chunks/1dd22b8df6a52277c64b.js +0 -1
  499. package/assets/esri/core/workers/chunks/1ede298ab815e9ad625c.js +0 -1
  500. package/assets/esri/core/workers/chunks/208bc524bd1e0d3aab79.js +0 -1
  501. package/assets/esri/core/workers/chunks/20a4ae83542c7d39cf0f.js +0 -1
  502. package/assets/esri/core/workers/chunks/21071ab3d7b2771406ae.js +0 -1
  503. package/assets/esri/core/workers/chunks/21bfa89363104f041101.js +0 -1
  504. package/assets/esri/core/workers/chunks/21d0a4d6639d32278f11.js +0 -1
  505. package/assets/esri/core/workers/chunks/22a75fdc6ba60213a870.js +0 -1
  506. package/assets/esri/core/workers/chunks/22e004ed97e06536ecef.js +0 -1
  507. package/assets/esri/core/workers/chunks/23942712a3f6290e0fdb.js +0 -1
  508. package/assets/esri/core/workers/chunks/242287de82586d42f0a4.js +0 -1
  509. package/assets/esri/core/workers/chunks/25cb5086eaa412f6820b.js +0 -1
  510. package/assets/esri/core/workers/chunks/26c8ed0aef59ed6d5267.js +0 -1
  511. package/assets/esri/core/workers/chunks/2742d62fceaf0736aef0.js +0 -1
  512. package/assets/esri/core/workers/chunks/276eba546dc8774076ee.js +0 -1
  513. package/assets/esri/core/workers/chunks/28e02b213da9e682d3dc.js +0 -29
  514. package/assets/esri/core/workers/chunks/2d8195231cb16247f198.js +0 -1
  515. package/assets/esri/core/workers/chunks/2db1227ecd421728630d.js +0 -1
  516. package/assets/esri/core/workers/chunks/2ddc9c9ff6ec243d85e2.js +0 -1
  517. package/assets/esri/core/workers/chunks/2e712154ebb895d96ba1.js +0 -1
  518. package/assets/esri/core/workers/chunks/2f2df51d4976ae65edae.js +0 -1
  519. package/assets/esri/core/workers/chunks/2f652b330a9978a68e83.js +0 -1
  520. package/assets/esri/core/workers/chunks/32d31fd4cffdf5a80acb.js +0 -1
  521. package/assets/esri/core/workers/chunks/33aaa5a49e396a0aca47.js +0 -1
  522. package/assets/esri/core/workers/chunks/33d6ca59eeb88e739c81.js +0 -1
  523. package/assets/esri/core/workers/chunks/35622088727e120c93b9.js +0 -1
  524. package/assets/esri/core/workers/chunks/3714cc26f446c4d9cc2c.js +0 -1
  525. package/assets/esri/core/workers/chunks/3722d40d161d60370936.js +0 -1
  526. package/assets/esri/core/workers/chunks/3ac4cfeb1af12a9dc27d.js +0 -1
  527. package/assets/esri/core/workers/chunks/3bf37fd3280f4891c76b.js +0 -1
  528. package/assets/esri/core/workers/chunks/3cecf627827f5d9213a9.js +0 -1
  529. package/assets/esri/core/workers/chunks/3d18a10a1ecfabe92db3.js +0 -1
  530. package/assets/esri/core/workers/chunks/3da39efc5f68f15c105f.js +0 -1
  531. package/assets/esri/core/workers/chunks/3fbd4c7e25440c4713f2.js +0 -1
  532. package/assets/esri/core/workers/chunks/407dba2be21255eb47fc.js +0 -1
  533. package/assets/esri/core/workers/chunks/40ec85b7813a396ee490.js +0 -1
  534. package/assets/esri/core/workers/chunks/44b1a4e8a65221ad3808.js +0 -1
  535. package/assets/esri/core/workers/chunks/49e37f653b81f9e4f7cc.js +0 -1
  536. package/assets/esri/core/workers/chunks/4b4221a869b3f0d517fa.js +0 -1
  537. package/assets/esri/core/workers/chunks/4b86bcde5992eb752ab0.js +0 -1
  538. package/assets/esri/core/workers/chunks/4b9095e2bd060efd47c4.js +0 -1
  539. package/assets/esri/core/workers/chunks/4ec306e5c11808b96e07.js +0 -1
  540. package/assets/esri/core/workers/chunks/5084de4d0d4961b63ab7.js +0 -1
  541. package/assets/esri/core/workers/chunks/51a8a47aac1d8d22ba9d.js +0 -1
  542. package/assets/esri/core/workers/chunks/5324e4feb78203204c0c.js +0 -1
  543. package/assets/esri/core/workers/chunks/58d10928959ae1e2e8d9.js +0 -1
  544. package/assets/esri/core/workers/chunks/5903dceb172897e5675b.js +0 -1
  545. package/assets/esri/core/workers/chunks/597a8e3d9e458298fdd3.js +0 -1
  546. package/assets/esri/core/workers/chunks/5a006ff759fad9fc25cb.js +0 -1
  547. package/assets/esri/core/workers/chunks/5e5a05abcb41915802f6.js +0 -1
  548. package/assets/esri/core/workers/chunks/60be6de19c5659091d8f.js +0 -1
  549. package/assets/esri/core/workers/chunks/61a38237e163b39520e5.js +0 -1
  550. package/assets/esri/core/workers/chunks/61fcdba6f2097378dce5.js +0 -1
  551. package/assets/esri/core/workers/chunks/62f37d1075390a177ae9.js +0 -1
  552. package/assets/esri/core/workers/chunks/65eff0ae773505495f21.js +0 -1
  553. package/assets/esri/core/workers/chunks/67452ba9e87962b9e01e.js +0 -1
  554. package/assets/esri/core/workers/chunks/68195277046861ed39a7.js +0 -1
  555. package/assets/esri/core/workers/chunks/6a2a4da3a1cd64ff576f.js +0 -1
  556. package/assets/esri/core/workers/chunks/6af1680771fd8ae8c7dc.js +0 -1
  557. package/assets/esri/core/workers/chunks/6c367de583e0e657ca3a.js +0 -1
  558. package/assets/esri/core/workers/chunks/6d2021a0f0c9a3c6a0e6.js +0 -1
  559. package/assets/esri/core/workers/chunks/6db4a4f9a9ce7cc738d0.js +0 -1
  560. package/assets/esri/core/workers/chunks/724260e36efea90585f4.js +0 -1
  561. package/assets/esri/core/workers/chunks/73cb944b87ffce33bb49.js +0 -1
  562. package/assets/esri/core/workers/chunks/74ae1222787389d5fcaa.js +0 -1
  563. package/assets/esri/core/workers/chunks/74bfaa98da6c5d375f05.js +0 -1
  564. package/assets/esri/core/workers/chunks/7a68a16f7fea712b9fd6.js +0 -1
  565. package/assets/esri/core/workers/chunks/7d8e59ad438fb34b476d.js +0 -1
  566. package/assets/esri/core/workers/chunks/7eb94fc75926bc739233.js +0 -1
  567. package/assets/esri/core/workers/chunks/80795118467fb31ea4ed.js +0 -1
  568. package/assets/esri/core/workers/chunks/852649460d664b0a1a1d.js +0 -1
  569. package/assets/esri/core/workers/chunks/85c538bf1209f0da1f8e.js +0 -1
  570. package/assets/esri/core/workers/chunks/86de2d1f13915ab7a51d.js +0 -1
  571. package/assets/esri/core/workers/chunks/8db3fd97e8eccd3ba1db.js +0 -1
  572. package/assets/esri/core/workers/chunks/8e225dd0319672103561.js +0 -1
  573. package/assets/esri/core/workers/chunks/8e79a84e224d05204e7d.js +0 -1
  574. package/assets/esri/core/workers/chunks/8e9aff66a2d4e2cc102b.js +0 -1
  575. package/assets/esri/core/workers/chunks/917318f8e186f466dc52.js +0 -1
  576. package/assets/esri/core/workers/chunks/9267f6a65c2245696eac.js +0 -1
  577. package/assets/esri/core/workers/chunks/958e161634b5bfd50625.js +0 -1
  578. package/assets/esri/core/workers/chunks/99881d0a6c2490a16268.js +0 -1
  579. package/assets/esri/core/workers/chunks/99980c944acb8ff88d6a.js +0 -1
  580. package/assets/esri/core/workers/chunks/9b5e890fb0ab29f3a3f1.js +0 -1
  581. package/assets/esri/core/workers/chunks/9c227785f4454d3966ea.js +0 -1
  582. package/assets/esri/core/workers/chunks/9d61d9136f3d00aab530.js +0 -1
  583. package/assets/esri/core/workers/chunks/9df2685583393a87df2d.js +0 -1
  584. package/assets/esri/core/workers/chunks/9e840a71906c4deef776.js +0 -1
  585. package/assets/esri/core/workers/chunks/a03f4605bde69bfb6d41.js +0 -1
  586. package/assets/esri/core/workers/chunks/a0da026a06de379b8f39.js +0 -1
  587. package/assets/esri/core/workers/chunks/a327843cee2057ee76c0.js +0 -1
  588. package/assets/esri/core/workers/chunks/a557347fb313df6fcc79.js +0 -1
  589. package/assets/esri/core/workers/chunks/a8da0728a12fc46dca23.js +0 -1
  590. package/assets/esri/core/workers/chunks/a9ea28e0f22cfe3ccf92.js +0 -1
  591. package/assets/esri/core/workers/chunks/aae92f23b38ae22dd8bf.js +0 -1
  592. package/assets/esri/core/workers/chunks/ad29b77843a7d93d9f8a.js +0 -1
  593. package/assets/esri/core/workers/chunks/ad3714da9c90d7471385.js +0 -1
  594. package/assets/esri/core/workers/chunks/b015b8c7a073dbc4a3ad.js +0 -1
  595. package/assets/esri/core/workers/chunks/b047f9e9ba26037657ed.js +0 -1
  596. package/assets/esri/core/workers/chunks/b1323800119bd5c1759b.js +0 -1
  597. package/assets/esri/core/workers/chunks/b18c35f25da18a3219d7.js +0 -1
  598. package/assets/esri/core/workers/chunks/b1f68ee65cce457d7b5b.js +0 -1
  599. package/assets/esri/core/workers/chunks/b2d6fd436981c890152f.js +0 -1
  600. package/assets/esri/core/workers/chunks/b4b4fe06364bea9b0750.js +0 -1
  601. package/assets/esri/core/workers/chunks/b661aae7e3ce955a783e.js +0 -1
  602. package/assets/esri/core/workers/chunks/b66ebe53bd879aa9de57.js +0 -1
  603. package/assets/esri/core/workers/chunks/b812f817c465c64e8c63.js +0 -1
  604. package/assets/esri/core/workers/chunks/b8ca80134abfcc692244.js +0 -1
  605. package/assets/esri/core/workers/chunks/b94b36581842749863f0.js +0 -1
  606. package/assets/esri/core/workers/chunks/bbdf10d76d852072c878.js +0 -1
  607. package/assets/esri/core/workers/chunks/bbeb61d9302323bae9fb.js +0 -1
  608. package/assets/esri/core/workers/chunks/bbfd2b4af8e498b61af9.js +0 -1
  609. package/assets/esri/core/workers/chunks/bc6e488f5fbd50f9f3d0.js +0 -1
  610. package/assets/esri/core/workers/chunks/bddd5aa7a14cd45ff91c.js +0 -1
  611. package/assets/esri/core/workers/chunks/be31c2cb97f664a54306.js +0 -1
  612. package/assets/esri/core/workers/chunks/be4319827db91aa71bf5.js +0 -1
  613. package/assets/esri/core/workers/chunks/bef32acf368b4d5aba37.js +0 -1
  614. package/assets/esri/core/workers/chunks/c1568bcd3f04014152e1.js +0 -1
  615. package/assets/esri/core/workers/chunks/c229325f41f10fe7f732.js +0 -1
  616. package/assets/esri/core/workers/chunks/c229a4eedda468c914a9.js +0 -1
  617. package/assets/esri/core/workers/chunks/c308d8f419ba63c583e6.js +0 -1
  618. package/assets/esri/core/workers/chunks/c6ef0636073e28350c91.js +0 -1
  619. package/assets/esri/core/workers/chunks/c71368cd64f240da1743.js +0 -1
  620. package/assets/esri/core/workers/chunks/ca6652c6304ad0e37e8f.js +0 -1
  621. package/assets/esri/core/workers/chunks/cb2f27e5d465124b9868.js +0 -1
  622. package/assets/esri/core/workers/chunks/cee2f7f3b3f84688e49d.js +0 -1
  623. package/assets/esri/core/workers/chunks/d0942860a53b02371e94.js +0 -1
  624. package/assets/esri/core/workers/chunks/d09491b340af3b779505.js +0 -1
  625. package/assets/esri/core/workers/chunks/d13eeff678972a245d5d.js +0 -1
  626. package/assets/esri/core/workers/chunks/d3d7b4cd28a0dc2720d4.js +0 -1
  627. package/assets/esri/core/workers/chunks/d3ea7ac6fe71c95faa75.js +0 -1
  628. package/assets/esri/core/workers/chunks/d41e4498aaf4970f48b0.js +0 -1
  629. package/assets/esri/core/workers/chunks/d4d2a0d882fef463e7bc.js +0 -1
  630. package/assets/esri/core/workers/chunks/d7c8725ffb175cec5f8a.js +0 -1
  631. package/assets/esri/core/workers/chunks/d96fa373dcb621c2a869.js +0 -1
  632. package/assets/esri/core/workers/chunks/da233362b06b6db375f1.js +0 -1
  633. package/assets/esri/core/workers/chunks/da45d9576b8d66131623.js +0 -1
  634. package/assets/esri/core/workers/chunks/dbc8f15a6be835f4897d.js +0 -1
  635. package/assets/esri/core/workers/chunks/e00d0036974aaec7d876.js +0 -1
  636. package/assets/esri/core/workers/chunks/e0c75ae3a211a8da10f7.js +0 -1
  637. package/assets/esri/core/workers/chunks/e557043f90c051e93925.js +0 -1
  638. package/assets/esri/core/workers/chunks/e5cbed6f19c743915c8e.js +0 -1
  639. package/assets/esri/core/workers/chunks/e5ecd93bd32e99bc99d1.js +0 -1
  640. package/assets/esri/core/workers/chunks/e76662562e03eef52ba4.js +0 -1
  641. package/assets/esri/core/workers/chunks/eb8c4f194bb66a27d418.js +0 -1
  642. package/assets/esri/core/workers/chunks/ebd8c77df5df63bd3efe.js +0 -1
  643. package/assets/esri/core/workers/chunks/ed5e9718c4dcad1156f7.js +0 -1
  644. package/assets/esri/core/workers/chunks/f14347f5d63f5d102617.js +0 -1
  645. package/assets/esri/core/workers/chunks/f1d0208c6b09c1c4b248.js +0 -1
  646. package/assets/esri/core/workers/chunks/f3680b71d496839de72c.js +0 -1
  647. package/assets/esri/core/workers/chunks/f3c0280b6c87f2383a60.js +0 -1
  648. package/assets/esri/core/workers/chunks/f42c4dcb8f413ca1c6fd.js +0 -1
  649. package/assets/esri/core/workers/chunks/f5773321487ec248fa3b.js +0 -1
  650. package/assets/esri/core/workers/chunks/f76911f71540b058a881.js +0 -1
  651. package/assets/esri/core/workers/chunks/fa29b5064d6626cfc019.js +0 -1
  652. package/assets/esri/core/workers/chunks/fa882d0f4a9826533421.js +0 -1
  653. package/assets/esri/core/workers/chunks/fb2d43608006f588e3cb.js +0 -1
  654. package/assets/esri/core/workers/chunks/fc1aeea22f8c9d63864a.js +0 -1
  655. package/assets/esri/core/workers/chunks/fc3c03cfa3d6bf3b37dc.js +0 -1
  656. package/assets/esri/core/workers/chunks/ff07d351553deb70b889.js +0 -1
  657. package/assets/esri/core/workers/chunks/ffee66699f5d26569baf.js +0 -1
  658. package/chunks/OperatorDefinitions.js +0 -2
  659. package/chunks/areaOperator.js +0 -2
  660. package/chunks/bufferOperator.js +0 -2
  661. package/chunks/centroidOperator.js +0 -2
  662. package/chunks/clipOperator.js +0 -2
  663. package/chunks/containsOperator.js +0 -2
  664. package/chunks/convexHullOperator.js +0 -2
  665. package/chunks/crossesOperator.js +0 -2
  666. package/chunks/cutOperator.js +0 -2
  667. package/chunks/densifyOperator.js +0 -2
  668. package/chunks/differenceOperator.js +0 -2
  669. package/chunks/disjointOperator.js +0 -2
  670. package/chunks/distanceOperator.js +0 -2
  671. package/chunks/equalsOperator.js +0 -2
  672. package/chunks/generalizeOperator.js +0 -2
  673. package/chunks/geodesicBufferOperator.js +0 -2
  674. package/chunks/geodeticAreaOperator.js +0 -2
  675. package/chunks/geodeticDensifyOperator.js +0 -2
  676. package/chunks/geodeticDistanceOperator.js +0 -2
  677. package/chunks/geodeticLengthOperator.js +0 -2
  678. package/chunks/intersectionOperator.js +0 -2
  679. package/chunks/intersectsOperator.js +0 -2
  680. package/chunks/labelPointOperator.js +0 -2
  681. package/chunks/lengthOperator.js +0 -2
  682. package/chunks/multiPartToSinglePartOperator.js +0 -2
  683. package/chunks/offsetOperator.js +0 -2
  684. package/chunks/overlapsOperator.js +0 -2
  685. package/chunks/proximityOperator.js +0 -2
  686. package/chunks/relateOperator.js +0 -2
  687. package/chunks/simplifyOperator.js +0 -2
  688. package/chunks/symmetricDifferenceOperator.js +0 -2
  689. package/chunks/touchesOperator.js +0 -2
  690. package/chunks/unionOperator.js +0 -2
  691. package/chunks/withinOperator.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{IDENTITY as t,clone as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{getContinuousIndexArray as s}from"../../../../geometry/support/Indices.js";import{cloneAttributeData as n}from"./AttributeArray.js";import{BoundingInfo as o}from"./BoundingInfo.js";import{GeometryBaseInstance as r}from"./GeometryBaseInstance.js";import{computeAttachmentOriginTriangles as h,computeAttachmentOriginLines as a,computeAttachmentOriginPoints as u}from"./geometryDataUtils.js";import{Object3DHighlightStateID as g}from"./Object3DStateID.js";import{createPositionAttributeReader as l}from"./PositionReader.js";import{assert as d}from"./Util.js";import{webglDebugEnabled as c}from"../../../webgl/checkWebGLError.js";class m extends r{constructor(t,i,e=null,s=0,n=-1,o,r){super(i),this.material=t,this.mapPositions=e,this.type=s,this.edgeIndicesLength=n,this.baseGeometry=o,this.drawIndices=r,this._readPrimitivePosition=null,this._vertexPositionIndicesCache=void 0,this._transformation=void 0,this.localOrigin=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0,this._boundingInfo=null,d((t?.useIndexing??!1)===(null!=r),"Material index requirement and Geometry must match"),this.edgeIndicesLength<0&&(this.edgeIndicesLength=this.indexCount)}get readPrimitivePosition(){return this._readPrimitivePosition??=l(this.positionAttribute,this.drawIndices),this._readPrimitivePosition}_invalidateReadPrimitivePosition(){this._readPrimitivePosition=null}instantiate(t={}){const i=new m(t.material||this.material,[],this.mapPositions,this.type,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((t,e)=>{t.exclusive=!1,i._attributes.set(e,t)}),i._boundingInfo=this._boundingInfo,i.transformation=t.transformation||this.transformation,i}getMutableAttribute(t){let i=this._attributes.get(t);return i&&!i.exclusive&&(i={...i,exclusive:!0,data:n(i.data)},this._attributes.set(t,i),"position"===t&&this._invalidateReadPrimitivePosition()),i}setAttributeData(t,i){const e=this._attributes.get(t);e?(this._attributes.set(t,{...e,exclusive:!0,data:i}),"position"===t&&this._invalidateReadPrimitivePosition()):c()&&console.warn(`Setting undefined attribute ${t} data`)}get primitivePositionIndices(){return void 0!==this._vertexPositionIndicesCache||(this._vertexPositionIndicesCache=this._computePrimitivePositionIndices()),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){const{drawIndices:t}=this,i=this.positionAttribute;if(null!=t&&null!=i){const e=new Array;for(const s of t)e.push(i.indices[s]);return e}return i?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const t=this.drawIndices??this.positionAttribute?.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(t){return!!this._calculateAttachmentOrigin(t)&&(null!=this._transformation&&e(t,t,this._transformation),!0)}_calculateAttachmentOrigin(t){return 0===this.type?this._computeAttachmentOriginTriangles(t):2===this.type?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t)}_computeAttachmentOriginTriangles(t){return h(t,this.readPrimitivePosition,this.indexCount/3)}_computeAttachmentOriginLines(t){const{indexCount:i}=this;return a(t,this.readPrimitivePosition,i,_(this.material.parameters,i))}_computeAttachmentOriginPoints(t){return u(t,this.readPrimitivePosition,this.indexCount)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const t=this.positionAttribute,i=this.indexCount;if(!t||0===i)return null;const e=0===this.type?3:1;d(i%e===0,"Indexing error: "+i+" not divisible by "+e);const n=s(i/e);return new o(n,e,this.readPrimitivePosition)}get transformation(){return this._transformation??t}set transformation(e){this._transformation=e&&e!==t?i(e):null}get highlights(){return this._highlights||p}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(t){this._highlightOptionsCounts?.forEach((i,e)=>t(e))}allocateIdAndHighlight(t){const i=new g(t);return this.addHighlight(i)}addHighlight(t){this._ensureHighlights().add(t);const{highlightName:i}=t,e=(this._highlightOptionsCounts?.get(i)??0)+1;return this._ensureHighlightOptionsCounts().set(i,e),t}_ensureHighlights(){let t=this._highlights;return t||(t=new Set,this._highlights=t),t}_ensureHighlightOptionsCounts(){let t=this._highlightOptionsCounts;return t||(t=new Map,this._highlightOptionsCounts=t),t}removeHighlight(t){if(this._highlights?.delete(t)){const{highlightName:i}=t,e=this._highlightOptionsCounts?.get(i)??0;e<=1?this._highlightOptionsCounts?.delete(i):this._ensureHighlightOptionsCounts().set(i,e-1)}}}function _(t,i){return!(!("isClosed"in t)||!t.isClosed)&&i>2}const p=new Set;export{m as Geometry};
2
+ import{IDENTITY as t,clone as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{getContinuousIndexArray as s}from"../../../../geometry/support/Indices.js";import{cloneAttributeData as n}from"./AttributeArray.js";import{BoundingInfo as o}from"./BoundingInfo.js";import{GeometryBaseInstance as r}from"./GeometryBaseInstance.js";import{computeAttachmentOriginTriangles as h,computeAttachmentOriginLines as a,computeAttachmentOriginPoints as u}from"./geometryDataUtils.js";import{Object3DHighlightStateID as g}from"./Object3DStateID.js";import{createPositionAttributeReader as l}from"./PositionReader.js";import{assert as d}from"./Util.js";import{webglDebugEnabled as m}from"../../../webgl/checkWebGLError.js";class c extends r{constructor(t,i,e=null,s=-1,n,o){super(i),this.material=t,this.mapPositions=e,this.edgeIndicesLength=s,this.baseGeometry=n,this.drawIndices=o,this._readPrimitivePosition=null,this._vertexPositionIndicesCache=void 0,this._transformation=void 0,this.localOrigin=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0,this._boundingInfo=null,d((t?.useIndexing??!1)===(null!=o),"Material index requirement and Geometry must match"),this.edgeIndicesLength<0&&(this.edgeIndicesLength=this.indexCount)}get readPrimitivePosition(){return this._readPrimitivePosition??=l(this.positionAttribute,this.drawIndices),this._readPrimitivePosition}_invalidateReadPrimitivePosition(){this._readPrimitivePosition=null}instantiate(t={}){const i=new c(t.material||this.material,[],this.mapPositions,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((t,e)=>{t.exclusive=!1,i._attributes.set(e,t)}),i._boundingInfo=this._boundingInfo,i.transformation=t.transformation||this.transformation,i}getMutableAttribute(t){let i=this._attributes.get(t);return i&&!i.exclusive&&(i={...i,exclusive:!0,data:n(i.data)},this._attributes.set(t,i),"position"===t&&this._invalidateReadPrimitivePosition()),i}setAttributeData(t,i){const e=this._attributes.get(t);e?(this._attributes.set(t,{...e,exclusive:!0,data:i}),"position"===t&&this._invalidateReadPrimitivePosition()):m()&&console.warn(`Setting undefined attribute ${t} data`)}get primitivePositionIndices(){return void 0!==this._vertexPositionIndicesCache||(this._vertexPositionIndicesCache=this._computePrimitivePositionIndices()),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){const{drawIndices:t}=this,i=this.positionAttribute;if(null!=t&&null!=i){const e=new Array;for(const s of t)e.push(i.indices[s]);return e}return i?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const t=this.drawIndices??this.positionAttribute?.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(t){return!!this._calculateAttachmentOrigin(t)&&(null!=this._transformation&&e(t,t,this._transformation),!0)}_calculateAttachmentOrigin(t){return 0===this.material.geometryType?this._computeAttachmentOriginTriangles(t):2===this.material.geometryType?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t)}_computeAttachmentOriginTriangles(t){return h(t,this.readPrimitivePosition,this.indexCount/3)}_computeAttachmentOriginLines(t){const{indexCount:i}=this;return a(t,this.readPrimitivePosition,i,_(this.material.parameters,i))}_computeAttachmentOriginPoints(t){return u(t,this.readPrimitivePosition,this.indexCount)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const t=this.positionAttribute,i=this.indexCount;if(!t||0===i)return null;const e=0===this.material.geometryType?3:1;d(i%e===0,"Indexing error: "+i+" not divisible by "+e);const n=s(i/e);return new o(n,e,this.readPrimitivePosition)}get transformation(){return this._transformation??t}set transformation(e){this._transformation=e&&e!==t?i(e):null}get highlights(){return this._highlights||p}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(t){this._highlightOptionsCounts?.forEach((i,e)=>t(e))}allocateIdAndHighlight(t){const i=new g(t);return this.addHighlight(i)}addHighlight(t){this._ensureHighlights().add(t);const{highlightName:i}=t,e=(this._highlightOptionsCounts?.get(i)??0)+1;return this._ensureHighlightOptionsCounts().set(i,e),t}_ensureHighlights(){let t=this._highlights;return t||(t=new Set,this._highlights=t),t}_ensureHighlightOptionsCounts(){let t=this._highlightOptionsCounts;return t||(t=new Map,this._highlightOptionsCounts=t),t}removeHighlight(t){if(this._highlights?.delete(t)){const{highlightName:i}=t,e=this._highlightOptionsCounts?.get(i)??0;e<=1?this._highlightOptionsCounts?.delete(i):this._ensureHighlightOptionsCounts().set(i,e-1)}}}function _(t,i){return!(!("isClosed"in t)||!t.isClosed)&&i>2}const p=new Set;export{c as Geometry};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{set as t,transformMat4 as n,normalize as o,scale as e,add as s,dot as r,cross as l,subtract as h,copy as u}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{clone as i,fromValues as a,create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f32.js";import{clone as p,create as f,fromValues as w}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newDoubleArray as g}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as m,floatArrayFrom as M}from"../../../../geometry/support/FloatArray.js";import{getContinuousIndexArray as y,getZeroIndexArray as A}from"../../../../geometry/support/Indices.js";import{create as b,fromPositionAndNormal as j,intersectRay as d}from"../../../../geometry/support/plane.js";import{wrap as v}from"../../../../geometry/support/ray.js";import{addOlidAttribute as I}from"../../layers/graphics/olidUtils.js";import{timeStampsToAttribute as P,numTimeStampValuesPerVertex as x}from"../../support/engineContent/line.js";import{Attribute as D}from"./Attribute.js";import{scale as z,length as S,normalize as U,add as q}from"./bufferVectorMath.js";import{Geometry as C}from"./Geometry.js";import{assert as F}from"./Util.js";import{getHUDMaterialBaseInstance as O}from"../materials/HUDMaterialBaseInstance.js";const V=[[-.5,-.5,.5],[.5,-.5,.5],[.5,.5,.5],[-.5,.5,.5],[-.5,-.5,-.5],[.5,-.5,-.5],[.5,.5,-.5],[-.5,.5,-.5]],B=[0,0,1,-1,0,0,1,0,0,0,-1,0,0,1,0,0,0,-1],G=[0,0,1,0,1,1,0,1],H=[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],k=new Array(36);for(let xt=0;xt<6;xt++)for(let t=0;t<6;t++)k[6*xt+t]=xt;const E=new Array(36);for(let xt=0;xt<6;xt++)E[6*xt]=0,E[6*xt+1]=1,E[6*xt+2]=2,E[6*xt+3]=2,E[6*xt+4]=3,E[6*xt+5]=0;function J(t,n){Array.isArray(n)||(n=[n,n,n]);const o=new Array(24);for(let e=0;e<8;e++)o[3*e]=V[e][0]*n[0],o[3*e+1]=V[e][1]*n[1],o[3*e+2]=V[e][2]*n[2];return new C(t,[["position",new D(o,H,3,!0)],["normal",new D(B,k,3)],["uv0",new D(G,E,2)]])}const K=[[-.5,0,-.5],[.5,0,-.5],[.5,0,.5],[-.5,0,.5],[0,-.5,0],[0,.5,0]],L=[0,1,-1,1,1,0,0,1,1,-1,1,0,0,-1,-1,1,-1,0,0,-1,1,-1,-1,0],N=[5,1,0,5,2,1,5,3,2,5,0,3,4,0,1,4,1,2,4,2,3,4,3,0],Q=[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 R(t,n){Array.isArray(n)||(n=[n,n,n]);const o=new Array(18);for(let e=0;e<6;e++)o[3*e]=K[e][0]*n[0],o[3*e+1]=K[e][1]*n[1],o[3*e+2]=K[e][2]*n[2];return new C(t,[["position",new D(o,N,3,!0)],["normal",new D(L,Q,3)]])}const T=a(-.5,0,-.5),W=a(.5,0,-.5),X=a(0,0,.5),Y=a(0,.5,0),Z=c(),$=c(),_=c(),tt=c(),nt=c();h(Z,T,Y),h($,T,W),l(_,Z,$),o(_,_),h(Z,W,Y),h($,W,X),l(tt,Z,$),o(tt,tt),h(Z,X,Y),h($,X,T),l(nt,Z,$),o(nt,nt);const ot=[T,W,X,Y],et=[0,-1,0,_[0],_[1],_[2],tt[0],tt[1],tt[2],nt[0],nt[1],nt[2]],st=[0,1,2,3,1,0,3,2,1,3,0,2],rt=[0,0,0,1,1,1,2,2,2,3,3,3];function lt(t,n){Array.isArray(n)||(n=[n,n,n]);const o=new Array(12);for(let e=0;e<4;e++)o[3*e]=ot[e][0]*n[0],o[3*e+1]=ot[e][1]*n[1],o[3*e+2]=ot[e][2]*n[2];return new C(t,[["position",new D(o,st,3,!0)],["normal",new D(et,rt,3)]])}function ht(t,n,o,e,s={uv:!0}){const r=-Math.PI,l=2*Math.PI,h=-Math.PI/2,u=Math.PI,i=Math.max(3,Math.floor(o)),a=Math.max(2,Math.floor(e)),c=(i+1)*(a+1),p=m(3*c),f=m(3*c),w=m(2*c),g=[];let M=0;for(let m=0;m<=a;m++){const t=[],o=m/a,e=h+o*u,s=Math.cos(e);for(let h=0;h<=i;h++){const u=h/i,a=r+u*l,c=Math.cos(a)*s,g=Math.sin(e),m=-Math.sin(a)*s;p[3*M]=c*n,p[3*M+1]=g*n,p[3*M+2]=m*n,f[3*M]=c,f[3*M+1]=g,f[3*M+2]=m,w[2*M]=u,w[2*M+1]=o,t.push(M),++M}g.push(t)}const y=new Array;for(let m=0;m<a;m++)for(let t=0;t<i;t++){const n=g[m][t],o=g[m][t+1],e=g[m+1][t+1],s=g[m+1][t];0===m?(y.push(n),y.push(e),y.push(s)):m===a-1?(y.push(n),y.push(o),y.push(e)):(y.push(n),y.push(o),y.push(e),y.push(e),y.push(s),y.push(n))}const b=[["position",new D(p,y,3,!0)],["normal",new D(f,y,3,!0)]];return s.uv&&b.push(["uv0",new D(w,y,2,!0)]),s.offset&&(b[0][0]="offset",b.push(["position",new D(Float64Array.from(s.offset),A(y.length),3,!0)])),new C(t,b)}function ut(t,n,o,e){const s=it(n,o,e);return new C(t,s)}function it(t,n,o){const e=t;let s,r;if(o)s=[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=e*(1+Math.sqrt(5))/2;s=[-e,t,0,e,t,0,-e,-t,0,e,-t,0,0,-e,t,0,e,t,0,-e,-t,0,e,-t,t,0,-e,t,0,e,-t,0,-e,-t,0,e],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 i=0;i<s.length;i+=3)z(s,i,t/S(s,i));let l={};function h(n,o){n>o&&([n,o]=[o,n]);const e=n.toString()+"."+o.toString();if(l[e])return l[e];let r=s.length;return s.length+=3,q(s,3*n,s,3*o,s,r),z(s,r,t/S(s,r)),r/=3,l[e]=r,r}for(let i=0;i<n;i++){const t=r.length,n=new Array(4*t);for(let o=0;o<t;o+=3){const t=r[o],e=r[o+1],s=r[o+2],l=h(t,e),u=h(e,s),i=h(s,t),a=4*o;n[a]=t,n[a+1]=l,n[a+2]=i,n[a+3]=e,n[a+4]=u,n[a+5]=l,n[a+6]=s,n[a+7]=i,n[a+8]=u,n[a+9]=l,n[a+10]=u,n[a+11]=i}r=n,l={}}const u=M(s);for(let i=0;i<u.length;i+=3)U(u,i);return[["position",new D(M(s),r,3,!0)],["normal",new D(u,r,3,!0)]]}function at(t,{normal:n,position:o,color:e,rotation:s,size:r,centerOffset:l,groundDistance:h,uvi:u,featureAttribute:i,olidColor:a=null}={}){const c=o?p(o):f(),g=n?p(n):w(0,0,1),m=null!=h?[h]:[1],M=A(1),y=[["position",new D(c,M,3,!0)],["normal",new D(g,M,3,!0)]],b=null!=r&&2===r.length?r:null;if(b&&y.push(["size",new D(b,M,2)]),null!=s&&y.push(["rotation",new D([s],M,1,!0)]),e){const t=[e[0],e[1],e[2],e.length>3?e[3]:255];y.push(["color",new D(t,M,4,!0)])}if(u&&y.push(["uvi",new D(u,M,u.length)]),l&&y.push(["centerOffset",new D(l,M,3)]),y.push(["groundDistance",new D(m,M,1)]),i){const t=[i[0],i[1],i[2],i[3]];y.push(["featureAttribute",new D(t,M,4)])}return null!=a&&I(y,a,M),new C(t,y,null,1,void 0,O())}const ct=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0]];function pt(t,n=ct){const o=new Array(12);for(let i=0;i<4;i++)for(let t=0;t<3;t++)o[3*i+t]=n[i][t];const e=[0,1,2,2,3,0],s=[0,0,1],r=[0,0,0,0,0,0],l=[0,0,1,0,1,1,0,1],h=[255,255,255,255],u=[["position",new D(o,e,3,!0)],["normal",new D(s,r,3,!0)],["uv0",new D(l,e,2,!0)],["color",new D(h,r,4,!0)]];return new C(t,u)}function ft(t,n,o,e,s=!0,r=!0){let l=0;const h=n,u=t;let i=a(0,l,0),c=a(0,l+u,0),p=a(0,-1,0),f=a(0,1,0);e&&(l=u,c=a(0,0,0),i=a(0,l,0),p=a(0,1,0),f=a(0,-1,0));const w=[c,i],g=[p,f],M=o+2,y=Math.sqrt(u*u+h*h);if(e)for(let m=o-1;m>=0;m--){const t=m*(2*Math.PI/o),n=a(Math.cos(t)*h,l,Math.sin(t)*h);w.push(n);const e=a(u*Math.cos(t)/y,-h/y,u*Math.sin(t)/y);g.push(e)}else for(let m=0;m<o;m++){const t=m*(2*Math.PI/o),n=a(Math.cos(t)*h,l,Math.sin(t)*h);w.push(n);const e=a(u*Math.cos(t)/y,h/y,u*Math.sin(t)/y);g.push(e)}const A=new Array,b=new Array;if(s){for(let t=3;t<w.length;t++)A.push(1),A.push(t-1),A.push(t),b.push(0),b.push(0),b.push(0);A.push(w.length-1),A.push(2),A.push(1),b.push(0),b.push(0),b.push(0)}if(r){for(let t=3;t<w.length;t++)A.push(t),A.push(t-1),A.push(0),b.push(t),b.push(t-1),b.push(1);A.push(0),A.push(2),A.push(w.length-1),b.push(1),b.push(2),b.push(g.length-1)}const j=m(3*M);for(let a=0;a<M;a++)j[3*a]=w[a][0],j[3*a+1]=w[a][1],j[3*a+2]=w[a][2];const d=m(3*M);for(let a=0;a<M;a++)d[3*a]=g[a][0],d[3*a+1]=g[a][1],d[3*a+2]=g[a][2];return[["position",new D(j,A,3,!0)],["normal",new D(d,b,3,!0)]]}function wt(t,n,o,e,s,r=!0,l=!0){return new C(t,ft(n,o,e,s,r,l))}function gt(n,h,u,p,f,w,g){const M=f?i(f):a(1,0,0),y=w?i(w):a(0,0,0);g??=!0;const A=c();o(A,M);const b=c();e(b,A,Math.abs(h));const j=c();e(j,b,-.5),s(j,j,y);const d=a(0,1,0);Math.abs(1-r(A,d))<.2&&t(d,0,0,1);const v=c();l(v,A,d),o(v,v),l(d,v,A);const I=2*p+(g?2:0),P=p+(g?2:0),x=m(3*I),z=m(3*P),S=m(2*I),U=new Array(3*p*(g?4:2)),q=new Array(3*p*(g?4:2));g&&(x[3*(I-2)]=j[0],x[3*(I-2)+1]=j[1],x[3*(I-2)+2]=j[2],S[2*(I-2)]=0,S[2*(I-2)+1]=0,x[3*(I-1)]=x[3*(I-2)]+b[0],x[3*(I-1)+1]=x[3*(I-2)+1]+b[1],x[3*(I-1)+2]=x[3*(I-2)+2]+b[2],S[2*(I-1)]=1,S[2*(I-1)+1]=1,z[3*(P-2)]=-A[0],z[3*(P-2)+1]=-A[1],z[3*(P-2)+2]=-A[2],z[3*(P-1)]=A[0],z[3*(P-1)+1]=A[1],z[3*(P-1)+2]=A[2]);const F=(t,n,o)=>{U[t]=n,q[t]=o};let O=0;const V=c(),B=c();for(let t=0;t<p;t++){const n=t*(2*Math.PI/p);e(V,d,Math.sin(n)),e(B,v,Math.cos(n)),s(V,V,B),z[3*t]=V[0],z[3*t+1]=V[1],z[3*t+2]=V[2],e(V,V,u),s(V,V,j),x[3*t]=V[0],x[3*t+1]=V[1],x[3*t+2]=V[2],S[2*t]=t/p,S[2*t+1]=0,x[3*(t+p)]=x[3*t]+b[0],x[3*(t+p)+1]=x[3*t+1]+b[1],x[3*(t+p)+2]=x[3*t+2]+b[2],S[2*(t+p)]=t/p,S[2*t+1]=1;const o=(t+1)%p;F(O++,t,t),F(O++,t+p,t),F(O++,o,o),F(O++,o,o),F(O++,t+p,t),F(O++,o+p,o)}if(g){for(let t=0;t<p;t++){const n=(t+1)%p;F(O++,I-2,P-2),F(O++,t,P-2),F(O++,n,P-2)}for(let t=0;t<p;t++){const n=(t+1)%p;F(O++,t+p,P-1),F(O++,I-1,P-1),F(O++,n+p,P-1)}}const G=[["position",new D(x,U,3,!0)],["normal",new D(z,q,3,!0)],["uv0",new D(S,U,2,!0)]];return new C(n,G)}function mt(t,n,o,e,s,r){e=e||10,s=null==s||s,F(n.length>1);const l=[[0,0,0]],h=[],u=[];for(let i=0;i<e;i++){h.push([0,-i-1,-(i+1)%e-1]);const t=i/e*2*Math.PI;u.push([Math.cos(t)*o,Math.sin(t)*o])}return Mt(t,u,n,l,h,s,r)}function Mt(n,r,i,c,p,w,g=a(0,0,0)){const M=r.length,y=m(i.length*M*3+(6*c.length||0)),A=m(i.length*M*3+(c?6:0)),I=new Array,P=new Array;let x=0,z=0;const S=f(),U=f(),q=f(),F=f(),O=f(),V=f(),B=f(),G=f(),H=f(),k=f(),E=f(),J=f(),K=f(),L=b();t(H,0,1,0),h(U,i[1],i[0]),o(U,U),w?(s(G,i[0],g),o(q,G)):t(q,0,0,1),vt(U,q,H,H,O,q,It),u(F,q),u(J,O);for(let t=0;t<c.length;t++)e(V,O,c[t][0]),e(G,q,c[t][2]),s(V,V,G),s(V,V,i[0]),y[x++]=V[0],y[x++]=V[1],y[x++]=V[2];A[z++]=-U[0],A[z++]=-U[1],A[z++]=-U[2];for(let t=0;t<p.length;t++)I.push(p[t][0]>0?p[t][0]:-p[t][0]-1+c.length),I.push(p[t][1]>0?p[t][1]:-p[t][1]-1+c.length),I.push(p[t][2]>0?p[t][2]:-p[t][2]-1+c.length),P.push(0),P.push(0),P.push(0);let N=c.length;const Q=c.length-1;for(let t=0;t<i.length;t++){let n=!1;if(t>0){u(S,U),t<i.length-1?(h(U,i[t+1],i[t]),o(U,U)):n=!0,s(k,S,U),o(k,k),s(E,i[t-1],F),j(i[t],k,L);d(L,v(E,S),G)?(h(G,G,i[t]),o(q,G),l(O,k,q),o(O,O)):vt(k,F,J,H,O,q,It),u(F,q),u(J,O)}w&&(s(G,i[t],g),o(K,G));for(let l=0;l<M;l++)if(e(V,O,r[l][0]),e(G,q,r[l][1]),s(V,V,G),o(B,V),A[z++]=B[0],A[z++]=B[1],A[z++]=B[2],s(V,V,i[t]),y[x++]=V[0],y[x++]=V[1],y[x++]=V[2],!n){const t=(l+1)%M;I.push(N+l),I.push(N+M+l),I.push(N+t),I.push(N+t),I.push(N+M+l),I.push(N+M+t);for(let n=0;n<6;n++){const t=I.length-6;P.push(I[t+n]-Q)}}N+=M}const R=i[i.length-1];for(let t=0;t<c.length;t++)e(V,O,c[t][0]),e(G,q,c[t][1]),s(V,V,G),s(V,V,R),y[x++]=V[0],y[x++]=V[1],y[x++]=V[2];const T=z/3;A[z++]=U[0],A[z++]=U[1],A[z++]=U[2];const W=N-M;for(let t=0;t<p.length;t++)I.push(p[t][0]>=0?N+p[t][0]:-p[t][0]-1+W),I.push(p[t][2]>=0?N+p[t][2]:-p[t][2]-1+W),I.push(p[t][1]>=0?N+p[t][1]:-p[t][1]-1+W),P.push(T),P.push(T),P.push(T);const X=[["position",new D(y,I,3,!0)],["normal",new D(A,P,3,!0)]];return new C(n,X)}function yt(t,n,o,e,s){const r=g(3*n.length),l=new Array(2*(n.length-1));let h=0,u=0;for(let a=0;a<n.length;a++){for(let t=0;t<3;t++)r[h++]=n[a][t];a>0&&(l[u++]=a-1,l[u++]=a)}const i=[["position",new D(r,l,3,!0)]];if(o?.length===n.length&&3===o[0].length){const t=m(3*o.length);let e=0;for(let s=0;s<n.length;s++)for(let n=0;n<3;n++)t[e++]=o[s][n];i.push(["normal",new D(t,l,3,!0)])}if(e&&i.push(["color",new D(e,y(e.length/4),4)]),s?.length===n.length){const t=P(s,1);i.push(["timeStamps",new D(t,l,x,!0)])}return new C(t,i,null,2)}function At(t,n,o,e,s,r=0){const l=new Array(18),h=[[-o,r,s/2],[e,r,s/2],[0,n+r,s/2],[-o,r,-s/2],[e,r,-s/2],[0,n+r,-s/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 i=0;i<6;i++)l[3*i]=h[i][0],l[3*i+1]=h[i][1],l[3*i+2]=h[i][2];return new C(t,[["position",new D(l,u,3,!0)]])}function bt(o,e){const s=o.getMutableAttribute("position").data;for(let r=0;r<s.length;r+=3){const o=s[r],l=s[r+1],h=s[r+2];t(Pt,o,l,h),n(Pt,Pt,e),s[r]=Pt[0],s[r+1]=Pt[1],s[r+2]=Pt[2]}}function jt(t,n=t){const o=t.attributes,e=o.get("position").data,s=o.get("normal").data;if(s){const t=n.getMutableAttribute("normal").data;for(let n=0;n<s.length;n+=3){const o=s[n+1];t[n+1]=-s[n+2],t[n+2]=o}}if(e){const t=n.getMutableAttribute("position").data;for(let n=0;n<e.length;n+=3){const o=e[n+1];t[n+1]=-e[n+2],t[n+2]=o}}}function dt(t,n,e,s,h){return!(Math.abs(r(n,t))>h)&&(l(e,t,n),o(e,e),l(s,e,t),o(s,s),!0)}function vt(t,n,o,e,s,r,l){return dt(t,n,s,r,l)||dt(t,o,s,r,l)||dt(t,e,s,r,l)}const It=.99619469809,Pt=f();export{jt as cgToGIS,J as createBoxGeometry,wt as createConeGeometry,ft as createConeGeometryData,gt as createCylinderGeometry,R as createDiamondGeometry,At as createExtrudedTriangle,Mt as createPathExtrusionGeometry,at as createPointGeometry,it as createPolySphereData,ut as createPolySphereGeometry,yt as createPolylineGeometry,ht as createSphereGeometry,pt as createSquareGeometry,lt as createTetrahedronGeometry,mt as createTubeGeometry,vt as makeOrthoBasisDirUpFallback,bt as transformInPlace};
2
+ import{set as t,transformMat4 as n,normalize as o,scale as e,add as s,dot as r,cross as l,subtract as h,copy as u}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{clone as i,fromValues as a,create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f32.js";import{clone as p,create as f,fromValues as w}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newDoubleArray as g}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as m,floatArrayFrom as M}from"../../../../geometry/support/FloatArray.js";import{getContinuousIndexArray as y,getZeroIndexArray as A}from"../../../../geometry/support/Indices.js";import{create as b,fromPositionAndNormal as j,intersectRay as d}from"../../../../geometry/support/plane.js";import{wrap as v}from"../../../../geometry/support/ray.js";import{addOlidAttribute as I}from"../../layers/graphics/olidUtils.js";import{timeStampsToAttribute as P,numTimeStampValuesPerVertex as x}from"../../support/engineContent/line.js";import{Attribute as D}from"./Attribute.js";import{scale as z,length as S,normalize as U,add as q}from"./bufferVectorMath.js";import{Geometry as C}from"./Geometry.js";import{assert as F}from"./Util.js";import{getHUDMaterialBaseInstance as O}from"../materials/HUDMaterialBaseInstance.js";const V=[[-.5,-.5,.5],[.5,-.5,.5],[.5,.5,.5],[-.5,.5,.5],[-.5,-.5,-.5],[.5,-.5,-.5],[.5,.5,-.5],[-.5,.5,-.5]],B=[0,0,1,-1,0,0,1,0,0,0,-1,0,0,1,0,0,0,-1],G=[0,0,1,0,1,1,0,1],H=[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],k=new Array(36);for(let xt=0;xt<6;xt++)for(let t=0;t<6;t++)k[6*xt+t]=xt;const E=new Array(36);for(let xt=0;xt<6;xt++)E[6*xt]=0,E[6*xt+1]=1,E[6*xt+2]=2,E[6*xt+3]=2,E[6*xt+4]=3,E[6*xt+5]=0;function J(t,n){Array.isArray(n)||(n=[n,n,n]);const o=new Array(24);for(let e=0;e<8;e++)o[3*e]=V[e][0]*n[0],o[3*e+1]=V[e][1]*n[1],o[3*e+2]=V[e][2]*n[2];return new C(t,[["position",new D(o,H,3,!0)],["normal",new D(B,k,3)],["uv0",new D(G,E,2)]])}const K=[[-.5,0,-.5],[.5,0,-.5],[.5,0,.5],[-.5,0,.5],[0,-.5,0],[0,.5,0]],L=[0,1,-1,1,1,0,0,1,1,-1,1,0,0,-1,-1,1,-1,0,0,-1,1,-1,-1,0],N=[5,1,0,5,2,1,5,3,2,5,0,3,4,0,1,4,1,2,4,2,3,4,3,0],Q=[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 R(t,n){Array.isArray(n)||(n=[n,n,n]);const o=new Array(18);for(let e=0;e<6;e++)o[3*e]=K[e][0]*n[0],o[3*e+1]=K[e][1]*n[1],o[3*e+2]=K[e][2]*n[2];return new C(t,[["position",new D(o,N,3,!0)],["normal",new D(L,Q,3)]])}const T=a(-.5,0,-.5),W=a(.5,0,-.5),X=a(0,0,.5),Y=a(0,.5,0),Z=c(),$=c(),_=c(),tt=c(),nt=c();h(Z,T,Y),h($,T,W),l(_,Z,$),o(_,_),h(Z,W,Y),h($,W,X),l(tt,Z,$),o(tt,tt),h(Z,X,Y),h($,X,T),l(nt,Z,$),o(nt,nt);const ot=[T,W,X,Y],et=[0,-1,0,_[0],_[1],_[2],tt[0],tt[1],tt[2],nt[0],nt[1],nt[2]],st=[0,1,2,3,1,0,3,2,1,3,0,2],rt=[0,0,0,1,1,1,2,2,2,3,3,3];function lt(t,n){Array.isArray(n)||(n=[n,n,n]);const o=new Array(12);for(let e=0;e<4;e++)o[3*e]=ot[e][0]*n[0],o[3*e+1]=ot[e][1]*n[1],o[3*e+2]=ot[e][2]*n[2];return new C(t,[["position",new D(o,st,3,!0)],["normal",new D(et,rt,3)]])}function ht(t,n,o,e,s={uv:!0}){const r=-Math.PI,l=2*Math.PI,h=-Math.PI/2,u=Math.PI,i=Math.max(3,Math.floor(o)),a=Math.max(2,Math.floor(e)),c=(i+1)*(a+1),p=m(3*c),f=m(3*c),w=m(2*c),g=[];let M=0;for(let m=0;m<=a;m++){const t=[],o=m/a,e=h+o*u,s=Math.cos(e);for(let h=0;h<=i;h++){const u=h/i,a=r+u*l,c=Math.cos(a)*s,g=Math.sin(e),m=-Math.sin(a)*s;p[3*M]=c*n,p[3*M+1]=g*n,p[3*M+2]=m*n,f[3*M]=c,f[3*M+1]=g,f[3*M+2]=m,w[2*M]=u,w[2*M+1]=o,t.push(M),++M}g.push(t)}const y=new Array;for(let m=0;m<a;m++)for(let t=0;t<i;t++){const n=g[m][t],o=g[m][t+1],e=g[m+1][t+1],s=g[m+1][t];0===m?(y.push(n),y.push(e),y.push(s)):m===a-1?(y.push(n),y.push(o),y.push(e)):(y.push(n),y.push(o),y.push(e),y.push(e),y.push(s),y.push(n))}const b=[["position",new D(p,y,3,!0)],["normal",new D(f,y,3,!0)]];return s.uv&&b.push(["uv0",new D(w,y,2,!0)]),s.offset&&(b[0][0]="offset",b.push(["position",new D(Float64Array.from(s.offset),A(y.length),3,!0)])),new C(t,b)}function ut(t,n,o,e){const s=it(n,o,e);return new C(t,s)}function it(t,n,o){const e=t;let s,r;if(o)s=[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=e*(1+Math.sqrt(5))/2;s=[-e,t,0,e,t,0,-e,-t,0,e,-t,0,0,-e,t,0,e,t,0,-e,-t,0,e,-t,t,0,-e,t,0,e,-t,0,-e,-t,0,e],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 i=0;i<s.length;i+=3)z(s,i,t/S(s,i));let l={};function h(n,o){n>o&&([n,o]=[o,n]);const e=n.toString()+"."+o.toString();if(l[e])return l[e];let r=s.length;return s.length+=3,q(s,3*n,s,3*o,s,r),z(s,r,t/S(s,r)),r/=3,l[e]=r,r}for(let i=0;i<n;i++){const t=r.length,n=new Array(4*t);for(let o=0;o<t;o+=3){const t=r[o],e=r[o+1],s=r[o+2],l=h(t,e),u=h(e,s),i=h(s,t),a=4*o;n[a]=t,n[a+1]=l,n[a+2]=i,n[a+3]=e,n[a+4]=u,n[a+5]=l,n[a+6]=s,n[a+7]=i,n[a+8]=u,n[a+9]=l,n[a+10]=u,n[a+11]=i}r=n,l={}}const u=M(s);for(let i=0;i<u.length;i+=3)U(u,i);return[["position",new D(M(s),r,3,!0)],["normal",new D(u,r,3,!0)]]}function at(t,{normal:n,position:o,color:e,rotation:s,size:r,centerOffset:l,groundDistance:h,uvi:u,featureAttribute:i,olidColor:a=null}={}){const c=o?p(o):f(),g=n?p(n):w(0,0,1),m=null!=h?[h]:[1],M=A(1),y=[["position",new D(c,M,3,!0)],["normal",new D(g,M,3,!0)]],b=null!=r&&2===r.length?r:null;if(b&&y.push(["size",new D(b,M,2)]),null!=s&&y.push(["rotation",new D([s],M,1,!0)]),e){const t=[e[0],e[1],e[2],e.length>3?e[3]:255];y.push(["color",new D(t,M,4,!0)])}if(u&&y.push(["uvi",new D(u,M,u.length)]),l&&y.push(["centerOffset",new D(l,M,3)]),y.push(["groundDistance",new D(m,M,1)]),i){const t=[i[0],i[1],i[2],i[3]];y.push(["featureAttribute",new D(t,M,4)])}return null!=a&&I(y,a,M),new C(t,y,null,void 0,O())}const ct=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0]];function pt(t,n=ct){const o=new Array(12);for(let i=0;i<4;i++)for(let t=0;t<3;t++)o[3*i+t]=n[i][t];const e=[0,1,2,2,3,0],s=[0,0,1],r=[0,0,0,0,0,0],l=[0,0,1,0,1,1,0,1],h=[255,255,255,255],u=[["position",new D(o,e,3,!0)],["normal",new D(s,r,3,!0)],["uv0",new D(l,e,2,!0)],["color",new D(h,r,4,!0)]];return new C(t,u)}function ft(t,n,o,e,s=!0,r=!0){let l=0;const h=n,u=t;let i=a(0,l,0),c=a(0,l+u,0),p=a(0,-1,0),f=a(0,1,0);e&&(l=u,c=a(0,0,0),i=a(0,l,0),p=a(0,1,0),f=a(0,-1,0));const w=[c,i],g=[p,f],M=o+2,y=Math.sqrt(u*u+h*h);if(e)for(let m=o-1;m>=0;m--){const t=m*(2*Math.PI/o),n=a(Math.cos(t)*h,l,Math.sin(t)*h);w.push(n);const e=a(u*Math.cos(t)/y,-h/y,u*Math.sin(t)/y);g.push(e)}else for(let m=0;m<o;m++){const t=m*(2*Math.PI/o),n=a(Math.cos(t)*h,l,Math.sin(t)*h);w.push(n);const e=a(u*Math.cos(t)/y,h/y,u*Math.sin(t)/y);g.push(e)}const A=new Array,b=new Array;if(s){for(let t=3;t<w.length;t++)A.push(1),A.push(t-1),A.push(t),b.push(0),b.push(0),b.push(0);A.push(w.length-1),A.push(2),A.push(1),b.push(0),b.push(0),b.push(0)}if(r){for(let t=3;t<w.length;t++)A.push(t),A.push(t-1),A.push(0),b.push(t),b.push(t-1),b.push(1);A.push(0),A.push(2),A.push(w.length-1),b.push(1),b.push(2),b.push(g.length-1)}const j=m(3*M);for(let a=0;a<M;a++)j[3*a]=w[a][0],j[3*a+1]=w[a][1],j[3*a+2]=w[a][2];const d=m(3*M);for(let a=0;a<M;a++)d[3*a]=g[a][0],d[3*a+1]=g[a][1],d[3*a+2]=g[a][2];return[["position",new D(j,A,3,!0)],["normal",new D(d,b,3,!0)]]}function wt(t,n,o,e,s,r=!0,l=!0){return new C(t,ft(n,o,e,s,r,l))}function gt(n,h,u,p,f,w,g){const M=f?i(f):a(1,0,0),y=w?i(w):a(0,0,0);g??=!0;const A=c();o(A,M);const b=c();e(b,A,Math.abs(h));const j=c();e(j,b,-.5),s(j,j,y);const d=a(0,1,0);Math.abs(1-r(A,d))<.2&&t(d,0,0,1);const v=c();l(v,A,d),o(v,v),l(d,v,A);const I=2*p+(g?2:0),P=p+(g?2:0),x=m(3*I),z=m(3*P),S=m(2*I),U=new Array(3*p*(g?4:2)),q=new Array(3*p*(g?4:2));g&&(x[3*(I-2)]=j[0],x[3*(I-2)+1]=j[1],x[3*(I-2)+2]=j[2],S[2*(I-2)]=0,S[2*(I-2)+1]=0,x[3*(I-1)]=x[3*(I-2)]+b[0],x[3*(I-1)+1]=x[3*(I-2)+1]+b[1],x[3*(I-1)+2]=x[3*(I-2)+2]+b[2],S[2*(I-1)]=1,S[2*(I-1)+1]=1,z[3*(P-2)]=-A[0],z[3*(P-2)+1]=-A[1],z[3*(P-2)+2]=-A[2],z[3*(P-1)]=A[0],z[3*(P-1)+1]=A[1],z[3*(P-1)+2]=A[2]);const F=(t,n,o)=>{U[t]=n,q[t]=o};let O=0;const V=c(),B=c();for(let t=0;t<p;t++){const n=t*(2*Math.PI/p);e(V,d,Math.sin(n)),e(B,v,Math.cos(n)),s(V,V,B),z[3*t]=V[0],z[3*t+1]=V[1],z[3*t+2]=V[2],e(V,V,u),s(V,V,j),x[3*t]=V[0],x[3*t+1]=V[1],x[3*t+2]=V[2],S[2*t]=t/p,S[2*t+1]=0,x[3*(t+p)]=x[3*t]+b[0],x[3*(t+p)+1]=x[3*t+1]+b[1],x[3*(t+p)+2]=x[3*t+2]+b[2],S[2*(t+p)]=t/p,S[2*t+1]=1;const o=(t+1)%p;F(O++,t,t),F(O++,t+p,t),F(O++,o,o),F(O++,o,o),F(O++,t+p,t),F(O++,o+p,o)}if(g){for(let t=0;t<p;t++){const n=(t+1)%p;F(O++,I-2,P-2),F(O++,t,P-2),F(O++,n,P-2)}for(let t=0;t<p;t++){const n=(t+1)%p;F(O++,t+p,P-1),F(O++,I-1,P-1),F(O++,n+p,P-1)}}const G=[["position",new D(x,U,3,!0)],["normal",new D(z,q,3,!0)],["uv0",new D(S,U,2,!0)]];return new C(n,G)}function mt(t,n,o,e,s,r){e=e||10,s=null==s||s,F(n.length>1);const l=[[0,0,0]],h=[],u=[];for(let i=0;i<e;i++){h.push([0,-i-1,-(i+1)%e-1]);const t=i/e*2*Math.PI;u.push([Math.cos(t)*o,Math.sin(t)*o])}return Mt(t,u,n,l,h,s,r)}function Mt(n,r,i,c,p,w,g=a(0,0,0)){const M=r.length,y=m(i.length*M*3+(6*c.length||0)),A=m(i.length*M*3+(c?6:0)),I=new Array,P=new Array;let x=0,z=0;const S=f(),U=f(),q=f(),F=f(),O=f(),V=f(),B=f(),G=f(),H=f(),k=f(),E=f(),J=f(),K=f(),L=b();t(H,0,1,0),h(U,i[1],i[0]),o(U,U),w?(s(G,i[0],g),o(q,G)):t(q,0,0,1),vt(U,q,H,H,O,q,It),u(F,q),u(J,O);for(let t=0;t<c.length;t++)e(V,O,c[t][0]),e(G,q,c[t][2]),s(V,V,G),s(V,V,i[0]),y[x++]=V[0],y[x++]=V[1],y[x++]=V[2];A[z++]=-U[0],A[z++]=-U[1],A[z++]=-U[2];for(let t=0;t<p.length;t++)I.push(p[t][0]>0?p[t][0]:-p[t][0]-1+c.length),I.push(p[t][1]>0?p[t][1]:-p[t][1]-1+c.length),I.push(p[t][2]>0?p[t][2]:-p[t][2]-1+c.length),P.push(0),P.push(0),P.push(0);let N=c.length;const Q=c.length-1;for(let t=0;t<i.length;t++){let n=!1;if(t>0){u(S,U),t<i.length-1?(h(U,i[t+1],i[t]),o(U,U)):n=!0,s(k,S,U),o(k,k),s(E,i[t-1],F),j(i[t],k,L);d(L,v(E,S),G)?(h(G,G,i[t]),o(q,G),l(O,k,q),o(O,O)):vt(k,F,J,H,O,q,It),u(F,q),u(J,O)}w&&(s(G,i[t],g),o(K,G));for(let l=0;l<M;l++)if(e(V,O,r[l][0]),e(G,q,r[l][1]),s(V,V,G),o(B,V),A[z++]=B[0],A[z++]=B[1],A[z++]=B[2],s(V,V,i[t]),y[x++]=V[0],y[x++]=V[1],y[x++]=V[2],!n){const t=(l+1)%M;I.push(N+l),I.push(N+M+l),I.push(N+t),I.push(N+t),I.push(N+M+l),I.push(N+M+t);for(let n=0;n<6;n++){const t=I.length-6;P.push(I[t+n]-Q)}}N+=M}const R=i[i.length-1];for(let t=0;t<c.length;t++)e(V,O,c[t][0]),e(G,q,c[t][1]),s(V,V,G),s(V,V,R),y[x++]=V[0],y[x++]=V[1],y[x++]=V[2];const T=z/3;A[z++]=U[0],A[z++]=U[1],A[z++]=U[2];const W=N-M;for(let t=0;t<p.length;t++)I.push(p[t][0]>=0?N+p[t][0]:-p[t][0]-1+W),I.push(p[t][2]>=0?N+p[t][2]:-p[t][2]-1+W),I.push(p[t][1]>=0?N+p[t][1]:-p[t][1]-1+W),P.push(T),P.push(T),P.push(T);const X=[["position",new D(y,I,3,!0)],["normal",new D(A,P,3,!0)]];return new C(n,X)}function yt(t,n,o,e,s){const r=g(3*n.length),l=new Array(2*(n.length-1));let h=0,u=0;for(let a=0;a<n.length;a++){for(let t=0;t<3;t++)r[h++]=n[a][t];a>0&&(l[u++]=a-1,l[u++]=a)}const i=[["position",new D(r,l,3,!0)]];if(o?.length===n.length&&3===o[0].length){const t=m(3*o.length);let e=0;for(let s=0;s<n.length;s++)for(let n=0;n<3;n++)t[e++]=o[s][n];i.push(["normal",new D(t,l,3,!0)])}if(e&&i.push(["color",new D(e,y(e.length/4),4)]),s?.length===n.length){const t=P(s,1);i.push(["timeStamps",new D(t,l,x,!0)])}return new C(t,i,null)}function At(t,n,o,e,s,r=0){const l=new Array(18),h=[[-o,r,s/2],[e,r,s/2],[0,n+r,s/2],[-o,r,-s/2],[e,r,-s/2],[0,n+r,-s/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 i=0;i<6;i++)l[3*i]=h[i][0],l[3*i+1]=h[i][1],l[3*i+2]=h[i][2];return new C(t,[["position",new D(l,u,3,!0)]])}function bt(o,e){const s=o.getMutableAttribute("position").data;for(let r=0;r<s.length;r+=3){const o=s[r],l=s[r+1],h=s[r+2];t(Pt,o,l,h),n(Pt,Pt,e),s[r]=Pt[0],s[r+1]=Pt[1],s[r+2]=Pt[2]}}function jt(t,n=t){const o=t.attributes,e=o.get("position").data,s=o.get("normal").data;if(s){const t=n.getMutableAttribute("normal").data;for(let n=0;n<s.length;n+=3){const o=s[n+1];t[n+1]=-s[n+2],t[n+2]=o}}if(e){const t=n.getMutableAttribute("position").data;for(let n=0;n<e.length;n+=3){const o=e[n+1];t[n+1]=-e[n+2],t[n+2]=o}}}function dt(t,n,e,s,h){return!(Math.abs(r(n,t))>h)&&(l(e,t,n),o(e,e),l(s,e,t),o(s,s),!0)}function vt(t,n,o,e,s,r,l){return dt(t,n,s,r,l)||dt(t,o,s,r,l)||dt(t,e,s,r,l)}const It=.99619469809,Pt=f();export{jt as cgToGIS,J as createBoxGeometry,wt as createConeGeometry,ft as createConeGeometryData,gt as createCylinderGeometry,R as createDiamondGeometry,At as createExtrudedTriangle,Mt as createPathExtrusionGeometry,at as createPointGeometry,it as createPolySphereData,ut as createPolySphereGeometry,yt as createPolylineGeometry,ht as createSphereGeometry,pt as createSquareGeometry,lt as createTetrahedronGeometry,mt as createTubeGeometry,vt as makeOrthoBasisDirUpFallback,bt as transformInPlace};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"../../../../core/has.js";import{generateUID as i}from"../../../../core/uid.js";import{getMetersPerUnitForSR as t}from"../../../../core/units.js";import{subtract as r,distance as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{projectBuffer as n}from"../../../../geometry/projection/projectBuffer.js";import{Attribute as a}from"./Attribute.js";import{Geometry as h}from"./Geometry.js";import{fromValues as c}from"./LocalOriginFactory.js";import{Object3D as g}from"./Object3D.js";import{gridLocalOriginFactory as m}from"./testUtils.js";import{WebGLLayer as _}from"./WebGLLayer.js";import{RibbonLineMaterial as l}from"../materials/RibbonLineMaterial.js";class f{constructor(r){this._originSR=r,this._rootOriginId="root/"+i(),this._origins=new Map,this._objects=new Map,this._gridSize=5e5,this._originSR?.isGeographic&&(this._gridSize/=t(this._originSR)),this._baselineDistance=.5*this._gridSize;const s=this._baselineDistance*d;this._baselineObjectSize=s/p}getOrigin(i){const t=this._origins.get(this._rootOriginId);if(null==t){const t=m.rootOrigin;if(null!=t)return this._origins.set(this._rootOriginId,c(t[0],t[1],t[2],this._rootOriginId)),this.getOrigin(i);const r=c(i[0],i[1],i[2],this._rootOriginId);return this._origins.set(this._rootOriginId,r),r}const s=this._gridSize,e=Math.round(i[0]/s),o=Math.round(i[1]/s),n=Math.round(i[2]/s),a=`${e}/${o}/${n}`;let h=this._origins.get(a);const g=.5*s;if(r(b,i,t.vec3),b[0]=Math.abs(b[0]),b[1]=Math.abs(b[1]),b[2]=Math.abs(b[2]),b[0]<g&&b[1]<g&&b[2]<g){if(h){const t=Math.max(...b);r(b,i,h.vec3),b[0]=Math.abs(b[0]),b[1]=Math.abs(b[1]),b[2]=Math.abs(b[2]);if(Math.max(...b)<t)return h}return t}return h||(h=c(e*s,o*s,n*s,a),this._origins.set(a,h)),h}needsOriginUpdate(i,t,r){const e=s(i.vec3,t),o=Math.max(1,r/this._baselineObjectSize);return e>this._baselineDistance*o}_drawOriginBox(i,t=o(1,1,0,1)){const r=window.view,s=r.stage,e=t.toString();if(!this._objects.has(e)){this._material=new l({width:2,color:t},!1);const i=new _(s,{pickable:!1}),r=new g({castShadow:!1});i.add(r),this._objects.set(e,r)}const c=this._objects.get(e),m=[0,1,5,4,0,2,1,7,6,2,0,1,3,7,5,4,6,2,0],f=m.length,b=new Array(3*f),d=new Array,p=.5*this._gridSize;for(let o=0;o<f;o++)b[3*o]=i[0]+(1&m[o]?p:-p),b[3*o+1]=i[1]+(2&m[o]?p:-p),b[3*o+2]=i[2]+(4&m[o]?p:-p),o>0&&d.push(o-1,o);n(b,this._originSR,0,b,r.renderSpatialReference,0,f);const j=new h(this._material,[["position",new a(b,d,3,!0)]],null,2);c.addGeometry(j)}get test(){}}const b=e(),d=2**-23,p=.05;export{f as GridLocalOriginFactory};
2
+ import"../../../../core/has.js";import{generateUID as i}from"../../../../core/uid.js";import{getMetersPerUnitForSR as t}from"../../../../core/units.js";import{subtract as r,distance as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{projectBuffer as n}from"../../../../geometry/projection/projectBuffer.js";import{Attribute as a}from"./Attribute.js";import{Geometry as h}from"./Geometry.js";import{fromValues as c}from"./LocalOriginFactory.js";import{Object3D as g}from"./Object3D.js";import{gridLocalOriginFactory as m}from"./testUtils.js";import{WebGLLayer as _}from"./WebGLLayer.js";import{RibbonLineMaterial as l}from"../materials/RibbonLineMaterial.js";class f{constructor(r){this._originSR=r,this._rootOriginId="root/"+i(),this._origins=new Map,this._objects=new Map,this._gridSize=5e5,this._originSR?.isGeographic&&(this._gridSize/=t(this._originSR)),this._baselineDistance=.5*this._gridSize;const s=this._baselineDistance*d;this._baselineObjectSize=s/p}getOrigin(i){const t=this._origins.get(this._rootOriginId);if(null==t){const t=m.rootOrigin;if(null!=t)return this._origins.set(this._rootOriginId,c(t[0],t[1],t[2],this._rootOriginId)),this.getOrigin(i);const r=c(i[0],i[1],i[2],this._rootOriginId);return this._origins.set(this._rootOriginId,r),r}const s=this._gridSize,e=Math.round(i[0]/s),o=Math.round(i[1]/s),n=Math.round(i[2]/s),a=`${e}/${o}/${n}`;let h=this._origins.get(a);const g=.5*s;if(r(b,i,t.vec3),b[0]=Math.abs(b[0]),b[1]=Math.abs(b[1]),b[2]=Math.abs(b[2]),b[0]<g&&b[1]<g&&b[2]<g){if(h){const t=Math.max(...b);r(b,i,h.vec3),b[0]=Math.abs(b[0]),b[1]=Math.abs(b[1]),b[2]=Math.abs(b[2]);if(Math.max(...b)<t)return h}return t}return h||(h=c(e*s,o*s,n*s,a),this._origins.set(a,h)),h}needsOriginUpdate(i,t,r){const e=s(i.vec3,t),o=Math.max(1,r/this._baselineObjectSize);return e>this._baselineDistance*o}_drawOriginBox(i,t=o(1,1,0,1)){const r=window.view,s=r.stage,e=t.toString();if(!this._objects.has(e)){this._material=new l({width:2,color:t},!1);const i=new _(s,{pickable:!1}),r=new g({castShadow:!1});i.add(r),this._objects.set(e,r)}const c=this._objects.get(e),m=[0,1,5,4,0,2,1,7,6,2,0,1,3,7,5,4,6,2,0],f=m.length,b=new Array(3*f),d=new Array,p=.5*this._gridSize;for(let o=0;o<f;o++)b[3*o]=i[0]+(1&m[o]?p:-p),b[3*o+1]=i[1]+(2&m[o]?p:-p),b[3*o+2]=i[2]+(4&m[o]?p:-p),o>0&&d.push(o-1,o);n(b,this._originSR,0,b,r.renderSpatialReference,0,f);const j=new h(this._material,[["position",new a(b,d,3,!0)]],null);c.addGeometry(j)}get test(){}}const b=e(),d=2**-23,p=.05;export{f as GridLocalOriginFactory};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{generateUID as r}from"../../../../core/uid.js";import{isColor as t}from"../core/shaderLibrary/ShaderOutput.js";import{updateParameters as e}from"../materials/internal/MaterialUtil.js";import{NoParameters as i}from"../../../webgl/NoParameters.js";class s{constructor(t,i){this.id=r(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new i,e(this._parameters,t),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(r){return!1}setParameters(r,t=!0){e(this._parameters,r)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(r){}shouldRender(r){return this.visible&&this.isVisibleForOutput(r.output)&&(!this.parameters.isDecoration||r.bind.decorations)&&0!==(this.parameters.renderOccluded&r.renderOccludedMask)}isVisibleForOutput(r){return!0}get renderPriority(){return this._renderPriority}set renderPriority(r){r!==this._renderPriority&&(this._renderPriority=r,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get emissions(){return 0}getConfiguration(r){return this.updateConfiguration(r),this._configuration}updateConfiguration(r){this._configuration.output=r.output,this._configuration.hasEmission=r.hasEmission&&t(r.output),this._configuration.hasHighlightMixTexture=10===r.output&&null!=r.highlightMixTexture,this._configuration.useFloatBlend=r.useFloatBlend.value,this._configuration.emissionDimmingPass=r.transparentWithoutDepthEmissionDimmingPass&&t(r.output)}}class a extends i{constructor(){super(...arguments),this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}}export{s as Material,a as MaterialParameters};
2
+ import{generateUID as e}from"../../../../core/uid.js";import{isColor as r}from"../core/shaderLibrary/ShaderOutput.js";import{updateParameters as t}from"../materials/internal/MaterialUtil.js";import{NoParameters as i}from"../../../webgl/NoParameters.js";class s{constructor(r,i){this.id=e(),this.supportsEdges=!1,this.geometryType=0,this._renderPriority=0,this._parameters=new i,t(this._parameters,r),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(e){return!1}setParameters(e,r=!0){t(this._parameters,e)&&(this.validateParameters(this._parameters),r&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get emissions(){return 0}getConfiguration(e){return this.updateConfiguration(e),this._configuration}updateConfiguration(e){this._configuration.output=e.output,this._configuration.hasEmission=e.hasEmission&&r(e.output),this._configuration.hasHighlightMixTexture=10===e.output&&null!=e.highlightMixTexture,this._configuration.useFloatBlend=e.useFloatBlend.value,this._configuration.emissionDimmingPass=e.transparentWithoutDepthEmissionDimmingPass&&r(e.output)}}class a extends i{constructor(){super(...arguments),this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}}export{s as Material,a as MaterialParameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{clamp as t}from"../../../../core/mathUtils.js";import{set as i,copy as e,exactEquals as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as o,clone as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{newFloatArray as a}from"../../../../geometry/support/FloatArray.js";import{getContinuousIndexArray as n,getZeroIndexArray as l}from"../../../../geometry/support/Indices.js";import{addOlidAttribute as u}from"../../layers/graphics/olidUtils.js";import{Attribute as h}from"./Attribute.js";import{Geometry as p}from"./Geometry.js";import{getPathVertexFrameIndex as c}from"./PathVertexInfo.js";import{createPositionReader as m}from"./PositionReader.js";class f extends p{constructor(t,i,e,s){const{vertexIndices:r,framePositionIndices:a,numExtrusionFrames:p}=i,c=n(p),m=l(p),f=[["position",new h(i.positions,a,3,!0)],["profileRight",new h(i.profileRightAxes,c,2,!0)],["profileUp",new h(i.profileUpAxes,c,2,!0)],["profileRotation",new h(i.profileRotations,c,1,!0)],["pathMaxStretchDistance",new h(i.pathMaxStretchDistances,c,1,!0)],["pathVertexInfo",new h(i.pathVertexInfos,r,1,!0)]];i.profileRotationFrameUpAxes&&f.push(["pathRotationUp",new h(i.profileRotationFrameUpAxes,c,2,!0)]),null!=e.sizeAttributeValue&&f.push(["sizeFeatureAttribute",new h([e.sizeAttributeValue],m,1,!0)]),null!=e.size&&f.push(["size",new h([...e.size],m,2,!0)]),null!=e.colorAttributeValue&&f.push(["colorFeatureAttribute",new h([e.colorAttributeValue],m,1,!0)]),null!=e.color&&f.push(["color",new h([...e.color],m,4,!0)]),null!=e.opacityAttributeValue&&f.push(["opacityFeatureAttribute",new h([e.opacityAttributeValue],m,1,!0)]),null!=e.opacity&&f.push(["opacity",new h([e.opacity],m,1,!0)]),null!=s&&u(f,s,m),super(t,f,null,0,0),this.builder=i,this.visualVariablesState=e,this._lastSize=o()}get indexCount(){return this.attributes.get("pathVertexInfo")?.indices.length??0}get readPrimitivePosition(){if(this._invalidateOnSizeChange(),null==this._readPrimitivePosition){const{builder:t,size:i}=this,{vertexIndices:e,numVerticesTotal:s,evaluator:o}=t,r=a(3*s);for(let a=0;a<s;++a)o.evaluateVertexPosition(r,i,a,a);this._readPrimitivePosition=m(r,e,3)}return this._readPrimitivePosition}onPathChanged(){this.builder.onPathChanged(),this.invalidateBoundingInfo(),i(this._lastSize,-1,-1),this._invalidateReadPrimitivePosition()}get size(){const{parameters:i}=this.material,s=r(i.size);if(i.vvSize){const{offset:e,factor:o,minSize:r,maxSize:a,fallback:n}=i.vvSize,l=this.visualVariablesState.sizeAttributeValue??NaN;Number.isNaN(l)?(s[0]*=n[0],s[1]*=n[2]):(s[0]*=t(e[0]+l*o[0],r[0],a[0]),s[1]*=t(e[2]+l*o[2],r[2],a[2]))}else i.hasPathSize&&this.visualVariablesState.size&&e(s,this.visualVariablesState.size);return s}_computePrimitivePositionIndices(){const t=this.attributes.get("pathVertexInfo"),i=this.attributes.get("position");if(t&&i){const e=i.indices,s=t.indices,o=t.data;return s.map(i=>e[c(o[t.stride*i])])}return i?.indices??null}get boundingInfo(){return this._invalidateOnSizeChange(),super.boundingInfo}_invalidateOnSizeChange(){const{size:t}=this;s(t,this._lastSize)||(e(this._lastSize,t),this.invalidateBoundingInfo(),this._invalidateReadPrimitivePosition())}}function d(t){return t instanceof f}export{f as PathGeometry,d as isPathGeometry};
2
+ import{clamp as t}from"../../../../core/mathUtils.js";import{set as i,copy as e,exactEquals as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as o,clone as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{newFloatArray as a}from"../../../../geometry/support/FloatArray.js";import{getContinuousIndexArray as n,getZeroIndexArray as l}from"../../../../geometry/support/Indices.js";import{addOlidAttribute as u}from"../../layers/graphics/olidUtils.js";import{Attribute as h}from"./Attribute.js";import{Geometry as p}from"./Geometry.js";import{getPathVertexFrameIndex as c}from"./PathVertexInfo.js";import{createPositionReader as m}from"./PositionReader.js";class f extends p{constructor(t,i,e,s){const{vertexIndices:r,framePositionIndices:a,numExtrusionFrames:p}=i,c=n(p),m=l(p),f=[["position",new h(i.positions,a,3,!0)],["profileRight",new h(i.profileRightAxes,c,2,!0)],["profileUp",new h(i.profileUpAxes,c,2,!0)],["profileRotation",new h(i.profileRotations,c,1,!0)],["pathMaxStretchDistance",new h(i.pathMaxStretchDistances,c,1,!0)],["pathVertexInfo",new h(i.pathVertexInfos,r,1,!0)]];i.profileRotationFrameUpAxes&&f.push(["pathRotationUp",new h(i.profileRotationFrameUpAxes,c,2,!0)]),null!=e.sizeAttributeValue&&f.push(["sizeFeatureAttribute",new h([e.sizeAttributeValue],m,1,!0)]),null!=e.size&&f.push(["size",new h([...e.size],m,2,!0)]),null!=e.colorAttributeValue&&f.push(["colorFeatureAttribute",new h([e.colorAttributeValue],m,1,!0)]),null!=e.color&&f.push(["color",new h([...e.color],m,4,!0)]),null!=e.opacityAttributeValue&&f.push(["opacityFeatureAttribute",new h([e.opacityAttributeValue],m,1,!0)]),null!=e.opacity&&f.push(["opacity",new h([e.opacity],m,1,!0)]),null!=s&&u(f,s,m),super(t,f,null,0),this.builder=i,this.visualVariablesState=e,this._lastSize=o()}get indexCount(){return this.attributes.get("pathVertexInfo")?.indices.length??0}get readPrimitivePosition(){if(this._invalidateOnSizeChange(),null==this._readPrimitivePosition){const{builder:t,size:i}=this,{vertexIndices:e,numVerticesTotal:s,evaluator:o}=t,r=a(3*s);for(let a=0;a<s;++a)o.evaluateVertexPosition(r,i,a,a);this._readPrimitivePosition=m(r,e,3)}return this._readPrimitivePosition}onPathChanged(){this.builder.onPathChanged(),this.invalidateBoundingInfo(),i(this._lastSize,-1,-1),this._invalidateReadPrimitivePosition()}get size(){const{parameters:i}=this.material,s=r(i.size);if(i.vvSize){const{offset:e,factor:o,minSize:r,maxSize:a,fallback:n}=i.vvSize,l=this.visualVariablesState.sizeAttributeValue??NaN;Number.isNaN(l)?(s[0]*=n[0],s[1]*=n[2]):(s[0]*=t(e[0]+l*o[0],r[0],a[0]),s[1]*=t(e[2]+l*o[2],r[2],a[2]))}else i.hasPathSize&&this.visualVariablesState.size&&e(s,this.visualVariablesState.size);return s}_computePrimitivePositionIndices(){const t=this.attributes.get("pathVertexInfo"),i=this.attributes.get("position");if(t&&i){const e=i.indices,s=t.indices,o=t.data;return s.map(i=>e[c(o[t.stride*i])])}return i?.indices??null}get boundingInfo(){return this._invalidateOnSizeChange(),super.boundingInfo}_invalidateOnSizeChange(){const{size:t}=this;s(t,this._lastSize)||(e(this._lastSize,t),this.invalidateBoundingInfo(),this._invalidateReadPrimitivePosition())}}function d(t){return t instanceof f}export{f as PathGeometry,d as isPathGeometry};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{sub as n,set as t,cross as o,normalize as i}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as e,create as r}from"../../../../geometry/support/aaBoundingBox.js";import{boundingInfoSubdivisionThreshold as s}from"./intersectionConstants.js";import{assert as f}from"./Util.js";class u{constructor(n=0,t=!1,o=!0){this.tolerance=n,this.isVerticalRay=t,this.normalRequired=o}}const a=r();function l(t,o,i,c,e,r){if(!t.visible)return;const s=n(D,c,i),{tolerance:a}=o,l=new u(a,!1,o.options.normalRequired);if(t.boundingInfo)f(0===t.type),p(t.readPrimitivePosition,t.boundingInfo,i,s,a,e,l,r);else{const n=t.readPrimitivePosition;q(i,s,0,t.faceCount,n,e,l,r)}}const m=c();function p(n,t,o,i,c,r,f,u){if(null==t)return;const l=w(i,m);if(e(a,t.box),null!=r&&r.applyToAabb(a),A(a,o,l,c)){const{primitiveIndices:e}=t,a=e.length;if(a>s){const e=t.children;if(void 0!==e){for(const t of e)p(n,t,o,i,c,r,f,u);return}}v(o,i,0,a,n,e,r,f,u)}}const h=c();function x(t,o,i,c,e,r,s,f){q(t,n(D,o,t),i,c,e,r,s,f)}function M(n,t,o,i){if(!o.visible)return;const{boundingInfo:c}=o;if(c){const{box:o}=c;if(n<o[0]||n>o[3]||t<o[1]||t>o[4])return}b(n,t,0,o.faceCount,o.readPrimitivePosition,i)}function b(n,t,o,i,c,e){for(let r=o;r<i;++r){const o=3*r,[i,s]=c(G,o),[f,u]=c(G,o+1),[a,l]=c(G,o+2),m=i-n,p=s-t,h=f-n,x=u-t,M=a-n,b=l-t,d=M*x-b*h,y=m*b-p*M,g=h*p-x*m;(d<0||y<0||g<0)&&(d>0||y>0||g>0)||e(0,0,null,r)}}function d(n,t,o,i,c,e,r,s,f,u=null,a=0){const l=n[0],m=n[1],p=n[2],x=t[0],M=t[1],b=t[2];for(let d=o;d<i;++d){const n=a+(u?.[d]??d),t=3*n,o=r*c[t],i=e[o],y=e[o+1],g=e[o+2],v=r*c[t+1],q=e[v],T=e[v+1],V=e[v+2],P=r*c[t+2],R=q-i,I=T-y,C=V-g,B=e[P]-i,w=e[P+1]-y,A=e[P+2]-g,U=M*A-w*b,k=b*B-A*x,D=x*w-B*M,E=R*U+I*k+C*D,F=E*E;if(F<=z)continue;const G=l-i,H=m-y,J=p-g,K=(G*U+H*k+J*D)*E;if(K<0||K>F)continue;const L=H*C-I*J,N=J*R-C*G,O=G*I-R*H,Q=(x*L+M*N+b*O)*E;if(Q<0||K+Q>F)continue;const S=(B*L+w*N+A*O)/E;if(S>=0){f(S,S,s?j(R,I,C,B,w,A,h):null,n)}}}function y(n,t,o,i,c,e,r,s){const f=n[0],u=n[1],a=n[2],l=t[0],m=t[1],p=t[2];for(let x=o;x<i;++x){const n=3*x,t=n+1,o=n+2,i=e*n,M=c[i],b=c[i+1],d=c[i+2],y=e*t,g=e*o,v=c[y]-M,q=c[y+1]-b,T=c[y+2]-d,V=c[g]-M,P=c[g+1]-b,R=c[g+2]-d,I=m*R-P*p,C=p*V-R*l,B=l*P-V*m,w=v*I+q*C+T*B,A=w*w;if(A<=z)continue;const U=f-M,k=u-b,D=a-d,E=(U*I+k*C+D*B)*w;if(E<0||E>A)continue;const F=k*T-q*D,G=D*v-T*U,H=U*q-v*k,J=(l*F+m*G+p*H)*w;if(J<0||E+J>A)continue;const K=(V*F+P*G+R*H)/w;if(K>=0){s(K,K,r?j(v,q,T,V,P,R,h):null,x)}}}function g(n,t,o,i,c,e,r,s,f,u,a,l=null,m=0){const p=n[0],x=n[1],M=n[2],b=t[0],d=t[1],y=t[2];for(let g=o;g<i;++g){const n=m+(l?.[g]??g),t=3*n,o=r*c[t],i=e[o],v=e[o+1],q=e[o+2],T=r*c[t+1],V=e[T],P=e[T+1],R=e[T+2],I=r*c[t+2],C=e[I],B=e[I+1],w=e[I+2],A=q-f,U=s/Math.sqrt(i*i+v*v+A*A),k=i+i*U,D=v+v*U,E=q+A*U,F=R-f,G=s/Math.sqrt(V*V+P*P+F*F),H=V+V*G,J=P+P*G,K=R+F*G,L=w-f,N=s/Math.sqrt(C*C+B*B+L*L),O=H-k,Q=J-D,S=K-E,W=C+C*N-k,X=B+B*N-D,Y=w+L*N-E,Z=d*Y-X*y,$=y*W-Y*b,_=b*X-W*d,nn=O*Z+Q*$+S*_,tn=nn*nn;if(tn<=z)continue;const on=p-k,cn=x-D,en=M-E,rn=(on*Z+cn*$+en*_)*nn;if(rn<0||rn>tn)continue;const sn=cn*S-Q*en,fn=en*O-S*on,un=on*Q-O*cn,an=(b*sn+d*fn+y*un)*nn;if(an<0||rn+an>tn)continue;const ln=(W*sn+X*fn+Y*un)/nn;if(ln>=0){a(ln,ln,u?j(O,Q,S,W,X,Y,h):null,n)}}}function v(n,t,o,i,c,e,r,s,f){const u=n[0],a=n[1],l=n[2],m=t[0],p=t[1],x=t[2],{normalRequired:M}=s;for(let b=o;b<i;++b){const n=e[b],t=3*n;let[o,i,s]=c(G,t),[d,y,g]=c(G,t+1),[v,q,T]=c(G,t+2);null!=r&&([o,i,s]=r.applyToVertex(F,o,i,s,b),[d,y,g]=r.applyToVertex(F,d,y,g,b),[v,q,T]=r.applyToVertex(F,v,q,T,b));const V=d-o,P=y-i,R=g-s,I=v-o,C=q-i,B=T-s,w=p*B-C*x,A=x*I-B*m,U=m*C-I*p,k=V*w+P*A+R*U,D=k*k;if(D<=z)continue;const E=u-o,H=a-i,J=l-s,K=(E*w+H*A+J*U)*k;if(K<0||K>D)continue;const L=H*R-P*J,N=J*V-R*E,O=E*P-V*H,Q=(m*L+p*N+x*O)*k;if(Q<0||K+Q>D)continue;const S=(I*L+C*N+B*O)/k;if(S>=0){f(S,S,M?j(V,P,R,I,C,B,h):null,n)}}}function q(t,o,i,c,e,r,s,f){const u=o,a=E,l=Math.abs(u[0]),m=Math.abs(u[1]),p=Math.abs(u[2]),h=l>=m?l>=p?0:2:m>=p?1:2,x=h,M=u[x]<0?2:1,b=(h+M)%3,d=(h+(3-M))%3,y=u[b]/u[x],g=u[d]/u[x],v=1/u[x],q=T,j=V,I=P,{normalRequired:C}=s;for(let T=i;T<c;++T){const o=3*T;e(a[0],o),e(a[1],o+1),e(a[2],o+2),r&&(r.applyToVertex(a[0],a[0][0],a[0][1],a[0][2],T),r.applyToVertex(a[1],a[1][0],a[1][1],a[1][2],T),r.applyToVertex(a[2],a[2][0],a[2][1],a[2][2],T)),n(q,a[0],t),n(j,a[1],t),n(I,a[2],t);const i=q[b]-y*q[x],c=q[d]-g*q[x],s=j[b]-y*j[x],u=j[d]-g*j[x],l=I[b]-y*I[x],m=I[d]-g*I[x],p=l*u-m*s,h=i*m-c*l,M=s*c-u*i;if((p<0||h<0||M<0)&&(p>0||h>0||M>0))continue;const V=p+h+M;if(0===V)continue;const P=p*(v*q[x])+h*(v*j[x])+M*(v*I[x]);if(P*Math.sign(V)<0)continue;const B=P/V;if(B>=0){f(B,B,C?R(a):null,T)}}}const T=c(),V=c(),P=c();function j(n,c,e,r,s,f,u){return t(I,n,c,e),t(C,r,s,f),o(u,I,C),i(u,u),u}function R(t){return n(I,t[1],t[0]),n(C,t[2],t[0]),o(h,I,C),i(h,h),h}const I=c(),C=c();function B(n,o,i){return t(i,1/(o[0]-n[0]),1/(o[1]-n[1]),1/(o[2]-n[2]))}function w(n,o){return t(o,1/n[0],1/n[1],1/n[2])}function A(n,t,o,i){return U(n,t,o,i,1/0)}function U(n,t,o,i,c){const e=(n[0]-i-t[0])*o[0],r=(n[3]+i-t[0])*o[0];let s=Math.min(e,r),f=Math.max(e,r);const u=(n[1]-i-t[1])*o[1],a=(n[4]+i-t[1])*o[1];if(f=Math.min(f,Math.max(u,a)),f<0)return!1;if(s=Math.max(s,Math.min(u,a)),s>f)return!1;const l=(n[2]-i-t[2])*o[2],m=(n[5]+i-t[2])*o[2];return f=Math.min(f,Math.max(l,m)),!(f<0)&&(s=Math.max(s,Math.min(l,m)),!(s>f)&&s<c)}const k=1e-7,z=k*k,D=c(),E=[c(),c(),c()],F=c(),G=c();export{u as MeshIntersectionOptions,B as computeInvDir,A as intersectAabbInvDir,U as intersectAabbInvDirBefore,d as intersectRayTriangles,q as intersectRayTrianglesWithDisplacementWatertight,g as intersectRayTrianglesWithVerticalOffsetENUGlobal,y as intersectRenderGeometryTriangles,l as intersectTriangleGeometry,M as intersectTriangleGeometry2D,x as intersectTriangles,b as intersectTriangles2d,k as triangleRayParallelTolerance};
2
+ import{sub as n,set as t,cross as o,normalize as i}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as e,create as r}from"../../../../geometry/support/aaBoundingBox.js";import{boundingInfoSubdivisionThreshold as s}from"./intersectionConstants.js";class u{constructor(n=0,t=!1,o=!0){this.tolerance=n,this.isVerticalRay=t,this.normalRequired=o}}const f=r();function a(t,o,i,c,e,r){if(!t.visible)return;const s=n(D,c,i),{tolerance:f}=o,a=new u(f,!1,o.options.normalRequired);if(t.boundingInfo)m(t.readPrimitivePosition,t.boundingInfo,i,s,f,e,a,r);else{const n=t.readPrimitivePosition;y(i,s,0,t.faceCount,n,e,a,r)}}const l=c();function m(n,t,o,i,c,r,u,a){if(null==t)return;const h=B(i,l);if(e(f,t.box),null!=r&&r.applyToAabb(f),w(f,o,h,c)){const{primitiveIndices:e}=t,f=e.length;if(f>s){const e=t.children;if(void 0!==e){for(const t of e)m(n,t,o,i,c,r,u,a);return}}v(o,i,0,f,n,e,r,u,a)}}const h=c();function p(t,o,i,c,e,r,s,u){y(t,n(D,o,t),i,c,e,r,s,u)}function x(n,t,o,i){if(!o.visible)return;const{boundingInfo:c}=o;if(c){const{box:o}=c;if(n<o[0]||n>o[3]||t<o[1]||t>o[4])return}M(n,t,0,o.faceCount,o.readPrimitivePosition,i)}function M(n,t,o,i,c,e){for(let r=o;r<i;++r){const o=3*r,[i,s]=c(G,o),[u,f]=c(G,o+1),[a,l]=c(G,o+2),m=i-n,h=s-t,p=u-n,x=f-t,M=a-n,b=l-t,d=M*x-b*p,g=m*b-h*M,v=p*h-x*m;(d<0||g<0||v<0)&&(d>0||g>0||v>0)||e(0,0,null,r)}}function b(n,t,o,i,c,e,r,s,u,f=null,a=0){const l=n[0],m=n[1],p=n[2],x=t[0],M=t[1],b=t[2];for(let d=o;d<i;++d){const n=a+(f?.[d]??d),t=3*n,o=r*c[t],i=e[o],g=e[o+1],v=e[o+2],y=r*c[t+1],q=e[y],T=e[y+1],V=e[y+2],R=r*c[t+2],j=q-i,I=T-g,C=V-v,B=e[R]-i,w=e[R+1]-g,A=e[R+2]-v,k=M*A-w*b,D=b*B-A*x,E=x*w-B*M,F=j*k+I*D+C*E,G=F*F;if(G<=z)continue;const H=l-i,J=m-g,K=p-v,L=(H*k+J*D+K*E)*F;if(L<0||L>G)continue;const N=J*C-I*K,O=K*j-C*H,Q=H*I-j*J,S=(x*N+M*O+b*Q)*F;if(S<0||L+S>G)continue;const U=(B*N+w*O+A*Q)/F;if(U>=0){u(U,U,s?P(j,I,C,B,w,A,h):null,n)}}}function d(n,t,o,i,c,e,r,s){const u=n[0],f=n[1],a=n[2],l=t[0],m=t[1],p=t[2];for(let x=o;x<i;++x){const n=3*x,t=n+1,o=n+2,i=e*n,M=c[i],b=c[i+1],d=c[i+2],g=e*t,v=e*o,y=c[g]-M,q=c[g+1]-b,T=c[g+2]-d,V=c[v]-M,R=c[v+1]-b,j=c[v+2]-d,I=m*j-R*p,C=p*V-j*l,B=l*R-V*m,w=y*I+q*C+T*B,A=w*w;if(A<=z)continue;const k=u-M,D=f-b,E=a-d,F=(k*I+D*C+E*B)*w;if(F<0||F>A)continue;const G=D*T-q*E,H=E*y-T*k,J=k*q-y*D,K=(l*G+m*H+p*J)*w;if(K<0||F+K>A)continue;const L=(V*G+R*H+j*J)/w;if(L>=0){s(L,L,r?P(y,q,T,V,R,j,h):null,x)}}}function g(n,t,o,i,c,e,r,s,u,f,a,l=null,m=0){const p=n[0],x=n[1],M=n[2],b=t[0],d=t[1],g=t[2];for(let v=o;v<i;++v){const n=m+(l?.[v]??v),t=3*n,o=r*c[t],i=e[o],y=e[o+1],q=e[o+2],T=r*c[t+1],V=e[T],R=e[T+1],j=e[T+2],I=r*c[t+2],C=e[I],B=e[I+1],w=e[I+2],A=q-u,k=s/Math.sqrt(i*i+y*y+A*A),D=i+i*k,E=y+y*k,F=q+A*k,G=j-u,H=s/Math.sqrt(V*V+R*R+G*G),J=V+V*H,K=R+R*H,L=j+G*H,N=w-u,O=s/Math.sqrt(C*C+B*B+N*N),Q=J-D,S=K-E,U=L-F,W=C+C*O-D,X=B+B*O-E,Y=w+N*O-F,Z=d*Y-X*g,$=g*W-Y*b,_=b*X-W*d,nn=Q*Z+S*$+U*_,tn=nn*nn;if(tn<=z)continue;const on=p-D,cn=x-E,en=M-F,rn=(on*Z+cn*$+en*_)*nn;if(rn<0||rn>tn)continue;const sn=cn*U-S*en,un=en*Q-U*on,fn=on*S-Q*cn,an=(b*sn+d*un+g*fn)*nn;if(an<0||rn+an>tn)continue;const ln=(W*sn+X*un+Y*fn)/nn;if(ln>=0){a(ln,ln,f?P(Q,S,U,W,X,Y,h):null,n)}}}function v(n,t,o,i,c,e,r,s,u){const f=n[0],a=n[1],l=n[2],m=t[0],p=t[1],x=t[2],{normalRequired:M}=s;for(let b=o;b<i;++b){const n=e[b],t=3*n;let[o,i,s]=c(G,t),[d,g,v]=c(G,t+1),[y,q,T]=c(G,t+2);null!=r&&([o,i,s]=r.applyToVertex(F,o,i,s,b),[d,g,v]=r.applyToVertex(F,d,g,v,b),[y,q,T]=r.applyToVertex(F,y,q,T,b));const V=d-o,R=g-i,j=v-s,I=y-o,C=q-i,B=T-s,w=p*B-C*x,A=x*I-B*m,k=m*C-I*p,D=V*w+R*A+j*k,E=D*D;if(E<=z)continue;const H=f-o,J=a-i,K=l-s,L=(H*w+J*A+K*k)*D;if(L<0||L>E)continue;const N=J*j-R*K,O=K*V-j*H,Q=H*R-V*J,S=(m*N+p*O+x*Q)*D;if(S<0||L+S>E)continue;const U=(I*N+C*O+B*Q)/D;if(U>=0){u(U,U,M?P(V,R,j,I,C,B,h):null,n)}}}function y(t,o,i,c,e,r,s,u){const f=o,a=E,l=Math.abs(f[0]),m=Math.abs(f[1]),h=Math.abs(f[2]),p=l>=m?l>=h?0:2:m>=h?1:2,x=p,M=f[x]<0?2:1,b=(p+M)%3,d=(p+(3-M))%3,g=f[b]/f[x],v=f[d]/f[x],y=1/f[x],P=q,j=T,I=V,{normalRequired:C}=s;for(let q=i;q<c;++q){const o=3*q;e(a[0],o),e(a[1],o+1),e(a[2],o+2),r&&(r.applyToVertex(a[0],a[0][0],a[0][1],a[0][2],q),r.applyToVertex(a[1],a[1][0],a[1][1],a[1][2],q),r.applyToVertex(a[2],a[2][0],a[2][1],a[2][2],q)),n(P,a[0],t),n(j,a[1],t),n(I,a[2],t);const i=P[b]-g*P[x],c=P[d]-v*P[x],s=j[b]-g*j[x],f=j[d]-v*j[x],l=I[b]-g*I[x],m=I[d]-v*I[x],h=l*f-m*s,p=i*m-c*l,M=s*c-f*i;if((h<0||p<0||M<0)&&(h>0||p>0||M>0))continue;const T=h+p+M;if(0===T)continue;const V=h*(y*P[x])+p*(y*j[x])+M*(y*I[x]);if(V*Math.sign(T)<0)continue;const B=V/T;if(B>=0){u(B,B,C?R(a):null,q)}}}const q=c(),T=c(),V=c();function P(n,c,e,r,s,u,f){return t(j,n,c,e),t(I,r,s,u),o(f,j,I),i(f,f),f}function R(t){return n(j,t[1],t[0]),n(I,t[2],t[0]),o(h,j,I),i(h,h),h}const j=c(),I=c();function C(n,o,i){return t(i,1/(o[0]-n[0]),1/(o[1]-n[1]),1/(o[2]-n[2]))}function B(n,o){return t(o,1/n[0],1/n[1],1/n[2])}function w(n,t,o,i){return A(n,t,o,i,1/0)}function A(n,t,o,i,c){const e=(n[0]-i-t[0])*o[0],r=(n[3]+i-t[0])*o[0];let s=Math.min(e,r),u=Math.max(e,r);const f=(n[1]-i-t[1])*o[1],a=(n[4]+i-t[1])*o[1];if(u=Math.min(u,Math.max(f,a)),u<0)return!1;if(s=Math.max(s,Math.min(f,a)),s>u)return!1;const l=(n[2]-i-t[2])*o[2],m=(n[5]+i-t[2])*o[2];return u=Math.min(u,Math.max(l,m)),!(u<0)&&(s=Math.max(s,Math.min(l,m)),!(s>u)&&s<c)}const k=1e-7,z=k*k,D=c(),E=[c(),c(),c()],F=c(),G=c();export{u as MeshIntersectionOptions,C as computeInvDir,w as intersectAabbInvDir,A as intersectAabbInvDirBefore,b as intersectRayTriangles,y as intersectRayTrianglesWithDisplacementWatertight,g as intersectRayTrianglesWithVerticalOffsetENUGlobal,d as intersectRenderGeometryTriangles,a as intersectTriangleGeometry,x as intersectTriangleGeometry2D,p as intersectTriangles,M as intersectTriangles2d,k as triangleRayParallelTolerance};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{generateUID as t}from"../../../../core/uid.js";import{copy as r,multiply as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as o}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{NullSphere as s,Sphere as n}from"../../../../geometry/support/sphere.js";import{maxScale as a}from"../../support/mathUtils.js";class h{constructor(r,e={}){this.geometry=r,this.screenToWorldRatio=1,this._transformation=i(),this._shaderTransformation=null,this._boundingSphere=null,this.id=t(),this.layerViewUid=e.layerViewUid,this.graphicUid=e.graphicUid,this.castShadow=e.castShadow??!1,e.objectShaderTransformation&&this.objectShaderTransformationChanged(e.objectShaderTransformation)}get indexCount(){return this.geometry.indexCount}get faceCount(){return this.geometry.faceCount}get transformation(){return this._transformation}set transformation(t){r(this._transformation,t),this._boundingSphere=null}get boundingInfo(){return this.geometry.boundingInfo}objectShaderTransformationChanged(t){null==t?this._shaderTransformation=null:(this._shaderTransformation??=i(),e(this._shaderTransformation,t,this.geometry.transformation)),this._boundingSphere=null}get boundingSphere(){return this.boundingInfo?(null==this._boundingSphere&&(this._boundingSphere??=new n,o(this._boundingSphere.center,this.boundingInfo.sphere.center,this.shaderTransformation),this._boundingSphere.radius=this.boundingInfo.sphere.radius*a(this.shaderTransformation)),this._boundingSphere):s}get material(){return this.geometry.material}get type(){return this.geometry.type}get shaderTransformation(){return this._shaderTransformation??this.transformation}get attributes(){return this.geometry.attributes}foreachHighlightOptions(t){this.geometry.foreachHighlightOptions(t)}get hasHighlights(){return this.geometry.hasHighlights}get occludees(){return this.geometry.occludees}get visible(){return this.geometry.visible}set visible(t){this.geometry.visible=t}get readPrimitivePosition(){return this.geometry.readPrimitivePosition}}class m extends h{}export{h as RenderGeometry,m as ValidatedRenderGeometry};
2
+ import{generateUID as t}from"../../../../core/uid.js";import{copy as r,multiply as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as o}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{NullSphere as s,Sphere as n}from"../../../../geometry/support/sphere.js";import{maxScale as a}from"../../support/mathUtils.js";class h{constructor(r,e={}){this.geometry=r,this.screenToWorldRatio=1,this._transformation=i(),this._shaderTransformation=null,this._boundingSphere=null,this.id=t(),this.layerViewUid=e.layerViewUid,this.graphicUid=e.graphicUid,this.castShadow=e.castShadow??!1,e.objectShaderTransformation&&this.objectShaderTransformationChanged(e.objectShaderTransformation)}get indexCount(){return this.geometry.indexCount}get faceCount(){return this.geometry.faceCount}get transformation(){return this._transformation}set transformation(t){r(this._transformation,t),this._boundingSphere=null}get boundingInfo(){return this.geometry.boundingInfo}objectShaderTransformationChanged(t){null==t?this._shaderTransformation=null:(this._shaderTransformation??=i(),e(this._shaderTransformation,t,this.geometry.transformation)),this._boundingSphere=null}get boundingSphere(){return this.boundingInfo?(null==this._boundingSphere&&(this._boundingSphere??=new n,o(this._boundingSphere.center,this.boundingInfo.sphere.center,this.shaderTransformation),this._boundingSphere.radius=this.boundingInfo.sphere.radius*a(this.shaderTransformation)),this._boundingSphere):s}get material(){return this.geometry.material}get shaderTransformation(){return this._shaderTransformation??this.transformation}get attributes(){return this.geometry.attributes}foreachHighlightOptions(t){this.geometry.foreachHighlightOptions(t)}get hasHighlights(){return this.geometry.hasHighlights}get occludees(){return this.geometry.occludees}get visible(){return this.geometry.visible}set visible(t){this.geometry.visible=t}get readPrimitivePosition(){return this.geometry.readPrimitivePosition}}class m extends h{}export{h as RenderGeometry,m as ValidatedRenderGeometry};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import t from"../../../../core/PooledArray.js";import{createScreenPointArray as e}from"../../../../core/screenUtils.js";import{distance as r,copy as o,set as i,transformMat4 as n,squaredDistance as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as a,create as u}from"../../../../geometry/support/aaBoundingBox.js";import{intersectsTransformedAabb as c}from"../../../../geometry/support/frustum.js";import{clipPolygon as m}from"../../../../geometry/support/plane.js";import{normalFromValues as f,closestPointFromValues as p}from"../../../../geometry/support/triangle.js";import{boundingInfoSubdivisionThreshold as d}from"./intersectionConstants.js";import{screenPolygonIntersectsTriangle as h}from"./screenPolygonOverlapUtils.js";class I{constructor(t){this.primitiveIndex=t}}class g{constructor(t){this.type=t,this.distance=Number.POSITIVE_INFINITY,this.primitiveIndex=0,this.hasNormal=!1,this.point=l(),this.normal=l()}reset(){this.distance=Number.POSITIVE_INFINITY,this.hasNormal=!1}update(t,e,r,i){this.distance=t,this.primitiveIndex=e,o(this.point,r),this.hasNormal=null!=i,null!=i&&o(this.normal,i)}updateIfCloserFromValues(t,e,r,o){t<this.distance&&this.update(t,e,r,o)}updateIfCloser(t){const{distance:e,primitiveIndex:r,point:o,normal:i}=t;this.updateIfCloserFromValues(e,r,o,t.hasNormal?i:null)}get valid(){return Number.isFinite(this.distance)}}function y(t,e,r,o,i){if(!t.visible||0!==t.type)return null;const n=new g(4);let s;s=t.boundingInfo?b(t.readPrimitivePosition,t.boundingInfo,e,r,o,i):v(e,r,o,0,t.faceCount,t.readPrimitivePosition,i,null,0);for(const l of s)n.updateIfCloser(l);return n.valid?n:null}function*v(t,e,o,i,n,s,l,a=null,u=0){if(null==t.camera)return;const{camera:c,screenPolygonPrimitiveProcessor:p}=t;for(let d=i;d<n;++d){const t=(a?.[d]??d)+u,i=null==a?t:d,n=3*t;N(F[0],s,n+0,l,i,e),N(F[1],s,n+1,l,i,e),N(F[2],s,n+2,l,i,e);const h=O;let I;A.reset();const g=C;for(const e of p.processTriangle(F))if(g.length=0,m(c.frustum[4],e,()=>g.pushNew(),!1),!(g.length<3)){for(let t=0;t<g.length;t++)c.projectToScreen(g.at(t),V[t]);P(o,V,g.length)&&(j(c.eye,g,w),null==I&&(I=f(O,F[0],F[1],F[2])),A.updateIfCloserFromValues(r(c.eye,w),t,w,I?h:null))}A.valid&&(yield A)}}function*b(t,e,r,o,i,n){let s;if(null!=n?(a(x,e.box),n.applyToAabb(x),s=c(i.broadPhaseFrustum,x,o)):s=c(i.broadPhaseFrustum,e.box,o),!s)return;const{primitiveIndices:l}=e,u=l.length;if(u>d){const s=e.children;if(void 0!==s){for(const e of s)yield*b(t,e,r,o,i,n);return}}yield*v(r,o,i,0,u,t,n,l,0)}function N(t,e,r,o,s,l){const[a,u,c]=e(t,r);null!=o?o.applyToVertex(t,a,u,c,s):i(t,a,u,c),l&&n(t,t,l)}function P(t,e,r){for(let o=1;o<r-1;o++)if(h(t,e[0],e[o],e[o+1]))return!0;return!1}function j(t,e,r){let i=Number.POSITIVE_INFINITY;const n=e.at(0);for(let l=1;l<e.length-1;l++){p(S,t,n,e.at(l),e.at(l+1));const a=s(t,S);a<i&&(i=a,o(r,S))}}const x=u(),T=12,F=[l(),l(),l()],C=new t({allocator:t=>t??l()}),V=Array.from({length:T},()=>e()),w=l(),O=l(),S=l(),A=new g(4);export{I as DrapedHit,g as Hit,v as forEachTriangleRangeScreenPolygonHit,y as intersectTriangleGeometryScreenPolygon};
2
+ import t from"../../../../core/PooledArray.js";import{createScreenPointArray as e}from"../../../../core/screenUtils.js";import{distance as r,copy as o,set as i,transformMat4 as n,squaredDistance as s}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as a,create as u}from"../../../../geometry/support/aaBoundingBox.js";import{intersectsTransformedAabb as c}from"../../../../geometry/support/frustum.js";import{clipPolygon as m}from"../../../../geometry/support/plane.js";import{normalFromValues as f,closestPointFromValues as p}from"../../../../geometry/support/triangle.js";import{boundingInfoSubdivisionThreshold as d}from"./intersectionConstants.js";import{screenPolygonIntersectsTriangle as h}from"./screenPolygonOverlapUtils.js";class I{constructor(t){this.primitiveIndex=t}}class g{constructor(t){this.type=t,this.distance=Number.POSITIVE_INFINITY,this.primitiveIndex=0,this.hasNormal=!1,this.point=l(),this.normal=l()}reset(){this.distance=Number.POSITIVE_INFINITY,this.hasNormal=!1}update(t,e,r,i){this.distance=t,this.primitiveIndex=e,o(this.point,r),this.hasNormal=null!=i,null!=i&&o(this.normal,i)}updateIfCloserFromValues(t,e,r,o){t<this.distance&&this.update(t,e,r,o)}updateIfCloser(t){const{distance:e,primitiveIndex:r,point:o,normal:i}=t;this.updateIfCloserFromValues(e,r,o,t.hasNormal?i:null)}get valid(){return Number.isFinite(this.distance)}}function y(t,e,r,o,i){if(!t.visible)return null;const n=new g(4);let s;s=t.boundingInfo?b(t.readPrimitivePosition,t.boundingInfo,e,r,o,i):v(e,r,o,0,t.faceCount,t.readPrimitivePosition,i,null,0);for(const l of s)n.updateIfCloser(l);return n.valid?n:null}function*v(t,e,o,i,n,s,l,a=null,u=0){if(null==t.camera)return;const{camera:c,screenPolygonPrimitiveProcessor:p}=t;for(let d=i;d<n;++d){const t=(a?.[d]??d)+u,i=null==a?t:d,n=3*t;N(F[0],s,n+0,l,i,e),N(F[1],s,n+1,l,i,e),N(F[2],s,n+2,l,i,e);const h=O;let I;A.reset();const g=C;for(const e of p.processTriangle(F))if(g.length=0,m(c.frustum[4],e,()=>g.pushNew(),!1),!(g.length<3)){for(let t=0;t<g.length;t++)c.projectToScreen(g.at(t),V[t]);P(o,V,g.length)&&(j(c.eye,g,w),null==I&&(I=f(O,F[0],F[1],F[2])),A.updateIfCloserFromValues(r(c.eye,w),t,w,I?h:null))}A.valid&&(yield A)}}function*b(t,e,r,o,i,n){let s;if(null!=n?(a(x,e.box),n.applyToAabb(x),s=c(i.broadPhaseFrustum,x,o)):s=c(i.broadPhaseFrustum,e.box,o),!s)return;const{primitiveIndices:l}=e,u=l.length;if(u>d){const s=e.children;if(void 0!==s){for(const e of s)yield*b(t,e,r,o,i,n);return}}yield*v(r,o,i,0,u,t,n,l,0)}function N(t,e,r,o,s,l){const[a,u,c]=e(t,r);null!=o?o.applyToVertex(t,a,u,c,s):i(t,a,u,c),l&&n(t,t,l)}function P(t,e,r){for(let o=1;o<r-1;o++)if(h(t,e[0],e[o],e[o+1]))return!0;return!1}function j(t,e,r){let i=Number.POSITIVE_INFINITY;const n=e.at(0);for(let l=1;l<e.length-1;l++){p(S,t,n,e.at(l),e.at(l+1));const a=s(t,S);a<i&&(i=a,o(r,S))}}const x=u(),T=12,F=[l(),l(),l()],C=new t({allocator:t=>t??l()}),V=Array.from({length:T},()=>e()),w=l(),O=l(),S=l(),A=new g(4);export{I as DrapedHit,g as Hit,v as forEachTriangleRangeScreenPolygonHit,y as intersectTriangleGeometryScreenPolygon};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{clamp as e,deg2rad as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as s}from"../../../../core/screenUtils.js";import{fromMat4 as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as a,set as n,rotate as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{ONES as l,fromValues as c,create as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as f,length as p,scale as u,distance as d,transformMat4 as m,set as g,normalize as S,subtract as x,transformMat3 as b,scaleAndAdd as v,sub as O,dot as z}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as y,fromValues as P}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as V,ONES as D,create as R}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as C,empty as w,expandPointInPlace as A}from"../../../../geometry/support/aaBoundingRect.js";import{evaluateModelTransformScale as j}from"../../layers/support/FastSymbolUpdates.js";import{debugFlags as U}from"../../support/debugFlags.js";import{isColorHighlightOrOLID as M,isColor as T,isOIT as _}from"../core/shaderLibrary/ShaderOutput.js";import{HUDVerticalPixelOffset as L}from"../core/shaderLibrary/hud/HUD.glsl.js";import{GLTextureMaterialBindParameters as I,GLTextureMaterial as E}from"../lib/GLTextureMaterial.js";import{Material as F}from"../lib/Material.js";import{screenPolygonIntersectsBounds as B,screenPolygonIntersectsTriangle as H}from"../lib/screenPolygonOverlapUtils.js";import{DrapedHit as W,Hit as N}from"../lib/screenPolygonTriangleIntersections.js";import{SeparateScreenSizePerspectiveEvaluators as G}from"../lib/screenSizePerspectiveUtils.js";import{assert as q}from"../lib/Util.js";import{writePosition as X,writeNormal as Y,writeColor as k,writeBufferVec2 as J,writeBufferFloat as K,writeBufferVec3 as Q,writeBufferZeros as Z,writeBufferVec4 as $}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as ee}from"./internal/MaterialUtil.js";import{a as te}from"../../../../chunks/HUDMaterial.glsl.js";import{baseLayout as se,getInstanceLayout as re,HUDMaterialTechnique as ie}from"../shaders/HUDMaterialTechnique.js";import{HUDMaterialTechniqueConfiguration as ae}from"../shaders/HUDMaterialTechniqueConfiguration.js";import{alphaCutoff as ne}from"../../../../webscene/support/AlphaCutoff.js";class oe extends F{constructor(e,t,s=!1){super(e,He),this.produces=new Map([[12,e=>M(e)&&!this.parameters.drawAsLabel&&!this._configuration.transparentOccluded],[13,e=>M(e)&&!this.parameters.drawAsLabel&&this._configuration.transparentOccluded],[14,e=>M(e)&&this.parameters.drawAsLabel],[18,e=>this.parameters.draped&&M(e)]]),this._visible=!0,this._configuration=new ae(t,s)}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:s}=this,r=t.draped;s.enableOITOffset=e.enableOITOffset,s.hasSlicePlane=this.parameters.hasSlicePlane,s.hasVerticalOffset=!!this.parameters.verticalOffset,s.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,s.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,s.polygonOffset=this.parameters.polygonOffset,s.draped=r,s.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,s.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,s.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,s.hasRotation=this.parameters.hasRotation,s.hasVVSize=!!this.parameters.vvSize,s.hasVVColor=!!this.parameters.vvColor,s.occludedFragmentFade=!r&&!!this.parameters.occludedFragmentOpacity,s.hasFocusAreaStyle=null!=this.parameters.focusAreaStyle,s.depthTestEnabled=this.parameters.depthEnabled,s.hasVertexColor=this.parameters.hasVertexColor,s.hasVertexSize=this.parameters.hasVertexSize,s.hasVertexRotation=this.parameters.hasVertexRotation,s.hasVertexUVi=this.parameters.hasVertexUVi,s.hasVertexCenterOffset=this.parameters.hasVertexCenterOffset,T(e.output)&&(s.debugDrawLabelBorder=!!U.LABELS_SHOW_BORDER),s.hasOcclusionTexture=!t.drawAsLabel&&s.transparentOccluded&&_(e.output)}intersectRay(e,t,s,r,i,a){const{options:{selectionMode:n,hud:o,excludeLabels:l},point:c,camera:h}=s,{parameters:g}=this;if(n&&o&&(!l||!g.isLabel)&&e.visible&&c&&h)for(const{renderScreenPosition:S,screenSize:x,pixelRatioTolerance:b,halfOutlineSize:v,rotationAngle:O,anchor:z,centerView:P}of this._forEachScreenSpaceHUDInstance(Te,e,t,h))if(fe(c,S[0],S[1],x,b,v,O,g,z)){const e=s.ray;if(xe[0]=c[0],xe[1]=c[1],xe[2]=S[2],h.unprojectFromRenderScreen(xe,me)){const t=y();f(t,e.direction);const s=1/p(t);u(t,t,s);const r=d(e.origin,me)*s,i=y();m(i,P,h.inverseViewMatrix),a(r,r,t,-1,i)}}}*_forEachScreenSpaceHUDInstance(e,t,s,i){const{parameters:n}=this,o=t.attributes.get("featureAttribute"),l=null==o?null:V(o.data,Ve),{scaleX:c,scaleY:h}=Ne(l,n,i.pixelRatio),p=t.attributes.get("position"),d=t.attributes.get("size"),O=t.attributes.get("normal"),z=t.attributes.get("rotation"),y=t.attributes.get("centerOffset"),P=n.size,D=r(ze,s);q(p.size>=3);const R="screen"===n.centerOffsetUnits;for(let r=0;r<p.data.length/p.size;r++){const t=r*p.size;if(g(me,p.data[t],p.data[t+1],p.data[t+2]),m(me,me,s),m(me,me,i.viewMatrix),y){const e=r*y.size;g(ye,y.data[e],y.data[e+1],y.data[e+2])}else g(ye,0,0,0);if(!R&&(me[0]+=ye[0],me[1]+=ye[1],0!==ye[2])){const e=ye[2];S(ye,me),x(me,me,u(ye,ye,e))}const o=r*O.size;g(ge,O.data[o],O.data[o+1],O.data[o+2]),b(ge,ge,D);const{normal:l,cosAngle:V}=he(ge,i,Le),C=qe(n,me,V,i,de);if(v(me,me,l,C),i.applyProjection(me,Se),Se[0]>-1){if(R&&(ye[0]||ye[1])&&(Se[0]+=ye[0]*i.pixelRatio,0!==ye[1]&&(Se[1]+=de.alignmentEvaluator.apply(ye[1])*i.pixelRatio),i.unapplyProjection(Se,me)),Se[0]+=n.screenOffset[0]*i.pixelRatio,Se[1]+=n.screenOffset[1]*i.pixelRatio,Se[0]=Math.floor(Se[0]),Se[1]=Math.floor(Se[1]),Fe[0]=P[0],Fe[1]=P[1],null!=d){const e=r*d.size;Fe[0]*=d.data[e],Fe[1]*=d.data[e+1]}de.evaluator.applyVec2(Fe,Fe);let t=0;if(n.textureIsSignedDistanceField){t=Math.min(n.outlineSize,.5*Fe[0])*i.pixelRatio/2}Fe[0]*=c,Fe[1]*=h,f(e.centerView,me),g(e.renderScreenPosition,Se[0],Se[1],Se[2]),a(e.screenSize,Fe),e.pixelRatioTolerance=Ie*i.pixelRatio,e.halfOutlineSize=t,e.rotationAngle=n.rotation+(null!=z?z.data[r*z.size]:0),e.anchor=te(n),yield e}}}*_forEachDrapedHUDInstance(e,t){const s=t.attributes.get("position"),r=t.attributes.get("size"),i=t.attributes.get("rotation"),n=this.parameters,o=n.size,l=t.attributes.get("featureAttribute"),c=null==l?null:V(l.data,Ve),{scaleX:h,scaleY:f}=Ne(c,n,t.screenToWorldRatio);e.pixelRatioTolerance=Ee*t.screenToWorldRatio,e.anchor=te(n);for(let p=0;p<s.data.length/s.size;p++){const l=p*s.size;if(e.x=s.data[l],e.y=s.data[l+1],Fe[0]=o[0],Fe[1]=o[1],null!=r){const e=p*r.size;Fe[0]*=r.data[e],Fe[1]*=r.data[e+1]}if(e.halfOutlineSize=0,n.textureIsSignedDistanceField){const s=Math.min(n.outlineSize,.5*Fe[0]);e.halfOutlineSize=s*t.screenToWorldRatio/2}Fe[0]*=h,Fe[1]*=f,a(e.screenSize,Fe),e.rotationAngle=n.rotation+(null!=i?i.data[p*i.size]:0),yield e}}intersectRayDraped(e,t,s,r,i){const a=this.parameters;for(const{x:n,y:o,screenSize:l,pixelRatioTolerance:c,halfOutlineSize:h,rotationAngle:f,anchor:p}of this._forEachDrapedHUDInstance(_e,e))fe(s,n,o,l,c,h,f,a,p)&&r(i.distance,i.renderDistance,i.normal,-1)}intersectScreenPolygonDraped(e,t,s,r){if(!s.options.selectionMode||s.options.excludeLabels&&this.parameters.isLabel)return null;const i=this.parameters;for(const{x:a,y:n,screenSize:o,pixelRatioTolerance:l,halfOutlineSize:c,rotationAngle:h,anchor:f}of this._forEachDrapedHUDInstance(_e,e))if(pe(r,a+t[0],n+t[1],o,l,c,h,i,f,!1))return new W(-1);return null}intersectScreenPolygon(e,t,s,r){const{options:{selectionMode:i,hud:a,excludeLabels:n},camera:o}=s,{parameters:l}=this;if(!i||!a||n&&l.isLabel||!e.visible||null==t)return null;const c=new N(1),h=1/o.pixelRatio;for(const{renderScreenPosition:f,screenSize:p,pixelRatioTolerance:u,halfOutlineSize:g,rotationAngle:S,anchor:x,centerView:b}of this._forEachScreenSpaceHUDInstance(Te,e,t,o)){const e=m(me,b,o.inverseViewMatrix);if(!s.screenPolygonPrimitiveProcessor?.validatePoint(e))continue;const t=f[0]*h,i=(o.fullHeight-f[1])*h;if(je[0]=p[0]*h,je[1]=p[1]*h,pe(r,t,i,je,u*h,g*h,S,l,x,!0)){const t=d(o.eye,e);c.updateIfCloserFromValues(t,-1,e,null)}}return c.valid?c:null}createBufferWriter(){return new We(this.parameters)}applyShaderOffsets(e,t,s,i,a,n,o,l){b(be,s,r(ze,i));const c=he(be,o,Le),h=Ge(p(t),o),f=qe(this.parameters,t,c.cosAngle,o,l);v(t,t,c.normal,f+h),v(e,e,be,f+h);const u=n+f;this._applyPolygonOffsetView(t,c,u,o,t),this._applyCenterOffsetView(t,a,t)}applyShaderOffsetsNDC(e,t,s,r,i,a){return this._applyCenterOffsetNDC(e,t,r,i),null!=a&&f(a,i),this._applyPolygonOffsetNDC(i,s,r,i),i}_applyPolygonOffsetView(t,s,r,i,a){const n=i.aboveGround?1:-1;let o=Math.sign(r);0===o&&(o=n);const l=n*o;if(this.parameters.shaderPolygonOffset<=0)return f(a,t);const c=e(Math.abs(s.cosAngle),.01,1),h=1-Math.sqrt(1-c*c)/c/i.viewport[2];return u(a,t,l>0?h:1/h),a}_applyCenterOffsetView(e,t,s){const r="screen"!==this.parameters.centerOffsetUnits;return s!==e&&f(s,e),r&&(s[0]+=t[0],s[1]+=t[1],t[2]&&(S(ge,s),O(s,s,u(ge,ge,t[2])))),s}_applyCenterOffsetNDC(e,t,s,r){const i="screen"!==this.parameters.centerOffsetUnits;return r!==e&&f(r,e),i||(r[0]+=t[0]/s.fullWidth*2,r[1]+=t[1]/s.fullHeight*2),r}_applyPolygonOffsetNDC(e,t,s,r){const i=this.parameters.shaderPolygonOffset;if(e!==r&&f(r,e),i){const e=s.aboveGround?1:-1,a=e*Math.sign(t);r[2]-=(a||e)*i}return r}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:s}=this.parameters,r=e[3]>=ne||t>=ne&&s[3]>=ne;return this._visible&&r}createGLMaterial(e){return new le(e)}calculateRelativeScreenBounds(e,t,s=C()){return ce(this.parameters,e,t,s),s[2]=s[0]+e[0],s[3]=s[1]+e[1],s}}class le extends E{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(ie,e)}}function ce(e,t,s,r){r[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*s,r[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*s}function he(e,t,s){return m(s.normal,e,t.viewInverseTransposeMatrix),s.cosAngle=z(s.normal,Be),s}function fe(e,s,r,i,a,l,c,h,f){const p=ue(s,r,i,a,l,h,f,De);return n(Oe,s,r),o(ve,e,Oe,t(c)),ve[0]>p[0]&&ve[0]<p[2]&&ve[1]>p[1]&&ve[1]<p[3]}function pe(e,s,r,i,a,l,c,h,f,p){const u=ue(s,r,i,a,l,h,f,De,p);if(n(Re,u[0],u[1]),n(Ce,u[2],u[1]),n(we,u[2],u[3]),n(Ae,u[0],u[3]),0!==c){const e=t(c);n(Oe,s,r),o(Re,Re,Oe,e),o(Ce,Ce,Oe,e),o(we,we,Oe,e),o(Ae,Ae,Oe,e),w(u),A(u,Re),A(u,Ce),A(u,we),A(u,Ae)}return!!B(e,u)&&(H(e,Re,Ce,we)||H(e,Re,we,Ae))}function ue(e,t,s,r,i,a,n,o,l=!1){let c=e-r-s[0]*n[0],h=c+s[0]+2*r;const f=l?1-n[1]:n[1];let p=t-r-s[1]*f,u=p+s[1]+2*r;const d=a.distanceFieldBoundingBox;return a.textureIsSignedDistanceField&&null!=d&&(c+=s[0]*d[0],p+=s[1]*(l?1-d[3]:d[1]),h-=s[0]*(1-d[2]),u-=s[1]*(l?d[1]:1-d[3]),c-=i,h+=i,p-=i,u+=i),o[0]=c,o[1]=p,o[2]=h,o[3]=u,o}const de=new G,me=y(),ge=y(),Se=R(),xe=s(),be=y(),ve=h(),Oe=h(),ze=i(),ye=y(),Pe=y(),Ve=R(),De=C(),Re=h(),Ce=h(),we=h(),Ae=h(),je=h();class Ue{constructor(){this.renderScreenPosition=y(),this.screenSize=h(),this.centerView=y(),this.pixelRatioTolerance=0,this.halfOutlineSize=0,this.rotationAngle=0,this.anchor=h()}}class Me{constructor(){this.x=0,this.y=0,this.screenSize=h(),this.pixelRatioTolerance=0,this.halfOutlineSize=0,this.rotationAngle=0,this.anchor=h()}}const Te=new Ue,_e=new Me,Le={normal:y(),cosAngle:0},Ie=1,Ee=2,Fe=c(0,0),Be=P(0,0,1);class He extends I{constructor(){super(...arguments),this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1,this.color=D,this.size=l,this.polygonOffset=0,this.anchorPosition=c(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=D,this.outlineSize=0,this.distanceFieldBoundingBox=R(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.hasVertexColor=!1,this.hasVertexSize=!1,this.hasVertexRotation=!1,this.hasVertexUVi=!1,this.hasVertexCenterOffset=!1,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.focusAreaStyle=null,this.draped=!1,this.isLabel=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class We{constructor(e){this.baseInstanceLayout=se,this.layout=re(e)}elementCount(e){return e.get("position").indices.length}elementCountBaseInstance(e){return e.get("uv0").indices.length}write(e,t,s,r){if(null==r)return;const{buffer:i,offset:a}=r,{position:n,normal:o,color:l,size:c,rotation:h,centerOffset:f,groundDistance:p,featureAttribute:u,uvi:d,olidColor:m}=i;X(s.get("position"),e,n,a),Y(s.get("normal"),t,o,a);const g=s.get("position").indices.length;if(d){const e=s.get("uvi")?.data;if(e&&e.length>=4){const[t,s,r,i]=e;for(let e=0;e<g;++e){const n=a+e;d.setValues(n,t,s,r,i)}}}if(l&&k(s.get("color"),4,l,a),c&&J(s.get("size"),c,a),h&&K(s.get("rotation"),h,a),f&&(s.get("centerOffset")?Q(s.get("centerOffset"),f,a):Z(f,a,g)),s.get("groundDistance")?K(s.get("groundDistance"),p,a):Z(p,a,g),u&&(s.get("featureAttribute")?$(s.get("featureAttribute"),u,a):Z(u,a,g)),null!=m){const e=s.get("olidColor");null!=e?k(e,4,m,a):Z(m,a,g)}}writeBaseInstance(e,t){const{uv0:s}=t;J(e.get("uv0"),s,0)}}function Ne(e,t,s){return null==e||null==t.vvSize?{scaleX:s,scaleY:s}:(j(Pe,t,e),{scaleX:Pe[0]*s,scaleY:Pe[1]*s})}function Ge(e,t){const s=t.computeRenderPixelSizeAtDist(e)*L;return(t.aboveGround?1:-1)*s}function qe(e,t,s,r,i){if(!e.verticalOffset?.screenLength){const r=p(t);return i.update(s,r,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),0}const a=p(t),n=e.screenSizePerspectiveAlignment??e.screenSizePerspective,o=ee(r,a,e.verticalOffset,s,n,e.screenSizePerspectiveMinPixelReferenceSize);return i.update(s,a,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),o}export{oe as HUDMaterial,He as Parameters};
2
+ import{clamp as e,deg2rad as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as s}from"../../../../core/screenUtils.js";import{fromMat4 as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{copy as a,set as n,rotate as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{ONES as l,fromValues as c,create as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as f,length as p,scale as u,distance as d,transformMat4 as m,set as g,normalize as S,subtract as x,transformMat3 as b,scaleAndAdd as v,sub as O,dot as z}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as y,fromValues as P}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as V,ONES as D,create as R}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as C,empty as w,expandPointInPlace as A}from"../../../../geometry/support/aaBoundingRect.js";import{evaluateModelTransformScale as j}from"../../layers/support/FastSymbolUpdates.js";import{debugFlags as T}from"../../support/debugFlags.js";import{isColorHighlightOrOLID as U,isColor as M,isOIT as _}from"../core/shaderLibrary/ShaderOutput.js";import{HUDVerticalPixelOffset as L}from"../core/shaderLibrary/hud/HUD.glsl.js";import{GLTextureMaterialBindParameters as I,GLTextureMaterial as E}from"../lib/GLTextureMaterial.js";import{Material as F}from"../lib/Material.js";import{screenPolygonIntersectsBounds as B,screenPolygonIntersectsTriangle as H}from"../lib/screenPolygonOverlapUtils.js";import{DrapedHit as W,Hit as N}from"../lib/screenPolygonTriangleIntersections.js";import{SeparateScreenSizePerspectiveEvaluators as G}from"../lib/screenSizePerspectiveUtils.js";import{assert as q}from"../lib/Util.js";import{writePosition as X,writeNormal as Y,writeColor as k,writeBufferVec2 as J,writeBufferFloat as K,writeBufferVec3 as Q,writeBufferZeros as Z,writeBufferVec4 as $}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as ee}from"./internal/MaterialUtil.js";import{a as te}from"../../../../chunks/HUDMaterial.glsl.js";import{baseLayout as se,getInstanceLayout as re,HUDMaterialTechnique as ie}from"../shaders/HUDMaterialTechnique.js";import{HUDMaterialTechniqueConfiguration as ae}from"../shaders/HUDMaterialTechniqueConfiguration.js";import{alphaCutoff as ne}from"../../../../webscene/support/AlphaCutoff.js";class oe extends F{constructor(e,t,s=!1){super(e,He),this.geometryType=1,this.produces=new Map([[12,e=>U(e)&&!this.parameters.drawAsLabel&&!this._configuration.transparentOccluded],[13,e=>U(e)&&!this.parameters.drawAsLabel&&this._configuration.transparentOccluded],[14,e=>U(e)&&this.parameters.drawAsLabel],[18,e=>this.parameters.draped&&U(e)]]),this._visible=!0,this._configuration=new ae(t,s)}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:s}=this,r=t.draped;s.enableOITOffset=e.enableOITOffset,s.hasSlicePlane=this.parameters.hasSlicePlane,s.hasVerticalOffset=!!this.parameters.verticalOffset,s.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,s.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,s.polygonOffset=this.parameters.polygonOffset,s.draped=r,s.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,s.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,s.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,s.hasRotation=this.parameters.hasRotation,s.hasVVSize=!!this.parameters.vvSize,s.hasVVColor=!!this.parameters.vvColor,s.occludedFragmentFade=!r&&!!this.parameters.occludedFragmentOpacity,s.hasFocusAreaStyle=null!=this.parameters.focusAreaStyle,s.depthTestEnabled=this.parameters.depthEnabled,s.hasVertexColor=this.parameters.hasVertexColor,s.hasVertexSize=this.parameters.hasVertexSize,s.hasVertexRotation=this.parameters.hasVertexRotation,s.hasVertexUVi=this.parameters.hasVertexUVi,s.hasVertexCenterOffset=this.parameters.hasVertexCenterOffset,M(e.output)&&(s.debugDrawLabelBorder=!!T.LABELS_SHOW_BORDER),s.hasOcclusionTexture=!t.drawAsLabel&&s.transparentOccluded&&_(e.output)}intersectRay(e,t,s,r,i,a){const{options:{selectionMode:n,hud:o,excludeLabels:l},point:c,camera:h}=s,{parameters:g}=this;if(n&&o&&(!l||!g.isLabel)&&e.visible&&c&&h)for(const{renderScreenPosition:S,screenSize:x,pixelRatioTolerance:b,halfOutlineSize:v,rotationAngle:O,anchor:z,centerView:P}of this._forEachScreenSpaceHUDInstance(Me,e,t,h))if(fe(c,S[0],S[1],x,b,v,O,g,z)){const e=s.ray;if(xe[0]=c[0],xe[1]=c[1],xe[2]=S[2],h.unprojectFromRenderScreen(xe,me)){const t=y();f(t,e.direction);const s=1/p(t);u(t,t,s);const r=d(e.origin,me)*s,i=y();m(i,P,h.inverseViewMatrix),a(r,r,t,-1,i)}}}*_forEachScreenSpaceHUDInstance(e,t,s,i){const{parameters:n}=this,o=t.attributes.get("featureAttribute"),l=null==o?null:V(o.data,Ve),{scaleX:c,scaleY:h}=Ne(l,n,i.pixelRatio),p=t.attributes.get("position"),d=t.attributes.get("size"),O=t.attributes.get("normal"),z=t.attributes.get("rotation"),y=t.attributes.get("centerOffset"),P=n.size,D=r(ze,s);q(p.size>=3);const R="screen"===n.centerOffsetUnits;for(let r=0;r<p.data.length/p.size;r++){const t=r*p.size;if(g(me,p.data[t],p.data[t+1],p.data[t+2]),m(me,me,s),m(me,me,i.viewMatrix),y){const e=r*y.size;g(ye,y.data[e],y.data[e+1],y.data[e+2])}else g(ye,0,0,0);if(!R&&(me[0]+=ye[0],me[1]+=ye[1],0!==ye[2])){const e=ye[2];S(ye,me),x(me,me,u(ye,ye,e))}const o=r*O.size;g(ge,O.data[o],O.data[o+1],O.data[o+2]),b(ge,ge,D);const{normal:l,cosAngle:V}=he(ge,i,Le),C=qe(n,me,V,i,de);if(v(me,me,l,C),i.applyProjection(me,Se),Se[0]>-1){if(R&&(ye[0]||ye[1])&&(Se[0]+=ye[0]*i.pixelRatio,0!==ye[1]&&(Se[1]+=de.alignmentEvaluator.apply(ye[1])*i.pixelRatio),i.unapplyProjection(Se,me)),Se[0]+=n.screenOffset[0]*i.pixelRatio,Se[1]+=n.screenOffset[1]*i.pixelRatio,Se[0]=Math.floor(Se[0]),Se[1]=Math.floor(Se[1]),Fe[0]=P[0],Fe[1]=P[1],null!=d){const e=r*d.size;Fe[0]*=d.data[e],Fe[1]*=d.data[e+1]}de.evaluator.applyVec2(Fe,Fe);let t=0;if(n.textureIsSignedDistanceField){t=Math.min(n.outlineSize,.5*Fe[0])*i.pixelRatio/2}Fe[0]*=c,Fe[1]*=h,f(e.centerView,me),g(e.renderScreenPosition,Se[0],Se[1],Se[2]),a(e.screenSize,Fe),e.pixelRatioTolerance=Ie*i.pixelRatio,e.halfOutlineSize=t,e.rotationAngle=n.rotation+(null!=z?z.data[r*z.size]:0),e.anchor=te(n),yield e}}}*_forEachDrapedHUDInstance(e,t){const s=t.attributes.get("position"),r=t.attributes.get("size"),i=t.attributes.get("rotation"),n=this.parameters,o=n.size,l=t.attributes.get("featureAttribute"),c=null==l?null:V(l.data,Ve),{scaleX:h,scaleY:f}=Ne(c,n,t.screenToWorldRatio);e.pixelRatioTolerance=Ee*t.screenToWorldRatio,e.anchor=te(n);for(let p=0;p<s.data.length/s.size;p++){const l=p*s.size;if(e.x=s.data[l],e.y=s.data[l+1],Fe[0]=o[0],Fe[1]=o[1],null!=r){const e=p*r.size;Fe[0]*=r.data[e],Fe[1]*=r.data[e+1]}if(e.halfOutlineSize=0,n.textureIsSignedDistanceField){const s=Math.min(n.outlineSize,.5*Fe[0]);e.halfOutlineSize=s*t.screenToWorldRatio/2}Fe[0]*=h,Fe[1]*=f,a(e.screenSize,Fe),e.rotationAngle=n.rotation+(null!=i?i.data[p*i.size]:0),yield e}}intersectRayDraped(e,t,s,r,i){const a=this.parameters;for(const{x:n,y:o,screenSize:l,pixelRatioTolerance:c,halfOutlineSize:h,rotationAngle:f,anchor:p}of this._forEachDrapedHUDInstance(_e,e))fe(s,n,o,l,c,h,f,a,p)&&r(i.distance,i.renderDistance,i.normal,-1)}intersectScreenPolygonDraped(e,t,s,r){if(!s.options.selectionMode||s.options.excludeLabels&&this.parameters.isLabel)return null;const i=this.parameters;for(const{x:a,y:n,screenSize:o,pixelRatioTolerance:l,halfOutlineSize:c,rotationAngle:h,anchor:f}of this._forEachDrapedHUDInstance(_e,e))if(pe(r,a+t[0],n+t[1],o,l,c,h,i,f,!1))return new W(-1);return null}intersectScreenPolygon(e,t,s,r){const{options:{selectionMode:i,hud:a,excludeLabels:n},camera:o}=s,{parameters:l}=this;if(!i||!a||n&&l.isLabel||!e.visible||null==t)return null;const c=new N(1),h=1/o.pixelRatio;for(const{renderScreenPosition:f,screenSize:p,pixelRatioTolerance:u,halfOutlineSize:g,rotationAngle:S,anchor:x,centerView:b}of this._forEachScreenSpaceHUDInstance(Me,e,t,o)){const e=m(me,b,o.inverseViewMatrix);if(!s.screenPolygonPrimitiveProcessor?.validatePoint(e))continue;const t=f[0]*h,i=(o.fullHeight-f[1])*h;if(je[0]=p[0]*h,je[1]=p[1]*h,pe(r,t,i,je,u*h,g*h,S,l,x,!0)){const t=d(o.eye,e);c.updateIfCloserFromValues(t,-1,e,null)}}return c.valid?c:null}createBufferWriter(){return new We(this.parameters)}applyShaderOffsets(e,t,s,i,a,n,o,l){b(be,s,r(ze,i));const c=he(be,o,Le),h=Ge(p(t),o),f=qe(this.parameters,t,c.cosAngle,o,l);v(t,t,c.normal,f+h),v(e,e,be,f+h);const u=n+f;this._applyPolygonOffsetView(t,c,u,o,t),this._applyCenterOffsetView(t,a,t)}applyShaderOffsetsNDC(e,t,s,r,i,a){return this._applyCenterOffsetNDC(e,t,r,i),null!=a&&f(a,i),this._applyPolygonOffsetNDC(i,s,r,i),i}_applyPolygonOffsetView(t,s,r,i,a){const n=i.aboveGround?1:-1;let o=Math.sign(r);0===o&&(o=n);const l=n*o;if(this.parameters.shaderPolygonOffset<=0)return f(a,t);const c=e(Math.abs(s.cosAngle),.01,1),h=1-Math.sqrt(1-c*c)/c/i.viewport[2];return u(a,t,l>0?h:1/h),a}_applyCenterOffsetView(e,t,s){const r="screen"!==this.parameters.centerOffsetUnits;return s!==e&&f(s,e),r&&(s[0]+=t[0],s[1]+=t[1],t[2]&&(S(ge,s),O(s,s,u(ge,ge,t[2])))),s}_applyCenterOffsetNDC(e,t,s,r){const i="screen"!==this.parameters.centerOffsetUnits;return r!==e&&f(r,e),i||(r[0]+=t[0]/s.fullWidth*2,r[1]+=t[1]/s.fullHeight*2),r}_applyPolygonOffsetNDC(e,t,s,r){const i=this.parameters.shaderPolygonOffset;if(e!==r&&f(r,e),i){const e=s.aboveGround?1:-1,a=e*Math.sign(t);r[2]-=(a||e)*i}return r}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:s}=this.parameters,r=e[3]>=ne||t>=ne&&s[3]>=ne;return this._visible&&r}createGLMaterial(e){return new le(e)}calculateRelativeScreenBounds(e,t,s=C()){return ce(this.parameters,e,t,s),s[2]=s[0]+e[0],s[3]=s[1]+e[1],s}}class le extends E{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(ie,e)}}function ce(e,t,s,r){r[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*s,r[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*s}function he(e,t,s){return m(s.normal,e,t.viewInverseTransposeMatrix),s.cosAngle=z(s.normal,Be),s}function fe(e,s,r,i,a,l,c,h,f){const p=ue(s,r,i,a,l,h,f,De);return n(Oe,s,r),o(ve,e,Oe,t(c)),ve[0]>p[0]&&ve[0]<p[2]&&ve[1]>p[1]&&ve[1]<p[3]}function pe(e,s,r,i,a,l,c,h,f,p){const u=ue(s,r,i,a,l,h,f,De,p);if(n(Re,u[0],u[1]),n(Ce,u[2],u[1]),n(we,u[2],u[3]),n(Ae,u[0],u[3]),0!==c){const e=t(c);n(Oe,s,r),o(Re,Re,Oe,e),o(Ce,Ce,Oe,e),o(we,we,Oe,e),o(Ae,Ae,Oe,e),w(u),A(u,Re),A(u,Ce),A(u,we),A(u,Ae)}return!!B(e,u)&&(H(e,Re,Ce,we)||H(e,Re,we,Ae))}function ue(e,t,s,r,i,a,n,o,l=!1){let c=e-r-s[0]*n[0],h=c+s[0]+2*r;const f=l?1-n[1]:n[1];let p=t-r-s[1]*f,u=p+s[1]+2*r;const d=a.distanceFieldBoundingBox;return a.textureIsSignedDistanceField&&null!=d&&(c+=s[0]*d[0],p+=s[1]*(l?1-d[3]:d[1]),h-=s[0]*(1-d[2]),u-=s[1]*(l?d[1]:1-d[3]),c-=i,h+=i,p-=i,u+=i),o[0]=c,o[1]=p,o[2]=h,o[3]=u,o}const de=new G,me=y(),ge=y(),Se=R(),xe=s(),be=y(),ve=h(),Oe=h(),ze=i(),ye=y(),Pe=y(),Ve=R(),De=C(),Re=h(),Ce=h(),we=h(),Ae=h(),je=h();class Te{constructor(){this.renderScreenPosition=y(),this.screenSize=h(),this.centerView=y(),this.pixelRatioTolerance=0,this.halfOutlineSize=0,this.rotationAngle=0,this.anchor=h()}}class Ue{constructor(){this.x=0,this.y=0,this.screenSize=h(),this.pixelRatioTolerance=0,this.halfOutlineSize=0,this.rotationAngle=0,this.anchor=h()}}const Me=new Te,_e=new Ue,Le={normal:y(),cosAngle:0},Ie=1,Ee=2,Fe=c(0,0),Be=P(0,0,1);class He extends I{constructor(){super(...arguments),this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1,this.color=D,this.size=l,this.polygonOffset=0,this.anchorPosition=c(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=D,this.outlineSize=0,this.distanceFieldBoundingBox=R(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.hasVertexColor=!1,this.hasVertexSize=!1,this.hasVertexRotation=!1,this.hasVertexUVi=!1,this.hasVertexCenterOffset=!1,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.focusAreaStyle=null,this.draped=!1,this.isLabel=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class We{constructor(e){this.baseInstanceLayout=se,this.layout=re(e)}elementCount(e){return e.get("position").indices.length}elementCountBaseInstance(e){return e.get("uv0").indices.length}write(e,t,s,r){if(null==r)return;const{buffer:i,offset:a}=r,{position:n,normal:o,color:l,size:c,rotation:h,centerOffset:f,groundDistance:p,featureAttribute:u,uvi:d,olidColor:m}=i;X(s.get("position"),e,n,a),Y(s.get("normal"),t,o,a);const g=s.get("position").indices.length;if(d){const e=s.get("uvi")?.data;if(e&&e.length>=4){const[t,s,r,i]=e;for(let e=0;e<g;++e){const n=a+e;d.setValues(n,t,s,r,i)}}}if(l&&k(s.get("color"),4,l,a),c&&J(s.get("size"),c,a),h&&K(s.get("rotation"),h,a),f&&(s.get("centerOffset")?Q(s.get("centerOffset"),f,a):Z(f,a,g)),s.get("groundDistance")?K(s.get("groundDistance"),p,a):Z(p,a,g),u&&(s.get("featureAttribute")?$(s.get("featureAttribute"),u,a):Z(u,a,g)),null!=m){const e=s.get("olidColor");null!=e?k(e,4,m,a):Z(m,a,g)}}writeBaseInstance(e,t){const{uv0:s}=t;J(e.get("uv0"),s,0)}}function Ne(e,t,s){return null==e||null==t.vvSize?{scaleX:s,scaleY:s}:(j(Pe,t,e),{scaleX:Pe[0]*s,scaleY:Pe[1]*s})}function Ge(e,t){const s=t.computeRenderPixelSizeAtDist(e)*L;return(t.aboveGround?1:-1)*s}function qe(e,t,s,r,i){if(!e.verticalOffset?.screenLength){const r=p(t);return i.update(s,r,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),0}const a=p(t),n=e.screenSizePerspectiveAlignment??e.screenSizePerspective,o=ee(r,a,e.verticalOffset,s,n,e.screenSizePerspectiveMinPixelReferenceSize);return i.update(s,a,e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize,e.screenSizePerspectiveAlignment,null),o}export{oe as HUDMaterial,He as Parameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{set as t,squaredDistance as e}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{isColor as s}from"../core/shaderLibrary/ShaderOutput.js";import i from"../lib/GLMaterial.js";import{Material as n}from"../lib/Material.js";import{writePosition2d as a,writeBufferFloat as o}from"./internal/bufferWriterUtils.js";import{attributeDrivenInstanceLayout as u,instanceLayout as c,HeatmapDensityPassParameters as l,HeatmapDensityTechnique as f,baseLayout as p}from"../shaders/HeatmapDensityTechnique.js";import{HeatmapDensityTechniqueConfiguration as m}from"../shaders/HeatmapDensityTechniqueConfiguration.js";const h=2;class d extends l{constructor(){super(...arguments),this.isAttributeDriven=!1,this.usesHalfFloats=!1}}class b extends n{constructor(t){super(t,d),this.visible=!0,this.produces=new Map([[18,t=>s(t)]]),this.intersectScreenPolygonDraped=void 0,this._configuration=new m}updateConfiguration(t){super.updateConfiguration(t),this._configuration.isAttributeDriven=this.parameters.isAttributeDriven,this._configuration.usesHalfFloat=this.parameters.usesHalfFloats}createGLMaterial(t){return new g(t)}intersectRay(){}intersectRayDraped(r,s,i,n,a){const o=r.attributes.get("position"),{parameters:u}=this,{searchRadius:c}=u,{screenToWorldRatio:l}=r,f=c*l+h*l,p=f*f,m=o.data.length/o.size;for(let h=0;h<m;h++){const r=h*o.size,s=t(y,o.data[r],o.data[r+1]);e(s,i)<p&&n(a.distance,a.renderDistance,a.normal,-1)}}intersectScreenPolygon(){return null}createBufferWriter(){return new v(this.parameters.isAttributeDriven?u:c)}}class g extends i{beginSlot(t){return this.getTechnique(f,t)}}class v{constructor(t){this.layout=t,this.baseInstanceLayout=p}elementCount(t){return t.get("position").indices.length}elementCountBaseInstance(){return 4}write(t,e,r,s){if(null==s)return;const{buffer:i,offset:n}=s;a(r.get("position"),t,i.position,n);const u="featureAttribute"in i?i.featureAttribute:null;u&&o(r.get("featureAttribute"),u,n)}writeBaseInstance(t,e){const r=e.uv0;r.setValues(0,-1,-1),r.setValues(1,-1,1),r.setValues(2,1,-1),r.setValues(3,1,1)}}const y=r();export{b as HeatmapDensityMaterial,d as Parameters};
2
+ import{set as t,squaredDistance as e}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{isColor as s}from"../core/shaderLibrary/ShaderOutput.js";import i from"../lib/GLMaterial.js";import{Material as n}from"../lib/Material.js";import{writePosition2d as a,writeBufferFloat as o}from"./internal/bufferWriterUtils.js";import{attributeDrivenInstanceLayout as u,instanceLayout as c,HeatmapDensityPassParameters as l,HeatmapDensityTechnique as f,baseLayout as p}from"../shaders/HeatmapDensityTechnique.js";import{HeatmapDensityTechniqueConfiguration as m}from"../shaders/HeatmapDensityTechniqueConfiguration.js";const h=2;class d extends l{constructor(){super(...arguments),this.isAttributeDriven=!1,this.usesHalfFloats=!1}}class g extends n{constructor(t){super(t,d),this.geometryType=1,this.visible=!0,this.produces=new Map([[18,t=>s(t)]]),this.intersectScreenPolygonDraped=void 0,this._configuration=new m}updateConfiguration(t){super.updateConfiguration(t),this._configuration.isAttributeDriven=this.parameters.isAttributeDriven,this._configuration.usesHalfFloat=this.parameters.usesHalfFloats}createGLMaterial(t){return new b(t)}intersectRay(){}intersectRayDraped(r,s,i,n,a){const o=r.attributes.get("position"),{parameters:u}=this,{searchRadius:c}=u,{screenToWorldRatio:l}=r,f=c*l+h*l,p=f*f,m=o.data.length/o.size;for(let h=0;h<m;h++){const r=h*o.size,s=t(v,o.data[r],o.data[r+1]);e(s,i)<p&&n(a.distance,a.renderDistance,a.normal,-1)}}intersectScreenPolygon(){return null}createBufferWriter(){return new y(this.parameters.isAttributeDriven?u:c)}}class b extends i{beginSlot(t){return this.getTechnique(f,t)}}class y{constructor(t){this.layout=t,this.baseInstanceLayout=p}elementCount(t){return t.get("position").indices.length}elementCountBaseInstance(){return 4}write(t,e,r,s){if(null==s)return;const{buffer:i,offset:n}=s;a(r.get("position"),t,i.position,n);const u="featureAttribute"in i?i.featureAttribute:null;u&&o(r.get("featureAttribute"),u,n)}writeBaseInstance(t,e){const r=e.uv0;r.setValues(0,-1,-1),r.setValues(1,-1,1),r.setValues(2,1,-1),r.setValues(3,1,1)}}const v=r();export{g as HeatmapDensityMaterial,d as Parameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{safeToString as e}from"../../../../core/string.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColor as r}from"../core/shaderLibrary/ShaderOutput.js";import i from"../lib/GLMaterial.js";import{Material as s,MaterialParameters as n}from"../lib/Material.js";import{writeBufferVec2 as a,writePosition as o,writeNormal as c,writeBufferVec3 as l,writeBufferFloat as u}from"./internal/bufferWriterUtils.js";import{LineCalloutTechnique as h,layout as f,baseLayout as p}from"../shaders/LineCalloutTechnique.js";import{LineCalloutTechniqueConfiguration as d}from"../shaders/LineCalloutTechniqueConfiguration.js";import{alphaCutoff as g}from"../../../../webscene/support/AlphaCutoff.js";class m extends s{constructor(e,t){super(e,$),this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[15,e=>r(e)],[16,e=>r(e)]]),this._configuration=new d(t),this._uniqueMaterialIdentifier=S(this.parameters)}passParameters(){return this.parameters}updateConfiguration(e){super.updateConfiguration(e),this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hudDepth=16===e.slot,this._configuration.hudDepthAlignStart=!!this.parameters.hudDepthAlignStart,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane}get visible(){return this.parameters.color[3]>=g||(this.parameters.borderColor?.[3]??0)>=g}intersectRay(){}intersectScreenPolygon(){return null}createGLMaterial(e){return new O(e)}createBufferWriter(){return new b}validateParameters(e){this._uniqueMaterialIdentifier=S(e)}get uniqueMaterialIdentifier(){return this._uniqueMaterialIdentifier}}function S({renderOccluded:t,isDecoration:r,horizontalScreenOffset:i,color:s,size:n,shaderPolygonOffset:a,hudDepthAlignStart:o,centerOffsetUnits:c,hasSlicePlane:l,screenSizePerspective:u,verticalOffset:h,borderColor:f}){return e`${t}:${r}:${i}:[${s}]:${n}:${a}:${o}:${c}:${l}:${null!=u}:{${h?.screenLength}:${h?.minWorldLength}:${h?.maxWorldLength}}:[${f}]`}class O extends i{beginSlot(e){return this.getTechnique(h,e)}}class $ extends n{constructor(){super(...arguments),this.horizontalScreenOffset=0,this.color=t(0,0,0,1),this.size=1,this.shaderPolygonOffset=1e-5,this.hudDepthAlignStart=!1,this.centerOffsetUnits="world",this.hasSlicePlane=!1}}class b{constructor(){this.layout=f,this.baseInstanceLayout=p}elementCount(e){return e.get("position").indices.length}elementCountBaseInstance(e){return e.get("uv0").indices.length}writeBaseInstance(e,t){const{uv0:r}=t;a(e.get("uv0"),r,0)}write(e,t,r,i){if(null==i)return;const{buffer:s,offset:n}=i;o(r.get("position"),e,s.position,n),c(r.get("normal"),t,s.normal,n),l(r.get("centerOffset"),s.centerOffset,n),u(r.get("groundDistance"),s.groundDistance,n)}}export{m as LineCalloutMaterial,$ as Parameters,S as uniqueMaterialIdentifier};
2
+ import{safeToString as e}from"../../../../core/string.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColor as r}from"../core/shaderLibrary/ShaderOutput.js";import i from"../lib/GLMaterial.js";import{Material as s,MaterialParameters as n}from"../lib/Material.js";import{writeBufferVec2 as a,writePosition as o,writeNormal as c,writeBufferVec3 as l,writeBufferFloat as u}from"./internal/bufferWriterUtils.js";import{LineCalloutTechnique as h,layout as f,baseLayout as p}from"../shaders/LineCalloutTechnique.js";import{LineCalloutTechniqueConfiguration as d}from"../shaders/LineCalloutTechniqueConfiguration.js";import{alphaCutoff as g}from"../../../../webscene/support/AlphaCutoff.js";class m extends s{constructor(e,t){super(e,$),this.geometryType=1,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[15,e=>r(e)],[16,e=>r(e)]]),this._configuration=new d(t),this._uniqueMaterialIdentifier=S(this.parameters)}passParameters(){return this.parameters}updateConfiguration(e){super.updateConfiguration(e),this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hudDepth=16===e.slot,this._configuration.hudDepthAlignStart=!!this.parameters.hudDepthAlignStart,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane}get visible(){return this.parameters.color[3]>=g||(this.parameters.borderColor?.[3]??0)>=g}intersectRay(){}intersectScreenPolygon(){return null}createGLMaterial(e){return new O(e)}createBufferWriter(){return new b}validateParameters(e){this._uniqueMaterialIdentifier=S(e)}get uniqueMaterialIdentifier(){return this._uniqueMaterialIdentifier}}function S({renderOccluded:t,isDecoration:r,horizontalScreenOffset:i,color:s,size:n,shaderPolygonOffset:a,hudDepthAlignStart:o,centerOffsetUnits:c,hasSlicePlane:l,screenSizePerspective:u,verticalOffset:h,borderColor:f}){return e`${t}:${r}:${i}:[${s}]:${n}:${a}:${o}:${c}:${l}:${null!=u}:{${h?.screenLength}:${h?.minWorldLength}:${h?.maxWorldLength}}:[${f}]`}class O extends i{beginSlot(e){return this.getTechnique(h,e)}}class $ extends n{constructor(){super(...arguments),this.horizontalScreenOffset=0,this.color=t(0,0,0,1),this.size=1,this.shaderPolygonOffset=1e-5,this.hudDepthAlignStart=!1,this.centerOffsetUnits="world",this.hasSlicePlane=!1}}class b{constructor(){this.layout=f,this.baseInstanceLayout=p}elementCount(e){return e.get("position").indices.length}elementCountBaseInstance(e){return e.get("uv0").indices.length}writeBaseInstance(e,t){const{uv0:r}=t;a(e.get("uv0"),r,0)}write(e,t,r,i){if(null==i)return;const{buffer:s,offset:n}=i;o(r.get("position"),e,s.position,n),c(r.get("normal"),t,s.normal,n),l(r.get("centerOffset"),s.centerOffset,n),u(r.get("groundDistance"),s.groundDistance,n)}}export{m as LineCalloutMaterial,$ as Parameters,S as uniqueMaterialIdentifier};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{set as e,equals as t,transformMat4 as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{makeFloat16Array as s}from"../../../../geometry/support/float16.js";import{isColor as a,isDepth as o,isColorHighlightOLIDOrDepth as n}from"../core/shaderLibrary/ShaderOutput.js";import h from"../lib/GLMaterial.js";import{Material as c}from"../lib/Material.js";import{VisualVariablePassParameters as l}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as m}from"./internal/bufferWriterUtils.js";import{getLayout as p,LineMarkerTechnique as u}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as d}from"../shaders/LineMarkerTechniqueConfiguration.js";import{alphaCutoff as f}from"../../../../webscene/support/AlphaCutoff.js";class g extends c{constructor(e,t){super(e,v),this.produces=new Map([[2,e=>10===e||a(e)&&8===this.parameters.renderOccluded],[3,e=>o(e)],[10,e=>n(e)&&8===this.parameters.renderOccluded],[11,e=>n(e)&&8===this.parameters.renderOccluded],[4,e=>a(e)],[18,e=>a(e)||10===e]]),this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this._configuration=new d(t)}updateConfiguration(e){super.updateConfiguration(e),this._configuration.space=18===e.slot?0:this.parameters.worldSpace?2:1,this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=0!==this.parameters.cap,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasOccludees=e.hasOccludees,this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.occluder=8===this.parameters.renderOccluded,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective}get visible(){return this.parameters.color[3]>=f}intersectRay(){}intersectScreenPolygon(){return null}createBufferWriter(){return new S(p(this.parameters),this.parameters)}createGLMaterial(e){return new _(e)}}class _ extends h{dispose(){super.dispose(),this._markerTextures?.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){const t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this.getTechnique(u,e)}}class v extends l{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive="arrow",this.placement="end",this.cap=0,this.anchor=0,this.hasTip=!1,this.worldSpace=!1,this.hideOnShortSegments=!1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.stipplePattern=null,this.markerTexture=null}}class S{constructor(e,t){this.layout=e,this._parameters=t}elementCount(){return"begin-end"===this._parameters.placement?12:6}write(i,a,o,n){if(null==n)return;const{buffer:h,offset:c}=n,l=o.get("position").data,p=l.length/3;let u=[1,0,0];const d=o.get("normal");this._parameters.worldSpace&&null!=d&&(u=d.data);let f=1,g=0;this._parameters.vvSize?g=o.get("sizeFeatureAttribute").data[0]:o.has("size")&&(f=o.get("size").data[0]);let _=[1,1,1,1],v=0;this._parameters.vvColor?v=o.get("colorFeatureAttribute").data[0]:o.has("color")&&(_=o.get("color").data);let S=0;this._parameters.vvOpacity&&(S=o.get("opacityFeatureAttribute").data[0]);const w=new Float32Array(h.buffer),y=s(h.buffer),O=new Uint8Array(h.buffer);let T=c*(this.layout.stride/4);const V=w.BYTES_PER_ELEMENT/y.BYTES_PER_ELEMENT,k=4/V,j=(e,t,r,i)=>{w[T++]=e[0],w[T++]=e[1],w[T++]=e[2],m(t,e,y,T*V),T+=k;let s=T*V;if(y[s++]=r[0],y[s++]=r[1],T=Math.ceil(s/V),this._parameters.vvColor)w[T++]=v;else{const e=Math.min(4*i,_.length-4),t=4*T++;O[t]=255*_[e],O[t+1]=255*_[e+1],O[t+2]=255*_[e+2],O[t+3]=255*_[e+3]}this._parameters.vvOpacity&&(w[T++]=S),s=T*V,this._parameters.vvSize?(w[T++]=g,s+=2):y[s++]=f,this._parameters.worldSpace&&(y[s++]=u[0],y[s++]=u[1],y[s++]=u[2]),T=Math.ceil(s/V)},M=(s,a)=>{const o=e(b,l[3*s],l[3*s+1],l[3*s+2]),n=P;let h=s+a;do{e(n,l[3*h],l[3*h+1],l[3*h+2]),h+=a}while(t(o,n)&&h>=0&&h<p);i&&(r(o,o,i),r(n,n,i)),j(o,n,[-1,-1],s),j(o,n,[1,-1],s),j(o,n,[1,1],s),j(o,n,[-1,-1],s),j(o,n,[1,1],s),j(o,n,[-1,1],s)},x=this._parameters.placement;"begin"!==x&&"begin-end"!==x||M(0,1),"end"!==x&&"begin-end"!==x||M(p-1,-1)}}const b=i(),P=i();export{g as LineMarkerMaterial,v as Parameters};
2
+ import{set as e,equals as t,transformMat4 as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{makeFloat16Array as s}from"../../../../geometry/support/float16.js";import{isColor as a,isDepth as o,isColorHighlightOLIDOrDepth as n}from"../core/shaderLibrary/ShaderOutput.js";import h from"../lib/GLMaterial.js";import{Material as c}from"../lib/Material.js";import{VisualVariablePassParameters as l}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as m}from"./internal/bufferWriterUtils.js";import{getLayout as p,LineMarkerTechnique as u}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as d}from"../shaders/LineMarkerTechniqueConfiguration.js";import{alphaCutoff as f}from"../../../../webscene/support/AlphaCutoff.js";class g extends c{constructor(e,t){super(e,v),this.geometryType=2,this.produces=new Map([[2,e=>10===e||a(e)&&8===this.parameters.renderOccluded],[3,e=>o(e)],[10,e=>n(e)&&8===this.parameters.renderOccluded],[11,e=>n(e)&&8===this.parameters.renderOccluded],[4,e=>a(e)],[18,e=>a(e)||10===e]]),this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this._configuration=new d(t)}updateConfiguration(e){super.updateConfiguration(e),this._configuration.space=18===e.slot?0:this.parameters.worldSpace?2:1,this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=0!==this.parameters.cap,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasOccludees=e.hasOccludees,this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.occluder=8===this.parameters.renderOccluded,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective}get visible(){return this.parameters.color[3]>=f}intersectRay(){}intersectScreenPolygon(){return null}createBufferWriter(){return new S(p(this.parameters),this.parameters)}createGLMaterial(e){return new _(e)}}class _ extends h{dispose(){super.dispose(),this._markerTextures?.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){const t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this.getTechnique(u,e)}}class v extends l{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive="arrow",this.placement="end",this.cap=0,this.anchor=0,this.hasTip=!1,this.worldSpace=!1,this.hideOnShortSegments=!1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.stipplePattern=null,this.markerTexture=null}}class S{constructor(e,t){this.layout=e,this._parameters=t}elementCount(){return"begin-end"===this._parameters.placement?12:6}write(i,a,o,n){if(null==n)return;const{buffer:h,offset:c}=n,l=o.get("position").data,p=l.length/3;let u=[1,0,0];const d=o.get("normal");this._parameters.worldSpace&&null!=d&&(u=d.data);let f=1,g=0;this._parameters.vvSize?g=o.get("sizeFeatureAttribute").data[0]:o.has("size")&&(f=o.get("size").data[0]);let _=[1,1,1,1],v=0;this._parameters.vvColor?v=o.get("colorFeatureAttribute").data[0]:o.has("color")&&(_=o.get("color").data);let S=0;this._parameters.vvOpacity&&(S=o.get("opacityFeatureAttribute").data[0]);const y=new Float32Array(h.buffer),w=s(h.buffer),T=new Uint8Array(h.buffer);let O=c*(this.layout.stride/4);const V=y.BYTES_PER_ELEMENT/w.BYTES_PER_ELEMENT,k=4/V,j=(e,t,r,i)=>{y[O++]=e[0],y[O++]=e[1],y[O++]=e[2],m(t,e,w,O*V),O+=k;let s=O*V;if(w[s++]=r[0],w[s++]=r[1],O=Math.ceil(s/V),this._parameters.vvColor)y[O++]=v;else{const e=Math.min(4*i,_.length-4),t=4*O++;T[t]=255*_[e],T[t+1]=255*_[e+1],T[t+2]=255*_[e+2],T[t+3]=255*_[e+3]}this._parameters.vvOpacity&&(y[O++]=S),s=O*V,this._parameters.vvSize?(y[O++]=g,s+=2):w[s++]=f,this._parameters.worldSpace&&(w[s++]=u[0],w[s++]=u[1],w[s++]=u[2]),O=Math.ceil(s/V)},M=(s,a)=>{const o=e(b,l[3*s],l[3*s+1],l[3*s+2]),n=P;let h=s+a;do{e(n,l[3*h],l[3*h+1],l[3*h+2]),h+=a}while(t(o,n)&&h>=0&&h<p);i&&(r(o,o,i),r(n,n,i)),j(o,n,[-1,-1],s),j(o,n,[1,-1],s),j(o,n,[1,1],s),j(o,n,[-1,-1],s),j(o,n,[1,1],s),j(o,n,[-1,1],s)},x=this._parameters.placement;"begin"!==x&&"begin-end"!==x||M(0,1),"end"!==x&&"begin-end"!==x||M(p-1,-1)}}const b=i(),P=i();export{g as LineMarkerMaterial,v as Parameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{set as t,normalize as e,subtract as r,cross as s,distance as o,transformMat4 as i}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColor as c}from"../core/shaderLibrary/ShaderOutput.js";import l from"../lib/GLMaterial.js";import{Material as u,MaterialParameters as p}from"../lib/Material.js";import{MeasurementArrowTechnique as f,layout as h}from"../shaders/MeasurementArrowTechnique.js";import{MeasurementArrowTechniqueConfiguration as m}from"../shaders/MeasurementArrowTechniqueConfiguration.js";import{alphaCutoff as d}from"../../../../webscene/support/AlphaCutoff.js";class g extends u{constructor(t){super(t,b),this._configuration=new m,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[2,t=>!this._transparent&&c(t)],[8,t=>this._transparent&&c(t)]])}updateConfiguration(t){super.updateConfiguration(t),this._configuration.enableOITOffset=t.enableOITOffset,this._configuration.transparent=this._transparent,this._configuration.writeDepth=2===t.slot}get visible(){const{outlineColor:t,stripeEvenColor:e,stripeOddColor:r}=this.parameters;return t[3]>=d||e[3]>=d||r[3]>=d}intersectRay(){}intersectScreenPolygon(){return null}createGLMaterial(t){return new C(t)}createBufferWriter(){return new _}get _transparent(){const{parameters:t}=this;return t.outlineColor[3]<1||t.stripeEvenColor[3]<1||t.stripeOddColor[3]<1}}class C extends l{beginSlot(t){return this.getTechnique(f,t)}}class b extends p{constructor(){super(...arguments),this.width=32,this.outlineSize=.2,this.outlineColor=a(1,.5,0,1),this.stripeEvenColor=a(1,1,1,1),this.stripeOddColor=a(1,.5,0,1),this.stripeLength=1}}const w=n(),v=n(),j=n(),M=n(),O=n();class _{constructor(){this.layout=h}elementCount(t){return 2*(t.get("position").indices.length/2+1)}write(n,a,c,l){if(null==l)return;const{buffer:u,offset:p}=l,{data:f,indices:h}=c.get("position"),m=c.get("normal").data,d=f.length/3;h&&h.length!==2*(d-1)&&console.warn("MeasurementArrowMaterial does not support indices");const g=w,C=v,b=j,_=M,x=O,y=u.position,S=u.normal,T=u.uv0;let A=0;for(let w=0;w<d;++w){const c=3*w;if(t(g,f[c],f[c+1],f[c+2]),w<d-1){const o=3*(w+1);t(C,f[o],f[o+1],f[o+2]),t(x,m[o],m[o+1],m[o+2]),e(x,x),r(b,C,g),e(b,b),s(_,x,b),e(_,_)}const l=o(g,C);n&&a&&(i(g,g,n),i(C,C,n),i(_,_,a));const u=p+2*w,h=u+1;y.setVec(u,g),y.setVec(h,g),S.setVec(u,_),S.setVec(h,_),T.set(u,0,A),T.set(u,1,-1),T.set(h,0,A),T.set(h,1,1),w<d-1&&(A+=l)}const L=u.length;for(let t=0;t<2*d;++t)L.set(p+t,A)}}export{g as MeasurementArrowMaterial,b as Parameters};
2
+ import{set as t,normalize as e,subtract as r,cross as s,distance as o,transformMat4 as i}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isColor as c}from"../core/shaderLibrary/ShaderOutput.js";import l from"../lib/GLMaterial.js";import{Material as u,MaterialParameters as p}from"../lib/Material.js";import{MeasurementArrowTechnique as h,layout as f}from"../shaders/MeasurementArrowTechnique.js";import{MeasurementArrowTechniqueConfiguration as m}from"../shaders/MeasurementArrowTechniqueConfiguration.js";import{alphaCutoff as d}from"../../../../webscene/support/AlphaCutoff.js";class g extends u{constructor(t){super(t,b),this._configuration=new m,this.geometryType=2,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[2,t=>!this._transparent&&c(t)],[8,t=>this._transparent&&c(t)]])}updateConfiguration(t){super.updateConfiguration(t),this._configuration.enableOITOffset=t.enableOITOffset,this._configuration.transparent=this._transparent,this._configuration.writeDepth=2===t.slot}get visible(){const{outlineColor:t,stripeEvenColor:e,stripeOddColor:r}=this.parameters;return t[3]>=d||e[3]>=d||r[3]>=d}intersectRay(){}intersectScreenPolygon(){return null}createGLMaterial(t){return new C(t)}createBufferWriter(){return new O}get _transparent(){const{parameters:t}=this;return t.outlineColor[3]<1||t.stripeEvenColor[3]<1||t.stripeOddColor[3]<1}}class C extends l{beginSlot(t){return this.getTechnique(h,t)}}class b extends p{constructor(){super(...arguments),this.width=32,this.outlineSize=.2,this.outlineColor=a(1,.5,0,1),this.stripeEvenColor=a(1,1,1,1),this.stripeOddColor=a(1,.5,0,1),this.stripeLength=1}}const w=n(),v=n(),j=n(),y=n(),M=n();class O{constructor(){this.layout=f}elementCount(t){return 2*(t.get("position").indices.length/2+1)}write(n,a,c,l){if(null==l)return;const{buffer:u,offset:p}=l,{data:h,indices:f}=c.get("position"),m=c.get("normal").data,d=h.length/3;f&&f.length!==2*(d-1)&&console.warn("MeasurementArrowMaterial does not support indices");const g=w,C=v,b=j,O=y,_=M,x=u.position,T=u.normal,S=u.uv0;let A=0;for(let w=0;w<d;++w){const c=3*w;if(t(g,h[c],h[c+1],h[c+2]),w<d-1){const o=3*(w+1);t(C,h[o],h[o+1],h[o+2]),t(_,m[o],m[o+1],m[o+2]),e(_,_),r(b,C,g),e(b,b),s(O,_,b),e(O,O)}const l=o(g,C);n&&a&&(i(g,g,n),i(C,C,n),i(O,O,a));const u=p+2*w,f=u+1;x.setVec(u,g),x.setVec(f,g),T.setVec(u,O),T.setVec(f,O),S.set(u,0,A),S.set(u,1,-1),S.set(f,0,A),S.set(f,1,1),w<d-1&&(A+=l)}const L=u.length;for(let t=0;t<2*d;++t)L.set(p+t,A)}}export{g as MeasurementArrowMaterial,b as Parameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../../core/Logger.js";import{clamp as r}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as t,createScreenPointArray as o}from"../../../../core/screenUtils.js";import{copy as i,set as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as a,subtract as c,dot as l,scale as f,add as m,copy as u,length as p,distance as g}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as d}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{distance2 as j,fromPoints as b,closestLineSegmentPoint as y,projectPoint as v,create as x}from"../../../../geometry/support/lineSegment.js";import{fromPoints as S,signedDistance as L,getNormal as w,create as M}from"../../../../geometry/support/plane.js";import{isColorHighlightOrOLID as P}from"../core/shaderLibrary/ShaderOutput.js";import T from"../lib/GLMaterial.js";import{Material as C,MaterialParameters as R}from"../lib/Material.js";import{projectWorldLineSegmentToRenderScreen as V,screenPolygonIntersectsBufferedSegment as _}from"../lib/screenPolygonOverlapUtils.js";import{Hit as A,DrapedHit as N}from"../lib/screenPolygonTriangleIntersections.js";import{isTranslationMatrix as U}from"../lib/Util.js";import{DefaultBufferWriter as D}from"./DefaultBufferWriter.js";import{PositionColorLayout as E,PositionLayout as O}from"./DefaultLayouts.js";import{NativeLineTechnique as q}from"../shaders/NativeLineTechnique.js";import{NativeLineTechniqueConfiguration as B}from"../shaders/NativeLineTechniqueConfiguration.js";import{alphaCutoff as W}from"../../../../webscene/support/AlphaCutoff.js";class X extends C{constructor(e){super(e,k),this._configuration=new B,this.produces=new Map([[2,e=>P(e)]])}updateConfiguration(e){super.updateConfiguration(e),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.transparent=this.parameters.color[3]<1||this.parameters.width<1,this._configuration.hasOccludees=e.hasOccludees}get visible(){return this.parameters.color[3]>=W}intersectRay(r,t,o,s,n,h){const{options:d,camera:v,rayBegin:x,rayEnd:M}=o;if(!d.selectionMode||!r.visible||!v)return;if(!U(t))return void e.getLogger("esri.views.3d.webgl-engine.materials.NativeLineMaterial").error("intersection assumes a translation-only matrix");const P=r.attributes.get("position").data,T=oe;i(T,o.point);const C=ge*v.pixelRatio;a(ce[0],T[0]-C,T[1]+C,0),a(ce[1],T[0]+C,T[1]+C,0),a(ce[2],T[0]+C,T[1]-C,0),a(ce[3],T[0]-C,T[1]-C,0);for(let e=0;e<4;e++)if(!v.unprojectFromRenderScreen(ce[e],le[e]))return;S(v.eye,le[0],le[1],fe),S(v.eye,le[1],le[2],me),S(v.eye,le[2],le[3],ue),S(v.eye,le[3],le[0],pe);let R=Number.MAX_VALUE,V=0;for(const e of G(H,J,P,t)){if(L(fe,H)<0&&L(fe,J)<0||L(me,H)<0&&L(me,J)<0||L(ue,H)<0&&L(ue,J)<0||L(pe,H)<0&&L(pe,J)<0)continue;const r=v.projectToRenderScreen(H,Y),t=v.projectToRenderScreen(J,Z);if(null==r||null==t)continue;if(r[2]<0&&t[2]>0){c(K,H,J);const e=v.frustum,t=-L(e[4],H)/l(K,w(e[4]));if(f(K,K,t),m(H,H,K),!v.projectToRenderScreen(H,r))continue}else if(r[2]>0&&t[2]<0){c(K,J,H);const e=v.frustum,r=-L(e[4],J)/l(K,w(e[4]));if(f(K,K,r),m(J,J,K),!v.projectToRenderScreen(J,t))continue}else if(r[2]<0&&t[2]<0)continue;r[2]=0,t[2]=0;const o=j(b(r,t,re),T);o<R&&(R=o,u($,H),u(ee,J),V=e)}if(R<C*C){let e=Number.MAX_VALUE;if(y(b($,ee,re),b(x,M,te),Q)){c(Q,Q,x);const r=p(Q);f(Q,Q,1/r),e=r/g(x,M)}h(e,e,Q,V)}}intersectScreenPolygon(r,t,o,i){const{options:s,camera:n,screenPolygonPrimitiveProcessor:a}=o;if(!s.selectionMode||!r.visible)return null;if(!U(t))return e.getLogger("esri.views.3d.webgl-engine.materials.NativeLineMaterial").error("intersection assumes a translation-only matrix"),null;const c=r.attributes.get("position").data,l=new A(4);for(const e of G(H,J,c,t))for(const[r,t]of a.processLineSegment(he,H,J))V(n,r,t,Y,Z)&&(n.renderToScreen(Y,ie),n.renderToScreen(Z,se),_(i,ie,se,ge)&&(v(b(r,t,te),n.eye,oe),l.updateIfCloserFromValues(g(n.eye,oe),e,oe,null)));return l}intersectRayDraped(e,t,o,i,s){if(!t.options.selectionMode)return;const n=o[0],a=o[1],c=I(e);let l=Number.MAX_VALUE,f=0;for(const m of z(ne,ae,e)){const e=n-ne[0],t=a-ne[1],o=ae[0]-ne[0],i=ae[1]-ne[1],s=r((o*e+i*t)/(o*o+i*i),0,1),c=o*s-e,u=i*s-t,p=c*c+u*u;p<l&&(l=p,f=m)}l<c*c&&i(s.distance,s.renderDistance,s.normal,f)}intersectScreenPolygonDraped(e,r,t,o){if(!t.options.selectionMode)return null;const i=I(e);for(const s of z(ne,ae,e,r))if(_(o,ne,ae,i))return new N(s);return null}createGLMaterial(e){return new F(e)}createBufferWriter(){const e=this.parameters.hasVertexColors?E:O;return new D(e)}}class F extends T{beginSlot(e){return this.getTechnique(q,e)}}function*G(e,r,t,o){for(let i=0;i<t.length-5;i+=3)e[0]=t[i]+o[12],e[1]=t[i+1]+o[13],e[2]=t[i+2]+o[14],r[0]=t[i+3]+o[12],r[1]=t[i+4]+o[13],r[2]=t[i+5]+o[14],yield i/3}function I(e){const r=e.attributes.get("size");return(((r?r.data[0]:0)+1)/2+4)*e.screenToWorldRatio}function*z(e,r,t,o){const n=t.attributes.get("position").data,a=o?.[0]??0,c=o?.[1]??0;s(e,n[0]+a,n[1]+c);for(let l=3;l<n.length-2;l+=3){const t=l%n.length;s(r,n[t]+a,n[t+1]+c),yield l/3,i(e,r)}}class k extends R{constructor(){super(...arguments),this.color=d,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.width=1}}const H=h(),J=h(),K=h(),Q=h(),Y=t(),Z=t(),$=h(),ee=h(),re=x(),te=x(),oe=h(),ie=o(),se=o(),ne=n(),ae=n(),ce=[t(),t(),t(),t()],le=[h(),h(),h(),h()],fe=M(),me=M(),ue=M(),pe=M(),ge=2,he=[h(),h()];export{X as NativeLineMaterial,k as Parameters};
2
+ import e from"../../../../core/Logger.js";import{clamp as r}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as t,createScreenPointArray as o}from"../../../../core/screenUtils.js";import{copy as i,set as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as a,subtract as c,dot as l,scale as f,add as m,copy as u,length as p,distance as g}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as d}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{distance2 as j,fromPoints as y,closestLineSegmentPoint as b,projectPoint as v,create as x}from"../../../../geometry/support/lineSegment.js";import{fromPoints as S,signedDistance as L,getNormal as w,create as M}from"../../../../geometry/support/plane.js";import{isColorHighlightOrOLID as T}from"../core/shaderLibrary/ShaderOutput.js";import P from"../lib/GLMaterial.js";import{Material as C,MaterialParameters as R}from"../lib/Material.js";import{projectWorldLineSegmentToRenderScreen as V,screenPolygonIntersectsBufferedSegment as _}from"../lib/screenPolygonOverlapUtils.js";import{Hit as A,DrapedHit as N}from"../lib/screenPolygonTriangleIntersections.js";import{isTranslationMatrix as U}from"../lib/Util.js";import{DefaultBufferWriter as D}from"./DefaultBufferWriter.js";import{PositionColorLayout as E,PositionLayout as O}from"./DefaultLayouts.js";import{NativeLineTechnique as q}from"../shaders/NativeLineTechnique.js";import{NativeLineTechniqueConfiguration as B}from"../shaders/NativeLineTechniqueConfiguration.js";import{alphaCutoff as W}from"../../../../webscene/support/AlphaCutoff.js";class X extends C{constructor(e){super(e,k),this._configuration=new B,this.geometryType=2,this.produces=new Map([[2,e=>T(e)]])}updateConfiguration(e){super.updateConfiguration(e),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.transparent=this.parameters.color[3]<1||this.parameters.width<1,this._configuration.hasOccludees=e.hasOccludees}get visible(){return this.parameters.color[3]>=W}intersectRay(r,t,o,s,n,h){const{options:d,camera:v,rayBegin:x,rayEnd:M}=o;if(!d.selectionMode||!r.visible||!v)return;if(!U(t))return void e.getLogger("esri.views.3d.webgl-engine.materials.NativeLineMaterial").error("intersection assumes a translation-only matrix");const T=r.attributes.get("position").data,P=oe;i(P,o.point);const C=ge*v.pixelRatio;a(ce[0],P[0]-C,P[1]+C,0),a(ce[1],P[0]+C,P[1]+C,0),a(ce[2],P[0]+C,P[1]-C,0),a(ce[3],P[0]-C,P[1]-C,0);for(let e=0;e<4;e++)if(!v.unprojectFromRenderScreen(ce[e],le[e]))return;S(v.eye,le[0],le[1],fe),S(v.eye,le[1],le[2],me),S(v.eye,le[2],le[3],ue),S(v.eye,le[3],le[0],pe);let R=Number.MAX_VALUE,V=0;for(const e of G(H,J,T,t)){if(L(fe,H)<0&&L(fe,J)<0||L(me,H)<0&&L(me,J)<0||L(ue,H)<0&&L(ue,J)<0||L(pe,H)<0&&L(pe,J)<0)continue;const r=v.projectToRenderScreen(H,Y),t=v.projectToRenderScreen(J,Z);if(null==r||null==t)continue;if(r[2]<0&&t[2]>0){c(K,H,J);const e=v.frustum,t=-L(e[4],H)/l(K,w(e[4]));if(f(K,K,t),m(H,H,K),!v.projectToRenderScreen(H,r))continue}else if(r[2]>0&&t[2]<0){c(K,J,H);const e=v.frustum,r=-L(e[4],J)/l(K,w(e[4]));if(f(K,K,r),m(J,J,K),!v.projectToRenderScreen(J,t))continue}else if(r[2]<0&&t[2]<0)continue;r[2]=0,t[2]=0;const o=j(y(r,t,re),P);o<R&&(R=o,u($,H),u(ee,J),V=e)}if(R<C*C){let e=Number.MAX_VALUE;if(b(y($,ee,re),y(x,M,te),Q)){c(Q,Q,x);const r=p(Q);f(Q,Q,1/r),e=r/g(x,M)}h(e,e,Q,V)}}intersectScreenPolygon(r,t,o,i){const{options:s,camera:n,screenPolygonPrimitiveProcessor:a}=o;if(!s.selectionMode||!r.visible)return null;if(!U(t))return e.getLogger("esri.views.3d.webgl-engine.materials.NativeLineMaterial").error("intersection assumes a translation-only matrix"),null;const c=r.attributes.get("position").data,l=new A(4);for(const e of G(H,J,c,t))for(const[r,t]of a.processLineSegment(he,H,J))V(n,r,t,Y,Z)&&(n.renderToScreen(Y,ie),n.renderToScreen(Z,se),_(i,ie,se,ge)&&(v(y(r,t,te),n.eye,oe),l.updateIfCloserFromValues(g(n.eye,oe),e,oe,null)));return l}intersectRayDraped(e,t,o,i,s){if(!t.options.selectionMode)return;const n=o[0],a=o[1],c=I(e);let l=Number.MAX_VALUE,f=0;for(const m of z(ne,ae,e)){const e=n-ne[0],t=a-ne[1],o=ae[0]-ne[0],i=ae[1]-ne[1],s=r((o*e+i*t)/(o*o+i*i),0,1),c=o*s-e,u=i*s-t,p=c*c+u*u;p<l&&(l=p,f=m)}l<c*c&&i(s.distance,s.renderDistance,s.normal,f)}intersectScreenPolygonDraped(e,r,t,o){if(!t.options.selectionMode)return null;const i=I(e);for(const s of z(ne,ae,e,r))if(_(o,ne,ae,i))return new N(s);return null}createGLMaterial(e){return new F(e)}createBufferWriter(){const e=this.parameters.hasVertexColors?E:O;return new D(e)}}class F extends P{beginSlot(e){return this.getTechnique(q,e)}}function*G(e,r,t,o){for(let i=0;i<t.length-5;i+=3)e[0]=t[i]+o[12],e[1]=t[i+1]+o[13],e[2]=t[i+2]+o[14],r[0]=t[i+3]+o[12],r[1]=t[i+4]+o[13],r[2]=t[i+5]+o[14],yield i/3}function I(e){const r=e.attributes.get("size");return(((r?r.data[0]:0)+1)/2+4)*e.screenToWorldRatio}function*z(e,r,t,o){const n=t.attributes.get("position").data,a=o?.[0]??0,c=o?.[1]??0;s(e,n[0]+a,n[1]+c);for(let l=3;l<n.length-2;l+=3){const t=l%n.length;s(r,n[t]+a,n[t+1]+c),yield l/3,i(e,r)}}class k extends R{constructor(){super(...arguments),this.color=d,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.width=1}}const H=h(),J=h(),K=h(),Q=h(),Y=t(),Z=t(),$=h(),ee=h(),re=x(),te=x(),oe=h(),ie=o(),se=o(),ne=n(),ae=n(),ce=[t(),t(),t(),t()],le=[h(),h(),h(),h()],fe=M(),me=M(),ue=M(),pe=M(),ge=2,he=[h(),h()];export{X as NativeLineMaterial,k as Parameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as r,createScreenPointArray as i}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as s,Seconds as n}from"../../../../core/time.js";import{copy as o,set as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as c,subtract as p,dot as u,scale as m,add as h,copy as f,length as d,distance as g,lerp as _,transformMat4 as b,normalize as S}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as P}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as y}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as v}from"../../../../geometry/support/float16.js";import{fromPoints as w,distance2 as E,closestLineSegmentPoint as x,projectPoint as T,projectPointFraction as j,create as L}from"../../../../geometry/support/lineSegment.js";import{fromPoints as z,signedDistance as C,getNormal as A,create as M}from"../../../../geometry/support/plane.js";import{BufferViewVec3f as R,BufferViewFloat as V,BufferViewVec4Unorm8 as F,BufferViewVec4f16 as O,BufferViewUint32 as B}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as U,isColor as I,isDepth as N,isColorHighlightOLIDOrDepth as W,is2DGeometryOutput as k}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as D}from"../effects/geometry/olidUtils.js";import Y from"../lib/GLMaterial.js";import{Material as J}from"../lib/Material.js";import{projectWorldLineSegmentToRenderScreen as q,screenPolygonIntersectsBufferedSegment as X}from"../lib/screenPolygonOverlapUtils.js";import{Hit as G,DrapedHit as H}from"../lib/screenPolygonTriangleIntersections.js";import{ScreenSizePerspectiveEvaluator as K}from"../lib/screenSizePerspectiveUtils.js";import{isTranslationMatrix as Q,assert as Z}from"../lib/Util.js";import{isImagePattern as $}from"./lineStippleUtils.js";import{VisualVariablePassParameters as ee}from"./VisualVariablePassParameters.js";import{writeColor as te}from"./internal/bufferWriterUtils.js";import{r as re}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as ie,getTextureBufferLayout as se}from"../shaders/RibbonLineLayouts.js";import{RibbonLineTechnique as ne}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as oe}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as ae}from"../../../../webscene/support/AlphaCutoff.js";class le extends J{constructor(e,t){super(e,pe),this.produces=new Map([[2,e=>U(e)||I(e)&&8===this.parameters.renderOccluded],[3,e=>N(e)],[10,e=>W(e)&&8===this.parameters.renderOccluded],[11,e=>W(e)&&8===this.parameters.renderOccluded],[4,e=>I(e)&&this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[8,e=>I(e)&&!this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[18,e=>k(e)]]),this._configuration=new oe(t)}updateConfiguration(e){super.updateConfiguration(e);const t=18===e.slot,r=null!=this.parameters.stipplePattern&&null!=this.parameters.stippleTexture&&10!==e.output,i=r&&t&&this.parameters.isImagePattern();this._configuration.draped=t,this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.numJoinSubdivisions=_e(this.parameters.join,r),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&ge(this.parameters.markerParameters),this._configuration.polygonOffsetIndex=this.parameters.polygonOffsetIndex,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=e.hasOccludees,this._configuration.occluder=8===this.parameters.renderOccluded,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=this.emissions?1:0,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective&&!i,this._configuration.worldSizedImagePattern=i}get visible(){return this.parameters.color[3]>=ae||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>ae}get emissions(){return this.parameters.emissiveStrength>0?8!==this.parameters.renderOccluded?2:1:0}setParameters(e,t){e.animation=this.parameters.animation,super.setParameters(e,t)}intersectRayDraped({attributes:e,screenToWorldRatio:r},i,s,n,o){if(!i.options.selectionMode)return;const a=this._getLineSize(e,!0),l=s[0],c=s[1],p=fe(a,r);let u=Number.MAX_VALUE,m=0;for(const h of de(ye,ve,this.parameters,e)){const e=l-ye[0],r=c-ye[1],i=ve[0]-ye[0],s=ve[1]-ye[1],n=t((i*e+s*r)/(i*i+s*s),0,1),o=i*n-e,a=s*n-r,p=o*o+a*a;p<u&&(u=p,m=h)}u<p*p&&n(o.distance,o.renderDistance,o.normal,m)}intersectRay(t,r,i,s,n,a){const{options:l,camera:_,rayBegin:b,rayEnd:S}=i;if(!l.selectionMode||!t.visible||!_)return;if(!Q(r))return void e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const P=t.attributes,y=P.get("position").data,v=this._getLineSize(P),T=Le;o(T,i.point);const j=v*_.pixelRatio,L=Je*_.pixelRatio,M=j/2+L;c(Ie[0],T[0]-M,T[1]+M,0),c(Ie[1],T[0]+M,T[1]+M,0),c(Ie[2],T[0]+M,T[1]-M,0),c(Ie[3],T[0]-M,T[1]-M,0);for(let e=0;e<4;e++)if(!_.unprojectFromRenderScreen(Ie[e],Ne[e]))return;z(_.eye,Ne[0],Ne[1],We),z(_.eye,Ne[1],Ne[2],ke),z(_.eye,Ne[2],Ne[3],De),z(_.eye,Ne[3],Ne[0],Ye);let R=Number.MAX_VALUE,V=0;for(const e of this._forEachTransformedLineSegment(Se,Pe,y,r,he(this.parameters,P))){if(C(We,Se)<0&&C(We,Pe)<0||C(ke,Se)<0&&C(ke,Pe)<0||C(De,Se)<0&&C(De,Pe)<0||C(Ye,Se)<0&&C(Ye,Pe)<0)continue;const t=_.projectToRenderScreen(Se,ze),r=_.projectToRenderScreen(Pe,Ce);if(null==t||null==r)continue;if(t[2]<0&&r[2]>0){p(Te,Se,Pe);const e=_.frustum,r=-C(e[4],Se)/u(Te,A(e[4]));if(m(Te,Te,r),h(Se,Se,Te),!_.projectToRenderScreen(Se,t))continue}else if(t[2]>0&&r[2]<0){p(Te,Pe,Se);const e=_.frustum,t=-C(e[4],Pe)/u(Te,A(e[4]));if(m(Te,Te,t),h(Pe,Pe,Te),!_.projectToRenderScreen(Pe,r))continue}else if(t[2]<0&&r[2]<0)continue;t[2]=0,r[2]=0;const i=w(t,r,Fe),s=E(i,T);if(!(s>=R)){if(this.parameters.screenSizePerspective){const e=this.computeScreenSizePerspectiveWidth(i,Se,Pe,T,_,v,L);if(s>=e*e)continue}R=s,f(Re,Se),f(Ve,Pe),V=e}}if(R<M*M){let e=Number.MAX_VALUE;if(x(w(Re,Ve,Fe),w(b,S,Oe),je)){p(je,je,b);const t=d(je);m(je,je,1/t),e=t/g(b,S)}a(e,e,je,V)}}intersectScreenPolygon(t,r,i,s){const{options:n,camera:o,screenPolygonPrimitiveProcessor:a}=i;if(!n.selectionMode||!t.visible)return null;if(!Q(r))return e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix"),null;const l=t.attributes,c=l.get("position").data,p=this._getLineSize(l),u=Je,m=u*o.pixelRatio,h=new G(4);for(const e of this._forEachTransformedLineSegment(Se,Pe,c,r,he(this.parameters,l)))for(const[t,r]of a.processLineSegment(qe,Se,Pe)){if(!q(o,t,r,ze,Ce))continue;const i=w(ze,Ce,Fe);let n=p/2+u;this.parameters.screenSizePerspective&&(_(Le,ze,Ce,.5),n=Math.max(n,this.computeScreenSizePerspectiveWidth(i,t,r,Le,o,p,m)/o.pixelRatio)),o.renderToScreen(ze,Ae),o.renderToScreen(Ce,Me),X(s,Ae,Me,n)&&(T(w(t,r,Oe),o.eye,we),h.updateIfCloserFromValues(g(o.eye,we),e,we,null))}return h}intersectScreenPolygonDraped({attributes:e,screenToWorldRatio:t},r,i,s){if(!i.options.selectionMode)return null;const n=fe(this._getLineSize(e,!0),t);for(const o of de(ye,ve,this.parameters,e,r))if(X(s,ye,ve,n))return new H(o);return null}createBufferWriter(){return new ue(ie(this.parameters),se(this.parameters),this.parameters)}createGLMaterial(e){return new ce(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}update(e){return!!this.parameters.hasAnimation&&(this.setParameters({timeElapsed:s(e.time)},!1),0!==e.dt)}computeScreenSizePerspectiveWidth(e,t,r,i,s,n,o){const a=j(e,i);_(we,t,r,a),b(Ee,we,s.viewMatrix);const l=d(Ee),c=this.computeCameraAbsCosAngle(we,s,this._configuration.spherical);be.update(c,l,this.parameters.screenSizePerspective,this.parameters.screenSizePerspectiveMinPixelReferenceSize);return be.apply(n)*s.pixelRatio/2+o}computeCameraAbsCosAngle(e,t,r){return r?S(je,e):c(je,0,0,1),p(xe,e,t.eye),S(xe,xe),Math.abs(u(je,xe))}_getLineSize(e,r=!1){let i=this.parameters.width;if(this.parameters.vvSize){const s=e.get("sizeFeatureAttribute").data[0];Number.isNaN(s)?r&&(i*=this.parameters.vvSize.fallback[0]):i*=t(this.parameters.vvSize.offset[0]+s*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else e.has("size")&&(i*=e.get("size").data[0]);return i}*_forEachTransformedLineSegment(e,t,r,i,s){const n=s?r.length-2:r.length-5;for(let o=0;o<n;o+=3){e[0]=r[o]+i[12],e[1]=r[o+1]+i[13],e[2]=r[o+2]+i[14];const s=(o+3)%r.length;t[0]=r[s]+i[12],t[1]=r[s+1]+i[13],t[2]=r[s+2]+i[14],yield o/3}}}class ce extends Y{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const{stipplePattern:t}=this._material.parameters;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(ne,e)}}class pe extends ee{constructor(){super(...arguments),this._width=0,this.color=y,this.join="miter",this.cap=0,this.miterLimit=5,this.writeDepth=!0,this.polygonOffset=0,this.polygonOffsetIndex=0,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=n(0),this.animation=0,this.animationSpeed=1,this.trailLength=1,this.startTime=n(0),this.endTime=n(1/0),this.emissiveStrength=0}get width(){return this.isImagePattern()?this.stipplePattern.width:this._width}set width(e){this._width=e}get transparent(){return this.color[3]<1||this.hasAnimation||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return 0!==this.animation}isImagePattern(){return $(this.stipplePattern)&&null!=this.stippleTexture}}class ue{constructor(e,t,r){this.layout=e,this.textureBufferLayout=t,this._parameters=r,this.numJoinSubdivisions=_e(this._parameters.join,null!=this._parameters.stipplePattern)}_isClosed(e){return he(this._parameters,e)}allocate(e){return this.layout.createBuffer(e)}elementCountTextureBuffer(e){return e.get("position").data.length/3+(this._isClosed(e)?3:2)}elementCount(e){const t=2,r=e.get("position").indices.length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,r,i,s,n){null!=n&&this._writeTextureBuffer(e,r,n),null!=i&&this._writeVertexBuffer(e,r,i,s)}_writeTextureBuffer(e,t,r){const i=t.get("position"),s=i.data.length/3,n=this._isClosed(t),{buffer:o,offset:a}=r,l=o.getField("position",R),c=o.getField("u0",V),p=o.getField("sizeFeatureAttribute",V),u=o.getField("size",V),m=o.getField("colorFeatureAttribute",V),h=o.getField("color",F),d=o.getField("olidColor",F),_=o.getField("timeStamps",O),b=o.getField("opacityFeatureAttribute",V),S=t.get("sizeFeatureAttribute")?.data,P=t.get("size")?.data,y=t.get("colorFeatureAttribute")?.data,v=t.get("color")?.data,w=t.get("opacityFeatureAttribute")?.data,E=t.get("distanceToStart")?.data,x=t.get("timeStamps");Z(null!==l,"Expected valid position field in texture buffer"),Z(null!==c,"Expected valid u0 field in texture buffer");let T=0;for(let L=0;L<s;++L){this._getTransformedPosition(Ue,i.data,L,e),L>0&&(null!=E?T=E[L]??T:T+=g(Be,Ue));const t=a+L+1;if(l.setVec(t,Ue),c.set(t,T),f(Be,Ue),p&&p.set(t,1===S?.length?S[0]:S?.[L]??0),u&&u.set(t,1===P?.length?P[0]:P?.[L]??1),m&&m.set(t,1===y?.length?y[0]:y?.[L]??0),h)if(null!=v){const e=Math.min(4*L,v.length-4);h.setValues(t,v[e],v[e+1],v[e+2],v[e+3])}else h.setValues(t,1,1,1,1);b&&b.set(t,1===w?.length?w[0]:w?.[L]??0)}if(null!=_&&null!=x){Z(4===x.size);const e=x.data;for(let t=0;t<s;++t){const r=4*t,i=a+t+1;_.set(i,0,e[r]),_.set(i,1,e[r+1]),_.set(i,2,e[r+2]),_.set(i,3,e[r+3])}}if(n){const e=a,t=a+1,r=a+2,i=a+s,n=i+1,p=i+2;o.copyItem(i,e),o.copyItem(t,n),o.copyItem(r,p),l.getVec(i,Be),l.getVec(t,Ue);const u=T+g(Be,Ue);c.set(n,u)}else{const e=a,t=a+1,r=a+s,i=r+1;o.copyItem(t,e),o.copyItem(r,i)}const j=t.get("olidColor");D()&&null!=j&&null!=d&&te(j,4,d,a)}_writeVertexBuffer(e,t,r,i){const{buffer:s,offset:n}=r,{layout:o}=this,a=t.get("position"),l=a.indices,c=a.data.length/3,p=this._isClosed(t),u=c+(p?3:2);l&&l.length!==2*(c-1)&&console.warn("RibbonLineMaterial does not support indices");const m=s.getField("textureElementIndex",B);Z(null!=m,"Missing texture buffer index field"),Z(null!=i,"Using a texture layout, but the texture range for this instance was not provided");const h=i.from;Z(i.numElements===u,"Expected number of elements in TextureBuffer to equal number of points");const f=new Float32Array(s.buffer),d=v(s.buffer),g=new Uint32Array(s.buffer),_=o.stride/4;let b=n*_;const S=b,P=f.BYTES_PER_ELEMENT/d.BYTES_PER_ELEMENT,y=(e,t,r)=>{const i=r+1;g[b]=h+i,b++;let s=b*P;d[s++]=e,d[s++]=t,b=Math.ceil(s/P)};b+=_;let w=0,E=0;p?(w=0,E=c):(y(1,-4,0),y(1,4,0),w=1,E=c-1);for(let v=w;v<E;v++){y(0,-1,v),y(0,1,v);const e=this.numJoinSubdivisions;for(let t=0;t<e;++t){const r=(t+1)/(e+1);y(r,-1,v),y(r,1,v)}y(1,-2,v),y(1,2,v)}p?(y(0,-1,E),y(0,1,E)):(y(0,-5,E),y(0,5,E)),me(f,S+_,f,S,_);b=me(f,b-_,f,b,_),this._parameters.wireframe&&this._addWireframeVertices(s,S,b,_)}_getTransformedPosition(e,t,r,i){const s=3*r;c(e,t[s+0],t[s+1],t[s+2]),i&&b(e,e,i)}_addWireframeVertices(e,t,r,i){const s=new Uint8Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),n=new Uint8Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,(r-t)*Float32Array.BYTES_PER_ELEMENT),o=i*Float32Array.BYTES_PER_ELEMENT;let a=0;const l=e=>a=me(n,e,s,a,o);for(let c=0;c<=n.length-4*o;c+=2*o)l(c),l(c+2*o),l(c+1*o),l(c+2*o),l(c+1*o),l(c+3*o)}}function me(e,t,r,i,s){for(let n=0;n<s;n++)r[i++]=e[t++];return i}function he(e,t){if(!e.isClosed)return!1;return t.get("position").indices.length>2}function fe(e,t){return(e/2+Je)*t}function*de(e,t,r,i,s){const n=i.get("position").data,l=he(r,i)?n.length-2:n.length-5,c=s?.[0]??0,p=s?.[1]??0;a(e,n[0]+c,n[1]+p);for(let u=3;u<l+3;u+=3){const r=u%n.length;a(t,n[r]+c,n[r+1]+p),yield u/3,o(e,t)}}function ge(e){return 1===e.anchor&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}function _e(e,t){const r=t?1:0;switch(e){case"miter":case"bevel":return r;case"round":return re+r}}const be=new K,Se=P(),Pe=P(),ye=l(),ve=l(),we=P(),Ee=P(),xe=P(),Te=P(),je=P(),Le=P(),ze=r(),Ce=r(),Ae=i(),Me=i(),Re=P(),Ve=P(),Fe=L(),Oe=L(),Be=P(),Ue=P(),Ie=[r(),r(),r(),r()],Ne=[P(),P(),P(),P()],We=M(),ke=M(),De=M(),Ye=M(),Je=4,qe=[P(),P()];export{pe as Parameters,le as RibbonLineMaterial};
2
+ import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as r,createScreenPointArray as i}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as s,Seconds as n}from"../../../../core/time.js";import{copy as o,set as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as c,subtract as p,dot as u,scale as m,add as h,copy as f,length as d,distance as g,lerp as _,transformMat4 as b,normalize as S}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as y}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as P}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as v}from"../../../../geometry/support/float16.js";import{fromPoints as w,distance2 as E,closestLineSegmentPoint as x,projectPoint as T,projectPointFraction as j,create as L}from"../../../../geometry/support/lineSegment.js";import{fromPoints as z,signedDistance as C,getNormal as A,create as M}from"../../../../geometry/support/plane.js";import{BufferViewVec3f as R,BufferViewFloat as V,BufferViewVec4Unorm8 as F,BufferViewVec4f16 as O,BufferViewUint32 as B}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as U,isColor as I,isDepth as N,isColorHighlightOLIDOrDepth as W,is2DGeometryOutput as k}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as D}from"../effects/geometry/olidUtils.js";import Y from"../lib/GLMaterial.js";import{Material as J}from"../lib/Material.js";import{projectWorldLineSegmentToRenderScreen as q,screenPolygonIntersectsBufferedSegment as X}from"../lib/screenPolygonOverlapUtils.js";import{Hit as G,DrapedHit as H}from"../lib/screenPolygonTriangleIntersections.js";import{ScreenSizePerspectiveEvaluator as K}from"../lib/screenSizePerspectiveUtils.js";import{isTranslationMatrix as Q,assert as Z}from"../lib/Util.js";import{isImagePattern as $}from"./lineStippleUtils.js";import{VisualVariablePassParameters as ee}from"./VisualVariablePassParameters.js";import{writeColor as te}from"./internal/bufferWriterUtils.js";import{n as re}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as ie,getTextureBufferLayout as se}from"../shaders/RibbonLineLayouts.js";import{RibbonLineTechnique as ne}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as oe}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as ae}from"../../../../webscene/support/AlphaCutoff.js";class le extends J{constructor(e,t){super(e,pe),this.geometryType=2,this.produces=new Map([[2,e=>U(e)||I(e)&&8===this.parameters.renderOccluded],[3,e=>N(e)],[10,e=>W(e)&&8===this.parameters.renderOccluded],[11,e=>W(e)&&8===this.parameters.renderOccluded],[4,e=>I(e)&&this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[8,e=>I(e)&&!this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[18,e=>k(e)]]),this._configuration=new oe(t)}updateConfiguration(e){super.updateConfiguration(e);const t=18===e.slot,r=null!=this.parameters.stipplePattern&&null!=this.parameters.stippleTexture&&10!==e.output,i=r&&t&&this.parameters.isImagePattern();this._configuration.draped=t,this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.numJoinSubdivisions=_e(this.parameters.join,r),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&ge(this.parameters.markerParameters),this._configuration.polygonOffsetIndex=this.parameters.polygonOffsetIndex,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=e.hasOccludees,this._configuration.occluder=8===this.parameters.renderOccluded,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=this.emissions?1:0,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective&&!i,this._configuration.worldSizedImagePattern=i}get visible(){return this.parameters.color[3]>=ae||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>ae}get emissions(){return this.parameters.emissiveStrength>0?8!==this.parameters.renderOccluded?2:1:0}setParameters(e,t){e.animation=this.parameters.animation,super.setParameters(e,t)}intersectRayDraped({attributes:e,screenToWorldRatio:r},i,s,n,o){if(!i.options.selectionMode)return;const a=this._getLineSize(e,!0),l=s[0],c=s[1],p=fe(a,r);let u=Number.MAX_VALUE,m=0;for(const h of de(Pe,ve,this.parameters,e)){const e=l-Pe[0],r=c-Pe[1],i=ve[0]-Pe[0],s=ve[1]-Pe[1],n=t((i*e+s*r)/(i*i+s*s),0,1),o=i*n-e,a=s*n-r,p=o*o+a*a;p<u&&(u=p,m=h)}u<p*p&&n(o.distance,o.renderDistance,o.normal,m)}intersectRay(t,r,i,s,n,a){const{options:l,camera:_,rayBegin:b,rayEnd:S}=i;if(!l.selectionMode||!t.visible||!_)return;if(!Q(r))return void e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const y=t.attributes,P=y.get("position").data,v=this._getLineSize(y),T=Le;o(T,i.point);const j=v*_.pixelRatio,L=Je*_.pixelRatio,M=j/2+L;c(Ie[0],T[0]-M,T[1]+M,0),c(Ie[1],T[0]+M,T[1]+M,0),c(Ie[2],T[0]+M,T[1]-M,0),c(Ie[3],T[0]-M,T[1]-M,0);for(let e=0;e<4;e++)if(!_.unprojectFromRenderScreen(Ie[e],Ne[e]))return;z(_.eye,Ne[0],Ne[1],We),z(_.eye,Ne[1],Ne[2],ke),z(_.eye,Ne[2],Ne[3],De),z(_.eye,Ne[3],Ne[0],Ye);let R=Number.MAX_VALUE,V=0;for(const e of this._forEachTransformedLineSegment(Se,ye,P,r,he(this.parameters,y))){if(C(We,Se)<0&&C(We,ye)<0||C(ke,Se)<0&&C(ke,ye)<0||C(De,Se)<0&&C(De,ye)<0||C(Ye,Se)<0&&C(Ye,ye)<0)continue;const t=_.projectToRenderScreen(Se,ze),r=_.projectToRenderScreen(ye,Ce);if(null==t||null==r)continue;if(t[2]<0&&r[2]>0){p(Te,Se,ye);const e=_.frustum,r=-C(e[4],Se)/u(Te,A(e[4]));if(m(Te,Te,r),h(Se,Se,Te),!_.projectToRenderScreen(Se,t))continue}else if(t[2]>0&&r[2]<0){p(Te,ye,Se);const e=_.frustum,t=-C(e[4],ye)/u(Te,A(e[4]));if(m(Te,Te,t),h(ye,ye,Te),!_.projectToRenderScreen(ye,r))continue}else if(t[2]<0&&r[2]<0)continue;t[2]=0,r[2]=0;const i=w(t,r,Fe),s=E(i,T);if(!(s>=R)){if(this.parameters.screenSizePerspective){const e=this.computeScreenSizePerspectiveWidth(i,Se,ye,T,_,v,L);if(s>=e*e)continue}R=s,f(Re,Se),f(Ve,ye),V=e}}if(R<M*M){let e=Number.MAX_VALUE;if(x(w(Re,Ve,Fe),w(b,S,Oe),je)){p(je,je,b);const t=d(je);m(je,je,1/t),e=t/g(b,S)}a(e,e,je,V)}}intersectScreenPolygon(t,r,i,s){const{options:n,camera:o,screenPolygonPrimitiveProcessor:a}=i;if(!n.selectionMode||!t.visible)return null;if(!Q(r))return e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix"),null;const l=t.attributes,c=l.get("position").data,p=this._getLineSize(l),u=Je,m=u*o.pixelRatio,h=new G(4);for(const e of this._forEachTransformedLineSegment(Se,ye,c,r,he(this.parameters,l)))for(const[t,r]of a.processLineSegment(qe,Se,ye)){if(!q(o,t,r,ze,Ce))continue;const i=w(ze,Ce,Fe);let n=p/2+u;this.parameters.screenSizePerspective&&(_(Le,ze,Ce,.5),n=Math.max(n,this.computeScreenSizePerspectiveWidth(i,t,r,Le,o,p,m)/o.pixelRatio)),o.renderToScreen(ze,Ae),o.renderToScreen(Ce,Me),X(s,Ae,Me,n)&&(T(w(t,r,Oe),o.eye,we),h.updateIfCloserFromValues(g(o.eye,we),e,we,null))}return h}intersectScreenPolygonDraped({attributes:e,screenToWorldRatio:t},r,i,s){if(!i.options.selectionMode)return null;const n=fe(this._getLineSize(e,!0),t);for(const o of de(Pe,ve,this.parameters,e,r))if(X(s,Pe,ve,n))return new H(o);return null}createBufferWriter(){return new ue(ie(this.parameters),se(this.parameters),this.parameters)}createGLMaterial(e){return new ce(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}update(e){return!!this.parameters.hasAnimation&&(this.setParameters({timeElapsed:s(e.time)},!1),0!==e.dt)}computeScreenSizePerspectiveWidth(e,t,r,i,s,n,o){const a=j(e,i);_(we,t,r,a),b(Ee,we,s.viewMatrix);const l=d(Ee),c=this.computeCameraAbsCosAngle(we,s,this._configuration.spherical);be.update(c,l,this.parameters.screenSizePerspective,this.parameters.screenSizePerspectiveMinPixelReferenceSize);return be.apply(n)*s.pixelRatio/2+o}computeCameraAbsCosAngle(e,t,r){return r?S(je,e):c(je,0,0,1),p(xe,e,t.eye),S(xe,xe),Math.abs(u(je,xe))}_getLineSize(e,r=!1){let i=this.parameters.width;if(this.parameters.vvSize){const s=e.get("sizeFeatureAttribute").data[0];Number.isNaN(s)?r&&(i*=this.parameters.vvSize.fallback[0]):i*=t(this.parameters.vvSize.offset[0]+s*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else e.has("size")&&(i*=e.get("size").data[0]);return i}*_forEachTransformedLineSegment(e,t,r,i,s){const n=s?r.length-2:r.length-5;for(let o=0;o<n;o+=3){e[0]=r[o]+i[12],e[1]=r[o+1]+i[13],e[2]=r[o+2]+i[14];const s=(o+3)%r.length;t[0]=r[s]+i[12],t[1]=r[s+1]+i[13],t[2]=r[s+2]+i[14],yield o/3}}}class ce extends Y{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const{stipplePattern:t}=this._material.parameters;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(ne,e)}}class pe extends ee{constructor(){super(...arguments),this._width=0,this.color=P,this.join="miter",this.cap=0,this.miterLimit=5,this.writeDepth=!0,this.polygonOffset=0,this.polygonOffsetIndex=0,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=n(0),this.animation=0,this.animationSpeed=1,this.trailLength=1,this.startTime=n(0),this.endTime=n(1/0),this.emissiveStrength=0}get width(){return this.isImagePattern()?this.stipplePattern.width:this._width}set width(e){this._width=e}get transparent(){return this.color[3]<1||this.hasAnimation||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return 0!==this.animation}isImagePattern(){return $(this.stipplePattern)&&null!=this.stippleTexture}}class ue{constructor(e,t,r){this.layout=e,this.textureBufferLayout=t,this._parameters=r,this.numJoinSubdivisions=_e(this._parameters.join,null!=this._parameters.stipplePattern)}_isClosed(e){return he(this._parameters,e)}allocate(e){return this.layout.createBuffer(e)}elementCountTextureBuffer(e){return e.get("position").data.length/3+(this._isClosed(e)?3:2)}elementCount(e){const t=2,r=e.get("position").indices.length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,r,i,s,n){null!=n&&this._writeTextureBuffer(e,r,n),null!=i&&this._writeVertexBuffer(e,r,i,s)}_writeTextureBuffer(e,t,r){const i=t.get("position"),s=i.data.length/3,n=this._isClosed(t),{buffer:o,offset:a}=r,l=o.getField("position",R),c=o.getField("u0",V),p=o.getField("sizeFeatureAttribute",V),u=o.getField("size",V),m=o.getField("colorFeatureAttribute",V),h=o.getField("color",F),d=o.getField("olidColor",F),_=o.getField("timeStamps",O),b=o.getField("opacityFeatureAttribute",V),S=t.get("sizeFeatureAttribute")?.data,y=t.get("size")?.data,P=t.get("colorFeatureAttribute")?.data,v=t.get("color")?.data,w=t.get("opacityFeatureAttribute")?.data,E=t.get("distanceToStart")?.data,x=t.get("timeStamps");Z(null!==l,"Expected valid position field in texture buffer"),Z(null!==c,"Expected valid u0 field in texture buffer");let T=0;for(let L=0;L<s;++L){this._getTransformedPosition(Ue,i.data,L,e),L>0&&(null!=E?T=E[L]??T:T+=g(Be,Ue));const t=a+L+1;if(l.setVec(t,Ue),c.set(t,T),f(Be,Ue),p&&p.set(t,1===S?.length?S[0]:S?.[L]??0),u&&u.set(t,1===y?.length?y[0]:y?.[L]??1),m&&m.set(t,1===P?.length?P[0]:P?.[L]??0),h)if(null!=v){const e=Math.min(4*L,v.length-4);h.setValues(t,v[e],v[e+1],v[e+2],v[e+3])}else h.setValues(t,1,1,1,1);b&&b.set(t,1===w?.length?w[0]:w?.[L]??0)}if(null!=_&&null!=x){Z(4===x.size);const e=x.data;for(let t=0;t<s;++t){const r=4*t,i=a+t+1;_.set(i,0,e[r]),_.set(i,1,e[r+1]),_.set(i,2,e[r+2]),_.set(i,3,e[r+3])}}if(n){const e=a,t=a+1,r=a+2,i=a+s,n=i+1,p=i+2;o.copyItem(i,e),o.copyItem(t,n),o.copyItem(r,p),l.getVec(i,Be),l.getVec(t,Ue);const u=T+g(Be,Ue);c.set(n,u)}else{const e=a,t=a+1,r=a+s,i=r+1;o.copyItem(t,e),o.copyItem(r,i)}const j=t.get("olidColor");D()&&null!=j&&null!=d&&te(j,4,d,a)}_writeVertexBuffer(e,t,r,i){const{buffer:s,offset:n}=r,{layout:o}=this,a=t.get("position"),l=a.indices,c=a.data.length/3,p=this._isClosed(t),u=c+(p?3:2);l&&l.length!==2*(c-1)&&console.warn("RibbonLineMaterial does not support indices");const m=s.getField("textureElementIndex",B);Z(null!=m,"Missing texture buffer index field"),Z(null!=i,"Using a texture layout, but the texture range for this instance was not provided");const h=i.from;Z(i.numElements===u,"Expected number of elements in TextureBuffer to equal number of points");const f=new Float32Array(s.buffer),d=v(s.buffer),g=new Uint32Array(s.buffer),_=o.stride/4;let b=n*_;const S=b,y=f.BYTES_PER_ELEMENT/d.BYTES_PER_ELEMENT,P=(e,t,r)=>{const i=r+1;g[b]=h+i,b++;let s=b*y;d[s++]=e,d[s++]=t,b=Math.ceil(s/y)};b+=_;let w=0,E=0;p?(w=0,E=c):(P(1,-4,0),P(1,4,0),w=1,E=c-1);for(let v=w;v<E;v++){P(0,-1,v),P(0,1,v);const e=this.numJoinSubdivisions;for(let t=0;t<e;++t){const r=(t+1)/(e+1);P(r,-1,v),P(r,1,v)}P(1,-2,v),P(1,2,v)}p?(P(0,-1,E),P(0,1,E)):(P(0,-5,E),P(0,5,E)),me(f,S+_,f,S,_);b=me(f,b-_,f,b,_),this._parameters.wireframe&&this._addWireframeVertices(s,S,b,_)}_getTransformedPosition(e,t,r,i){const s=3*r;c(e,t[s+0],t[s+1],t[s+2]),i&&b(e,e,i)}_addWireframeVertices(e,t,r,i){const s=new Uint8Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),n=new Uint8Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,(r-t)*Float32Array.BYTES_PER_ELEMENT),o=i*Float32Array.BYTES_PER_ELEMENT;let a=0;const l=e=>a=me(n,e,s,a,o);for(let c=0;c<=n.length-4*o;c+=2*o)l(c),l(c+2*o),l(c+1*o),l(c+2*o),l(c+1*o),l(c+3*o)}}function me(e,t,r,i,s){for(let n=0;n<s;n++)r[i++]=e[t++];return i}function he(e,t){if(!e.isClosed)return!1;return t.get("position").indices.length>2}function fe(e,t){return(e/2+Je)*t}function*de(e,t,r,i,s){const n=i.get("position").data,l=he(r,i)?n.length-2:n.length-5,c=s?.[0]??0,p=s?.[1]??0;a(e,n[0]+c,n[1]+p);for(let u=3;u<l+3;u+=3){const r=u%n.length;a(t,n[r]+c,n[r+1]+p),yield u/3,o(e,t)}}function ge(e){return 1===e.anchor&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}function _e(e,t){const r=t?1:0;switch(e){case"miter":case"bevel":return r;case"round":return re+r}}const be=new K,Se=y(),ye=y(),Pe=l(),ve=l(),we=y(),Ee=y(),xe=y(),Te=y(),je=y(),Le=y(),ze=r(),Ce=r(),Ae=i(),Me=i(),Re=y(),Ve=y(),Fe=L(),Oe=L(),Be=y(),Ue=y(),Ie=[r(),r(),r(),r()],Ne=[y(),y(),y(),y()],We=M(),ke=M(),De=M(),Ye=M(),Je=4,qe=[y(),y()];export{pe as Parameters,le as RibbonLineMaterial};