@arcgis/core 4.33.0-next.20250508 → 4.33.0-next.20250509

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 (380) hide show
  1. package/applications/SceneViewer/sceneViewerUtils.d.ts +2 -0
  2. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  3. package/arcade/featureset/support/RecentlyUsedCache.js +1 -1
  4. package/arcade/functions/aiServices.js +1 -1
  5. package/arcade.js +1 -1
  6. package/assets/components/assets/input-time-picker/t9n/messages.ar.json +1 -1
  7. package/assets/components/assets/input-time-picker/t9n/messages.bg.json +1 -1
  8. package/assets/components/assets/input-time-picker/t9n/messages.bs.json +1 -1
  9. package/assets/components/assets/input-time-picker/t9n/messages.ca.json +1 -1
  10. package/assets/components/assets/input-time-picker/t9n/messages.cs.json +1 -1
  11. package/assets/components/assets/input-time-picker/t9n/messages.da.json +1 -1
  12. package/assets/components/assets/input-time-picker/t9n/messages.de.json +1 -1
  13. package/assets/components/assets/input-time-picker/t9n/messages.el.json +1 -1
  14. package/assets/components/assets/input-time-picker/t9n/messages.en.json +1 -1
  15. package/assets/components/assets/input-time-picker/t9n/messages.es.json +1 -1
  16. package/assets/components/assets/input-time-picker/t9n/messages.et.json +1 -1
  17. package/assets/components/assets/input-time-picker/t9n/messages.fi.json +1 -1
  18. package/assets/components/assets/input-time-picker/t9n/messages.fr.json +1 -1
  19. package/assets/components/assets/input-time-picker/t9n/messages.he.json +1 -1
  20. package/assets/components/assets/input-time-picker/t9n/messages.hr.json +1 -1
  21. package/assets/components/assets/input-time-picker/t9n/messages.hu.json +1 -1
  22. package/assets/components/assets/input-time-picker/t9n/messages.id.json +1 -1
  23. package/assets/components/assets/input-time-picker/t9n/messages.it.json +1 -1
  24. package/assets/components/assets/input-time-picker/t9n/messages.ja.json +1 -1
  25. package/assets/components/assets/input-time-picker/t9n/messages.json +1 -1
  26. package/assets/components/assets/input-time-picker/t9n/messages.ko.json +1 -1
  27. package/assets/components/assets/input-time-picker/t9n/messages.lt.json +1 -1
  28. package/assets/components/assets/input-time-picker/t9n/messages.lv.json +1 -1
  29. package/assets/components/assets/input-time-picker/t9n/messages.nl.json +1 -1
  30. package/assets/components/assets/input-time-picker/t9n/messages.no.json +1 -1
  31. package/assets/components/assets/input-time-picker/t9n/messages.pl.json +1 -1
  32. package/assets/components/assets/input-time-picker/t9n/messages.pt-BR.json +1 -1
  33. package/assets/components/assets/input-time-picker/t9n/messages.pt-PT.json +1 -1
  34. package/assets/components/assets/input-time-picker/t9n/messages.ro.json +1 -1
  35. package/assets/components/assets/input-time-picker/t9n/messages.ru.json +1 -1
  36. package/assets/components/assets/input-time-picker/t9n/messages.sk.json +1 -1
  37. package/assets/components/assets/input-time-picker/t9n/messages.sl.json +1 -1
  38. package/assets/components/assets/input-time-picker/t9n/messages.sr.json +1 -1
  39. package/assets/components/assets/input-time-picker/t9n/messages.sv.json +1 -1
  40. package/assets/components/assets/input-time-picker/t9n/messages.th.json +1 -1
  41. package/assets/components/assets/input-time-picker/t9n/messages.tr.json +1 -1
  42. package/assets/components/assets/input-time-picker/t9n/messages.uk.json +1 -1
  43. package/assets/components/assets/input-time-picker/t9n/messages.vi.json +1 -1
  44. package/assets/components/assets/input-time-picker/t9n/messages.zh-CN.json +1 -1
  45. package/assets/components/assets/input-time-picker/t9n/messages.zh-HK.json +1 -1
  46. package/assets/components/assets/input-time-picker/t9n/messages.zh-TW.json +1 -1
  47. package/assets/esri/core/workers/RemoteClient.js +1 -1
  48. package/assets/esri/core/workers/chunks/0766ecb677d667e5fb83.js +2 -0
  49. package/assets/esri/core/workers/chunks/{543eb46b55cacd6e1dbc.js.LICENSE.txt → 0766ecb677d667e5fb83.js.LICENSE.txt} +1 -1
  50. package/assets/esri/core/workers/chunks/{c607d618b64d3accecc4.js → 0aca29f7156b2b412f2e.js} +1 -1
  51. package/assets/esri/core/workers/chunks/1c6542315390037053a6.js +1 -0
  52. package/assets/esri/core/workers/chunks/218a66d53f7cf4f285aa.js +2 -0
  53. package/assets/esri/core/workers/chunks/{d8dc922f7466300b668f.js.LICENSE.txt → 218a66d53f7cf4f285aa.js.LICENSE.txt} +2 -2
  54. package/assets/esri/core/workers/chunks/{037af6379f3e9278633b.js → 243dc74ec62891ba1ef7.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{f74b5659b6496a5c4c0c.js → 2e0af748eba93f3ea6cb.js} +1 -1
  56. package/assets/esri/core/workers/chunks/3596540ef49e5330ceb2.js +2 -0
  57. package/assets/esri/core/workers/chunks/{7b4523ab392966624d97.js.LICENSE.txt → 3596540ef49e5330ceb2.js.LICENSE.txt} +1 -7
  58. package/assets/esri/core/workers/chunks/{a22c88b0a525e602dce0.js → 3d0e09ef78dc2fd6957a.js} +1 -1
  59. package/assets/esri/core/workers/chunks/4feb774f123da26e9f2a.js +1 -0
  60. package/assets/esri/core/workers/chunks/{ee1d104e2bcc5d808fa4.js → 5228fc7fcdf57f44781e.js} +1 -1
  61. package/assets/esri/core/workers/chunks/5371df31553626528c69.js +1 -0
  62. package/assets/esri/core/workers/chunks/54f4a1131f99468db076.js +1 -0
  63. package/assets/esri/core/workers/chunks/{49c968e91c3c48aaa110.js → 5583d18032ed8bc17c74.js} +1 -1
  64. package/assets/esri/core/workers/chunks/5e7f35bf1aab93cb1c52.js +1 -0
  65. package/assets/esri/core/workers/chunks/61c74a733718d667b071.js +1 -0
  66. package/assets/esri/core/workers/chunks/{69f7fe6c58e4931597f6.js → 631205dc4d73d49ec9ed.js} +1 -1
  67. package/assets/esri/core/workers/chunks/6e12900a9f4c3c9941ec.js +1 -0
  68. package/assets/esri/core/workers/chunks/7e8f78b96d43c224c7b6.js +1 -0
  69. package/assets/esri/core/workers/chunks/7ed9a9c33a08ebba5570.js +346 -0
  70. package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
  71. package/assets/esri/core/workers/chunks/90ae15ce22a49bd84876.js +2 -0
  72. package/assets/esri/core/workers/chunks/{ac9c6779771ec855da79.js.LICENSE.txt → 90ae15ce22a49bd84876.js.LICENSE.txt} +3 -3
  73. package/assets/esri/core/workers/chunks/{9aedd7874da7c63865d6.js → 93cc26e5636040fdc0b8.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{77c7b7c4426c2b1a5b42.js → 9fc35ec8185beba96715.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{4f627eb62caee760215a.js → a1f27c4f4b5ef3e359f7.js} +1 -1
  76. package/assets/esri/core/workers/chunks/a31658f544ac6e1801d6.js +1 -0
  77. package/assets/esri/core/workers/chunks/{3a205f87f100832ef9f5.js → a5e746e10239a3bfe237.js} +1 -1
  78. package/assets/esri/core/workers/chunks/a6bcae413e62cd879b46.js +1 -0
  79. package/assets/esri/core/workers/chunks/{59d4c41172e921922cac.js → a8b42d8c0b76c234c09f.js} +100 -62
  80. package/assets/esri/core/workers/chunks/{3a517393619af3639b83.js → ad9bcd9dae45cdf90cbb.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{e46c05ef7272c7f1f70c.js → b1035bf4a016b1199236.js} +1 -1
  82. package/assets/esri/core/workers/chunks/b4f38fe9cc948a39ad87.js +2 -0
  83. package/assets/esri/core/workers/chunks/{ce9de24cb96b56d20562.js.LICENSE.txt → b4f38fe9cc948a39ad87.js.LICENSE.txt} +1 -1
  84. package/assets/esri/core/workers/chunks/{752ef63d910852b7be44.js → c16e0da7a19310c71e8b.js} +1 -1
  85. package/assets/esri/core/workers/chunks/c28d4717ed588c0d8bf1.js +1 -0
  86. package/assets/esri/core/workers/chunks/d22f91bc16a7641bcbef.js +1 -0
  87. package/assets/esri/core/workers/chunks/d7b640f7a181bd26c7c7.js +1 -0
  88. package/assets/esri/core/workers/chunks/{2bdbf678d4f013543dbb.js → d971571a957de70d5a8d.js} +1 -1
  89. package/assets/esri/core/workers/chunks/dc3a6beb3028009b3c23.js +1 -0
  90. package/assets/esri/core/workers/chunks/e0dc8794343c2a949ffb.js +2 -0
  91. package/assets/esri/core/workers/chunks/{670a66617249f2d15a62.js.LICENSE.txt → e0dc8794343c2a949ffb.js.LICENSE.txt} +1 -1
  92. package/assets/esri/core/workers/chunks/e3c1aea34ece8336dae1.js +1 -0
  93. package/assets/esri/core/workers/chunks/e483d2f169e51a361742.js +1 -0
  94. package/assets/esri/core/workers/chunks/{a50cb1fc8c4c585c0e11.js → ec8e8048b3df2c92008d.js} +1 -1
  95. package/assets/esri/core/workers/chunks/f7ab3511f6627f467796.js +1 -0
  96. package/assets/esri/core/workers/chunks/{1eef9cf19634c038b59b.js → f98689562017583f73ee.js} +1 -1
  97. package/assets/esri/core/workers/chunks/fb2e28e6a87956267d1c.js +66 -0
  98. package/assets/esri/core/workers/chunks/fbcd94f60f92257a7303.js +2 -0
  99. package/assets/esri/core/workers/chunks/{c2594024d72133d3ed7b.js.LICENSE.txt → fbcd94f60f92257a7303.js.LICENSE.txt} +1 -1
  100. package/assets/esri/core/workers/chunks/fda48126f67e80034404.js +1 -0
  101. package/assets/esri/themes/base/widgets/_FeatureTable.scss +1 -0
  102. package/assets/esri/themes/dark/main.css +1 -1
  103. package/assets/esri/themes/light/main.css +1 -1
  104. package/assets/esri/themes/light/view.css +1 -1
  105. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
  106. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
  107. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
  108. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
  109. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
  110. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
  111. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
  112. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
  113. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
  114. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
  115. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
  116. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
  117. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
  118. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
  119. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
  120. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
  121. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
  122. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
  123. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
  124. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
  125. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
  126. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
  127. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
  128. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
  129. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
  130. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
  131. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
  132. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
  133. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
  134. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
  135. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
  136. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
  137. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
  138. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
  139. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
  140. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
  141. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
  142. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
  143. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
  144. package/chunks/HUDMaterial.glsl.js +1 -1
  145. package/chunks/Laserlines.glsl.js +2 -2
  146. package/chunks/aiServices.js +1 -1
  147. package/chunks/boundedPlane.js +1 -1
  148. package/chunks/cameraUtilsSpherical.js +1 -1
  149. package/chunks/vec32.js +1 -1
  150. package/core/libs/gl-matrix-2/math/mat4.js +1 -1
  151. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  152. package/core/mapCollectionUtils.js +1 -1
  153. package/core/perspectiveUtils.js +1 -1
  154. package/geometry/support/axisAngleDegrees.js +1 -1
  155. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  156. package/geometry/support/curves/circleUtils.js +1 -1
  157. package/geometry/support/curves/curveExtent.js +5 -0
  158. package/geometry/support/curves/curveLength.js +5 -0
  159. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  160. package/geometry/support/curves/ellipticArc4Utils.js +1 -1
  161. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  162. package/geometry/support/curves/mathUtils.js +1 -1
  163. package/geometry/support/curves/splitCurveAtPoint.js +1 -1
  164. package/geometry/support/frustum.js +1 -1
  165. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  166. package/geometry/support/meshUtils/primitives.js +1 -1
  167. package/geometry/support/meshUtils/projection.js +1 -1
  168. package/geometry/support/meshUtils/rotate.js +1 -1
  169. package/geometry/support/meshUtils/scale.js +1 -1
  170. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  171. package/geometry/support/meshVertexSpaceUtils.js +1 -1
  172. package/geometry/support/plane.js +1 -1
  173. package/interfaces.d.ts +61 -3
  174. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  175. package/layers/LinkChartLayer.js +1 -1
  176. package/layers/VoxelWasmPerSceneView.js +1 -1
  177. package/layers/graphics/sources/MemorySource.js +1 -1
  178. package/layers/video/VideoCameraSensorModel.js +1 -1
  179. package/layers/voxel/VoxelVolume.js +1 -1
  180. package/layers/voxel/voxelPlaneUtils.js +1 -1
  181. package/package.json +1 -1
  182. package/support/revision.js +1 -1
  183. package/symbols/cim/cimAnalyzer.js +1 -1
  184. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  185. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
  186. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
  187. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
  188. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  189. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  190. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  191. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  192. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  193. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  194. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  195. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  196. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  197. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  198. package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
  199. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  200. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  201. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  202. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  203. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  204. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  205. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  206. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  207. package/views/3d/camera/constraintUtils/distance.js +1 -1
  208. package/views/3d/camera/intersectionUtils.js +1 -1
  209. package/views/3d/interactive/Manipulator3D.js +1 -1
  210. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  211. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  212. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  213. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  214. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  215. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  216. package/views/3d/layers/I3SMeshView3D.js +1 -1
  217. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  218. package/views/3d/layers/PointCloudWorker.js +1 -1
  219. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  220. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  221. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  222. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  223. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  224. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  225. package/views/3d/layers/graphics/Labeler.js +1 -1
  226. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  227. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  228. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  229. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  230. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  231. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  232. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  233. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  234. package/views/3d/layers/i3s/Intersector.js +1 -1
  235. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  236. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  237. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  238. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  239. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  240. package/views/3d/state/Frustum.js +1 -1
  241. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  242. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  243. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  244. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  245. package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
  246. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  247. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  248. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  249. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  250. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  251. package/views/3d/support/hitTest.js +1 -1
  252. package/views/3d/support/orientedBoundingBox.js +1 -1
  253. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  254. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  255. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  256. package/views/3d/support/viewpointUtils.js +1 -1
  257. package/views/3d/terrain/Intersector.js +1 -1
  258. package/views/3d/terrain/OverlayManager.js +1 -1
  259. package/views/3d/terrain/TerrainRenderer.js +1 -1
  260. package/views/3d/terrain/TerrainSurface.js +1 -1
  261. package/views/3d/webgl/ManagedDepthTexture.js +1 -1
  262. package/views/3d/webgl/RenderCamera.js +1 -1
  263. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  264. package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
  265. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  266. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  267. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  268. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  269. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  270. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  271. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  272. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  273. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  274. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration.js +1 -1
  275. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  276. package/views/3d/webgl-engine/lib/HUDIntersectorResult.js +5 -0
  277. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  278. package/views/3d/webgl-engine/lib/IntersectorInterfaces.js +1 -1
  279. package/views/3d/webgl-engine/lib/IntersectorResult.js +5 -0
  280. package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
  281. package/views/3d/webgl-engine/lib/IntersectorType.js +5 -0
  282. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  283. package/views/3d/webgl-engine/lib/Material.js +1 -1
  284. package/views/3d/webgl-engine/lib/Normals.js +1 -1
  285. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  286. package/views/3d/webgl-engine/lib/ObjectIntersectorResult.js +5 -0
  287. package/views/3d/webgl-engine/lib/ObjectTarget.js +5 -0
  288. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  289. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  290. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  291. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  292. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  293. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  294. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  295. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  296. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  297. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  298. package/views/3d/webgl-engine/lib/lodRendering/Intersector.js +1 -1
  299. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  300. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  301. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  302. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  303. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  304. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  305. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  306. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  307. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  308. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  309. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  310. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  311. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  312. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  313. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  314. package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
  315. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  316. package/views/FocusArea.js +1 -1
  317. package/views/FocusAreaOutline.js +5 -0
  318. package/views/FocusAreaOutlineItem.js +5 -0
  319. package/views/FocusAreas.js +1 -1
  320. package/views/FocusAreasUtils.js +5 -0
  321. package/views/FocusAreasView.js +5 -0
  322. package/views/SceneView.js +1 -1
  323. package/views/analysis/DimensionAnalysisView.js +1 -1
  324. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  325. package/views/interactive/ToolIntersector.js +1 -1
  326. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  327. package/views/interactive/sketch/constraints.js +1 -1
  328. package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
  329. package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
  330. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  331. package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
  332. package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
  333. package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
  334. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  335. package/views/layers/DimensionLayerView.js +1 -1
  336. package/views/support/angularMeasurementUtils.js +1 -1
  337. package/views/support/geometry3dUtils.js +1 -1
  338. package/widgets/BasemapLayerList.js +1 -1
  339. package/widgets/BatchAttributeForm.js +1 -1
  340. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  341. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
  342. package/widgets/FeatureForm.js +1 -1
  343. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  344. package/widgets/FeatureTable.js +1 -1
  345. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  346. package/widgets/UtilityNetworkTrace.js +1 -1
  347. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  348. package/widgets/VideoPlayer/components/MetadataSection.js +1 -1
  349. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  350. package/widgets/support/FilterBuilder.js +1 -1
  351. package/widgets/support/SketchTooltipControls.js +1 -1
  352. package/widgets/support/SnappingControls.js +1 -1
  353. package/assets/esri/core/workers/chunks/094300acbd24085cb063.js +0 -1
  354. package/assets/esri/core/workers/chunks/0c338364cb55afdbd580.js +0 -1
  355. package/assets/esri/core/workers/chunks/2da01fe20200b6d74851.js +0 -1
  356. package/assets/esri/core/workers/chunks/35c996f6fbff165b03f4.js +0 -1
  357. package/assets/esri/core/workers/chunks/45d64b72b7e93e9c64d7.js +0 -1
  358. package/assets/esri/core/workers/chunks/543eb46b55cacd6e1dbc.js +0 -2
  359. package/assets/esri/core/workers/chunks/5e0118a030cf741f78c6.js +0 -319
  360. package/assets/esri/core/workers/chunks/670a66617249f2d15a62.js +0 -2
  361. package/assets/esri/core/workers/chunks/6b5274d46a155d65dff1.js +0 -39
  362. package/assets/esri/core/workers/chunks/74187c771ee7083d1db7.js +0 -1
  363. package/assets/esri/core/workers/chunks/7b4523ab392966624d97.js +0 -2
  364. package/assets/esri/core/workers/chunks/7c2ec96749972e0b8a13.js +0 -1
  365. package/assets/esri/core/workers/chunks/7ffc1db10b00754398e8.js +0 -1
  366. package/assets/esri/core/workers/chunks/81546c6141d564ed59c9.js +0 -1
  367. package/assets/esri/core/workers/chunks/852dd5af8e704613310a.js +0 -1
  368. package/assets/esri/core/workers/chunks/ac9c6779771ec855da79.js +0 -2
  369. package/assets/esri/core/workers/chunks/bbff052a991a2dc36960.js +0 -1
  370. package/assets/esri/core/workers/chunks/bcab8b9ce2f9d2ebaae7.js +0 -1
  371. package/assets/esri/core/workers/chunks/bf190d672dcbaedc1a41.js +0 -1
  372. package/assets/esri/core/workers/chunks/c255c9279815359fdce5.js +0 -1
  373. package/assets/esri/core/workers/chunks/c2594024d72133d3ed7b.js +0 -2
  374. package/assets/esri/core/workers/chunks/ce9de24cb96b56d20562.js +0 -2
  375. package/assets/esri/core/workers/chunks/d8dc922f7466300b668f.js +0 -2
  376. package/assets/esri/core/workers/chunks/d9948763423784b68c09.js +0 -1
  377. package/assets/esri/core/workers/chunks/dbf6011dd7933f02d41d.js +0 -66
  378. package/assets/esri/core/workers/chunks/e4e9dd635bdef18d0bd5.js +0 -1
  379. package/assets/esri/core/workers/chunks/e69f2e3c2d5e71fbb42f.js +0 -1
  380. package/assets/esri/core/workers/chunks/f61632c06c05b72e7017.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/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 o}from"../../../core/screenUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{copy as a,multiply as p,invert as u,transpose as l,frustum as _,equals as c,lookAt as v}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as d,exactEquals as y}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as g}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{d as m,i as f,j as x,c as M,p as D,a as j,e as T,z as R,y as P,g as F,l as V,h as O,n as b,o as C}from"../../../chunks/vec32.js";import{create as S}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{b as I,e as E,a as L,c as H,d as A,t as G}from"../../../chunks/vec42.js";import{fromValues as B,create as U}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as k,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"../webgl-engine/lib/fov.js";import{PaddingSide as Z}from"../webgl-engine/lib/rendererUtils.js";var $;let tt=$=class extends i{constructor(t){super(t),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=k(),this._fullViewport=U(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=S(),this._up=S(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}get rows(){return this._rows}set rows(t){this._rows=Math.max(1,t)}get columns(){return this._columns}set columns(t){this._columns=Math.max(1,t)}get eye(){return this._ray.origin}set eye(t){this._compareAndSetView(t,this._ray.origin)}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center,"_center")}get ray(){return m(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){a(this._viewMatrix,t),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),f(S(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),f(S(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),f(S(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(t){this._nearFar[0]!==t&&(this._nearFar[0]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(t){this._nearFar[1]!==t&&(this._nearFar[1]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(t){this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const t=I(U(),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=I(U(),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[Z.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[Z.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[Z.RIGHT]+this._padding[Z.LEFT]}set fullWidth(t){this.width=t-(this._padding[Z.RIGHT]+this._padding[Z.LEFT])}get fullHeight(){return this._viewport[3]+this._padding[Z.TOP]+this._padding[Z.BOTTOM]}set fullHeight(t){this.height=t-(this._padding[Z.TOP]+this._padding[Z.BOTTOM])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[Z.LEFT],this._fullViewport[1]=this._viewport[1]-this._padding[Z.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[Z.LEFT]-this._padding[Z.LEFT],this._viewport[1]+=t[Z.BOTTOM]-this._padding[Z.BOTTOM],this._viewport[2]-=t[Z.RIGHT]+t[Z.LEFT]-(this._padding[Z.RIGHT]+this._padding[Z.LEFT]),this._viewport[3]-=t[Z.TOP]+t[Z.BOTTOM]-(this._padding[Z.TOP]+this._padding[Z.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(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return u(w(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||w()}get fov(){return this._fov}set fov(t){this._fov=t,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return 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 x(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(u(this._viewInverseTransposeMatrix,this.viewMatrix),l(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const{near:i,far:e}=this;return 2*i*e/(e+i-t*(e-i))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const t=this.width,i=this.height,e=this.near*Math.tan(this.fovY/2)*2,r=e*this._aspect,s=e/this.rows,o=r/this.columns,n=-r/2+this.column*o,h=n+o,a=-e/2+this.row*s,p=a+s,u=_(w(),n*(1+2*this._padding[Z.LEFT]/t),h*(1+2*this._padding[Z.RIGHT]/t),a*(1+2*this._padding[Z.BOTTOM]/i),p*(1+2*this._padding[Z.TOP]/i),this.near,this.far),l=this._get("projectionMatrix");return l&&c(l,u)?l:u}copyFrom(t){M(this._ray.origin,t.eye),this.center=t.center,this.up=t.up,H(this._viewport,t.viewport),this.notifyChange("_viewport"),H(this._padding,t.padding),this.notifyChange("_padding"),d(this._nearFar,t.nearFar),this.notifyChange("_nearFar"),this._fov=t.fov,this.row=t.row,this.column=t.column,this.rows=t.rows,this.columns=t.columns,this.relativeElevation=t.relativeElevation;const i=t;return this._viewDirty=i._viewDirty,this._viewDirty||(a(this._viewMatrix,t.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=i._frustumDirty,this._frustumDirty||(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,this.fov=t.fov}clone(){return(new $).copyFrom(this)}equals(t){return D(this.eye,t.eye)&&D(this.center,t.center)&&D(this.up,t.up)&&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&&this.row===t.row&&this.column===t.column&&this.rows===t.rows&&this.columns===t.columns}almostEquals(t){const i=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||A(t.screenPadding,this.screenPadding)>=i||A(this.screenViewport,t.screenViewport)>=i||this.row!==t.row||this.column!==t.column||this.rows!==t.rows||this.columns!==t.columns)return!1;j(st,t.eye,t.center),j(ot,this.eye,this.center);const e=T(st,ot),r=R(st),s=R(ot),o=5e-4;return e*e>=(1-1e-10)*r*s&&P(t.eye,this.eye)<Math.max(r,s)*o*o}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perRenderPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs(Y(this.viewForward,m(st,t,this.eye)))}computeScreenPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeDistanceFromRadius(t,i){return t/Math.tan(Math.min(this.fovX,this.fovY)/(2*(i||1)))}getScreenCenter(t=s()){return t[0]=(this.padding[Z.LEFT]+this.width/2)/this.pixelRatio,t[1]=(this.padding[Z.TOP]+this.height/2)/this.pixelRatio,t}getRenderCenter(t,i=.5,e=.5){return t[0]=this.padding[Z.LEFT]+this.width*i,t[1]=this.padding[Z.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!==et&&M(et,t),et[3]=1,G(et,et,this.projectionMatrix);const e=Math.abs(et[3]);F(et,et,1/e);const s=this.fullViewport;i[0]=r(0,s[0]+s[2],.5+.5*et[0]),i[1]=r(0,s[1]+s[3],.5+.5*et[1]),i[2]=.5*(et[2]+1),i[3]=e}unapplyProjection(t,i){const e=this.fullViewport;et[0]=(t[0]/(e[0]+e[2])*2-1)*t[3],et[1]=(t[1]/(e[1]+e[3])*2-1)*t[3],et[2]=(2*t[2]-1)*t[3],et[3]=t[3],null!=this.inverseProjectionMatrix&&(G(et,et,this.inverseProjectionMatrix),i[0]=et[0],i[1]=et[1],i[2]=et[2])}projectToScreen(t,i){return this.projectToRenderScreen(t,nt),this.renderToScreen(nt,i),i}projectToRenderScreen(t,i){if(et[0]=t[0],et[1]=t[1],et[2]=t[2],et[3]=1,G(et,et,this.viewProjectionMatrix),0===et[3])return null;const e=et;F(e,e,1/Math.abs(et[3]));const s=this.fullViewport,o=r(0,s[0]+s[2],.5+.5*e[0]),n=r(0,s[1]+s[3],.5+.5*e[1]);return"x"in i?(i.x=o,i.y=n):(i[0]=o,i[1]=n,i.length>2&&(i[2]=.5*(e[2]+1))),i}unprojectFromScreen(t,i){return this.unprojectFromRenderScreen(this.screenToRender(t,nt),i)}unprojectFromRenderScreen(t,i){if(p(rt,this.projectionMatrix,this.viewMatrix),!u(rt,rt))return null;const e=this.fullViewport;return et[0]=2*(t[0]-e[0])/e[2]-1,et[1]=2*(t[1]-e[1])/e[3]-1,et[2]=2*t[2]-1,et[3]=1,G(et,et,rt),0===et[3]?null:(i[0]=et[0]/et[3],i[1]=et[1]/et[3],i[2]=et[2]/et[3],i)}constrainWindowSize(t,i,e,r){const s=t*this.pixelRatio,o=i*this.pixelRatio,n=Math.max(s-e/2,0),h=Math.max(this.fullHeight-o-r/2,0),a=-Math.min(s-e/2,0),p=-Math.min(this.fullHeight-o-r/2,0),u=e-a- -Math.min(this.fullWidth-s-e/2,0),l=r-p- -Math.min(o-r/2,0);return[Math.round(n),Math.round(h),Math.round(u),Math.round(l)]}computeUp(t){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(){m(st,this.center,this.eye);const t=V(this.center);t<1?(f(this._up,0,0,1),this._markViewDirty(),this.notifyChange("_up")):Math.abs(T(st,this.center))>.9999*V(st)*t||(O(this._up,st,this.center),O(this._up,this._up,st),b(this._up,this._up),this.notifyChange("_up"),this._markViewDirty())}_computeUpLocal(){C(st,this.eye,this.center),Math.abs(st[2])<=.9999&&(F(st,st,st[2]),f(this._up,-st[0],-st[1],1-st[2]),b(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])?D(t,i)||(M(i,t),this._markViewDirty(),r.length&&this.notifyChange(r)):e.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&(W(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&(v(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};t([n()],tt.prototype,"_viewport",void 0),t([n()],tt.prototype,"_padding",void 0),t([n()],tt.prototype,"_fov",void 0),t([n()],tt.prototype,"_nearFar",void 0),t([n()],tt.prototype,"_viewDirty",void 0),t([n()],tt.prototype,"_viewMatrix",void 0),t([n()],tt.prototype,"_pixelRatio",void 0),t([n()],tt.prototype,"pixelRatio",null),t([n()],tt.prototype,"row",void 0),t([n()],tt.prototype,"column",void 0),t([n()],tt.prototype,"_rows",void 0),t([n()],tt.prototype,"rows",null),t([n()],tt.prototype,"_columns",void 0),t([n()],tt.prototype,"columns",null),t([n()],tt.prototype,"eye",null),t([n()],tt.prototype,"center",null),t([n()],tt.prototype,"_center",void 0),t([n()],tt.prototype,"up",null),t([n()],tt.prototype,"_up",void 0),t([n()],tt.prototype,"viewMatrix",null),t([n({readOnly:!0})],tt.prototype,"viewForward",null),t([n({readOnly:!0})],tt.prototype,"viewUp",null),t([n({readOnly:!0})],tt.prototype,"viewRight",null),t([n({readOnly:!0})],tt.prototype,"nearFar",null),t([n()],tt.prototype,"near",null),t([n()],tt.prototype,"far",null),t([n()],tt.prototype,"viewport",null),t([n({readOnly:!0})],tt.prototype,"screenViewport",null),t([n({readOnly:!0})],tt.prototype,"screenPadding",null),t([n()],tt.prototype,"x",null),t([n()],tt.prototype,"y",null),t([n()],tt.prototype,"width",null),t([n()],tt.prototype,"height",null),t([n()],tt.prototype,"fullWidth",null),t([n()],tt.prototype,"fullHeight",null),t([n({readOnly:!0})],tt.prototype,"_aspect",null),t([n()],tt.prototype,"padding",null),t([n({readOnly:!0})],tt.prototype,"projectionMatrix",null),t([n({readOnly:!0})],tt.prototype,"inverseProjectionMatrix",null),t([n()],tt.prototype,"fov",null),t([n()],tt.prototype,"fovX",null),t([n()],tt.prototype,"fovY",null),t([n()],tt.prototype,"viewInverseTransposeMatrix",null),t([n({readOnly:!0})],tt.prototype,"_projectionMatrixInternal",null),t([n()],tt.prototype,"relativeElevation",void 0),tt=$=t([h("esri.views.3d.webgl.RenderCamera")],tt);const it=tt,et=U(),rt=w(),st=S(),ot=S(),nt=o();export{it as default};
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 o}from"../../../core/screenUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{copy as a,multiply as p,invert as u,transpose as l,frustum as _,equals as c,lookAt as v}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as d,exactEquals as y}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as g}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{d as m,i as f,j as x,c as M,q as D,a as j,e as T,y as R,x as P,g as F,l as V,h as O,n as b,E as C}from"../../../chunks/vec32.js";import{create as S}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{b as I,e as E,a as L,c as H,d as A,t as G}from"../../../chunks/vec42.js";import{fromValues as B,create as U}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as k,copy as z,fromMatrix as W}from"../../../geometry/support/frustum.js";import{create as q}from"../../../geometry/support/ray.js";import{projectPointSignedLength as X}from"../../../geometry/support/vector.js";import{ViewingMode as Y}from"../../ViewingMode.js";import{fovd2fovx as N,fovx2fovd as J,fovd2fovy as K,fovy2fovd as Q}from"../webgl-engine/lib/fov.js";import{PaddingSide as Z}from"../webgl-engine/lib/rendererUtils.js";var $;let tt=$=class extends i{constructor(t){super(t),this._ray=q(),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=k(),this._fullViewport=U(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=S(),this._up=S(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(t){this._pixelRatio=t>0?t:1}get rows(){return this._rows}set rows(t){this._rows=Math.max(1,t)}get columns(){return this._columns}set columns(t){this._columns=Math.max(1,t)}get eye(){return this._ray.origin}set eye(t){this._compareAndSetView(t,this._ray.origin)}get center(){return this._center}set center(t){this._compareAndSetView(t,this._center,"_center")}get ray(){return m(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(t){this._compareAndSetView(t,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(t){a(this._viewMatrix,t),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),f(S(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),f(S(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),f(S(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(t){this._nearFar[0]!==t&&(this._nearFar[0]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(t){this._nearFar[1]!==t&&(this._nearFar[1]=t,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(t){this.x=t[0],this.y=t[1],this.width=t[2],this.height=t[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const t=I(U(),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=I(U(),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[Z.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[Z.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[Z.RIGHT]+this._padding[Z.LEFT]}set fullWidth(t){this.width=t-(this._padding[Z.RIGHT]+this._padding[Z.LEFT])}get fullHeight(){return this._viewport[3]+this._padding[Z.TOP]+this._padding[Z.BOTTOM]}set fullHeight(t){this.height=t-(this._padding[Z.TOP]+this._padding[Z.BOTTOM])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[Z.LEFT],this._fullViewport[1]=this._viewport[1]-this._padding[Z.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[Z.LEFT]-this._padding[Z.LEFT],this._viewport[1]+=t[Z.BOTTOM]-this._padding[Z.BOTTOM],this._viewport[2]-=t[Z.RIGHT]+t[Z.LEFT]-(this._padding[Z.RIGHT]+this._padding[Z.LEFT]),this._viewport[3]-=t[Z.TOP]+t[Z.BOTTOM]-(this._padding[Z.TOP]+this._padding[Z.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(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return u(w(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||w()}get fov(){return this._fov}set fov(t){this._fov=t,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return 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 x(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&(u(this._viewInverseTransposeMatrix,this.viewMatrix),l(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(t){const{near:i,far:e}=this;return 2*i*e/(e+i-t*(e-i))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const t=this.width,i=this.height,e=this.near*Math.tan(this.fovY/2)*2,r=e*this._aspect,s=e/this.rows,o=r/this.columns,n=-r/2+this.column*o,h=n+o,a=-e/2+this.row*s,p=a+s,u=_(w(),n*(1+2*this._padding[Z.LEFT]/t),h*(1+2*this._padding[Z.RIGHT]/t),a*(1+2*this._padding[Z.BOTTOM]/i),p*(1+2*this._padding[Z.TOP]/i),this.near,this.far),l=this._get("projectionMatrix");return l&&c(l,u)?l:u}copyFrom(t){M(this._ray.origin,t.eye),this.center=t.center,this.up=t.up,H(this._viewport,t.viewport),this.notifyChange("_viewport"),H(this._padding,t.padding),this.notifyChange("_padding"),d(this._nearFar,t.nearFar),this.notifyChange("_nearFar"),this._fov=t.fov,this.row=t.row,this.column=t.column,this.rows=t.rows,this.columns=t.columns,this.relativeElevation=t.relativeElevation;const i=t;return this._viewDirty=i._viewDirty,this._viewDirty||(a(this._viewMatrix,t.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=i._frustumDirty,this._frustumDirty||(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,this.fov=t.fov}clone(){return(new $).copyFrom(this)}equals(t){return D(this.eye,t.eye)&&D(this.center,t.center)&&D(this.up,t.up)&&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&&this.row===t.row&&this.column===t.column&&this.rows===t.rows&&this.columns===t.columns}almostEquals(t){const i=Math.max(1,1/this.pixelRatio,1/t.pixelRatio);if(Math.abs(t.fov-this._fov)>=.001||A(t.screenPadding,this.screenPadding)>=i||A(this.screenViewport,t.screenViewport)>=i||this.row!==t.row||this.column!==t.column||this.rows!==t.rows||this.columns!==t.columns)return!1;j(st,t.eye,t.center),j(ot,this.eye,this.center);const e=T(st,ot),r=R(st),s=R(ot),o=5e-4;return e*e>=(1-1e-10)*r*s&&P(t.eye,this.eye)<Math.max(r,s)*o*o}computeRenderPixelSizeAt(t){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(t))}computeRenderPixelSizeAtDist(t){return t*this.perRenderPixelRatio}computeScreenPixelSizeAt(t){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(t))}_viewDirectionDistance(t){return Math.abs(X(this.viewForward,m(st,t,this.eye)))}computeScreenPixelSizeAtDist(t){return t*this.perScreenPixelRatio}computeDistanceFromRadius(t,i){return t/Math.tan(Math.min(this.fovX,this.fovY)/(2*(i||1)))}getScreenCenter(t=s()){return t[0]=(this.padding[Z.LEFT]+this.width/2)/this.pixelRatio,t[1]=(this.padding[Z.TOP]+this.height/2)/this.pixelRatio,t}getRenderCenter(t,i=.5,e=.5){return t[0]=this.padding[Z.LEFT]+this.width*i,t[1]=this.padding[Z.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!==et&&M(et,t),et[3]=1,G(et,et,this.projectionMatrix);const e=Math.abs(et[3]);F(et,et,1/e);const s=this.fullViewport;i[0]=r(0,s[0]+s[2],.5+.5*et[0]),i[1]=r(0,s[1]+s[3],.5+.5*et[1]),i[2]=.5*(et[2]+1),i[3]=e}unapplyProjection(t,i){const e=this.fullViewport;et[0]=(t[0]/(e[0]+e[2])*2-1)*t[3],et[1]=(t[1]/(e[1]+e[3])*2-1)*t[3],et[2]=(2*t[2]-1)*t[3],et[3]=t[3],null!=this.inverseProjectionMatrix&&(G(et,et,this.inverseProjectionMatrix),i[0]=et[0],i[1]=et[1],i[2]=et[2])}projectToScreen(t,i){return this.projectToRenderScreen(t,nt),this.renderToScreen(nt,i),i}projectToRenderScreen(t,i){if(et[0]=t[0],et[1]=t[1],et[2]=t[2],et[3]=1,G(et,et,this.viewProjectionMatrix),0===et[3])return null;const e=et;F(e,e,1/Math.abs(et[3]));const s=this.fullViewport,o=r(0,s[0]+s[2],.5+.5*e[0]),n=r(0,s[1]+s[3],.5+.5*e[1]);return"x"in i?(i.x=o,i.y=n):(i[0]=o,i[1]=n,i.length>2&&(i[2]=.5*(e[2]+1))),i}unprojectFromScreen(t,i){return this.unprojectFromRenderScreen(this.screenToRender(t,nt),i)}unprojectFromRenderScreen(t,i){if(p(rt,this.projectionMatrix,this.viewMatrix),!u(rt,rt))return null;const e=this.fullViewport;return et[0]=2*(t[0]-e[0])/e[2]-1,et[1]=2*(t[1]-e[1])/e[3]-1,et[2]=2*t[2]-1,et[3]=1,G(et,et,rt),0===et[3]?null:(i[0]=et[0]/et[3],i[1]=et[1]/et[3],i[2]=et[2]/et[3],i)}constrainWindowSize(t,i,e,r){const s=t*this.pixelRatio,o=i*this.pixelRatio,n=Math.max(s-e/2,0),h=Math.max(this.fullHeight-o-r/2,0),a=-Math.min(s-e/2,0),p=-Math.min(this.fullHeight-o-r/2,0),u=e-a- -Math.min(this.fullWidth-s-e/2,0),l=r-p- -Math.min(o-r/2,0);return[Math.round(n),Math.round(h),Math.round(u),Math.round(l)]}computeUp(t){t===Y.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(){m(st,this.center,this.eye);const t=V(this.center);t<1?(f(this._up,0,0,1),this._markViewDirty(),this.notifyChange("_up")):Math.abs(T(st,this.center))>.9999*V(st)*t||(O(this._up,st,this.center),O(this._up,this._up,st),b(this._up,this._up),this.notifyChange("_up"),this._markViewDirty())}_computeUpLocal(){C(st,this.eye,this.center),Math.abs(st[2])<=.9999&&(F(st,st,st[2]),f(this._up,-st[0],-st[1],1-st[2]),b(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])?D(t,i)||(M(i,t),this._markViewDirty(),r.length&&this.notifyChange(r)):e.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&(W(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&(v(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};t([n()],tt.prototype,"_viewport",void 0),t([n()],tt.prototype,"_padding",void 0),t([n()],tt.prototype,"_fov",void 0),t([n()],tt.prototype,"_nearFar",void 0),t([n()],tt.prototype,"_viewDirty",void 0),t([n()],tt.prototype,"_viewMatrix",void 0),t([n()],tt.prototype,"_pixelRatio",void 0),t([n()],tt.prototype,"pixelRatio",null),t([n()],tt.prototype,"row",void 0),t([n()],tt.prototype,"column",void 0),t([n()],tt.prototype,"_rows",void 0),t([n()],tt.prototype,"rows",null),t([n()],tt.prototype,"_columns",void 0),t([n()],tt.prototype,"columns",null),t([n()],tt.prototype,"eye",null),t([n()],tt.prototype,"center",null),t([n()],tt.prototype,"_center",void 0),t([n()],tt.prototype,"up",null),t([n()],tt.prototype,"_up",void 0),t([n()],tt.prototype,"viewMatrix",null),t([n({readOnly:!0})],tt.prototype,"viewForward",null),t([n({readOnly:!0})],tt.prototype,"viewUp",null),t([n({readOnly:!0})],tt.prototype,"viewRight",null),t([n({readOnly:!0})],tt.prototype,"nearFar",null),t([n()],tt.prototype,"near",null),t([n()],tt.prototype,"far",null),t([n()],tt.prototype,"viewport",null),t([n({readOnly:!0})],tt.prototype,"screenViewport",null),t([n({readOnly:!0})],tt.prototype,"screenPadding",null),t([n()],tt.prototype,"x",null),t([n()],tt.prototype,"y",null),t([n()],tt.prototype,"width",null),t([n()],tt.prototype,"height",null),t([n()],tt.prototype,"fullWidth",null),t([n()],tt.prototype,"fullHeight",null),t([n({readOnly:!0})],tt.prototype,"_aspect",null),t([n()],tt.prototype,"padding",null),t([n({readOnly:!0})],tt.prototype,"projectionMatrix",null),t([n({readOnly:!0})],tt.prototype,"inverseProjectionMatrix",null),t([n()],tt.prototype,"fov",null),t([n()],tt.prototype,"fovX",null),t([n()],tt.prototype,"fovY",null),t([n()],tt.prototype,"viewInverseTransposeMatrix",null),t([n({readOnly:!0})],tt.prototype,"_projectionMatrixInternal",null),t([n()],tt.prototype,"relativeElevation",void 0),tt=$=t([h("esri.views.3d.webgl.RenderCamera")],tt);const it=tt,et=U(),rt=w(),st=S(),ot=S(),nt=o();export{it as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../../../core/PooledArray.js";import{fromQuat as e,scale as n}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{conjugate as o}from"../../../../../core/libs/gl-matrix-2/math/quat.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{e as s,a as i,w as c,i as l,q as f,f as u,m,c as h}from"../../../../../chunks/vec32.js";import{create as b}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{signedDistance as p}from"../../../../../geometry/support/plane.js";import{DepthRange as g}from"../../lib/DepthRange.js";function j(t,e){const n=new g,{eye:r,frustum:o,viewForward:a}=t;e.forAll((t=>{const e=null!=t.offsetObb?t.offsetObb:t.obb,c=s(i(M,e.center,r),a),l=e.projectedRadius(a);if(n.within(c-l)&&n.within(c+l))return;const f=S(e,o);if(-1===f)return;if(0===f)return w.far=c+l,w.near=c-l,void n.union(w);const u=d.pushNew();u.near=c-l,u.far=c+l,u.mask=f,u.object=t}));for(let c=0;c<d.length;c++){const t=d.data[c];if(n.within(t.near)&&n.within(t.far))continue;w.far=t.far,w.near=1/0;const e=z(null!=t.object.offsetObb?t.object.offsetObb:t.object.obb,r,k,(e=>{let n=v;for(let r=0;r<R&&e.length>0;r++){if(!(t.mask&1<<r))continue;y(o[r],e,n);const a=e;e=n,n=a}for(let t=0;t<e.length;t+=3){l(x,e.data[t],e.data[t+1],e.data[t+2]);const n=s(i(x,x,r),a);w.near=Math.min(w.near,n)}}));0===e&&(w.near=0),n.union(w)}return d.length=0,n}const d=new t({allocator:t=>t||{near:1/0,far:-1/0,mask:0,object:null},deallocator:t=>(t.object=null,t)}),w=new g,x=b(),q=b(),k=new t({deallocator:null}),v=new t({deallocator:null});function y(t,e,n){n.length=0;const r=e.length-3;O(x,e,r);const o=p(t,x);o<=0&&(n.push(x[0]),n.push(x[1]),n.push(x[2]));let a=0,s=o;for(;a<r;a+=3){O(q,e,a);const r=p(t,q);if(s*r<0){m(x,q,x,r/(r-s)),A(n,x)}r<=0&&A(n,q),s=r,h(x,q)}if(s*o<0){O(q,e,r);m(x,q,x,o/(o-s)),A(n,x)}}function O(t,e,n){return l(t,e.data[n],e.data[n+1],e.data[n+2])}function A(t,e){t.push(e[0]),t.push(e[1]),t.push(e[2])}function z(t,r,a,s){o(F,t.quaternion),i(M,r,t.center),c(M,M,F);const m=t.halfSize,h=8*((M[0]<-m[0]?-1:M[0]>m[0]?1:0)+3*(M[1]<-m[1]?-1:M[1]>m[1]?1:0)+9*(M[2]<-m[2]?-1:M[2]>m[2]?1:0)+13),b=P[h];if(0===b)return b;e(D,t.quaternion),n(D,D,t.halfSize);const p=(e,n)=>{const r=P[h+n+1];return l(e,((1&r)<<1)-1,(2&r)-1,((4&r)>>1)-1),f(e,e,D),u(e,t.center,e)};return a.length=0,A(a,p(N,0)),A(a,p(B,1)),A(a,p(M,2)),A(a,p(C,3)),s(a),1===b?b:(a.length=0,A(a,N),A(a,C),A(a,p(M,4)),A(a,p(E,5)),s(a),2===b||(a.length=0,A(a,N),A(a,E),A(a,p(M,6)),A(a,B),s(a)),b)}const P=(()=>{const t=new Array(216);let e=0;const n=n=>{for(let r=0;r<n.length;r++)t[e+r]=n[r];e+=8};return n([3,0,6,2,3,1,5,4]),n([2,0,2,3,1,5,4,0]),n([3,1,0,2,3,7,5,4]),n([2,0,1,3,2,6,4,0]),n([1,0,1,3,2,0,0,0]),n([2,1,5,7,3,2,0,0]),n([3,2,0,1,3,7,6,4]),n([2,2,0,1,3,7,6,0]),n([3,3,0,1,5,7,6,2]),n([2,0,1,5,4,6,2,0]),n([1,0,1,5,4,0,0,0]),n([2,1,3,7,5,4,0,0]),n([1,0,2,6,4,0,0,0]),n([0,0,0,0,0,0,0,0]),n([1,1,3,7,5,0,0,0]),n([2,2,3,7,6,4,0,0]),n([1,2,3,7,6,0,0,0]),n([2,3,1,5,7,6,2,0]),n([3,4,0,1,5,7,6,2]),n([2,5,7,6,4,0,1,0]),n([3,5,0,1,3,7,6,4]),n([2,4,5,7,6,2,0,0]),n([1,4,5,7,6,0,0,0]),n([2,5,1,3,7,6,4,0]),n([3,6,0,2,3,7,5,4]),n([2,6,2,3,7,5,4,0]),n([3,7,6,2,3,1,5,4]),t})(),R=4;function S(t,e){let n=0;for(let r=0;r<R;r++){const o=t.intersectPlane(e[r]);if(o>0)return-1;0===o&&(n|=1<<r)}return n}const D=r(),F=a(),M=b(),N=b(),B=b(),C=b(),E=b();export{j as computeDepthRange};
5
+ import t from"../../../../../core/PooledArray.js";import{fromQuat as e,scale as n}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{conjugate as o}from"../../../../../core/libs/gl-matrix-2/math/quat.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{e as s,a as i,v as c,i as l,o as f,f as u,m,c as h}from"../../../../../chunks/vec32.js";import{create as b}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{signedDistance as p}from"../../../../../geometry/support/plane.js";import{DepthRange as g}from"../../lib/DepthRange.js";function j(t,e){const n=new g,{eye:r,frustum:o,viewForward:a}=t;e.forAll((t=>{const e=null!=t.offsetObb?t.offsetObb:t.obb,c=s(i(M,e.center,r),a),l=e.projectedRadius(a);if(n.within(c-l)&&n.within(c+l))return;const f=S(e,o);if(-1===f)return;if(0===f)return w.far=c+l,w.near=c-l,void n.union(w);const u=d.pushNew();u.near=c-l,u.far=c+l,u.mask=f,u.object=t}));for(let c=0;c<d.length;c++){const t=d.data[c];if(n.within(t.near)&&n.within(t.far))continue;w.far=t.far,w.near=1/0;const e=z(null!=t.object.offsetObb?t.object.offsetObb:t.object.obb,r,k,(e=>{let n=q;for(let r=0;r<R&&e.length>0;r++){if(!(t.mask&1<<r))continue;y(o[r],e,n);const a=e;e=n,n=a}for(let t=0;t<e.length;t+=3){l(x,e.data[t],e.data[t+1],e.data[t+2]);const n=s(i(x,x,r),a);w.near=Math.min(w.near,n)}}));0===e&&(w.near=0),n.union(w)}return d.length=0,n}const d=new t({allocator:t=>t||{near:1/0,far:-1/0,mask:0,object:null},deallocator:t=>(t.object=null,t)}),w=new g,x=b(),v=b(),k=new t({deallocator:null}),q=new t({deallocator:null});function y(t,e,n){n.length=0;const r=e.length-3;O(x,e,r);const o=p(t,x);o<=0&&(n.push(x[0]),n.push(x[1]),n.push(x[2]));let a=0,s=o;for(;a<r;a+=3){O(v,e,a);const r=p(t,v);if(s*r<0){m(x,v,x,r/(r-s)),A(n,x)}r<=0&&A(n,v),s=r,h(x,v)}if(s*o<0){O(v,e,r);m(x,v,x,o/(o-s)),A(n,x)}}function O(t,e,n){return l(t,e.data[n],e.data[n+1],e.data[n+2])}function A(t,e){t.push(e[0]),t.push(e[1]),t.push(e[2])}function z(t,r,a,s){o(F,t.quaternion),i(M,r,t.center),c(M,M,F);const m=t.halfSize,h=8*((M[0]<-m[0]?-1:M[0]>m[0]?1:0)+3*(M[1]<-m[1]?-1:M[1]>m[1]?1:0)+9*(M[2]<-m[2]?-1:M[2]>m[2]?1:0)+13),b=P[h];if(0===b)return b;e(D,t.quaternion),n(D,D,t.halfSize);const p=(e,n)=>{const r=P[h+n+1];return l(e,((1&r)<<1)-1,(2&r)-1,((4&r)>>1)-1),f(e,e,D),u(e,t.center,e)};return a.length=0,A(a,p(N,0)),A(a,p(B,1)),A(a,p(M,2)),A(a,p(C,3)),s(a),1===b?b:(a.length=0,A(a,N),A(a,C),A(a,p(M,4)),A(a,p(E,5)),s(a),2===b||(a.length=0,A(a,N),A(a,E),A(a,p(M,6)),A(a,B),s(a)),b)}const P=(()=>{const t=new Array(216);let e=0;const n=n=>{for(let r=0;r<n.length;r++)t[e+r]=n[r];e+=8};return n([3,0,6,2,3,1,5,4]),n([2,0,2,3,1,5,4,0]),n([3,1,0,2,3,7,5,4]),n([2,0,1,3,2,6,4,0]),n([1,0,1,3,2,0,0,0]),n([2,1,5,7,3,2,0,0]),n([3,2,0,1,3,7,6,4]),n([2,2,0,1,3,7,6,0]),n([3,3,0,1,5,7,6,2]),n([2,0,1,5,4,6,2,0]),n([1,0,1,5,4,0,0,0]),n([2,1,3,7,5,4,0,0]),n([1,0,2,6,4,0,0,0]),n([0,0,0,0,0,0,0,0]),n([1,1,3,7,5,0,0,0]),n([2,2,3,7,6,4,0,0]),n([1,2,3,7,6,0,0,0]),n([2,3,1,5,7,6,2,0]),n([3,4,0,1,5,7,6,2]),n([2,5,7,6,4,0,1,0]),n([3,5,0,1,3,7,6,4]),n([2,4,5,7,6,2,0,0]),n([1,4,5,7,6,0,0,0]),n([2,5,1,3,7,6,4,0]),n([3,6,0,2,3,7,5,4]),n([2,6,2,3,7,5,4,0]),n([3,7,6,2,3,1,5,4]),t})(),R=4;function S(t,e){let n=0;for(let r=0;r<R;r++){const o=t.intersectPlane(e[r]);if(o>0)return-1;0===o&&(n|=1<<r)}return n}const D=r(),F=a(),M=b(),N=b(),B=b(),C=b(),E=b();export{j as computeDepthRange};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as t}from"../../../../../core/mathUtils.js";import{fromValues as e}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{createUintArray as n}from"../../lib/triangleIntersectionUtils.js";class i{constructor(t,n){this.elementCount=t,this.model=n,this._elementIndexMap=null,this._bspNodes=[],this._generatedBVH=!1,this.localMode=n.localMode,this.planetCenterZ=n.planetCenterZ,this.geometryMinZ=n.geometryMinZ,this.planetCenter=e(0,0,this.planetCenterZ),this.maxBspNodeDepth=n.maxBspNodeDepth??8,this.minElementCountForBVH=n.minElementCountForBVH??15,this.minBspNodeElementCount=n.minBspNodeElementCount??5}get elementIndexMap(){return this._ensureBVH(),this._elementIndexMap}get _skipBVH(){return this.elementCount<this.minElementCountForBVH||this.geometryMinZ<.5*this.planetCenterZ}_ensureBVH(){this._generatedBVH||this._skipBVH||0===this._bspNodes.length&&this._generateBsp()}intersectRay(t,e,n){this.elementCount<1||(this._skipBVH?this._intersectRayWithoutBVH(n):this._intersectRayWithBVH(t,e,n))}_intersectRayWithoutBVH(t){this._intersectRange(0,this.elementCount)}_intersectRange(t,e){this.model.intersectRange(t,e)}_intersectRayWithBVH(t,e,n){this._ensureBVH(),n?this._intersectGeometryWithBVHVerticalRay(t):this._intersectGeometryWithBVHGeneralRay(t,e)}_intersectGeometryWithBVHVerticalRay(t){let e=t[0],n=t[1];if(!this.localMode){const{geometryMinZ:i,planetCenterZ:s}=this,h=(i-s)/(t[2]-s);e=t[0]*h,n=t[1]*h}const{_bspNodes:i}=this;let s=0;for(;s>=0;){const t=i[s],{d:h,dim:a,minIndexIndex:o,minMidIndexIndex:r,maxMidIndexIndex:c,maxIndexIndex:m,aabb2D:l}=t;if(e<l[0]||e>l[2]||n<l[1]||n>l[3])break;if(-1===a||-1===t.child0&&-1===t.child1){this._intersectRange(o,m);break}{this._intersectRange(r,c);const i=(0===a?e:n)-h;if(i<0){if(-1===t.child0){this._intersectRange(o,r);break}s=t.child0}else{if(!(i>0))break;if(-1===t.child1){this._intersectRange(c,m);break}s=t.child1}}}}_intersectGeometryWithBVHGeneralRay(e,n){let i=e[0],s=e[1],h=n[0],a=n[1];const{geometryMinZ:o}=this;if(!this.localMode){let t=0,r=1;const c=Math.min(.5*this.planetCenterZ,o),m=e[2],l=n[2];if(m<c&&l<c)return;if(m<c&&(t=(c-m)/(l-m)),l<c&&(r=(c-m)/(l-m)),t>r)return;const d=(1-t)*e[0]+t*n[0],M=(1-t)*e[1]+t*n[1],x=(1-t)*e[2]+t*n[2],u=(1-r)*e[0]+r*n[0],p=(1-r)*e[1]+r*n[1],f=(1-r)*e[2]+r*n[2],{planetCenterZ:_}=this,g=o-_,I=g/(x-_);i=d*I,s=M*I;const B=g/(f-_);h=u*B,a=p*B}const r=h-i,c=a-s,m=this._bspNodes;let l=1;{const{aabb2D:t}=m[0],e=(t,e,n,i)=>{if(Math.abs(e)<1e-5*Math.max(i-n,1))return!1;const s=e>0,h=s?i:n,a=t+l*e;return(s?a<h:a>h)&&(l=Math.max((h-t)/e,l),!0)},n=()=>e(i,r,t[0],t[2]),h=()=>e(s,c,t[1],t[3]);Math.abs(r)>=Math.abs(c)?n()||h():h()||n()}const d=[0,0,l];let M=0;for(;M<d.length;){const e=d[M];let n=d[M+1],h=d[M+2];if(M+=3,n>h)continue;const a=m[e],{minIndexIndex:o,maxIndexIndex:x}=a,{child0:u,child1:p,minMidIndexIndex:f,maxMidIndexIndex:_,aabb2D:g,d:I,dim:B}=a;{const t=i+n*r,e=i+h*r,s=Math.min(t,e),a=Math.max(t,e),o=g[0],c=g[2];if(a<o||c<s)continue;if(s<o){const t=(o-i)/r;r>0?n=Math.max(n,t):h=Math.min(h,t)}if(c<a){const t=(c-i)/r;r>0?h=Math.min(h,t):n=Math.max(n,t)}}{const t=s+n*c,e=s+h*c,i=Math.min(t,e),a=Math.max(t,e),o=g[1],r=g[3];if(a<o||r<i)continue;if(i<o){const t=(o-s)/c;c>0?n=Math.max(n,t):h=Math.min(h,t)}if(r<a){const t=(r-s)/c;c>0?h=Math.min(h,t):n=Math.max(n,t)}}if(-1===u&&-1===p)this._intersectRange(o,x);else{const e=0===B?i:s,a=0===B?r:c,m=e+n*a,M=e+h*a,g=Math.min(m,M),b=Math.max(m,M),V=t((I-e)/a,0,l);o<f&&g<=I&&(-1!==u?(d.push(u),d.push(a>=0?n:Math.max(n,V)),d.push(a>=0?Math.min(h,V):h)):this._intersectRange(o,f)),this._intersectRange(f,_),_<x&&I<=b&&(-1!==p?(d.push(p),d.push(a>=0?Math.max(n,V):n),d.push(a>=0?h:Math.min(h,V))):this._intersectRange(_,x))}}}_generateBsp(){const{elementCount:t}=this;if(t<1)return;const e=n(t,t);this._elementIndexMap=e;for(let n=0;n<t;++n)e[n]=n;const i=this.model.getAabbs2D();let o=0;const m=this._bspNodes;m.length=0;const{localMode:l}=this;let d=!1;if(!l){const{planetCenterZ:t,geometryMinZ:e}=this;d=t>=0||e<.5*t}const M=[],x=(t,e,n,i,s)=>{M.push(t),M.push(e),M.push(n),M.push(i<0?-1:(s?0:1)+2*i)},{maxBspNodeDepth:u,minBspNodeElementCount:p}=this,f=(t,n,o,M,f)=>{const _=m.length;if(_>0&&(d||o>=u||n-t<p))return;const g=[0,0,0,0];r(g,t,n,e,i);const{d:I,dim:B}=l?s(g):h(g),{rangeMidStart:b,rangeMidEnd:V}=a(t,n,B,I,e,i),C=o===u-1,H=!C&&b>=t+p,R=!C&&n>=V+p;if(H||R||0===_){const e=new c(t,b,V,n,B,I,g);if(H&&x(t,b,o+1,_,!0),R&&x(V,n,o+1,_,!1),m.push(e),-1!==M){const t=m[M];f?t.child0=_:t.child1=_}}};for(x(0,t,0,-1,!1);o<M.length;){const t=M[o],e=M[o+1],n=M[o+2],i=M[o+3];o+=4;const s=i>>1;f(t,e,n,s,i-(s<<1)==0)}this._generatedBVH=!0}}function s(t){const e=t[0],n=t[1],i=t[2],s=t[3];let h,a;return i-e>=s-n?(a=.5*(e+i),h=0):(a=.5*(n+s),h=1),{d:a,dim:h}}function h(t){const e=t[0],n=t[1],i=t[2],s=t[3];let h,a;return i-e>=s-n?(h=0,a=.5*(e+i)):(h=1,a=.5*(n+s)),{dim:h,d:a}}function a(t,e,n,i,s,h){let a=t;{let t=e;for(;a<t;){const e=s[a];o(e,n,i,h)<0?++a:(--t,s[a]=s[t],s[t]=e)}}const r=a;let c=a,m=e;for(;c<m;){const t=s[m-1];o(t,n,i,h)>0?--m:(s[m-1]=s[c],s[c]=t,++c)}return{rangeMidStart:r,rangeMidEnd:m}}function o(t,e,n,i){const s=4*t,h=i[s+0+e];return i[s+2+e]<n?-1:h>n?1:0}function r(t,e,n,i,s){let h=1/0,a=1/0,o=-1/0,r=-1/0;for(let c=e;c<n;++c){const t=4*i[c];h=Math.min(h,s[t+0]),a=Math.min(a,s[t+1]),o=Math.max(o,s[t+2]),r=Math.max(r,s[t+3])}t[0]=h,t[1]=a,t[2]=o,t[3]=r}class c{constructor(t,e,n,i,s,h,a){this.minIndexIndex=t,this.minMidIndexIndex=e,this.maxMidIndexIndex=n,this.maxIndexIndex=i,this.dim=s,this.d=h,this.aabb2D=a,this.child0=-1,this.child1=-1}}export{i as ElevationAgnosticBVH};
5
+ import{clamp as t}from"../../../../../core/mathUtils.js";import{fromValues as e}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as n}from"../../../../../geometry/support/aaBoundingRect.js";import{createUintArray as i}from"../../lib/triangleIntersectionUtils.js";class s{constructor(t,n){this.elementCount=t,this.model=n,this._elementIndexMap=null,this._bspNodes=[],this._generatedBVH=!1,this.localMode=n.localMode,this.planetCenterZ=n.planetCenterZ,this.geometryMinZ=n.geometryMinZ,this.planetCenter=e(0,0,this.planetCenterZ),this.maxBspNodeDepth=n.maxBspNodeDepth??8,this.minElementCountForBVH=n.minElementCountForBVH??15,this.minBspNodeElementCount=n.minBspNodeElementCount??5}get elementIndexMap(){return this._ensureBVH(),this._elementIndexMap}get _skipBVH(){return this.elementCount<this.minElementCountForBVH||this.geometryMinZ<.5*this.planetCenterZ}_ensureBVH(){this._generatedBVH||this._skipBVH||0===this._bspNodes.length&&this._generateBsp()}intersectRay(t,e,n){this.elementCount<1||(this._skipBVH?this._intersectRayWithoutBVH(n):this._intersectRayWithBVH(t,e,n))}_intersectRayWithoutBVH(t){this._intersectRange(0,this.elementCount)}_intersectRange(t,e){this.model.intersectRange(t,e)}_intersectRayWithBVH(t,e,n){this._ensureBVH(),n?this._intersectGeometryWithBVHVerticalRay(t):this._intersectGeometryWithBVHGeneralRay(t,e)}_intersectGeometryWithBVHVerticalRay(t){let e=t[0],n=t[1];if(!this.localMode){const{geometryMinZ:i,planetCenterZ:s}=this,h=(i-s)/(t[2]-s);e=t[0]*h,n=t[1]*h}const{_bspNodes:i}=this;let s=0;for(;s>=0;){const t=i[s],{d:h,dim:a,minIndexIndex:o,minMidIndexIndex:r,maxMidIndexIndex:c,maxIndexIndex:m,aabb2D:d}=t;if(e<d[0]||e>d[2]||n<d[1]||n>d[3])break;if(-1===a||-1===t.child0&&-1===t.child1){this._intersectRange(o,m);break}{this._intersectRange(r,c);const i=(0===a?e:n)-h;if(i<0){if(-1===t.child0){this._intersectRange(o,r);break}s=t.child0}else{if(!(i>0))break;if(-1===t.child1){this._intersectRange(c,m);break}s=t.child1}}}}_intersectGeometryWithBVHGeneralRay(e,n){let i=e[0],s=e[1],h=n[0],a=n[1];const{geometryMinZ:o}=this;if(!this.localMode){let t=0,r=1;const c=Math.min(.5*this.planetCenterZ,o),m=e[2],d=n[2];if(m<c&&d<c)return;if(m<c&&(t=(c-m)/(d-m)),d<c&&(r=(c-m)/(d-m)),t>r)return;const l=(1-t)*e[0]+t*n[0],M=(1-t)*e[1]+t*n[1],u=(1-t)*e[2]+t*n[2],x=(1-r)*e[0]+r*n[0],p=(1-r)*e[1]+r*n[1],f=(1-r)*e[2]+r*n[2],{planetCenterZ:g}=this,_=o-g,B=_/(u-g);i=l*B,s=M*B;const I=_/(f-g);h=x*I,a=p*I}const r=h-i,c=a-s,m=this._bspNodes;let d=1;{const{aabb2D:t}=m[0],e=(t,e,n,i)=>{if(Math.abs(e)<1e-5*Math.max(i-n,1))return!1;const s=e>0,h=s?i:n,a=t+d*e;return(s?a<h:a>h)&&(d=Math.max((h-t)/e,d),!0)},n=()=>e(i,r,t[0],t[2]),h=()=>e(s,c,t[1],t[3]);Math.abs(r)>=Math.abs(c)?n()||h():h()||n()}const l=[0,0,d];let M=0;for(;M<l.length;){const e=l[M];let n=l[M+1],h=l[M+2];if(M+=3,n>h)continue;const a=m[e],{minIndexIndex:o,maxIndexIndex:u}=a,{child0:x,child1:p,minMidIndexIndex:f,maxMidIndexIndex:g,aabb2D:_,d:B,dim:I}=a;{const t=i+n*r,e=i+h*r,s=Math.min(t,e),a=Math.max(t,e),o=_[0],c=_[2];if(a<o||c<s)continue;if(s<o){const t=(o-i)/r;r>0?n=Math.max(n,t):h=Math.min(h,t)}if(c<a){const t=(c-i)/r;r>0?h=Math.min(h,t):n=Math.max(n,t)}}{const t=s+n*c,e=s+h*c,i=Math.min(t,e),a=Math.max(t,e),o=_[1],r=_[3];if(a<o||r<i)continue;if(i<o){const t=(o-s)/c;c>0?n=Math.max(n,t):h=Math.min(h,t)}if(r<a){const t=(r-s)/c;c>0?h=Math.min(h,t):n=Math.max(n,t)}}if(-1===x&&-1===p)this._intersectRange(o,u);else{const e=0===I?i:s,a=0===I?r:c,m=e+n*a,M=e+h*a,_=Math.min(m,M),b=Math.max(m,M),V=t((B-e)/a,0,d);o<f&&_<=B&&(-1!==x?(l.push(x),l.push(a>=0?n:Math.max(n,V)),l.push(a>=0?Math.min(h,V):h)):this._intersectRange(o,f)),this._intersectRange(f,g),g<u&&B<=b&&(-1!==p?(l.push(p),l.push(a>=0?Math.max(n,V):n),l.push(a>=0?h:Math.min(h,V))):this._intersectRange(g,u))}}}_generateBsp(){const{elementCount:t}=this;if(t<1)return;const e=i(t,t);this._elementIndexMap=e;for(let n=0;n<t;++n)e[n]=n;const s=this.model.getAabbs2D();let r=0;const d=this._bspNodes;d.length=0;const{localMode:l}=this;let M=!1;if(!l){const{planetCenterZ:t,geometryMinZ:e}=this;M=t>=0||e<.5*t}const u=[],x=(t,e,n,i,s)=>{u.push(t),u.push(e),u.push(n),u.push(i<0?-1:(s?0:1)+2*i)},{maxBspNodeDepth:p,minBspNodeElementCount:f}=this,g=(t,i,r,u,g)=>{const _=d.length;if(_>0&&(M||r>=p||i-t<f))return;const B=n();c(B,t,i,e,s);const{d:I,dim:b}=l?h(B):a(B),{rangeMidStart:V,rangeMidEnd:R}=o(t,i,b,I,e,s),y=r===p-1,C=!y&&V>=t+f,H=!y&&i>=R+f;if(C||H||0===_){const e=new m(t,V,R,i,b,I,B);if(C&&x(t,V,r+1,_,!0),H&&x(R,i,r+1,_,!1),d.push(e),-1!==u){const t=d[u];g?t.child0=_:t.child1=_}}};for(x(0,t,0,-1,!1);r<u.length;){const t=u[r],e=u[r+1],n=u[r+2],i=u[r+3];r+=4;const s=i>>1;g(t,e,n,s,i-(s<<1)==0)}this._generatedBVH=!0}}function h(t){const e=t[0],n=t[1],i=t[2],s=t[3];let h,a;return i-e>=s-n?(a=.5*(e+i),h=0):(a=.5*(n+s),h=1),{d:a,dim:h}}function a(t){const e=t[0],n=t[1],i=t[2],s=t[3];let h,a;return i-e>=s-n?(h=0,a=.5*(e+i)):(h=1,a=.5*(n+s)),{dim:h,d:a}}function o(t,e,n,i,s,h){let a=t;{let t=e;for(;a<t;){const e=s[a];r(e,n,i,h)<0?++a:(--t,s[a]=s[t],s[t]=e)}}const o=a;let c=a,m=e;for(;c<m;){const t=s[m-1];r(t,n,i,h)>0?--m:(s[m-1]=s[c],s[c]=t,++c)}return{rangeMidStart:o,rangeMidEnd:m}}function r(t,e,n,i){const s=4*t,h=i[s+0+e];return i[s+2+e]<n?-1:h>n?1:0}function c(t,e,n,i,s){let h=1/0,a=1/0,o=-1/0,r=-1/0;for(let c=e;c<n;++c){const t=4*i[c];h=Math.min(h,s[t+0]),a=Math.min(a,s[t+1]),o=Math.max(o,s[t+2]),r=Math.max(r,s[t+3])}t[0]=h,t[1]=a,t[2]=o,t[3]=r}class m{constructor(t,e,n,i,s,h,a){this.minIndexIndex=t,this.minMidIndexIndex=e,this.maxMidIndexIndex=n,this.maxIndexIndex=i,this.dim=s,this.d=h,this.aabb2D=a,this.child0=-1,this.child1=-1}}export{s as ElevationAgnosticBVH};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{invert as t,transpose as s}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as e}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{a as n,q as i,v as o}from"../../../../../chunks/vec32.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newFloatArray as r}from"../../../../../geometry/support/FloatArray.js";import{compactIndices as h,getContinuousIndexArray as m}from"../../../../../geometry/support/Indices.js";import{ViewingMode as p}from"../../../../ViewingMode.js";import{ComponentObjectElevationAgnosticComponentBVH as c}from"./ComponentObjectElevationAgnosticComponentBVH.js";class b{constructor(t,s,e){this.viewingMode=t,this.positionData=s,this._components=e,this.verticalOffset=null,this.componentVerticalOffsets=null,this._planetCenter=a(),this._componentBvh=null,this._aabb=[0,0,0,0,0,0],this._indices=s.indices?h(s.indices):m(s.positions.length/3),this._positions=s.positions}destroy(){this._positions=null,this._indices=null,this._perComponentAabbs=null,this._componentBvh=null}getComponentAabb(t,s){const e=this._ensureComponentAabbs(),n=6*t;return s[0]=e[n],s[1]=e[n+1],s[2]=e[n+2],s[3]=e[n+3],s[4]=e[n+4],s[5]=e[n+5],s}getComponentAabbs(){return this._ensureComponentAabbs()}_ensureComponentAabbs(){return this._perComponentAabbs||(this._perComponentAabbs=this._computePerComponentAabbs()),this._perComponentAabbs}getComponentPositions(t,s){s.indices=this._indices,s.data=this._positions,s.stride=3,s.startIndex=this._components.offsets[t],s.endIndex=this._components.offsets[t+1]}intersect(e,a,r,h,m,c,b,d){this.verticalOffset=h,this.componentVerticalOffsets=m;const{position:C}=c,M=n(l,e,C),A=n(_,a,C),v=t(u,c.rotationScale);i(M,M,v),i(A,A,v);const x=s(g,v);if(this.viewingMode===p.Global){const t=this._planetCenter;o(t,C),i(t,t,v)}const j=(t,s,e,n)=>{d(e,t,n?i(f,n,x):null,s)};this._intersectComponents(M,A,m,h,j,r,b)}_computePerComponentAabbs(){const t=this._aabb,s=.5*(t[0]+t[3]),e=.5*(t[1]+t[4]),n=.5*(t[2]+t[5]),i=this._components.count,o=r(6*i),a=this._indices,h=this._positions,m=this._components.offsets;let p=0,c=1/0,b=1/0,l=1/0,_=-1/0,u=-1/0,f=-1/0;for(let r=0;r<i;r++){const t=m[r],i=m[r+1];let g=1/0,d=1/0,C=1/0,M=-1/0,A=-1/0,v=-1/0;if(t<i)for(let s=t;s<i;s++){const t=3*a[s],e=h[t],n=h[t+1],i=h[t+2];g=Math.min(g,e),d=Math.min(d,n),C=Math.min(C,i),M=Math.max(M,e),A=Math.max(A,n),v=Math.max(v,i)}else g=s,d=e,C=n,M=s,A=e,v=n;o[p++]=g,o[p++]=d,o[p++]=C,o[p++]=M,o[p++]=A,o[p++]=v,c=Math.min(c,g),b=Math.min(b,d),l=Math.min(l,C),_=Math.max(_,M),u=Math.max(u,A),f=Math.max(f,v)}return this._aabb[0]=c,this._aabb[1]=b,this._aabb[2]=l,this._aabb[3]=_,this._aabb[4]=u,this._aabb[5]=f,o}_intersectComponents(t,s,e,n,i,o,a){let r=this._componentBvh;null==r&&(r=new c(this._positions,3,this._indices,this._components,this._ensureComponentAabbs(),this.geometryMinZ,this.planetCenterZ,this.localMode),this._componentBvh=r),r.intersectRay(t,s,e,n,i,o,a)}get geometryMinZ(){return this._aabb[2]}get planetCenterZ(){return this._planetCenter[2]}get numTriangles(){return this._indices.length/3}get localMode(){return this.viewingMode===p.Local}get positions(){return this._positions}get indices(){return this._indices}get aabb(){return this._ensureComponentAabbs(),this._aabb}}const l=a(),_=a(),u=e(),f=a(),g=e();export{b as IntersectionGeometry};
5
+ import{invert as t,transpose as s}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as e}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{a as n,o,u as i}from"../../../../../chunks/vec32.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as r}from"../../../../../geometry/support/aaBoundingBox.js";import{newFloatArray as h}from"../../../../../geometry/support/FloatArray.js";import{compactIndices as m,getContinuousIndexArray as p}from"../../../../../geometry/support/Indices.js";import{ViewingMode as c}from"../../../../ViewingMode.js";import{ComponentObjectElevationAgnosticComponentBVH as b}from"./ComponentObjectElevationAgnosticComponentBVH.js";class l{constructor(t,s,e){this.viewingMode=t,this.positionData=s,this._components=e,this.verticalOffset=null,this.componentVerticalOffsets=null,this._planetCenter=a(),this._componentBvh=null,this._aabb=r(),this._indices=s.indices?m(s.indices):p(s.positions.length/3),this._positions=s.positions}destroy(){this._positions=null,this._indices=null,this._perComponentAabbs=null,this._componentBvh=null}getComponentAabb(t,s){const e=this._ensureComponentAabbs(),n=6*t;return s[0]=e[n],s[1]=e[n+1],s[2]=e[n+2],s[3]=e[n+3],s[4]=e[n+4],s[5]=e[n+5],s}getComponentAabbs(){return this._ensureComponentAabbs()}_ensureComponentAabbs(){return this._perComponentAabbs||(this._perComponentAabbs=this._computePerComponentAabbs()),this._perComponentAabbs}getComponentPositions(t,s){s.indices=this._indices,s.data=this._positions,s.stride=3,s.startIndex=this._components.offsets[t],s.endIndex=this._components.offsets[t+1]}intersect(e,a,r,h,m,p,b,l){this.verticalOffset=h,this.componentVerticalOffsets=m;const{position:C}=p,M=n(_,e,C),A=n(u,a,C),x=t(f,p.rotationScale);o(M,M,x),o(A,A,x);const v=s(d,x);if(this.viewingMode===c.Global){const t=this._planetCenter;i(t,C),o(t,t,x)}const j=(t,s,e,n)=>{l(e,t,n?o(g,n,v):null,s)};this._intersectComponents(M,A,m,h,j,r,b)}_computePerComponentAabbs(){const t=this._aabb,s=.5*(t[0]+t[3]),e=.5*(t[1]+t[4]),n=.5*(t[2]+t[5]),o=this._components.count,i=h(6*o),a=this._indices,r=this._positions,m=this._components.offsets;let p=0,c=1/0,b=1/0,l=1/0,_=-1/0,u=-1/0,f=-1/0;for(let h=0;h<o;h++){const t=m[h],o=m[h+1];let g=1/0,d=1/0,C=1/0,M=-1/0,A=-1/0,x=-1/0;if(t<o)for(let s=t;s<o;s++){const t=3*a[s],e=r[t],n=r[t+1],o=r[t+2];g=Math.min(g,e),d=Math.min(d,n),C=Math.min(C,o),M=Math.max(M,e),A=Math.max(A,n),x=Math.max(x,o)}else g=s,d=e,C=n,M=s,A=e,x=n;i[p++]=g,i[p++]=d,i[p++]=C,i[p++]=M,i[p++]=A,i[p++]=x,c=Math.min(c,g),b=Math.min(b,d),l=Math.min(l,C),_=Math.max(_,M),u=Math.max(u,A),f=Math.max(f,x)}return this._aabb[0]=c,this._aabb[1]=b,this._aabb[2]=l,this._aabb[3]=_,this._aabb[4]=u,this._aabb[5]=f,i}_intersectComponents(t,s,e,n,o,i,a){let r=this._componentBvh;null==r&&(r=new b(this._positions,3,this._indices,this._components,this._ensureComponentAabbs(),this.geometryMinZ,this.planetCenterZ,this.localMode),this._componentBvh=r),r.intersectRay(t,s,e,n,o,i,a)}get geometryMinZ(){return this._aabb[2]}get planetCenterZ(){return this._planetCenter[2]}get numTriangles(){return this._indices.length/3}get localMode(){return this.viewingMode===c.Local}get positions(){return this._positions}get indices(){return this._indices}get aabb(){return this._ensureComponentAabbs(),this._aabb}}const _=a(),u=a(),f=e(),g=a(),d=e();export{l as IntersectionGeometry};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{invert as t,transpose as r}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as o}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{p as s,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as n}from"../../../../../../chunks/vec42.js";import{freeze as h,fromValues as u}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{EmissiveSourceMode as p}from"../../../../../../symbols/support/materialUtils.js";import{ColorMixModeEnum as c}from"../../../../layers/support/symbolColorUtils.js";import{OverlayContent as d}from"../../../../terrain/OverlayContent.js";import{ComponentTechnique as m}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as g,IntegratedMeshMode as f}from"./ComponentTechniqueConfiguration.js";import{ComponentDataType as x}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as v}from"./shader/VertexDiscardMode.js";import{parameter as M,parameterBlock as b,MaterialBase as y,MaterialParameterBlock as T}from"../../../core/material/MaterialBase.js";import{RenderPassIdentifier as O}from"../../../core/renderPasses/RenderPassIdentifier.js";import{ShaderOutput as C,isColorEmission as S}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as w}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as N}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as P}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as j}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as D}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{TwoVectorPosition as A}from"../../../core/util/TwoVectorPosition.js";import{AlphaDiscardMode as q,CullFaceOptions as R}from"../../../lib/basicInterfaces.js";import{OITPass as I}from"../../../lib/OITPass.js";import{advancedMRRFactors as E}from"../../../materials/pbrUtils.js";import{defaultHighlightName as F}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as B}from"../../../../../../webscene/support/AlphaCutoff.js";class W extends y{constructor(e,s){super(),this.toMapSpace=s,this.baseColor=h(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=E,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=1,this.emissiveSource=p.Emissive,this.commonMaterialParameters=new H,this.componentParameters=new V,this.objectOpacity=1,this.textureAlphaCutoff=B,this.alphaDiscardMode=q.Opaque,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=D.Earth,this.hasOccludees=!1;const i=new A(e.position),l=o(e.rotationScale);t(l,l),r(l,l),this.transformNormalGlobalFromModel=l,this.transformWorldFromModelTL=i.low,this.transformWorldFromModelTH=i.high,this.transformWorldFromModelRS=e.rotationScale}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get hasEmissions(){return null!=this.emissionTexture||!s(this.emissiveBaseColor,l)}get texture(){return this.baseColorTexture?.glTexture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.glTexture}get textureEmissive(){return this.emissionTexture?.glTexture}get textureOcclusion(){return this.occlusionTexture?.glTexture}get textureNormal(){return this.normalTexture?.glTexture}acquireTechnique(e,t,r,o){const s=new g(e.context.spherical);s.hasVertexColors=o.colors,s.hasNormals=o.hasNormals,s.textureCoordinateType=o.textureCoordinates,s.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,s.hasOcclusionTexture=null!=this.occlusionTexture,s.hasNormalTexture=null!=this.normalTexture,s.oitPass=t.identifier===O.Material&&null!=r.oitPass?r.oitPass:I.NONE,s.terrainDepthTest=t.identifier===O.Material&&r.terrainDepthTest,s.cullAboveTerrain=t.identifier===O.Material&&r.cullAboveTerrain,s.ellipsoidMode=this.ellipsoidMode,s.componentData=this.componentParameters.type,s.cullFace=this.commonMaterialParameters.cullFace,s.doubleSidedMode=this.commonMaterialParameters.doubleSided?P.View:P.None,s.hasColorTexture=null!=this.baseColorTexture;const i=this._computeWhichMaterialPass();if(s.blendingEnabled=i===k.Transparent||i===k.OpaqueAndTransparent,s.alphaDiscardMode=this.alphaDiscardMode,s.integratedMeshMode=this.isIntegratedMesh?G(r)?z(r)?f.ColorOverlayWithWater:f.ColorOverlay:f.NoOverlay:f.None,s.hasPolygonOffset=this.polygonOffsetEnabled,s.pbrMode=s.integratedMeshMode===f.ColorOverlayWithWater?j.WaterOnIntegratedMesh:this.usePBR?this.hasParametersFromSource?o.shadeNormals&&this.isIntegratedMesh?j.Disabled:j.Schematic:j.Normal:j.Disabled,s.emissionSource=this.hasEmissions?null!=this.emissionTexture?N.Texture:s.pbrMode===j.Normal?N.SymbolColor:N.None:N.None,s.shadeNormals=o.shadeNormals,s.normalType=s.hasNormals?w.Compressed:w.ScreenDerivative,s.hasSlicePlane=null!=r.slicePlane&&this.commonMaterialParameters.hasSlicePlane,s.receiveAmbientOcclusion=s.hasOccludees=s.receiveShadows=s.screenSpaceReflections=s.cloudReflections=s.hasHighlightMixTexture=!1,t.identifier===O.ShadowMap)s.output=C.Shadow,s.vertexDiscardMode=v.None;else if(t.identifier===O.ViewshedShadowMap)s.output=C.ViewshedShadow,s.vertexDiscardMode=v.None;else if(t.identifier===O.Highlight)s.output=C.Highlight,s.vertexDiscardMode=v.None,s.hasHighlightMixTexture=null!=r.highlightMixTexture;else{switch(i===k.OpaqueAndTransparent?s.vertexDiscardMode=t.transparent?v.Opaque:v.Transparent:s.vertexDiscardMode=v.None,s.hasBloom=S(t.output),s.output=t.output,t.output){case C.Color:case C.ColorEmission:s.receiveAmbientOcclusion=o.applySSAO&&null!=r.ssao?.getTexture(),s.hasOccludees=r.hasOccludees,s.receiveShadows=r.shadowMap.ready,s.screenSpaceReflections=null!=r.ssr.lastFrameColor,s.cloudReflections=null!=r.clouds.data?.cubeMap?.colorTexture;break;case C.ObjectAndLayerIdColor:s.objectAndLayerIdColor=!0}s.snowCover=r.snowCover}const a=e.get(m,s);return this._setClean(),a}submit(e,t,r){if(this.objectOpacity<=0)return;const{componentData:o,renderable:s}=r,{geometry:i}=s,a=s.meta.cameraDepthSquared;o.updateHighlights(t.highlights);const{geometryRanges:l,highlightRangesMap:n,shadowmapRanges:h}=o;switch(this._computeWhichMaterialPass()){case k.Opaque:e.opaque.submitDraw(this,i,l,a);break;case k.Transparent:e.transparent.submitDraw(this,i,l,a);break;case k.OpaqueAndTransparent:e.opaque.submitDraw(this,i,l,a),e.transparent.submitDraw(this,i,l,a);break;case k.IntegratedMesh:e.integratedMesh.submitDraw(this,i,l,a),U(t)&&e.highlightIntegratedMesh.submitDraw(this,i,l,a)}if(this.componentParameters.castShadows!==L.None){if(null!=n)for(const t of n)t[0]===F&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=h&&e.defaultShadowMap.submitDraw(this,i,h,a),e.shadowMap.submitDraw(this,i,l,a)}if(null!=n)for(const u of n)e.highlight.submitDraw(this,i,u[1],a,u[0]);t.viewshedEnabled&&e.viewshedShadowMap.submitDraw(this,i,l,a)}_computeWhichMaterialPass(){if(this.isIntegratedMesh)return k.IntegratedMesh;if(this.objectOpacity<1)return k.Transparent;if(this.componentParameters.opaqueOverride===L.All)return k.Opaque;if(this.baseColor[3]<1||this.alphaDiscardMode===q.Blend||this.alphaDiscardMode===q.MaskBlend)return k.Transparent;switch(this.componentParameters.transparent){case L.None:return k.Opaque;case L.All:return k.Transparent;case L.Some:return k.OpaqueAndTransparent}}}var k,L;e([M({vectorOps:n})],W.prototype,"baseColor",void 0),e([M()],W.prototype,"usePBR",void 0),e([M()],W.prototype,"hasParametersFromSource",void 0),e([M({vectorOps:i})],W.prototype,"mrrFactors",void 0),e([M({dispose:!0})],W.prototype,"baseColorTexture",void 0),e([M({dispose:!0})],W.prototype,"metallicRoughnessTexture",void 0),e([M({dispose:!0})],W.prototype,"normalTexture",void 0),e([M({dispose:!0})],W.prototype,"occlusionTexture",void 0),e([M({dispose:!0})],W.prototype,"emissionTexture",void 0),e([M({vectorOps:i})],W.prototype,"emissiveBaseColor",void 0),e([M()],W.prototype,"emissiveStrength",void 0),e([M()],W.prototype,"emissiveSource",void 0),e([b()],W.prototype,"commonMaterialParameters",void 0),e([b()],W.prototype,"componentParameters",void 0),e([M()],W.prototype,"objectOpacity",void 0),e([M()],W.prototype,"textureAlphaCutoff",void 0),e([M()],W.prototype,"alphaDiscardMode",void 0),e([M()],W.prototype,"isIntegratedMesh",void 0),e([M()],W.prototype,"polygonOffsetEnabled",void 0),e([M()],W.prototype,"ellipsoidMode",void 0),e([M()],W.prototype,"hasOccludees",void 0),function(e){e[e.Opaque=0]="Opaque",e[e.Transparent=1]="Transparent",e[e.OpaqueAndTransparent=2]="OpaqueAndTransparent",e[e.IntegratedMesh=3]="IntegratedMesh"}(k||(k={}));class H extends T{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=R.Back,this.hasSlicePlane=!0}}e([M()],H.prototype,"doubleSided",void 0),e([M()],H.prototype,"cullFace",void 0),e([M()],H.prototype,"hasSlicePlane",void 0);class V extends T{constructor(){super(...arguments),this.externalColor=u(1,1,1,1),this.externalColorMixMode=c.Multiply,this.castShadows=L.All}get transparent(){return this.externalColor[3]<1?L.All:L.None}get opaqueOverride(){return this.externalColorMixMode===c.Replace&&1===this.externalColor[3]?L.All:L.None}get visible(){return this.externalColor[3]>0?L.All:L.None}get type(){return x.Uniform}}e([M({vectorOps:n})],V.prototype,"externalColor",void 0),e([M()],V.prototype,"externalColorMixMode",void 0),e([M()],V.prototype,"castShadows",void 0),function(e){e[e.All=0]="All",e[e.Some=1]="Some",e[e.None=2]="None"}(L||(L={}));class _ extends T{constructor(){super(...arguments),this.texture=null,this.transparent=L.None,this.opaqueOverride=L.None,this.castShadows=L.None}get type(){return x.Varying}}function U(e){return null!=e.overlay?.getTexture(d.Highlight)}function z(e){return null!=e.overlay?.getTexture(d.WaterNormal)}function G(e){return null!=e.overlay?.getTexture(d.ColorNoRasterImage)}e([M()],_.prototype,"texture",void 0),e([M()],_.prototype,"transparent",void 0),e([M()],_.prototype,"opaqueOverride",void 0),e([M()],_.prototype,"castShadows",void 0);export{H as CommonMaterialParameters,W as ComponentMaterial,L as ComponentParameterSummary,V as ComponentParametersUniform,_ as ComponentParametersVarying};
5
+ import{_ as e}from"../../../../../../chunks/tslib.es6.js";import{invert as t,transpose as r}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as o}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{q as s,I as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as l}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as n}from"../../../../../../chunks/vec42.js";import{freeze as h,fromValues as u}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{EmissiveSourceMode as p}from"../../../../../../symbols/support/materialUtils.js";import{ColorMixModeEnum as c}from"../../../../layers/support/symbolColorUtils.js";import{OverlayContent as d}from"../../../../terrain/OverlayContent.js";import{ComponentTechnique as m}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as g,IntegratedMeshMode as f}from"./ComponentTechniqueConfiguration.js";import{ComponentDataType as x}from"./shader/ComponentData.glsl.js";import{VertexDiscardMode as v}from"./shader/VertexDiscardMode.js";import{parameter as M,parameterBlock as b,MaterialBase as y,MaterialParameterBlock as T}from"../../../core/material/MaterialBase.js";import{RenderPassIdentifier as O}from"../../../core/renderPasses/RenderPassIdentifier.js";import{ShaderOutput as C,isColorEmission as S}from"../../../core/shaderLibrary/ShaderOutput.js";import{NormalType as w}from"../../../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as N}from"../../../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as P}from"../../../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as j}from"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{EllipsoidMode as D}from"../../../core/shaderLibrary/util/EllipsoidMode.js";import{TwoVectorPosition as q}from"../../../core/util/TwoVectorPosition.js";import{AlphaDiscardMode as A,CullFaceOptions as R}from"../../../lib/basicInterfaces.js";import{OITPass as I}from"../../../lib/OITPass.js";import{advancedMRRFactors as E}from"../../../materials/pbrUtils.js";import{defaultHighlightName as F}from"../../../../../support/HighlightDefaults.js";import{alphaCutoff as B}from"../../../../../../webscene/support/AlphaCutoff.js";class W extends y{constructor(e,s){super(),this.toMapSpace=s,this.baseColor=h(1,1,1,1),this.usePBR=!1,this.hasParametersFromSource=!1,this.mrrFactors=E,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.emissiveStrength=1,this.emissiveSource=p.Emissive,this.commonMaterialParameters=new H,this.componentParameters=new V,this.objectOpacity=1,this.textureAlphaCutoff=B,this.alphaDiscardMode=A.Opaque,this.isIntegratedMesh=!1,this.polygonOffsetEnabled=!1,this.ellipsoidMode=D.Earth,this.hasOccludees=!1;const i=new q(e.position),l=o(e.rotationScale);t(l,l),r(l,l),this.transformNormalGlobalFromModel=l,this.transformWorldFromModelTL=i.low,this.transformWorldFromModelTH=i.high,this.transformWorldFromModelRS=e.rotationScale}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get hasEmissions(){return null!=this.emissionTexture||!s(this.emissiveBaseColor,l)}get texture(){return this.baseColorTexture?.glTexture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.glTexture}get textureEmissive(){return this.emissionTexture?.glTexture}get textureOcclusion(){return this.occlusionTexture?.glTexture}get textureNormal(){return this.normalTexture?.glTexture}acquireTechnique(e,t,r,o){const s=new g(e.context.spherical);s.hasVertexColors=o.colors,s.hasNormals=o.hasNormals,s.textureCoordinateType=o.textureCoordinates,s.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,s.hasOcclusionTexture=null!=this.occlusionTexture,s.hasNormalTexture=null!=this.normalTexture,s.oitPass=t.identifier===O.Material&&null!=r.oitPass?r.oitPass:I.NONE,s.terrainDepthTest=t.identifier===O.Material&&r.terrainDepthTest,s.cullAboveTerrain=t.identifier===O.Material&&r.cullAboveTerrain,s.ellipsoidMode=this.ellipsoidMode,s.componentData=this.componentParameters.type,s.cullFace=this.commonMaterialParameters.cullFace,s.doubleSidedMode=this.commonMaterialParameters.doubleSided?P.View:P.None,s.hasColorTexture=null!=this.baseColorTexture;const i=this._computeWhichMaterialPass();if(s.blendingEnabled=i===k.Transparent||i===k.OpaqueAndTransparent,s.alphaDiscardMode=this.alphaDiscardMode,s.integratedMeshMode=this.isIntegratedMesh?G(r)?z(r)?f.ColorOverlayWithWater:f.ColorOverlay:f.NoOverlay:f.None,s.hasPolygonOffset=this.polygonOffsetEnabled,s.pbrMode=s.integratedMeshMode===f.ColorOverlayWithWater?j.WaterOnIntegratedMesh:this.usePBR?this.hasParametersFromSource?o.shadeNormals&&this.isIntegratedMesh?j.Disabled:j.Schematic:j.Normal:j.Disabled,s.emissionSource=this.hasEmissions?null!=this.emissionTexture?N.Texture:s.pbrMode===j.Normal?N.SymbolColor:N.None:N.None,s.shadeNormals=o.shadeNormals,s.normalType=s.hasNormals?w.Compressed:w.ScreenDerivative,s.hasSlicePlane=null!=r.slicePlane&&this.commonMaterialParameters.hasSlicePlane,s.receiveAmbientOcclusion=s.hasOccludees=s.receiveShadows=s.screenSpaceReflections=s.cloudReflections=s.hasHighlightMixTexture=!1,t.identifier===O.ShadowMap)s.output=C.Shadow,s.vertexDiscardMode=v.None;else if(t.identifier===O.ViewshedShadowMap)s.output=C.ViewshedShadow,s.vertexDiscardMode=v.None;else if(t.identifier===O.Highlight)s.output=C.Highlight,s.vertexDiscardMode=v.None,s.hasHighlightMixTexture=null!=r.highlightMixTexture;else{switch(i===k.OpaqueAndTransparent?s.vertexDiscardMode=t.transparent?v.Opaque:v.Transparent:s.vertexDiscardMode=v.None,s.hasBloom=S(t.output),s.output=t.output,t.output){case C.Color:case C.ColorEmission:s.receiveAmbientOcclusion=o.applySSAO&&null!=r.ssao?.getTexture(),s.hasOccludees=r.hasOccludees,s.receiveShadows=r.shadowMap.ready,s.screenSpaceReflections=null!=r.ssr.lastFrameColor,s.cloudReflections=null!=r.clouds.data?.cubeMap?.colorTexture;break;case C.ObjectAndLayerIdColor:s.objectAndLayerIdColor=!0}s.snowCover=r.snowCover}const a=e.get(m,s);return this._setClean(),a}submit(e,t,r){if(this.objectOpacity<=0)return;const{componentData:o,renderable:s}=r,{geometry:i}=s,a=s.meta.cameraDepthSquared;o.updateHighlights(t.highlights);const{geometryRanges:l,highlightRangesMap:n,shadowmapRanges:h}=o;switch(this._computeWhichMaterialPass()){case k.Opaque:e.opaque.submitDraw(this,i,l,a);break;case k.Transparent:e.transparent.submitDraw(this,i,l,a);break;case k.OpaqueAndTransparent:e.opaque.submitDraw(this,i,l,a),e.transparent.submitDraw(this,i,l,a);break;case k.IntegratedMesh:e.integratedMesh.submitDraw(this,i,l,a),U(t)&&e.highlightIntegratedMesh.submitDraw(this,i,l,a)}if(this.componentParameters.castShadows!==L.None){if(null!=n)for(const t of n)t[0]===F&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=h&&e.defaultShadowMap.submitDraw(this,i,h,a),e.shadowMap.submitDraw(this,i,l,a)}if(null!=n)for(const u of n)e.highlight.submitDraw(this,i,u[1],a,u[0]);t.viewshedEnabled&&e.viewshedShadowMap.submitDraw(this,i,l,a)}_computeWhichMaterialPass(){if(this.isIntegratedMesh)return k.IntegratedMesh;if(this.objectOpacity<1)return k.Transparent;if(this.componentParameters.opaqueOverride===L.All)return k.Opaque;if(this.baseColor[3]<1||this.alphaDiscardMode===A.Blend||this.alphaDiscardMode===A.MaskBlend)return k.Transparent;switch(this.componentParameters.transparent){case L.None:return k.Opaque;case L.All:return k.Transparent;case L.Some:return k.OpaqueAndTransparent}}}var k,L;e([M({vectorOps:n})],W.prototype,"baseColor",void 0),e([M()],W.prototype,"usePBR",void 0),e([M()],W.prototype,"hasParametersFromSource",void 0),e([M({vectorOps:i})],W.prototype,"mrrFactors",void 0),e([M({dispose:!0})],W.prototype,"baseColorTexture",void 0),e([M({dispose:!0})],W.prototype,"metallicRoughnessTexture",void 0),e([M({dispose:!0})],W.prototype,"normalTexture",void 0),e([M({dispose:!0})],W.prototype,"occlusionTexture",void 0),e([M({dispose:!0})],W.prototype,"emissionTexture",void 0),e([M({vectorOps:i})],W.prototype,"emissiveBaseColor",void 0),e([M()],W.prototype,"emissiveStrength",void 0),e([M()],W.prototype,"emissiveSource",void 0),e([b()],W.prototype,"commonMaterialParameters",void 0),e([b()],W.prototype,"componentParameters",void 0),e([M()],W.prototype,"objectOpacity",void 0),e([M()],W.prototype,"textureAlphaCutoff",void 0),e([M()],W.prototype,"alphaDiscardMode",void 0),e([M()],W.prototype,"isIntegratedMesh",void 0),e([M()],W.prototype,"polygonOffsetEnabled",void 0),e([M()],W.prototype,"ellipsoidMode",void 0),e([M()],W.prototype,"hasOccludees",void 0),function(e){e[e.Opaque=0]="Opaque",e[e.Transparent=1]="Transparent",e[e.OpaqueAndTransparent=2]="OpaqueAndTransparent",e[e.IntegratedMesh=3]="IntegratedMesh"}(k||(k={}));class H extends T{constructor(){super(...arguments),this.doubleSided=!1,this.cullFace=R.Back,this.hasSlicePlane=!0}}e([M()],H.prototype,"doubleSided",void 0),e([M()],H.prototype,"cullFace",void 0),e([M()],H.prototype,"hasSlicePlane",void 0);class V extends T{constructor(){super(...arguments),this.externalColor=u(1,1,1,1),this.externalColorMixMode=c.Multiply,this.castShadows=L.All}get transparent(){return this.externalColor[3]<1?L.All:L.None}get opaqueOverride(){return this.externalColorMixMode===c.Replace&&1===this.externalColor[3]?L.All:L.None}get visible(){return this.externalColor[3]>0?L.All:L.None}get type(){return x.Uniform}}e([M({vectorOps:n})],V.prototype,"externalColor",void 0),e([M()],V.prototype,"externalColorMixMode",void 0),e([M()],V.prototype,"castShadows",void 0),function(e){e[e.All=0]="All",e[e.Some=1]="Some",e[e.None=2]="None"}(L||(L={}));class _ extends T{constructor(){super(...arguments),this.texture=null,this.transparent=L.None,this.opaqueOverride=L.None,this.castShadows=L.None}get type(){return x.Varying}}function U(e){return null!=e.overlay?.getTexture(d.Highlight)}function z(e){return null!=e.overlay?.getTexture(d.WaterNormal)}function G(e){return null!=e.overlay?.getTexture(d.ColorNoRasterImage)}e([M()],_.prototype,"texture",void 0),e([M()],_.prototype,"transparent",void 0),e([M()],_.prototype,"opaqueOverride",void 0),e([M()],_.prototype,"castShadows",void 0);export{H as CommonMaterialParameters,W as ComponentMaterial,L as ComponentParameterSummary,V as ComponentParametersUniform,_ as ComponentParametersVarying};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Error.js";import{ManagedColorAttachment as t}from"../../webgl/ManagedColorAttachment.js";import{ManagedDepthAttachment as r}from"../../webgl/ManagedDepthAttachment.js";import a from"../../webgl/ManagedFBO.js";import{AttachmentType as c}from"../../webgl/ManagedFBOResource.js";import{ColorFormat as h,isDepthFormat as o,isDepthTextureFormat as s,DepthTextureFormats as i,DepthRenderbufferFormats as n,ColorFormats as l,DepthTextureFormat as m}from"./FBOCacheFormats.js";import{FBOPool as u}from"./FBOPool.js";import{ColorAttachment0 as d,DepthStencilAttachment as f}from"../../../webgl/enums.js";import{FramebufferObject as p}from"../../../webgl/FramebufferObject.js";import{Renderbuffer as C}from"../../../webgl/Renderbuffer.js";import{Texture as _}from"../../../webgl/Texture.js";class w{constructor(e){this.rctx=e,this._acquired=new Set,this._cache=new u(e.newCache,"FBOCache"),this._depthCache=new u(e.newCache,"DepthAttachmentCache"),this._colorCache=new u(e.newCache,"ColorAttachmentCache")}destroy(){this._cache.destroy(),this._depthCache.destroy(),this._colorCache.destroy()}clean(){this._cache.clean(),this._colorCache.clean(),this._depthCache.clean()}frameStart(){this._cache.frame(),this._colorCache.frame(),this._depthCache.frame(),this.debugCallback?.()}frameEnd(){const e=this.debugCallback;e&&this._acquired.forEach((t=>t.type===c.FBO&&e(t.name,t.fbo)))}get usedMemory(){return Array.from(this._acquired.values()).reduce(((e,t)=>e+t.cachedMemory),this._cache.usedMemory+this._colorCache.usedMemory+this._depthCache.usedMemory)}set interactive(e){this._cache.interactive=this._colorCache.interactive=this._depthCache.interactive=e}acquire(t,r,c,s=h.RGBA8UNORM){const i=g(s,t,r);let n=this._cache.pop(i);const{rctx:l}=this;if(n){n.retain(),n.setName(c);const{fbo:t}=n;if(!t)throw new e("renderer","attempt to use a not existing framebuffer");l.temporaryBindFramebufferObject(t,(()=>{l.setDrawBuffers([d]),l.unbindTexture(t.colorTexture)}))}else{const e=new p(l),u=(e,a,c)=>{a??=h.RGBA8UNORM;const o=this._acquireColor(a,t,r,c??`${n.name} color ${e}`);return this.rctx.unbindTexture(o.attachment),n.attachColor(o,e),o.release(),n},C=e=>{e??=m.DEPTH24_STENCIL8;const a=this.acquireDepth(e,t,r,`${n.name} depth`);return n.attachDepth(a),a.release(),n},_=()=>{this.debugCallback?.(n.name,n.fbo),this._acquired.delete(n);const e=o(s);!e&&null!=n?.getAttachment(d)||e&&null!=n?.getAttachment(f)?(e?(n.fbo?.invalidateAttachments([f]),n.detachAllColors()):(n.fbo?.invalidateAttachments([d],!0),n.detachAllButColor0()),this._cache.put(n)):n?.dispose()};n=new a(i,c,e,u,C,_),o(s)?n.acquireDepth(s):n.acquireColor(d,s,c)}return this._trackHandle(n)}acquireDepth(e,t,a,c){const h=g(e,t,a);let o=this._depthCache.pop(h);if(o)o.retain();else{const c=s(e)?new _(this.rctx,{...i[e],width:t,height:a}):new C(this.rctx,{...n[e],width:t,height:a});o=new r(h,c,(()=>this._depthCache.put(o)))}return o.name=c,o}_acquireColor(e,r,a,c){const h=g(e,r,a),o=this._colorCache.pop(h);if(o)return o.retain(),o.name=c,o;const s=new t(h,new _(this.rctx,{...l[e],width:r,height:a}),(()=>{this._colorCache.put(s)}));return s.name=c,s}_trackHandle(e){return this._acquired.add(e),e}}const b=new a("default","default",null,(()=>b),(()=>b),(()=>{}));function g(e,t,r){return`${e}x${t}x${r}`}b.release=()=>!1;export{w as FBOCache,b as defaultWebGLFBO};
5
+ import e from"../../../../core/Error.js";import{ManagedColorAttachment as t}from"../../webgl/ManagedColorAttachment.js";import{ManagedDepthTexture as r}from"../../webgl/ManagedDepthTexture.js";import a from"../../webgl/ManagedFBO.js";import{AttachmentType as c}from"../../webgl/ManagedFBOResource.js";import{ColorFormat as h,isDepthFormat as o,DepthTextureFormats as s,ColorFormats as i,DepthFormat as n}from"./FBOCacheFormats.js";import{FBOPool as l}from"./FBOPool.js";import{ColorAttachment0 as u,DepthStencilAttachment as m}from"../../../webgl/enums.js";import{FramebufferObject as d}from"../../../webgl/FramebufferObject.js";import{Texture as p}from"../../../webgl/Texture.js";class f{constructor(e){this.rctx=e,this._acquired=new Set,this._cache=new l(e.newCache,"FBOCache"),this._depthCache=new l(e.newCache,"DepthAttachmentCache"),this._colorCache=new l(e.newCache,"ColorAttachmentCache")}destroy(){this._cache.destroy(),this._depthCache.destroy(),this._colorCache.destroy()}clean(){this._cache.clean(),this._colorCache.clean(),this._depthCache.clean()}frameStart(){this._cache.frame(),this._colorCache.frame(),this._depthCache.frame(),this.debugCallback?.()}frameEnd(){const e=this.debugCallback;e&&this._acquired.forEach((t=>t.type===c.FBO&&e(t.name,t.fbo)))}get usedMemory(){return Array.from(this._acquired.values()).reduce(((e,t)=>e+t.cachedMemory),this._cache.usedMemory+this._colorCache.usedMemory+this._depthCache.usedMemory)}set interactive(e){this._cache.interactive=this._colorCache.interactive=this._depthCache.interactive=e}acquire(t,r,c,s=h.RGBA8UNORM){const i=_(s,t,r);let l=this._cache.pop(i);const{rctx:p}=this;if(l){l.retain(),l.setName(c);const{fbo:t}=l;if(!t)throw new e("renderer","attempt to use a not existing framebuffer");p.temporaryBindFramebufferObject(t,(()=>{p.setDrawBuffers([u]),p.unbindTexture(t.colorTexture)}))}else{const e=new d(p),f=(e,a,c)=>{a??=h.RGBA8UNORM;const o=this._acquireColor(a,t,r,c??`${l.name} color ${e}`);return this.rctx.unbindTexture(o.attachment),l.attachColor(o,e),o.release(),l},C=e=>{e??=n.DEPTH24_STENCIL8;const a=this.acquireDepth(e,t,r,`${l.name} depth`);return l.attachDepth(a),a.release(),l},_=()=>{this.debugCallback?.(l.name,l.fbo),this._acquired.delete(l);const e=o(s);!e&&null!=l?.getAttachment(u)||e&&null!=l?.getAttachment(m)?(e?(l.fbo?.invalidateAttachments([m]),l.detachAllColors()):(l.fbo?.invalidateAttachments([u],!0),l.detachAllButColor0()),this._cache.put(l)):l?.dispose()};l=new a(i,c,e,f,C,_),o(s)?l.acquireDepth(s):l.acquireColor(u,s,c)}return this._trackHandle(l)}acquireDepth(e,t,a,c){const h=_(e,t,a);let o=this._depthCache.pop(h);if(o)o.retain();else{const c=new p(this.rctx,{...s[e],width:t,height:a});o=new r(h,c,(()=>this._depthCache.put(o)))}return o.name=c,o}_acquireColor(e,r,a,c){const h=_(e,r,a),o=this._colorCache.pop(h);if(o)return o.retain(),o.name=c,o;const s=new t(h,new p(this.rctx,{...i[e],width:r,height:a}),(()=>{this._colorCache.put(s)}));return s.name=c,s}_trackHandle(e){return this._acquired.add(e),e}}const C=new a("default","default",null,(()=>C),(()=>C),(()=>{}));function _(e,t,r){return`${e}x${t}x${r}`}C.release=()=>!1;export{f as FBOCache,C as defaultWebGLFBO};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{PixelFormat as T,SizedPixelFormat as E,TextureWrapMode as R,TextureSamplingMode as N,PixelType as n,SizedDepthStencilFormat as e,SizedDepthFormat as t,UnsizedDepthFormat as o}from"../../../webgl/enums.js";import{RenderbufferDescriptor as O}from"../../../webgl/RenderbufferDescriptor.js";import{TextureDescriptor as r}from"../../../webgl/TextureDescriptor.js";import{isSizedDepthFormat as a}from"../../../webgl/textureUtils.js";var _,M,A;function P(T){return T>=_.COUNT}function G(T){return T>=M.COUNT}!function(T){T[T.R8UNORM=0]="R8UNORM",T[T.R8UINT=1]="R8UINT",T[T.RG8UNORM=2]="RG8UNORM",T[T.RG8UINT=3]="RG8UINT",T[T.RGBA4UNORM=4]="RGBA4UNORM",T[T.RGBA8UNORM=5]="RGBA8UNORM",T[T.RGBA8UNORM_MIPMAP=6]="RGBA8UNORM_MIPMAP",T[T.R16FLOAT=7]="R16FLOAT",T[T.RGBA16FLOAT=8]="RGBA16FLOAT",T[T.R32FLOAT=9]="R32FLOAT",T[T.COUNT=10]="COUNT"}(_||(_={})),function(T){T[T.DEPTH16=10]="DEPTH16",T[T.COUNT=11]="COUNT"}(M||(M={})),function(T){T[T.DEPTH16=11]="DEPTH16",T[T.DEPTH24_STENCIL8=12]="DEPTH24_STENCIL8"}(A||(A={}));const i=new r;i.pixelFormat=T.RED,i.internalFormat=E.R8,i.wrapMode=R.CLAMP_TO_EDGE;const p=new r;p.pixelFormat=T.RED_INTEGER,p.internalFormat=E.R8UI,p.wrapMode=R.CLAMP_TO_EDGE,p.samplingMode=N.NEAREST;const D=new r;D.pixelFormat=T.RG,D.internalFormat=E.RG8,D.wrapMode=R.CLAMP_TO_EDGE;const F=new r;F.pixelFormat=T.RG_INTEGER,F.internalFormat=E.RG8UI,F.wrapMode=R.CLAMP_TO_EDGE,F.samplingMode=N.NEAREST;const U=new r;U.internalFormat=E.RGBA4,U.dataType=n.UNSIGNED_SHORT_4_4_4_4,U.wrapMode=R.CLAMP_TO_EDGE;const m=new r;m.wrapMode=R.CLAMP_TO_EDGE;const L=new r;L.wrapMode=R.CLAMP_TO_EDGE,L.samplingMode=N.LINEAR_MIPMAP_LINEAR,L.hasMipmap=!0,L.maxAnisotropy=8;const l=new r;l.pixelFormat=T.RED,l.dataType=n.HALF_FLOAT,l.internalFormat=E.R16F,l.samplingMode=N.NEAREST;const I=new r;I.dataType=n.HALF_FLOAT,I.internalFormat=E.RGBA16F,I.wrapMode=R.CLAMP_TO_EDGE;const s=new r;s.pixelFormat=T.RED,s.dataType=n.FLOAT,s.internalFormat=E.R32F,s.samplingMode=N.NEAREST;const C={[_.R8UNORM]:i,[_.R8UINT]:p,[_.RG8UNORM]:D,[_.RG8UINT]:F,[_.RGBA4UNORM]:U,[_.RGBA8UNORM]:m,[_.RGBA8UNORM_MIPMAP]:L,[_.R16FLOAT]:l,[_.RGBA16FLOAT]:I,[_.R32FLOAT]:s,[_.COUNT]:null},w={[t.DEPTH_COMPONENT16]:n.UNSIGNED_SHORT,[t.DEPTH_COMPONENT24]:n.UNSIGNED_INT,[t.DEPTH_COMPONENT32F]:n.FLOAT,[e.DEPTH24_STENCIL8]:n.UNSIGNED_INT_24_8,[e.DEPTH32F_STENCIL8]:n.FLOAT_32_UNSIGNED_INT_24_8_REV},H={[M.DEPTH16]:new O(t.DEPTH_COMPONENT16),[M.COUNT]:null},d={[A.DEPTH24_STENCIL8]:c(e.DEPTH24_STENCIL8),[A.DEPTH16]:c(t.DEPTH_COMPONENT16)};function c(T){const E=new r;return E.pixelFormat=a(T)?o.DEPTH_COMPONENT:o.DEPTH_STENCIL,E.dataType=w[T],E.samplingMode=N.NEAREST,E.wrapMode=R.CLAMP_TO_EDGE,E.internalFormat=T,E.hasMipmap=!1,E.isImmutable=!0,E}export{_ as ColorFormat,C as ColorFormats,M as DepthRenderbufferFormat,H as DepthRenderbufferFormats,A as DepthTextureFormat,d as DepthTextureFormats,P as isDepthFormat,G as isDepthTextureFormat};
5
+ import{PixelFormat as T,SizedPixelFormat as E,TextureWrapMode as R,TextureSamplingMode as N,PixelType as e,SizedDepthStencilFormat as n,SizedDepthFormat as t,UnsizedDepthFormat as a}from"../../../webgl/enums.js";import{TextureDescriptor as o}from"../../../webgl/TextureDescriptor.js";import{isSizedDepthFormat as _}from"../../../webgl/textureUtils.js";var M,O;function r(T){return T>=M.COUNT}!function(T){T[T.R8UNORM=0]="R8UNORM",T[T.R8UINT=1]="R8UINT",T[T.RG8UNORM=2]="RG8UNORM",T[T.RG8UINT=3]="RG8UINT",T[T.RGBA4UNORM=4]="RGBA4UNORM",T[T.RGBA8UNORM=5]="RGBA8UNORM",T[T.RGBA8UNORM_MIPMAP=6]="RGBA8UNORM_MIPMAP",T[T.R16FLOAT=7]="R16FLOAT",T[T.RGBA16FLOAT=8]="RGBA16FLOAT",T[T.R32FLOAT=9]="R32FLOAT",T[T.COUNT=10]="COUNT"}(M||(M={})),function(T){T[T.DEPTH16=10]="DEPTH16",T[T.DEPTH24_STENCIL8=11]="DEPTH24_STENCIL8"}(O||(O={}));const A=new o;A.pixelFormat=T.RED,A.internalFormat=E.R8,A.wrapMode=R.CLAMP_TO_EDGE;const G=new o;G.pixelFormat=T.RED_INTEGER,G.internalFormat=E.R8UI,G.wrapMode=R.CLAMP_TO_EDGE,G.samplingMode=N.NEAREST;const p=new o;p.pixelFormat=T.RG,p.internalFormat=E.RG8,p.wrapMode=R.CLAMP_TO_EDGE;const F=new o;F.pixelFormat=T.RG_INTEGER,F.internalFormat=E.RG8UI,F.wrapMode=R.CLAMP_TO_EDGE,F.samplingMode=N.NEAREST;const P=new o;P.internalFormat=E.RGBA4,P.dataType=e.UNSIGNED_SHORT_4_4_4_4,P.wrapMode=R.CLAMP_TO_EDGE;const i=new o;i.wrapMode=R.CLAMP_TO_EDGE;const m=new o;m.wrapMode=R.CLAMP_TO_EDGE,m.samplingMode=N.LINEAR_MIPMAP_LINEAR,m.hasMipmap=!0,m.maxAnisotropy=8;const D=new o;D.pixelFormat=T.RED,D.dataType=e.HALF_FLOAT,D.internalFormat=E.R16F,D.samplingMode=N.NEAREST;const L=new o;L.dataType=e.HALF_FLOAT,L.internalFormat=E.RGBA16F,L.wrapMode=R.CLAMP_TO_EDGE;const U=new o;U.pixelFormat=T.RED,U.dataType=e.FLOAT,U.internalFormat=E.R32F,U.samplingMode=N.NEAREST;const I={[M.R8UNORM]:A,[M.R8UINT]:G,[M.RG8UNORM]:p,[M.RG8UINT]:F,[M.RGBA4UNORM]:P,[M.RGBA8UNORM]:i,[M.RGBA8UNORM_MIPMAP]:m,[M.R16FLOAT]:D,[M.RGBA16FLOAT]:L,[M.R32FLOAT]:U,[M.COUNT]:null},l={[t.DEPTH_COMPONENT16]:e.UNSIGNED_SHORT,[t.DEPTH_COMPONENT24]:e.UNSIGNED_INT,[t.DEPTH_COMPONENT32F]:e.FLOAT,[n.DEPTH24_STENCIL8]:e.UNSIGNED_INT_24_8,[n.DEPTH32F_STENCIL8]:e.FLOAT_32_UNSIGNED_INT_24_8_REV},s={[O.DEPTH24_STENCIL8]:C(n.DEPTH24_STENCIL8),[O.DEPTH16]:C(t.DEPTH_COMPONENT16)};function C(T){const E=new o;return E.pixelFormat=_(T)?a.DEPTH_COMPONENT:a.DEPTH_STENCIL,E.dataType=l[T],E.samplingMode=N.NEAREST,E.wrapMode=R.CLAMP_TO_EDGE,E.internalFormat=T,E.hasMipmap=!1,E.isImmutable=!0,E}export{M as ColorFormat,I as ColorFormats,O as DepthFormat,s as DepthTextureFormats,r as isDepthFormat};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as r,syncAndInitial as o}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators/subclass.js";import{InternalRenderCategory as a}from"../../../webgl.js";import{ColorFormat as m}from"../../core/FBOCacheFormats.js";import{TransparentEnvironment as l}from"../TransparentEnvironment.js";import{B as n,a as u}from"../../../../../chunks/BloomBlur.glsl.js";import{BloomBlurTechnique as c}from"./BloomBlurTechnique.js";import{BloomBlurTechniqueConfiguration as h}from"./BloomBlurTechniqueConfiguration.js";import{B as p}from"../../../../../chunks/BloomComposition.glsl.js";import{BloomCompositionTechnique as b}from"./BloomCompositionTechnique.js";import{blurRadiusPresets as _,lodFactorsPresets as d,normalizePreset as f}from"./BloomPresets.glsl.js";import{RenderRequestType as g}from"../../lib/basicInterfaces.js";import{ColorAttachment1 as P,DepthStencilAttachment as T,FramebufferBit as R}from"../../../../webgl/enums.js";let j=class extends l{constructor(e){super(e),this.consumes={required:[a.TRANSPARENT_ENVIRONMENT,"emissive"]},this._blurHorizontalConfiguration=new h,this._blurVerticalConfiguration=new h,this._compositionParameters=new p,this._blurParameters=new n,this._blurScale=3.06,this._bloomResults=new Array}initialize(){this.addHandles([r((()=>this._updateFogParameters()),(()=>{}),o),r((()=>this.view.qualitySettings.bloom),(e=>{e?(this._enable(),this.precompile()):this._disable()}),o)])}destroy(){}_updateFogParameters(){const e=this.view.environment.weather;if("sunny"===e.type||"cloudy"===e.type)this._blurParameters.blurRadius=_[e.type];else{const r="foggy"===e.type?e.fogStrength:e.precipitation;this._blurParameters.blurRadius=t(_.cloudy,_[e.type],r)}this._compositionParameters.lodFactors=d[e.type].far,this._compositionParameters.lodFactorsFront=d[e.type].near,this.requestRender(g.UPDATE)}precompile(){this.techniques.precompile(c,this._blurHorizontalConfiguration),this._blurVerticalConfiguration.bloomStage=u.Vertical,this.techniques.precompile(c,this._blurVerticalConfiguration),this.techniques.precompile(b)}render(e){const t=e.find((({name:e})=>e===a.TRANSPARENT_ENVIRONMENT)),r=t.getAttachment(P)?.attachment;if(!r)return t;const o=this.techniques.get(c,this._blurHorizontalConfiguration),s=this.techniques.get(c,this._blurVerticalConfiguration),i=this.techniques.get(b);if(!o.compiled||!s.compiled||!i.compiled)return this.requestRender(g.UPDATE),t;const l=t.getTexture(),n=this.fboCache,{fullWidth:u,fullHeight:h}=this.bindParameters.camera,p=this.renderingContext;let _=r,d=u/2,f=h/2;const R=5,j=this._blurParameters.blurRadius;for(let a=0;a<R;a++){const e=n.acquire(d,f,"bloomHorizontal",m.RGBA16FLOAT);this._blurParameters.color=_,this._prepareFBO(e,d,f),p.bindTechnique(o,this.bindParameters,this._blurParameters),p.screen.draw();const t=n.acquire(d,f,"bloomVertical",m.RGBA16FLOAT);this._blurParameters.color=e.getTexture(),this._prepareFBO(t,d,f),p.bindTechnique(s,this.bindParameters,this._blurParameters),p.screen.draw(),e.release(),this._bloomResults[a]=t,d=Math.ceil(d/2),f=Math.ceil(f/2),_=this._bloomResults[a].getTexture(),this._blurParameters.blurRadius*=this._blurScale}this._blurParameters.blurRadius=j,this._compositionParameters.color=l,this._compositionParameters.emission=r,this._compositionParameters.bloomTexture0=this._bloomResults[0].getTexture(),this._compositionParameters.bloomTexture1=this._bloomResults[1].getTexture(),this._compositionParameters.bloomTexture2=this._bloomResults[2].getTexture(),this._compositionParameters.bloomTexture3=this._bloomResults[3].getTexture(),this._compositionParameters.bloomTexture4=this._bloomResults[4].getTexture();const q=this.acquireOutputFramebuffer();return this._prepareFBO(q,u,h),p.bindTechnique(i,this.bindParameters,this._compositionParameters),p.screen.draw(),this._bloomResults.forEach((e=>e.release())),q.attachDepth(t.getAttachment(T)),q.attachColor(t.getAttachment(P),P),q}_prepareFBO(e,t,r){const o=this.renderingContext;o.bindFramebuffer(e.fbo),o.setViewport(0,0,t,r),o.setClearColor(0,0,0,0),o.clear(R.COLOR)}get test(){return{compositionParameters:this._compositionParameters,blurParameters:this._blurParameters,setLodFactors:e=>{this._compositionParameters.lodFactors=f(e)}}}};e([s()],j.prototype,"consumes",void 0),j=e([i("esri.views.3d.webgl-engine.effects.bloom.BloomRenderNode")],j);export{j as BloomRenderNode};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{lerp as t}from"../../../../../core/mathUtils.js";import{watch as r,syncAndInitial as o}from"../../../../../core/reactiveUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators/subclass.js";import{InternalRenderCategory as a}from"../../../webgl.js";import{ColorFormat as m}from"../../core/FBOCacheFormats.js";import{TransparentEnvironment as l}from"../TransparentEnvironment.js";import{B as n,a as c}from"../../../../../chunks/BloomBlur.glsl.js";import{BloomBlurTechnique as u}from"./BloomBlurTechnique.js";import{BloomBlurTechniqueConfiguration as h}from"./BloomBlurTechniqueConfiguration.js";import{B as p}from"../../../../../chunks/BloomComposition.glsl.js";import{BloomCompositionTechnique as b}from"./BloomCompositionTechnique.js";import{blurRadiusPresets as _,lodFactorsPresets as d,normalizePreset as g}from"./BloomPresets.glsl.js";import{RenderRequestType as f}from"../../lib/basicInterfaces.js";import{ColorAttachment1 as P,DepthStencilAttachment as T,FramebufferBit as R}from"../../../../webgl/enums.js";let j=class extends l{constructor(e){super(e),this.consumes={required:[a.TRANSPARENT_ENVIRONMENT,"emissive"]},this._blurHorizontalConfiguration=new h,this._blurVerticalConfiguration=new h,this._compositionParameters=new p,this._blurParameters=new n,this._blurScale=3.06,this._bloomResults=new Array}initialize(){this.addHandles([r((()=>this._updateFogParameters()),(()=>{}),o),r((()=>this.view.qualitySettings.bloom),(e=>{e?(this._enable(),this.precompile()):this._disable()}),o)])}destroy(){}_updateFogParameters(){const e=this.view.environment.weather;if("sunny"===e.type||"cloudy"===e.type)this._blurParameters.blurRadius=_[e.type];else{const r="foggy"===e.type?e.fogStrength:e.precipitation;this._blurParameters.blurRadius=t(_.cloudy,_[e.type],r)}this._compositionParameters.lodFactors=d[e.type].far,this._compositionParameters.lodFactorsFront=d[e.type].near,this.requestRender(f.UPDATE)}precompile(){this.techniques.precompile(u,this._blurHorizontalConfiguration),this._blurVerticalConfiguration.bloomStage=c.Vertical,this.techniques.precompile(u,this._blurVerticalConfiguration),this.techniques.precompile(b)}render(e){const t=e.find((({name:e})=>e===a.TRANSPARENT_ENVIRONMENT)),r=t.getAttachment(P)?.attachment;if(!r)return t;const o=this.techniques.get(u,this._blurHorizontalConfiguration),s=this.techniques.get(u,this._blurVerticalConfiguration),i=this.techniques.get(b);if(!o.compiled||!s.compiled||!i.compiled)return this.requestRender(f.UPDATE),t;const l=t.getTexture(),n=this.fboCache,{fullWidth:c,fullHeight:h}=this.bindParameters.camera,p=this.renderingContext;let _=r,d=c/2,g=h/2;const R=5,j=this._blurParameters.blurRadius;for(let a=0;a<R;a++){const e=n.acquire(d,g,"bloomHorizontal",m.RGBA16FLOAT);this._blurParameters.color=_,this._prepareFBO(e,d,g),p.bindTechnique(o,this.bindParameters,this._blurParameters),p.screen.draw();const t=n.acquire(d,g,"bloomVertical",m.RGBA16FLOAT);this._blurParameters.color=e.getTexture(),this._prepareFBO(t,d,g),p.bindTechnique(s,this.bindParameters,this._blurParameters),p.screen.draw(),e.release(),this._bloomResults[a]=t,d=Math.ceil(d/2),g=Math.ceil(g/2),_=this._bloomResults[a].getTexture(),this._blurParameters.blurRadius*=this._blurScale}this._blurParameters.blurRadius=j,this._compositionParameters.color=l,this._compositionParameters.emission=r,this._compositionParameters.bloomTexture0=this._bloomResults[0].getTexture(),this._compositionParameters.bloomTexture1=this._bloomResults[1].getTexture(),this._compositionParameters.bloomTexture2=this._bloomResults[2].getTexture(),this._compositionParameters.bloomTexture3=this._bloomResults[3].getTexture(),this._compositionParameters.bloomTexture4=this._bloomResults[4].getTexture();const q=n.acquire(l.descriptor.width,l.descriptor.height,this.produces);return this._prepareFBO(q,c,h),p.bindTechnique(i,this.bindParameters,this._compositionParameters),p.screen.draw(),this._bloomResults.forEach((e=>e.release())),q.attachDepth(t.getAttachment(T)),q.attachColor(t.getAttachment(P),P),q}_prepareFBO(e,t,r){const o=this.renderingContext;o.bindFramebuffer(e.fbo),o.setViewport(0,0,t,r),o.setClearColor(0,0,0,0),o.clear(R.COLOR)}get test(){return{compositionParameters:this._compositionParameters,blurParameters:this._blurParameters,setLodFactors:e=>{this._compositionParameters.lodFactors=g(e)}}}};e([s()],j.prototype,"consumes",void 0),j=e([i("esri.views.3d.webgl-engine.effects.bloom.BloomRenderNode")],j);export{j as BloomRenderNode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{InternalRenderCategory as o}from"../../../webgl.js";import t from"../../../webgl/RenderNode.js";import{FocusAreaColorTechnique as i}from"./FocusAreaColorTechnique.js";import{F as c}from"../../../../../chunks/FocusAreaColor.glsl.js";import{FramebufferBit as a,DepthStencilAttachment as p}from"../../../../webgl/enums.js";let n=class extends t{constructor(e){super({...e,view:e.focusAreas.view}),this.consumes={required:[o.FOCUSAREA_COLOR,o.FOCUSAREA]},this.produces=o.FOCUSAREA_COLOR,this._passParameters=new c}precompile(){this.techniques.precompile(i)}render(e){const r=this.techniques.get(i),s=e.find((({name:e})=>e===this.produces));if(!r.compiled)return this.requestRender(),s;const t=this.bindParameters,c=t.camera,n=c.fullViewport[2],u=c.fullViewport[3],h=e.find((({name:e})=>e===o.FOCUSAREA)),d=this.fboCache.acquire(n,u,this.produces),f=this.renderingContext;return f.clear(a.STENCIL),f.bindFramebuffer(d.fbo),this._passParameters.color=s.getTexture(),this._passParameters.focusArea=h.getTexture(),this._passParameters.effect=m[this.focusAreas.style],f.bindTechnique(r,t,this._passParameters),f.screen.draw(),d.attachDepth(s.getAttachment(p)),d}};var u;e([r()],n.prototype,"consumes",void 0),e([r()],n.prototype,"produces",void 0),e([r({constructOnly:!0})],n.prototype,"focusAreas",void 0),n=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaColorNode")],n),function(e){e[e.NONE=0]="NONE",e[e.BRIGHT=1]="BRIGHT",e[e.DARK=2]="DARK"}(u||(u={}));const m={none:u.NONE,bright:u.BRIGHT,dark:u.DARK};export{n as FocusAreaColorNode};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{property as r}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{InternalRenderCategory as o}from"../../../webgl.js";import t from"../../../webgl/RenderNode.js";import{FocusAreaColorTechnique as i}from"./FocusAreaColorTechnique.js";import{F as c}from"../../../../../chunks/FocusAreaColor.glsl.js";import{FramebufferBit as a,DepthStencilAttachment as p}from"../../../../webgl/enums.js";let n=class extends t{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[o.FOCUSAREA_COLOR,o.FOCUSAREA]},this.produces=o.FOCUSAREA_COLOR,this._passParameters=new c}precompile(){this.techniques.precompile(i)}render(e){const r=this.techniques.get(i),s=e.find((({name:e})=>e===this.produces));if(!r.compiled)return this.requestRender(),s;const t=this.bindParameters,c=t.camera,n=c.fullViewport[2],u=c.fullViewport[3],h=e.find((({name:e})=>e===o.FOCUSAREA)),d=this.fboCache.acquire(n,u,this.produces),f=this.renderingContext;return f.clear(a.STENCIL),f.bindFramebuffer(d.fbo),this._passParameters.color=s.getTexture(),this._passParameters.focusArea=h.getTexture(),this._passParameters.effect=m[this.focusAreasView.style],f.bindTechnique(r,t,this._passParameters),f.screen.draw(),d.attachDepth(s.getAttachment(p)),d}};var u;e([r()],n.prototype,"consumes",void 0),e([r()],n.prototype,"produces",void 0),e([r({constructOnly:!0})],n.prototype,"focusAreasView",void 0),n=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaColorNode")],n),function(e){e[e.NONE=0]="NONE",e[e.BRIGHT=1]="BRIGHT",e[e.DARK=2]="DARK"}(u||(u={}));const m={none:u.NONE,bright:u.BRIGHT,dark:u.DARK};export{n as FocusAreaColorNode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as r,InternalRenderCategory as o}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{ColorFormat as n}from"../../core/FBOCacheFormats.js";import{FocusAreaMaskTechnique as a}from"./FocusAreaMaskTechnique.js";import{Default3D as c}from"../../lib/DefaultVertexAttributeLocations.js";import{Pos3 as h}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as p}from"../../lib/VertexArrayObject.js";import{F as u}from"../../../../../chunks/FocusAreaMask.glsl.js";import{BufferObject as l}from"../../../../webgl/BufferObject.js";import{DepthStencilAttachment as m,FramebufferBit as d,Face as f,StencilOperation as g,CompareFunction as A,PrimitiveType as E,Usage as b}from"../../../../webgl/enums.js";import{noParameters as _}from"../../../../webgl/NoParameters.js";let w=class extends i{constructor(e){super({...e,view:e.focusAreas.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=o.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new u}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach((e=>e.dispose())),this._vaos.length=this._counts.length=this._origins.length=0}precompile(){this.techniques.precompile(a)}render(e){const t=this.techniques.get(a),s=this.bindParameters,i=s.camera,c=i.fullViewport[2],h=i.fullViewport[3];if(!t.compiled||!this._vaos)return void this.requestRender();const p=e.find((({name:e})=>e===r.TRANSPARENT)),u=this.renderingContext,l=this.fboCache.acquire(c,h,o.FOCUSAREA,n.RGBA8UNORM).attachDepth(p.getAttachment(m));u.bindFramebuffer(l.fbo),u.clear(d.COLOR|d.STENCIL),u.setViewport(0,0,c,h),u.clear(d.STENCIL,0);const b=u.bindTechnique(t,s);u.setFaceCullingEnabled(!1),u.setStencilTestEnabled(!0),u.setStencilOpSeparate(f.FRONT,g.KEEP,g.INCR_WRAP,g.KEEP),u.setStencilOpSeparate(f.BACK,g.KEEP,g.DECR_WRAP,g.KEEP),u.setDepthWriteEnabled(!1);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],t=this._counts[r];this._maskParameters.origin=this._origins[r],b.bindDraw(s,_,this._maskParameters),u.bindVAO(e),u.setDepthTestEnabled(!0),u.setStencilWriteMask(255),u.setStencilFunction(A.ALWAYS,0,255),u.setColorMask(!1,!1,!1,!1),u.drawArrays(E.TRIANGLES,0,t),u.setDepthTestEnabled(!1),u.setStencilWriteMask(0),u.setStencilFunction(A.NOTEQUAL,0,255),u.setColorMask(!0,!0,!0,!0),u.drawArrays(E.TRIANGLES,0,t)}return l}updateGeometries(){if(!this.view.stage)return;this._vaos.forEach((e=>e.dispose())),this._vaos.length=this._counts.length=this._origins.length=0;const e=this.focusAreas.geometries;for(const t of e){const e=new Array,s=t.indicesBottom;for(let n=0;n<s.length;n++)e.push(t.positions[3*(s[n]-1)]),e.push(t.positions[3*(s[n]-1)+1]),e.push(t.positions[3*(s[n]-1)+2]);const r=t.indicesExtruded;for(let n=0;n<r.length;n++)e.push(t.positions[3*r[n]]),e.push(t.positions[3*r[n]+1]),e.push(t.positions[3*r[n]+2]);const o=new Float32Array(e),i=new p(this.renderingContext,c,new Map([["geometry",h]]),new Map([["geometry",l.createVertex(this.renderingContext,b.STATIC_DRAW,o)]]));this._vaos.push(i),this._counts.push(s.length+r.length),this._origins.push(t.origin)}this.requestRender()}};e([t()],w.prototype,"consumes",void 0),e([t()],w.prototype,"produces",void 0),e([t({constructOnly:!0})],w.prototype,"focusAreas",void 0),w=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskNode")],w);class R{constructor(e,t,s,r,o,i){this.positions=e,this.indicesBottom=t,this.indicesExtruded=s,this.height=r,this.origin=o,this.color=i}}var S;!function(e){e[e.NONE=0]="NONE",e[e.BRIGHT=1]="BRIGHT",e[e.DARK=2]="DARK"}(S||(S={}));export{S as FocusAreaEffect,R as FocusAreaGeometry,w as FocusAreaMaskNode};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{RenderCategory as r,InternalRenderCategory as o}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{ColorFormat as n}from"../../core/FBOCacheFormats.js";import{FocusAreaMaskTechnique as a}from"./FocusAreaMaskTechnique.js";import{Default3D as c}from"../../lib/DefaultVertexAttributeLocations.js";import{Pos3 as h}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as p}from"../../lib/VertexArrayObject.js";import{F as u}from"../../../../../chunks/FocusAreaMask.glsl.js";import{BufferObject as l}from"../../../../webgl/BufferObject.js";import{DepthStencilAttachment as m,FramebufferBit as d,Face as f,StencilOperation as g,CompareFunction as A,PrimitiveType as E,Usage as w}from"../../../../webgl/enums.js";import{noParameters as b}from"../../../../webgl/NoParameters.js";let _=class extends i{constructor(e){super({...e,view:e.focusAreasView.view}),this.consumes={required:[r.TRANSPARENT]},this.produces=o.FOCUSAREA,this._vaos=new Array,this._counts=new Array,this._origins=new Array,this._maskParameters=new u}initialize(){this.updateGeometries()}destroy(){this._vaos.forEach((e=>e.dispose())),this._vaos.length=this._counts.length=this._origins.length=0}precompile(){this.techniques.precompile(a)}render(e){const t=this.techniques.get(a),s=this.bindParameters,i=s.camera,c=i.fullViewport[2],h=i.fullViewport[3];if(!t.compiled||!this._vaos)return void this.requestRender();const p=e.find((({name:e})=>e===r.TRANSPARENT)),u=this.renderingContext,l=this.fboCache.acquire(c,h,o.FOCUSAREA,n.RGBA8UNORM).attachDepth(p.getAttachment(m));u.bindFramebuffer(l.fbo),u.clear(d.COLOR|d.STENCIL),u.setViewport(0,0,c,h),u.clear(d.STENCIL,0);const w=u.bindTechnique(t,s);u.setFaceCullingEnabled(!1),u.setStencilTestEnabled(!0),u.setStencilOpSeparate(f.FRONT,g.KEEP,g.INCR_WRAP,g.KEEP),u.setStencilOpSeparate(f.BACK,g.KEEP,g.DECR_WRAP,g.KEEP),u.setDepthWriteEnabled(!1);for(let r=0;r<this._vaos.length;r++){const e=this._vaos[r],t=this._counts[r];this._maskParameters.origin=this._origins[r],w.bindDraw(s,b,this._maskParameters),u.bindVAO(e),u.setDepthTestEnabled(!0),u.setStencilWriteMask(255),u.setStencilFunction(A.ALWAYS,0,255),u.setColorMask(!1,!1,!1,!1),u.drawArrays(E.TRIANGLES,0,t),u.setDepthTestEnabled(!1),u.setStencilWriteMask(0),u.setStencilFunction(A.NOTEQUAL,0,255),u.setColorMask(!0,!0,!0,!0),u.drawArrays(E.TRIANGLES,0,t)}return l}updateGeometries(){if(!this.view.stage)return;this._vaos.forEach((e=>e.dispose())),this._vaos.length=this._counts.length=this._origins.length=0;const e=this.focusAreasView.geometries;for(const t of e){const e=new Array,s=t.indicesBottom;for(let n=0;n<s.length;n++)e.push(t.positions[3*(s[n]-1)]),e.push(t.positions[3*(s[n]-1)+1]),e.push(t.positions[3*(s[n]-1)+2]);const r=t.indicesExtruded;for(let n=0;n<r.length;n++)e.push(t.positions[3*r[n]]),e.push(t.positions[3*r[n]+1]),e.push(t.positions[3*r[n]+2]);const o=new Float32Array(e),i=new p(this.renderingContext,c,new Map([["geometry",h]]),new Map([["geometry",l.createVertex(this.renderingContext,w.STATIC_DRAW,o)]]));this._vaos.push(i),this._counts.push(s.length+r.length),this._origins.push(t.origin)}this.requestRender()}};e([t()],_.prototype,"consumes",void 0),e([t()],_.prototype,"produces",void 0),e([t({constructOnly:!0})],_.prototype,"focusAreasView",void 0),_=e([s("esri.views.3d.webgl-engine.effects.focusArea.FocusAreaMaskNode")],_);class R{constructor(e,t,s,r,o){this.positions=e,this.indicesBottom=t,this.indicesExtruded=s,this.height=r,this.origin=o}}var S;!function(e){e[e.NONE=0]="NONE",e[e.BRIGHT=1]="BRIGHT",e[e.DARK=2]="DARK"}(S||(S={}));export{S as FocusAreaEffect,R as FocusAreaGeometry,_ as FocusAreaMaskNode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import r from"../../../../../core/PooledArray.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ZEROS as o}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as n}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{DepthTextureFormat as c}from"../../core/FBOCacheFormats.js";import{Blit as a}from"../blit/Blit.js";import{StencilBits as l}from"../../lib/basicInterfaces.js";import{RenderOccludedFlag as d}from"../../lib/Material.js";import{RenderSlot as p}from"../../lib/RenderSlot.js";import{BlitMode as u}from"../../shaders/CompositingTechniqueConfiguration.js";import{DepthStencilAttachment as m}from"../../../../webgl/enums.js";let f=class extends i{constructor(e){super(e),this.consumes={required:[n.OCCLUDED]},this.produces=n.OCCLUDED,this._blit=new a(e.view.stage.renderView.techniques,u.PremultipliedAlpha)}precompile(){const e=this.view.stage.renderer;e.plugins.plugins.forAll((r=>{e.precompileSlots(r,p.OCCLUDED_TERRAIN,p.TRANSPARENT_OCCLUDER_MATERIAL),r.material&&e.precompileOccludedSlots(r,g)}))}render(e){const r=e.find((({name:e})=>e===this.produces)),t=this.view.stage.renderer;let s=0;if(h.clear(),t.plugins.plugins.forAll((e=>{if(!e.material)return;e.queryRenderOccludedState(d.OccludeAndTransparentStencil)&&(s|=d.OccludeAndTransparentStencil,h.push(e))})),h.length>0&&(t.renderSlots(h,p.OCCLUDER_MATERIAL),s&d.OccludeAndTransparentStencil&&this._renderAndComposite(r,.5,(()=>t.renderSlots(h,p.TRANSPARENT_OCCLUDER_MATERIAL)),!1,!1)),h.clear(),t.plugins.plugins.forAll((e=>{if(!e.material)return;const r=e.queryRenderOccludedState(d.OccludeAndTransparent),t=e.queryRenderOccludedState(d.Transparent),o=e.queryRenderOccludedState(d.Opaque);(r||t||o)&&(s|=r?d.OccludeAndTransparent:t?d.Transparent:d.Opaque,h.push(e))})),s|=t.plugins.renderOccludedFlags,!s)return r;for(const o of g)s&o&&this._renderAndComposite(r,o===d.Opaque?1:.5,(()=>t.renderOccludedSlots(h,o)),!0,l.OutlineVisualElementMask);return h.clear(),r}_renderAndComposite(e,r,t,s,n){const i=this.renderingContext,{width:a,height:l}=e.fbo,d=this.fboCache.acquire(a,l,"tmp color"),p=s?this.fboCache.acquireDepth(c.DEPTH24_STENCIL8,a,l,"tmp depth"):e.getAttachment(m);d.attachDepth(p),i.bindFramebuffer(d.fbo),i.clearFramebuffer(o,s,n),t(),d.detachDepth(),this._blit.blend(i,d,e,this.bindParameters,r),s&&p.release(),d.release()}};e([t()],f.prototype,"consumes",void 0),e([t()],f.prototype,"produces",void 0),f=e([s("esri.views.3d.webgl-engine.effects.geometry.RenderOccludedRenderNode")],f);const h=new r,g=[d.OccludeAndTransparent,d.Transparent,d.Opaque];export{f as RenderOccludedRenderNode};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import r from"../../../../../core/PooledArray.js";import{property as t}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{ZEROS as o}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as n}from"../../../webgl.js";import i from"../../../webgl/RenderNode.js";import{DepthFormat as c}from"../../core/FBOCacheFormats.js";import{Blit as a}from"../blit/Blit.js";import{StencilBits as l}from"../../lib/basicInterfaces.js";import{RenderOccludedFlag as d}from"../../lib/Material.js";import{RenderSlot as p}from"../../lib/RenderSlot.js";import{BlitMode as u}from"../../shaders/CompositingTechniqueConfiguration.js";import{DepthStencilAttachment as m}from"../../../../webgl/enums.js";let f=class extends i{constructor(e){super(e),this.consumes={required:[n.OCCLUDED]},this.produces=n.OCCLUDED,this._blit=new a(e.view.stage.renderView.techniques,u.PremultipliedAlpha)}precompile(){const e=this.view.stage.renderer;e.plugins.plugins.forAll((r=>{e.precompileSlots(r,p.OCCLUDED_TERRAIN,p.TRANSPARENT_OCCLUDER_MATERIAL),r.material&&e.precompileOccludedSlots(r,g)}))}render(e){const r=e.find((({name:e})=>e===this.produces)),t=this.view.stage.renderer;let s=0;if(h.clear(),t.plugins.plugins.forAll((e=>{if(!e.material)return;e.queryRenderOccludedState(d.OccludeAndTransparentStencil)&&(s|=d.OccludeAndTransparentStencil,h.push(e))})),h.length>0&&(t.renderSlots(h,p.OCCLUDER_MATERIAL),s&d.OccludeAndTransparentStencil&&this._renderAndComposite(r,.5,(()=>t.renderSlots(h,p.TRANSPARENT_OCCLUDER_MATERIAL)),!1,!1)),h.clear(),t.plugins.plugins.forAll((e=>{if(!e.material)return;const r=e.queryRenderOccludedState(d.OccludeAndTransparent),t=e.queryRenderOccludedState(d.Transparent),o=e.queryRenderOccludedState(d.Opaque);(r||t||o)&&(s|=r?d.OccludeAndTransparent:t?d.Transparent:d.Opaque,h.push(e))})),s|=t.plugins.renderOccludedFlags,!s)return r;for(const o of g)s&o&&this._renderAndComposite(r,o===d.Opaque?1:.5,(()=>t.renderOccludedSlots(h,o)),!0,l.OutlineVisualElementMask);return h.clear(),r}_renderAndComposite(e,r,t,s,n){const i=this.renderingContext,{width:a,height:l}=e.fbo,d=this.fboCache.acquire(a,l,"tmp color"),p=s?this.fboCache.acquireDepth(c.DEPTH24_STENCIL8,a,l,"tmp depth"):e.getAttachment(m);d.attachDepth(p),i.bindFramebuffer(d.fbo),i.clearFramebuffer(o,s,n),t(),d.detachDepth(),this._blit.blend(i,d,e,this.bindParameters,r),s&&p.release(),d.release()}};e([t()],f.prototype,"consumes",void 0),e([t()],f.prototype,"produces",void 0),f=e([s("esri.views.3d.webgl-engine.effects.geometry.RenderOccludedRenderNode")],f);const h=new r,g=[d.OccludeAndTransparent,d.Transparent,d.Opaque];export{f as RenderOccludedRenderNode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import"../../../../../core/has.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{property as i}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as s,f as r}from"../../../../../chunks/vec32.js";import{fromRay as a,create as o,getStart as l,getEnd as h}from"../../../../../geometry/support/clipRay.js";import{intersectClipRay as c}from"../../../../../geometry/support/frustum.js";import{copy as d}from"../../../../../geometry/support/lineSegment.js";import{wrap as p}from"../../../../../geometry/support/ray.js";import{ViewingMode as u}from"../../../../ViewingMode.js";import{InternalRenderCategory as m}from"../../../webgl.js";import g from"../../../webgl/RenderNode.js";import{Blit as _}from"../blit/Blit.js";import{LaserlinePathData as P}from"./LaserlinePathData.js";import{LaserlinePathPassParameters as f,LaserlinePathTechnique as b}from"./LaserlinePathTechnique.js";import{LaserlinePathTechniqueConfiguration as E}from"./LaserlinePathTechniqueConfiguration.js";import{LaserlineTechnique as D}from"./LaserlineTechnique.js";import{LaserlineTechniqueConfiguration as q}from"./LaserlineTechniqueConfiguration.js";import{RenderRequestType as T}from"../../lib/basicInterfaces.js";import{updateParameters as L}from"../../materials/internal/MaterialUtil.js";import{BlitMode as V}from"../../shaders/CompositingTechniqueConfiguration.js";import{FramebufferBit as C}from"../../../../webgl/enums.js";let j=class extends g{constructor(e){super(e),this.isDecoration=!0,this.produces=m.LASERLINES,this.consumes={required:[m.LASERLINES,"normals"]},this.requireGeometryDepth=!0,this._configuration=new q,this._pathTechniqueConfiguration=new E,this._heightManifoldEnabled=!1,this._pointDistanceEnabled=!1,this._lineVerticalPlaneEnabled=!1,this._intersectsLineEnabled=!1,this._intersectsLineInfinite=!1,this._pathVerticalPlaneEnabled=!1,this._passParameters=new f;const t=e.view.stage.renderView.techniques,i=new E;i.contrastControlEnabled=e.contrastControlEnabled,t.precompile(b,i)}initialize(){this._passParameters.renderCoordsHelper=this.view.renderCoordsHelper,this._pathTechniqueConfiguration.spherical=this.view.state.viewingMode===u.Global,this._pathTechniqueConfiguration.contrastControlEnabled=this.contrastControlEnabled,this._techniques.precompile(b,this._pathTechniqueConfiguration),this._blit=new _(this._techniques,V.PremultipliedAlpha)}destroy(){this._pathVerticalPlaneData=t(this._pathVerticalPlaneData),this._blit=null}get _techniques(){return this.view.stage.renderView.techniques}get heightManifoldEnabled(){return this._heightManifoldEnabled}set heightManifoldEnabled(e){this._heightManifoldEnabled!==e&&(this._heightManifoldEnabled=e,this.requestRender(T.UPDATE))}get heightManifoldTarget(){return this._passParameters.heightManifoldTarget}set heightManifoldTarget(e){s(this._passParameters.heightManifoldTarget,e),this.requestRender(T.UPDATE)}get pointDistanceEnabled(){return this._pointDistanceEnabled}set pointDistanceEnabled(e){e!==this._pointDistanceEnabled&&(this._pointDistanceEnabled=e,this.requestRender(T.UPDATE))}get pointDistanceTarget(){return this._passParameters.pointDistanceTarget}set pointDistanceTarget(e){s(this._passParameters.pointDistanceTarget,e),this.requestRender(T.UPDATE)}get pointDistanceOrigin(){return this._passParameters.pointDistanceOrigin}set pointDistanceOrigin(e){s(this._passParameters.pointDistanceOrigin,e),this.requestRender(T.UPDATE)}get lineVerticalPlaneEnabled(){return this._lineVerticalPlaneEnabled}set lineVerticalPlaneEnabled(e){e!==this._lineVerticalPlaneEnabled&&(this._lineVerticalPlaneEnabled=e,this.requestRender(T.UPDATE))}get lineVerticalPlaneSegment(){return this._passParameters.lineVerticalPlaneSegment}set lineVerticalPlaneSegment(e){d(e,this._passParameters.lineVerticalPlaneSegment),this.requestRender(T.UPDATE)}get intersectsLineEnabled(){return this._intersectsLineEnabled}set intersectsLineEnabled(e){e!==this._intersectsLineEnabled&&(this._intersectsLineEnabled=e,this.requestRender(T.UPDATE))}get intersectsLineSegment(){return this._passParameters.intersectsLineSegment}set intersectsLineSegment(e){d(e,this._passParameters.intersectsLineSegment),this.requestRender(T.UPDATE)}get intersectsLineInfinite(){return this._intersectsLineInfinite}set intersectsLineInfinite(e){e!==this._intersectsLineInfinite&&(this._intersectsLineInfinite=e,this.requestRender(T.UPDATE))}get pathVerticalPlaneEnabled(){return this._pathVerticalPlaneEnabled}set pathVerticalPlaneEnabled(e){e!==this._pathVerticalPlaneEnabled&&(this._pathVerticalPlaneEnabled=e,null!=this._pathVerticalPlaneData&&this.requestRender(T.UPDATE))}set pathVerticalPlaneVertices(e){null==this._pathVerticalPlaneData&&(this._pathVerticalPlaneData=new P(this._passParameters.renderCoordsHelper)),this._pathVerticalPlaneData.vertices=e,this.pathVerticalPlaneEnabled&&this.requestRender(T.UPDATE)}set pathVerticalPlaneBuffers(e){null==this._pathVerticalPlaneData&&(this._pathVerticalPlaneData=new P(this._passParameters.renderCoordsHelper)),this._pathVerticalPlaneData.buffers=e,this.pathVerticalPlaneEnabled&&this.requestRender(T.UPDATE)}setParameters(e){L(this._passParameters,e)&&this.requestRender(T.UPDATE)}precompile(){this._acquireTechnique()}render(e){const t=e.find((({name:e})=>e===this.produces));if(this.isDecoration&&!this.bindParameters.decorations||null==this._blit)return t;const i=this.renderingContext,n=e.find((({name:e})=>"normals"===e));this._passParameters.normals=n?.getTexture();const s=()=>{(this.heightManifoldEnabled||this.pointDistanceEnabled||this.lineVerticalPlaneSegment||this.intersectsLineEnabled)&&this._renderUnified(),this.pathVerticalPlaneEnabled&&this._renderPath()};if(!this.contrastControlEnabled)return i.bindFramebuffer(t.fbo),s(),t;this._passParameters.colors=t.getTexture();const r=this.fboCache.acquire(t.fbo.width,t.fbo.height,"laser lines");return i.bindFramebuffer(r.fbo),i.setClearColor(0,0,0,0),i.clear(C.COLOR|C.DEPTH),s(),i.unbindTexture(t.getTexture()),this._blit.blend(i,r,t,this.bindParameters)||this.requestRender(T.UPDATE),r.release(),t}_acquireTechnique(){return this._configuration.heightManifoldEnabled=this.heightManifoldEnabled,this._configuration.lineVerticalPlaneEnabled=this.lineVerticalPlaneEnabled,this._configuration.pointDistanceEnabled=this.pointDistanceEnabled,this._configuration.intersectsLineEnabled=this.intersectsLineEnabled,this._configuration.contrastControlEnabled=this.contrastControlEnabled,this._configuration.spherical=this.view.state.viewingMode===u.Global,this._techniques.get(D,this._configuration)}_renderUnified(){if(!this._updatePassParameters())return;const e=this._acquireTechnique();if(e.compiled){const t=this.renderingContext;t.bindTechnique(e,this.bindParameters,this._passParameters),t.screen.draw()}else this.requestRender(T.UPDATE)}_renderPath(){if(null==this._pathVerticalPlaneData)return;const e=this._techniques.get(b,this._pathTechniqueConfiguration);if(e.compiled){const t=this.renderingContext;this._passParameters.origin=this._pathVerticalPlaneData.origin,t.bindTechnique(e,this.bindParameters,this._passParameters),this._pathVerticalPlaneData.draw(t)}else this.requestRender(T.UPDATE)}_updatePassParameters(){if(!this._intersectsLineEnabled)return!0;const e=this.bindParameters.camera,t=this._passParameters;if(this._intersectsLineInfinite){if(a(p(t.intersectsLineSegment.origin,t.intersectsLineSegment.vector),w),w.c0=-Number.MAX_VALUE,!c(e.frustum,w))return!1;l(w,t.lineStartWorld),h(w,t.lineEndWorld)}else s(t.lineStartWorld,t.intersectsLineSegment.origin),r(t.lineEndWorld,t.intersectsLineSegment.origin,t.intersectsLineSegment.vector);return!0}get test(){}};e([i({constructOnly:!0})],j.prototype,"contrastControlEnabled",void 0),e([i()],j.prototype,"isDecoration",void 0),e([i()],j.prototype,"produces",void 0),e([i()],j.prototype,"consumes",void 0),j=e([n("esri.views.3d.webgl-engine.effects.laserlines.LaserLineRenderer")],j);const w=o();export{j as LaserLineRenderer};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import"../../../../../core/has.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{property as i}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as n}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as s,f as r}from"../../../../../chunks/vec32.js";import{create as a,fromRay as o,getStart as l,getEnd as h}from"../../../../../geometry/support/clipRay.js";import{intersectClipRay as c}from"../../../../../geometry/support/frustum.js";import{copy as d}from"../../../../../geometry/support/lineSegment.js";import{wrap as p}from"../../../../../geometry/support/ray.js";import{ViewingMode as u}from"../../../../ViewingMode.js";import{InternalRenderCategory as m}from"../../../webgl.js";import g from"../../../webgl/RenderNode.js";import{Blit as _}from"../blit/Blit.js";import{LaserlinePathData as P}from"./LaserlinePathData.js";import{LaserlinePathPassParameters as f,LaserlinePathTechnique as b}from"./LaserlinePathTechnique.js";import{LaserlinePathTechniqueConfiguration as E}from"./LaserlinePathTechniqueConfiguration.js";import{LaserlineTechnique as D}from"./LaserlineTechnique.js";import{LaserlineTechniqueConfiguration as q}from"./LaserlineTechniqueConfiguration.js";import{RenderRequestType as T}from"../../lib/basicInterfaces.js";import{updateParameters as L}from"../../materials/internal/MaterialUtil.js";import{BlitMode as V}from"../../shaders/CompositingTechniqueConfiguration.js";import{FramebufferBit as C}from"../../../../webgl/enums.js";let j=class extends g{constructor(e){super(e),this.isDecoration=!0,this.produces=m.LASERLINES,this.consumes={required:[m.LASERLINES,"normals"]},this.requireGeometryDepth=!0,this._configuration=new q,this._pathTechniqueConfiguration=new E,this._heightManifoldEnabled=!1,this._pointDistanceEnabled=!1,this._lineVerticalPlaneEnabled=!1,this._intersectsLineEnabled=!1,this._intersectsLineInfinite=!1,this._pathVerticalPlaneEnabled=!1,this._passParameters=new f;const t=e.view.stage.renderView.techniques,i=new E;i.contrastControlEnabled=e.contrastControlEnabled,t.precompile(b,i)}initialize(){this._passParameters.renderCoordsHelper=this.view.renderCoordsHelper,this._pathTechniqueConfiguration.spherical=this.view.state.viewingMode===u.Global,this._pathTechniqueConfiguration.contrastControlEnabled=this.contrastControlEnabled,this._techniques.precompile(b,this._pathTechniqueConfiguration),this._blit=new _(this._techniques,V.PremultipliedAlpha)}destroy(){this._pathVerticalPlaneData=t(this._pathVerticalPlaneData),this._blit=null}get _techniques(){return this.view.stage.renderView.techniques}get heightManifoldEnabled(){return this._heightManifoldEnabled}set heightManifoldEnabled(e){this._heightManifoldEnabled!==e&&(this._heightManifoldEnabled=e,this.requestRender(T.UPDATE))}get heightManifoldTarget(){return this._passParameters.heightManifoldTarget}set heightManifoldTarget(e){s(this._passParameters.heightManifoldTarget,e),this.requestRender(T.UPDATE)}get pointDistanceEnabled(){return this._pointDistanceEnabled}set pointDistanceEnabled(e){e!==this._pointDistanceEnabled&&(this._pointDistanceEnabled=e,this.requestRender(T.UPDATE))}get pointDistanceTarget(){return this._passParameters.pointDistanceTarget}set pointDistanceTarget(e){s(this._passParameters.pointDistanceTarget,e),this.requestRender(T.UPDATE)}get pointDistanceOrigin(){return this._passParameters.pointDistanceOrigin}set pointDistanceOrigin(e){s(this._passParameters.pointDistanceOrigin,e),this.requestRender(T.UPDATE)}get lineVerticalPlaneEnabled(){return this._lineVerticalPlaneEnabled}set lineVerticalPlaneEnabled(e){e!==this._lineVerticalPlaneEnabled&&(this._lineVerticalPlaneEnabled=e,this.requestRender(T.UPDATE))}get lineVerticalPlaneSegment(){return this._passParameters.lineVerticalPlaneSegment}set lineVerticalPlaneSegment(e){d(e,this._passParameters.lineVerticalPlaneSegment),this.requestRender(T.UPDATE)}get intersectsLineEnabled(){return this._intersectsLineEnabled}set intersectsLineEnabled(e){e!==this._intersectsLineEnabled&&(this._intersectsLineEnabled=e,this.requestRender(T.UPDATE))}get intersectsLineSegment(){return this._passParameters.intersectsLineSegment}set intersectsLineSegment(e){d(e,this._passParameters.intersectsLineSegment),this.requestRender(T.UPDATE)}get intersectsLineInfinite(){return this._intersectsLineInfinite}set intersectsLineInfinite(e){e!==this._intersectsLineInfinite&&(this._intersectsLineInfinite=e,this.requestRender(T.UPDATE))}get pathVerticalPlaneEnabled(){return this._pathVerticalPlaneEnabled}set pathVerticalPlaneEnabled(e){e!==this._pathVerticalPlaneEnabled&&(this._pathVerticalPlaneEnabled=e,null!=this._pathVerticalPlaneData&&this.requestRender(T.UPDATE))}set pathVerticalPlaneVertices(e){null==this._pathVerticalPlaneData&&(this._pathVerticalPlaneData=new P(this._passParameters.renderCoordsHelper)),this._pathVerticalPlaneData.vertices=e,this.pathVerticalPlaneEnabled&&this.requestRender(T.UPDATE)}set pathVerticalPlaneBuffers(e){null==this._pathVerticalPlaneData&&(this._pathVerticalPlaneData=new P(this._passParameters.renderCoordsHelper)),this._pathVerticalPlaneData.buffers=e,this.pathVerticalPlaneEnabled&&this.requestRender(T.UPDATE)}setParameters(e){L(this._passParameters,e)&&this.requestRender(T.UPDATE)}precompile(){this._acquireTechnique()}render(e){const t=e.find((({name:e})=>e===this.produces));if(this.isDecoration&&!this.bindParameters.decorations||null==this._blit)return t;const i=this.renderingContext,n=e.find((({name:e})=>"normals"===e));this._passParameters.normals=n?.getTexture();const s=()=>{(this.heightManifoldEnabled||this.pointDistanceEnabled||this.lineVerticalPlaneSegment||this.intersectsLineEnabled)&&this._renderUnified(),this.pathVerticalPlaneEnabled&&this._renderPath()};if(!this.contrastControlEnabled)return i.bindFramebuffer(t.fbo),s(),t;this._passParameters.colors=t.getTexture();const r=this.fboCache.acquire(t.fbo.width,t.fbo.height,"laser lines");return i.bindFramebuffer(r.fbo),i.setClearColor(0,0,0,0),i.clear(C.COLOR|C.DEPTH),s(),i.unbindTexture(t.getTexture()),this._blit.blend(i,r,t,this.bindParameters)||this.requestRender(T.UPDATE),r.release(),t}_acquireTechnique(){return this._configuration.heightManifoldEnabled=this.heightManifoldEnabled,this._configuration.lineVerticalPlaneEnabled=this.lineVerticalPlaneEnabled,this._configuration.pointDistanceEnabled=this.pointDistanceEnabled,this._configuration.intersectsLineEnabled=this.intersectsLineEnabled,this._configuration.contrastControlEnabled=this.contrastControlEnabled,this._configuration.spherical=this.view.state.viewingMode===u.Global,this._techniques.get(D,this._configuration)}_renderUnified(){if(!this._updatePassParameters())return;const e=this._acquireTechnique();if(e.compiled){const t=this.renderingContext;t.bindTechnique(e,this.bindParameters,this._passParameters),t.screen.draw()}else this.requestRender(T.UPDATE)}_renderPath(){if(null==this._pathVerticalPlaneData)return;const e=this._techniques.get(b,this._pathTechniqueConfiguration);if(e.compiled){const t=this.renderingContext;this._passParameters.origin=this._pathVerticalPlaneData.origin,t.bindTechnique(e,this.bindParameters,this._passParameters),this._pathVerticalPlaneData.draw(t)}else this.requestRender(T.UPDATE)}_updatePassParameters(){if(!this._intersectsLineEnabled)return!0;const e=this.bindParameters.camera,t=this._passParameters;if(this._intersectsLineInfinite){if(o(p(t.intersectsLineSegment.origin,t.intersectsLineSegment.vector),w),w.c0=-Number.MAX_VALUE,!c(e.frustum,w))return!1;l(w,t.lineStartWorld),h(w,t.lineEndWorld)}else s(t.lineStartWorld,t.intersectsLineSegment.origin),r(t.lineEndWorld,t.intersectsLineSegment.origin,t.intersectsLineSegment.vector);return!0}get test(){}};e([i({constructOnly:!0})],j.prototype,"contrastControlEnabled",void 0),e([i()],j.prototype,"isDecoration",void 0),e([i()],j.prototype,"produces",void 0),e([i()],j.prototype,"consumes",void 0),j=e([n("esri.views.3d.webgl-engine.effects.laserlines.LaserLineRenderer")],j);const w=a();export{j as LaserLineRenderer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../../../chunks/tslib.es6.js";import{ShaderTechniqueConfiguration as r,parameter as t}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class e extends r{constructor(){super(...arguments),this.contrastControlEnabled=!1,this.spherical=!1}}o([t()],e.prototype,"contrastControlEnabled",void 0),o([t()],e.prototype,"spherical",void 0);export{e as LaserlinePathTechniqueConfiguration};
5
+ import{_ as o}from"../../../../../chunks/tslib.es6.js";import{parameter as r,ShaderTechniqueConfiguration as t}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class e extends t{constructor(){super(...arguments),this.contrastControlEnabled=!1,this.spherical=!1}}o([r()],e.prototype,"contrastControlEnabled",void 0),o([r()],e.prototype,"spherical",void 0);export{e as LaserlinePathTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{VertexAttribute as O}from"./VertexAttribute.js";const E=new Map([[O.POSITION,0],[O.NORMAL,1],[O.NORMALCOMPRESSED,1],[O.UV0,2],[O.UVI,2],[O.COLOR,3],[O.COLORFEATUREATTRIBUTE,3],[O.SIZE,4],[O.TANGENT,4],[O.CENTEROFFSETANDDISTANCE,5],[O.SYMBOLCOLOR,5],[O.FEATUREATTRIBUTE,6],[O.INSTANCEFEATUREATTRIBUTE,6],[O.INSTANCECOLOR,7],[O.OLIDCOLOR,7],[O.INSTANCEOBJECTANDLAYERIDCOLOR,7],[O.ROTATION,8],[O.INSTANCEMODEL,8],[O.INSTANCEMODELNORMAL,12],[O.INSTANCEMODELORIGINHI,11],[O.INSTANCEMODELORIGINLO,15]]);export{E as Default3D};
5
+ import{VertexAttribute as O}from"./VertexAttribute.js";const E=new Map([[O.POSITION,0],[O.NORMAL,1],[O.NORMALCOMPRESSED,1],[O.UV0,2],[O.UVI,2],[O.COLOR,3],[O.COLORFEATUREATTRIBUTE,3],[O.SIZE,4],[O.TANGENT,4],[O.CENTEROFFSETANDDISTANCE,5],[O.SYMBOLCOLOR,5],[O.FEATUREATTRIBUTE,6],[O.INSTANCEFEATUREATTRIBUTE,6],[O.OLIDCOLOR,6],[O.INSTANCEOBJECTANDLAYERIDCOLOR,6],[O.INSTANCECOLOR,7],[O.ROTATION,8],[O.INSTANCEMODEL,8],[O.INSTANCEMODELNORMAL,12],[O.INSTANCEMODELORIGINHI,11],[O.INSTANCEMODELORIGINLO,15]]);export{E as Default3D};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{IntersectorResult as r,isValidIntersectorResult as e}from"./IntersectorResult.js";import{IntersectorType as s}from"./IntersectorType.js";import{ObjectTarget as o}from"./ObjectTarget.js";class c extends r{constructor(){super(...arguments),this.intersector=s.HUD}}class i extends o{constructor(r,e){super(r.object,r.geometryId,r.primitiveIndex),this.center=t(e)}}function n(t){return e(t)&&t.intersector===s.HUD&&!!t.target&&"center"in t.target}export{c as HUDIntersectorResult,i as HUDTarget,n as isHUDIntersectorResult};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{copy as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as r,IDENTITY as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{g as s,l as e,f as n,c as a,n as o,t as h}from"../../../../chunks/vec32.js";import{create as c,UNIT_Z as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{t as l}from"../../../../chunks/vec42.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as f,copy as y,fromPoints as u}from"../../../../geometry/support/ray.js";import{ViewingMode as p}from"../../../ViewingMode.js";import{IntersectorType as g,IntersectorOptions as _,StoreResults as O}from"./IntersectorInterfaces.js";import{HudTarget as L}from"./IntersectorTarget.js";import{isValidIntersectorResult as v}from"./intersectorUtils.js";import{IntersectorTransform as j,getVerticalOffsetObject3D as b}from"./verticalOffsetUtils.js";const w=1e-5;class E{constructor(t){this.options=new _,this._results=new T,this.transform=new j,this.tolerance=w,this.verticalOffset=null,this._ray=f(),this._rayEnd=c(),this._rayBeginTransformed=c(),this._rayEndTransformed=c(),this.viewingMode=t??p.Global}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(t,r,i){this.resetWithRay(u(t,r,this._ray),i)}resetWithRay(t,r){this.camera=r,t!==this._ray&&y(t,this._ray),0!==this.options.verticalOffset?this.viewingMode===p.Local?this._ray.origin[2]-=this.options.verticalOffset:this.verticalOffset=this.options.verticalOffset:this.verticalOffset=null,n(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray)}intersect(t=null,r,i,s,e){this.point=r,this.filterPredicate=s,this.tolerance=i??w;const n=b(this.verticalOffset);if(t&&t.length>0){const r=e?t=>{e(t)&&this.intersectObject(t)}:t=>{this.intersectObject(t)};for(const i of t){const t=i.getSpatialQueryAccelerator?.();null!=t?(null!=n?t.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,r,n):t.forEachAlongRay(this._ray.origin,this._ray.direction,r),this.options.selectionMode&&this.options.hud&&t.forEachDegenerateObject(r)):i.objects.forEach((t=>r(t)))}}this.sortResults()}intersectObject(t){const r=t.geometries;if(!r)return;const i=t.effectiveTransformation,s=b(this.verticalOffset);for(const e of r){if(!e.visible)continue;const{material:r,id:n}=e;if(!r.visible)continue;this.transform.setAndInvalidateLazyTransforms(i,e.transformation),h(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),h(this._rayEndTransformed,this.rayEnd,this.transform.inverse);const a=this.transform.transform;null!=s&&(s.objectTransform=this.transform),r.intersect(e,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,((r,i,s,e,o,h)=>this.handleObjectIntersection({object:t,geometryId:n,primitiveIndex:s},r,i,e,a,o,h)))}}handleObjectIntersection(t,r,s,e,n,a,o){if(r<0)return;if(null!=this.filterPredicate&&!this.filterPredicate(this._ray.origin,this._rayEnd,r))return;const h=e?this._results.hud:this._results,c=e?e=>{const n=new L(t.object,t.geometryId,t.primitiveIndex,o);e.set(g.HUD,n,r,s,i,a)}:i=>i.set(g.OBJECT,t,r,s,n,a);if((null==h.min.drapedLayerOrder||a>=h.min.drapedLayerOrder)&&(null==h.min.dist||r<h.min.dist)&&c(h.min),this.options.store!==O.MIN&&(null==h.max.drapedLayerOrder||a<h.max.drapedLayerOrder)&&(null==h.max.dist||r>h.max.dist)&&c(h.max),this.options.store===O.ALL)if(e){const t=new B(this._ray);c(t),this._results.hud.all.push(t)}else{const t=new A(this._ray);c(t),this._results.all.push(t)}}sortResults(t=this._results.all){t.sort(((t,r)=>t.dist!==r.dist?(t.dist??0)-(r.dist??0):t.drapedLayerOrder!==r.drapedLayerOrder?x(t.drapedLayerOrder,r.drapedLayerOrder):x(t.drapedLayerGraphicOrder,r.drapedLayerGraphicOrder)))}}function x(t,r){return(r??-Number.MAX_VALUE)-(t??-Number.MAX_VALUE)}function I(t){return new E(t)}class T{constructor(){this.min=new A(f()),this.max=new A(f()),this.hud={min:new B(f()),max:new B(f()),all:new Array},this.ground=new A(f()),this.all=[]}init(t){this.min.init(t),this.max.init(t),this.ground.init(t),this.all.length=0,this.hud.min.init(t),this.hud.max.init(t),this.hud.all.length=0}}class A{get ray(){return this._ray}get distanceInRenderSpace(){return null!=this.dist?(s(G,this.ray.direction,this.dist),e(G)):null}withinDistance(t){return!!v(this)&&this.distanceInRenderSpace<=t}getIntersectionPoint(t){return!!v(this)&&(s(G,this.ray.direction,this.dist),n(t,this.ray.origin,G),!0)}getTransformedNormal(t){return a(M,this.normal),M[3]=0,l(M,M,this.transformation),a(t,M),o(t,t)}constructor(t){this.intersector=g.OBJECT,this.normal=c(),this.transformation=r(),this._ray=f(),this.init(t)}init(t){this.dist=null,this.target=null,this.drapedLayerOrder=null,this.drapedLayerGraphicOrder=null,this.intersector=g.OBJECT,y(t,this._ray)}set(r,s,e,n,o,h,c){this.intersector=r,this.dist=e,a(this.normal,n??d),t(this.transformation,o??i),this.target=s,this.drapedLayerOrder=h,this.drapedLayerGraphicOrder=c}copy(r){y(r.ray,this._ray),this.intersector=r.intersector,this.dist=r.dist,this.target=r.target,this.drapedLayerOrder=r.drapedLayerOrder,this.drapedLayerGraphicOrder=r.drapedLayerGraphicOrder,a(this.normal,r.normal),t(this.transformation,r.transformation)}}class B extends A{constructor(){super(...arguments),this.intersector=g.HUD}}function R(t){return new A(t)}const G=c(),M=m();export{w as defaultTolerance,I as newIntersector,R as newIntersectorResult};
5
+ import{f as t,t as r}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as i,fromPoints as e,copy as n}from"../../../../geometry/support/ray.js";import{ViewingMode as a}from"../../../ViewingMode.js";import o from"../../webgl/RenderCamera.js";import{HUDTarget as h,HUDIntersectorResult as c}from"./HUDIntersectorResult.js";import{IntersectorOptions as l,StoreResults as f}from"./IntersectorInterfaces.js";import{IntersectorResult as d}from"./IntersectorResult.js";import{IntersectorType as m}from"./IntersectorType.js";import{IntersectorTransform as u,getVerticalOffsetObject3D as y}from"./verticalOffsetUtils.js";const _=1e-5;class g{constructor(t){this.options=new l,this._results=new O,this.transform=new u,this.camera=new o,this.tolerance=_,this.verticalOffset=null,this._ray=i(),this._rayEnd=s(),this._rayBeginTransformed=s(),this._rayEndTransformed=s(),this.viewingMode=t??a.Global}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(t,r,s){this.resetWithRay(e(t,r,this._ray),s)}resetWithRay(r,s){this.camera=s,r!==this._ray&&n(r,this._ray),0!==this.options.verticalOffset?this.viewingMode===a.Local?this._ray.origin[2]-=this.options.verticalOffset:this.verticalOffset=this.options.verticalOffset:this.verticalOffset=null,t(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray)}intersect(t=null,r,s,i,e){this.point=r,this.filterPredicate=i,this.tolerance=s??_;const n=y(this.verticalOffset);if(t&&t.length>0){const r=e?t=>{e(t)&&this.intersectObject(t)}:t=>{this.intersectObject(t)};for(const s of t){const t=s.getSpatialQueryAccelerator?.();null!=t?(null!=n?t.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,r,n):t.forEachAlongRay(this._ray.origin,this._ray.direction,r),this.options.selectionMode&&this.options.hud&&t.forEachDegenerateObject(r)):s.objects.forEach((t=>r(t)))}}this.sortResults()}intersectObject(t){const s=t.geometries;if(!s)return;const i=t.effectiveTransformation,e=y(this.verticalOffset);for(const n of s){if(!n.visible)continue;const{material:s,id:a}=n;if(!s.visible)continue;this.transform.setAndInvalidateLazyTransforms(i,n.transformation),r(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),r(this._rayEndTransformed,this.rayEnd,this.transform.inverse);const o=this.transform.transform;null!=e&&(e.objectTransform=this.transform),s.intersect(n,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,((r,s,i,e)=>this.handleObjectIntersection({object:t,geometryId:a,primitiveIndex:i},r,s,o,e)))}}handleObjectIntersection(t,r,s,i,e){if(r<0||null!=this.filterPredicate&&!this.filterPredicate(this._ray.origin,this._rayEnd,r))return;const n=e?this._results.hud:this._results;t=e?new h(t,e):t;const a=e?i=>i.set(m.HUD,t,r,s):e=>e.set(m.OBJECT,t,r,s,i);if((null==n.min.distance||r<n.min.distance)&&a(n.min),this.options.store!==f.MIN&&(null==n.max.distance||r>n.max.distance)&&a(n.max),this.options.store===f.ALL)if(e){const t=new c(this._ray);a(t),this._results.hud.all.push(t)}else{const t=new d(this._ray);a(t),this._results.all.push(t)}}sortResults(t=this._results.all){t.sort(((t,r)=>t.distance!==r.distance?(t.distance??0)-(r.distance??0):t.drapedLayerOrder!==r.drapedLayerOrder?p(t.drapedLayerOrder,r.drapedLayerOrder):p(t.renderPriority,r.renderPriority)))}}function p(t,r){return(r??-Number.MAX_VALUE)-(t??-Number.MAX_VALUE)}class O{constructor(){this.min=new d(i()),this.max=new d(i()),this.hud={min:new c(i()),max:new c(i()),all:new Array},this.ground=new d(i()),this.all=[]}init(t){this.min.init(t),this.max.init(t),this.ground.init(t),this.all.length=0,this.hud.min.init(t),this.hud.max.init(t),this.hud.all.length=0}}export{g as Intersector,_ as defaultTolerance};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- var i,e;!function(i){i[i.OBJECT=0]="OBJECT",i[i.HUD=1]="HUD",i[i.TERRAIN=2]="TERRAIN",i[i.OVERLAY=3]="OVERLAY",i[i.I3S=4]="I3S",i[i.PCL=5]="PCL",i[i.LOD=6]="LOD",i[i.VOXEL=7]="VOXEL",i[i.TILES3D=8]="TILES3D"}(i||(i={}));class s{constructor(){this.verticalOffset=0,this.selectionMode=!1,this.hud=!0,this.selectOpaqueTerrainOnly=!0,this.invisibleTerrain=!1,this.backfacesTerrain=!0,this.isFiltered=!1,this.filteredLayerViewUids=[],this.store=e.ALL,this.normalRequired=!0,this.excludeLabels=!1}}!function(i){i[i.MIN=0]="MIN",i[i.MINMAX=1]="MINMAX",i[i.ALL=2]="ALL"}(e||(e={}));export{s as IntersectorOptions,i as IntersectorType,e as StoreResults};
5
+ class e{constructor(){this.verticalOffset=0,this.selectionMode=!1,this.hud=!0,this.selectOpaqueTerrainOnly=!0,this.invisibleTerrain=!1,this.backfacesTerrain=!0,this.isFiltered=!1,this.filteredLayerViewUids=[],this.store=i.ALL,this.normalRequired=!0,this.excludeLabels=!1}}var i;!function(e){e[e.MIN=0]="MIN",e[e.MINMAX=1]="MINMAX",e[e.ALL=2]="ALL"}(i||(i={}));export{e as IntersectorOptions,i as StoreResults};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ import{copy as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as r,IDENTITY as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{g as s,l as e,f as a,c as n,n as o}from"../../../../chunks/vec32.js";import{create as c,UNIT_Z as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{t as m}from"../../../../chunks/vec42.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as l,copy as y}from"../../../../geometry/support/ray.js";import{IntersectorType as f}from"./IntersectorType.js";class p{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:(s(u,this.ray.direction,this.distance),e(u))}withinDistance(t){return!!g(this)&&this.distanceInRenderSpace<=t}getIntersectionPoint(t){return!!g(this)&&(s(u,this.ray.direction,this.distance),a(t,this.ray.origin,u),!0)}getTransformedNormal(t){return n(j,this.normal),j[3]=0,m(j,j,this.transformation),n(t,j),o(t,t)}constructor(t){this.intersector=f.OBJECT,this.normal=c(),this.transformation=r(),this._ray=l(),this.init(t)}init(t){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=f.OBJECT,y(t,this._ray)}set(r,s,e,a,o,c,m){this.intersector=r,this.distance=e,n(this.normal,a??h),t(this.transformation,o??i),this.target=s,this.drapedLayerOrder=c,this.renderPriority=m}copy(r){y(r.ray,this._ray),this.intersector=r.intersector,this.distance=r.distance,this.target=r.target,this.drapedLayerOrder=r.drapedLayerOrder,this.renderPriority=r.renderPriority,n(this.normal,r.normal),t(this.transformation,r.transformation)}}function g(t){return null!=t?.distance}const u=c(),j=d();export{p as IntersectorResult,g as isValidIntersectorResult};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{clone as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";class t{constructor(s,t,e){this.object=s,this.geometryId=t,this.primitiveIndex=e}}class e extends t{constructor(t,e,r,c){super(t,e,r),this.center=null!=c?s(c):null}}class r extends e{}class c{constructor(s){this.layerViewUid=s}}class i extends c{constructor(s,t){super(s),this.graphicUid=t}}export{i as Graphic3DTarget,e as HudTarget,c as LayerTarget,t as ObjectTarget,r as ValidHudTarget};
5
+ class s{constructor(s){this.layerViewUid=s}}class r extends s{constructor(s,r){super(s),this.graphicUid=r}}export{r as Graphic3DTarget,s as LayerTarget};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ var E;!function(E){E[E.OBJECT=0]="OBJECT",E[E.HUD=1]="HUD",E[E.TERRAIN=2]="TERRAIN",E[E.OVERLAY=3]="OVERLAY",E[E.I3S=4]="I3S",E[E.PCL=5]="PCL",E[E.LOD=6]="LOD",E[E.VOXEL=7]="VOXEL",E[E.TILES3D=8]="TILES3D"}(E||(E={}));export{E as IntersectorType};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{releaseMaybe as e}from"../../../../core/maybe.js";import{c as t}from"../../../../chunks/vec42.js";import{ZEROS as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ColorFormat as r,DepthTextureFormat as o}from"../core/FBOCacheFormats.js";import{ViewportSize as h}from"./BindParameters.js";import{FramebufferBit as c,ColorAttachment1 as l}from"../../../webgl/enums.js";import{ensureAttachmentMaxSize as _}from"../../../webgl/FramebufferObject.js";class a{constructor(e){this._fbos=e,this._requiresEmission=!1,this._size=new h(0,0),this._clearColor=s()}dispose(){this._color=e(this._color),this.releaseDepth()}initialize(e,i,s,r){this._size.width=e,this._size.height=i,_(this._size,this._fbos.rctx.parameters.maxTextureSize);const o=this._color;return this._color=null,this.releaseDepth(),this._requiresEmission=r,t(this._clearColor,s),o}releaseDepth(){this._color?.detachDepth(),this._depth=e(this._depth)}update(e){const t=this._ensureColor();t.attachDepth(this.depth),this._color=e(t)}bind(){const{rctx:e}=this._fbos,t=null==this._color;this.color.attachDepth(this.depth),e.bindFramebuffer(this.color.fbo),t&&(e.setClearStencil(0),e.setClearColor(this._clearColor[0],this._clearColor[1],this._clearColor[2],this._clearColor[3]),e.clear(c.COLOR|c.DEPTH|c.STENCIL),this._requiresEmission&&e.clearBuffer(1,i))}_acquireColor(){return this._requiresEmission?this._fbos.acquire(this._size.width,this._size.height,"acquired-color").acquireColor(l,r.RGBA16FLOAT,"emissive"):this._fbos.acquire(this._size.width,this._size.height,"acquired-color")}_acquireDepth(){return this._fbos.acquireDepth(o.DEPTH24_STENCIL8,this._size.width,this._size.height,"depth")}get size(){return this._size}get color(){return this._ensureColor()}get depth(){return this._depth??=this._acquireDepth(),this._depth}_ensureColor(){return this._color??=this._acquireColor(),this._color}}export{a as MainFramebuffer};
5
+ import{releaseMaybe as e}from"../../../../core/maybe.js";import{c as t}from"../../../../chunks/vec42.js";import{ZEROS as i}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ColorFormat as r,DepthFormat as o}from"../core/FBOCacheFormats.js";import{ViewportSize as h}from"./BindParameters.js";import{FramebufferBit as c,ColorAttachment1 as l}from"../../../webgl/enums.js";import{ensureAttachmentMaxSize as _}from"../../../webgl/FramebufferObject.js";class a{constructor(e){this._fbos=e,this._requiresEmission=!1,this._size=new h(0,0),this._clearColor=s()}dispose(){this._color=e(this._color),this.releaseDepth()}initialize(e,i,s,r){this._size.width=e,this._size.height=i,_(this._size,this._fbos.rctx.parameters.maxTextureSize);const o=this._color;return this._color=null,this.releaseDepth(),this._requiresEmission=r,t(this._clearColor,s),o}releaseDepth(){this._color?.detachDepth(),this._depth=e(this._depth)}update(e){const t=this._ensureColor();t.attachDepth(this.depth),this._color=e(t)}bind(){const{rctx:e}=this._fbos,t=null==this._color;this.color.attachDepth(this.depth),e.bindFramebuffer(this.color.fbo),t&&(e.setClearStencil(0),e.setClearColor(this._clearColor[0],this._clearColor[1],this._clearColor[2],this._clearColor[3]),e.clear(c.COLOR|c.DEPTH|c.STENCIL),this._requiresEmission&&e.clearBuffer(1,i))}_acquireColor(){return this._requiresEmission?this._fbos.acquire(this._size.width,this._size.height,"acquired-color").acquireColor(l,r.RGBA16FLOAT,"emissive"):this._fbos.acquire(this._size.width,this._size.height,"acquired-color")}_acquireDepth(){return this._fbos.acquireDepth(o.DEPTH24_STENCIL8,this._size.width,this._size.height,"depth")}get size(){return this._size}get color(){return this._ensureColor()}get depth(){return this._depth??=this._acquireDepth(),this._depth}_ensureColor(){return this._color??=this._acquireColor(),this._color}}export{a as MainFramebuffer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{generateUID as e}from"../../../../core/uid.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ShaderOutput as t}from"../core/shaderLibrary/ShaderOutput.js";import{Default3D as i}from"./DefaultVertexAttributeLocations.js";import{DefaultTechniqueConfiguration as s}from"../materials/DefaultTechniqueConfiguration.js";import{updateParameters as a}from"../materials/internal/MaterialUtil.js";import{NoParameters as n}from"../../../webgl/NoParameters.js";class o{constructor(t,s){this.id=e(),this.supportsEdges=!1,this._renderPriority=0,this.vertexAttributeLocations=i,this._pp0=r(0,0,1),this._pp1=r(0,0,0),this._parameters=new s,a(this._parameters,t),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,r=!0){a(this._parameters,e)&&(this.validateParameters(this._parameters),r&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&!!(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}get hasEmissions(){return!1}getConfiguration(e,r,i=new s){return i.output=e,i.hasHighlightMixTexture=e===t.Highlight&&null!=r.highlightMixTexture,i}intersectDraped(e,r,t,i,s,a){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this.intersect(e,r,t,this._pp0,this._pp1,s)}}var p;!function(e){e[e.None=0]="None",e[e.Occlude=1]="Occlude",e[e.Transparent=2]="Transparent",e[e.OccludeAndTransparent=4]="OccludeAndTransparent",e[e.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",e[e.Opaque=16]="Opaque"}(p||(p={}));class h extends n{constructor(){super(...arguments),this.renderOccluded=p.Occlude,this.isDecoration=!1}}export{o as Material,h as MaterialParameters,p as RenderOccludedFlag};
5
+ import{generateUID as e}from"../../../../core/uid.js";import{ShaderOutput as r}from"../core/shaderLibrary/ShaderOutput.js";import{Default3D as t}from"./DefaultVertexAttributeLocations.js";import{DefaultTechniqueConfiguration as i}from"../materials/DefaultTechniqueConfiguration.js";import{updateParameters as s}from"../materials/internal/MaterialUtil.js";import{NoParameters as a}from"../../../webgl/NoParameters.js";class n{constructor(r,i){this.id=e(),this.supportsEdges=!1,this.vertexAttributeLocations=t,this._renderPriority=0,this._parameters=new i,s(this._parameters,r),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,r=!0){s(this._parameters,e)&&(this.validateParameters(this._parameters),r&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&!!(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}get hasEmissions(){return!1}getConfiguration(e,t,s=new i){return s.output=e,s.hasHighlightMixTexture=e===r.Highlight&&null!=t.highlightMixTexture,s}}var o;!function(e){e[e.None=0]="None",e[e.Occlude=1]="Occlude",e[e.Transparent=2]="Transparent",e[e.OccludeAndTransparent=4]="OccludeAndTransparent",e[e.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",e[e.Opaque=16]="Opaque"}(o||(o={}));class u extends a{constructor(){super(...arguments),this.renderOccluded=o.Occlude,this.isDecoration=!1}}export{n as Material,u as MaterialParameters,o as RenderOccludedFlag};