@arcgis/core 4.28.0-next.20230919 → 4.28.0-next.20230921

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 (412) hide show
  1. package/Color.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/arcade/ArcadeDate.js +1 -1
  4. package/arcade/executionError.js +1 -1
  5. package/arcade/featureset/support/errorsupport.js +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/06621efb2573fad23b45.js +1 -0
  8. package/assets/esri/core/workers/chunks/072b4e041b8630c513a0.js +1 -0
  9. package/assets/esri/core/workers/chunks/101f776316a85b708927.js +1 -0
  10. package/assets/esri/core/workers/chunks/107546ef77a45d31c7ac.js +1 -0
  11. package/assets/esri/core/workers/chunks/10fd951bd296b2beeeba.js +1 -0
  12. package/assets/esri/core/workers/chunks/114269dda1d296893908.js +1 -0
  13. package/assets/esri/core/workers/chunks/126df6237fc80608344e.js +1 -0
  14. package/assets/esri/core/workers/chunks/134524cf6b1ebf208338.js +1 -0
  15. package/assets/esri/core/workers/chunks/17a36704e63ca1b34c5d.js +1 -0
  16. package/assets/esri/core/workers/chunks/1c83f47d446f2bca1721.js +1 -0
  17. package/assets/esri/core/workers/chunks/{09d395a9786607294689.js → 1c8469fbde39d85ee622.js} +1 -1
  18. package/assets/esri/core/workers/chunks/1cbaba30f55f00f7498b.js +1 -0
  19. package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +1 -0
  20. package/assets/esri/core/workers/chunks/{506874f562ce11f8914a.js → 243a4eed107d363dfad8.js} +1 -1
  21. package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +1 -0
  22. package/assets/esri/core/workers/chunks/2a1c1be9c202462cf54d.js +1 -0
  23. package/assets/esri/core/workers/chunks/2bb69d76a13564e8e455.js +1 -0
  24. package/assets/esri/core/workers/chunks/2d0d03cbea83c868edba.js +1 -0
  25. package/assets/esri/core/workers/chunks/2e130cb2f1038055c07b.js +1 -0
  26. package/assets/esri/core/workers/chunks/32ba4eba730e9232d964.js +1 -0
  27. package/assets/esri/core/workers/chunks/{b428fcb53ecc82b49e66.js → 332689bf60d246485993.js} +1 -1
  28. package/assets/esri/core/workers/chunks/3619e04cbb6691549014.js +1 -0
  29. package/assets/esri/core/workers/chunks/37116fb4c68cf3c3890a.js +1 -0
  30. package/assets/esri/core/workers/chunks/{3a7ad0d24264e2bc2e87.js → 3ca759f72d3bb29e9ea9.js} +22 -22
  31. package/assets/esri/core/workers/chunks/3dbfb4f370a874393822.js +1 -0
  32. package/assets/esri/core/workers/chunks/3f4e9b1663ec521bfe00.js +1 -0
  33. package/assets/esri/core/workers/chunks/406db5c90271a3a203d4.js +1 -0
  34. package/assets/esri/core/workers/chunks/4339ce8aaf87fabb80cc.js +1 -0
  35. package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +1 -0
  36. package/assets/esri/core/workers/chunks/43ba2bacd0f7d19915f7.js +1 -0
  37. package/assets/esri/core/workers/chunks/44b8e75593b7df1843e1.js +1 -0
  38. package/assets/esri/core/workers/chunks/467a821d05df8ec0dc1c.js +1 -0
  39. package/assets/esri/core/workers/chunks/47be4c75dd6372b96fe4.js +1 -0
  40. package/assets/esri/core/workers/chunks/53097659f31750c03a6d.js +1 -0
  41. package/assets/esri/core/workers/chunks/{c1141056581af072aee9.js → 580039dd491854ca325c.js} +1 -1
  42. package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +1 -0
  43. package/assets/esri/core/workers/chunks/5a5720caa64a46daadf9.js +1 -0
  44. package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +1 -0
  45. package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.js +1 -0
  46. package/assets/esri/core/workers/chunks/652749dc847fcb887234.js +1 -0
  47. package/assets/esri/core/workers/chunks/6c495077cc79e1898927.js +1 -0
  48. package/assets/esri/core/workers/chunks/{e5c3beebd507e1dda35f.js → 749fc49246093d693227.js} +1 -1
  49. package/assets/esri/core/workers/chunks/74d3ecb1a06d9f81e2c5.js +1 -0
  50. package/assets/esri/core/workers/chunks/77c15b1c2729c780f75a.js +1 -0
  51. package/assets/esri/core/workers/chunks/7ea33aa455c5143affb1.js +1 -0
  52. package/assets/esri/core/workers/chunks/7ed70c96fbfe00792e7c.js +1 -0
  53. package/assets/esri/core/workers/chunks/8ab832468300cc4feb5a.js +1 -0
  54. package/assets/esri/core/workers/chunks/90771b0de3e520a1df9a.js +1 -0
  55. package/assets/esri/core/workers/chunks/94188fe381239d48a975.js +1 -0
  56. package/assets/esri/core/workers/chunks/a277c980ba8704939688.js +1 -0
  57. package/assets/esri/core/workers/chunks/b1746c022fe6edaeda55.js +1 -0
  58. package/assets/esri/core/workers/chunks/b449d6bd5851187d419f.js +1 -0
  59. package/assets/esri/core/workers/chunks/bbc0dcd316c5598bc9ad.js +1 -0
  60. package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +1 -0
  61. package/assets/esri/core/workers/chunks/bc6323bdc98013da6fe5.js +1 -0
  62. package/assets/esri/core/workers/chunks/bde89b2684b6185992ef.js +1 -0
  63. package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +1 -0
  64. package/assets/esri/core/workers/chunks/{727548fffd4e270617d3.js → c6ea5aac232d1eca04dd.js} +1 -1
  65. package/assets/esri/core/workers/chunks/c8438c2d9ac48afe4033.js +1 -0
  66. package/assets/esri/core/workers/chunks/c9dfb145f0c1d93e0fbd.js +1 -0
  67. package/assets/esri/core/workers/chunks/cad260881653567bc8f9.js +1 -0
  68. package/assets/esri/core/workers/chunks/cec607d0138351a4952e.js +1 -0
  69. package/assets/esri/core/workers/chunks/d24afa6d8fd0061d9f00.js +1 -0
  70. package/assets/esri/core/workers/chunks/{f147269d85adfb4588ed.js → d9061beaa43065316062.js} +1 -1
  71. package/assets/esri/core/workers/chunks/dd7508d4016715371e0c.js +1 -0
  72. package/assets/esri/core/workers/chunks/dff1c3c38dda2bd1a9d6.js +1 -0
  73. package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +1 -0
  74. package/assets/esri/core/workers/chunks/eb01f4cdb9b918cc61e7.js +1 -0
  75. package/assets/esri/core/workers/chunks/ec8258c9dc1491e97fc8.js +1 -0
  76. package/assets/esri/core/workers/chunks/ed1fbc1bc8d50453e2f5.js +1 -0
  77. package/assets/esri/core/workers/chunks/eeac53da496de4cd4182.js +1 -0
  78. package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +1 -0
  79. package/assets/esri/core/workers/chunks/f38c54ada9e7012a2960.js +1 -0
  80. package/assets/esri/core/workers/chunks/f508ccfde6425dabe9ac.js +1 -0
  81. package/assets/esri/core/workers/chunks/f5e0ff5292b9fd18fc92.js +1 -0
  82. package/assets/esri/core/workers/chunks/f5eb8b5021620be7538e.js +1 -0
  83. package/assets/esri/images/portal/onlinemedialayer16.png +0 -0
  84. package/assets/esri/themes/base/widgets/_FeatureForm.scss +2 -1
  85. package/assets/esri/themes/dark/main.css +1 -1
  86. package/assets/esri/themes/light/main.css +1 -1
  87. package/assets/esri/themes/light/view.css +1 -1
  88. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm.json +1 -1
  89. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ar.json +1 -1
  90. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bg.json +1 -1
  91. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bs.json +1 -1
  92. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ca.json +1 -1
  93. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_cs.json +1 -1
  94. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_da.json +1 -1
  95. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_de.json +1 -1
  96. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_el.json +1 -1
  97. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_en.json +1 -1
  98. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_es.json +1 -1
  99. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_et.json +1 -1
  100. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fi.json +1 -1
  101. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fr.json +1 -1
  102. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_he.json +1 -1
  103. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hr.json +1 -1
  104. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hu.json +1 -1
  105. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_id.json +1 -1
  106. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_it.json +1 -1
  107. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ja.json +1 -1
  108. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ko.json +1 -1
  109. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lt.json +1 -1
  110. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lv.json +1 -1
  111. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nb.json +1 -1
  112. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nl.json +1 -1
  113. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pl.json +1 -1
  114. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-BR.json +1 -1
  115. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-PT.json +1 -1
  116. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ro.json +1 -1
  117. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ru.json +1 -1
  118. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sk.json +1 -1
  119. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sl.json +1 -1
  120. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sr.json +1 -1
  121. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sv.json +1 -1
  122. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_th.json +1 -1
  123. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_tr.json +1 -1
  124. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_uk.json +1 -1
  125. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_vi.json +1 -1
  126. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-CN.json +1 -1
  127. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-HK.json +1 -1
  128. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-TW.json +1 -1
  129. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace.json +1 -1
  130. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ar.json +1 -1
  131. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bg.json +1 -1
  132. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bs.json +1 -1
  133. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ca.json +1 -1
  134. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  135. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_da.json +1 -1
  136. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_de.json +1 -1
  137. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  138. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_en.json +1 -1
  139. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_es.json +1 -1
  140. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_et.json +1 -1
  141. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fi.json +1 -1
  142. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  143. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_he.json +1 -1
  144. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hr.json +1 -1
  145. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hu.json +1 -1
  146. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_id.json +1 -1
  147. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_it.json +1 -1
  148. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ja.json +1 -1
  149. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ko.json +1 -1
  150. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lt.json +1 -1
  151. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  152. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nb.json +1 -1
  153. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nl.json +1 -1
  154. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pl.json +1 -1
  155. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-BR.json +1 -1
  156. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-PT.json +1 -1
  157. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ro.json +1 -1
  158. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ru.json +1 -1
  159. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sk.json +1 -1
  160. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sl.json +1 -1
  161. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sr.json +1 -1
  162. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sv.json +1 -1
  163. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_th.json +1 -1
  164. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_tr.json +1 -1
  165. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_uk.json +1 -1
  166. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_vi.json +1 -1
  167. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-CN.json +1 -1
  168. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-HK.json +1 -1
  169. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-TW.json +1 -1
  170. package/chunks/LaserlinePath.glsl.js +5 -1
  171. package/core/HandleOwner.js +1 -1
  172. package/core/MemCache.js +1 -1
  173. package/core/date.js +5 -0
  174. package/core/sql.js +1 -1
  175. package/core/string.js +1 -1
  176. package/interfaces.d.ts +60 -43
  177. package/intl/date.js +1 -1
  178. package/layers/GeoJSONLayer.js +1 -1
  179. package/layers/ImageryLayer.js +1 -1
  180. package/layers/VoxelWasmPerSceneView.js +1 -1
  181. package/layers/WFSLayer.js +1 -1
  182. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  183. package/layers/graphics/sources/MemorySource.js +1 -1
  184. package/layers/graphics/sources/WFSSource.js +1 -1
  185. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  186. package/layers/graphics/sources/csv/csv.js +1 -1
  187. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  188. package/layers/graphics/sources/geojson/geojson.js +1 -1
  189. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  190. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  191. package/{views/interactive/tooltip/tooltipInfoUnion.js → layers/graphics/sources/support/QueryEngineBuildLayer.js} +1 -0
  192. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  193. package/layers/mixins/SceneService.js +1 -1
  194. package/layers/ogc/wfsUtils.js +1 -1
  195. package/layers/save/utils.js +1 -1
  196. package/layers/support/editableLayers.js +1 -1
  197. package/layers/support/fieldUtils.js +1 -1
  198. package/layers/support/labelFormatUtils.js +1 -1
  199. package/layers/support/layersCreator.js +1 -1
  200. package/layers/support/rasterFunctionUtils.js +1 -1
  201. package/layers/support/rasterFunctions/creators/createBandIndexFunctions.js +1 -1
  202. package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
  203. package/layers/support/rasterFunctions/creators/createLocalFunctions.js +1 -1
  204. package/networks/support/utils.js +1 -1
  205. package/package.json +1 -1
  206. package/portal/PortalItem.js +1 -1
  207. package/portal/support/layersLoader.js +1 -1
  208. package/rest/geometryService/cut.js +1 -1
  209. package/rest/query/operations/query.js +1 -1
  210. package/rest/versionManagement/deleteVersion.js +1 -1
  211. package/rest/versionManagement/gdbVersion/alterVersion.js +1 -1
  212. package/rest/versionManagement/gdbVersion/post.js +1 -1
  213. package/rest/versionManagement/gdbVersion/reconcile.js +1 -1
  214. package/rest/versionManagement/gdbVersion/serverVersionUtils.js +5 -0
  215. package/support/revision.js +1 -1
  216. package/time/timeZoneUtils.js +1 -1
  217. package/views/2d/engine/Stage.js +1 -1
  218. package/views/2d/engine/webgl/mesh/factories/WGLMeshFactory.js +1 -1
  219. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  220. package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
  221. package/views/2d/layers/features/sources/DataTileSource.js +1 -1
  222. package/views/2d/layers/features/sources/StreamSource.js +1 -1
  223. package/views/2d/layers/features/support/whereUtils.js +1 -1
  224. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  225. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  226. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  227. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  228. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  229. package/views/3d/environment/LocalAtmosphere.js +1 -1
  230. package/views/3d/externalRenderers/StageRenderer.js +1 -1
  231. package/views/3d/interactive/manipulatorUtils.js +1 -1
  232. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  233. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  234. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  235. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  236. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  237. package/views/3d/layers/MediaLayerView3D.js +1 -1
  238. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  239. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  240. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  241. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  242. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  243. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  244. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  245. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  246. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  247. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  248. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  249. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  250. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  251. package/views/3d/layers/support/overlayImageUtils.js +1 -1
  252. package/views/3d/layers/support/patternUtils.js +1 -1
  253. package/views/3d/support/LaserLineRenderer.js +1 -1
  254. package/views/3d/support/StreamDataLoader.js +1 -1
  255. package/views/3d/support/dito.js +1 -1
  256. package/views/3d/support/engineContent/line.js +1 -1
  257. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  258. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  259. package/views/3d/terrain/OverlayRenderer.js +1 -1
  260. package/views/3d/terrain/TerrainRenderer.js +1 -1
  261. package/views/3d/terrain/TileRenderer.js +1 -1
  262. package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
  263. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  264. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  265. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  266. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +6 -6
  267. package/views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js +10 -12
  268. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDVisibility.glsl.js +8 -21
  269. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  270. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  271. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  272. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  273. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  274. package/views/3d/webgl-engine/lib/Attribute.js +1 -1
  275. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  276. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  277. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  278. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  279. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  280. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  281. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  282. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  283. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  284. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  285. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  286. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  287. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  288. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  289. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  290. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  291. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  292. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  293. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  294. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  295. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  296. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  297. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  298. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  299. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  300. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  301. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  302. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  303. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  304. package/views/View.js +1 -1
  305. package/views/draw/DrawGraphicTool.js +1 -1
  306. package/views/draw/support/HighlightHelper.js +1 -1
  307. package/views/draw/support/Reshape.js +1 -1
  308. package/views/draw/support/layerUtils.js +1 -1
  309. package/views/interactive/SegmentLabels.js +1 -1
  310. package/views/interactive/keybindings.js +1 -1
  311. package/views/interactive/tooltip/SketchTooltipInfo.js +1 -1
  312. package/views/interactive/tooltip/TooltipContentWithHelpMessage.js +1 -1
  313. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  314. package/views/interactive/tooltip/TranslateTooltipInfos.js +1 -1
  315. package/views/interactive/tooltip/content/Fields.js +5 -0
  316. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  317. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  318. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  319. package/views/layers/FeatureLayerView.js +1 -1
  320. package/views/webgl/FramebufferObject.js +1 -1
  321. package/webdoc/saveAPIKeyUtils.js +5 -0
  322. package/webdoc/webdocSaveUtils.js +1 -1
  323. package/widgets/BasemapGallery.js +1 -1
  324. package/widgets/BasemapLayerList.js +1 -1
  325. package/widgets/Bookmarks.js +1 -1
  326. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  327. package/widgets/Editor/EditorViewModel.js +1 -1
  328. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  329. package/widgets/Editor/UpdateWorkflow.js +1 -1
  330. package/widgets/Expand.js +1 -1
  331. package/widgets/Feature/FeatureRelationship.js +1 -1
  332. package/widgets/Feature/support/featureUtils.js +1 -1
  333. package/widgets/FeatureForm/EditableInput.js +1 -1
  334. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  335. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  336. package/widgets/FeatureForm.js +1 -1
  337. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  338. package/widgets/Fullscreen.js +1 -1
  339. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  340. package/widgets/Search.js +1 -1
  341. package/widgets/Swipe.js +1 -1
  342. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  343. package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
  344. package/widgets/UtilityNetworkTrace/support/UtilityHelper.js +1 -1
  345. package/widgets/UtilityNetworkTrace.js +1 -1
  346. package/widgets/support/SketchTooltipControls.js +1 -1
  347. package/widgets/support/globalCss.js +1 -1
  348. package/assets/esri/core/workers/chunks/0274b84548cb048562e4.js +0 -1
  349. package/assets/esri/core/workers/chunks/034accc7cab6c88a3b31.js +0 -1
  350. package/assets/esri/core/workers/chunks/0839b45999fcb556e460.js +0 -1
  351. package/assets/esri/core/workers/chunks/09589852b129bfb5624f.js +0 -1
  352. package/assets/esri/core/workers/chunks/132e9e6147304ffd128d.js +0 -1
  353. package/assets/esri/core/workers/chunks/1790ca4193d730f5f206.js +0 -1
  354. package/assets/esri/core/workers/chunks/1a449168d30a688e6128.js +0 -1
  355. package/assets/esri/core/workers/chunks/1c94624fd001c803a814.js +0 -1
  356. package/assets/esri/core/workers/chunks/25ab3bec45de900be36e.js +0 -1
  357. package/assets/esri/core/workers/chunks/273167b2dd46e58b8739.js +0 -1
  358. package/assets/esri/core/workers/chunks/2c5eb8aaad696fa16744.js +0 -1
  359. package/assets/esri/core/workers/chunks/353bad8530710a284592.js +0 -1
  360. package/assets/esri/core/workers/chunks/357d452b8522185cc433.js +0 -1
  361. package/assets/esri/core/workers/chunks/3c2be3d204e6bf87266a.js +0 -1
  362. package/assets/esri/core/workers/chunks/3c2c64832fb498bbaa83.js +0 -1
  363. package/assets/esri/core/workers/chunks/3c4d59018ce8502c65e7.js +0 -1
  364. package/assets/esri/core/workers/chunks/43eff89599f36d83924b.js +0 -1
  365. package/assets/esri/core/workers/chunks/4632ada4af99cab70a61.js +0 -1
  366. package/assets/esri/core/workers/chunks/481eab7879ed5d8a1f67.js +0 -1
  367. package/assets/esri/core/workers/chunks/4b3a5cc435435c81e6a5.js +0 -1
  368. package/assets/esri/core/workers/chunks/4f34fd8c2bb769541e9c.js +0 -1
  369. package/assets/esri/core/workers/chunks/4f5a0bc7411c0db33662.js +0 -1
  370. package/assets/esri/core/workers/chunks/56a4cea67cc579bf7547.js +0 -1
  371. package/assets/esri/core/workers/chunks/56afd89d08c874f620a1.js +0 -1
  372. package/assets/esri/core/workers/chunks/5b08d578521562b166e3.js +0 -1
  373. package/assets/esri/core/workers/chunks/5f938d6da9fd3f3edc74.js +0 -1
  374. package/assets/esri/core/workers/chunks/6108d72faf48a592c8ba.js +0 -1
  375. package/assets/esri/core/workers/chunks/656a8be4ce1bec721366.js +0 -1
  376. package/assets/esri/core/workers/chunks/7531ebc60e9ae61220e0.js +0 -1
  377. package/assets/esri/core/workers/chunks/77923afde29ae1ff10ca.js +0 -1
  378. package/assets/esri/core/workers/chunks/79683324be49aab79dd8.js +0 -1
  379. package/assets/esri/core/workers/chunks/7cdb4416afd5922cf5f3.js +0 -1
  380. package/assets/esri/core/workers/chunks/7e87bc83a0a2715e3016.js +0 -1
  381. package/assets/esri/core/workers/chunks/7f680cf24dd97d61bcd2.js +0 -1
  382. package/assets/esri/core/workers/chunks/7f797fed73cf7b48a686.js +0 -1
  383. package/assets/esri/core/workers/chunks/861609ebd3a77b787b0f.js +0 -1
  384. package/assets/esri/core/workers/chunks/869c3927f1e246cd1e42.js +0 -1
  385. package/assets/esri/core/workers/chunks/95371c0f5464f5daae9f.js +0 -1
  386. package/assets/esri/core/workers/chunks/962b99fd273709c726d3.js +0 -1
  387. package/assets/esri/core/workers/chunks/98fbcbb2115376d7ff62.js +0 -1
  388. package/assets/esri/core/workers/chunks/9abcd1d11bfd92f872ab.js +0 -1
  389. package/assets/esri/core/workers/chunks/9b54b5bdb6367c36f6e9.js +0 -1
  390. package/assets/esri/core/workers/chunks/9dab9f6c07ececa7f851.js +0 -1
  391. package/assets/esri/core/workers/chunks/9ff6ce486898713af7e2.js +0 -1
  392. package/assets/esri/core/workers/chunks/a98a435d4dbea73f7517.js +0 -1
  393. package/assets/esri/core/workers/chunks/b05bb6e784e5453696be.js +0 -1
  394. package/assets/esri/core/workers/chunks/b51d0ec283f61f638a48.js +0 -1
  395. package/assets/esri/core/workers/chunks/b5ee6c0c07fa50410370.js +0 -1
  396. package/assets/esri/core/workers/chunks/b9cf8f02974aeb3ce208.js +0 -1
  397. package/assets/esri/core/workers/chunks/bdf13091bd0e1ab0db7e.js +0 -1
  398. package/assets/esri/core/workers/chunks/bef1a1218a94ab6e2b51.js +0 -1
  399. package/assets/esri/core/workers/chunks/c22c2b15fe5f2c97a2ae.js +0 -1
  400. package/assets/esri/core/workers/chunks/c880d2f0ff06b3bf731f.js +0 -1
  401. package/assets/esri/core/workers/chunks/c88869d2a647c22dc3e6.js +0 -1
  402. package/assets/esri/core/workers/chunks/cc96be71fee49f07dcd4.js +0 -1
  403. package/assets/esri/core/workers/chunks/e4237360eef474d1f0ac.js +0 -1
  404. package/assets/esri/core/workers/chunks/e54ae2a4281dd58e0707.js +0 -1
  405. package/assets/esri/core/workers/chunks/e977e721f6f50e3c5f13.js +0 -1
  406. package/assets/esri/core/workers/chunks/ed31cf6688c0f7dac1f9.js +0 -1
  407. package/assets/esri/core/workers/chunks/f07a0ea10428adecea1a.js +0 -1
  408. package/assets/esri/core/workers/chunks/f1eab5c67ed808c18f86.js +0 -1
  409. package/assets/esri/core/workers/chunks/f2e7142a8db164940544.js +0 -1
  410. package/assets/esri/core/workers/chunks/f939b4166f76975f5da0.js +0 -1
  411. package/assets/esri/core/workers/chunks/ff4f4107a866e4a68386.js +0 -1
  412. package/layers/ogc/dateUtils.js +0 -5
@@ -2,7 +2,7 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{n as r}from"../../../../../../chunks/mat3.js";import{a as o}from"../../../../../../chunks/mat3f64.js";import{I as n}from"../../../../../../chunks/mat4f64.js";import{s as a}from"../../../../../../chunks/vec3.js";import{c as i}from"../../../../../../chunks/vec3f64.js";import{ShaderOutput as s}from"../ShaderOutput.js";import{DoublePrecision as t}from"../util/DoublePrecision.glsl.js";import{addViewNormal as m}from"../util/View.glsl.js";import{Float3DrawUniform as l}from"../../shaderModules/Float3DrawUniform.js";import{NoParameters as c,glsl as d}from"../../shaderModules/interfaces.js";import{Matrix3PassUniform as u}from"../../shaderModules/Matrix3PassUniform.js";import{Matrix4PassUniform as v}from"../../shaderModules/Matrix4PassUniform.js";import{ShaderTechniqueConfiguration as p,parameter as f}from"../../shaderTechnique/ShaderTechniqueConfiguration.js";import{VertexAttribute as x}from"../../../lib/VertexAttribute.js";import{encodeDoubleHi as M,encodeDoubleLo as g}from"../../../../../webgl/doublePrecisionUtils.js";class h extends p{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}e([f()],h.prototype,"instancedDoublePrecision",void 0),e([f()],h.prototype,"hasModelTransformation",void 0);class w extends c{constructor(){super(...arguments),this.modelTransformation=null}}const T=o();function N(e,o){const i=o.hasModelTransformation,c=o.instancedDoublePrecision;i&&(e.vertex.uniforms.add(new v("model",(e=>e.modelTransformation??n))),e.vertex.uniforms.add(new u("normalLocalOriginFromModel",(e=>(r(T,e.modelTransformation??n),T))))),o.instanced&&c&&(e.attributes.add(x.INSTANCEMODELORIGINHI,"vec3"),e.attributes.add(x.INSTANCEMODELORIGINLO,"vec3"),e.attributes.add(x.INSTANCEMODEL,"mat3"),e.attributes.add(x.INSTANCEMODELNORMAL,"mat3"));const p=e.vertex;c&&(p.include(t,o),p.uniforms.add(new l("viewOriginHi",((e,r)=>M(a(O,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]),O))),new l("viewOriginLo",((e,r)=>g(a(O,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]),O))))),p.code.add(d`
5
+ import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{n as r}from"../../../../../../chunks/mat3.js";import{a as o}from"../../../../../../chunks/mat3f64.js";import{I as n}from"../../../../../../chunks/mat4f64.js";import{s as a}from"../../../../../../chunks/vec3.js";import{c as i}from"../../../../../../chunks/vec3f64.js";import{ShaderOutput as t}from"../ShaderOutput.js";import{DoublePrecision as s}from"../util/DoublePrecision.glsl.js";import{addViewNormal as l}from"../util/View.glsl.js";import{Float3DrawUniform as m}from"../../shaderModules/Float3DrawUniform.js";import{NoParameters as c,glsl as d}from"../../shaderModules/interfaces.js";import{Matrix3PassUniform as u}from"../../shaderModules/Matrix3PassUniform.js";import{Matrix4PassUniform as v}from"../../shaderModules/Matrix4PassUniform.js";import{ShaderTechniqueConfiguration as p,parameter as M}from"../../shaderTechnique/ShaderTechniqueConfiguration.js";import{VertexAttribute as f}from"../../../lib/VertexAttribute.js";import{encodeDoubleHi as x,encodeDoubleLo as g}from"../../../../../webgl/doublePrecisionUtils.js";class O extends p{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}e([M()],O.prototype,"instancedDoublePrecision",void 0),e([M()],O.prototype,"hasModelTransformation",void 0);class h extends c{constructor(){super(...arguments),this.modelTransformation=null}}const w=o();function N(e,o){const i=o.hasModelTransformation,c=o.instancedDoublePrecision;i&&(e.vertex.uniforms.add(new v("model",(e=>e.modelTransformation??n))),e.vertex.uniforms.add(new u("normalLocalOriginFromModel",(e=>(r(w,e.modelTransformation??n),w))))),o.instanced&&c&&(e.attributes.add(f.INSTANCEMODELORIGINHI,"vec3"),e.attributes.add(f.INSTANCEMODELORIGINLO,"vec3"),e.attributes.add(f.INSTANCEMODEL,"mat3"),e.attributes.add(f.INSTANCEMODELNORMAL,"mat3"));const p=e.vertex;c&&(p.include(s,o),p.uniforms.add(new m("viewOriginHi",((e,r)=>x(a(T,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]),T))),new m("viewOriginLo",((e,r)=>g(a(T,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]),T))))),p.code.add(d`
6
6
  vec3 getVertexInLocalOriginSpace() {
7
7
  return ${i?c?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":c?"instanceModel * localPosition().xyz":"localPosition().xyz"};
8
8
  }
@@ -14,13 +14,13 @@ import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{n as r}from"../
14
14
  }
15
15
  `),p.code.add(d`
16
16
  vec3 dpNormal(vec4 _normal) {
17
- return normalize(${i?c?"normalLocalOriginFromModel * normalize(instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":c?"instanceModelNormal * _normal.xyz":"_normal.xyz"});
17
+ return normalize(${i?c?"normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":c?"instanceModelNormal * _normal.xyz":"_normal.xyz"});
18
18
  }
19
- `),o.output===s.Normal&&(m(p),p.code.add(d`
19
+ `),o.output===t.Normal&&(l(p),p.code.add(d`
20
20
  vec3 dpNormalView(vec4 _normal) {
21
- ${c?"return normalize((viewNormal * vec4(instanceModelNormal * _normal.xyz, 1.0)).xyz);":"return normalize((viewNormal * _normal).xyz);"}
21
+ return normalize((viewNormal * ${i?c?"vec4(normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz), 1.0)":"vec4(normalLocalOriginFromModel * _normal.xyz, 1.0)":c?"vec4(instanceModelNormal * _normal.xyz, 1.0)":"_normal"}).xyz);
22
22
  }
23
23
  `)),o.hasVertexTangents&&p.code.add(d`
24
24
  vec4 dpTransformVertexTangent(vec4 _tangent) {
25
- ${c?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
26
- }`)}const O=i();export{h as InstancedDoubleConfiguration,w as InstancedDoublePassParameters,N as InstancedDoublePrecision};
25
+ ${i?c?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":c?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
26
+ }`)}const T=i();export{O as InstancedDoubleConfiguration,h as InstancedDoublePassParameters,N as InstancedDoublePrecision};
@@ -2,17 +2,15 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{BooleanPassUniform as e}from"../../shaderModules/BooleanPassUniform.js";import{glsl as i}from"../../shaderModules/interfaces.js";function o(o){o.uniforms.add(new e("alignPixelEnabled",((e,i)=>i.alignPixelEnabled))),o.code.add(i`
6
- vec4 alignToPixelCenter(vec4 clipCoord, vec2 widthHeight) {
7
- if (!alignPixelEnabled)
8
- return clipCoord;
9
- vec2 xy = vec2(${i.float(l)}) + 0.5 * clipCoord.xy / clipCoord.w;
10
- vec2 pixelSz = vec2(1.0) / widthHeight;
11
- vec2 ij = (floor(xy * widthHeight) + vec2(0.5)) * pixelSz;
12
- vec2 result = (ij * 2.0 - vec2(1.0)) * clipCoord.w;
13
- return vec4(result, clipCoord.zw);
14
- }
15
- `),o.code.add(i`vec4 alignToPixelOrigin(vec4 clipCoord, vec2 widthHeight) {
5
+ import{BooleanPassUniform as e}from"../../shaderModules/BooleanPassUniform.js";import{glsl as i}from"../../shaderModules/interfaces.js";function o(o){o.uniforms.add(new e("alignPixelEnabled",((e,i)=>i.alignPixelEnabled))),o.code.add(i`vec4 alignToPixelCenter(vec4 clipCoord, vec2 widthHeight) {
6
+ if (!alignPixelEnabled)
7
+ return clipCoord;
8
+ vec2 xy = vec2(0.500123) + 0.5 * clipCoord.xy / clipCoord.w;
9
+ vec2 pixelSz = vec2(1.0) / widthHeight;
10
+ vec2 ij = (floor(xy * widthHeight) + vec2(0.5)) * pixelSz;
11
+ vec2 result = (ij * 2.0 - vec2(1.0)) * clipCoord.w;
12
+ return vec4(result, clipCoord.zw);
13
+ }`),o.code.add(i`vec4 alignToPixelOrigin(vec4 clipCoord, vec2 widthHeight) {
16
14
  if (!alignPixelEnabled)
17
15
  return clipCoord;
18
16
  vec2 xy = vec2(0.5) + 0.5 * clipCoord.xy / clipCoord.w;
@@ -20,4 +18,4 @@ vec2 pixelSz = vec2(1.0) / widthHeight;
20
18
  vec2 ij = floor((xy + 0.5 * pixelSz) * widthHeight) * pixelSz;
21
19
  vec2 result = (ij * 2.0 - vec2(1.0)) * clipCoord.w;
22
20
  return vec4(result, clipCoord.zw);
23
- }`)}const l=.500123;export{o as AlignPixel,l as alignPixelBias};
21
+ }`)}export{o as AlignPixel};
@@ -2,24 +2,11 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{alignPixelBias as e}from"./AlignPixel.glsl.js";import{HUDRenderStyle as r}from"./HUDRenderStyle.js";import{Float4PassUniform as t}from"../../shaderModules/Float4PassUniform.js";import{FloatPassUniform as i}from"../../shaderModules/FloatPassUniform.js";import{glsl as o}from"../../shaderModules/interfaces.js";import{Texture2DPassUniform as s}from"../../shaderModules/Texture2DPassUniform.js";function l(l){l.vertex.uniforms.add(new i("renderTransparentlyOccludedHUD",((e,t)=>t.hudRenderStyle===r.Occluded?1:t.hudRenderStyle===r.NotOccluded?0:.75)),new t("viewport",((e,r)=>r.camera.fullViewport)),new s("hudVisibilityTexture",((e,r)=>r.hudVisibility?.colorTexture))),l.vertex.code.add(o`
6
- bool testHUDVisibility(vec4 posProj) {
7
- // Use the nearest pixel center to avoid subpixel filtering messing up the color we use to test for
8
- ivec2 iuv = ivec2((${o.float(e)} + 0.5 * posProj.xy / posProj.w) * vec2(textureSize(hudVisibilityTexture, 0)));
9
- vec4 occlusionPixel = texelFetch(hudVisibilityTexture, iuv, 0);
10
-
11
- // the red pixel here indicates that the occlusion pixel passed the depth test against solid geometry and was
12
- // written the green pixel stores transparency of transparent geometry (1.0 -> fully transparent). Note that we
13
- // also check against green == 0.0, i.e. transparent geometry that has opaque parts
14
-
15
- // thus we render visible pixels that are occluded by semi-transparent (but not fully transparent!) geometry here
16
- if (renderTransparentlyOccludedHUD > 0.5) {
17
- // multiplying by renderTransparentlyOccludedHUD allows us to ignore the second condition if
18
- // renderTransparentlyOccludedHUD = 0.75
19
- return occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g * renderTransparentlyOccludedHUD < 1.0;
20
- }
21
-
22
- // and visible pixels that are not occluded by semi-transparent geometry here
23
- return occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g == 1.0;
24
- }
25
- `)}export{l as HUDVisibility};
5
+ import{AlignPixel as e}from"./AlignPixel.glsl.js";import{HUDRenderStyle as r}from"./HUDRenderStyle.js";import{Float4PassUniform as o}from"../../shaderModules/Float4PassUniform.js";import{FloatPassUniform as i}from"../../shaderModules/FloatPassUniform.js";import{glsl as l}from"../../shaderModules/interfaces.js";import{Texture2DPassUniform as s}from"../../shaderModules/Texture2DPassUniform.js";function t(t){t.vertex.uniforms.add(new i("renderTransparentlyOccludedHUD",((e,o)=>o.hudRenderStyle===r.Occluded?1:o.hudRenderStyle===r.NotOccluded?0:.75)),new o("viewport",((e,r)=>r.camera.fullViewport)),new s("hudVisibilityTexture",((e,r)=>r.hudVisibility?.colorTexture))),t.vertex.include(e),t.vertex.code.add(l`bool testHUDVisibility(vec4 posProj) {
6
+ vec4 posProjCenter = alignToPixelCenter(posProj, viewport.zw);
7
+ vec4 occlusionPixel = texture(hudVisibilityTexture, .5 + .5 * posProjCenter.xy / posProjCenter.w);
8
+ if (renderTransparentlyOccludedHUD > 0.5) {
9
+ return occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g * renderTransparentlyOccludedHUD < 1.0;
10
+ }
11
+ return occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g == 1.0;
12
+ }`)}export{t as HUDVisibility};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Accessor.js";import t from"../../../../core/PooledArray.js";import{isPromiseLike as n,createAbortError as s}from"../../../../core/promiseUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{ShaderOutput as u}from"../core/shaderLibrary/ShaderOutput.js";import{Decorations as l}from"../lib/basicInterfaces.js";import{DepthRange as d,union as a}from"../lib/depthRange.js";import{RenderOccludedFlag as c}from"../lib/Material.js";import{RenderSlot as p}from"../lib/RenderSlot.js";let h=class extends r{constructor(e){super({}),this._context=e,this._renderPlugins=new t,this._slots=new Array;for(let r=0;r<p.MAX_SLOTS;++r)this._slots[r]=[]}normalizeCtorArgs(){return{}}add(e,r){const t=()=>{if(r?.aborted)throw e.uninitializeRenderContext(),s();this._renderPlugins.push(e),e.produces.forEach(((r,t)=>{this._slots[t].push(e)})),this._context.requestRender(),this.notifyChange("updating")},o=e.initializeRenderContext(this._context,r);if(n(o))return o.then(t);t()}remove(e){if(null!=this._renderPlugins.removeUnordered(e)){for(let r=0;r<this._slots.length;++r)this._slots[r]=this._slots[r].filter((r=>r!==e));e.uninitializeRenderContext(),this._context.requestRender(),this.notifyChange("updating")}}prepareRender(){this._renderPlugins.forAll((e=>{e.prepareRender&&e.prepareRender(this._context.renderContext)}))}updateAnimation(e){let r=!1;return this._renderPlugins.forAll((t=>{t.updateAnimation&&(r=t.updateAnimation(e)||r)})),r}renderFeatureChanged(){this._renderPlugins.forAll((e=>{e.renderFeatureChanged&&e.renderFeatureChanged()}))}prepare(e){this._context.renderContext.bindParameters.slot=e,this._slots[e].forEach((r=>{const t=r.produces.get(e);t&&t(u.Color)&&(g(r)&&r.prepareTechnique(this._context.renderContext),m(r)&&r.prepareTechniques(this._context.renderContext))}))}_getRenderables(e){this._context.renderContext.bindParameters.slot=e;const r=new Map;return this._slots[e].forEach((t=>{const n=t.produces.get(e);if(n&&n(u.Color)&&(!t.isDecoration||this._context.renderContext.bindParameters.decorations!==l.OFF))if(g(t)){const e=t.prepareTechnique(this._context.renderContext);null!=e&&r.set(t,e)}else if(m(t)){const e=t.prepareTechniques(this._context.renderContext);null!=e&&r.set(t,e)}else r.set(t,null)})),r}render(e,r=null,t=null){let n;return this._getRenderables(e).forEach(((e,s)=>{n=s.render(this._context.renderContext,e,r,t)})),n}queryDepthRange(e){const r=new d;return this._renderPlugins.forAll((t=>{const n=t.queryDepthRange&&t.queryDepthRange(e);a(r,n)})),r}get updating(){return this._renderPlugins.some((e=>e.running))}produces(e,r=u.Color){return this._slots[e].some((t=>{const n=t.produces.get(e);return!!n&&n(r)}))}consumes(e){return this._renderPlugins.some((r=>r.consumes().required.includes(e)))}get hasDecorations(){return this._renderPlugins.some((e=>e.isDecoration))}get renderOccludedFlags(){return this._renderPlugins.reduce(((e,r)=>e|r.renderOccludedFlags),c.None)}get usedMemory(){return this._renderPlugins.reduce(((e,r)=>e+(r.usedMemory??0)),0)}};function g(e){return"prepareTechnique"in e}function m(e){return"prepareTechniques"in e}e([o({readOnly:!0})],h.prototype,"updating",null),h=e([i("esri.views.3d.webgl-engine.lib.RenderPluginManager")],h);export{h as RenderPluginManager};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Accessor.js";import t from"../../../../core/PooledArray.js";import{isPromiseLike as n,createAbortError as s}from"../../../../core/promiseUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as i}from"../../../../core/accessorSupport/decorators/subclass.js";import{ShaderOutput as u}from"../core/shaderLibrary/ShaderOutput.js";import{Decorations as d}from"../lib/basicInterfaces.js";import{DepthRange as l,union as a}from"../lib/depthRange.js";import{RenderOccludedFlag as c}from"../lib/Material.js";import{RenderSlot as p}from"../lib/RenderSlot.js";let h=class extends r{constructor(e){super({}),this._context=e,this._renderPlugins=new t,this._slots=new Array;for(let r=0;r<p.MAX_SLOTS;++r)this._slots[r]=[]}normalizeCtorArgs(){return{}}add(e,r){const t=()=>{if(r?.aborted)throw e.uninitializeRenderContext(),s();this._renderPlugins.push(e),e.produces.forEach(((r,t)=>{this._slots[t].push(e)})),this._context.requestRender(),this.notifyChange("updating")},o=e.initializeRenderContext(this._context,r);if(n(o))return o.then(t);t()}remove(e){if(null!=this._renderPlugins.removeUnordered(e)){for(let r=0;r<this._slots.length;++r)this._slots[r]=this._slots[r].filter((r=>r!==e));e.uninitializeRenderContext(),this._context.requestRender(),this.notifyChange("updating")}}prepareRender(){this._renderPlugins.forAll((e=>{e.prepareRender&&e.prepareRender(this._context.renderContext)}))}updateAnimation(e){let r=!1;return this._renderPlugins.forAll((t=>{t.updateAnimation&&(r=t.updateAnimation(e)||r)})),r}renderFeatureChanged(){this._renderPlugins.forAll((e=>{e.renderFeatureChanged&&e.renderFeatureChanged()}))}prepare(e){this._context.renderContext.bindParameters.slot=e,this._slots[e].forEach((r=>{const t=r.produces.get(e);t&&t(u.Color)&&(g(r)&&r.prepareTechnique(this._context.renderContext),m(r)&&r.prepareTechniques(this._context.renderContext))}))}_getRenderables(e){this._context.renderContext.bindParameters.slot=e;const r=new Map;return this._slots[e].forEach((t=>{const n=t.produces.get(e);if(n&&n(u.Color)&&(!t.isDecoration||this._context.renderContext.bindParameters.decorations!==d.OFF))if(g(t)){const e=t.prepareTechnique(this._context.renderContext);null!=e&&r.set(t,e)}else if(m(t)){const e=t.prepareTechniques(this._context.renderContext);null!=e&&r.set(t,e)}else r.set(t,null)})),r}render(e,r=null,t=null){return this._getRenderables(e).forEach(((e,n)=>t=n.renderNode(this._context.renderContext,e,r,t))),t}queryDepthRange(e){const r=new l;return this._renderPlugins.forAll((t=>{const n=t.queryDepthRange&&t.queryDepthRange(e);a(r,n)})),r}get updating(){return this._renderPlugins.some((e=>e.running))}produces(e,r=u.Color){return this._slots[e].some((t=>{const n=t.produces.get(e);return!!n&&n(r)}))}consumes(e){return this._renderPlugins.some((r=>r.consumes().required.includes(e)))}get hasDecorations(){return this._renderPlugins.some((e=>e.isDecoration))}get renderOccludedFlags(){return this._renderPlugins.reduce(((e,r)=>e|r.renderOccludedFlags),c.None)}get usedMemory(){return this._renderPlugins.reduce(((e,r)=>e+(r.usedMemory??0)),0)}};function g(e){return"prepareTechnique"in e}function m(e){return"prepareTechniques"in e}e([o({readOnly:!0})],h.prototype,"updating",null),h=e([i("esri.views.3d.webgl-engine.lib.RenderPluginManager")],h);export{h as RenderPluginManager};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{unitRGBAFromColor as t}from"../../../../../core/colorUtils.js";import{releaseMaybe as r,disposeMaybe as i}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as o}from"../../../../../core/reactiveUtils.js";import{property as a}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as h}from"../../../../../core/accessorSupport/decorators/subclass.js";import{s as l}from"../../../../../chunks/vec2.js";import{ColorFormat as n}from"../../core/FBOCache.js";import{SyncRenderPlugin as c,ConsumesHighlight as p}from"../RenderPlugin.js";import{HighlightApplyTechnique as u}from"./HighlightApplyTechnique.js";import{HighlightBlurTechnique as m}from"./HighlightBlurTechnique.js";import{defaultColor as _,defaultHaloOpacity as d,defaultFillOpacity as g}from"./HighlightDefaults.js";import{HighlightDownsampleTechnique as b}from"./HighlightDownsampleTechnique.js";import{HighlightPassParameters as f}from"./HighlightPassParameters.js";import{Default3D as w}from"../../lib/DefaultVertexAttributeLocations.js";import{Pos2Tex as T}from"../../lib/DefaultVertexBufferLayouts.js";import{RenderSlot as q}from"../../lib/RenderSlot.js";import{VertexArrayObject as v}from"../../lib/VertexArrayObject.js";import{H as x}from"../../../../../chunks/HighlightBlur.glsl.js";import{H as P,g as y}from"../../../../../chunks/HighlightDownsample.glsl.js";import{BufferObject as j}from"../../../../webgl/BufferObject.js";import{ClearBufferBit as C,Usage as O}from"../../../../webgl/enums.js";import{vertexCount as R}from"../../../../webgl/Util.js";let D=class extends c{constructor(e){super(e),this._context=null,this._passParameters=new f,this._downsampleDrawParameters=new P,this._blurDrawParameters=new x,this._grid={coverage:null,vao:null,verticalCellCount:0,horizontalCellCount:0,viewportWidth:0,viewportHeight:0},this.produces=new Map([[q.HIGHLIGHT,()=>!0]])}consumes(){return p}initializeRenderContext(e){this._context=e,null==this._blurTechnique&&(this._blurTechnique=this._context.techniqueRepository.acquire(m)),null==this._downsampleTechnique&&(this._downsampleTechnique=this._context.techniqueRepository.acquire(b)),null==this._applyTechnique&&(this._applyTechnique=this._context.techniqueRepository.acquire(u)),this.addHandles([s((()=>this.view.highlightOptions.color),(e=>{this._passParameters.color=t(e??_),this.view.highlightOptions.haloColor||(this._passParameters.haloColor=this._passParameters.color),this._context.requestRender()}),o),s((()=>this.view.highlightOptions.haloColor),(e=>{this._passParameters.haloColor=null!=e?t(e):this._passParameters.color,this._context.requestRender()}),o),s((()=>this.view.highlightOptions.haloOpacity),(e=>{this._passParameters.haloOpacity=e??d,this._passParameters.haloOpacityOccluded=.25*this._passParameters.haloOpacity,this._context.requestRender()}),o),s((()=>this.view.highlightOptions.fillOpacity),(e=>{this._passParameters.fillOpacity=e??g,this._passParameters.fillOpacityOccluded=.25*this._passParameters.fillOpacity,this._context.requestRender()}),o)])}uninitializeRenderContext(){this._context=null}dispose(){this._blurTechnique=r(this._blurTechnique),this._downsampleTechnique=r(this._downsampleTechnique),this._applyTechnique=r(this._applyTechnique),this._grid.coverage=r(this._grid.coverage),this._grid.vao=i(this._grid.vao)}render(e,t,r,i){const s=r?.highlightTexture;if(!this._context||!s)return;if(!(this._blurTechnique.compiled&&this._downsampleTechnique.compiled&&this._applyTechnique.compiled))return void this._context.requestRender();const o=e.bindParameters.camera,a=o.fullWidth,h=o.fullHeight,c=o.pixelRatio,p=Math.ceil(a/c),u=Math.ceil(h/c),m=this._context.fbos.rctx,_=this._context.fbos;this._gridUpdateResources(s),this._gridComputeCoverage(s,e.bindParameters),this._passParameters.highlightTexture=s,this._passParameters.coverageTexture=this._grid.coverage?.colorTexture;const d=m.bindTechnique(this._blurTechnique,this._passParameters,e.bindParameters),g=this._grid.vao;m.bindVAO(g);const b=_.acquire(n.RGBA4,p,u);m.bindFramebuffer(b.fbo),m.setViewport(0,0,p,u),m.setClearColor(0,0,0,0),m.clear(C.COLOR_BUFFER_BIT),this._blurDrawParameters.blurInputTexture=s,l(this._blurDrawParameters.blurSize,1/p,0),d.bindDraw(this._blurDrawParameters,e.bindParameters,this._passParameters),m.drawArrays(this._blurTechnique.primitiveType,0,R(g,"geometry"));const f=_.acquire(n.RGBA4,p,u);m.bindFramebuffer(f.fbo),m.clear(C.COLOR_BUFFER_BIT),this._blurDrawParameters.blurInputTexture=b.colorTexture,l(this._blurDrawParameters.blurSize,0,1/u),d.bindDraw(this._blurDrawParameters,e.bindParameters,this._passParameters),m.drawArrays(this._blurTechnique.primitiveType,0,R(g,"geometry")),m.bindFramebuffer(i?.fbo),m.setViewport4fv(o.fullViewport),this._passParameters.blurTexture=f.colorTexture,m.bindTechnique(this._applyTechnique,this._passParameters,e.bindParameters),m.drawArrays(this._applyTechnique.primitiveType,0,R(g,"geometry")),f.release(),b.release()}_gridUpdateResources(e){if(!this._context)return;const t=this._context.fbos.rctx,r=this._grid,s=Math.ceil(e.descriptor.height/y),o=Math.ceil(e.descriptor.width/y);if(!r.vao||r.verticalCellCount!==s||r.horizontalCellCount!==o){r.verticalCellCount=s,r.horizontalCellCount=o;const e=s+1,a=o+1,h=1/s,l=1/o,n=6,c=4,p=new Float32Array(n*c*e*a);let u=0;for(let t=0;t<e;t++)for(let e=0;e<a;e++)p[u]=(e-.5)*l*2-1,p[u+1]=(t-.5)*h*2-1,p[u+2]=e*l,p[u+3]=t*h,p[u+4]=(e+.5)*l*2-1,p[u+5]=(t-.5)*h*2-1,p[u+6]=e*l,p[u+7]=t*h,p[u+8]=(e-.5)*l*2-1,p[u+9]=(t+.5)*h*2-1,p[u+10]=e*l,p[u+11]=t*h,p[u+12]=(e-.5)*l*2-1,p[u+13]=(t+.5)*h*2-1,p[u+14]=e*l,p[u+15]=t*h,p[u+16]=(e+.5)*l*2-1,p[u+17]=(t-.5)*h*2-1,p[u+18]=e*l,p[u+19]=t*h,p[u+20]=(e+.5)*l*2-1,p[u+21]=(t+.5)*h*2-1,p[u+22]=e*l,p[u+23]=t*h,u+=n*c;r.vao=i(r.vao),r.vao=new v(t,w,{geometry:T},{geometry:j.createVertex(t,O.STATIC_DRAW,p)})}}_gridComputeCoverage(e,t){if(!this._context)return;const r=this._context.fbos.rctx,i=this._grid,s=r.bindTechnique(this._downsampleTechnique,this._passParameters,t),o=e.descriptor;i.coverage?.release(),i.coverage=this._context.fbos.acquire(n.RG,Math.ceil(o.width/y),Math.ceil(o.height/y)),r.bindFramebuffer(i.coverage.fbo),this._downsampleDrawParameters.input=e,s.bindDraw(this._downsampleDrawParameters,t,this._passParameters);const{width:a,height:h}=o;r.setViewport(0,0,a,h),r.screen.draw()}get test(){return{coverage:this._grid.coverage}}};e([a()],D.prototype,"_context",void 0),e([a()],D.prototype,"view",void 0),D=e([h("esri.views.3d.webgl-engine.lib.Highlight")],D);export{D as Highlight};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{unitRGBAFromColor as t}from"../../../../../core/colorUtils.js";import{releaseMaybe as r,disposeMaybe as i}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as o}from"../../../../../core/reactiveUtils.js";import{property as a}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as h}from"../../../../../core/accessorSupport/decorators/subclass.js";import{s as l}from"../../../../../chunks/vec2.js";import{ColorFormat as n}from"../../core/FBOCache.js";import{SyncRenderPlugin as c,ConsumesHighlight as p}from"../RenderPlugin.js";import{HighlightApplyTechnique as u}from"./HighlightApplyTechnique.js";import{HighlightBlurTechnique as m}from"./HighlightBlurTechnique.js";import{defaultColor as _,defaultHaloOpacity as d,defaultFillOpacity as g}from"./HighlightDefaults.js";import{HighlightDownsampleTechnique as b}from"./HighlightDownsampleTechnique.js";import{HighlightPassParameters as f}from"./HighlightPassParameters.js";import{Default3D as w}from"../../lib/DefaultVertexAttributeLocations.js";import{Pos2Tex as T}from"../../lib/DefaultVertexBufferLayouts.js";import{RenderSlot as q}from"../../lib/RenderSlot.js";import{VertexArrayObject as v}from"../../lib/VertexArrayObject.js";import{H as x}from"../../../../../chunks/HighlightBlur.glsl.js";import{H as P,g as y}from"../../../../../chunks/HighlightDownsample.glsl.js";import{BufferObject as j}from"../../../../webgl/BufferObject.js";import{ClearBufferBit as C,Usage as O}from"../../../../webgl/enums.js";import{vertexCount as R}from"../../../../webgl/Util.js";let D=class extends c{constructor(e){super(e),this._context=null,this._passParameters=new f,this._downsampleDrawParameters=new P,this._blurDrawParameters=new x,this._grid={coverage:null,vao:null,verticalCellCount:0,horizontalCellCount:0,viewportWidth:0,viewportHeight:0},this.produces=new Map([[q.HIGHLIGHT,()=>!0]])}consumes(){return p}initializeRenderContext(e){this._context=e,null==this._blurTechnique&&(this._blurTechnique=this._context.techniqueRepository.acquire(m)),null==this._downsampleTechnique&&(this._downsampleTechnique=this._context.techniqueRepository.acquire(b)),null==this._applyTechnique&&(this._applyTechnique=this._context.techniqueRepository.acquire(u)),this.addHandles([s((()=>this.view.highlightOptions.color),(e=>{this._passParameters.color=t(e??_),this.view.highlightOptions.haloColor||(this._passParameters.haloColor=this._passParameters.color),this._context.requestRender()}),o),s((()=>this.view.highlightOptions.haloColor),(e=>{this._passParameters.haloColor=null!=e?t(e):this._passParameters.color,this._context.requestRender()}),o),s((()=>this.view.highlightOptions.haloOpacity),(e=>{this._passParameters.haloOpacity=e??d,this._passParameters.haloOpacityOccluded=.25*this._passParameters.haloOpacity,this._context.requestRender()}),o),s((()=>this.view.highlightOptions.fillOpacity),(e=>{this._passParameters.fillOpacity=e??g,this._passParameters.fillOpacityOccluded=.25*this._passParameters.fillOpacity,this._context.requestRender()}),o)])}uninitializeRenderContext(){this._context=null}dispose(){this._blurTechnique=r(this._blurTechnique),this._downsampleTechnique=r(this._downsampleTechnique),this._applyTechnique=r(this._applyTechnique),this._grid.coverage=r(this._grid.coverage),this._grid.vao=i(this._grid.vao)}renderNode(e,t,r,i){const s=r?.highlightTexture;if(!this._context||!s)return;if(!(this._blurTechnique.compiled&&this._downsampleTechnique.compiled&&this._applyTechnique.compiled))return void this._context.requestRender();const o=e.bindParameters.camera,a=o.fullWidth,h=o.fullHeight,c=o.pixelRatio,p=Math.ceil(a/c),u=Math.ceil(h/c),m=this._context.fbos.rctx,_=this._context.fbos;this._gridUpdateResources(s),this._gridComputeCoverage(s,e.bindParameters),this._passParameters.highlightTexture=s,this._passParameters.coverageTexture=this._grid.coverage?.colorTexture;const d=m.bindTechnique(this._blurTechnique,this._passParameters,e.bindParameters),g=this._grid.vao;m.bindVAO(g);const b=_.acquire(n.RGBA4,p,u);m.bindFramebuffer(b.fbo),m.setViewport(0,0,p,u),m.setClearColor(0,0,0,0),m.clear(C.COLOR_BUFFER_BIT),this._blurDrawParameters.blurInputTexture=s,l(this._blurDrawParameters.blurSize,1/p,0),d.bindDraw(this._blurDrawParameters,e.bindParameters,this._passParameters),m.drawArrays(this._blurTechnique.primitiveType,0,R(g,"geometry"));const f=_.acquire(n.RGBA4,p,u);m.bindFramebuffer(f.fbo),m.clear(C.COLOR_BUFFER_BIT),this._blurDrawParameters.blurInputTexture=b.colorTexture,l(this._blurDrawParameters.blurSize,0,1/u),d.bindDraw(this._blurDrawParameters,e.bindParameters,this._passParameters),m.drawArrays(this._blurTechnique.primitiveType,0,R(g,"geometry")),m.bindFramebuffer(i?.fbo),m.setViewport4fv(o.fullViewport),this._passParameters.blurTexture=f.colorTexture,m.bindTechnique(this._applyTechnique,this._passParameters,e.bindParameters),m.drawArrays(this._applyTechnique.primitiveType,0,R(g,"geometry")),f.release(),b.release()}_gridUpdateResources(e){if(!this._context)return;const t=this._context.fbos.rctx,r=this._grid,s=Math.ceil(e.descriptor.height/y),o=Math.ceil(e.descriptor.width/y);if(!r.vao||r.verticalCellCount!==s||r.horizontalCellCount!==o){r.verticalCellCount=s,r.horizontalCellCount=o;const e=s+1,a=o+1,h=1/s,l=1/o,n=6,c=4,p=new Float32Array(n*c*e*a);let u=0;for(let t=0;t<e;t++)for(let e=0;e<a;e++)p[u]=(e-.5)*l*2-1,p[u+1]=(t-.5)*h*2-1,p[u+2]=e*l,p[u+3]=t*h,p[u+4]=(e+.5)*l*2-1,p[u+5]=(t-.5)*h*2-1,p[u+6]=e*l,p[u+7]=t*h,p[u+8]=(e-.5)*l*2-1,p[u+9]=(t+.5)*h*2-1,p[u+10]=e*l,p[u+11]=t*h,p[u+12]=(e-.5)*l*2-1,p[u+13]=(t+.5)*h*2-1,p[u+14]=e*l,p[u+15]=t*h,p[u+16]=(e+.5)*l*2-1,p[u+17]=(t-.5)*h*2-1,p[u+18]=e*l,p[u+19]=t*h,p[u+20]=(e+.5)*l*2-1,p[u+21]=(t+.5)*h*2-1,p[u+22]=e*l,p[u+23]=t*h,u+=n*c;r.vao=i(r.vao),r.vao=new v(t,w,{geometry:T},{geometry:j.createVertex(t,O.STATIC_DRAW,p)})}}_gridComputeCoverage(e,t){if(!this._context)return;const r=this._context.fbos.rctx,i=this._grid,s=r.bindTechnique(this._downsampleTechnique,this._passParameters,t),o=e.descriptor;i.coverage?.release(),i.coverage=this._context.fbos.acquire(n.RG,Math.ceil(o.width/y),Math.ceil(o.height/y)),r.bindFramebuffer(i.coverage.fbo),this._downsampleDrawParameters.input=e,s.bindDraw(this._downsampleDrawParameters,t,this._passParameters);const{width:a,height:h}=o;r.setViewport(0,0,a,h),r.screen.draw()}get test(){return{coverage:this._grid.coverage}}};e([a()],D.prototype,"_context",void 0),e([a()],D.prototype,"view",void 0),D=e([h("esri.views.3d.webgl-engine.lib.Highlight")],D);export{D as Highlight};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../chunks/tslib.es6.js";import{unitRGBAFromColor as e}from"../../../../../core/colorUtils.js";import{smoothstep as s,clamp as i}from"../../../../../core/mathUtils.js";import{watch as a,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as h}from"../../../../../core/accessorSupport/decorators/subclass.js";import{n as c,s as n,j as p}from"../../../../../chunks/vec3.js";import{c as d}from"../../../../../chunks/vec3f64.js";import{ViewingMode as m}from"../../../../ViewingMode.js";import{ReadShadowMapDrawParameters as l}from"../../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{SyncRenderPlugin as u,ConsumesHighlight as _}from"../RenderPlugin.js";import{defaultShadowOpacity as w,defaultShadowDifference as f,defaultShadowColor as g}from"./HighlightDefaults.js";import{ShadowHighlightPassParameters as y,ShadowHighlightTechnique as x}from"./ShadowHighlightTechnique.js";import{RenderSlot as O}from"../../lib/RenderSlot.js";const b=.001953125,P=4e4,j=5e4;let v=class extends u{constructor(t){super(t),this._maxOpacity=1,this._passParameters=new y,this._drawParameters=new l,this._shadowDifference=.2,this._context=null,this.produces=new Map([[O.SHADOW_HIGHLIGHT,()=>this._isVisible]])}consumes(){return _}initializeRenderContext(t){this._context=t,this.addHandles([a((()=>this.view.highlightOptions.shadowOpacity),(t=>{this._passParameters.shadowOpacity=t??w,this._updateOccludedShadowOpacity(),this._updateMaxOpacity()}),r),a((()=>this.view.highlightOptions.shadowDifference),(t=>{this._shadowDifference=t??f,this._updateOccludedShadowOpacity(),this._updateMaxOpacity()}),r),a((()=>this.view.highlightOptions.shadowColor),(t=>{this._passParameters.shadowColor=e(t??g),this._updateMaxOpacity()}),r)])}_updateOccludedShadowOpacity(){this._passParameters.occludedShadowOpacity=this._passParameters.shadowOpacity*(1-this._shadowDifference)}_updateMaxOpacity(){const t=Math.max(this._passParameters.shadowOpacity,this._passParameters.occludedShadowOpacity);this._maxOpacity=t*this._passParameters.shadowColor[3]}uninitializeRenderContext(){this._context=null}enable(){this._context&&null==this._technique&&(this._technique=this._context.techniqueRepository.acquire(x))}render(t,e,s,i){if(!(this._context&&s&&s.highlightTexture&&this._isVisible))return;if(!this._technique?.compiled)return void this._context.requestRender();const a=t.bindParameters;if(!a.shadowMap.enabled||!a.linearDepth)return;const r=t.rctx,o=this._technique;this._passParameters.highlight=s.highlightTexture,this._drawParameters.origin=a.camera.center,r.bindFramebuffer(i?.fbo),r.bindTechnique(o,this._passParameters,a).bindDraw(this._drawParameters,a,this._passParameters),r.screen.draw()}updateParameters(t,e){this._passParameters.opacityElevation=1-s(P,j,t.relativeElevation);const a=this.viewingMode===m.Global?c(S,t.center):n(S,0,0,1),r=p(a,e);this._passParameters.dayNightTerminator=s(0,1,i(30*r,0,1)),this._isVisible&&this.enable()}get _isVisible(){const{opacityElevation:t,dayNightTerminator:e}=this._passParameters;return this._maxOpacity*t*e>=b}};t([o()],v.prototype,"_context",void 0),t([o()],v.prototype,"view",void 0),t([o()],v.prototype,"viewingMode",void 0),v=t([h("esri.views.3d.webgl-engine.lib.ShadowHighlight")],v);const S=d();export{v as ShadowHighlight};
5
+ import{_ as t}from"../../../../../chunks/tslib.es6.js";import{unitRGBAFromColor as e}from"../../../../../core/colorUtils.js";import{smoothstep as s,clamp as i}from"../../../../../core/mathUtils.js";import{watch as a,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as h}from"../../../../../core/accessorSupport/decorators/subclass.js";import{n as c,s as n,j as p}from"../../../../../chunks/vec3.js";import{c as d}from"../../../../../chunks/vec3f64.js";import{ViewingMode as m}from"../../../../ViewingMode.js";import{ReadShadowMapDrawParameters as l}from"../../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{SyncRenderPlugin as u,ConsumesHighlight as _}from"../RenderPlugin.js";import{defaultShadowOpacity as w,defaultShadowDifference as f,defaultShadowColor as g}from"./HighlightDefaults.js";import{ShadowHighlightPassParameters as y,ShadowHighlightTechnique as x}from"./ShadowHighlightTechnique.js";import{RenderSlot as O}from"../../lib/RenderSlot.js";const b=.001953125,P=4e4,j=5e4;let v=class extends u{constructor(t){super(t),this._maxOpacity=1,this._passParameters=new y,this._drawParameters=new l,this._shadowDifference=.2,this._context=null,this.produces=new Map([[O.SHADOW_HIGHLIGHT,()=>this._isVisible]])}consumes(){return _}initializeRenderContext(t){this._context=t,this.addHandles([a((()=>this.view.highlightOptions.shadowOpacity),(t=>{this._passParameters.shadowOpacity=t??w,this._updateOccludedShadowOpacity(),this._updateMaxOpacity()}),r),a((()=>this.view.highlightOptions.shadowDifference),(t=>{this._shadowDifference=t??f,this._updateOccludedShadowOpacity(),this._updateMaxOpacity()}),r),a((()=>this.view.highlightOptions.shadowColor),(t=>{this._passParameters.shadowColor=e(t??g),this._updateMaxOpacity()}),r)])}_updateOccludedShadowOpacity(){this._passParameters.occludedShadowOpacity=this._passParameters.shadowOpacity*(1-this._shadowDifference)}_updateMaxOpacity(){const t=Math.max(this._passParameters.shadowOpacity,this._passParameters.occludedShadowOpacity);this._maxOpacity=t*this._passParameters.shadowColor[3]}uninitializeRenderContext(){this._context=null}enable(){this._context&&null==this._technique&&(this._technique=this._context.techniqueRepository.acquire(x))}renderNode(t,e,s,i){if(!(this._context&&s&&s.highlightTexture&&this._isVisible))return;if(!this._technique?.compiled)return void this._context.requestRender();const a=t.bindParameters;if(!a.shadowMap.enabled||!a.linearDepth)return;const r=t.rctx,o=this._technique;this._passParameters.highlight=s.highlightTexture,this._drawParameters.origin=a.camera.center,r.bindFramebuffer(i?.fbo),r.bindTechnique(o,this._passParameters,a).bindDraw(this._drawParameters,a,this._passParameters),r.screen.draw()}updateParameters(t,e){this._passParameters.opacityElevation=1-s(P,j,t.relativeElevation);const a=this.viewingMode===m.Global?c(S,t.center):n(S,0,0,1),r=p(a,e);this._passParameters.dayNightTerminator=s(0,1,i(30*r,0,1)),this._isVisible&&this.enable()}get _isVisible(){const{opacityElevation:t,dayNightTerminator:e}=this._passParameters;return this._maxOpacity*t*e>=b}};t([o()],v.prototype,"_context",void 0),t([o()],v.prototype,"view",void 0),t([o()],v.prototype,"viewingMode",void 0),v=t([h("esri.views.3d.webgl-engine.lib.ShadowHighlight")],v);const S=d();export{v as ShadowHighlight};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{disposeMaybe as t,abortMaybe as r}from"../../../../../core/maybe.js";import{isAbortError as s,throwIfAborted as i,isAborted as o}from"../../../../../core/promiseUtils.js";import{watch as a,syncAndInitial as n}from"../../../../../core/reactiveUtils.js";import{property as h}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as l}from"../../../../../core/accessorSupport/decorators/subclass.js";import{requestImage as u}from"../../../../../support/requestImageUtils.js";import{ColorFormat as c}from"../../core/FBOCache.js";import{SyncRenderPlugin as d}from"../RenderPlugin.js";import{SMAABlendWeightsTechnique as _}from"./SMAABlendWeightsTechnique.js";import{SMAABlurTechnique as m}from"./SMAABlurTechnique.js";import{SMAAEdgeDetectTechnique as p}from"./SMAAEdgeDetectTechnique.js";import{SMAAPassParameters as b}from"./SMAAPassParameters.js";import{RenderFeature as T}from"../../lib/RenderFeature.js";import{RenderSlot as x}from"../../lib/RenderSlot.js";import{PixelFormat as f,TextureSamplingMode as q,ClearBufferBit as g,TextureWrapMode as C}from"../../../../webgl/enums.js";import{Texture as j}from"../../../../webgl/Texture.js";import{TextureDescriptor as A}from"../../../../webgl/TextureDescriptor.js";let w=class extends d{constructor(e){super(e),this._context=null,this._areaTexture=null,this._searchTexture=null,this._isEnabled=!1,this._smaaParameters=new b,this.produces=new Map([[x.ANTIALIASING,()=>this._isEnabled&&null!=this._context]])}get updating(){return null!=this._abortController}initializeRenderContext(e){this._context=e,this.addHandles([a((()=>this.view.qualitySettings.antialiasingEnabled),(e=>e||this._context?.isFeatureEnabled(T.Antialiasing)?this.enable():this.disable()),n)])}renderFeatureChanged(){this.view.qualitySettings.antialiasingEnabled||this._context?.isFeatureEnabled(T.Antialiasing)?this.enable():this.disable()}uninitializeRenderContext(){this.disable(),this._context=null}enable(){if(this._isEnabled||!this._context||this._abortController)return;if(null==this._edgeTechnique&&(this._edgeTechnique=this._context.techniqueRepository.acquire(p)),null==this._blendTechnique&&(this._blendTechnique=this._context.techniqueRepository.acquire(_)),null==this._blurTechnique&&(this._blurTechnique=this._context.techniqueRepository.acquire(m)),this._areaTexture&&this._searchTexture)return void(this._isEnabled=!0);this._abortController=new AbortController;const e=this._abortController.signal;import("./SMAAData.js").then((t=>this._loadTextures(this._context,t,e))).then((()=>{this._context?.requestRender(),this._abortController=null})).catch((e=>{s(e)||this._disposeTextures()}))}_loadTextures(e,t,r){return i(r),e?Promise.all([u(t.areaTexture).then((t=>E(e.fbos.rctx,q.LINEAR,f.RGB,t))),u(t.searchTexure).then((t=>E(e.fbos.rctx,q.NEAREST,f.LUMINANCE,t)))]).then((([e,t])=>{o(r)?(e.dispose(),t.dispose(),i(r)):(this._areaTexture=e,this._searchTexture=t,this._isEnabled=!0)})):Promise.reject()}_disposeTextures(){this._areaTexture=t(this._areaTexture),this._searchTexture=t(this._searchTexture)}disable(){this._abortController=r(this._abortController),this._isEnabled=!1}destroy(){this.disable(),this._disposeTextures()}render(e,t,r,s){if(!(this._isEnabled&&this._context&&r&&r.compositeTexture))return s;if(!(this._edgeTechnique?.compiled&&this._blendTechnique?.compiled&&this._blurTechnique?.compiled))return this._context.requestRender(),s;const i=r.compositeTexture,o=i.descriptor.width,a=i.descriptor.height,n=this._context.fbos,h=e.rctx;h.setViewport(0,0,o,a);const l=n.acquire(c.RG,o,a);h.bindFramebuffer(l.fbo),h.setClearColor(0,0,0,1),h.clear(g.COLOR_BUFFER_BIT),this._smaaParameters.color=i,h.bindTechnique(this._edgeTechnique,this._smaaParameters),h.screen.draw();const u=n.acquire(c.RGBA,o,a);return h.bindFramebuffer(u.fbo),h.setClearColor(0,0,1,1),h.clear(g.COLOR_BUFFER_BIT),this._smaaParameters.inputTexture=l.colorTexture,this._smaaParameters.areaTexture=this._areaTexture,this._smaaParameters.searchTexture=this._searchTexture,h.bindTechnique(this._blendTechnique,this._smaaParameters),h.screen.draw(),h.bindFramebuffer(s?.fbo),l.release(),h.setClearColor(0,1,0,1),h.clear(g.COLOR_BUFFER_BIT),this._smaaParameters.inputTexture=u.colorTexture,h.bindTechnique(this._blurTechnique,this._smaaParameters),h.screen.draw(),u.release(),s}};function E(e,t,r,s){const i=new A;return i.pixelFormat=r,i.wrapMode=C.CLAMP_TO_EDGE,i.width=s.width,i.height=s.height,i.samplingMode=t,new j(e,i,s)}e([h()],w.prototype,"view",void 0),e([h()],w.prototype,"_context",void 0),e([h()],w.prototype,"_abortController",void 0),e([h({readOnly:!0})],w.prototype,"updating",null),w=e([l("esri.views.3d.webgl-engine.lib.SMAA")],w);export{w as SMAA};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{disposeMaybe as t,abortMaybe as r}from"../../../../../core/maybe.js";import{isAbortError as s,throwIfAborted as i,isAborted as o}from"../../../../../core/promiseUtils.js";import{watch as a,syncAndInitial as n}from"../../../../../core/reactiveUtils.js";import{property as h}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as l}from"../../../../../core/accessorSupport/decorators/subclass.js";import{requestImage as u}from"../../../../../support/requestImageUtils.js";import{ColorFormat as c}from"../../core/FBOCache.js";import{SyncRenderPlugin as d}from"../RenderPlugin.js";import{SMAABlendWeightsTechnique as _}from"./SMAABlendWeightsTechnique.js";import{SMAABlurTechnique as m}from"./SMAABlurTechnique.js";import{SMAAEdgeDetectTechnique as p}from"./SMAAEdgeDetectTechnique.js";import{SMAAPassParameters as b}from"./SMAAPassParameters.js";import{RenderFeature as T}from"../../lib/RenderFeature.js";import{RenderSlot as x}from"../../lib/RenderSlot.js";import{PixelFormat as f,TextureSamplingMode as q,ClearBufferBit as g,TextureWrapMode as C}from"../../../../webgl/enums.js";import{Texture as j}from"../../../../webgl/Texture.js";import{TextureDescriptor as A}from"../../../../webgl/TextureDescriptor.js";let w=class extends d{constructor(e){super(e),this._context=null,this._areaTexture=null,this._searchTexture=null,this._isEnabled=!1,this._smaaParameters=new b,this.produces=new Map([[x.ANTIALIASING,()=>this._isEnabled&&null!=this._context]])}get updating(){return null!=this._abortController}initializeRenderContext(e){this._context=e,this.addHandles([a((()=>this.view.qualitySettings.antialiasingEnabled),(e=>e||this._context?.isFeatureEnabled(T.Antialiasing)?this.enable():this.disable()),n)])}renderFeatureChanged(){this.view.qualitySettings.antialiasingEnabled||this._context?.isFeatureEnabled(T.Antialiasing)?this.enable():this.disable()}uninitializeRenderContext(){this.disable(),this._context=null}enable(){if(this._isEnabled||!this._context||this._abortController)return;if(null==this._edgeTechnique&&(this._edgeTechnique=this._context.techniqueRepository.acquire(p)),null==this._blendTechnique&&(this._blendTechnique=this._context.techniqueRepository.acquire(_)),null==this._blurTechnique&&(this._blurTechnique=this._context.techniqueRepository.acquire(m)),this._areaTexture&&this._searchTexture)return void(this._isEnabled=!0);this._abortController=new AbortController;const e=this._abortController.signal;import("./SMAAData.js").then((t=>this._loadTextures(this._context,t,e))).then((()=>{this._context?.requestRender(),this._abortController=null})).catch((e=>{s(e)||this._disposeTextures()}))}_loadTextures(e,t,r){return i(r),e?Promise.all([u(t.areaTexture).then((t=>E(e.fbos.rctx,q.LINEAR,f.RGB,t))),u(t.searchTexure).then((t=>E(e.fbos.rctx,q.NEAREST,f.LUMINANCE,t)))]).then((([e,t])=>{o(r)?(e.dispose(),t.dispose(),i(r)):(this._areaTexture=e,this._searchTexture=t,this._isEnabled=!0)})):Promise.reject()}_disposeTextures(){this._areaTexture=t(this._areaTexture),this._searchTexture=t(this._searchTexture)}disable(){this._abortController=r(this._abortController),this._isEnabled=!1}destroy(){this.disable(),this._disposeTextures()}renderNode(e,t,r,s){if(!(this._isEnabled&&this._context&&r&&r.compositeTexture))return s;if(!(this._edgeTechnique?.compiled&&this._blendTechnique?.compiled&&this._blurTechnique?.compiled))return this._context.requestRender(),s;const i=r.compositeTexture,o=i.descriptor.width,a=i.descriptor.height,n=this._context.fbos,h=e.rctx;h.setViewport(0,0,o,a);const l=n.acquire(c.RG,o,a);h.bindFramebuffer(l.fbo),h.setClearColor(0,0,0,1),h.clear(g.COLOR_BUFFER_BIT),this._smaaParameters.color=i,h.bindTechnique(this._edgeTechnique,this._smaaParameters),h.screen.draw();const u=n.acquire(c.RGBA,o,a);return h.bindFramebuffer(u.fbo),h.setClearColor(0,0,1,1),h.clear(g.COLOR_BUFFER_BIT),this._smaaParameters.inputTexture=l.colorTexture,this._smaaParameters.areaTexture=this._areaTexture,this._smaaParameters.searchTexture=this._searchTexture,h.bindTechnique(this._blendTechnique,this._smaaParameters),h.screen.draw(),h.bindFramebuffer(s?.fbo),l.release(),h.setClearColor(0,1,0,1),h.clear(g.COLOR_BUFFER_BIT),this._smaaParameters.inputTexture=u.colorTexture,h.bindTechnique(this._blurTechnique,this._smaaParameters),h.screen.draw(),u.release(),s}};function E(e,t,r,s){const i=new A;return i.pixelFormat=r,i.wrapMode=C.CLAMP_TO_EDGE,i.width=s.width,i.height=s.height,i.samplingMode=t,new j(e,i,s)}e([h()],w.prototype,"view",void 0),e([h()],w.prototype,"_context",void 0),e([h()],w.prototype,"_abortController",void 0),e([h({readOnly:!0})],w.prototype,"updating",null),w=e([l("esri.views.3d.webgl-engine.lib.SMAA")],w);export{w as SMAA};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as r,syncAndInitial as s}from"../../../../../core/reactiveUtils.js";import{Milliseconds as i}from"../../../../../core/time.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators/subclass.js";import{s as n}from"../../../../../chunks/vec2.js";import{ColorFormat as c}from"../../core/FBOCache.js";import{SyncRenderPlugin as m,ConsumesDepthNormal as l,ConsumesNone as u}from"../RenderPlugin.js";import{SSAOBlurTechnique as h}from"./SSAOBlurTechnique.js";import{noiseData as p}from"./SSAONoiseData.js";import{SSAOPassParameters as _,BlurDrawParameters as d}from"./SSAOParameters.js";import{SSAOTechnique as b}from"./SSAOTechnique.js";import{RenderFeature as T}from"../../lib/RenderFeature.js";import{RenderSlot as w}from"../../lib/RenderSlot.js";import{g as x}from"../../../../../chunks/SSAO.glsl.js";import{TextureWrapMode as f,PixelFormat as P,ClearBufferBit as S}from"../../../../webgl/enums.js";import{Texture as q}from"../../../../webgl/Texture.js";import{TextureDescriptor as j}from"../../../../webgl/TextureDescriptor.js";const R=2;let y=class extends m{constructor(e){super(e),this._context=null,this._passParameters=new _,this._drawParameters=new d,this.produces=new Map([[w.SSAO,()=>this._produces()]])}_produces(){return null!=this._enableTime&&null!=this._context}consumes(){return this._produces()?l:u}initializeRenderContext(e){this._context=e,this.addHandles([r((()=>this.view.qualitySettings.ambientOcclusion||this._context?.isFeatureEnabled(T.SSAO)),(e=>e?this._enable():this._disable()),s)])}uninitializeRenderContext(){this._disable(),this._context=null}_disable(){this._passParameters.noiseTexture=t(this._passParameters.noiseTexture),this._enableTime=null}destroy(){this._disable()}_enable(){if(null!=this._enableTime||!this._context)return;const e=Uint8Array.from(atob(p),(e=>e.charCodeAt(0))),t=new j;t.wrapMode=f.CLAMP_TO_EDGE,t.pixelFormat=P.RGB,t.wrapMode=f.REPEAT,t.hasMipmap=!0,t.width=32,t.height=32,this._passParameters.noiseTexture=new q(this._context.renderContext.rctx,t,e),null==this._ssaoTechnique&&(this._ssaoTechnique=this._context.techniqueRepository.acquire(b)),null==this._blurTechnique&&(this._blurTechnique=this._context.techniqueRepository.acquire(h)),this._enableTime=i(0),this._context?.requestRender()}render(e,t,r){const s=e.bindParameters,i=s.linearDepth?.colorTexture;if(null==this._enableTime||null==this._context||null==i||!r?.normalTexture)return;if(!this._ssaoTechnique.compiled||!this._blurTechnique.compiled)return this._enableTime=e.time,void this._context.requestRender();0===this._enableTime&&(this._enableTime=e.time);const o=e.rctx,a=s.camera,m=this.view.qualitySettings.fadeDuration,l=m>0?Math.min(m,e.time-this._enableTime)/m:1;this._passParameters.normalTexture=r.normalTexture,this._passParameters.depthTexture=i,this._passParameters.projScale=1/a.computeRenderPixelSizeAtDist(1),this._passParameters.intensity=4*O/x(a)**6*l;const u=a.fullViewport[2],h=a.fullViewport[3],p=u/R,_=h/R,d=this._context.fbos,b=d.acquire(c.RED,u,h);o.bindFramebuffer(b.fbo),o.setViewport(0,0,u,h);o.bindTechnique(this._ssaoTechnique,this._passParameters,s).bindDraw(this._drawParameters,s,this._passParameters),o.screen.draw();const T=o.bindTechnique(this._blurTechnique,this._passParameters,s);o.setViewport(0,0,p,_);const w=d.acquire(c.RED,p,_);o.bindFramebuffer(w.fbo),this._drawParameters.colorTexture=b.colorTexture,n(this._drawParameters.blurSize,0,R/h),T.bindDraw(this._drawParameters,s,this._passParameters),o.setViewport(0,0,p,_),o.screen.draw(),b.release();const f=d.acquire(c.RED,p,_);return o.bindFramebuffer(f.fbo),o.setViewport(0,0,u,h),o.setClearColor(1,1,1,0),o.clear(S.COLOR_BUFFER_BIT),o.setViewport(0,0,p,_),this._drawParameters.colorTexture=w.colorTexture,n(this._drawParameters.blurSize,R/u,0),T.bindDraw(this._drawParameters,s,this._passParameters),o.screen.draw(),o.setViewport4fv(a.fullViewport),w.release(),l<1&&this._context.requestRender(),f}};e([o({constructOnly:!0})],y.prototype,"view",void 0),e([o()],y.prototype,"_context",void 0),y=e([a("esri.views.3d.webgl-engine.lib.SSAO")],y);const O=.5;export{y as SSAO,R as blurSizePixels};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as r,syncAndInitial as s}from"../../../../../core/reactiveUtils.js";import{Milliseconds as i}from"../../../../../core/time.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators/subclass.js";import{s as n}from"../../../../../chunks/vec2.js";import{ColorFormat as c}from"../../core/FBOCache.js";import{SyncRenderPlugin as m,ConsumesDepthNormal as l,ConsumesNone as u}from"../RenderPlugin.js";import{SSAOBlurTechnique as h}from"./SSAOBlurTechnique.js";import{noiseData as p}from"./SSAONoiseData.js";import{SSAOPassParameters as _,BlurDrawParameters as d}from"./SSAOParameters.js";import{SSAOTechnique as b}from"./SSAOTechnique.js";import{RenderFeature as T}from"../../lib/RenderFeature.js";import{RenderSlot as w}from"../../lib/RenderSlot.js";import{g as x}from"../../../../../chunks/SSAO.glsl.js";import{TextureWrapMode as f,PixelFormat as P,ClearBufferBit as S}from"../../../../webgl/enums.js";import{Texture as q}from"../../../../webgl/Texture.js";import{TextureDescriptor as j}from"../../../../webgl/TextureDescriptor.js";const R=2;let y=class extends m{constructor(e){super(e),this._context=null,this._passParameters=new _,this._drawParameters=new d,this.produces=new Map([[w.SSAO,()=>this._produces()]])}_produces(){return null!=this._enableTime&&null!=this._context}consumes(){return this._produces()?l:u}initializeRenderContext(e){this._context=e,this.addHandles([r((()=>this.view.qualitySettings.ambientOcclusion||this._context?.isFeatureEnabled(T.SSAO)),(e=>e?this._enable():this._disable()),s)])}uninitializeRenderContext(){this._disable(),this._context=null}_disable(){this._passParameters.noiseTexture=t(this._passParameters.noiseTexture),this._enableTime=null}destroy(){this._disable()}_enable(){if(null!=this._enableTime||!this._context)return;const e=Uint8Array.from(atob(p),(e=>e.charCodeAt(0))),t=new j;t.wrapMode=f.CLAMP_TO_EDGE,t.pixelFormat=P.RGB,t.wrapMode=f.REPEAT,t.hasMipmap=!0,t.width=32,t.height=32,this._passParameters.noiseTexture=new q(this._context.renderContext.rctx,t,e),null==this._ssaoTechnique&&(this._ssaoTechnique=this._context.techniqueRepository.acquire(b)),null==this._blurTechnique&&(this._blurTechnique=this._context.techniqueRepository.acquire(h)),this._enableTime=i(0),this._context?.requestRender()}renderNode(e,t,r){const s=e.bindParameters,i=s.linearDepth?.colorTexture;if(null==this._enableTime||null==this._context||null==i||!r?.normalTexture)return;if(!this._ssaoTechnique.compiled||!this._blurTechnique.compiled)return this._enableTime=e.time,void this._context.requestRender();0===this._enableTime&&(this._enableTime=e.time);const o=e.rctx,a=s.camera,m=this.view.qualitySettings.fadeDuration,l=m>0?Math.min(m,e.time-this._enableTime)/m:1;this._passParameters.normalTexture=r.normalTexture,this._passParameters.depthTexture=i,this._passParameters.projScale=1/a.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*O/x(a)**6*l;const u=a.fullViewport[2],h=a.fullViewport[3],p=u/R,_=h/R,d=this._context.fbos,b=d.acquire(c.RED,u,h);o.bindFramebuffer(b.fbo),o.setViewport(0,0,u,h);o.bindTechnique(this._ssaoTechnique,this._passParameters,s).bindDraw(this._drawParameters,s,this._passParameters),o.screen.draw();const T=o.bindTechnique(this._blurTechnique,this._passParameters,s);o.setViewport(0,0,p,_);const w=d.acquire(c.RED,p,_);o.bindFramebuffer(w.fbo),this._drawParameters.colorTexture=b.colorTexture,n(this._drawParameters.blurSize,0,R/h),T.bindDraw(this._drawParameters,s,this._passParameters),o.setViewport(0,0,p,_),o.screen.draw(),b.release();const f=d.acquire(c.RED,p,_);return o.bindFramebuffer(f.fbo),o.setViewport(0,0,u,h),o.setClearColor(1,1,1,0),o.clear(S.COLOR_BUFFER_BIT),o.setViewport(0,0,p,_),this._drawParameters.colorTexture=w.colorTexture,n(this._drawParameters.blurSize,R/u,0),T.bindDraw(this._drawParameters,s,this._passParameters),o.screen.draw(),o.setViewport4fv(a.fullViewport),w.release(),l<1&&this._context.requestRender(),f}};e([o({constructOnly:!0})],y.prototype,"view",void 0),e([o()],y.prototype,"_context",void 0),y=e([a("esri.views.3d.webgl-engine.lib.SSAO")],y);const O=.5;export{y as SSAO,R as blurSizePixels};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- class s{constructor(s,t,i=!1,e=t){this.data=s,this.size=t,this.exclusive=i,this.stride=e}}export{s as Attribute};
5
+ class s{constructor(s,t,i=t){this.data=s,this.size=t,this.stride=i}}class t extends s{constructor(s,t,i,e=!1,c=i){super(s,i,c),this.indices=t,this.exclusive=e}}export{t as Attribute,s as Vertices};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import i from"../../../../core/PooledArray.js";import{p as t,a as s}from"../../../../chunks/vec3.js";import{f as e,g as n,c as r}from"../../../../chunks/vec3f64.js";import{assert as h}from"./Util.js";class o{constructor(i,s,o,c){this.primitiveIndices=i,this._numIndexPerPrimitive=s,this.indices=o,this.position=c,this._children=void 0,h(i.length>=1),h(o.length%this._numIndexPerPrimitive==0),h(o.length>=i.length*this._numIndexPerPrimitive),h(3===c.size||4===c.size);const{data:l,size:d}=c,m=i.length;let u=d*o[this._numIndexPerPrimitive*i[0]];a.clear(),a.push(u);const f=e(l[u],l[u+1],l[u+2]),x=n(f);for(let t=0;t<m;++t){const s=this._numIndexPerPrimitive*i[t];for(let i=0;i<this._numIndexPerPrimitive;++i){u=d*o[s+i],a.push(u);let t=l[u];f[0]=Math.min(t,f[0]),x[0]=Math.max(t,x[0]),t=l[u+1],f[1]=Math.min(t,f[1]),x[1]=Math.max(t,x[1]),t=l[u+2],f[2]=Math.min(t,f[2]),x[2]=Math.max(t,x[2])}}this.bbMin=f,this.bbMax=x;const P=t(r(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(x[0]-f[0],x[1]-f[1]),x[2]-f[2]);let p=this.radius*this.radius;for(let t=0;t<a.length;++t){u=a.at(t);const i=l[u]-P[0],s=l[u+1]-P[1],e=l[u+2]-P[2],n=i*i+s*s+e*e;if(n<=p)continue;const r=Math.sqrt(n),h=.5*(r-this.radius);this.radius=this.radius+h,p=this.radius*this.radius;const o=h/r;P[0]+=i*o,P[1]+=s*o,P[2]+=e*o}this.center=P,a.clear()}getChildren(){if(this._children||s(this.bbMin,this.bbMax)<=1)return this._children;const i=t(r(),this.bbMin,this.bbMax,.5),e=this.primitiveIndices.length,n=new Uint8Array(e),h=new Array(8);for(let t=0;t<8;++t)h[t]=0;const{data:a,size:c}=this.position;for(let t=0;t<e;++t){let s=0;const e=this._numIndexPerPrimitive*this.primitiveIndices[t];let r=c*this.indices[e],o=a[r],l=a[r+1],d=a[r+2];for(let i=1;i<this._numIndexPerPrimitive;++i){r=c*this.indices[e+i];const t=a[r],s=a[r+1],n=a[r+2];t<o&&(o=t),s<l&&(l=s),n<d&&(d=n)}o<i[0]&&(s|=1),l<i[1]&&(s|=2),d<i[2]&&(s|=4),n[t]=s,++h[s]}let l=0;for(let t=0;t<8;++t)h[t]>0&&++l;if(l<2)return;const d=new Array(8);for(let t=0;t<8;++t)d[t]=h[t]>0?new Uint32Array(h[t]):void 0;for(let t=0;t<8;++t)h[t]=0;for(let t=0;t<e;++t){const i=n[t];d[i][h[i]++]=this.primitiveIndices[t]}this._children=new Array;for(let t=0;t<8;++t)void 0!==d[t]&&this._children.push(new o(d[t],this._numIndexPerPrimitive,this.indices,this.position));return this._children}static prune(){a.prune()}}const a=new i({deallocator:null});export{o as BoundingInfo};
5
+ import i from"../../../../core/PooledArray.js";import{p as t,a as e}from"../../../../chunks/vec3.js";import{f as s,g as r,c as n}from"../../../../chunks/vec3f64.js";import{assert as h}from"./Util.js";class o{constructor(i,e,o){this.primitiveIndices=i,this._numIndexPerPrimitive=e,this.position=o,this._children=void 0,h(i.length>=1),h(3===o.size||4===o.size);const{data:c,size:l,indices:m}=o;h(m.length%this._numIndexPerPrimitive==0),h(m.length>=i.length*this._numIndexPerPrimitive);const d=i.length;let u=l*m[this._numIndexPerPrimitive*i[0]];a.clear(),a.push(u);const f=s(c[u],c[u+1],c[u+2]),x=r(f);for(let t=0;t<d;++t){const e=this._numIndexPerPrimitive*i[t];for(let i=0;i<this._numIndexPerPrimitive;++i){u=l*m[e+i],a.push(u);let t=c[u];f[0]=Math.min(t,f[0]),x[0]=Math.max(t,x[0]),t=c[u+1],f[1]=Math.min(t,f[1]),x[1]=Math.max(t,x[1]),t=c[u+2],f[2]=Math.min(t,f[2]),x[2]=Math.max(t,x[2])}}this.bbMin=f,this.bbMax=x;const P=t(n(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(x[0]-f[0],x[1]-f[1]),x[2]-f[2]);let p=this.radius*this.radius;for(let t=0;t<a.length;++t){u=a.at(t);const i=c[u]-P[0],e=c[u+1]-P[1],s=c[u+2]-P[2],r=i*i+e*e+s*s;if(r<=p)continue;const n=Math.sqrt(r),h=.5*(n-this.radius);this.radius=this.radius+h,p=this.radius*this.radius;const o=h/n;P[0]+=i*o,P[1]+=e*o,P[2]+=s*o}this.center=P,a.clear()}getChildren(){if(this._children||e(this.bbMin,this.bbMax)<=1)return this._children;const i=t(n(),this.bbMin,this.bbMax,.5),s=this.primitiveIndices.length,r=new Uint8Array(s),h=new Array(8);for(let t=0;t<8;++t)h[t]=0;const{data:a,size:c,indices:l}=this.position;for(let t=0;t<s;++t){let e=0;const s=this._numIndexPerPrimitive*this.primitiveIndices[t];let n=c*l[s],o=a[n],m=a[n+1],d=a[n+2];for(let i=1;i<this._numIndexPerPrimitive;++i){n=c*l[s+i];const t=a[n],e=a[n+1],r=a[n+2];t<o&&(o=t),e<m&&(m=e),r<d&&(d=r)}o<i[0]&&(e|=1),m<i[1]&&(e|=2),d<i[2]&&(e|=4),r[t]=e,++h[e]}let m=0;for(let t=0;t<8;++t)h[t]>0&&++m;if(m<2)return;const d=new Array(8);for(let t=0;t<8;++t)d[t]=h[t]>0?new Uint32Array(h[t]):void 0;for(let t=0;t<8;++t)h[t]=0;for(let t=0;t<s;++t){const i=r[t];d[i][h[i]++]=this.primitiveIndices[t]}this._children=new Array;for(let t=0;t<8;++t)void 0!==d[t]&&this._children.push(new o(d[t],this._numIndexPerPrimitive,this.position));return this._children}static prune(){a.prune()}}const a=new i({deallocator:null});export{o as BoundingInfo};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";import i from"../../../../core/Accessor.js";import e from"../../../../core/Logger.js";import{lerp as r}from"../../../../core/mathUtils.js";import{createScreenPointArray as s,createRenderScreenPointArray3 as h}from"../../../../core/screenUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{h as a,m as p,q as u,a as _,i as v,t as l,u as c}from"../../../../chunks/mat4.js";import{a as w}from"../../../../chunks/mat4f64.js";import{j as d,m as y}from"../../../../chunks/vec2.js";import{f as g}from"../../../../chunks/vec2f64.js";import{f,o as m,c as x,h as M,u as T,j as D,F as j,y as R,i as P,l as F,s as O,b as V,n as S,C}from"../../../../chunks/vec3.js";import{c as I}from"../../../../chunks/vec3f64.js";import{b,e as E,h as L,c as H,i as k,t as U}from"../../../../chunks/vec4.js";import{f as B,c as G}from"../../../../chunks/vec4f64.js";import{create as A,copy as z,fromMatrix as W}from"../../../../geometry/support/frustum.js";import{create as X}from"../../../../geometry/support/ray.js";import{projectPointSignedLength as Y}from"../../../../geometry/support/vector.js";import{ViewingMode as q}from"../../../ViewingMode.js";import{fovd2fovx as N,fovx2fovd as J,fovd2fovy as K,fovy2fovd as Q}from"./fov.js";var Z;let $=Z=class extends i{constructor(t={}){super(t),this._center=I(),this._up=I(),this._viewUp=I(),this._viewForward=I(),this._viewRight=I(),this._ray=X(),this._viewport=B(0,0,1,1),this._padding=B(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=g(1,1e3),this._viewDirty=!0,this._viewMatrix=w(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=w(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=w(),this._frustumDirty=!0,this._frustum=A(),this._fullViewport=G(),this._pixelRatio=1,this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}get eye(){return this._ray.origin}set eye(t){this._compareAndSetView(t,this._ray.origin)}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center,"_center")}get ray(){return f(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){a(this._viewMatrix,t),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),this._viewForward}get viewUp(){return this._ensureViewClean(),this._viewUp}get viewRight(){return this._ensureViewClean(),this._viewRight}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(t){this._nearFar[0]!==t&&(this._nearFar[0]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(t){this._nearFar[1]!==t&&(this._nearFar[1]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(t){this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const t=b(G(),this._viewport,1/this.pixelRatio),i=this._get("screenViewport");return i&&E(t,i)?i:t}get screenPadding(){if(1===this.pixelRatio)return this._padding;const t=b(G(),this._padding,1/this.pixelRatio),i=this._get("screenPadding");return i&&E(t,i)?i:t}get x(){return this._viewport[0]}set x(t){t+=this._padding[ht.LEFT],this._viewport[0]!==t&&(this._viewport[0]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(t){t+=this._padding[ht.BOTTOM],this._viewport[1]!==t&&(this._viewport[1]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(t){this._viewport[2]!==t&&(this._viewport[2]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(t){this._viewport[3]!==t&&(this._viewport[3]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[ht.RIGHT]+this._padding[ht.LEFT]}set fullWidth(t){this.width=t-(this._padding[ht.RIGHT]+this._padding[ht.LEFT])}get fullHeight(){return this._viewport[3]+this._padding[ht.TOP]+this._padding[ht.BOTTOM]}set fullHeight(t){this.height=t-(this._padding[ht.TOP]+this._padding[ht.BOTTOM])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[ht.LEFT],this._fullViewport[1]=this._viewport[1]-this._padding[ht.BOTTOM],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(t){L(this._padding,t)||(this._viewport[0]+=t[ht.LEFT]-this._padding[ht.LEFT],this._viewport[1]+=t[ht.BOTTOM]-this._padding[ht.BOTTOM],this._viewport[2]-=t[ht.RIGHT]+t[ht.LEFT]-(this._padding[ht.RIGHT]+this._padding[ht.LEFT]),this._viewport[3]-=t[ht.TOP]+t[ht.BOTTOM]-(this._padding[ht.TOP]+this._padding[ht.BOTTOM]),H(this._padding,t),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&(p(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){const t=this.width,i=this.height,e=this.near*Math.tan(this.fovY/2),r=e*this._aspect,s=u(w(),-r*(1+2*this._padding[ht.LEFT]/t),r*(1+2*this._padding[ht.RIGHT]/t),-e*(1+2*this._padding[ht.BOTTOM]/i),e*(1+2*this._padding[ht.TOP]/i),this.near,this.far),h=this._get("projectionMatrix");return h&&_(h,s)?h:s}get inverseProjectionMatrix(){return v(w(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||w()}get fov(){return this._fov}set fov(t){this._fov=t,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return N(this._fov,this.width,this.height)}set fovX(t){this._fov=J(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return K(this._fov,this.width,this.height)}set fovY(t){this._fov=Q(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return m(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(v(this._viewInverseTransposeMatrix,this.viewMatrix),l(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const i=2*t-1;return 2*this.near*this.far/(this.far+this.near-i*(this.far-this.near))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}copyFrom(t){x(this._ray.origin,t.eye),this.center=t.center,this.up=t.up,H(this._viewport,t.viewport),this.notifyChange("_viewport"),H(this._padding,t.padding),this.notifyChange("_padding"),d(this._nearFar,t.nearFar),this.notifyChange("_nearFar"),this._fov=t.fov,this.relativeElevation=t.relativeElevation;const i=t;return this._viewDirty=i._viewDirty,this._viewDirty||(a(this._viewMatrix,t.viewMatrix),x(this._viewRight,t.viewRight),x(this._viewUp,t.viewUp),x(this._viewForward,t.viewForward)),this._viewProjectionDirty=!0,this._frustumDirty=i._frustumDirty,this._frustumDirty||(z(this._frustum,t.frustum),this._frustumDirty=!1),i._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:(a(this._viewInverseTransposeMatrix,t.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),H(this._fullViewport,t.fullViewport),this.pixelRatio=t.pixelRatio,this}copyViewFrom(t){this.eye=t.eye,this.center=t.center,this.up=t.up}clone(){return(new Z).copyFrom(this)}equals(t){return M(this.eye,t.eye)&&M(this.center,t.center)&&M(this.up,t.up)&&L(this._viewport,t.viewport)&&L(this._padding,t.padding)&&y(this.nearFar,t.nearFar)&&this._fov===t.fov&&this.pixelRatio===t.pixelRatio&&this.relativeElevation===t.relativeElevation}almostEquals(t){const i=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||k(t.screenPadding,this.screenPadding)>=i||k(this.screenViewport,t.screenViewport)>=i)return!1;T(et,t.eye,t.center),T(rt,this.eye,this.center);const e=D(et,rt),r=j(et),s=j(rt),h=5e-4;return e*e>=(1-1e-10)*r*s&&R(t.eye,this.eye)<Math.max(r,s)*h*h}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs(Y(this.viewForward,f(et,t,this.eye)))}computeScreenPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeDistanceFromRadius(t,i){return t/Math.tan(Math.min(this.fovX,this.fovY)/(2*(i||1)))}getScreenCenter(t=s()){return t[0]=(this.padding[ht.LEFT]+this.width/2)/this.pixelRatio,t[1]=(this.padding[ht.TOP]+this.height/2)/this.pixelRatio,t}getRenderCenter(t,i=.5,e=.5){return t[0]=this.padding[ht.LEFT]+this.width*i,t[1]=this.padding[ht.BOTTOM]+this.height*e,t[2]=.5,t}setGLViewport(t){const i=this.viewport,e=this.padding;t.setViewport(i[0]-e[3],i[1]-e[2],i[2]+e[1]+e[3],i[3]+e[0]+e[2])}applyProjection(t,i){t!==tt&&x(tt,t),tt[3]=1,U(tt,tt,this.projectionMatrix);const e=Math.abs(tt[3]);P(tt,tt,1/e);const s=this.fullViewport;i[0]=r(0,s[0]+s[2],.5+.5*tt[0]),i[1]=r(0,s[1]+s[3],.5+.5*tt[1]),i[2]=.5*(tt[2]+1),i[3]=e}unapplyProjection(t,i){const e=this.fullViewport;tt[0]=(t[0]/(e[0]+e[2])*2-1)*t[3],tt[1]=(t[1]/(e[1]+e[3])*2-1)*t[3],tt[2]=(2*t[2]-1)*t[3],tt[3]=t[3],null!=this.inverseProjectionMatrix&&(U(tt,tt,this.inverseProjectionMatrix),i[0]=tt[0],i[1]=tt[1],i[2]=tt[2])}projectToScreen(t,i){return this.projectToRenderScreen(t,st),this.renderToScreen(st,i),i}projectToRenderScreen(t,i){if(tt[0]=t[0],tt[1]=t[1],tt[2]=t[2],tt[3]=1,U(tt,tt,this.viewProjectionMatrix),0===tt[3])return null;P(tt,tt,1/Math.abs(tt[3]));const e=this.fullViewport;return"x"in i?(i.x=r(0,e[0]+e[2],.5+.5*tt[0]),i.y=r(0,e[1]+e[3],.5+.5*tt[1])):(i[0]=r(0,e[0]+e[2],.5+.5*tt[0]),i[1]=r(0,e[1]+e[3],.5+.5*tt[1]),i.length>2&&(i[2]=.5*(tt[2]+1))),i}unprojectFromScreen(t,i){return this.unprojectFromRenderScreen(this.screenToRender(t,st),i)}unprojectFromRenderScreen(t,i){if(p(it,this.projectionMatrix,this.viewMatrix),!v(it,it))return null;const e=this.fullViewport;return tt[0]=2*(t[0]-e[0])/e[2]-1,tt[1]=2*(t[1]-e[1])/e[3]-1,tt[2]=2*t[2]-1,tt[3]=1,U(tt,tt,it),0===tt[3]?null:(i[0]=tt[0]/tt[3],i[1]=tt[1]/tt[3],i[2]=tt[2]/tt[3],i)}constrainWindowSize(t,i,e,r){const s=t*this.pixelRatio,h=i*this.pixelRatio,o=Math.max(s-e/2,0),n=Math.max(this.fullHeight-h-r/2,0),a=-Math.min(s-e/2,0),p=-Math.min(this.fullHeight-h-r/2,0);return[o,n,e-a- -Math.min(this.fullWidth-s-e/2,0),r-p- -Math.min(h-r/2,0)]}computeUp(t){t===q.Global?this._computeUpGlobal():this._computeUpLocal()}screenToRender(t,i){const e=t[0]*this.pixelRatio,r=this.fullHeight-t[1]*this.pixelRatio;return i[0]=e,i[1]=r,i}renderToScreen(t,i){const e=t[0]/this.pixelRatio,r=(this.fullHeight-t[1])/this.pixelRatio;i[0]=e,i[1]=r}_computeUpGlobal(){f(et,this.center,this.eye);const t=F(this.center);t<1?(O(this._up,0,0,1),this._markViewDirty(),this.notifyChange("_up")):Math.abs(D(et,this.center))>.9999*F(et)*t||(V(this._up,et,this.center),V(this._up,this._up,et),S(this._up,this._up),this.notifyChange("_up"),this._markViewDirty())}_computeUpLocal(){C(et,this.eye,this.center),Math.abs(et[2])<=.9999&&(P(et,et,et[2]),O(this._up,-et[0],-et[1],1-et[2]),S(this._up,this._up),this.notifyChange("_up"),this._markViewDirty())}_compareAndSetView(t,i,r=""){"number"==typeof t[0]&&isFinite(t[0])&&"number"==typeof t[1]&&isFinite(t[1])&&"number"==typeof t[2]&&isFinite(t[2])?M(t,i)||(x(i,t),this._markViewDirty(),r.length&&this.notifyChange(r)):e.getLogger("esri.views.3d.webgl-engine.lib.Camera").warn("Camera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&(W(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&(c(this._viewMatrix,this.eye,this.center,this.up),O(this._viewForward,-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10]),O(this._viewUp,this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9]),O(this._viewRight,this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8]),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};t([o()],$.prototype,"_center",void 0),t([o()],$.prototype,"_up",void 0),t([o()],$.prototype,"_viewport",void 0),t([o()],$.prototype,"_padding",void 0),t([o()],$.prototype,"_fov",void 0),t([o()],$.prototype,"_nearFar",void 0),t([o()],$.prototype,"_pixelRatio",void 0),t([o()],$.prototype,"pixelRatio",null),t([o()],$.prototype,"eye",null),t([o()],$.prototype,"center",null),t([o()],$.prototype,"up",null),t([o({readOnly:!0})],$.prototype,"nearFar",null),t([o()],$.prototype,"near",null),t([o()],$.prototype,"far",null),t([o()],$.prototype,"viewport",null),t([o({readOnly:!0})],$.prototype,"screenViewport",null),t([o({readOnly:!0})],$.prototype,"screenPadding",null),t([o()],$.prototype,"x",null),t([o()],$.prototype,"y",null),t([o()],$.prototype,"width",null),t([o()],$.prototype,"height",null),t([o()],$.prototype,"fullWidth",null),t([o()],$.prototype,"fullHeight",null),t([o({readOnly:!0})],$.prototype,"_aspect",null),t([o()],$.prototype,"padding",null),t([o({readOnly:!0})],$.prototype,"projectionMatrix",null),t([o({readOnly:!0})],$.prototype,"inverseProjectionMatrix",null),t([o()],$.prototype,"fov",null),t([o()],$.prototype,"fovX",null),t([o()],$.prototype,"fovY",null),$=Z=t([n("esri.views.3d.webgl-engine.lib.Camera")],$);const tt=G(),it=w(),et=I(),rt=I(),st=h();var ht;!function(t){t[t.TOP=0]="TOP",t[t.RIGHT=1]="RIGHT",t[t.BOTTOM=2]="BOTTOM",t[t.LEFT=3]="LEFT"}(ht||(ht={}));export{$ as Camera,ht as PaddingSide};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import i from"../../../../core/Accessor.js";import e from"../../../../core/Logger.js";import{lerp as r}from"../../../../core/mathUtils.js";import{createScreenPointArray as s,createRenderScreenPointArray3 as h}from"../../../../core/screenUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{h as a,m as p,q as u,a as _,i as v,t as l,u as c}from"../../../../chunks/mat4.js";import{a as w}from"../../../../chunks/mat4f64.js";import{j as d,m as y}from"../../../../chunks/vec2.js";import{f as g}from"../../../../chunks/vec2f64.js";import{f,o as m,c as x,h as M,u as T,j as D,F as j,y as R,i as P,l as F,s as O,b as V,n as S,C}from"../../../../chunks/vec3.js";import{c as I}from"../../../../chunks/vec3f64.js";import{b,e as E,h as L,c as H,i as k,t as U}from"../../../../chunks/vec4.js";import{f as B,c as G}from"../../../../chunks/vec4f64.js";import{create as A,copy as z,fromMatrix as W}from"../../../../geometry/support/frustum.js";import{create as X}from"../../../../geometry/support/ray.js";import{projectPointSignedLength as Y}from"../../../../geometry/support/vector.js";import{ViewingMode as q}from"../../../ViewingMode.js";import{fovd2fovx as N,fovx2fovd as J,fovd2fovy as K,fovy2fovd as Q}from"./fov.js";var Z;let $=Z=class extends i{constructor(t={}){super(t),this._center=I(),this._up=I(),this._viewUp=I(),this._viewForward=I(),this._viewRight=I(),this._ray=X(),this._viewport=B(0,0,1,1),this._padding=B(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=g(1,1e3),this._viewDirty=!0,this._viewMatrix=w(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=w(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=w(),this._frustumDirty=!0,this._frustum=A(),this._fullViewport=G(),this._pixelRatio=1,this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}get eye(){return this._ray.origin}set eye(t){this._compareAndSetView(t,this._ray.origin)}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center,"_center")}get ray(){return f(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){a(this._viewMatrix,t),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),this._viewForward}get viewUp(){return this._ensureViewClean(),this._viewUp}get viewRight(){return this._ensureViewClean(),this._viewRight}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(t){this._nearFar[0]!==t&&(this._nearFar[0]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(t){this._nearFar[1]!==t&&(this._nearFar[1]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(t){this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const t=b(G(),this._viewport,1/this.pixelRatio),i=this._get("screenViewport");return i&&E(t,i)?i:t}get screenPadding(){if(1===this.pixelRatio)return this._padding;const t=b(G(),this._padding,1/this.pixelRatio),i=this._get("screenPadding");return i&&E(t,i)?i:t}get x(){return this._viewport[0]}set x(t){t+=this._padding[ht.LEFT],this._viewport[0]!==t&&(this._viewport[0]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(t){t+=this._padding[ht.BOTTOM],this._viewport[1]!==t&&(this._viewport[1]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(t){this._viewport[2]!==t&&(this._viewport[2]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(t){this._viewport[3]!==t&&(this._viewport[3]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[ht.RIGHT]+this._padding[ht.LEFT]}set fullWidth(t){this.width=t-(this._padding[ht.RIGHT]+this._padding[ht.LEFT])}get fullHeight(){return this._viewport[3]+this._padding[ht.TOP]+this._padding[ht.BOTTOM]}set fullHeight(t){this.height=t-(this._padding[ht.TOP]+this._padding[ht.BOTTOM])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[ht.LEFT],this._fullViewport[1]=this._viewport[1]-this._padding[ht.BOTTOM],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(t){L(this._padding,t)||(this._viewport[0]+=t[ht.LEFT]-this._padding[ht.LEFT],this._viewport[1]+=t[ht.BOTTOM]-this._padding[ht.BOTTOM],this._viewport[2]-=t[ht.RIGHT]+t[ht.LEFT]-(this._padding[ht.RIGHT]+this._padding[ht.LEFT]),this._viewport[3]-=t[ht.TOP]+t[ht.BOTTOM]-(this._padding[ht.TOP]+this._padding[ht.BOTTOM]),H(this._padding,t),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&(p(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){const t=this.width,i=this.height,e=this.near*Math.tan(this.fovY/2),r=e*this._aspect,s=u(w(),-r*(1+2*this._padding[ht.LEFT]/t),r*(1+2*this._padding[ht.RIGHT]/t),-e*(1+2*this._padding[ht.BOTTOM]/i),e*(1+2*this._padding[ht.TOP]/i),this.near,this.far),h=this._get("projectionMatrix");return h&&_(h,s)?h:s}get inverseProjectionMatrix(){return v(w(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||w()}get fov(){return this._fov}set fov(t){this._fov=t,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return N(this._fov,this.width,this.height)}set fovX(t){this._fov=J(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return K(this._fov,this.width,this.height)}set fovY(t){this._fov=Q(t,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return m(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(v(this._viewInverseTransposeMatrix,this.viewMatrix),l(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const i=2*t-1;return 2*this.near*this.far/(this.far+this.near-i*(this.far-this.near))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}copyFrom(t){x(this._ray.origin,t.eye),this.center=t.center,this.up=t.up,H(this._viewport,t.viewport),this.notifyChange("_viewport"),H(this._padding,t.padding),this.notifyChange("_padding"),d(this._nearFar,t.nearFar),this.notifyChange("_nearFar"),this._fov=t.fov,this.relativeElevation=t.relativeElevation;const i=t;return this._viewDirty=i._viewDirty,this._viewDirty||(a(this._viewMatrix,t.viewMatrix),x(this._viewRight,t.viewRight),x(this._viewUp,t.viewUp),x(this._viewForward,t.viewForward)),this._viewProjectionDirty=!0,this._frustumDirty=i._frustumDirty,this._frustumDirty||(z(this._frustum,t.frustum),this._frustumDirty=!1),i._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:(a(this._viewInverseTransposeMatrix,t.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),H(this._fullViewport,t.fullViewport),this.pixelRatio=t.pixelRatio,this}copyViewFrom(t){this.eye=t.eye,this.center=t.center,this.up=t.up}clone(){return(new Z).copyFrom(this)}equals(t){return M(this.eye,t.eye)&&M(this.center,t.center)&&M(this.up,t.up)&&L(this._viewport,t.viewport)&&L(this._padding,t.padding)&&y(this.nearFar,t.nearFar)&&this._fov===t.fov&&this.pixelRatio===t.pixelRatio&&this.relativeElevation===t.relativeElevation}almostEquals(t){const i=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||k(t.screenPadding,this.screenPadding)>=i||k(this.screenViewport,t.screenViewport)>=i)return!1;T(et,t.eye,t.center),T(rt,this.eye,this.center);const e=D(et,rt),r=j(et),s=j(rt),h=5e-4;return e*e>=(1-1e-10)*r*s&&R(t.eye,this.eye)<Math.max(r,s)*h*h}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perRenderPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs(Y(this.viewForward,f(et,t,this.eye)))}computeScreenPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeDistanceFromRadius(t,i){return t/Math.tan(Math.min(this.fovX,this.fovY)/(2*(i||1)))}getScreenCenter(t=s()){return t[0]=(this.padding[ht.LEFT]+this.width/2)/this.pixelRatio,t[1]=(this.padding[ht.TOP]+this.height/2)/this.pixelRatio,t}getRenderCenter(t,i=.5,e=.5){return t[0]=this.padding[ht.LEFT]+this.width*i,t[1]=this.padding[ht.BOTTOM]+this.height*e,t[2]=.5,t}setGLViewport(t){const i=this.viewport,e=this.padding;t.setViewport(i[0]-e[3],i[1]-e[2],i[2]+e[1]+e[3],i[3]+e[0]+e[2])}applyProjection(t,i){t!==tt&&x(tt,t),tt[3]=1,U(tt,tt,this.projectionMatrix);const e=Math.abs(tt[3]);P(tt,tt,1/e);const s=this.fullViewport;i[0]=r(0,s[0]+s[2],.5+.5*tt[0]),i[1]=r(0,s[1]+s[3],.5+.5*tt[1]),i[2]=.5*(tt[2]+1),i[3]=e}unapplyProjection(t,i){const e=this.fullViewport;tt[0]=(t[0]/(e[0]+e[2])*2-1)*t[3],tt[1]=(t[1]/(e[1]+e[3])*2-1)*t[3],tt[2]=(2*t[2]-1)*t[3],tt[3]=t[3],null!=this.inverseProjectionMatrix&&(U(tt,tt,this.inverseProjectionMatrix),i[0]=tt[0],i[1]=tt[1],i[2]=tt[2])}projectToScreen(t,i){return this.projectToRenderScreen(t,st),this.renderToScreen(st,i),i}projectToRenderScreen(t,i){if(tt[0]=t[0],tt[1]=t[1],tt[2]=t[2],tt[3]=1,U(tt,tt,this.viewProjectionMatrix),0===tt[3])return null;P(tt,tt,1/Math.abs(tt[3]));const e=this.fullViewport;return"x"in i?(i.x=r(0,e[0]+e[2],.5+.5*tt[0]),i.y=r(0,e[1]+e[3],.5+.5*tt[1])):(i[0]=r(0,e[0]+e[2],.5+.5*tt[0]),i[1]=r(0,e[1]+e[3],.5+.5*tt[1]),i.length>2&&(i[2]=.5*(tt[2]+1))),i}unprojectFromScreen(t,i){return this.unprojectFromRenderScreen(this.screenToRender(t,st),i)}unprojectFromRenderScreen(t,i){if(p(it,this.projectionMatrix,this.viewMatrix),!v(it,it))return null;const e=this.fullViewport;return tt[0]=2*(t[0]-e[0])/e[2]-1,tt[1]=2*(t[1]-e[1])/e[3]-1,tt[2]=2*t[2]-1,tt[3]=1,U(tt,tt,it),0===tt[3]?null:(i[0]=tt[0]/tt[3],i[1]=tt[1]/tt[3],i[2]=tt[2]/tt[3],i)}constrainWindowSize(t,i,e,r){const s=t*this.pixelRatio,h=i*this.pixelRatio,o=Math.max(s-e/2,0),n=Math.max(this.fullHeight-h-r/2,0),a=-Math.min(s-e/2,0),p=-Math.min(this.fullHeight-h-r/2,0);return[o,n,e-a- -Math.min(this.fullWidth-s-e/2,0),r-p- -Math.min(h-r/2,0)]}computeUp(t){t===q.Global?this._computeUpGlobal():this._computeUpLocal()}screenToRender(t,i){const e=t[0]*this.pixelRatio,r=this.fullHeight-t[1]*this.pixelRatio;return i[0]=e,i[1]=r,i}renderToScreen(t,i){const e=t[0]/this.pixelRatio,r=(this.fullHeight-t[1])/this.pixelRatio;i[0]=e,i[1]=r}_computeUpGlobal(){f(et,this.center,this.eye);const t=F(this.center);t<1?(O(this._up,0,0,1),this._markViewDirty(),this.notifyChange("_up")):Math.abs(D(et,this.center))>.9999*F(et)*t||(V(this._up,et,this.center),V(this._up,this._up,et),S(this._up,this._up),this.notifyChange("_up"),this._markViewDirty())}_computeUpLocal(){C(et,this.eye,this.center),Math.abs(et[2])<=.9999&&(P(et,et,et[2]),O(this._up,-et[0],-et[1],1-et[2]),S(this._up,this._up),this.notifyChange("_up"),this._markViewDirty())}_compareAndSetView(t,i,r=""){"number"==typeof t[0]&&isFinite(t[0])&&"number"==typeof t[1]&&isFinite(t[1])&&"number"==typeof t[2]&&isFinite(t[2])?M(t,i)||(x(i,t),this._markViewDirty(),r.length&&this.notifyChange(r)):e.getLogger("esri.views.3d.webgl-engine.lib.Camera").warn("Camera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&(W(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&(c(this._viewMatrix,this.eye,this.center,this.up),O(this._viewForward,-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10]),O(this._viewUp,this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9]),O(this._viewRight,this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8]),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};t([o()],$.prototype,"_center",void 0),t([o()],$.prototype,"_up",void 0),t([o()],$.prototype,"_viewport",void 0),t([o()],$.prototype,"_padding",void 0),t([o()],$.prototype,"_fov",void 0),t([o()],$.prototype,"_nearFar",void 0),t([o()],$.prototype,"_pixelRatio",void 0),t([o()],$.prototype,"pixelRatio",null),t([o()],$.prototype,"eye",null),t([o()],$.prototype,"center",null),t([o()],$.prototype,"up",null),t([o({readOnly:!0})],$.prototype,"nearFar",null),t([o()],$.prototype,"near",null),t([o()],$.prototype,"far",null),t([o()],$.prototype,"viewport",null),t([o({readOnly:!0})],$.prototype,"screenViewport",null),t([o({readOnly:!0})],$.prototype,"screenPadding",null),t([o()],$.prototype,"x",null),t([o()],$.prototype,"y",null),t([o()],$.prototype,"width",null),t([o()],$.prototype,"height",null),t([o()],$.prototype,"fullWidth",null),t([o()],$.prototype,"fullHeight",null),t([o({readOnly:!0})],$.prototype,"_aspect",null),t([o()],$.prototype,"padding",null),t([o({readOnly:!0})],$.prototype,"projectionMatrix",null),t([o({readOnly:!0})],$.prototype,"inverseProjectionMatrix",null),t([o()],$.prototype,"fov",null),t([o()],$.prototype,"fovX",null),t([o()],$.prototype,"fovY",null),$=Z=t([n("esri.views.3d.webgl-engine.lib.Camera")],$);const tt=G(),it=w(),et=I(),rt=I(),st=h();var ht;!function(t){t[t.TOP=0]="TOP",t[t.RIGHT=1]="RIGHT",t[t.BOTTOM=2]="BOTTOM",t[t.LEFT=3]="LEFT"}(ht||(ht={}));export{$ as Camera,ht as PaddingSide};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";import{releaseMaybe as e,disposeMaybe as r}from"../../../../core/maybe.js";import{watch as a}from"../../../../core/reactiveUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{ViewingMode as o}from"../../../ViewingMode.js";import{createQuadVAO as n}from"./glUtil3D.js";import{SortedRenderGeometryRenderer as h}from"./SortedRenderGeometryRenderer.js";import{HeatmapPassParameters as p,HeatmapTechniqueConfiguration as m,HeatmapTechnique as l}from"../shaders/HeatmapTechnique.js";import{TextureWrapMode as c,PixelType as d,ClearBufferBit as u}from"../../../webgl/enums.js";import{FramebufferObject as y}from"../../../webgl/FramebufferObject.js";import{Texture as _}from"../../../webgl/Texture.js";import{TextureDescriptor as f}from"../../../webgl/TextureDescriptor.js";import{vertexCount as g}from"../../../webgl/Util.js";let x=class extends h{constructor(t){super(t),this.pixelRatio=1,this._colorRampData=new Uint8ClampedArray(4),this.type="draped-heatmap",this._heatmapParameters=new p;const e=new f;e.pixelFormat=t.pixelFormat,e.internalFormat=t.internalFormat,e.dataType=t.dataType,e.samplingMode=t.samplingMode,e.wrapMode=c.CLAMP_TO_EDGE;const r=t.rendererContext.rctx;this._densityMap=new y(r,e),this._quad=n(r);const a=new m;a.usesHalfFloat=t.dataType!==d.FLOAT,this._technique=new l({rctx:r,viewingMode:o.Local},a)}initialize(){const t=this._colorRampData,e=new f(t.length/4,1);e.wrapMode=c.CLAMP_TO_EDGE,this._colorRamp=new _(this.rctx,e,t),this._heatmapParameters.densityMap=this._densityMap.colorTexture,this.addHandles(a((()=>[this.colorRampData,this.minDensity,this.maxDensity,this.fieldTotal,this.pixelRatio,this.searchRadius]),(()=>this.rendererContext.notifyContentChanged())))}destroy(){this._technique=e(this._technique),this._densityMap=r(this._densityMap),this._quad=r(this._quad),this._colorRamp=r(this._colorRamp)}get searchRadius(){return this._heatmapParameters.searchRadius}set searchRadius(t){t!==this._heatmapParameters.searchRadius&&(this._heatmapParameters.searchRadius=t,this.notifyChange("searchRadius"))}get minDensity(){return this._heatmapParameters.minDensity}set minDensity(t){t!==this._heatmapParameters.minDensity&&(this._heatmapParameters.minDensity=t,this.notifyChange("minDensity"))}get maxDensity(){return this._heatmapParameters.maxDensity}set maxDensity(t){t!==this._heatmapParameters.maxDensity&&(this._heatmapParameters.maxDensity=t,this.notifyChange("maxDensity"))}get fieldTotal(){return this._heatmapParameters.fieldTotal}set fieldTotal(t){this._heatmapParameters.fieldTotal=t,this.notifyChange("fieldTotal")}get colorRampData(){return this._colorRampData}set colorRampData(t){const{colorRamp:e}=this._heatmapParameters;if(null!=e&&t!==this._colorRampData){const r=e.descriptor.width,a=t.length/4;a!==r&&e.resize(a,1),e.setData(t)}this._colorRampData=t}get _colorRamp(){return this._heatmapParameters.colorRamp}set _colorRamp(t){this._heatmapParameters.colorRamp=t}get hasHighlights(){return!1}get hasWater(){return!1}get rendersOccluded(){return!1}render(t){const e=this._sortedMaterialRenderers;if(0===e.length)return;const r=this.rctx.getBoundFramebufferObject(),a=this.rctx.getViewport(),{pixelRatio:i}=this,s=Math.ceil(a.width*i),o=Math.ceil(a.height*i);this._densityMap.resize(s,o),this.rctx.bindFramebuffer(this._densityMap),this.rctx.setViewport(0,0,s,o),this.rctx.clear(u.COLOR_BUFFER_BIT);let n=!1;e.forAll((e=>{const r=e.prepareTechnique(t);null!=r&&(e.render(t,r),n=!0)})),this.rctx.bindFramebuffer(r),this.rctx.setViewport(a.x,a.y,a.width,a.height),n&&(this.rctx.bindVAO(this._quad),this.rctx.bindTechnique(this._technique,this._heatmapParameters,t.bindParameters),this.rctx.drawArrays(this._technique.primitiveType,0,g(this._quad,"geometry")))}};t([i()],x.prototype,"searchRadius",null),t([i()],x.prototype,"minDensity",null),t([i()],x.prototype,"maxDensity",null),t([i()],x.prototype,"fieldTotal",null),t([i()],x.prototype,"pixelRatio",void 0),t([i()],x.prototype,"colorRampData",null),t([i({constructOnly:!0})],x.prototype,"dataType",void 0),t([i({constructOnly:!0})],x.prototype,"samplingMode",void 0),t([i({constructOnly:!0})],x.prototype,"pixelFormat",void 0),t([i({constructOnly:!0})],x.prototype,"internalFormat",void 0),t([i()],x.prototype,"_colorRampData",void 0),x=t([s("esri.views.3d.webgl-engine.lib.DrapedHeatmapRenderer")],x);export{x as DrapedHeatmapRenderer};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import{releaseMaybe as e,disposeMaybe as r}from"../../../../core/maybe.js";import{watch as a}from"../../../../core/reactiveUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{ViewingMode as o}from"../../../ViewingMode.js";import{createQuadVAO as n}from"./glUtil3D.js";import{SortedRenderGeometryRenderer as h}from"./SortedRenderGeometryRenderer.js";import{HeatmapPassParameters as p,HeatmapTechniqueConfiguration as m,HeatmapTechnique as l}from"../shaders/HeatmapTechnique.js";import{TextureWrapMode as c,PixelType as d,ClearBufferBit as u}from"../../../webgl/enums.js";import{FramebufferObject as y}from"../../../webgl/FramebufferObject.js";import{Texture as _}from"../../../webgl/Texture.js";import{TextureDescriptor as f}from"../../../webgl/TextureDescriptor.js";import{vertexCount as g}from"../../../webgl/Util.js";let x=class extends h{constructor(t){super(t),this.pixelRatio=1,this._colorRampData=new Uint8ClampedArray(4),this.type="draped-heatmap",this._heatmapParameters=new p;const e=new f;e.pixelFormat=t.pixelFormat,e.internalFormat=t.internalFormat,e.dataType=t.dataType,e.samplingMode=t.samplingMode,e.wrapMode=c.CLAMP_TO_EDGE;const r=t.rendererContext.rctx;this._densityMap=new y(r,e),this._quad=n(r);const a=new m;a.usesHalfFloat=t.dataType!==d.FLOAT,this._technique=new l({rctx:r,viewingMode:o.Local},a)}initialize(){const t=this._colorRampData,e=new f(t.length/4,1);e.wrapMode=c.CLAMP_TO_EDGE,this._colorRamp=new _(this.rctx,e,t),this._heatmapParameters.densityMap=this._densityMap.colorTexture,this.addHandles(a((()=>[this.colorRampData,this.minDensity,this.maxDensity,this.fieldTotal,this.pixelRatio,this.searchRadius]),(()=>this.rendererContext.notifyContentChanged())))}destroy(){this._technique=e(this._technique),this._densityMap=r(this._densityMap),this._quad=r(this._quad),this._colorRamp=r(this._colorRamp)}get searchRadius(){return this._heatmapParameters.searchRadius}set searchRadius(t){t!==this._heatmapParameters.searchRadius&&(this._heatmapParameters.searchRadius=t,this.notifyChange("searchRadius"))}get minDensity(){return this._heatmapParameters.minDensity}set minDensity(t){t!==this._heatmapParameters.minDensity&&(this._heatmapParameters.minDensity=t,this.notifyChange("minDensity"))}get maxDensity(){return this._heatmapParameters.maxDensity}set maxDensity(t){t!==this._heatmapParameters.maxDensity&&(this._heatmapParameters.maxDensity=t,this.notifyChange("maxDensity"))}get fieldTotal(){return this._heatmapParameters.fieldTotal}set fieldTotal(t){this._heatmapParameters.fieldTotal=t,this.notifyChange("fieldTotal")}get colorRampData(){return this._colorRampData}set colorRampData(t){const{colorRamp:e}=this._heatmapParameters;if(null!=e&&t!==this._colorRampData){const r=e.descriptor.width,a=t.length/4;a!==r&&e.resize(a,1),e.setData(t)}this._colorRampData=t}get _colorRamp(){return this._heatmapParameters.colorRamp}set _colorRamp(t){this._heatmapParameters.colorRamp=t}get hasHighlights(){return!1}get hasWater(){return!1}get rendersOccluded(){return!1}render(t){const e=this._sortedMaterialRenderers;if(0===e.length)return;const r=this.rctx.getBoundFramebufferObject(),a=this.rctx.getViewport(),{pixelRatio:i}=this,s=Math.ceil(a.width*i),o=Math.ceil(a.height*i);this._densityMap.resize(s,o),this.rctx.bindFramebuffer(this._densityMap),this.rctx.setViewport(0,0,s,o),this.rctx.clear(u.COLOR_BUFFER_BIT);let n=!1;e.forAll((e=>{const r=e.prepareTechnique(t);null!=r&&(e.renderNode(t,r),n=!0)})),this.rctx.bindFramebuffer(r),this.rctx.setViewport(a.x,a.y,a.width,a.height),n&&(this.rctx.bindVAO(this._quad),this.rctx.bindTechnique(this._technique,this._heatmapParameters,t.bindParameters),this.rctx.drawArrays(this._technique.primitiveType,0,g(this._quad,"geometry")))}};t([i()],x.prototype,"searchRadius",null),t([i()],x.prototype,"minDensity",null),t([i()],x.prototype,"maxDensity",null),t([i()],x.prototype,"fieldTotal",null),t([i()],x.prototype,"pixelRatio",void 0),t([i()],x.prototype,"colorRampData",null),t([i({constructOnly:!0})],x.prototype,"dataType",void 0),t([i({constructOnly:!0})],x.prototype,"samplingMode",void 0),t([i({constructOnly:!0})],x.prototype,"pixelFormat",void 0),t([i({constructOnly:!0})],x.prototype,"internalFormat",void 0),t([i()],x.prototype,"_colorRampData",void 0),x=t([s("esri.views.3d.webgl-engine.lib.DrapedHeatmapRenderer")],x);export{x as DrapedHeatmapRenderer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{I as t,b as i}from"../../../../chunks/mat4f64.js";import{e}from"../../../../chunks/vec3.js";import{compactIndices as s,getContinuousIndexArray as n}from"../../../../geometry/support/Indices.js";import{cloneAttributeData as r}from"./AttributeArray.js";import{Object3DState as o}from"./basicInterfaces.js";import{BoundingInfo as h}from"./BoundingInfo.js";import{ContentObject as a}from"./ContentObject.js";import{ContentObjectType as u}from"./ContentObjectType.js";import{computeAttachmentOriginTriangles as g,computeAttachmentOriginLines as c,computeAttachmentOriginPoints as l}from"./geometryDataUtils.js";import{Object3DStateID as m}from"./Object3DStateID.js";import{assert as d}from"./Util.js";import{VertexAttribute as f}from"./VertexAttribute.js";import{addObject3DStateID as I,removeObject3DStateID as b}from"../materials/renderers/utils.js";class _ extends a{constructor(t,i,e=null,r=u.Mesh,o=null,h=-1){super(),this.material=t,this.mapPositions=e,this.type=r,this.objectAndLayerIdColor=o,this.edgeIndicesLength=h,this.visible=!0,this._attributes=new Map,this._indices=new Map,this._boundingInfo=null;for(const[a,u,g]of i){if(this._attributes.set(a,{...u}),g&&g.length>0)this._indices.set(a,s(g));else{const t=p(this._attributes),i=n(t);this._indices.set(a,i)}a===f.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._indices.get(a).length:this.edgeIndicesLength)}}instantiate(t={}){const i=new _(t.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._attributes.forEach(((t,e)=>{t.exclusive=!1,i._attributes.set(e,t)})),this._indices.forEach(((t,e)=>i._indices.set(e,t))),i._boundingInfo=this._boundingInfo,i.transformation=t.transformation||this.transformation,i}get vertexAttributes(){return this._attributes}getMutableAttribute(t){let i=this._attributes.get(t);return i&&!i.exclusive&&(i={...i,exclusive:!0,data:r(i.data)},this._attributes.set(t,i)),i}setAttributeData(t,i){const e=this._attributes.get(t);e&&this._attributes.set(t,{...e,exclusive:!0,data:i})}get indices(){return this._indices}get indexCount(){const t=this._indices.values().next().value;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(t){return!!(this.type===u.Mesh?this._computeAttachmentOriginTriangles(t):this.type===u.Line?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t))&&(null!=this._transformation&&e(t,t,this._transformation),!0)}_computeAttachmentOriginTriangles(t){const i=this.indices.get(f.POSITION),e=this.vertexAttributes.get(f.POSITION);return g(e,i,t)}_computeAttachmentOriginLines(t){const i=this.vertexAttributes.get(f.POSITION),e=this.indices.get(f.POSITION);return c(i,e,e&&O(this.material.parameters,i,e),t)}_computeAttachmentOriginPoints(t){const i=this.indices.get(f.POSITION),e=this.vertexAttributes.get(f.POSITION);return l(e,i,t)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const t=this.indices.get(f.POSITION),i=this.vertexAttributes.get(f.POSITION);if(!t||0===t.length||!i)return null;const e=this.type===u.Mesh?3:1;d(t.length%e==0,"Indexing error: "+t.length+" not divisible by "+e);const s=n(t.length/e);return new h(s,e,t,i)}get transformation(){return this._transformation??t}set transformation(e){this._transformation=e&&e!==t?i(e):null}addHighlight(){const t=new m(o.Highlight);return this.highlights=I(this.highlights,t),t}removeHighlight(t){this.highlights=b(this.highlights,t)}}function p(t){const i=t.values().next().value;return null==i?0:i.data.length/i.size}function O(t,i,e){return!(!("isClosed"in t)||!t.isClosed)&&(e?e.length>2:i.data.length>6)}export{_ as Geometry};
5
+ import{I as t,b as i}from"../../../../chunks/mat4f64.js";import{e}from"../../../../chunks/vec3.js";import{getContinuousIndexArray as n,compactIndices as s}from"../../../../geometry/support/Indices.js";import{cloneAttributeData as r}from"./AttributeArray.js";import{Object3DState as o}from"./basicInterfaces.js";import{BoundingInfo as h}from"./BoundingInfo.js";import{ContentObject as a}from"./ContentObject.js";import{ContentObjectType as u}from"./ContentObjectType.js";import{computeAttachmentOriginTriangles as g,computeAttachmentOriginLines as c,computeAttachmentOriginPoints as l}from"./geometryDataUtils.js";import{Object3DStateID as m}from"./Object3DStateID.js";import{assert as d}from"./Util.js";import{VertexAttribute as f}from"./VertexAttribute.js";import{addObject3DStateID as b,removeObject3DStateID as p}from"../materials/renderers/utils.js";class I extends a{constructor(t,i,e=null,r=u.Mesh,o=null,h=-1){super(),this.material=t,this.mapPositions=e,this.type=r,this.objectAndLayerIdColor=o,this.edgeIndicesLength=h,this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[a,u]of i)0===u.indices.length&&(u.indices=n(i[0][1].data.length/3)),this._attributes.set(a,{...u,indices:s(u.indices)}),a===f.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(a).indices.length:this.edgeIndicesLength)}instantiate(t={}){const i=new I(t.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);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}get attributes(){return this._attributes}getMutableAttribute(t){let i=this._attributes.get(t);return i&&!i.exclusive&&(i={...i,exclusive:!0,data:r(i.data)},this._attributes.set(t,i)),i}setAttributeData(t,i){const e=this._attributes.get(t);e&&this._attributes.set(t,{...e,exclusive:!0,data:i})}get indexCount(){const t=this._attributes.values().next().value.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(t){return!!(this.type===u.Mesh?this._computeAttachmentOriginTriangles(t):this.type===u.Line?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t))&&(null!=this._transformation&&e(t,t,this._transformation),!0)}_computeAttachmentOriginTriangles(t){const i=this.attributes.get(f.POSITION);return g(i,t)}_computeAttachmentOriginLines(t){const i=this.attributes.get(f.POSITION);return c(i,_(this.material.parameters,i),t)}_computeAttachmentOriginPoints(t){const i=this.attributes.get(f.POSITION);return l(i,t)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const t=this.attributes.get(f.POSITION);if(!t)return null;const i=this.type===u.Mesh?3:1;d(t.indices.length%i==0,"Indexing error: "+t.indices.length+" not divisible by "+i);const e=n(t.indices.length/i);return new h(e,i,t)}get transformation(){return this._transformation??t}set transformation(e){this._transformation=e&&e!==t?i(e):null}addHighlight(){const t=new m(o.Highlight);return this.highlights=b(this.highlights,t),t}removeHighlight(t){this.highlights=p(this.highlights,t)}}function _(t,i){return!(!("isClosed"in t)||!t.isClosed)&&i.indices.length>2}export{I as Geometry};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{f as t,b as n,n as e,i as s,g as o,j as r,s as l,c as h,e as u}from"../../../../chunks/vec3.js";import{f as c,c as a,a as f}from"../../../../chunks/vec3f32.js";import{c as p}from"../../../../chunks/vec3f64.js";import{newDoubleArray as i}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as w,floatArrayFrom as g}from"../../../../geometry/support/FloatArray.js";import{getZeroIndexArray as O,getContinuousIndexArray as m}from"../../../../geometry/support/Indices.js";import{create as M,fromPositionAndNormal as A,intersectRay as I}from"../../../../geometry/support/plane.js";import{wrap as y}from"../../../../geometry/support/ray.js";import{Attribute as P}from"./Attribute.js";import{Vec3Compact as N}from"./BufferVectorMath.js";import{ContentObjectType as T}from"./ContentObjectType.js";import{Geometry as S}from"./Geometry.js";import{assert as R}from"./Util.js";import{VertexAttribute as L}from"./VertexAttribute.js";const b=N,j=[[-.5,-.5,.5],[.5,-.5,.5],[.5,.5,.5],[-.5,.5,.5],[-.5,-.5,-.5],[.5,-.5,-.5],[.5,.5,-.5],[-.5,.5,-.5]],d=[0,0,1,-1,0,0,1,0,0,0,-1,0,0,1,0,0,0,-1],U=[0,0,1,0,1,1,0,1],v=[0,1,2,2,3,0,4,0,3,3,7,4,1,5,6,6,2,1,1,0,4,4,5,1,3,2,6,6,7,3,5,4,7,7,6,5],V=new Array(36);for(let At=0;At<6;At++)for(let t=0;t<6;t++)V[6*At+t]=At;const x=new Array(36);for(let At=0;At<6;At++)x[6*At]=0,x[6*At+1]=1,x[6*At+2]=2,x[6*At+3]=2,x[6*At+4]=3,x[6*At+5]=0;function E(t,n){Array.isArray(n)||(n=[n,n,n]);const e=new Array(24);for(let s=0;s<8;s++)e[3*s]=j[s][0]*n[0],e[3*s+1]=j[s][1]*n[1],e[3*s+2]=j[s][2]*n[2];return new S(t,[[L.POSITION,new P(e,3,!0),v],[L.NORMAL,new P(d,3),V],[L.UV0,new P(U,2),x]])}const F=[[-.5,0,-.5],[.5,0,-.5],[.5,0,.5],[-.5,0,.5],[0,-.5,0],[0,.5,0]],G=[0,1,-1,1,1,0,0,1,1,-1,1,0,0,-1,-1,1,-1,0,0,-1,1,-1,-1,0],C=[5,1,0,5,2,1,5,3,2,5,0,3,4,0,1,4,1,2,4,2,3,4,3,0],k=[0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7];function q(t,n){Array.isArray(n)||(n=[n,n,n]);const e=new Array(18);for(let s=0;s<6;s++)e[3*s]=F[s][0]*n[0],e[3*s+1]=F[s][1]*n[1],e[3*s+2]=F[s][2]*n[2];return new S(t,[[L.POSITION,new P(e,3,!0),C],[L.NORMAL,new P(G,3),k]])}const B=c(-.5,0,-.5),z=c(.5,0,-.5),D=c(0,0,.5),X=c(0,.5,0),Z=a(),H=a(),J=a(),K=a(),Q=a();t(Z,B,X),t(H,B,z),n(J,Z,H),e(J,J),t(Z,z,X),t(H,z,D),n(K,Z,H),e(K,K),t(Z,D,X),t(H,D,B),n(Q,Z,H),e(Q,Q);const W=[B,z,D,X],Y=[0,-1,0,J[0],J[1],J[2],K[0],K[1],K[2],Q[0],Q[1],Q[2]],$=[0,1,2,3,1,0,3,2,1,3,0,2],_=[0,0,0,1,1,1,2,2,2,3,3,3];function tt(t,n){Array.isArray(n)||(n=[n,n,n]);const e=new Array(12);for(let s=0;s<4;s++)e[3*s]=W[s][0]*n[0],e[3*s+1]=W[s][1]*n[1],e[3*s+2]=W[s][2]*n[2];return new S(t,[[L.POSITION,new P(e,3,!0),$],[L.NORMAL,new P(Y,3),_]])}function nt(t,n,e,s,o={uv:!0}){const r=-Math.PI,l=2*Math.PI,h=-Math.PI/2,u=Math.PI,c=Math.max(3,Math.floor(e)),a=Math.max(2,Math.floor(s)),f=(c+1)*(a+1),p=w(3*f),i=w(3*f),g=w(2*f),m=[];let M=0;for(let w=0;w<=a;w++){const t=[],e=w/a,s=h+e*u,o=Math.cos(s);for(let h=0;h<=c;h++){const u=h/c,a=r+u*l,f=Math.cos(a)*o,w=Math.sin(s),O=-Math.sin(a)*o;p[3*M]=f*n,p[3*M+1]=w*n,p[3*M+2]=O*n,i[3*M]=f,i[3*M+1]=w,i[3*M+2]=O,g[2*M]=u,g[2*M+1]=e,t.push(M),++M}m.push(t)}const A=new Array;for(let w=0;w<a;w++)for(let t=0;t<c;t++){const n=m[w][t],e=m[w][t+1],s=m[w+1][t+1],o=m[w+1][t];0===w?(A.push(n),A.push(s),A.push(o)):w===a-1?(A.push(n),A.push(e),A.push(s)):(A.push(n),A.push(e),A.push(s),A.push(s),A.push(o),A.push(n))}const I=[[L.POSITION,new P(p,3,!0),A],[L.NORMAL,new P(i,3,!0),A]];return o.uv&&I.push([L.UV0,new P(g,2,!0),A]),o.offset&&(I[0][0]=L.OFFSET,I.push([L.POSITION,new P(Float64Array.from(o.offset),3,!0),O(A.length)])),new S(t,I)}function et(t,n,e,s){const o=st(n,e,s);return new S(t,o)}function st(t,n,e){const s=t;let o,r;if(e)o=[0,-1,0,1,0,0,0,0,1,-1,0,0,0,0,-1,0,1,0],r=[0,1,2,0,2,3,0,3,4,0,4,1,1,5,2,2,5,3,3,5,4,4,5,1];else{const t=s*(1+Math.sqrt(5))/2;o=[-s,t,0,s,t,0,-s,-t,0,s,-t,0,0,-s,t,0,s,t,0,-s,-t,0,s,-t,t,0,-s,t,0,s,-t,0,-s,-t,0,s],r=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1]}for(let c=0;c<o.length;c+=3)b.scale(o,c,t/b.length(o,c));let l={};function h(n,e){n>e&&([n,e]=[e,n]);const s=n.toString()+"."+e.toString();if(l[s])return l[s];let r=o.length;return o.length+=3,b.add(o,3*n,o,3*e,o,r),b.scale(o,r,t/b.length(o,r)),r/=3,l[s]=r,r}for(let c=0;c<n;c++){const t=r.length,n=new Array(4*t);for(let e=0;e<t;e+=3){const t=r[e],s=r[e+1],o=r[e+2],l=h(t,s),u=h(s,o),c=h(o,t),a=4*e;n[a]=t,n[a+1]=l,n[a+2]=c,n[a+3]=s,n[a+4]=u,n[a+5]=l,n[a+6]=o,n[a+7]=c,n[a+8]=u,n[a+9]=l,n[a+10]=u,n[a+11]=c}r=n,l={}}const u=g(o);for(let c=0;c<u.length;c+=3)b.normalize(u,c);return[[L.POSITION,new P(g(o),3,!0),r],[L.NORMAL,new P(u,3,!0),r]]}function ot(t,n,e,s,o,r,l,h,u=null){const c=e?[e[0],e[1],e[2]]:[0,0,0],a=n?[n[0],n[1],n[2]]:[0,0,1];l=l||[0,0];const f=s?[255*s[0],255*s[1],255*s[2],s.length>3?255*s[3]:255]:[255,255,255,255],p=null!=o&&2===o.length?o:[1,1],i=[[L.POSITION,new P(c,3,!0),null],[L.NORMAL,new P(a,3,!0),null],[L.UV0,new P(l,l.length),null],[L.COLOR,new P(f,4,!0),null],[L.SIZE,new P(p,2),null]];if(null!=r){const t=[r[0],r[1],r[2],r[3]];i.push([L.AUXPOS1,new P(t,4),null])}if(null!=h){const t=[h[0],h[1],h[2],h[3]];i.push([L.FEATUREATTRIBUTE,new P(t,4),null])}return new S(t,i,null,T.Point,u)}const rt=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0]];function lt(t,n=rt){const e=new Array(12);for(let c=0;c<4;c++)for(let t=0;t<3;t++)e[3*c+t]=n[c][t];const s=[0,1,2,2,3,0],o=[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=[[L.POSITION,new P(e,3,!0),s],[L.NORMAL,new P(o,3,!0),r],[L.UV0,new P(l,2,!0),s],[L.COLOR,new P(h,4,!0),r]];return new S(t,u)}function ht(t,n,e,s,o,r=!0,l=!0){let h=0;const u=e,a=n;let f=c(0,h,0),p=c(0,h+a,0),i=c(0,-1,0),g=c(0,1,0);o&&(h=a,p=c(0,0,0),f=c(0,h,0),i=c(0,1,0),g=c(0,-1,0));const O=[p,f],m=[i,g],M=s+2,A=Math.sqrt(a*a+u*u);if(o)for(let w=s-1;w>=0;w--){const t=w*(2*Math.PI/s),n=c(Math.cos(t)*u,h,Math.sin(t)*u);O.push(n);const e=c(a*Math.cos(t)/A,-u/A,a*Math.sin(t)/A);m.push(e)}else for(let w=0;w<s;w++){const t=w*(2*Math.PI/s),n=c(Math.cos(t)*u,h,Math.sin(t)*u);O.push(n);const e=c(a*Math.cos(t)/A,u/A,a*Math.sin(t)/A);m.push(e)}const I=new Array,y=new Array;if(r){for(let t=3;t<O.length;t++)I.push(1),I.push(t-1),I.push(t),y.push(0),y.push(0),y.push(0);I.push(O.length-1),I.push(2),I.push(1),y.push(0),y.push(0),y.push(0)}if(l){for(let t=3;t<O.length;t++)I.push(t),I.push(t-1),I.push(0),y.push(t),y.push(t-1),y.push(1);I.push(0),I.push(2),I.push(O.length-1),y.push(1),y.push(2),y.push(m.length-1)}const N=w(3*M);for(let c=0;c<M;c++)N[3*c]=O[c][0],N[3*c+1]=O[c][1],N[3*c+2]=O[c][2];const T=w(3*M);for(let c=0;c<M;c++)T[3*c]=m[c][0],T[3*c+1]=m[c][1],T[3*c+2]=m[c][2];const R=[[L.POSITION,new P(N,3,!0),I],[L.NORMAL,new P(T,3,!0),y]];return new S(t,R)}function ut(t,h,u,p,i,g,O){const m=i?f(i):c(1,0,0),M=g?f(g):c(0,0,0);O??=!0;const A=a();e(A,m);const I=a();s(I,A,Math.abs(h));const y=a();s(y,I,-.5),o(y,y,M);const N=c(0,1,0);Math.abs(1-r(A,N))<.2&&l(N,0,0,1);const T=a();n(T,A,N),e(T,T),n(N,T,A);const R=2*p+(O?2:0),b=p+(O?2:0),j=w(3*R),d=w(3*b),U=w(2*R),v=new Array(3*p*(O?4:2)),V=new Array(3*p*(O?4:2));O&&(j[3*(R-2)]=y[0],j[3*(R-2)+1]=y[1],j[3*(R-2)+2]=y[2],U[2*(R-2)]=0,U[2*(R-2)+1]=0,j[3*(R-1)]=j[3*(R-2)]+I[0],j[3*(R-1)+1]=j[3*(R-2)+1]+I[1],j[3*(R-1)+2]=j[3*(R-2)+2]+I[2],U[2*(R-1)]=1,U[2*(R-1)+1]=1,d[3*(b-2)]=-A[0],d[3*(b-2)+1]=-A[1],d[3*(b-2)+2]=-A[2],d[3*(b-1)]=A[0],d[3*(b-1)+1]=A[1],d[3*(b-1)+2]=A[2]);const x=(t,n,e)=>{v[t]=n,V[t]=e};let E=0;const F=a(),G=a();for(let n=0;n<p;n++){const t=n*(2*Math.PI/p);s(F,N,Math.sin(t)),s(G,T,Math.cos(t)),o(F,F,G),d[3*n]=F[0],d[3*n+1]=F[1],d[3*n+2]=F[2],s(F,F,u),o(F,F,y),j[3*n]=F[0],j[3*n+1]=F[1],j[3*n+2]=F[2],U[2*n]=n/p,U[2*n+1]=0,j[3*(n+p)]=j[3*n]+I[0],j[3*(n+p)+1]=j[3*n+1]+I[1],j[3*(n+p)+2]=j[3*n+2]+I[2],U[2*(n+p)]=n/p,U[2*n+1]=1;const e=(n+1)%p;x(E++,n,n),x(E++,n+p,n),x(E++,e,e),x(E++,e,e),x(E++,n+p,n),x(E++,e+p,e)}if(O){for(let t=0;t<p;t++){const n=(t+1)%p;x(E++,R-2,b-2),x(E++,t,b-2),x(E++,n,b-2)}for(let t=0;t<p;t++){const n=(t+1)%p;x(E++,t+p,b-1),x(E++,R-1,b-1),x(E++,n+p,b-1)}}const C=[[L.POSITION,new P(j,3,!0),v],[L.NORMAL,new P(d,3,!0),V],[L.UV0,new P(U,2,!0),v]];return new S(t,C)}function ct(t,n,e,s,o,r){s=s||10,o=null==o||o,R(n.length>1);const l=[[0,0,0]],h=[],u=[];for(let c=0;c<s;c++){h.push([0,-c-1,-(c+1)%s-1]);const t=c/s*2*Math.PI;u.push([Math.cos(t)*e,Math.sin(t)*e])}return at(t,u,n,l,h,o,r)}function at(r,u,f,i,g,O,m=c(0,0,0)){const N=u.length,T=w(f.length*N*3+(6*i.length||0)),R=w(f.length*N*3+(i?6:0)),b=new Array,j=new Array;let d=0,U=0;const v=a(),V=a(),x=a(),E=a(),F=a(),G=a(),C=a(),k=p(),q=a(),B=a(),z=a(),D=a(),X=a(),Z=M();l(q,0,1,0),t(V,f[1],f[0]),e(V,V),O?(o(k,f[0],m),e(x,k)):l(x,0,0,1),Ot(V,x,q,q,F,x,mt),h(E,x),h(D,F);for(let t=0;t<i.length;t++)s(G,F,i[t][0]),s(k,x,i[t][2]),o(G,G,k),o(G,G,f[0]),T[d++]=G[0],T[d++]=G[1],T[d++]=G[2];R[U++]=-V[0],R[U++]=-V[1],R[U++]=-V[2];for(let t=0;t<g.length;t++)b.push(g[t][0]>0?g[t][0]:-g[t][0]-1+i.length),b.push(g[t][1]>0?g[t][1]:-g[t][1]-1+i.length),b.push(g[t][2]>0?g[t][2]:-g[t][2]-1+i.length),j.push(0),j.push(0),j.push(0);let H=i.length;const J=i.length-1;for(let l=0;l<f.length;l++){let r=!1;if(l>0){h(v,V),l<f.length-1?(t(V,f[l+1],f[l]),e(V,V)):r=!0,o(B,v,V),e(B,B),o(z,f[l-1],E),A(f[l],B,Z);I(Z,y(z,v),k)?(t(k,k,f[l]),e(x,k),n(F,B,x),e(F,F)):Ot(B,E,D,q,F,x,mt),h(E,x),h(D,F)}O&&(o(k,f[l],m),e(X,k));for(let t=0;t<N;t++)if(s(G,F,u[t][0]),s(k,x,u[t][1]),o(G,G,k),e(C,G),R[U++]=C[0],R[U++]=C[1],R[U++]=C[2],o(G,G,f[l]),T[d++]=G[0],T[d++]=G[1],T[d++]=G[2],!r){const n=(t+1)%N;b.push(H+t),b.push(H+N+t),b.push(H+n),b.push(H+n),b.push(H+N+t),b.push(H+N+n);for(let t=0;t<6;t++){const n=b.length-6;j.push(b[n+t]-J)}}H+=N}const K=f[f.length-1];for(let t=0;t<i.length;t++)s(G,F,i[t][0]),s(k,x,i[t][1]),o(G,G,k),o(G,G,K),T[d++]=G[0],T[d++]=G[1],T[d++]=G[2];const Q=U/3;R[U++]=V[0],R[U++]=V[1],R[U++]=V[2];const W=H-N;for(let t=0;t<g.length;t++)b.push(g[t][0]>=0?H+g[t][0]:-g[t][0]-1+W),b.push(g[t][2]>=0?H+g[t][2]:-g[t][2]-1+W),b.push(g[t][1]>=0?H+g[t][1]:-g[t][1]-1+W),j.push(Q),j.push(Q),j.push(Q);const Y=[[L.POSITION,new P(T,3,!0),b],[L.NORMAL,new P(R,3,!0),j]];return new S(r,Y)}function ft(t,n,e,s){R(n.length>1,"createPolylineGeometry(): polyline needs at least 2 points"),R(3===n[0].length,"createPolylineGeometry(): malformed vertex"),R(null==e||e.length===n.length,"createPolylineGeometry: need same number of points and normals"),R(null==e||3===e[0].length,"createPolylineGeometry(): malformed normal");const o=i(3*n.length),r=new Array(2*(n.length-1));let l=0,h=0;for(let c=0;c<n.length;c++){for(let t=0;t<3;t++)o[l++]=n[c][t];c>0&&(r[h++]=c-1,r[h++]=c)}const u=[[L.POSITION,new P(o,3,!0),r]];if(e){const t=w(3*e.length);let s=0;for(let o=0;o<n.length;o++)for(let n=0;n<3;n++)t[s++]=e[o][n];u.push([L.NORMAL,new P(t,3,!0),r])}return s&&u.push([L.COLOR,new P(s,4),m(s.length/4)]),new S(t,u,null,T.Line)}function pt(t,n,e,s,o,r=0){const l=new Array(18),h=[[-e,r,o/2],[s,r,o/2],[0,n+r,o/2],[-e,r,-o/2],[s,r,-o/2],[0,n+r,-o/2]],u=[0,1,2,3,0,2,2,5,3,1,4,5,5,2,1,1,0,3,3,4,1,4,3,5];for(let c=0;c<6;c++)l[3*c]=h[c][0],l[3*c+1]=h[c][1],l[3*c+2]=h[c][2];return new S(t,[[L.POSITION,new P(l,3,!0),u]])}function it(t,n){const e=t.getMutableAttribute(L.POSITION).data;for(let s=0;s<e.length;s+=3){const t=e[s],o=e[s+1],r=e[s+2];l(Mt,t,o,r),u(Mt,Mt,n),e[s]=Mt[0],e[s+1]=Mt[1],e[s+2]=Mt[2]}}function wt(t,n=t){const e=t.vertexAttributes,s=e.get(L.POSITION).data,o=e.get(L.NORMAL).data;if(o){const t=n.getMutableAttribute(L.NORMAL).data;for(let n=0;n<o.length;n+=3){const e=o[n+1];t[n+1]=-o[n+2],t[n+2]=e}}if(s){const t=n.getMutableAttribute(L.POSITION).data;for(let n=0;n<s.length;n+=3){const e=s[n+1];t[n+1]=-s[n+2],t[n+2]=e}}}function gt(t,s,o,l,h){return!(Math.abs(r(s,t))>h)&&(n(o,t,s),e(o,o),n(l,o,t),e(l,l),!0)}function Ot(t,n,e,s,o,r,l){return gt(t,n,o,r,l)||gt(t,e,o,r,l)||gt(t,s,o,r,l)}const mt=.99619469809,Mt=a();export{wt as cgToGIS,E as createBoxGeometry,ht as createConeGeometry,ut as createCylinderGeometry,q as createDiamondGeometry,pt as createExtrudedTriangle,at as createPathExtrusionGeometry,ot as createPointGeometry,st as createPolySphereData,et as createPolySphereGeometry,ft as createPolylineGeometry,nt as createSphereGeometry,lt as createSquareGeometry,tt as createTetrahedronGeometry,ct as createTubeGeometry,Ot as makeOrthoBasisDirUpFallback,it as transformInPlace};
5
+ import{f as t,b as n,n as e,i as s,g as o,j as r,s as h,c as l,e as u}from"../../../../chunks/vec3.js";import{f as c,c as a,a as f}from"../../../../chunks/vec3f32.js";import{c as p}from"../../../../chunks/vec3f64.js";import{newDoubleArray as i}from"../../../../geometry/support/DoubleArray.js";import{newFloatArray as w,floatArrayFrom as g}from"../../../../geometry/support/FloatArray.js";import{getZeroIndexArray as O,getContinuousIndexArray as m}from"../../../../geometry/support/Indices.js";import{create as M,fromPositionAndNormal as A,intersectRay as I}from"../../../../geometry/support/plane.js";import{wrap as y}from"../../../../geometry/support/ray.js";import{Attribute as P}from"./Attribute.js";import{Vec3Compact as N}from"./BufferVectorMath.js";import{ContentObjectType as T}from"./ContentObjectType.js";import{Geometry as S}from"./Geometry.js";import{assert as R}from"./Util.js";import{VertexAttribute as L}from"./VertexAttribute.js";const b=N,j=[[-.5,-.5,.5],[.5,-.5,.5],[.5,.5,.5],[-.5,.5,.5],[-.5,-.5,-.5],[.5,-.5,-.5],[.5,.5,-.5],[-.5,.5,-.5]],d=[0,0,1,-1,0,0,1,0,0,0,-1,0,0,1,0,0,0,-1],U=[0,0,1,0,1,1,0,1],V=[0,1,2,2,3,0,4,0,3,3,7,4,1,5,6,6,2,1,1,0,4,4,5,1,3,2,6,6,7,3,5,4,7,7,6,5],v=new Array(36);for(let At=0;At<6;At++)for(let t=0;t<6;t++)v[6*At+t]=At;const x=new Array(36);for(let At=0;At<6;At++)x[6*At]=0,x[6*At+1]=1,x[6*At+2]=2,x[6*At+3]=2,x[6*At+4]=3,x[6*At+5]=0;function E(t,n){Array.isArray(n)||(n=[n,n,n]);const e=new Array(24);for(let s=0;s<8;s++)e[3*s]=j[s][0]*n[0],e[3*s+1]=j[s][1]*n[1],e[3*s+2]=j[s][2]*n[2];return new S(t,[[L.POSITION,new P(e,V,3,!0)],[L.NORMAL,new P(d,v,3)],[L.UV0,new P(U,x,2)]])}const F=[[-.5,0,-.5],[.5,0,-.5],[.5,0,.5],[-.5,0,.5],[0,-.5,0],[0,.5,0]],G=[0,1,-1,1,1,0,0,1,1,-1,1,0,0,-1,-1,1,-1,0,0,-1,1,-1,-1,0],C=[5,1,0,5,2,1,5,3,2,5,0,3,4,0,1,4,1,2,4,2,3,4,3,0],k=[0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7];function q(t,n){Array.isArray(n)||(n=[n,n,n]);const e=new Array(18);for(let s=0;s<6;s++)e[3*s]=F[s][0]*n[0],e[3*s+1]=F[s][1]*n[1],e[3*s+2]=F[s][2]*n[2];return new S(t,[[L.POSITION,new P(e,C,3,!0)],[L.NORMAL,new P(G,k,3)]])}const B=c(-.5,0,-.5),z=c(.5,0,-.5),D=c(0,0,.5),X=c(0,.5,0),Z=a(),H=a(),J=a(),K=a(),Q=a();t(Z,B,X),t(H,B,z),n(J,Z,H),e(J,J),t(Z,z,X),t(H,z,D),n(K,Z,H),e(K,K),t(Z,D,X),t(H,D,B),n(Q,Z,H),e(Q,Q);const W=[B,z,D,X],Y=[0,-1,0,J[0],J[1],J[2],K[0],K[1],K[2],Q[0],Q[1],Q[2]],$=[0,1,2,3,1,0,3,2,1,3,0,2],_=[0,0,0,1,1,1,2,2,2,3,3,3];function tt(t,n){Array.isArray(n)||(n=[n,n,n]);const e=new Array(12);for(let s=0;s<4;s++)e[3*s]=W[s][0]*n[0],e[3*s+1]=W[s][1]*n[1],e[3*s+2]=W[s][2]*n[2];return new S(t,[[L.POSITION,new P(e,$,3,!0)],[L.NORMAL,new P(Y,_,3)]])}function nt(t,n,e,s,o={uv:!0}){const r=-Math.PI,h=2*Math.PI,l=-Math.PI/2,u=Math.PI,c=Math.max(3,Math.floor(e)),a=Math.max(2,Math.floor(s)),f=(c+1)*(a+1),p=w(3*f),i=w(3*f),g=w(2*f),m=[];let M=0;for(let w=0;w<=a;w++){const t=[],e=w/a,s=l+e*u,o=Math.cos(s);for(let l=0;l<=c;l++){const u=l/c,a=r+u*h,f=Math.cos(a)*o,w=Math.sin(s),O=-Math.sin(a)*o;p[3*M]=f*n,p[3*M+1]=w*n,p[3*M+2]=O*n,i[3*M]=f,i[3*M+1]=w,i[3*M+2]=O,g[2*M]=u,g[2*M+1]=e,t.push(M),++M}m.push(t)}const A=new Array;for(let w=0;w<a;w++)for(let t=0;t<c;t++){const n=m[w][t],e=m[w][t+1],s=m[w+1][t+1],o=m[w+1][t];0===w?(A.push(n),A.push(s),A.push(o)):w===a-1?(A.push(n),A.push(e),A.push(s)):(A.push(n),A.push(e),A.push(s),A.push(s),A.push(o),A.push(n))}const I=[[L.POSITION,new P(p,A,3,!0)],[L.NORMAL,new P(i,A,3,!0)]];return o.uv&&I.push([L.UV0,new P(g,A,2,!0)]),o.offset&&(I[0][0]=L.OFFSET,I.push([L.POSITION,new P(Float64Array.from(o.offset),O(A.length),3,!0)])),new S(t,I)}function et(t,n,e,s){const o=st(n,e,s);return new S(t,o)}function st(t,n,e){const s=t;let o,r;if(e)o=[0,-1,0,1,0,0,0,0,1,-1,0,0,0,0,-1,0,1,0],r=[0,1,2,0,2,3,0,3,4,0,4,1,1,5,2,2,5,3,3,5,4,4,5,1];else{const t=s*(1+Math.sqrt(5))/2;o=[-s,t,0,s,t,0,-s,-t,0,s,-t,0,0,-s,t,0,s,t,0,-s,-t,0,s,-t,t,0,-s,t,0,s,-t,0,-s,-t,0,s],r=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1]}for(let c=0;c<o.length;c+=3)b.scale(o,c,t/b.length(o,c));let h={};function l(n,e){n>e&&([n,e]=[e,n]);const s=n.toString()+"."+e.toString();if(h[s])return h[s];let r=o.length;return o.length+=3,b.add(o,3*n,o,3*e,o,r),b.scale(o,r,t/b.length(o,r)),r/=3,h[s]=r,r}for(let c=0;c<n;c++){const t=r.length,n=new Array(4*t);for(let e=0;e<t;e+=3){const t=r[e],s=r[e+1],o=r[e+2],h=l(t,s),u=l(s,o),c=l(o,t),a=4*e;n[a]=t,n[a+1]=h,n[a+2]=c,n[a+3]=s,n[a+4]=u,n[a+5]=h,n[a+6]=o,n[a+7]=c,n[a+8]=u,n[a+9]=h,n[a+10]=u,n[a+11]=c}r=n,h={}}const u=g(o);for(let c=0;c<u.length;c+=3)b.normalize(u,c);return[[L.POSITION,new P(g(o),r,3,!0)],[L.NORMAL,new P(u,r,3,!0)]]}function ot(t,n,e,s,o,r,h,l,u=null){const c=e?[e[0],e[1],e[2]]:[0,0,0],a=n?[n[0],n[1],n[2]]:[0,0,1];h=h||[0,0];const f=s?[255*s[0],255*s[1],255*s[2],s.length>3?255*s[3]:255]:[255,255,255,255],p=null!=o&&2===o.length?o:[1,1],i=O(1),w=[[L.POSITION,new P(c,i,3,!0)],[L.NORMAL,new P(a,i,3,!0)],[L.UV0,new P(h,i,h.length)],[L.COLOR,new P(f,i,4,!0)],[L.SIZE,new P(p,i,2)]];if(null!=r){const t=[r[0],r[1],r[2],r[3]];w.push([L.AUXPOS1,new P(t,i,4)])}if(null!=l){const t=[l[0],l[1],l[2],l[3]];w.push([L.FEATUREATTRIBUTE,new P(t,i,4)])}return new S(t,w,null,T.Point,u)}const rt=[[-1,-1,0],[1,-1,0],[1,1,0],[-1,1,0]];function ht(t,n=rt){const e=new Array(12);for(let c=0;c<4;c++)for(let t=0;t<3;t++)e[3*c+t]=n[c][t];const s=[0,1,2,2,3,0],o=[0,0,1],r=[0,0,0,0,0,0],h=[0,0,1,0,1,1,0,1],l=[255,255,255,255],u=[[L.POSITION,new P(e,s,3,!0)],[L.NORMAL,new P(o,r,3,!0)],[L.UV0,new P(h,s,2,!0)],[L.COLOR,new P(l,r,4,!0)]];return new S(t,u)}function lt(t,n,e,s,o,r=!0,h=!0){let l=0;const u=e,a=n;let f=c(0,l,0),p=c(0,l+a,0),i=c(0,-1,0),g=c(0,1,0);o&&(l=a,p=c(0,0,0),f=c(0,l,0),i=c(0,1,0),g=c(0,-1,0));const O=[p,f],m=[i,g],M=s+2,A=Math.sqrt(a*a+u*u);if(o)for(let w=s-1;w>=0;w--){const t=w*(2*Math.PI/s),n=c(Math.cos(t)*u,l,Math.sin(t)*u);O.push(n);const e=c(a*Math.cos(t)/A,-u/A,a*Math.sin(t)/A);m.push(e)}else for(let w=0;w<s;w++){const t=w*(2*Math.PI/s),n=c(Math.cos(t)*u,l,Math.sin(t)*u);O.push(n);const e=c(a*Math.cos(t)/A,u/A,a*Math.sin(t)/A);m.push(e)}const I=new Array,y=new Array;if(r){for(let t=3;t<O.length;t++)I.push(1),I.push(t-1),I.push(t),y.push(0),y.push(0),y.push(0);I.push(O.length-1),I.push(2),I.push(1),y.push(0),y.push(0),y.push(0)}if(h){for(let t=3;t<O.length;t++)I.push(t),I.push(t-1),I.push(0),y.push(t),y.push(t-1),y.push(1);I.push(0),I.push(2),I.push(O.length-1),y.push(1),y.push(2),y.push(m.length-1)}const N=w(3*M);for(let c=0;c<M;c++)N[3*c]=O[c][0],N[3*c+1]=O[c][1],N[3*c+2]=O[c][2];const T=w(3*M);for(let c=0;c<M;c++)T[3*c]=m[c][0],T[3*c+1]=m[c][1],T[3*c+2]=m[c][2];const R=[[L.POSITION,new P(N,I,3,!0)],[L.NORMAL,new P(T,y,3,!0)]];return new S(t,R)}function ut(t,l,u,p,i,g,O){const m=i?f(i):c(1,0,0),M=g?f(g):c(0,0,0);O??=!0;const A=a();e(A,m);const I=a();s(I,A,Math.abs(l));const y=a();s(y,I,-.5),o(y,y,M);const N=c(0,1,0);Math.abs(1-r(A,N))<.2&&h(N,0,0,1);const T=a();n(T,A,N),e(T,T),n(N,T,A);const R=2*p+(O?2:0),b=p+(O?2:0),j=w(3*R),d=w(3*b),U=w(2*R),V=new Array(3*p*(O?4:2)),v=new Array(3*p*(O?4:2));O&&(j[3*(R-2)]=y[0],j[3*(R-2)+1]=y[1],j[3*(R-2)+2]=y[2],U[2*(R-2)]=0,U[2*(R-2)+1]=0,j[3*(R-1)]=j[3*(R-2)]+I[0],j[3*(R-1)+1]=j[3*(R-2)+1]+I[1],j[3*(R-1)+2]=j[3*(R-2)+2]+I[2],U[2*(R-1)]=1,U[2*(R-1)+1]=1,d[3*(b-2)]=-A[0],d[3*(b-2)+1]=-A[1],d[3*(b-2)+2]=-A[2],d[3*(b-1)]=A[0],d[3*(b-1)+1]=A[1],d[3*(b-1)+2]=A[2]);const x=(t,n,e)=>{V[t]=n,v[t]=e};let E=0;const F=a(),G=a();for(let n=0;n<p;n++){const t=n*(2*Math.PI/p);s(F,N,Math.sin(t)),s(G,T,Math.cos(t)),o(F,F,G),d[3*n]=F[0],d[3*n+1]=F[1],d[3*n+2]=F[2],s(F,F,u),o(F,F,y),j[3*n]=F[0],j[3*n+1]=F[1],j[3*n+2]=F[2],U[2*n]=n/p,U[2*n+1]=0,j[3*(n+p)]=j[3*n]+I[0],j[3*(n+p)+1]=j[3*n+1]+I[1],j[3*(n+p)+2]=j[3*n+2]+I[2],U[2*(n+p)]=n/p,U[2*n+1]=1;const e=(n+1)%p;x(E++,n,n),x(E++,n+p,n),x(E++,e,e),x(E++,e,e),x(E++,n+p,n),x(E++,e+p,e)}if(O){for(let t=0;t<p;t++){const n=(t+1)%p;x(E++,R-2,b-2),x(E++,t,b-2),x(E++,n,b-2)}for(let t=0;t<p;t++){const n=(t+1)%p;x(E++,t+p,b-1),x(E++,R-1,b-1),x(E++,n+p,b-1)}}const C=[[L.POSITION,new P(j,V,3,!0)],[L.NORMAL,new P(d,v,3,!0)],[L.UV0,new P(U,V,2,!0)]];return new S(t,C)}function ct(t,n,e,s,o,r){s=s||10,o=null==o||o,R(n.length>1);const h=[[0,0,0]],l=[],u=[];for(let c=0;c<s;c++){l.push([0,-c-1,-(c+1)%s-1]);const t=c/s*2*Math.PI;u.push([Math.cos(t)*e,Math.sin(t)*e])}return at(t,u,n,h,l,o,r)}function at(r,u,f,i,g,O,m=c(0,0,0)){const N=u.length,T=w(f.length*N*3+(6*i.length||0)),R=w(f.length*N*3+(i?6:0)),b=new Array,j=new Array;let d=0,U=0;const V=a(),v=a(),x=a(),E=a(),F=a(),G=a(),C=a(),k=p(),q=a(),B=a(),z=a(),D=a(),X=a(),Z=M();h(q,0,1,0),t(v,f[1],f[0]),e(v,v),O?(o(k,f[0],m),e(x,k)):h(x,0,0,1),Ot(v,x,q,q,F,x,mt),l(E,x),l(D,F);for(let t=0;t<i.length;t++)s(G,F,i[t][0]),s(k,x,i[t][2]),o(G,G,k),o(G,G,f[0]),T[d++]=G[0],T[d++]=G[1],T[d++]=G[2];R[U++]=-v[0],R[U++]=-v[1],R[U++]=-v[2];for(let t=0;t<g.length;t++)b.push(g[t][0]>0?g[t][0]:-g[t][0]-1+i.length),b.push(g[t][1]>0?g[t][1]:-g[t][1]-1+i.length),b.push(g[t][2]>0?g[t][2]:-g[t][2]-1+i.length),j.push(0),j.push(0),j.push(0);let H=i.length;const J=i.length-1;for(let h=0;h<f.length;h++){let r=!1;if(h>0){l(V,v),h<f.length-1?(t(v,f[h+1],f[h]),e(v,v)):r=!0,o(B,V,v),e(B,B),o(z,f[h-1],E),A(f[h],B,Z);I(Z,y(z,V),k)?(t(k,k,f[h]),e(x,k),n(F,B,x),e(F,F)):Ot(B,E,D,q,F,x,mt),l(E,x),l(D,F)}O&&(o(k,f[h],m),e(X,k));for(let t=0;t<N;t++)if(s(G,F,u[t][0]),s(k,x,u[t][1]),o(G,G,k),e(C,G),R[U++]=C[0],R[U++]=C[1],R[U++]=C[2],o(G,G,f[h]),T[d++]=G[0],T[d++]=G[1],T[d++]=G[2],!r){const n=(t+1)%N;b.push(H+t),b.push(H+N+t),b.push(H+n),b.push(H+n),b.push(H+N+t),b.push(H+N+n);for(let t=0;t<6;t++){const n=b.length-6;j.push(b[n+t]-J)}}H+=N}const K=f[f.length-1];for(let t=0;t<i.length;t++)s(G,F,i[t][0]),s(k,x,i[t][1]),o(G,G,k),o(G,G,K),T[d++]=G[0],T[d++]=G[1],T[d++]=G[2];const Q=U/3;R[U++]=v[0],R[U++]=v[1],R[U++]=v[2];const W=H-N;for(let t=0;t<g.length;t++)b.push(g[t][0]>=0?H+g[t][0]:-g[t][0]-1+W),b.push(g[t][2]>=0?H+g[t][2]:-g[t][2]-1+W),b.push(g[t][1]>=0?H+g[t][1]:-g[t][1]-1+W),j.push(Q),j.push(Q),j.push(Q);const Y=[[L.POSITION,new P(T,b,3,!0)],[L.NORMAL,new P(R,j,3,!0)]];return new S(r,Y)}function ft(t,n,e,s){R(n.length>1,"createPolylineGeometry(): polyline needs at least 2 points"),R(3===n[0].length,"createPolylineGeometry(): malformed vertex"),R(null==e||e.length===n.length,"createPolylineGeometry: need same number of points and normals"),R(null==e||3===e[0].length,"createPolylineGeometry(): malformed normal");const o=i(3*n.length),r=new Array(2*(n.length-1));let h=0,l=0;for(let c=0;c<n.length;c++){for(let t=0;t<3;t++)o[h++]=n[c][t];c>0&&(r[l++]=c-1,r[l++]=c)}const u=[[L.POSITION,new P(o,r,3,!0)]];if(e){const t=w(3*e.length);let s=0;for(let o=0;o<n.length;o++)for(let n=0;n<3;n++)t[s++]=e[o][n];u.push([L.NORMAL,new P(t,r,3,!0)])}return s&&u.push([L.COLOR,new P(s,m(s.length/4),4)]),new S(t,u,null,T.Line)}function pt(t,n,e,s,o,r=0){const h=new Array(18),l=[[-e,r,o/2],[s,r,o/2],[0,n+r,o/2],[-e,r,-o/2],[s,r,-o/2],[0,n+r,-o/2]],u=[0,1,2,3,0,2,2,5,3,1,4,5,5,2,1,1,0,3,3,4,1,4,3,5];for(let c=0;c<6;c++)h[3*c]=l[c][0],h[3*c+1]=l[c][1],h[3*c+2]=l[c][2];return new S(t,[[L.POSITION,new P(h,u,3,!0)]])}function it(t,n){const e=t.getMutableAttribute(L.POSITION).data;for(let s=0;s<e.length;s+=3){const t=e[s],o=e[s+1],r=e[s+2];h(Mt,t,o,r),u(Mt,Mt,n),e[s]=Mt[0],e[s+1]=Mt[1],e[s+2]=Mt[2]}}function wt(t,n=t){const e=t.attributes,s=e.get(L.POSITION).data,o=e.get(L.NORMAL).data;if(o){const t=n.getMutableAttribute(L.NORMAL).data;for(let n=0;n<o.length;n+=3){const e=o[n+1];t[n+1]=-o[n+2],t[n+2]=e}}if(s){const t=n.getMutableAttribute(L.POSITION).data;for(let n=0;n<s.length;n+=3){const e=s[n+1];t[n+1]=-s[n+2],t[n+2]=e}}}function gt(t,s,o,h,l){return!(Math.abs(r(s,t))>l)&&(n(o,t,s),e(o,o),n(h,o,t),e(h,h),!0)}function Ot(t,n,e,s,o,r,h){return gt(t,n,o,r,h)||gt(t,e,o,r,h)||gt(t,s,o,r,h)}const mt=.99619469809,Mt=a();export{wt as cgToGIS,E as createBoxGeometry,lt as createConeGeometry,ut as createCylinderGeometry,q as createDiamondGeometry,pt as createExtrudedTriangle,at as createPathExtrusionGeometry,ot as createPointGeometry,st as createPolySphereData,et as createPolySphereGeometry,ft as createPolylineGeometry,nt as createSphereGeometry,ht as createSquareGeometry,tt as createTetrahedronGeometry,ct as createTubeGeometry,Ot as makeOrthoBasisDirUpFallback,it as transformInPlace};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{generateUID as t}from"../../../../core/uid.js";import{f as i}from"../../../../chunks/vec3.js";import{c as r}from"../../../../chunks/vec3f64.js";import{f as o}from"../../../../chunks/vec4f64.js";import{projectBuffer as s}from"../../../../geometry/projection/projectBuffer.js";import{Attribute as e}from"./Attribute.js";import{ContentObjectType as n}from"./ContentObjectType.js";import{Geometry as a}from"./Geometry.js";import{fromValues as h}from"./LocalOriginFactory.js";import{Object3D as m}from"./Object3D.js";import{gridLocalOriginFactory as c}from"./testUtils.js";import{VertexAttribute as g}from"./VertexAttribute.js";import{WebGLLayer as d}from"./WebGLLayer.js";import{RibbonLineMaterial as f}from"../materials/RibbonLineMaterial.js";class _{constructor(i){this._originSR=i,this._rootOriginId="root/"+t(),this._origins=new Map,this._objects=new Map,this._gridSize=5e5}getOrigin(t){const r=this._origins.get(this._rootOriginId);if(null==r){const i=c.rootOrigin;if(null!=i)return this._origins.set(this._rootOriginId,h(i[0],i[1],i[2],this._rootOriginId)),this.getOrigin(t);const r=h(t[0]+Math.random()-.5,t[1]+Math.random()-.5,t[2]+Math.random()-.5,this._rootOriginId);return this._origins.set(this._rootOriginId,r),r}const o=this._gridSize,s=Math.round(t[0]/o),e=Math.round(t[1]/o),n=Math.round(t[2]/o),a=`${s}/${e}/${n}`;let m=this._origins.get(a);const g=.5*o;if(i(p,t,r.vec3),p[0]=Math.abs(p[0]),p[1]=Math.abs(p[1]),p[2]=Math.abs(p[2]),p[0]<g&&p[1]<g&&p[2]<g){if(m){const r=Math.max(...p);i(p,t,m.vec3),p[0]=Math.abs(p[0]),p[1]=Math.abs(p[1]),p[2]=Math.abs(p[2]);if(Math.max(...p)<r)return m}return r}return m||(m=h(s*o,e*o,n*o,a),this._origins.set(a,m)),m}_drawOriginBox(t,i=o(1,1,0,1)){const r=window.view,h=r._stage,c=i.toString();if(!this._objects.has(c)){this._material=new f({width:2,color:i}),h.add(this._material);const t=new d(h,{pickable:!1}),r=new m({castShadow:!1});h.add(r),t.add(r),this._objects.set(c,r)}const _=this._objects.get(c),p=[0,1,5,4,0,2,1,7,6,2,0,1,3,7,5,4,6,2,0],j=p.length,u=new Array(3*j),l=new Array,b=.5*this._gridSize;for(let o=0;o<j;o++)u[3*o]=t[0]+(1&p[o]?b:-b),u[3*o+1]=t[1]+(2&p[o]?b:-b),u[3*o+2]=t[2]+(4&p[o]?b:-b),o>0&&l.push(o-1,o);s(u,this._originSR,0,u,r.renderSpatialReference,0,j);const M=new a(this._material,[[g.POSITION,new e(u,3,!0),l]],null,n.Line);h.add(M),_.addGeometry(M)}get test(){const t=this;return{set gridSize(i){t._gridSize=i}}}}const p=r();export{_ as GridLocalOriginFactory};
5
+ import{generateUID as t}from"../../../../core/uid.js";import{f as i}from"../../../../chunks/vec3.js";import{c as r}from"../../../../chunks/vec3f64.js";import{f as o}from"../../../../chunks/vec4f64.js";import{projectBuffer as s}from"../../../../geometry/projection/projectBuffer.js";import{Attribute as e}from"./Attribute.js";import{ContentObjectType as n}from"./ContentObjectType.js";import{Geometry as a}from"./Geometry.js";import{fromValues as h}from"./LocalOriginFactory.js";import{Object3D as m}from"./Object3D.js";import{gridLocalOriginFactory as c}from"./testUtils.js";import{VertexAttribute as g}from"./VertexAttribute.js";import{WebGLLayer as d}from"./WebGLLayer.js";import{RibbonLineMaterial as f}from"../materials/RibbonLineMaterial.js";class _{constructor(i){this._originSR=i,this._rootOriginId="root/"+t(),this._origins=new Map,this._objects=new Map,this._gridSize=5e5}getOrigin(t){const r=this._origins.get(this._rootOriginId);if(null==r){const i=c.rootOrigin;if(null!=i)return this._origins.set(this._rootOriginId,h(i[0],i[1],i[2],this._rootOriginId)),this.getOrigin(t);const r=h(t[0]+Math.random()-.5,t[1]+Math.random()-.5,t[2]+Math.random()-.5,this._rootOriginId);return this._origins.set(this._rootOriginId,r),r}const o=this._gridSize,s=Math.round(t[0]/o),e=Math.round(t[1]/o),n=Math.round(t[2]/o),a=`${s}/${e}/${n}`;let m=this._origins.get(a);const g=.5*o;if(i(p,t,r.vec3),p[0]=Math.abs(p[0]),p[1]=Math.abs(p[1]),p[2]=Math.abs(p[2]),p[0]<g&&p[1]<g&&p[2]<g){if(m){const r=Math.max(...p);i(p,t,m.vec3),p[0]=Math.abs(p[0]),p[1]=Math.abs(p[1]),p[2]=Math.abs(p[2]);if(Math.max(...p)<r)return m}return r}return m||(m=h(s*o,e*o,n*o,a),this._origins.set(a,m)),m}_drawOriginBox(t,i=o(1,1,0,1)){const r=window.view,h=r._stage,c=i.toString();if(!this._objects.has(c)){this._material=new f({width:2,color:i}),h.add(this._material);const t=new d(h,{pickable:!1}),r=new m({castShadow:!1});h.add(r),t.add(r),this._objects.set(c,r)}const _=this._objects.get(c),p=[0,1,5,4,0,2,1,7,6,2,0,1,3,7,5,4,6,2,0],j=p.length,u=new Array(3*j),l=new Array,b=.5*this._gridSize;for(let o=0;o<j;o++)u[3*o]=t[0]+(1&p[o]?b:-b),u[3*o+1]=t[1]+(2&p[o]?b:-b),u[3*o+2]=t[2]+(4&p[o]?b:-b),o>0&&l.push(o-1,o);s(u,this._originSR,0,u,r.renderSpatialReference,0,j);const M=new a(this._material,[[g.POSITION,new e(u,l,3,!0)]],null,n.Line);h.add(M),_.addGeometry(M)}get test(){const t=this;return{set gridSize(i){t._gridSize=i}}}}const p=r();export{_ as GridLocalOriginFactory};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{s as t,h as e,e as s,g as i,a as r,i as o}from"../../../../chunks/vec2.js";import{a}from"../../../../chunks/vec2f64.js";import{s as n,b as h}from"../../../../chunks/vec3.js";import{c as l}from"../../../../chunks/vec3f64.js";import{f as u}from"../../../../chunks/vec4f64.js";import{newFloatArray as c}from"../../../../geometry/support/FloatArray.js";import{getZeroIndexArray as v}from"../../../../geometry/support/Indices.js";import{Attribute as b}from"./Attribute.js";import{compressNormal as p}from"./Normals.js";import{VertexAttribute as m}from"./VertexAttribute.js";import{intersectTriangles as A}from"../materials/internal/MaterialUtil.js";class d{constructor(t){this.builder=t}onPathChanged(t){this.builder.onPathChanged()}}class x extends d{constructor(t){super(t),this.vertexAttributeColor=u(255,255,255,255),this.size=new Array,this.vertexAttributePosition=c(3*this.builder.numVerticesTotal),this.vertexAttributeNormal=new Int16Array(2*this.builder.numVerticesTotal)}bakeVertexColors(t){this.vertexAttributeColor[0]=255*t[0],this.vertexAttributeColor[1]=255*t[1],this.vertexAttributeColor[2]=255*t[2],this.vertexAttributeColor[3]=255*(t.length>3?t[3]:1)}bake(a){this.size=a;const{numVerticesTotal:l,pathVertexData:u,path:c,positions:v,profileRightAxes:b,profileUpAxes:m,profileVertexAndNormals:A}=this.builder;for(let d=0;d<l;++d){let l=u[d];const x=0===l||l===c.vertices.length-1;l*=3;const f=O;let D=0,N=0;const R=4*d,j=n(V,b[R],b[R+1],b[R+2]),E=n(w,m[R],m[R+1],m[R+2]),k=t(g,A[R]*a[0],A[R+1]*a[1]);if(x)h(f,E,j),D=b[R+3]*a[0],N=m[R+3];else{const a=P,h=I;t(a,b[R+3],m[R+3]);const l=e(a);s(a,a);const u=i(k,a);if(Math.abs(u)>l){t(h,-a[1],a[0]);const e=i(k,h);r(a,a,l*Math.sign(u)),r(h,h,e),o(k,a,h)}n(f,0,0,0)}const T=n(C,j[0]*k[0]+E[0]*k[1],j[1]*k[0]+E[1]*k[1],j[2]*k[0]+E[2]*k[1]),y=3*d;this.vertexAttributePosition[y]=v[l]+T[0]+f[0]*D,this.vertexAttributePosition[y+1]=v[l+1]+T[1]+f[1]*D,this.vertexAttributePosition[y+2]=v[l+2]+T[2]+f[2]*D;const L=t(g,A[R+2],A[R+3]);p(this.vertexAttributeNormal,d,j[0]*L[0]+E[0]*L[1]+f[0]*N,j[1]*L[0]+E[1]*L[1]+f[1]*N,j[2]*L[0]+E[2]*L[1]+f[2]*N)}}createGeometryData(){const t=this.builder.vertexIndices.length,{normalIndices:e,vertexIndices:s}=this.builder;return[[m.POSITION,new b(this.vertexAttributePosition,3,!0),s],[m.NORMALCOMPRESSED,new b(this.vertexAttributeNormal,2,!0),e],[m.COLOR,new b(this.vertexAttributeColor,4),v(t)]]}onPathChanged(t){super.onPathChanged(t),this.bake(this.size)}intersect(t,e,s){const i=this.builder.vertexIndices,r=new b(this.vertexAttributePosition,3),o=i.length/3;A(t,e,0,o,i,r,void 0,void 0,s)}}class f extends d{constructor(t,e,s,i){super(t),this.sizeAttributeValue=e,this.colorAttributeValue=s,this.opacityAttributeValue=i,this.vvData=null,this.baked=new x(t),this.vvData=c(4*this.builder.path.vertices.length);for(let r=0;r<this.builder.path.vertices.length;++r){this.vvData[4*r]=e,this.vvData[4*r+1]=s,this.vvData[4*r+2]=i;const t=0===r||r===this.builder.path.vertices.length-1;this.vvData[4*r+3]=t?1:0}}createGeometryData(){const{positions:t,profileRightAxes:e,profileUpAxes:s,profileVertexAndNormals:i,pathVertexIndices:r,vertexIndices:o}=this.builder;return[[m.POSITION,new b(t,3,!0),r],[m.PROFILERIGHT,new b(e,4,!0),o],[m.PROFILEUP,new b(s,4,!0),o],[m.PROFILEVERTEXANDNORMAL,new b(i,4,!0),o],[m.FEATUREVALUE,new b(this.vvData,4,!0),r]]}onPathChanged(t){super.onPathChanged(t);const e=t.getMutableAttribute(m.POSITION);e&&(e.data=this.builder.positions)}}const g=a(),P=a(),I=a(),C=l(),O=l(),V=l(),w=l();export{f as FastUpdatePathGeometry,d as PathGeometryData,x as StaticPathGeometry};
5
+ import{s as t,h as e,e as s,g as i,a as r,i as o}from"../../../../chunks/vec2.js";import{a}from"../../../../chunks/vec2f64.js";import{s as n,b as h}from"../../../../chunks/vec3.js";import{c as l}from"../../../../chunks/vec3f64.js";import{f as u}from"../../../../chunks/vec4f64.js";import{newFloatArray as c}from"../../../../geometry/support/FloatArray.js";import{getZeroIndexArray as v}from"../../../../geometry/support/Indices.js";import{Attribute as b,Vertices as p}from"./Attribute.js";import{compressNormal as m}from"./Normals.js";import{VertexAttribute as A}from"./VertexAttribute.js";import{intersectTriangles as d}from"../materials/internal/MaterialUtil.js";class x{constructor(t){this.builder=t}onPathChanged(t){this.builder.onPathChanged()}}class f extends x{constructor(t){super(t),this.vertexAttributeColor=u(255,255,255,255),this.size=new Array,this.vertexAttributePosition=c(3*this.builder.numVerticesTotal),this.vertexAttributeNormal=new Int16Array(2*this.builder.numVerticesTotal)}bakeVertexColors(t){this.vertexAttributeColor[0]=255*t[0],this.vertexAttributeColor[1]=255*t[1],this.vertexAttributeColor[2]=255*t[2],this.vertexAttributeColor[3]=255*(t.length>3?t[3]:1)}bake(a){this.size=a;const{numVerticesTotal:l,pathVertexData:u,path:c,positions:v,profileRightAxes:b,profileUpAxes:p,profileVertexAndNormals:A}=this.builder;for(let d=0;d<l;++d){let l=u[d];const x=0===l||l===c.vertices.length-1;l*=3;const f=V;let g=0,N=0;const R=4*d,j=n(w,b[R],b[R+1],b[R+2]),E=n(D,p[R],p[R+1],p[R+2]),k=t(P,A[R]*a[0],A[R+1]*a[1]);if(x)h(f,E,j),g=b[R+3]*a[0],N=p[R+3];else{const a=I,h=C;t(a,b[R+3],p[R+3]);const l=e(a);s(a,a);const u=i(k,a);if(Math.abs(u)>l){t(h,-a[1],a[0]);const e=i(k,h);r(a,a,l*Math.sign(u)),r(h,h,e),o(k,a,h)}n(f,0,0,0)}const T=n(O,j[0]*k[0]+E[0]*k[1],j[1]*k[0]+E[1]*k[1],j[2]*k[0]+E[2]*k[1]),y=3*d;this.vertexAttributePosition[y]=v[l]+T[0]+f[0]*g,this.vertexAttributePosition[y+1]=v[l+1]+T[1]+f[1]*g,this.vertexAttributePosition[y+2]=v[l+2]+T[2]+f[2]*g;const L=t(P,A[R+2],A[R+3]);m(this.vertexAttributeNormal,d,j[0]*L[0]+E[0]*L[1]+f[0]*N,j[1]*L[0]+E[1]*L[1]+f[1]*N,j[2]*L[0]+E[2]*L[1]+f[2]*N)}}createGeometryData(){const t=this.builder.vertexIndices.length,{normalIndices:e,vertexIndices:s}=this.builder;return[[A.POSITION,new b(this.vertexAttributePosition,s,3,!0)],[A.NORMALCOMPRESSED,new b(this.vertexAttributeNormal,e,2,!0)],[A.COLOR,new b(this.vertexAttributeColor,v(t),4)]]}onPathChanged(t){super.onPathChanged(t),this.bake(this.size)}intersect(t,e,s){const i=this.builder.vertexIndices,r=new p(this.vertexAttributePosition,3),o=i.length/3;d(t,e,0,o,i,r,void 0,void 0,s)}}class g extends x{constructor(t,e,s,i){super(t),this.sizeAttributeValue=e,this.colorAttributeValue=s,this.opacityAttributeValue=i,this.vvData=null,this.baked=new f(t),this.vvData=c(4*this.builder.path.vertices.length);for(let r=0;r<this.builder.path.vertices.length;++r){this.vvData[4*r]=e,this.vvData[4*r+1]=s,this.vvData[4*r+2]=i;const t=0===r||r===this.builder.path.vertices.length-1;this.vvData[4*r+3]=t?1:0}}createGeometryData(){const{positions:t,profileRightAxes:e,profileUpAxes:s,profileVertexAndNormals:i,pathVertexIndices:r,vertexIndices:o}=this.builder;return[[A.POSITION,new b(t,r,3,!0)],[A.PROFILERIGHT,new b(e,o,4,!0)],[A.PROFILEUP,new b(s,o,4,!0)],[A.PROFILEVERTEXANDNORMAL,new b(i,o,4,!0)],[A.FEATUREVALUE,new b(this.vvData,r,4,!0)]]}onPathChanged(t){super.onPathChanged(t);const e=t.getMutableAttribute(A.POSITION);e&&(e.data=this.builder.positions)}}const P=a(),I=a(),C=a(),O=l(),V=l(),w=l(),D=l();export{g as FastUpdatePathGeometry,x as PathGeometryData,f as StaticPathGeometry};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{generateUID as t}from"../../../../core/uid.js";import{h as r,m as e}from"../../../../chunks/mat4.js";import{a as s}from"../../../../chunks/mat4f64.js";import{e as i}from"../../../../chunks/vec3.js";import{N as n,c as o}from"../../../../chunks/sphere.js";import{maxScale as a}from"../../support/mathUtils.js";class h{constructor(r,e={}){this.geometry=r,this.screenToWorldRatio=1,this._transformation=s(),this._shaderTransformation=null,this._boundingSphere=null,this.id=t(),this.layerUid=e.layerUid,this.graphicUid=e.graphicUid,this.castShadow=e.castShadow??!1,null!=e.objectShaderTransformation&&this.objectShaderTransformationChanged(e.objectShaderTransformation)}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??=s(),e(this._shaderTransformation,t,this.geometry.transformation)),this._boundingSphere=null}get boundingSphere(){return this.boundingInfo?(null==this._boundingSphere&&(this._boundingSphere??=o(),i(this._boundingSphere,this.boundingInfo.center,this.shaderTransformation),this._boundingSphere[3]=this.boundingInfo.radius*a(this.shaderTransformation)),this._boundingSphere):n}get material(){return this.geometry.material}get type(){return this.geometry.type}get shaderTransformation(){return null==this._shaderTransformation?this.transformation:this._shaderTransformation}get indices(){return this.geometry.indices}get vertexAttributes(){return this.geometry.vertexAttributes}get highlights(){return this.geometry.highlights}get occludees(){return this.geometry.occludees}get visible(){return this.geometry.visible}set visible(t){this.geometry.visible=t}}class m extends h{}export{h as RenderGeometry,m as ValidatedRenderGeometry};
5
+ import{generateUID as t}from"../../../../core/uid.js";import{h as r,m as s}from"../../../../chunks/mat4.js";import{a as e}from"../../../../chunks/mat4f64.js";import{e as i}from"../../../../chunks/vec3.js";import{N as n,c as o}from"../../../../chunks/sphere.js";import{maxScale as a}from"../../support/mathUtils.js";class h{constructor(r,s={}){this.geometry=r,this.screenToWorldRatio=1,this._transformation=e(),this._shaderTransformation=null,this._boundingSphere=null,this.id=t(),this.layerUid=s.layerUid,this.graphicUid=s.graphicUid,this.castShadow=s.castShadow??!1,null!=s.objectShaderTransformation&&this.objectShaderTransformationChanged(s.objectShaderTransformation)}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??=e(),s(this._shaderTransformation,t,this.geometry.transformation)),this._boundingSphere=null}get boundingSphere(){return this.boundingInfo?(null==this._boundingSphere&&(this._boundingSphere??=o(),i(this._boundingSphere,this.boundingInfo.center,this.shaderTransformation),this._boundingSphere[3]=this.boundingInfo.radius*a(this.shaderTransformation)),this._boundingSphere):n}get material(){return this.geometry.material}get type(){return this.geometry.type}get shaderTransformation(){return null==this._shaderTransformation?this.transformation:this._shaderTransformation}get attributes(){return this.geometry.attributes}get highlights(){return this.geometry.highlights}get occludees(){return this.geometry.occludees}get visible(){return this.geometry.visible}set visible(t){this.geometry.visible=t}}class m extends h{}export{h as RenderGeometry,m as ValidatedRenderGeometry};