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

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 (431) 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/06eb4832b6c86744e52e.js +1 -0
  49. package/assets/esri/core/workers/chunks/0766ecb677d667e5fb83.js +2 -0
  50. package/assets/esri/core/workers/chunks/{543eb46b55cacd6e1dbc.js.LICENSE.txt → 0766ecb677d667e5fb83.js.LICENSE.txt} +1 -1
  51. package/assets/esri/core/workers/chunks/{c607d618b64d3accecc4.js → 0aca29f7156b2b412f2e.js} +1 -1
  52. package/assets/esri/core/workers/chunks/170c346cf5a18adb25b0.js +1 -0
  53. package/assets/esri/core/workers/chunks/1c6542315390037053a6.js +1 -0
  54. package/assets/esri/core/workers/chunks/218a66d53f7cf4f285aa.js +2 -0
  55. package/assets/esri/core/workers/chunks/{d8dc922f7466300b668f.js.LICENSE.txt → 218a66d53f7cf4f285aa.js.LICENSE.txt} +2 -2
  56. package/assets/esri/core/workers/chunks/{037af6379f3e9278633b.js → 243dc74ec62891ba1ef7.js} +1 -1
  57. package/assets/esri/core/workers/chunks/253bcc3cc7bc4c2dc6ea.js +1 -0
  58. package/assets/esri/core/workers/chunks/{d874d24568b1acedebc4.js → 297d2c0a9d3f1e978318.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{f74b5659b6496a5c4c0c.js → 2e0af748eba93f3ea6cb.js} +1 -1
  60. package/assets/esri/core/workers/chunks/3596540ef49e5330ceb2.js +2 -0
  61. package/assets/esri/core/workers/chunks/{7b4523ab392966624d97.js.LICENSE.txt → 3596540ef49e5330ceb2.js.LICENSE.txt} +1 -7
  62. package/assets/esri/core/workers/chunks/{a22c88b0a525e602dce0.js → 3d0e09ef78dc2fd6957a.js} +1 -1
  63. package/assets/esri/core/workers/chunks/4bd5cbf6e0be2fc7e84d.js +1 -0
  64. package/assets/esri/core/workers/chunks/4feb774f123da26e9f2a.js +1 -0
  65. package/assets/esri/core/workers/chunks/{ee1d104e2bcc5d808fa4.js → 5228fc7fcdf57f44781e.js} +1 -1
  66. package/assets/esri/core/workers/chunks/54f4a1131f99468db076.js +1 -0
  67. package/assets/esri/core/workers/chunks/{49c968e91c3c48aaa110.js → 5583d18032ed8bc17c74.js} +1 -1
  68. package/assets/esri/core/workers/chunks/5e7f35bf1aab93cb1c52.js +1 -0
  69. package/assets/esri/core/workers/chunks/{69f7fe6c58e4931597f6.js → 631205dc4d73d49ec9ed.js} +1 -1
  70. package/assets/esri/core/workers/chunks/6e12900a9f4c3c9941ec.js +1 -0
  71. package/assets/esri/core/workers/chunks/7e8f78b96d43c224c7b6.js +1 -0
  72. package/assets/esri/core/workers/chunks/{e46c05ef7272c7f1f70c.js → 83d6a1b3db7d364d156b.js} +1 -1
  73. package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
  74. package/assets/esri/core/workers/chunks/90ae15ce22a49bd84876.js +2 -0
  75. package/assets/esri/core/workers/chunks/{ac9c6779771ec855da79.js.LICENSE.txt → 90ae15ce22a49bd84876.js.LICENSE.txt} +3 -3
  76. package/assets/esri/core/workers/chunks/92cbe9af8a6c061bfb57.js +346 -0
  77. package/assets/esri/core/workers/chunks/{9aedd7874da7c63865d6.js → 93cc26e5636040fdc0b8.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{77c7b7c4426c2b1a5b42.js → 9fc35ec8185beba96715.js} +1 -1
  79. package/assets/esri/core/workers/chunks/a1d697e2be1e892a666a.js +1 -0
  80. package/assets/esri/core/workers/chunks/{4f627eb62caee760215a.js → a1f27c4f4b5ef3e359f7.js} +1 -1
  81. package/assets/esri/core/workers/chunks/a31658f544ac6e1801d6.js +1 -0
  82. package/assets/esri/core/workers/chunks/{3a205f87f100832ef9f5.js → a5e746e10239a3bfe237.js} +1 -1
  83. package/assets/esri/core/workers/chunks/a6bcae413e62cd879b46.js +1 -0
  84. package/assets/esri/core/workers/chunks/{59d4c41172e921922cac.js → a8b42d8c0b76c234c09f.js} +100 -62
  85. package/assets/esri/core/workers/chunks/b4f38fe9cc948a39ad87.js +2 -0
  86. package/assets/esri/core/workers/chunks/{ce9de24cb96b56d20562.js.LICENSE.txt → b4f38fe9cc948a39ad87.js.LICENSE.txt} +1 -1
  87. package/assets/esri/core/workers/chunks/{752ef63d910852b7be44.js → c16e0da7a19310c71e8b.js} +1 -1
  88. package/assets/esri/core/workers/chunks/d22f91bc16a7641bcbef.js +1 -0
  89. package/assets/esri/core/workers/chunks/d551f70560a2b1ef5696.js +1 -0
  90. package/assets/esri/core/workers/chunks/d7b640f7a181bd26c7c7.js +1 -0
  91. package/assets/esri/core/workers/chunks/{2bdbf678d4f013543dbb.js → d971571a957de70d5a8d.js} +1 -1
  92. package/assets/esri/core/workers/chunks/dc3a6beb3028009b3c23.js +1 -0
  93. package/assets/esri/core/workers/chunks/e0dc8794343c2a949ffb.js +2 -0
  94. package/assets/esri/core/workers/chunks/{670a66617249f2d15a62.js.LICENSE.txt → e0dc8794343c2a949ffb.js.LICENSE.txt} +1 -1
  95. package/assets/esri/core/workers/chunks/e3c1aea34ece8336dae1.js +1 -0
  96. package/assets/esri/core/workers/chunks/e483d2f169e51a361742.js +1 -0
  97. package/assets/esri/core/workers/chunks/{a50cb1fc8c4c585c0e11.js → ec8e8048b3df2c92008d.js} +1 -1
  98. package/assets/esri/core/workers/chunks/f6a1fec33b0d81acce61.js +1 -0
  99. package/assets/esri/core/workers/chunks/f7ab3511f6627f467796.js +1 -0
  100. package/assets/esri/core/workers/chunks/{1eef9cf19634c038b59b.js → f98689562017583f73ee.js} +1 -1
  101. package/assets/esri/core/workers/chunks/fb2e28e6a87956267d1c.js +66 -0
  102. package/assets/esri/core/workers/chunks/fbcd94f60f92257a7303.js +2 -0
  103. package/assets/esri/core/workers/chunks/{c2594024d72133d3ed7b.js.LICENSE.txt → fbcd94f60f92257a7303.js.LICENSE.txt} +1 -1
  104. package/assets/esri/core/workers/chunks/fda48126f67e80034404.js +1 -0
  105. package/assets/esri/themes/base/widgets/_FeatureTable.scss +1 -0
  106. package/assets/esri/themes/dark/main.css +1 -1
  107. package/assets/esri/themes/light/main.css +1 -1
  108. package/assets/esri/themes/light/view.css +1 -1
  109. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
  110. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
  111. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
  112. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
  113. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
  114. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
  115. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
  116. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
  117. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
  118. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
  119. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
  120. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
  121. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
  122. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
  123. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
  124. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
  125. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
  126. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
  127. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
  128. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
  129. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
  130. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
  131. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
  132. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
  133. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
  134. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
  135. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
  136. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
  137. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
  138. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
  139. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
  140. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
  141. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
  142. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
  143. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
  144. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
  145. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
  146. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
  147. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
  148. package/chunks/HUDMaterial.glsl.js +1 -1
  149. package/chunks/Laserlines.glsl.js +2 -2
  150. package/chunks/aiServices.js +1 -1
  151. package/chunks/boundedPlane.js +1 -1
  152. package/chunks/cameraUtilsSpherical.js +1 -1
  153. package/chunks/vec32.js +1 -1
  154. package/core/has.js +1 -1
  155. package/core/libs/gl-matrix-2/math/mat4.js +1 -1
  156. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  157. package/core/mapCollectionUtils.js +1 -1
  158. package/core/perspectiveUtils.js +1 -1
  159. package/core/sql/StandardizedFunctions.js +1 -1
  160. package/core/sql/WhereGrammar.js +1 -1
  161. package/geometry/support/axisAngleDegrees.js +1 -1
  162. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  163. package/geometry/support/curves/circleUtils.js +1 -1
  164. package/geometry/support/curves/curveExtent.js +5 -0
  165. package/geometry/support/curves/curveLength.js +5 -0
  166. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  167. package/geometry/support/curves/ellipticArc4Utils.js +1 -1
  168. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  169. package/geometry/support/curves/mathUtils.js +1 -1
  170. package/geometry/support/curves/splitCurveAtPoint.js +1 -1
  171. package/geometry/support/frustum.js +1 -1
  172. package/geometry/support/meshUtils/External.js +1 -1
  173. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  174. package/geometry/support/meshUtils/loadExternal.js +1 -1
  175. package/geometry/support/meshUtils/primitives.js +1 -1
  176. package/geometry/support/meshUtils/projection.js +1 -1
  177. package/geometry/support/meshUtils/rotate.js +1 -1
  178. package/geometry/support/meshUtils/scale.js +1 -1
  179. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  180. package/geometry/support/meshVertexSpaceUtils.js +1 -1
  181. package/geometry/support/plane.js +1 -1
  182. package/interfaces.d.ts +401 -17
  183. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  184. package/layers/LinkChartLayer.js +1 -1
  185. package/layers/SceneLayer.js +1 -1
  186. package/layers/VideoLayer.js +1 -1
  187. package/layers/VoxelWasmPerSceneView.js +1 -1
  188. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  189. package/layers/graphics/sources/MemorySource.js +1 -1
  190. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  191. package/layers/video/VideoCameraSensorModel.js +1 -1
  192. package/layers/video/VideoController.js +1 -1
  193. package/layers/voxel/VoxelVolume.js +1 -1
  194. package/layers/voxel/voxelPlaneUtils.js +1 -1
  195. package/package.json +1 -1
  196. package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
  197. package/rest/support/meshFeatureSet.js +1 -1
  198. package/smartMapping/renderers/size.js +1 -1
  199. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  200. package/support/revision.js +1 -1
  201. package/symbols/cim/cimAnalyzer.js +1 -1
  202. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  203. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
  204. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
  205. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
  206. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  208. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  209. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  210. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  211. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  212. package/views/2d/layers/features/layerAdapters/featureServiceUtils.js +1 -1
  213. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  214. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  215. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  216. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  217. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  218. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  219. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  220. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  221. package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
  222. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  223. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  224. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  225. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  226. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  227. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  228. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  229. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  230. package/views/3d/camera/constraintUtils/distance.js +1 -1
  231. package/views/3d/camera/intersectionUtils.js +1 -1
  232. package/views/3d/interactive/Manipulator3D.js +1 -1
  233. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  234. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  235. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  236. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  237. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  238. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  239. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  240. package/views/3d/layers/I3SMeshView3D.js +1 -1
  241. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  242. package/views/3d/layers/PointCloudWorker.js +1 -1
  243. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  244. package/views/3d/layers/SceneLayerView3D.js +1 -1
  245. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  246. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  247. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  248. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  249. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  250. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  251. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  252. package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
  253. package/views/3d/layers/graphics/Labeler.js +1 -1
  254. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  255. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  256. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  257. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  258. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  259. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  260. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  261. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  262. package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
  263. package/views/3d/layers/i3s/I3SQueryResultGeometry.js +5 -0
  264. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  265. package/views/3d/layers/i3s/Intersector.js +1 -1
  266. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  267. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  268. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  269. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  270. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  271. package/views/3d/state/Frustum.js +1 -1
  272. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  273. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  274. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  275. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  276. package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
  277. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  278. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  279. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  280. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  281. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  282. package/views/3d/support/hitTest.js +1 -1
  283. package/views/3d/support/orientedBoundingBox.js +1 -1
  284. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  285. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  286. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  287. package/views/3d/support/viewpointUtils.js +1 -1
  288. package/views/3d/terrain/Intersector.js +1 -1
  289. package/views/3d/terrain/OverlayManager.js +1 -1
  290. package/views/3d/terrain/TerrainRenderer.js +1 -1
  291. package/views/3d/terrain/TerrainSurface.js +1 -1
  292. package/views/3d/webgl/ManagedDepthTexture.js +1 -1
  293. package/views/3d/webgl/ManagedFBOResource.js +1 -1
  294. package/views/3d/webgl/RenderCamera.js +1 -1
  295. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  296. package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
  297. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  298. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  299. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  300. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  301. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  302. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  303. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  304. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  305. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  306. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration.js +1 -1
  307. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  308. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  309. package/views/3d/webgl-engine/lib/HUDIntersectorResult.js +5 -0
  310. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  311. package/views/3d/webgl-engine/lib/IntersectorInterfaces.js +1 -1
  312. package/views/3d/webgl-engine/lib/IntersectorResult.js +5 -0
  313. package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
  314. package/views/3d/webgl-engine/lib/IntersectorType.js +5 -0
  315. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  316. package/views/3d/webgl-engine/lib/Material.js +1 -1
  317. package/views/3d/webgl-engine/lib/Normals.js +1 -1
  318. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  319. package/views/3d/webgl-engine/lib/ObjectIntersectorResult.js +5 -0
  320. package/views/3d/webgl-engine/lib/ObjectTarget.js +5 -0
  321. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  322. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  323. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  324. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  325. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  326. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  327. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  328. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  329. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  330. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  331. package/views/3d/webgl-engine/lib/lodRendering/Intersector.js +1 -1
  332. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  333. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  334. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  335. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  336. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  337. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  338. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  339. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  340. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  341. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  342. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  343. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  344. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  345. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  346. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  347. package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
  348. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  349. package/views/FocusArea.js +1 -1
  350. package/views/FocusAreaOutline.js +5 -0
  351. package/views/FocusAreaOutlineItem.js +5 -0
  352. package/views/FocusAreas.js +1 -1
  353. package/views/FocusAreasUtils.js +5 -0
  354. package/views/FocusAreasView.js +5 -0
  355. package/views/SceneView.js +1 -1
  356. package/views/analysis/DimensionAnalysisView.js +1 -1
  357. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  358. package/views/interactive/ToolIntersector.js +1 -1
  359. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  360. package/views/interactive/keybindings.js +1 -1
  361. package/views/interactive/sketch/constraints.js +1 -1
  362. package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
  363. package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
  364. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  365. package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
  366. package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
  367. package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
  368. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  369. package/views/layers/DimensionLayerView.js +1 -1
  370. package/views/support/angularMeasurementUtils.js +1 -1
  371. package/views/support/geometry3dUtils.js +1 -1
  372. package/webdoc/IPSInfo.js +1 -1
  373. package/webdoc/ips/AppleIPSProperties.d.ts +4 -0
  374. package/webdoc/ips/AppleIPSProperties.js +5 -0
  375. package/webdoc/ips/Configuration.d.ts +4 -0
  376. package/webdoc/ips/Configuration.js +5 -0
  377. package/webdoc/ips/GNSSProperties.d.ts +4 -0
  378. package/webdoc/ips/GNSSProperties.js +5 -0
  379. package/webdoc/ips/PathSnappingProperties.d.ts +4 -0
  380. package/webdoc/ips/PathSnappingProperties.js +5 -0
  381. package/webdoc/ips/SmoothingProperties.d.ts +4 -0
  382. package/webdoc/ips/SmoothingProperties.js +5 -0
  383. package/widgets/BasemapLayerList.js +1 -1
  384. package/widgets/BatchAttributeForm.js +1 -1
  385. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  386. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
  387. package/widgets/FeatureForm.js +1 -1
  388. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  389. package/widgets/FeatureTable.js +1 -1
  390. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  391. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  392. package/widgets/UtilityNetworkTrace.js +1 -1
  393. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  394. package/widgets/VideoPlayer/components/MetadataSection.js +1 -1
  395. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  396. package/widgets/support/FilterBuilder.js +1 -1
  397. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  398. package/widgets/support/SketchTooltipControls.js +1 -1
  399. package/widgets/support/SnappingControls.js +1 -1
  400. package/assets/esri/core/workers/chunks/094300acbd24085cb063.js +0 -1
  401. package/assets/esri/core/workers/chunks/0c338364cb55afdbd580.js +0 -1
  402. package/assets/esri/core/workers/chunks/2da01fe20200b6d74851.js +0 -1
  403. package/assets/esri/core/workers/chunks/35c996f6fbff165b03f4.js +0 -1
  404. package/assets/esri/core/workers/chunks/3a517393619af3639b83.js +0 -1
  405. package/assets/esri/core/workers/chunks/45d64b72b7e93e9c64d7.js +0 -1
  406. package/assets/esri/core/workers/chunks/46104db7f77952bb6c12.js +0 -1
  407. package/assets/esri/core/workers/chunks/47bbfc10c2a3b9e4bdd6.js +0 -1
  408. package/assets/esri/core/workers/chunks/49f0e53b3c9ba8451442.js +0 -1
  409. package/assets/esri/core/workers/chunks/543eb46b55cacd6e1dbc.js +0 -2
  410. package/assets/esri/core/workers/chunks/5e0118a030cf741f78c6.js +0 -319
  411. package/assets/esri/core/workers/chunks/670a66617249f2d15a62.js +0 -2
  412. package/assets/esri/core/workers/chunks/6b5274d46a155d65dff1.js +0 -39
  413. package/assets/esri/core/workers/chunks/74187c771ee7083d1db7.js +0 -1
  414. package/assets/esri/core/workers/chunks/7b4523ab392966624d97.js +0 -2
  415. package/assets/esri/core/workers/chunks/7c2ec96749972e0b8a13.js +0 -1
  416. package/assets/esri/core/workers/chunks/7ffc1db10b00754398e8.js +0 -1
  417. package/assets/esri/core/workers/chunks/81546c6141d564ed59c9.js +0 -1
  418. package/assets/esri/core/workers/chunks/852dd5af8e704613310a.js +0 -1
  419. package/assets/esri/core/workers/chunks/ac9c6779771ec855da79.js +0 -2
  420. package/assets/esri/core/workers/chunks/bbff052a991a2dc36960.js +0 -1
  421. package/assets/esri/core/workers/chunks/bcab8b9ce2f9d2ebaae7.js +0 -1
  422. package/assets/esri/core/workers/chunks/bf190d672dcbaedc1a41.js +0 -1
  423. package/assets/esri/core/workers/chunks/c255c9279815359fdce5.js +0 -1
  424. package/assets/esri/core/workers/chunks/c2594024d72133d3ed7b.js +0 -2
  425. package/assets/esri/core/workers/chunks/ce9de24cb96b56d20562.js +0 -2
  426. package/assets/esri/core/workers/chunks/d8dc922f7466300b668f.js +0 -2
  427. package/assets/esri/core/workers/chunks/d9948763423784b68c09.js +0 -1
  428. package/assets/esri/core/workers/chunks/dbf6011dd7933f02d41d.js +0 -66
  429. package/assets/esri/core/workers/chunks/e4e9dd635bdef18d0bd5.js +0 -1
  430. package/assets/esri/core/workers/chunks/e69f2e3c2d5e71fbb42f.js +0 -1
  431. 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{p as e,i as r,c as t,n as s,d as a,l as i,g as o,e as n,q as l}from"../../../../chunks/vec32.js";import{ZEROS as c,create as m,fromValues as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{EmissiveSourceMode as h}from"../../../../symbols/support/materialUtils.js";import{ViewingMode as p}from"../../../ViewingMode.js";import{newLayout as d}from"../../support/buffer/InterleavedLayout.js";import{is3DGeometryOutputMRT as f,isShadowRelatedOutput as T,is3DGeometryOutput as v,ShaderOutput as x,isColorOrColorEmission as g,isColorEmission as b}from"../core/shaderLibrary/ShaderOutput.js";import{NormalType as S}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as O}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as M}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as y}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{DepthTestFunction as R,CullFaceOptions as A,AlphaDiscardMode as I}from"../lib/basicInterfaces.js";import{GLTextureMaterial as w}from"../lib/GLTextureMaterial.js";import{Material as P}from"../lib/Material.js";import{OITPolygonOffsetLimit as j}from"../lib/OrderIndependentTransparency.js";import{intersectTriangleGeometry as E}from"../lib/RayIntersections.js";import{RenderSlot as L}from"../lib/RenderSlot.js";import{VertexAttribute as D}from"../lib/VertexAttribute.js";import{getVerticalOffsetObject3D as N}from"../lib/verticalOffsetUtils.js";import{DefaultBufferWriter as B}from"./DefaultBufferWriter.js";import{verticalOffsetAtDistance as _}from"./internal/MaterialUtil.js";import{DefaultMaterialPassParameters as V,DefaultMaterialTechnique as z}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as U}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as q}from"../shaders/RealisticTreeTechnique.js";import{alphaCutoff as k}from"../../../../webscene/support/AlphaCutoff.js";class W extends P{constructor(e,r){super(e,H),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[L.OPAQUE_MATERIAL,e=>(f(e)||T(e))&&!this.transparent],[L.TRANSPARENT_MATERIAL,e=>(f(e)||T(e))&&this.transparent&&this.parameters.writeDepth],[L.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>(v(e)||T(e))&&this.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=F(this.parameters),this._configuration=new U(r.spherical)}isVisibleForOutput(e){return e!==x.Shadow&&e!==x.ShadowExcludeHighlight&&e!==x.ShadowHighlight||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:r,opacity:t,externalColor:s}=this.parameters;return e*("replace"===r?1:t)*("ignore"===r?1:s[3])>=k}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!e(this.parameters.emissiveBaseColor,c)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(this.parameters.emissiveSource===h.Emissive&&this._hasEmissiveBase||this.parameters.emissiveSource===h.Color)}getConfiguration(e,r){const{parameters:t,_configuration:s}=this,{treeRendering:a,doubleSided:i,doubleSidedType:o}=t;return super.getConfiguration(e,r,this._configuration),s.hasNormalTexture=!a&&!!t.normalTextureId,s.hasColorTexture=!!t.textureId,s.hasVertexTangents=!a&&t.hasVertexTangents,s.instanced=t.isInstanced,s.instancedDoublePrecision=t.instancedDoublePrecision,s.vvSize=!!t.vvSize,s.hasVerticalOffset=null!=t.verticalOffset,s.hasScreenSizePerspective=null!=t.screenSizePerspective,s.hasSlicePlane=t.hasSlicePlane,s.alphaDiscardMode=t.textureAlphaMode,s.normalType=a?S.Attribute:t.normalType,s.transparent=this.transparent,s.writeDepth=t.writeDepth,s.customDepthTest=t.customDepthTest??R.Less,s.hasOccludees=r.hasOccludees,s.cullFace=t.hasSlicePlane?A.None:t.cullFace,s.cullAboveTerrain=r.cullAboveTerrain,s.hasModelTransformation=!a&&null!=t.modelTransformation,s.hasVertexColors=t.hasVertexColors,s.hasSymbolColors=t.hasSymbolColors,s.doubleSidedMode=a?M.WindingOrder:i&&"normal"===o?M.View:i&&"winding-order"===o?M.WindingOrder:M.None,s.instancedColor=t.hasInstancedColor,g(e)?(s.terrainDepthTest=r.terrainDepthTest,s.receiveShadows=t.receiveShadows,s.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=r.ssao):(s.terrainDepthTest=!1,s.receiveShadows=s.receiveAmbientOcclusion=!1),s.vvColor=!!t.vvColor,s.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,s.pbrMode=t.usePBR?t.isSchematic?y.Schematic:y.Normal:y.Disabled,s.hasMetallicRoughnessTexture=!a&&!!t.metallicRoughnessTextureId,s.emissionSource=a?O.None:null!=t.emissiveTextureId&&t.emissiveSource===h.Emissive?O.Texture:t.usePBR?t.emissiveSource===h.Emissive?O.EmissiveColor:O.SymbolColor:O.None,s.hasOcclusionTexture=!a&&!!t.occlusionTextureId,s.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),s.oitPass=r.oitPass,s.enableOffset=r.camera.relativeElevation<j,s.snowCover=r.snowCover,s.hasBloom=b(e),s.hasColorTextureTransform=!!t.colorTextureTransformMatrix,s.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,s.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,s.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,s.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix,s}intersect(e,c,m,u,h,d){if(null!=this.parameters.verticalOffset){const e=m.camera;r($,c[12],c[13],c[14]);let d=null;switch(m.viewingMode){case p.Global:d=s(X,$);break;case p.Local:d=t(X,K)}let f=0;const T=a(ee,$,e.eye),v=i(T),x=o(T,T,1/v);let g=null;this.parameters.screenSizePerspective&&(g=n(d,x)),f+=_(e,v,this.parameters.verticalOffset,g??0,this.parameters.screenSizePerspective),o(d,d,f),l(Z,d,m.transform.inverseRotation),u=a(Y,u,Z),h=a(J,h,Z)}E(e,m,u,h,N(m.verticalOffset),d)}createGLMaterial(e){return new G(e)}createBufferWriter(){return new B(this._vertexBufferLayout)}get transparent(){return Q(this.parameters)}}class G extends w{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const s=e.camera.viewInverseTransposeMatrix;return r(t.origin,s[3],s[7],s[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?q:z,e)}}class H extends V{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}}function F(e){const r=d().vec3f(D.POSITION);e.normalType===S.Compressed?r.vec2i16(D.NORMALCOMPRESSED,{glNormalized:!0}):r.vec3f(D.NORMAL),e.hasVertexTangents&&r.vec4f(D.TANGENT);return(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&r.vec2f16(D.UV0),e.hasVertexColors&&r.vec4u8(D.COLOR),e.hasSymbolColors&&r.vec4u8(D.SYMBOLCOLOR),C()&&r.vec4u8(D.OLIDCOLOR),r}function Q(e){const{drivenOpacity:r,opacity:t,externalColor:[s,a,i,o],layerOpacity:n,texture:l,textureId:c,textureAlphaMode:m,colorMixMode:u}=e;return r||t<1&&"replace"!==u||o<1&&"ignore"!==u||n<1||(null!=l||null!=c)&&m!==I.Opaque&&m!==I.Mask&&"replace"!==u}const Y=m(),J=m(),K=u(0,0,1),X=m(),Z=m(),$=m(),ee=m();export{G as DefaultGLMaterial,W as DefaultMaterial,H as DefaultMaterialParameters,Q as isTransparent};
5
+ import{q as e,i as r,c as t,n as s,d as a,l as i,g as o,e as n,o as l}from"../../../../chunks/vec32.js";import{ZEROS as c,create as m,fromValues as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{EmissiveSourceMode as h}from"../../../../symbols/support/materialUtils.js";import{ViewingMode as p}from"../../../ViewingMode.js";import{newLayout as d}from"../../support/buffer/InterleavedLayout.js";import{is3DGeometryOutputMRT as f,isShadowRelatedOutput as T,is3DGeometryOutput as v,ShaderOutput as x,isColorOrColorEmission as g,isColorEmission as b}from"../core/shaderLibrary/ShaderOutput.js";import{NormalType as S}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as O}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as M}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as y}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{DepthTestFunction as R,CullFaceOptions as A,AlphaDiscardMode as I}from"../lib/basicInterfaces.js";import{GLTextureMaterial as w}from"../lib/GLTextureMaterial.js";import{Material as P}from"../lib/Material.js";import{OITPolygonOffsetLimit as j}from"../lib/OrderIndependentTransparency.js";import{intersectTriangleGeometry as E}from"../lib/RayIntersections.js";import{RenderSlot as L}from"../lib/RenderSlot.js";import{VertexAttribute as D}from"../lib/VertexAttribute.js";import{getVerticalOffsetObject3D as N}from"../lib/verticalOffsetUtils.js";import{DefaultBufferWriter as B}from"./DefaultBufferWriter.js";import{verticalOffsetAtDistance as _}from"./internal/MaterialUtil.js";import{DefaultMaterialPassParameters as V,DefaultMaterialTechnique as z}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as U}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as q}from"../shaders/RealisticTreeTechnique.js";import{alphaCutoff as k}from"../../../../webscene/support/AlphaCutoff.js";class W extends P{constructor(e,r){super(e,H),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[L.OPAQUE_MATERIAL,e=>(f(e)||T(e))&&!this.transparent],[L.TRANSPARENT_MATERIAL,e=>(f(e)||T(e))&&this.transparent&&this.parameters.writeDepth],[L.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>(v(e)||T(e))&&this.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=F(this.parameters),this._configuration=new U(r.spherical)}isVisibleForOutput(e){return e!==x.Shadow&&e!==x.ShadowExcludeHighlight&&e!==x.ShadowHighlight||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:r,opacity:t,externalColor:s}=this.parameters;return e*("replace"===r?1:t)*("ignore"===r?1:s[3])>=k}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!e(this.parameters.emissiveBaseColor,c)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(this.parameters.emissiveSource===h.Emissive&&this._hasEmissiveBase||this.parameters.emissiveSource===h.Color)}getConfiguration(e,r){const{parameters:t,_configuration:s}=this,{treeRendering:a,doubleSided:i,doubleSidedType:o}=t;return super.getConfiguration(e,r,this._configuration),s.hasNormalTexture=!a&&!!t.normalTextureId,s.hasColorTexture=!!t.textureId,s.hasVertexTangents=!a&&t.hasVertexTangents,s.instanced=t.isInstanced,s.instancedDoublePrecision=t.instancedDoublePrecision,s.vvSize=!!t.vvSize,s.hasVerticalOffset=null!=t.verticalOffset,s.hasScreenSizePerspective=null!=t.screenSizePerspective,s.hasSlicePlane=t.hasSlicePlane,s.alphaDiscardMode=t.textureAlphaMode,s.normalType=a?S.Attribute:t.normalType,s.transparent=this.transparent,s.writeDepth=t.writeDepth,s.customDepthTest=t.customDepthTest??R.Less,s.hasOccludees=r.hasOccludees,s.cullFace=t.hasSlicePlane?A.None:t.cullFace,s.cullAboveTerrain=r.cullAboveTerrain,s.hasModelTransformation=!a&&null!=t.modelTransformation,s.hasVertexColors=t.hasVertexColors,s.hasSymbolColors=t.hasSymbolColors,s.doubleSidedMode=a?M.WindingOrder:i&&"normal"===o?M.View:i&&"winding-order"===o?M.WindingOrder:M.None,s.instancedColor=t.hasInstancedColor,g(e)?(s.terrainDepthTest=r.terrainDepthTest,s.receiveShadows=t.receiveShadows,s.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=r.ssao):(s.terrainDepthTest=!1,s.receiveShadows=s.receiveAmbientOcclusion=!1),s.vvColor=!!t.vvColor,s.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,s.pbrMode=t.usePBR?t.isSchematic?y.Schematic:y.Normal:y.Disabled,s.hasMetallicRoughnessTexture=!a&&!!t.metallicRoughnessTextureId,s.emissionSource=a?O.None:null!=t.emissiveTextureId&&t.emissiveSource===h.Emissive?O.Texture:t.usePBR?t.emissiveSource===h.Emissive?O.EmissiveColor:O.SymbolColor:O.None,s.hasOcclusionTexture=!a&&!!t.occlusionTextureId,s.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),s.oitPass=r.oitPass,s.enableOffset=r.camera.relativeElevation<j,s.snowCover=r.snowCover,s.hasBloom=b(e),s.hasColorTextureTransform=!!t.colorTextureTransformMatrix,s.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,s.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,s.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,s.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix,s}intersect(e,c,m,u,h,d){if(null!=this.parameters.verticalOffset){const e=m.camera;r($,c[12],c[13],c[14]);let d=null;switch(m.viewingMode){case p.Global:d=s(X,$);break;case p.Local:d=t(X,K)}let f=0;const T=a(ee,$,e.eye),v=i(T),x=o(T,T,1/v);let g=null;this.parameters.screenSizePerspective&&(g=n(d,x)),f+=_(e,v,this.parameters.verticalOffset,g??0,this.parameters.screenSizePerspective),o(d,d,f),l(Z,d,m.transform.inverseRotation),u=a(Y,u,Z),h=a(J,h,Z)}E(e,m,u,h,N(m.verticalOffset),d)}createGLMaterial(e){return new G(e)}createBufferWriter(){return new B(this._vertexBufferLayout)}get transparent(){return Q(this.parameters)}}class G extends w{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const s=e.camera.viewInverseTransposeMatrix;return r(t.origin,s[3],s[7],s[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?q:z,e)}}class H extends V{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}}function F(e){const r=d().vec3f(D.POSITION);e.normalType===S.Compressed?r.vec2i16(D.NORMALCOMPRESSED,{glNormalized:!0}):r.vec3f(D.NORMAL),e.hasVertexTangents&&r.vec4f(D.TANGENT);return(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&r.vec2f16(D.UV0),e.hasVertexColors&&r.vec4u8(D.COLOR),e.hasSymbolColors&&r.vec4u8(D.SYMBOLCOLOR),C()&&r.vec4u8(D.OLIDCOLOR),r}function Q(e){const{drivenOpacity:r,opacity:t,externalColor:[s,a,i,o],layerOpacity:n,texture:l,textureId:c,textureAlphaMode:m,colorMixMode:u}=e;return r||t<1&&"replace"!==u||o<1&&"ignore"!==u||n<1||(null!=l||null!=c)&&m!==I.Opaque&&m!==I.Mask&&"replace"!==u}const Y=m(),J=m(),K=u(0,0,1),X=m(),Z=m(),$=m(),ee=m();export{G as DefaultGLMaterial,W as DefaultMaterial,H as DefaultMaterialParameters,Q as isTransparent};
@@ -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 e,deg2rad as t}from"../../../../core/mathUtils.js";import{fromMat4 as i}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as r}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as n,rotate as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as l,create as c}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{i as f,t as u,n as p,d as h,g as m,c as d,l as g,j as O,f as T,q as S,e as b}from"../../../../chunks/vec32.js";import{create as v,fromValues as A}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as E,create as R,freeze as I}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isMat4 as x}from"../../../../core/libs/gl-matrix-2/types/mat4.js";import{create as F}from"../../../../geometry/support/aaBoundingRect.js";import{BufferViewVec4u8 as P,BufferViewVec3f as _,BufferViewFloat as C,BufferViewVec2f as y,BufferViewVec4f as D}from"../../../../geometry/support/buffer/BufferView.js";import{evaluateModelTransformScale as L}from"../../layers/support/FastSymbolUpdates.js";import{debugFlags as N}from"../../support/debugFlags.js";import{newLayout as j}from"../../support/buffer/InterleavedLayout.js";import{isColorEmissionHighlightOrOID as U,isColorOrColorEmission as z}from"../core/shaderLibrary/ShaderOutput.js";import{HUDVerticalPixelOffset as M}from"../core/shaderLibrary/hud/HUD.glsl.js";import{olidEnabled as w}from"../effects/geometry/olidUtils.js";import{GLTextureMaterialBindParameters as B,GLTextureMaterial as V}from"../lib/GLTextureMaterial.js";import{Material as q,RenderOccludedFlag as X}from"../lib/Material.js";import{RenderSlot as G}from"../lib/RenderSlot.js";import{applyScaleFactor as H,applyPrecomputedScaleFactor as W,precomputeScaleFactor as Y}from"../lib/screenSizePerspectiveUtils.js";import{assert as Z}from"../lib/Util.js";import{VertexAttribute as k}from"../lib/VertexAttribute.js";import{ScaleInfo as J}from"./ScaleInfo.js";import{writePosition as K,writeNormal as Q,writeColor as $,writeBufferFloat as ee,writeBufferVec4 as te,writeBufferVec4Zeros as ie,writeOlidColor as se}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as re}from"./internal/MaterialUtil.js";import{c as ae,f as ne}from"../../../../chunks/HUDMaterial.glsl.js";import{HUDMaterialTechnique as oe}from"../shaders/HUDMaterialTechnique.js";import{HUDMaterialTechniqueConfiguration as le}from"../shaders/HUDMaterialTechniqueConfiguration.js";import{alphaCutoff as ce}from"../../../../webscene/support/AlphaCutoff.js";class fe extends q{constructor(e,t){super(e,ze),this.produces=new Map([[G.HUD_MATERIAL,e=>U(e)&&!this.parameters.drawAsLabel],[G.LABEL_MATERIAL,e=>U(e)&&this.parameters.drawAsLabel],[G.OCCLUSION_PIXELS,()=>this.parameters.occlusionTest],[G.DRAPED_MATERIAL,e=>this.parameters.draped&&U(e)]]),this._visible=!0,this._configuration=new le(t)}getConfiguration(e,t){const i=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=i,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.occlusionPass=t.slot===G.OCCLUSION_PIXELS,this._configuration.occludedFragmentFade=!i&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||t.slot===G.OCCLUSION_PIXELS,z(e)&&(this._configuration.debugDrawLabelBorder=!!N.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,s,a,n,o){const{options:{selectionMode:l,hud:c,excludeLabels:T},point:S,camera:b}=s,{parameters:A}=this;if(!l||!c||T&&A.isLabel||!e.visible||!S)return;const R=e.attributes.get(k.FEATUREATTRIBUTE),I=null==R?null:E(R.data,Ce),{scaleX:x,scaleY:F}=Ve(I,A,b.pixelRatio);i(Re,t),e.attributes.has(k.FEATUREATTRIBUTE)&&me(Re);const P=e.attributes.get(k.POSITION),_=e.attributes.get(k.SIZE),C=e.attributes.get(k.NORMAL),y=e.attributes.get(k.ROTATION),D=e.attributes.get(k.CENTEROFFSETANDDISTANCE);Z(P.size>=3);const L=ae(A),N="screen"===this.parameters.centerOffsetUnits;for(let i=0;i<P.data.length/P.size;i++){const e=i*P.size;f(Oe,P.data[e],P.data[e+1],P.data[e+2]),u(Oe,Oe,t),u(Oe,Oe,b.viewMatrix);const a=i*D.size;if(f(Pe,D.data[a],D.data[a+1],D.data[a+2]),!N&&(Oe[0]+=Pe[0],Oe[1]+=Pe[1],0!==Pe[2])){const e=Pe[2];p(Pe,Oe),h(Oe,Oe,m(Pe,Pe,e))}const n=i*C.size;if(f(Te,C.data[n],C.data[n+1],C.data[n+2]),he(Te,Re,b,ye),qe(this.parameters,Oe,ye,b,ge),b.applyProjection(Oe,Se),Se[0]>-1){N&&(Pe[0]||Pe[1])&&(Se[0]+=Pe[0]*b.pixelRatio,0!==Pe[1]&&(Se[1]+=H(Pe[1],ge.factorAlignment)*b.pixelRatio),b.unapplyProjection(Se,Oe)),Se[0]+=this.parameters.screenOffset[0]*b.pixelRatio,Se[1]+=this.parameters.screenOffset[1]*b.pixelRatio,Se[0]=Math.floor(Se[0]),Se[1]=Math.floor(Se[1]);const e=i*_.size;Ne[0]=_.data[e],Ne[1]=_.data[e+1],W(Ne,ge.factor,Ne);const t=De*b.pixelRatio;let a=0;if(A.textureIsSignedDistanceField){a=Math.min(A.outlineSize,.5*Ne[0])*b.pixelRatio/2}Ne[0]*=x,Ne[1]*=F;const n=i*y.size,l=A.rotation+y.data[n];if(de(S,Se[0],Se[1],Ne,t,a,l,A,L)){const e=s.ray;if(u(ve,Oe,r(xe,b.viewMatrix)),Se[0]=S[0],Se[1]=S[1],b.unprojectFromRenderScreen(Se,Oe)){const t=v();d(t,e.direction);const i=1/g(t);m(t,t,i);o(O(e.origin,Oe)*i,t,-1,!0,1,ve)}}}}}intersectDraped(e,t,i,s,r,a){const n=e.attributes.get(k.POSITION),o=e.attributes.get(k.SIZE),l=e.attributes.get(k.ROTATION),c=this.parameters,f=ae(c),u=e.attributes.get(k.FEATUREATTRIBUTE),p=null==u?null:E(u.data,Ce),{scaleX:h,scaleY:m}=Ve(p,c,e.screenToWorldRatio),d=Le*e.screenToWorldRatio;for(let g=0;g<n.data.length/n.size;g++){const t=g*n.size,i=n.data[t],u=n.data[t+1],p=g*o.size;Ne[0]=o.data[p],Ne[1]=o.data[p+1];let O=0;if(c.textureIsSignedDistanceField){O=Math.min(c.outlineSize,.5*Ne[0])*e.screenToWorldRatio/2}Ne[0]*=h,Ne[1]*=m;const T=g*l.size,S=c.rotation+l.data[T];de(s,i,u,Ne,d,O,S,c,f)&&r(a.dist,a.normal,-1,!1)}}createBufferWriter(){return new Be}applyShaderOffsetsView(e,t,i,s,r,a,n){const o=he(t,i,r,ye);return this._applyVerticalGroundOffsetView(e,o,r,n),qe(this.parameters,n,o,r,a),this._applyPolygonOffsetView(n,o,s[3],r,n),this._applyCenterOffsetView(n,s,n),n}applyShaderOffsetsNDC(e,t,i,s,r){return this._applyCenterOffsetNDC(e,t,i,s),null!=r&&d(r,s),this._applyPolygonOffsetNDC(s,t,i,s),s}_applyPolygonOffsetView(t,i,s,r,a){const n=r.aboveGround?1:-1;let o=Math.sign(s);0===o&&(o=n);const l=n*o;if(this.parameters.shaderPolygonOffset<=0)return d(a,t);const c=e(Math.abs(i.cosAngle),.01,1),f=1-Math.sqrt(1-c*c)/c/r.viewport[2];return m(a,t,l>0?f:1/f),a}_applyVerticalGroundOffsetView(e,t,i,s){const r=g(e),a=i.aboveGround?1:-1,n=i.computeRenderPixelSizeAtDist(r)*M,o=m(Oe,t.normal,a*n);return T(s,e,o),s}_applyCenterOffsetView(e,t,i){const s="screen"!==this.parameters.centerOffsetUnits;return i!==e&&d(i,e),s&&(i[0]+=t[0],i[1]+=t[1],t[2]&&(p(Te,i),T(i,i,m(Te,Te,t[2])))),i}_applyCenterOffsetNDC(e,t,i,s){const r="screen"!==this.parameters.centerOffsetUnits;return s!==e&&d(s,e),r||(s[0]+=t[0]/i.fullWidth*2,s[1]+=t[1]/i.fullHeight*2),s}_applyPolygonOffsetNDC(e,t,i,s){const r=this.parameters.shaderPolygonOffset;if(e!==s&&d(s,e),r){const e=i.aboveGround?1:-1,a=e*Math.sign(t[3]);s[2]-=(a||e)*r}return s}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:i}=this.parameters,s=e[3]>=ce||t>=ce&&i[3]>=ce;return this._visible&&s}createGLMaterial(e){return new ue(e)}calculateRelativeScreenBounds(e,t,i=F()){return pe(this.parameters,e,t,i),i[2]=i[0]+e[0],i[3]=i[1]+e[1],i}}class ue extends V{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(oe,e)}}function pe(e,t,i,s){s[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*i,s[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*i}function he(e,t,s,r){return x(t)&&(t=i(Ie,t)),S(r.normal,e,t),u(r.normal,r.normal,s.viewInverseTransposeMatrix),r.cosAngle=b(be,Ue),r}function me(e){const t=e[0],i=e[1],s=e[2],r=e[3],a=e[4],n=e[5],o=e[6],l=e[7],c=e[8],f=1/Math.sqrt(t*t+i*i+s*s),u=1/Math.sqrt(r*r+a*a+n*n),p=1/Math.sqrt(o*o+l*l+c*c);return e[0]=t*f,e[1]=i*f,e[2]=s*f,e[3]=r*u,e[4]=a*u,e[5]=n*u,e[6]=o*p,e[7]=l*p,e[8]=c*p,e}function de(e,i,s,r,a,l,c,f,u){let p=i-a-r[0]*u[0],h=p+r[0]+2*a,m=s-a-r[1]*u[1],d=m+r[1]+2*a;const g=f.distanceFieldBoundingBox;return f.textureIsSignedDistanceField&&null!=g&&(p+=r[0]*g[0],m+=r[1]*g[1],h-=r[0]*(1-g[2]),d-=r[1]*(1-g[3]),p-=l,h+=l,m-=l,d+=l),n(Ee,i,s),o(Ae,e,Ee,t(c)),Ae[0]>p&&Ae[0]<h&&Ae[1]>m&&Ae[1]<d}const ge=new J,Oe=v(),Te=v(),Se=R(),be=v(),ve=v(),Ae=c(),Ee=c(),Re=s(),Ie=s(),xe=a(),Fe=R(),Pe=v(),_e=v(),Ce=R(),ye={normal:be,cosAngle:0},De=1,Le=2,Ne=l(0,0),je=6,Ue=A(0,0,1);class ze extends B{constructor(){super(...arguments),this.renderOccluded=X.Occlude,this.isDecoration=!1,this.color=I(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=l(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=I(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=R(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusEffect="none",this.draped=!1,this.isLabel=!1}}const Me=j().vec3f(k.POSITION).vec3f(k.NORMAL).vec2i16(k.UVI).vec4u8(k.COLOR).vec2f(k.SIZE).f32(k.ROTATION).vec4f(k.CENTEROFFSETANDDISTANCE).vec4f(k.FEATUREATTRIBUTE),we=Me.clone().vec4u8(k.OLIDCOLOR);class Be{constructor(){this.vertexBufferLayout=w()?we:Me}elementCount(e){return e.get(k.POSITION).indices.length*je}write(e,t,i,s,r,a){const{position:n,normal:o,uvi:l,color:c,size:f,rotation:u,centerOffsetAndDistance:p,featureAttribute:h}=r;K(i.get(k.POSITION),e,n,a,je),Q(i.get(k.NORMAL),t,o,a,je);const m=i.get(k.UVI)?.data;let d=0,g=0,O=-1-ne,T=-1-ne;m&&m.length>=4&&(d=m[0],g=m[1],O=-1-m[2],T=-1-m[3]);let S=i.get(k.POSITION).indices.length,b=a;for(let E=0;E<S;++E)l.set(b,0,d),l.set(b,1,g),b++,l.set(b,0,O),l.set(b,1,g),b++,l.set(b,0,O),l.set(b,1,T),b++,l.set(b,0,O),l.set(b,1,T),b++,l.set(b,0,d),l.set(b,1,T),b++,l.set(b,0,d),l.set(b,1,g),b++;$(i.get(k.COLOR),4,c,a,je);const{data:v,indices:A}=i.get(k.SIZE);S=A.length,b=a;for(let E=0;E<S;++E){const e=v[2*A[E]],t=v[2*A[E]+1];for(let i=0;i<je;++i)f.set(b,0,e),f.set(b,1,t),b++}if(ee(i.get(k.ROTATION),u,a,je),i.get(k.CENTEROFFSETANDDISTANCE)?te(i.get(k.CENTEROFFSETANDDISTANCE),p,a,je):ie(p,a,S*je),i.get(k.FEATUREATTRIBUTE)?te(i.get(k.FEATUREATTRIBUTE),h,a,je):ie(h,a,S*je),null!=s){const e=i.get(k.POSITION)?.indices;if(e){const t=e.length,i=r.getField(k.OLIDCOLOR,P);se(s,i,t,a,je)}}return{numVerticesPerItem:je,numItems:S}}intersect(e,t,i,s,a,n,o){const{options:{selectionMode:l,hud:c,excludeLabels:S},point:b,camera:A}=s;if(!l||!c||S&&t.isLabel||!b)return;const E=this.vertexBufferLayout.createView(e),R=E.getField(k.POSITION,_),I=E.getField(k.NORMAL,_),x=E.getField(k.ROTATION,C),F=E.getField(k.SIZE,y),P=E.getField(k.FEATUREATTRIBUTE,D),L=E.getField(k.CENTEROFFSETANDDISTANCE,D),N="screen"===t.centerOffsetUnits,j=ae(t);if(null==R||null==I||null==x||null==F||null==L)return;const U=null==P?null:P.getVec(0,Ce),{scaleX:z,scaleY:M}=Ve(U,t,A.pixelRatio),w=R.count/je;for(let _=0;_<w;_++){const e=_*je;if(R.getVec(e,Oe),null!=i&&T(Oe,Oe,i),u(Oe,Oe,A.viewMatrix),L.getVec(e,Fe),f(Pe,Fe[0],Fe[1],Fe[2]),!N&&(Oe[0]+=Pe[0],Oe[1]+=Pe[1],0!==Pe[2])){const e=Pe[2];p(Pe,Oe),h(Oe,Oe,m(Pe,Pe,e))}if(I.getVec(e,Te),he(Te,Re,A,ye),qe(t,Oe,ye,A,ge),A.applyProjection(Oe,Se),Se[0]>-1){N&&(Pe[0]||Pe[1])&&(Se[0]+=Pe[0]*A.pixelRatio,0!==Pe[1]&&(Se[1]+=H(Pe[1],ge.factorAlignment)*A.pixelRatio),A.unapplyProjection(Se,Oe)),Se[0]+=t.screenOffset[0]*A.pixelRatio,Se[1]+=t.screenOffset[1]*A.pixelRatio,Se[0]=Math.floor(Se[0]),Se[1]=Math.floor(Se[1]),F.getVec(e,Ne),W(Ne,ge.factor,Ne);const i=De*A.pixelRatio;let a=0;if(t.textureIsSignedDistanceField){a=Math.min(t.outlineSize,.5*Ne[0])*A.pixelRatio/2}Ne[0]*=z,Ne[1]*=M;const n=x.get(e),l=t.rotation+n;if(de(b,Se[0],Se[1],Ne,i,a,l,t,j)){const e=s.ray;if(u(ve,Oe,r(xe,A.viewMatrix)),Se[0]=b[0],Se[1]=b[1],A.unprojectFromRenderScreen(Se,Oe)){const t=v();d(t,e.direction);const i=1/g(t);m(t,t,i);o(O(e.origin,Oe)*i,t,_,!0,1,ve)}}}}}}function Ve(e,t,i){return null==e||null==t.vvSize?{scaleX:i,scaleY:i}:(L(_e,t,e),{scaleX:_e[0]*i,scaleY:_e[1]*i})}function qe(e,t,i,s,r){if(!e.verticalOffset?.screenLength){if(e.screenSizePerspective||e.screenSizePerspectiveAlignment){Xe(e,r,g(t),i.cosAngle)}else r.factor.scale=1,r.factorAlignment.scale=1;return t}const a=g(t),n=e.screenSizePerspectiveAlignment??e.screenSizePerspective,o=re(s,a,e.verticalOffset,i.cosAngle,n);return Xe(e,r,a,i.cosAngle),m(i.normal,i.normal,o),T(t,t,i.normal)}function Xe(e,t,i,s){null!=e.screenSizePerspective?Y(s,i,e.screenSizePerspective,t.factor):(t.factor.scale=1,t.factor.factor=0,t.factor.minScaleFactor=0),null!=e.screenSizePerspectiveAlignment?Y(s,i,e.screenSizePerspectiveAlignment,t.factorAlignment):(t.factorAlignment.factor=t.factor.factor,t.factorAlignment.scale=t.factor.scale,t.factorAlignment.minScaleFactor=t.factor.minScaleFactor)}export{fe as HUDMaterial,ze as Parameters};
5
+ import{clamp as e,deg2rad as t}from"../../../../core/mathUtils.js";import{fromMat4 as i}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as r}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as n,rotate as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as l,create as c}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{i as f,t as u,n as p,d as h,g as m,c as d,l as g,j as O,f as T,a as S,o as b,e as v}from"../../../../chunks/vec32.js";import{create as A,fromValues as E}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as R,create as I,freeze as x}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isMat4 as F}from"../../../../core/libs/gl-matrix-2/types/mat4.js";import{create as P}from"../../../../geometry/support/aaBoundingRect.js";import{BufferViewVec4u8 as _,BufferViewVec3f as C,BufferViewFloat as y,BufferViewVec2f as D,BufferViewVec4f as L}from"../../../../geometry/support/buffer/BufferView.js";import{evaluateModelTransformScale as N}from"../../layers/support/FastSymbolUpdates.js";import{debugFlags as j}from"../../support/debugFlags.js";import{newLayout as U}from"../../support/buffer/InterleavedLayout.js";import{isColorEmissionHighlightOrOID as z,isColorOrColorEmission as M}from"../core/shaderLibrary/ShaderOutput.js";import{HUDVerticalPixelOffset as w}from"../core/shaderLibrary/hud/HUD.glsl.js";import{olidEnabled as B}from"../effects/geometry/olidUtils.js";import{GLTextureMaterialBindParameters as V,GLTextureMaterial as X}from"../lib/GLTextureMaterial.js";import{Material as q,RenderOccludedFlag as G}from"../lib/Material.js";import{RenderSlot as H}from"../lib/RenderSlot.js";import{applyScaleFactor as W,applyPrecomputedScaleFactor as Y,precomputeScaleFactor as Z}from"../lib/screenSizePerspectiveUtils.js";import{assert as k}from"../lib/Util.js";import{VertexAttribute as J}from"../lib/VertexAttribute.js";import{ScaleInfo as K}from"./ScaleInfo.js";import{writePosition as Q,writeNormal as $,writeColor as ee,writeBufferFloat as te,writeBufferVec4 as ie,writeBufferVec4Zeros as se,writeOlidColor as re}from"./internal/bufferWriterUtils.js";import{verticalOffsetAtDistance as ae}from"./internal/MaterialUtil.js";import{c as ne,f as oe}from"../../../../chunks/HUDMaterial.glsl.js";import{HUDMaterialTechnique as le}from"../shaders/HUDMaterialTechnique.js";import{HUDMaterialTechniqueConfiguration as ce}from"../shaders/HUDMaterialTechniqueConfiguration.js";import{alphaCutoff as fe}from"../../../../webscene/support/AlphaCutoff.js";class ue extends q{constructor(e,t){super(e,Me),this.produces=new Map([[H.HUD_MATERIAL,e=>z(e)&&!this.parameters.drawAsLabel],[H.LABEL_MATERIAL,e=>z(e)&&this.parameters.drawAsLabel],[H.OCCLUSION_PIXELS,()=>this.parameters.occlusionTest],[H.DRAPED_MATERIAL,e=>this.parameters.draped&&z(e)]]),this._visible=!0,this._configuration=new ce(t)}getConfiguration(e,t){const i=this.parameters.draped;return super.getConfiguration(e,t,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=i,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.occlusionPass=t.slot===H.OCCLUSION_PIXELS,this._configuration.occludedFragmentFade=!i&&this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||t.slot===H.OCCLUSION_PIXELS,M(e)&&(this._configuration.debugDrawLabelBorder=!!j.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,s,a,n,o){const{options:{selectionMode:l,hud:c,excludeLabels:T},point:S,camera:b}=s,{parameters:v}=this;if(!l||!c||T&&v.isLabel||!e.visible||!S||!b)return;const E=e.attributes.get(J.FEATUREATTRIBUTE),I=null==E?null:R(E.data,ye),{scaleX:x,scaleY:F}=Xe(I,v,b.pixelRatio);i(Ie,t),e.attributes.has(J.FEATUREATTRIBUTE)&&de(Ie);const P=e.attributes.get(J.POSITION),_=e.attributes.get(J.SIZE),C=e.attributes.get(J.NORMAL),y=e.attributes.get(J.ROTATION),D=e.attributes.get(J.CENTEROFFSETANDDISTANCE);k(P.size>=3);const L=ne(v),N="screen"===this.parameters.centerOffsetUnits;for(let i=0;i<P.data.length/P.size;i++){const e=i*P.size;f(Te,P.data[e],P.data[e+1],P.data[e+2]),u(Te,Te,t),u(Te,Te,b.viewMatrix);const a=i*D.size;if(f(_e,D.data[a],D.data[a+1],D.data[a+2]),!N&&(Te[0]+=_e[0],Te[1]+=_e[1],0!==_e[2])){const e=_e[2];p(_e,Te),h(Te,Te,m(_e,_e,e))}const n=i*C.size;if(f(Se,C.data[n],C.data[n+1],C.data[n+2]),me(Se,Ie,b,De),qe(this.parameters,Te,De,b,Oe),b.applyProjection(Te,be),be[0]>-1){N&&(_e[0]||_e[1])&&(be[0]+=_e[0]*b.pixelRatio,0!==_e[1]&&(be[1]+=W(_e[1],Oe.factorAlignment)*b.pixelRatio),b.unapplyProjection(be,Te)),be[0]+=this.parameters.screenOffset[0]*b.pixelRatio,be[1]+=this.parameters.screenOffset[1]*b.pixelRatio,be[0]=Math.floor(be[0]),be[1]=Math.floor(be[1]);const e=i*_.size;je[0]=_.data[e],je[1]=_.data[e+1],Y(je,Oe.factor,je);const t=Le*b.pixelRatio;let a=0;if(v.textureIsSignedDistanceField){a=Math.min(v.outlineSize,.5*je[0])*b.pixelRatio/2}je[0]*=x,je[1]*=F;const n=i*y.size,l=v.rotation+y.data[n];if(ge(S,be[0],be[1],je,t,a,l,v,L)){const e=s.ray;if(u(Ae,Te,r(Fe,b.viewMatrix)),be[0]=S[0],be[1]=S[1],b.unprojectFromRenderScreen(be,Te)){const t=A();d(t,e.direction);const i=1/g(t);m(t,t,i);o(O(e.origin,Te)*i,t,-1,Ae)}}}}}intersectDraped(e,t,i,s,r){const a=e.attributes.get(J.POSITION),n=e.attributes.get(J.SIZE),o=e.attributes.get(J.ROTATION),l=this.parameters,c=ne(l),f=e.attributes.get(J.FEATUREATTRIBUTE),u=null==f?null:R(f.data,ye),{scaleX:p,scaleY:h}=Xe(u,l,e.screenToWorldRatio),m=Ne*e.screenToWorldRatio;for(let d=0;d<a.data.length/a.size;d++){const t=d*a.size,f=a.data[t],u=a.data[t+1],g=d*n.size;je[0]=n.data[g],je[1]=n.data[g+1];let O=0;if(l.textureIsSignedDistanceField){O=Math.min(l.outlineSize,.5*je[0])*e.screenToWorldRatio/2}je[0]*=p,je[1]*=h;const T=d*o.size,S=l.rotation+o.data[T];ge(i,f,u,je,m,O,S,l,c)&&s(r.distance,r.normal,-1)}}createBufferWriter(){return new Ve}applyShaderOffsetsView(e,t,i,s,r,a,n){const o=me(t,i,r,De);return this._applyVerticalGroundOffsetView(e,o,r,n),qe(this.parameters,n,o,r,a),this._applyPolygonOffsetView(n,o,s[3],r,n),this._applyCenterOffsetView(n,s,n),n}applyShaderOffsetsNDC(e,t,i,s,r){return this._applyCenterOffsetNDC(e,t,i,s),null!=r&&d(r,s),this._applyPolygonOffsetNDC(s,t,i,s),s}_applyPolygonOffsetView(t,i,s,r,a){const n=r.aboveGround?1:-1;let o=Math.sign(s);0===o&&(o=n);const l=n*o;if(this.parameters.shaderPolygonOffset<=0)return d(a,t);const c=e(Math.abs(i.cosAngle),.01,1),f=1-Math.sqrt(1-c*c)/c/r.viewport[2];return m(a,t,l>0?f:1/f),a}_applyVerticalGroundOffsetView(e,t,i,s){const r=g(e),a=i.aboveGround?1:-1,n=i.computeRenderPixelSizeAtDist(r)*w,o=m(Te,t.normal,a*n);return T(s,e,o),s}_applyCenterOffsetView(e,t,i){const s="screen"!==this.parameters.centerOffsetUnits;return i!==e&&d(i,e),s&&(i[0]+=t[0],i[1]+=t[1],t[2]&&(p(Se,i),S(i,i,m(Se,Se,t[2])))),i}_applyCenterOffsetNDC(e,t,i,s){const r="screen"!==this.parameters.centerOffsetUnits;return s!==e&&d(s,e),r||(s[0]+=t[0]/i.fullWidth*2,s[1]+=t[1]/i.fullHeight*2),s}_applyPolygonOffsetNDC(e,t,i,s){const r=this.parameters.shaderPolygonOffset;if(e!==s&&d(s,e),r){const e=i.aboveGround?1:-1,a=e*Math.sign(t[3]);s[2]-=(a||e)*r}return s}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:i}=this.parameters,s=e[3]>=fe||t>=fe&&i[3]>=fe;return this._visible&&s}createGLMaterial(e){return new pe(e)}calculateRelativeScreenBounds(e,t,i=P()){return he(this.parameters,e,t,i),i[2]=i[0]+e[0],i[3]=i[1]+e[1],i}}class pe extends X{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.getTechnique(le,e)}}function he(e,t,i,s){s[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*i,s[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*i}function me(e,t,s,r){return F(t)&&(t=i(xe,t)),b(r.normal,e,t),u(r.normal,r.normal,s.viewInverseTransposeMatrix),r.cosAngle=v(ve,ze),r}function de(e){const t=e[0],i=e[1],s=e[2],r=e[3],a=e[4],n=e[5],o=e[6],l=e[7],c=e[8],f=1/Math.sqrt(t*t+i*i+s*s),u=1/Math.sqrt(r*r+a*a+n*n),p=1/Math.sqrt(o*o+l*l+c*c);return e[0]=t*f,e[1]=i*f,e[2]=s*f,e[3]=r*u,e[4]=a*u,e[5]=n*u,e[6]=o*p,e[7]=l*p,e[8]=c*p,e}function ge(e,i,s,r,a,l,c,f,u){let p=i-a-r[0]*u[0],h=p+r[0]+2*a,m=s-a-r[1]*u[1],d=m+r[1]+2*a;const g=f.distanceFieldBoundingBox;return f.textureIsSignedDistanceField&&null!=g&&(p+=r[0]*g[0],m+=r[1]*g[1],h-=r[0]*(1-g[2]),d-=r[1]*(1-g[3]),p-=l,h+=l,m-=l,d+=l),n(Re,i,s),o(Ee,e,Re,t(c)),Ee[0]>p&&Ee[0]<h&&Ee[1]>m&&Ee[1]<d}const Oe=new K,Te=A(),Se=A(),be=I(),ve=A(),Ae=A(),Ee=c(),Re=c(),Ie=s(),xe=s(),Fe=a(),Pe=I(),_e=A(),Ce=A(),ye=I(),De={normal:ve,cosAngle:0},Le=1,Ne=2,je=l(0,0),Ue=6,ze=E(0,0,1);class Me extends V{constructor(){super(...arguments),this.renderOccluded=G.Occlude,this.isDecoration=!1,this.color=x(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=l(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=x(1,1,1,1),this.outlineSize=0,this.distanceFieldBoundingBox=I(),this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusEffect="none",this.draped=!1,this.isLabel=!1}}const we=U().vec3f(J.POSITION).vec3f(J.NORMAL).vec2i16(J.UVI).vec4u8(J.COLOR).vec2f(J.SIZE).f32(J.ROTATION).vec4f(J.CENTEROFFSETANDDISTANCE).vec4f(J.FEATUREATTRIBUTE),Be=we.clone().vec4u8(J.OLIDCOLOR);class Ve{constructor(){this.vertexBufferLayout=B()?Be:we}elementCount(e){return e.get(J.POSITION).indices.length*Ue}write(e,t,i,s,r,a){const{position:n,normal:o,uvi:l,color:c,size:f,rotation:u,centerOffsetAndDistance:p,featureAttribute:h}=r;Q(i.get(J.POSITION),e,n,a,Ue),$(i.get(J.NORMAL),t,o,a,Ue);const m=i.get(J.UVI)?.data;let d=0,g=0,O=-1-oe,T=-1-oe;m&&m.length>=4&&(d=m[0],g=m[1],O=-1-m[2],T=-1-m[3]);let S=i.get(J.POSITION).indices.length,b=a;for(let E=0;E<S;++E)l.set(b,0,d),l.set(b,1,g),b++,l.set(b,0,O),l.set(b,1,g),b++,l.set(b,0,O),l.set(b,1,T),b++,l.set(b,0,O),l.set(b,1,T),b++,l.set(b,0,d),l.set(b,1,T),b++,l.set(b,0,d),l.set(b,1,g),b++;ee(i.get(J.COLOR),4,c,a,Ue);const{data:v,indices:A}=i.get(J.SIZE);S=A.length,b=a;for(let E=0;E<S;++E){const e=v[2*A[E]],t=v[2*A[E]+1];for(let i=0;i<Ue;++i)f.set(b,0,e),f.set(b,1,t),b++}if(te(i.get(J.ROTATION),u,a,Ue),i.get(J.CENTEROFFSETANDDISTANCE)?ie(i.get(J.CENTEROFFSETANDDISTANCE),p,a,Ue):se(p,a,S*Ue),i.get(J.FEATUREATTRIBUTE)?ie(i.get(J.FEATUREATTRIBUTE),h,a,Ue):se(h,a,S*Ue),null!=s){const e=i.get(J.POSITION)?.indices;if(e){const t=e.length,i=r.getField(J.OLIDCOLOR,_);re(s,i,t,a,Ue)}}return{numVerticesPerItem:Ue,numItems:S}}intersect(e,t,i,s,a,n,o){const{options:{selectionMode:l,hud:c,excludeLabels:S},point:b,camera:v}=s;if(!l||!c||S&&t.isLabel||!b)return;const E=this.vertexBufferLayout.createView(e),R=E.getField(J.POSITION,C),I=E.getField(J.NORMAL,C),x=E.getField(J.ROTATION,y),F=E.getField(J.SIZE,D),P=E.getField(J.FEATUREATTRIBUTE,L),_=E.getField(J.CENTEROFFSETANDDISTANCE,L),N="screen"===t.centerOffsetUnits,j=ne(t);if(null==R||null==I||null==x||null==F||null==_||null==v)return;const U=null==P?null:P.getVec(0,ye),{scaleX:z,scaleY:M}=Xe(U,t,v.pixelRatio),w=R.count/Ue;for(let C=0;C<w;C++){const e=C*Ue;if(R.getVec(e,Te),null!=i&&T(Te,Te,i),u(Te,Te,v.viewMatrix),_.getVec(e,Pe),f(_e,Pe[0],Pe[1],Pe[2]),!N&&(Te[0]+=_e[0],Te[1]+=_e[1],0!==_e[2])){const e=_e[2];p(_e,Te),h(Te,Te,m(_e,_e,e))}if(I.getVec(e,Se),me(Se,Ie,v,De),qe(t,Te,De,v,Oe),v.applyProjection(Te,be),be[0]>-1){N&&(_e[0]||_e[1])&&(be[0]+=_e[0]*v.pixelRatio,0!==_e[1]&&(be[1]+=W(_e[1],Oe.factorAlignment)*v.pixelRatio),v.unapplyProjection(be,Te)),be[0]+=t.screenOffset[0]*v.pixelRatio,be[1]+=t.screenOffset[1]*v.pixelRatio,be[0]=Math.floor(be[0]),be[1]=Math.floor(be[1]),F.getVec(e,je),Y(je,Oe.factor,je);const i=Le*v.pixelRatio;let a=0;if(t.textureIsSignedDistanceField){a=Math.min(t.outlineSize,.5*je[0])*v.pixelRatio/2}je[0]*=z,je[1]*=M;const n=x.get(e),l=t.rotation+n;if(ge(b,be[0],be[1],je,i,a,l,t,j)){const e=s.ray;if(u(Ae,Te,r(Fe,v.viewMatrix)),be[0]=b[0],be[1]=b[1],v.unprojectFromRenderScreen(be,Te)){const t=A();d(t,e.direction);const i=1/g(t);m(t,t,i);o(O(e.origin,Te)*i,t,C,Ae)}}}}}}function Xe(e,t,i){return null==e||null==t.vvSize?{scaleX:i,scaleY:i}:(N(Ce,t,e),{scaleX:Ce[0]*i,scaleY:Ce[1]*i})}function qe(e,t,i,s,r){if(!e.verticalOffset?.screenLength){if(e.screenSizePerspective||e.screenSizePerspectiveAlignment){Ge(e,r,g(t),i.cosAngle)}else r.factor.scale=1,r.factorAlignment.scale=1;return t}const a=g(t),n=e.screenSizePerspectiveAlignment??e.screenSizePerspective,o=ae(s,a,e.verticalOffset,i.cosAngle,n);return Ge(e,r,a,i.cosAngle),m(i.normal,i.normal,o),T(t,t,i.normal)}function Ge(e,t,i,s){null!=e.screenSizePerspective?Z(s,i,e.screenSizePerspective,t.factor):(t.factor.scale=1,t.factor.factor=0,t.factor.minScaleFactor=0),null!=e.screenSizePerspectiveAlignment?Z(s,i,e.screenSizePerspectiveAlignment,t.factorAlignment):(t.factorAlignment.factor=t.factor.factor,t.factorAlignment.scale=t.factor.scale,t.factorAlignment.minScaleFactor=t.factor.minScaleFactor)}export{ue as HUDMaterial,Me as Parameters};
@@ -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{set as t,squaredDistance as e}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as i}from"../core/shaderLibrary/ShaderOutput.js";import o from"../lib/GLMaterial.js";import{Material as a}from"../lib/Material.js";import{RenderSlot as n}from"../lib/RenderSlot.js";import{VertexAttribute as u}from"../lib/VertexAttribute.js";import{writePosition as l,writeBufferFloat as c}from"./internal/bufferWriterUtils.js";import{HeatmapDensityPassParameters as f,HeatmapDensityTechnique as m}from"../shaders/HeatmapDensityTechnique.js";import{HeatmapDensityTechniqueConfiguration as p}from"../shaders/HeatmapDensityTechniqueConfiguration.js";const h=2;class g extends f{constructor(){super(...arguments),this.isAttributeDriven=!1,this.usesHalfFloats=!1}}class T extends a{constructor(t){super(t,g),this.produces=new Map([[n.DRAPED_MATERIAL,t=>t===i.Color]]),this._configuration=new p}getConfiguration(t,e){return super.getConfiguration(t,e,this._configuration),this._configuration.isAttributeDriven=this.parameters.isAttributeDriven,this._configuration.usesHalfFloat=this.parameters.usesHalfFloats,this._configuration}get visible(){return!0}createGLMaterial(t){return new d(t)}intersect(){}intersectDraped(r,s,i,o,a,n){const l=r.attributes.get(u.POSITION),{parameters:c}=this,{searchRadius:f}=c,{screenToWorldRatio:m}=r,p=f*m+h*m,g=p*p,T=l.data.length/l.size;for(let u=0;u<T;u++){const r=u*l.size,s=t(j,l.data[r],l.data[r+1]);e(s,o)<g&&a(n.dist,n.normal,-1,!1)}}createBufferWriter(){return new b(this.parameters.isAttributeDriven?I:A)}}class d extends o{beginSlot(t){return this.getTechnique(m,t)}}class b{constructor(t){this.vertexBufferLayout=t}elementCount(t){return t.get(u.POSITION).indices.length*v}write(t,e,r,s,i,o){l(r.get(u.POSITION),t,i.position,o,v);const a=r.get(u.POSITION).indices.length,n=i.uv0;let f=o;for(let u=0;u<a;++u)n.setValues(f++,-1,-1),n.setValues(f++,1,-1),n.setValues(f++,1,1),n.setValues(f++,1,1),n.setValues(f++,-1,1),n.setValues(f++,-1,-1);const m=u.FEATUREATTRIBUTE in i?i.featureAttribute:null;return m?(c(r.get(u.FEATUREATTRIBUTE),m,o,v),null):null}}const A=s().vec3f(u.POSITION).vec2f16(u.UV0),I=A.clone().f32(u.FEATUREATTRIBUTE),v=6,j=r();export{T as HeatmapDensityMaterial,g as Parameters};
5
+ import{set as t,squaredDistance as e}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{ShaderOutput as i}from"../core/shaderLibrary/ShaderOutput.js";import o from"../lib/GLMaterial.js";import{Material as a}from"../lib/Material.js";import{RenderSlot as n}from"../lib/RenderSlot.js";import{VertexAttribute as u}from"../lib/VertexAttribute.js";import{writePosition as l,writeBufferFloat as c}from"./internal/bufferWriterUtils.js";import{HeatmapDensityPassParameters as f,HeatmapDensityTechnique as m}from"../shaders/HeatmapDensityTechnique.js";import{HeatmapDensityTechniqueConfiguration as p}from"../shaders/HeatmapDensityTechniqueConfiguration.js";const h=2;class g extends f{constructor(){super(...arguments),this.isAttributeDriven=!1,this.usesHalfFloats=!1}}class T extends a{constructor(t){super(t,g),this.produces=new Map([[n.DRAPED_MATERIAL,t=>t===i.Color]]),this._configuration=new p}getConfiguration(t,e){return super.getConfiguration(t,e,this._configuration),this._configuration.isAttributeDriven=this.parameters.isAttributeDriven,this._configuration.usesHalfFloat=this.parameters.usesHalfFloats,this._configuration}get visible(){return!0}createGLMaterial(t){return new d(t)}intersect(){}intersectDraped(r,s,i,o,a){const n=r.attributes.get(u.POSITION),{parameters:l}=this,{searchRadius:c}=l,{screenToWorldRatio:f}=r,m=c*f+h*f,p=m*m,g=n.data.length/n.size;for(let u=0;u<g;u++){const r=u*n.size,s=t(j,n.data[r],n.data[r+1]);e(s,i)<p&&o(a.distance,a.normal,-1)}}createBufferWriter(){return new b(this.parameters.isAttributeDriven?I:A)}}class d extends o{beginSlot(t){return this.getTechnique(m,t)}}class b{constructor(t){this.vertexBufferLayout=t}elementCount(t){return t.get(u.POSITION).indices.length*v}write(t,e,r,s,i,o){l(r.get(u.POSITION),t,i.position,o,v);const a=r.get(u.POSITION).indices.length,n=i.uv0;let f=o;for(let u=0;u<a;++u)n.setValues(f++,-1,-1),n.setValues(f++,1,-1),n.setValues(f++,1,1),n.setValues(f++,1,1),n.setValues(f++,-1,1),n.setValues(f++,-1,-1);const m=u.FEATUREATTRIBUTE in i?i.featureAttribute:null;return m?(c(r.get(u.FEATUREATTRIBUTE),m,o,v),null):null}}const A=s().vec3f(u.POSITION).vec2f16(u.UV0),I=A.clone().f32(u.FEATUREATTRIBUTE),v=6,j=r();export{T as HeatmapDensityMaterial,g as Parameters};
@@ -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{safeToString as e}from"../../../../core/string.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newLayout as i}from"../../support/buffer/InterleavedLayout.js";import{isColorOrColorEmission as s}from"../core/shaderLibrary/ShaderOutput.js";import n from"../lib/GLMaterial.js";import{Material as o,MaterialParameters as a}from"../lib/Material.js";import{RenderSlot as c}from"../lib/RenderSlot.js";import{VertexAttribute as l}from"../lib/VertexAttribute.js";import{writePosition as f,writeNormal as u,writeBufferVec4 as h}from"./internal/bufferWriterUtils.js";import{LineCalloutTechnique as p}from"../shaders/LineCalloutTechnique.js";import{LineCalloutTechniqueConfiguration as m}from"../shaders/LineCalloutTechniqueConfiguration.js";import{alphaCutoff as g}from"../../../../webscene/support/AlphaCutoff.js";class d extends o{constructor(e,t){super(e,T),this.produces=new Map([[c.LINE_CALLOUTS,e=>s(e)],[c.LINE_CALLOUTS_HUD_DEPTH,e=>s(e)]]),this._configuration=new m(t),this._uniqueMaterialIdentifier=O(this.parameters)}passParameters(){return this.parameters}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hudDepth=t.slot===c.LINE_CALLOUTS_HUD_DEPTH,this._configuration.hudDepthAlignStart=!!this.parameters.hudDepthAlignStart,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration}get visible(){return this.parameters.color[3]>=g||(this.parameters.borderColor?.[3]??0)>=g}intersect(){}createGLMaterial(e){return new S(e)}createBufferWriter(){return new b}validateParameters(e){this._uniqueMaterialIdentifier=O(e)}get uniqueMaterialIdentifier(){return this._uniqueMaterialIdentifier}}function O({renderOccluded:t,isDecoration:r,horizontalScreenOffset:i,color:s,size:n,occlusionTest:o,shaderPolygonOffset:a,hudDepthAlignStart:c,centerOffsetUnits:l,hasSlicePlane:f,screenSizePerspective:u,verticalOffset:h,borderColor:p}){return e`${t}:${r}:${i}:[${s}]:${n}:${o}:${a}:${c}:${l}:${f}:${null!=u}:{${h.screenLength}:${h.minWorldLength}:${h.maxWorldLength}}:[${p}]`}class S extends n{beginSlot(e){return this.getTechnique(p,e)}}class T extends a{constructor(){super(...arguments),this.horizontalScreenOffset=0,this.color=r(0,0,0,1),this.size=1,this.occlusionTest=!1,this.shaderPolygonOffset=1e-5,this.hudDepthAlignStart=!1,this.centerOffsetUnits="world",this.hasSlicePlane=!1}}const L=i().vec3f(l.POSITION).vec3f(l.NORMAL).vec2f16(l.UV0).vec4f(l.CENTEROFFSETANDDISTANCE),_=[t(0,0),t(1,0),t(0,1),t(1,0),t(1,1),t(0,1)];class b{constructor(){this.vertexBufferLayout=L}elementCount(e){return 6*e.get(l.POSITION).indices.length}write(e,t,r,i,s,n){f(r.get(l.POSITION),e,s.position,n,6),u(r.get(l.NORMAL),t,s.normal,n,6),h(r.get(l.CENTEROFFSETANDDISTANCE),s.centerOffsetAndDistance,n,6);for(let o=0;o<_.length;++o)s.uv0.setVec(n+o,_[o]);return null}}export{d as LineCalloutMaterial,T as Parameters,O as uniqueMaterialIdentifier};
5
+ import{safeToString as e}from"../../../../core/string.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newLayout as i}from"../../support/buffer/InterleavedLayout.js";import{isColorOrColorEmission as s}from"../core/shaderLibrary/ShaderOutput.js";import n from"../lib/GLMaterial.js";import{Material as o,MaterialParameters as a}from"../lib/Material.js";import{RenderSlot as c}from"../lib/RenderSlot.js";import{VertexAttribute as l}from"../lib/VertexAttribute.js";import{writePosition as f,writeNormal as u,writeBufferVec4 as h}from"./internal/bufferWriterUtils.js";import{LineCalloutTechnique as p}from"../shaders/LineCalloutTechnique.js";import{LineCalloutTechniqueConfiguration as m}from"../shaders/LineCalloutTechniqueConfiguration.js";import{alphaCutoff as g}from"../../../../webscene/support/AlphaCutoff.js";class d extends o{constructor(e,t){super(e,T),this.intersectDraped=void 0,this.produces=new Map([[c.LINE_CALLOUTS,e=>s(e)],[c.LINE_CALLOUTS_HUD_DEPTH,e=>s(e)]]),this._configuration=new m(t),this._uniqueMaterialIdentifier=O(this.parameters)}passParameters(){return this.parameters}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.hasVerticalOffset=null!=this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=null!=this.parameters.screenSizePerspective,this._configuration.hudDepth=t.slot===c.LINE_CALLOUTS_HUD_DEPTH,this._configuration.hudDepthAlignStart=!!this.parameters.hudDepthAlignStart,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration}get visible(){return this.parameters.color[3]>=g||(this.parameters.borderColor?.[3]??0)>=g}intersect(){}createGLMaterial(e){return new S(e)}createBufferWriter(){return new D}validateParameters(e){this._uniqueMaterialIdentifier=O(e)}get uniqueMaterialIdentifier(){return this._uniqueMaterialIdentifier}}function O({renderOccluded:t,isDecoration:r,horizontalScreenOffset:i,color:s,size:n,occlusionTest:o,shaderPolygonOffset:a,hudDepthAlignStart:c,centerOffsetUnits:l,hasSlicePlane:f,screenSizePerspective:u,verticalOffset:h,borderColor:p}){return e`${t}:${r}:${i}:[${s}]:${n}:${o}:${a}:${c}:${l}:${f}:${null!=u}:{${h.screenLength}:${h.minWorldLength}:${h.maxWorldLength}}:[${p}]`}class S extends n{beginSlot(e){return this.getTechnique(p,e)}}class T extends a{constructor(){super(...arguments),this.horizontalScreenOffset=0,this.color=r(0,0,0,1),this.size=1,this.occlusionTest=!1,this.shaderPolygonOffset=1e-5,this.hudDepthAlignStart=!1,this.centerOffsetUnits="world",this.hasSlicePlane=!1}}const L=i().vec3f(l.POSITION).vec3f(l.NORMAL).vec2f16(l.UV0).vec4f(l.CENTEROFFSETANDDISTANCE),_=[t(0,0),t(1,0),t(0,1),t(1,0),t(1,1),t(0,1)];class D{constructor(){this.vertexBufferLayout=L}elementCount(e){return 6*e.get(l.POSITION).indices.length}write(e,t,r,i,s,n){f(r.get(l.POSITION),e,s.position,n,6),u(r.get(l.NORMAL),t,s.normal,n,6),h(r.get(l.CENTEROFFSETANDDISTANCE),s.centerOffsetAndDistance,n,6);for(let o=0;o<_.length;++o)s.uv0.setVec(n+o,_[o]);return null}}export{d as LineCalloutMaterial,T as Parameters,O as uniqueMaterialIdentifier};
@@ -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{i as e,G as t,t as r}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{makeFloat16Array as a}from"../../../../geometry/support/float16.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isColor as n,isDepth as o,isColorHighlightOrDepth as h,isColorOrColorEmission as c,ShaderOutput as p}from"../core/shaderLibrary/ShaderOutput.js";import l from"../lib/GLMaterial.js";import{Material as m,RenderOccludedFlag as u}from"../lib/Material.js";import{RenderSlot as T}from"../lib/RenderSlot.js";import{VertexAttribute as f}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as d}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as E}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocations as A,LineMarkerTechnique as _}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as v,LineMarkerSpace as g,LineMarkerAnchor as S}from"../shaders/LineMarkerTechniqueConfiguration.js";import{CapType as O}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as R}from"../../../../webscene/support/AlphaCutoff.js";class I extends m{constructor(e){super(e,C),this._configuration=new v,this.vertexAttributeLocations=A,this.produces=new Map([[T.OPAQUE_MATERIAL,e=>e===p.Highlight||n(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>o(e)],[T.OCCLUDER_MATERIAL,e=>h(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.TRANSPARENT_OCCLUDER_MATERIAL,e=>h(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.TRANSPARENT_MATERIAL,e=>n(e)&&this.parameters.writeDepth],[T.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>n(e)&&!this.parameters.writeDepth],[T.DRAPED_MATERIAL,e=>c(e)||e===p.Highlight]]),this._layout=this.createLayout()}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.space=t.slot===T.DRAPED_MATERIAL?g.Draped:this.parameters.worldSpace?g.World:g.Screen,this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=this.parameters.cap!==O.BUTT,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasOccludees=t.hasOccludees,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.occluder=this.parameters.renderOccluded===u.OccludeAndTransparentStencil,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&c(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=R}intersect(){}createLayout(){const e=s().vec3f(f.POSITION).vec4f16(f.PREVIOUSDELTA).vec2f16(f.UV0);return this.parameters.worldSpace&&e.vec3f16(f.NORMAL),this.parameters.vvSize?e.f16(f.SIZEFEATUREATTRIBUTE):e.f16(f.SIZE),this.parameters.vvColor?e.f16(f.COLORFEATUREATTRIBUTE):e.vec4u8(f.COLOR,{glNormalized:!0}),this.parameters.vvOpacity&&e.f16(f.OPACITYFEATUREATTRIBUTE),e}createBufferWriter(){return new P(this._layout,this.parameters)}createGLMaterial(e){return new L(e)}}class L extends l{dispose(){super.dispose(),this._markerTextures.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){const t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this.getTechnique(_,e)}}class C extends d{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive="arrow",this.placement="end",this.cap=O.BUTT,this.anchor=S.Center,this.hasTip=!1,this.worldSpace=!1,this.hideOnShortSegments=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.markerTexture=null}}class P{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t}elementCount(){return"begin-end"===this._parameters.placement?12:6}write(i,s,n,o,h,c){const p=n.get(f.POSITION).data,l=p.length/3;let m=[1,0,0];const u=n.get(f.NORMAL);this._parameters.worldSpace&&null!=u&&(m=u.data);let T=1,d=0;this._parameters.vvSize?d=n.get(f.SIZEFEATUREATTRIBUTE).data[0]:n.has(f.SIZE)&&(T=n.get(f.SIZE).data[0]);let A=[1,1,1,1],_=0;this._parameters.vvColor?_=n.get(f.COLORFEATUREATTRIBUTE).data[0]:n.has(f.COLOR)&&(A=n.get(f.COLOR).data);let v=0;this._parameters.vvOpacity&&(v=n.get(f.OPACITYFEATUREATTRIBUTE).data[0]);const g=new Float32Array(h.buffer),S=a(h.buffer),O=new Uint8Array(h.buffer);let R=c*(this.vertexBufferLayout.stride/4);const I=g.BYTES_PER_ELEMENT/S.BYTES_PER_ELEMENT,L=4/I,C=(e,t,r,i)=>{g[R++]=e[0],g[R++]=e[1],g[R++]=e[2],E(t,e,S,R*I),R+=L;let a=R*I;if(S[a++]=r[0],S[a++]=r[1],this._parameters.worldSpace&&(S[a++]=m[0],S[a++]=m[1],S[a++]=m[2]),this._parameters.vvSize?S[a++]=d:S[a++]=T,this._parameters.vvColor)S[a++]=_;else{const e=Math.min(4*i,A.length-4),t=a/I*4;a+=I,O[t]=255*A[e],O[t+1]=255*A[e+1],O[t+2]=255*A[e+2],O[t+3]=255*A[e+3]}this._parameters.vvOpacity&&(S[a++]=v),R=Math.ceil(a/I)};let P;!function(e){e[e.ASCENDING=1]="ASCENDING",e[e.DESCENDING=-1]="DESCENDING"}(P||(P={}));const D=(a,s)=>{const n=e(N,p[3*a],p[3*a+1],p[3*a+2]),o=b;let h=a+s;do{e(o,p[3*h],p[3*h+1],p[3*h+2]),h+=s}while(t(n,o)&&h>=0&&h<l);i&&(r(n,n,i),r(o,o,i)),C(n,o,[-1,-1],a),C(n,o,[1,-1],a),C(n,o,[1,1],a),C(n,o,[-1,-1],a),C(n,o,[1,1],a),C(n,o,[-1,1],a)},U=this._parameters.placement;return"begin"!==U&&"begin-end"!==U||D(0,P.ASCENDING),"end"!==U&&"begin-end"!==U||D(l-1,P.DESCENDING),null}}const N=i(),b=i();export{I as LineMarkerMaterial,C as Parameters};
5
+ import{i as e,G as t,t as r}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{makeFloat16Array as a}from"../../../../geometry/support/float16.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isColor as n,isDepth as o,isColorHighlightOrDepth as h,isColorOrColorEmission as c,ShaderOutput as p}from"../core/shaderLibrary/ShaderOutput.js";import l from"../lib/GLMaterial.js";import{Material as m,RenderOccludedFlag as u}from"../lib/Material.js";import{RenderSlot as T}from"../lib/RenderSlot.js";import{VertexAttribute as f}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as d}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as E}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocations as A,LineMarkerTechnique as _}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as v,LineMarkerSpace as g,LineMarkerAnchor as S}from"../shaders/LineMarkerTechniqueConfiguration.js";import{CapType as O}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as R}from"../../../../webscene/support/AlphaCutoff.js";class I extends m{constructor(e){super(e,C),this._configuration=new v,this.vertexAttributeLocations=A,this.produces=new Map([[T.OPAQUE_MATERIAL,e=>e===p.Highlight||n(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>o(e)],[T.OCCLUDER_MATERIAL,e=>h(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.TRANSPARENT_OCCLUDER_MATERIAL,e=>h(e)&&this.parameters.renderOccluded===u.OccludeAndTransparentStencil],[T.TRANSPARENT_MATERIAL,e=>n(e)&&this.parameters.writeDepth],[T.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>n(e)&&!this.parameters.writeDepth],[T.DRAPED_MATERIAL,e=>c(e)||e===p.Highlight]]),this.intersectDraped=void 0,this._layout=this.createLayout()}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.space=t.slot===T.DRAPED_MATERIAL?g.Draped:this.parameters.worldSpace?g.World:g.Screen,this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=this.parameters.cap!==O.BUTT,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasOccludees=t.hasOccludees,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.occluder=this.parameters.renderOccluded===u.OccludeAndTransparentStencil,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&c(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=R}intersect(){}createLayout(){const e=s().vec3f(f.POSITION).vec4f16(f.PREVIOUSDELTA).vec2f16(f.UV0);return this.parameters.worldSpace&&e.vec3f16(f.NORMAL),this.parameters.vvSize?e.f16(f.SIZEFEATUREATTRIBUTE):e.f16(f.SIZE),this.parameters.vvColor?e.f16(f.COLORFEATUREATTRIBUTE):e.vec4u8(f.COLOR,{glNormalized:!0}),this.parameters.vvOpacity&&e.f16(f.OPACITYFEATUREATTRIBUTE),e}createBufferWriter(){return new P(this._layout,this.parameters)}createGLMaterial(e){return new L(e)}}class L extends l{dispose(){super.dispose(),this._markerTextures.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){const t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this.getTechnique(_,e)}}class C extends d{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive="arrow",this.placement="end",this.cap=O.BUTT,this.anchor=S.Center,this.hasTip=!1,this.worldSpace=!1,this.hideOnShortSegments=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.markerTexture=null}}class P{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t}elementCount(){return"begin-end"===this._parameters.placement?12:6}write(i,s,n,o,h,c){const p=n.get(f.POSITION).data,l=p.length/3;let m=[1,0,0];const u=n.get(f.NORMAL);this._parameters.worldSpace&&null!=u&&(m=u.data);let T=1,d=0;this._parameters.vvSize?d=n.get(f.SIZEFEATUREATTRIBUTE).data[0]:n.has(f.SIZE)&&(T=n.get(f.SIZE).data[0]);let A=[1,1,1,1],_=0;this._parameters.vvColor?_=n.get(f.COLORFEATUREATTRIBUTE).data[0]:n.has(f.COLOR)&&(A=n.get(f.COLOR).data);let v=0;this._parameters.vvOpacity&&(v=n.get(f.OPACITYFEATUREATTRIBUTE).data[0]);const g=new Float32Array(h.buffer),S=a(h.buffer),O=new Uint8Array(h.buffer);let R=c*(this.vertexBufferLayout.stride/4);const I=g.BYTES_PER_ELEMENT/S.BYTES_PER_ELEMENT,L=4/I,C=(e,t,r,i)=>{g[R++]=e[0],g[R++]=e[1],g[R++]=e[2],E(t,e,S,R*I),R+=L;let a=R*I;if(S[a++]=r[0],S[a++]=r[1],this._parameters.worldSpace&&(S[a++]=m[0],S[a++]=m[1],S[a++]=m[2]),this._parameters.vvSize?S[a++]=d:S[a++]=T,this._parameters.vvColor)S[a++]=_;else{const e=Math.min(4*i,A.length-4),t=a/I*4;a+=I,O[t]=255*A[e],O[t+1]=255*A[e+1],O[t+2]=255*A[e+2],O[t+3]=255*A[e+3]}this._parameters.vvOpacity&&(S[a++]=v),R=Math.ceil(a/I)};let P;!function(e){e[e.ASCENDING=1]="ASCENDING",e[e.DESCENDING=-1]="DESCENDING"}(P||(P={}));const b=(a,s)=>{const n=e(D,p[3*a],p[3*a+1],p[3*a+2]),o=N;let h=a+s;do{e(o,p[3*h],p[3*h+1],p[3*h+2]),h+=s}while(t(n,o)&&h>=0&&h<l);i&&(r(n,n,i),r(o,o,i)),C(n,o,[-1,-1],a),C(n,o,[1,-1],a),C(n,o,[1,1],a),C(n,o,[-1,-1],a),C(n,o,[1,1],a),C(n,o,[-1,1],a)},U=this._parameters.placement;return"begin"!==U&&"begin-end"!==U||b(0,P.ASCENDING),"end"!==U&&"begin-end"!==U||b(l-1,P.DESCENDING),null}}const D=i(),N=i();export{I as LineMarkerMaterial,C as Parameters};
@@ -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{i as t,n as e,d as r,h as s,j as o,t as i}from"../../../../chunks/vec32.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newLayout as c}from"../../support/buffer/InterleavedLayout.js";import{isColorOrColorEmission as u}from"../core/shaderLibrary/ShaderOutput.js";import l from"../lib/GLMaterial.js";import{Material as f,MaterialParameters as p}from"../lib/Material.js";import{RenderSlot as h}from"../lib/RenderSlot.js";import{VertexAttribute as m}from"../lib/VertexAttribute.js";import{vertexAttributeLocations as g,MeasurementArrowTechnique as d}from"../shaders/MeasurementArrowTechnique.js";import{MeasurementArrowTechniqueConfiguration as O}from"../shaders/MeasurementArrowTechniqueConfiguration.js";import{alphaCutoff as A}from"../../../../webscene/support/AlphaCutoff.js";class b extends f{constructor(t){super(t,C),this._configuration=new O,this.vertexAttributeLocations=g,this.produces=new Map([[h.OPAQUE_MATERIAL,t=>!this._transparent&&u(t)],[h.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,t=>this._transparent&&u(t)]])}getConfiguration(t,e){return super.getConfiguration(t,e,this._configuration),this._configuration.polygonOffsetEnabled=this.parameters.polygonOffset,this._configuration.transparent=this._transparent,this._configuration.oitPass=e.oitPass,this._configuration}get visible(){const{outlineColor:t,stripeEvenColor:e,stripeOddColor:r}=this.parameters;return t[3]>=A||e[3]>=A||r[3]>=A}intersect(){}createGLMaterial(t){return new v(t)}createBufferWriter(){return new E}get _transparent(){const{parameters:t}=this;return t.outlineColor[3]<1||t.stripeEvenColor[3]<1||t.stripeOddColor[3]<1}}class v extends l{beginSlot(t){return this.getTechnique(d,t)}}class C extends p{constructor(){super(...arguments),this.width=32,this.outlineSize=.2,this.outlineColor=a(1,.5,0,1),this.stripeEvenColor=a(1,1,1,1),this.stripeOddColor=a(1,.5,0,1),this.stripeLength=1,this.polygonOffset=!1}}const T=c().vec3f(m.POSITION).vec3f(m.NORMAL).vec2f(m.UV0).f32(m.LENGTH),_=n(),j=n(),L=n(),M=n(),w=n();class E{constructor(){this.vertexBufferLayout=T}elementCount(t){return 2*(t.get(m.POSITION).indices.length/2+1)}write(n,a,c,u,l,f){const{data:p,indices:h}=c.get(m.POSITION),g=c.get(m.NORMAL).data,d=p.length/3;h&&h.length!==2*(d-1)&&console.warn("MeasurementArrowMaterial does not support indices");const O=_,A=j,b=L,v=M,C=w,T=l.position,E=l.normal,I=l.uv0;let x=0;for(let m=0;m<d;++m){const c=3*m;if(t(O,p[c],p[c+1],p[c+2]),m<d-1){const o=3*(m+1);t(A,p[o],p[o+1],p[o+2]),t(C,g[o],g[o+1],g[o+2]),e(C,C),r(b,A,O),e(b,b),s(v,C,b),e(v,v)}const u=o(O,A);n&&a&&(i(O,O,n),i(A,A,n),i(v,v,a));const l=f+2*m,h=l+1;T.setVec(l,O),T.setVec(h,O),E.setVec(l,v),E.setVec(h,v),I.set(l,0,x),I.set(l,1,-1),I.set(h,0,x),I.set(h,1,1),m<d-1&&(x+=u)}const N=l.length;for(let t=0;t<2*d;++t)N.set(f+t,x);return null}}export{b as MeasurementArrowMaterial,C as Parameters};
5
+ import{i as t,n as e,d as r,h as s,j as o,t as i}from"../../../../chunks/vec32.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{newLayout as c}from"../../support/buffer/InterleavedLayout.js";import{isColorOrColorEmission as u}from"../core/shaderLibrary/ShaderOutput.js";import l from"../lib/GLMaterial.js";import{Material as f,MaterialParameters as p}from"../lib/Material.js";import{RenderSlot as h}from"../lib/RenderSlot.js";import{VertexAttribute as m}from"../lib/VertexAttribute.js";import{vertexAttributeLocations as g,MeasurementArrowTechnique as d}from"../shaders/MeasurementArrowTechnique.js";import{MeasurementArrowTechniqueConfiguration as O}from"../shaders/MeasurementArrowTechniqueConfiguration.js";import{alphaCutoff as v}from"../../../../webscene/support/AlphaCutoff.js";class A extends f{constructor(t){super(t,C),this._configuration=new O,this.vertexAttributeLocations=g,this.intersectDraped=void 0,this.produces=new Map([[h.OPAQUE_MATERIAL,t=>!this._transparent&&u(t)],[h.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,t=>this._transparent&&u(t)]])}getConfiguration(t,e){return super.getConfiguration(t,e,this._configuration),this._configuration.polygonOffsetEnabled=this.parameters.polygonOffset,this._configuration.transparent=this._transparent,this._configuration.oitPass=e.oitPass,this._configuration}get visible(){const{outlineColor:t,stripeEvenColor:e,stripeOddColor:r}=this.parameters;return t[3]>=v||e[3]>=v||r[3]>=v}intersect(){}createGLMaterial(t){return new b(t)}createBufferWriter(){return new E}get _transparent(){const{parameters:t}=this;return t.outlineColor[3]<1||t.stripeEvenColor[3]<1||t.stripeOddColor[3]<1}}class b extends l{beginSlot(t){return this.getTechnique(d,t)}}class C extends p{constructor(){super(...arguments),this.width=32,this.outlineSize=.2,this.outlineColor=a(1,.5,0,1),this.stripeEvenColor=a(1,1,1,1),this.stripeOddColor=a(1,.5,0,1),this.stripeLength=1,this.polygonOffset=!1}}const T=c().vec3f(m.POSITION).vec3f(m.NORMAL).vec2f(m.UV0).f32(m.LENGTH),_=n(),j=n(),L=n(),M=n(),w=n();class E{constructor(){this.vertexBufferLayout=T}elementCount(t){return 2*(t.get(m.POSITION).indices.length/2+1)}write(n,a,c,u,l,f){const{data:p,indices:h}=c.get(m.POSITION),g=c.get(m.NORMAL).data,d=p.length/3;h&&h.length!==2*(d-1)&&console.warn("MeasurementArrowMaterial does not support indices");const O=_,v=j,A=L,b=M,C=w,T=l.position,E=l.normal,I=l.uv0;let x=0;for(let m=0;m<d;++m){const c=3*m;if(t(O,p[c],p[c+1],p[c+2]),m<d-1){const o=3*(m+1);t(v,p[o],p[o+1],p[o+2]),t(C,g[o],g[o+1],g[o+2]),e(C,C),r(A,v,O),e(A,A),s(b,C,A),e(b,b)}const u=o(O,v);n&&a&&(i(O,O,n),i(v,v,n),i(b,b,a));const l=f+2*m,h=l+1;T.setVec(l,O),T.setVec(h,O),E.setVec(l,b),E.setVec(h,b),I.set(l,0,x),I.set(l,1,-1),I.set(h,0,x),I.set(h,1,1),m<d-1&&(x+=u)}const N=l.length;for(let t=0;t<2*d;++t)N.set(f+t,x);return null}}export{A as MeasurementArrowMaterial,C as Parameters};
@@ -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/Logger.js";import{clamp as r}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as t}from"../../../../core/screenUtils.js";import{copy as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as i,e as a,g as n,f as c,c as m,l,j as f}from"../../../../chunks/vec32.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{PlaneIndex as h}from"../../../../geometry/support/frustum.js";import{distance2 as g,fromPoints as d,create as j,closestLineSegmentPoint as b}from"../../../../geometry/support/lineSegment.js";import{fromPoints as A,create as S,signedDistance as x,getNormal as L}from"../../../../geometry/support/plane.js";import{isColorHighlightOrOID as y}from"../core/shaderLibrary/ShaderOutput.js";import N from"../lib/GLMaterial.js";import{Material as R,MaterialParameters as v}from"../lib/Material.js";import{RenderSlot as E}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as T}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as _}from"./DefaultBufferWriter.js";import{PositionColorLayout as w,PositionLayout as C}from"./DefaultLayouts.js";import{NativeLineTechnique as O}from"../shaders/NativeLineTechnique.js";import{NativeLineTechniqueConfiguration as V}from"../shaders/NativeLineTechniqueConfiguration.js";import{alphaCutoff as P}from"../../../../webscene/support/AlphaCutoff.js";class U extends R{constructor(e){super(e,q),this._configuration=new V,this.produces=new Map([[E.OPAQUE_MATERIAL,e=>y(e)]])}getConfiguration(e,r){return super.getConfiguration(e,r,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.transparent=this.parameters.color[3]<1||this.parameters.width<1,this._configuration.hasOccludees=r.hasOccludees,this._configuration}get visible(){return this.parameters.color[3]>=P}intersect(r,t,u,p,j,S){if(!u.options.selectionMode||!r.visible)return;if(!M(t))return void e.getLogger("esri.views.3d.webgl-engine.materials.NativeLineMaterial").error("intersection assumes a translation-only matrix");const y=r.attributes.get(T.POSITION).data,N=u.camera,R=H;o(R,u.point);const v=2;s(J[0],R[0]-v,R[1]+v,0),s(J[1],R[0]+v,R[1]+v,0),s(J[2],R[0]+v,R[1]-v,0),s(J[3],R[0]-v,R[1]-v,0);for(let e=0;e<4;e++)if(!N.unprojectFromRenderScreen(J[e],K[e]))return;A(N.eye,K[0],K[1],Y),A(N.eye,K[1],K[2],$),A(N.eye,K[2],K[3],ee),A(N.eye,K[3],K[0],re);let E=Number.MAX_VALUE,_=0;for(let e=0;e<y.length-5;e+=3){if(B[0]=y[e]+t[12],B[1]=y[e+1]+t[13],B[2]=y[e+2]+t[14],D[0]=y[e+3]+t[12],D[1]=y[e+4]+t[13],D[2]=y[e+5]+t[14],x(Y,B)<0&&x(Y,D)<0||x($,B)<0&&x($,D)<0||x(ee,B)<0&&x(ee,D)<0||x(re,B)<0&&x(re,D)<0)continue;if(N.projectToRenderScreen(B,G),N.projectToRenderScreen(D,k),G[2]<0&&k[2]>0){i(W,B,D);const e=N.frustum,r=-x(e[h.NEAR],B)/a(W,L(e[h.NEAR]));n(W,W,r),c(B,B,W),N.projectToRenderScreen(B,G)}else if(G[2]>0&&k[2]<0){i(W,D,B);const e=N.frustum,r=-x(e[h.NEAR],D)/a(W,L(e[h.NEAR]));n(W,W,r),c(D,D,W),N.projectToRenderScreen(D,k)}else if(G[2]<0&&k[2]<0)continue;G[2]=0,k[2]=0;const r=g(d(G,k,Z),R);r<E&&(E=r,m(F,B),m(Q,D),_=e/3)}const w=u.rayBegin,C=u.rayEnd;if(E<v*v){let e=Number.MAX_VALUE;if(b(d(F,Q,Z),d(w,C,z),X)){i(X,X,w);const r=l(X);n(X,X,1/r),e=r/f(w,C)}S(e,X,_,!1)}}intersectDraped(e,t,o,s,i,a){if(!o.options.selectionMode)return;const n=e.attributes.get(T.POSITION).data,c=e.attributes.get(T.SIZE),m=c?c.data[0]:0,l=s[0],f=s[1],u=((m+1)/2+4)*e.screenToWorldRatio;let p=Number.MAX_VALUE,h=0;for(let g=0;g<n.length-5;g+=3){const e=n[g],t=n[g+1],o=l-e,s=f-t,i=n[g+3]-e,a=n[g+4]-t,c=r((i*o+a*s)/(i*i+a*a),0,1),m=i*c-o,u=a*c-s,d=m*m+u*u;d<p&&(p=d,h=g/3)}p<u*u&&i(a.dist,a.normal,h,!1)}createGLMaterial(e){return new I(e)}createBufferWriter(){const e=this.parameters.hasVertexColors?w:C;return new _(e)}}class I extends N{beginSlot(e){return this.getTechnique(O,e)}}class q extends v{constructor(){super(...arguments),this.color=p,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.width=1}}const B=u(),D=u(),W=u(),X=u(),G=t(),k=t(),F=u(),Q=u(),Z=j(),z=j(),H=u(),J=[t(),t(),t(),t()],K=[u(),u(),u(),u()],Y=S(),$=S(),ee=S(),re=S();export{U as NativeLineMaterial,q as Parameters};
5
+ import e from"../../../../core/Logger.js";import{clamp as r}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as t}from"../../../../core/screenUtils.js";import{copy as o}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as i,e as a,g as n,f as c,c as m,l,j as f}from"../../../../chunks/vec32.js";import{create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as p}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{PlaneIndex as h}from"../../../../geometry/support/frustum.js";import{distance2 as g,fromPoints as d,create as j,closestLineSegmentPoint as b}from"../../../../geometry/support/lineSegment.js";import{fromPoints as A,create as S,signedDistance as x,getNormal as L}from"../../../../geometry/support/plane.js";import{isColorHighlightOrOID as y}from"../core/shaderLibrary/ShaderOutput.js";import N from"../lib/GLMaterial.js";import{Material as R,MaterialParameters as v}from"../lib/Material.js";import{RenderSlot as E}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as T}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as _}from"./DefaultBufferWriter.js";import{PositionColorLayout as w,PositionLayout as C}from"./DefaultLayouts.js";import{NativeLineTechnique as O}from"../shaders/NativeLineTechnique.js";import{NativeLineTechniqueConfiguration as V}from"../shaders/NativeLineTechniqueConfiguration.js";import{alphaCutoff as P}from"../../../../webscene/support/AlphaCutoff.js";class U extends R{constructor(e){super(e,q),this._configuration=new V,this.produces=new Map([[E.OPAQUE_MATERIAL,e=>y(e)]])}getConfiguration(e,r){return super.getConfiguration(e,r,this._configuration),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVertexColors=this.parameters.hasVertexColors,this._configuration.transparent=this.parameters.color[3]<1||this.parameters.width<1,this._configuration.hasOccludees=r.hasOccludees,this._configuration}get visible(){return this.parameters.color[3]>=P}intersect(r,t,u,p,j,S){const y=u.camera;if(!u.options.selectionMode||!r.visible||!y)return;if(!M(t))return void e.getLogger("esri.views.3d.webgl-engine.materials.NativeLineMaterial").error("intersection assumes a translation-only matrix");const N=r.attributes.get(T.POSITION).data,R=H;o(R,u.point);const v=2;s(J[0],R[0]-v,R[1]+v,0),s(J[1],R[0]+v,R[1]+v,0),s(J[2],R[0]+v,R[1]-v,0),s(J[3],R[0]-v,R[1]-v,0);for(let e=0;e<4;e++)if(!y.unprojectFromRenderScreen(J[e],K[e]))return;A(y.eye,K[0],K[1],Y),A(y.eye,K[1],K[2],$),A(y.eye,K[2],K[3],ee),A(y.eye,K[3],K[0],re);let E=Number.MAX_VALUE,_=0;for(let e=0;e<N.length-5;e+=3){if(B[0]=N[e]+t[12],B[1]=N[e+1]+t[13],B[2]=N[e+2]+t[14],D[0]=N[e+3]+t[12],D[1]=N[e+4]+t[13],D[2]=N[e+5]+t[14],x(Y,B)<0&&x(Y,D)<0||x($,B)<0&&x($,D)<0||x(ee,B)<0&&x(ee,D)<0||x(re,B)<0&&x(re,D)<0)continue;if(y.projectToRenderScreen(B,G),y.projectToRenderScreen(D,k),G[2]<0&&k[2]>0){i(W,B,D);const e=y.frustum,r=-x(e[h.NEAR],B)/a(W,L(e[h.NEAR]));n(W,W,r),c(B,B,W),y.projectToRenderScreen(B,G)}else if(G[2]>0&&k[2]<0){i(W,D,B);const e=y.frustum,r=-x(e[h.NEAR],D)/a(W,L(e[h.NEAR]));n(W,W,r),c(D,D,W),y.projectToRenderScreen(D,k)}else if(G[2]<0&&k[2]<0)continue;G[2]=0,k[2]=0;const r=g(d(G,k,Z),R);r<E&&(E=r,m(F,B),m(Q,D),_=e/3)}const w=u.rayBegin,C=u.rayEnd;if(E<v*v){let e=Number.MAX_VALUE;if(b(d(F,Q,Z),d(w,C,z),X)){i(X,X,w);const r=l(X);n(X,X,1/r),e=r/f(w,C)}S(e,X,_)}}intersectDraped(e,t,o,s,i){if(!t.options.selectionMode)return;const a=e.attributes.get(T.POSITION).data,n=e.attributes.get(T.SIZE),c=n?n.data[0]:0,m=o[0],l=o[1],f=((c+1)/2+4)*e.screenToWorldRatio;let u=Number.MAX_VALUE,p=0;for(let h=0;h<a.length-5;h+=3){const e=a[h],t=a[h+1],o=m-e,s=l-t,i=a[h+3]-e,n=a[h+4]-t,c=r((i*o+n*s)/(i*i+n*n),0,1),f=i*c-o,g=n*c-s,d=f*f+g*g;d<u&&(u=d,p=h/3)}u<f*f&&s(i.distance,i.normal,p)}createGLMaterial(e){return new I(e)}createBufferWriter(){const e=this.parameters.hasVertexColors?w:C;return new _(e)}}class I extends N{beginSlot(e){return this.getTechnique(O,e)}}class q extends v{constructor(){super(...arguments),this.color=p,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.width=1}}const B=u(),D=u(),W=u(),X=u(),G=t(),k=t(),F=u(),Q=u(),Z=j(),z=j(),H=u(),J=[t(),t(),t(),t()],K=[u(),u(),u(),u()],Y=S(),$=S(),ee=S(),re=S();export{U as NativeLineMaterial,q as Parameters};
@@ -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 e}from"../../../../core/mathUtils.js";import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as s,is3DGeometryOutputMRT as o,isColorOrColorEmission as a,isColorEmission as n,ShaderOutput as h}from"../core/shaderLibrary/ShaderOutput.js";import{EmissionSource as c}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as u}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as l}from"../effects/geometry/olidUtils.js";import p from"../lib/GLMaterial.js";import{Material as d}from"../lib/Material.js";import{isPathGeometry as f}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as b,intersectAabbInvDir as g}from"../lib/RayIntersections.js";import{RenderSlot as v}from"../lib/RenderSlot.js";import{VertexAttribute as S}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as T}from"./DefaultBufferWriter.js";import{vertexAttributeLocations as A,PathPassParameters as O,PathTechnique as R}from"./PathTechnique.js";import{PathTechniqueConfiguration as _}from"./PathTechniqueConfiguration.js";import{alphaCutoff as y}from"../../../../webscene/support/AlphaCutoff.js";class E extends d{constructor(e,t){super(e,j),this.vertexAttributeLocations=A,this.supportsEdges=!0,this.produces=new Map([[v.OPAQUE_MATERIAL,e=>(this.parameters.castShadows&&s(e)||o(e))&&!this.transparent],[v.TRANSPARENT_MATERIAL,e=>(this.parameters.castShadows&&s(e)||o(e))&&this.transparent]]),this._configuration=new _(t.spherical)}get hasEmissions(){return this.parameters.emissiveStrength>0}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=t.hasOccludees,a(e)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?u.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?u.WindingOrder:u.None,this._configuration.receiveShadows=t.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=t.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?m.Schematic:m.Disabled,this._configuration.emissionSource=this.parameters.usePBR?c.SymbolColor:c.None,this._configuration.hasBloom=n(e),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.snowCover=t.snowCover,this._configuration}isVisibleForOutput(e){return e!==h.Shadow&&e!==h.ShadowExcludeHighlight&&e!==h.ShadowHighlight||this.parameters.castShadows}get visible(){return this.parameters.opacity>=y}intersect(r,s,o,a,n,h){const c=r;if(!f(c))return;const u=c.path,m=t(this.parameters.size);if(this.parameters.vvSize){const{offset:t,factor:i,minSize:r,maxSize:s,fallback:o}=this.parameters.vvSize,a=u.sizeAttributeValue;Number.isNaN(a)?(m[0]*=o[0],m[1]*=o[2]):(m[0]*=e(t[0]+a*i[0],r[0],s[0]),m[1]*=e(t[2]+a*i[2],r[2],s[2]))}const l=new b(!1,o.options.normalRequired),p=Math.max(m[0],m[1]),d=r.boundingInfo;if(null==d)return void w(u,m,a,n,l,h);const v=i(d.bbMin[0]-p,d.bbMin[1]-p,d.bbMin[2]-p,d.bbMax[0]+p,d.bbMax[1]+p,d.bbMax[2]+p),S=[n[0]-a[0],n[1]-a[1],n[2]-a[2]],T=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]),A=[T/S[0],T/S[1],T/S[2]];g(v,a,A,o.tolerance)&&w(u,m,a,n,l,h)}createBufferWriter(){return new T(this._layout)}get _layout(){const e=r().vec3f(S.POSITION).vec4f16(S.PROFILEVERTEXANDNORMAL).vec3f16(S.PROFILEAUXDATA).vec2i16(S.PROFILERIGHT,{glNormalized:!0}).vec2i16(S.PROFILEUP,{glNormalized:!0});return this.parameters.vvSize&&e.f32(S.SIZEFEATUREATTRIBUTE),this.parameters.vvColor&&e.f16(S.COLORFEATUREATTRIBUTE),this.parameters.vvOpacity&&e.f16(S.OPACITYFEATUREATTRIBUTE),l()&&e.vec4u8(S.OLIDCOLOR),e}createGLMaterial(e){return new P(e)}get transparent(){const{parameters:e}=this;return e.drivenOpacity||e.opacity<1}}class P extends p{beginSlot(e){return this.getTechnique(R,e)}}function w(e,t,i,r,s,o){e.baked.size&&e.baked.size[0]===t[0]&&e.baked.size[1]===t[1]||e.baked.bake(t),e.baked.intersect(i,r,s,o)}class j extends O{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}export{j as Parameters,E as PathMaterial};
5
+ import{clamp as t}from"../../../../core/mathUtils.js";import{clone as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as r}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as o,is3DGeometryOutputMRT as a,isColorOrColorEmission as n,isColorEmission as h,ShaderOutput as c}from"../core/shaderLibrary/ShaderOutput.js";import{EmissionSource as p}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as u}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as l}from"../effects/geometry/olidUtils.js";import f from"../lib/GLMaterial.js";import{Material as d}from"../lib/Material.js";import{isPathGeometry as b}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as g,intersectAabbInvDir as v}from"../lib/RayIntersections.js";import{RenderSlot as S}from"../lib/RenderSlot.js";import{VertexAttribute as _}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as T}from"./DefaultBufferWriter.js";import{vertexAttributeLocations as A,PathPassParameters as O,PathTechnique as R}from"./PathTechnique.js";import{PathTechniqueConfiguration as y}from"./PathTechniqueConfiguration.js";import{alphaCutoff as E}from"../../../../webscene/support/AlphaCutoff.js";class P extends d{constructor(t,e){super(t,I),this.vertexAttributeLocations=A,this.supportsEdges=!0,this._pp0=i(0,0,1),this._pp1=i(0,0,0),this.produces=new Map([[S.OPAQUE_MATERIAL,t=>(this.parameters.castShadows&&o(t)||a(t))&&!this.transparent],[S.TRANSPARENT_MATERIAL,t=>(this.parameters.castShadows&&o(t)||a(t))&&this.transparent]]),this._configuration=new y(e.spherical)}get hasEmissions(){return this.parameters.emissiveStrength>0}getConfiguration(t,e){return super.getConfiguration(t,e,this._configuration),this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=e.hasOccludees,n(t)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?u.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?u.WindingOrder:u.None,this._configuration.receiveShadows=e.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=e.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?m.Schematic:m.Disabled,this._configuration.emissionSource=this.parameters.usePBR?p.SymbolColor:p.None,this._configuration.hasBloom=h(t),this._configuration.oitPass=e.oitPass,this._configuration.terrainDepthTest=e.terrainDepthTest,this._configuration.cullAboveTerrain=e.cullAboveTerrain,this._configuration.snowCover=e.snowCover,this._configuration}isVisibleForOutput(t){return t!==c.Shadow&&t!==c.ShadowExcludeHighlight&&t!==c.ShadowHighlight||this.parameters.castShadows}get visible(){return this.parameters.opacity>=E}intersect(t,e,i,r,s,o){this._intersect(t,i,r,s,o)}intersectDraped(t,e,i,r){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this._intersect(t,e,this._pp0,this._pp1,r)}_intersect(i,s,o,a,n){const h=i;if(!b(h))return;const c=h.path,p=e(this.parameters.size);if(this.parameters.vvSize){const{offset:e,factor:i,minSize:r,maxSize:s,fallback:o}=this.parameters.vvSize,a=c.sizeAttributeValue;Number.isNaN(a)?(p[0]*=o[0],p[1]*=o[2]):(p[0]*=t(e[0]+a*i[0],r[0],s[0]),p[1]*=t(e[2]+a*i[2],r[2],s[2]))}const u=new g(!1,s.options.normalRequired),m=Math.max(p[0],p[1]),l=i.boundingInfo;if(null==l)return void w(c,p,o,a,u,n);const f=r(l.bbMin[0]-m,l.bbMin[1]-m,l.bbMin[2]-m,l.bbMax[0]+m,l.bbMax[1]+m,l.bbMax[2]+m),d=[a[0]-o[0],a[1]-o[1],a[2]-o[2]],S=Math.sqrt(d[0]*d[0]+d[1]*d[1]+d[2]*d[2]),_=[S/d[0],S/d[1],S/d[2]];v(f,o,_,s.tolerance)&&w(c,p,o,a,u,n)}createBufferWriter(){return new T(this._layout)}get _layout(){const t=s().vec3f(_.POSITION).vec4f16(_.PROFILEVERTEXANDNORMAL).vec3f16(_.PROFILEAUXDATA).vec2i16(_.PROFILERIGHT,{glNormalized:!0}).vec2i16(_.PROFILEUP,{glNormalized:!0});return this.parameters.vvSize&&t.f32(_.SIZEFEATUREATTRIBUTE),this.parameters.vvColor&&t.f16(_.COLORFEATUREATTRIBUTE),this.parameters.vvOpacity&&t.f16(_.OPACITYFEATUREATTRIBUTE),l()&&t.vec4u8(_.OLIDCOLOR),t}createGLMaterial(t){return new j(t)}get transparent(){const{parameters:t}=this;return t.drivenOpacity||t.opacity<1}}class j extends f{beginSlot(t){return this.getTechnique(R,t)}}function w(t,e,i,r,s,o){t.baked.size&&t.baked.size[0]===e[0]&&t.baked.size[1]===e[1]||t.baked.bake(e),t.baked.intersect(i,r,s,o)}class I extends O{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}export{I as Parameters,P as PathMaterial};
@@ -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/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as r}from"../../../../core/screenUtils.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as a,e as n,g as o,f as l,c,l as p,j as h,t as f}from"../../../../chunks/vec32.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as u}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as T}from"../../../../geometry/support/float16.js";import{PlaneIndex as d}from"../../../../geometry/support/frustum.js";import{create as E,distance2 as _,fromPoints as A,closestLineSegmentPoint as R}from"../../../../geometry/support/lineSegment.js";import{create as g,fromPoints as S,signedDistance as O,getNormal as I}from"../../../../geometry/support/plane.js";import{newLayout as v}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as P,isColorOrColorEmission as N,isDepth as L,isColorEmissionHighlightOIDOrDepth as b,is2DGeometryOutput as C,ShaderOutput as U}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as y}from"../effects/geometry/olidUtils.js";import j from"../lib/GLMaterial.js";import{Material as D,RenderOccludedFlag as F}from"../lib/Material.js";import{RenderSlot as w}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as B}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as x}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as J}from"./internal/bufferWriterUtils.js";import{LineMarkerAnchor as z}from"../shaders/LineMarkerTechniqueConfiguration.js";import{r as H}from"../../../../chunks/RibbonLine.glsl.js";import{vertexAttributeLocations as G,RibbonLineTechnique as k}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as Z,CapType as V}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as W}from"../../../../webscene/support/AlphaCutoff.js";var Y;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(Y||(Y={}));class q extends D{constructor(e){super(e,Q),this._configuration=new Z,this.vertexAttributeLocations=G,this.produces=new Map([[w.OPAQUE_MATERIAL,e=>P(e)||N(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>L(e)],[w.OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL,e=>N(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>N(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.DRAPED_MATERIAL,e=>C(e)]])}getConfiguration(e,t){super.getConfiguration(e,t,this._configuration),this._configuration.oitPass=t.oitPass,this._configuration.draped=t.slot===w.DRAPED_MATERIAL;const r=null!=this.parameters.stipplePattern&&e!==U.Highlight;return this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&te(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=this.parameters.renderOccluded===F.OccludeAndTransparentStencil,this._configuration.terrainDepthTest=t.terrainDepthTest&&N(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration}get visible(){return this.parameters.color[3]>=W||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>W}intersectDraped({attributes:e,screenToWorldRatio:r},i,s,a,n,o){if(!s.options.selectionMode)return;const l=e.get(B.SIZE);let c=this.parameters.width;if(this.parameters.vvSize){const r=e.get(B.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(r)?c*=this.parameters.vvSize.fallback[0]:c*=t(this.parameters.vvSize.offset[0]+r*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else l&&(c*=l.data[0]);const p=a[0],h=a[1],f=(c/2+4)*r;let m=Number.MAX_VALUE,u=0;const T=e.get(B.POSITION).data,d=ee(this.parameters,e)?T.length-2:T.length-5;for(let E=0;E<d;E+=3){const e=T[E],r=T[E+1],i=(E+3)%T.length,s=p-e,a=h-r,n=T[i]-e,o=T[i+1]-r,l=t((n*s+o*a)/(n*n+o*o),0,1),c=n*l-s,f=o*l-a,d=c*c+f*f;d<m&&(m=d,u=E/3)}m<f*f&&n(o.dist,o.normal,u,!1)}intersect(r,f,m,u,T,E){if(!m.options.selectionMode||!r.visible)return;if(!M(f))return void e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const g=r.attributes,v=g.get(B.POSITION).data;let P=this.parameters.width;if(this.parameters.vvSize){const e=g.get(B.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(e)||(P*=t(this.parameters.vvSize.offset[0]+e*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else g.has(B.SIZE)&&(P*=g.get(B.SIZE).data[0]);const N=m.camera,L=ne;i(L,m.point);const b=P*N.pixelRatio/2+4*N.pixelRatio;s(de[0],L[0]-b,L[1]+b,0),s(de[1],L[0]+b,L[1]+b,0),s(de[2],L[0]+b,L[1]-b,0),s(de[3],L[0]-b,L[1]-b,0);for(let e=0;e<4;e++)if(!N.unprojectFromRenderScreen(de[e],Ee[e]))return;S(N.eye,Ee[0],Ee[1],_e),S(N.eye,Ee[1],Ee[2],Ae),S(N.eye,Ee[2],Ee[3],Re),S(N.eye,Ee[3],Ee[0],ge);let C=Number.MAX_VALUE,U=0;const y=ee(this.parameters,g)?v.length-2:v.length-5;for(let e=0;e<y;e+=3){re[0]=v[e]+f[12],re[1]=v[e+1]+f[13],re[2]=v[e+2]+f[14];const t=(e+3)%v.length;if(ie[0]=v[t]+f[12],ie[1]=v[t+1]+f[13],ie[2]=v[t+2]+f[14],O(_e,re)<0&&O(_e,ie)<0||O(Ae,re)<0&&O(Ae,ie)<0||O(Re,re)<0&&O(Re,ie)<0||O(ge,re)<0&&O(ge,ie)<0)continue;if(N.projectToRenderScreen(re,oe),N.projectToRenderScreen(ie,le),oe[2]<0&&le[2]>0){a(se,re,ie);const e=N.frustum,t=-O(e[d.NEAR],re)/n(se,I(e[d.NEAR]));o(se,se,t),l(re,re,se),N.projectToRenderScreen(re,oe)}else if(oe[2]>0&&le[2]<0){a(se,ie,re);const e=N.frustum,t=-O(e[d.NEAR],ie)/n(se,I(e[d.NEAR]));o(se,se,t),l(ie,ie,se),N.projectToRenderScreen(ie,le)}else if(oe[2]<0&&le[2]<0)continue;oe[2]=0,le[2]=0;const r=_(A(oe,le,he),L);r<C&&(C=r,c(ce,re),c(pe,ie),U=e/3)}const j=m.rayBegin,D=m.rayEnd;if(C<b*b){let e=Number.MAX_VALUE;if(R(A(ce,pe,he),A(j,D,fe),ae)){a(ae,ae,j);const t=p(ae);o(ae,ae,1/t),e=t/h(j,D)}E(e,ae,U,!1)}}get _layout(){const e=v().vec3f(B.POSITION).vec4f16(B.PREVIOUSDELTA).vec4f16(B.NEXTDELTA).f32(B.U0).vec2f16(B.LINEPARAMETERS);return this.parameters.vvSize?e.f32(B.SIZEFEATUREATTRIBUTE):e.f16(B.SIZE),this.parameters.vvColor?e.f16(B.COLORFEATUREATTRIBUTE):e.vec4u8(B.COLOR,{glNormalized:!0}),this.parameters.vvOpacity&&e.f16(B.OPACITYFEATUREATTRIBUTE),y()&&e.vec4u8(B.OLIDCOLOR),e}createBufferWriter(){return new K(this._layout,this.parameters)}createGLMaterial(e){return new X(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}}class X extends j{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const t=this._material.parameters.stipplePattern;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(k,e)}}class Q extends x{constructor(){super(...arguments),this.width=0,this.color=u,this.join="miter",this.cap=V.BUTT,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1}get transparent(){return this.color[3]<1||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}}class K{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t;const r=t.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=H+r}}_isClosed(e){return ee(this._parameters,e)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.get(B.POSITION).indices.length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,r,i,a,n){const o=r.get(B.POSITION),l=o.indices,p=o.data.length/3,m=r.get(B.DISTANCETOSTART)?.data;l&&l.length!==2*(p-1)&&console.warn("RibbonLineMaterial does not support indices");const u=this.vertexBufferLayout.fields.has(B.SIZEFEATUREATTRIBUTE),d=(u?r.get(B.SIZEFEATUREATTRIBUTE)?.data[0]:r.get(B.SIZE)?.data[0])??1;let E=[1,1,1,1],_=0;const A=this.vertexBufferLayout.fields.has(B.COLORFEATUREATTRIBUTE);A?_=r.get(B.COLORFEATUREATTRIBUTE).data[0]:r.has(B.COLOR)&&(E=r.get(B.COLOR).data);const R=this.vertexBufferLayout.fields.has(B.OPACITYFEATUREATTRIBUTE),g=R?r.get(B.OPACITYFEATUREATTRIBUTE).data[0]:0,S=new Float32Array(a.buffer),O=T(a.buffer),I=new Uint8Array(a.buffer),v=this.vertexBufferLayout.stride/4;let P=n*v;const N=P;let L=0;const b=m?(e,t,r)=>L=m[r]:(e,t,r)=>L+=h(e,t),C=S.BYTES_PER_ELEMENT/O.BYTES_PER_ELEMENT,U=4/C,j=(e,t,r,s,a,n,o)=>{S[P++]=t[0],S[P++]=t[1],S[P++]=t[2],J(e,t,O,P*C),P+=U,J(r,t,O,P*C),P+=U,S[P++]=o;let l=P*C;if(O[l++]=s,O[l++]=a,u?(P=Math.ceil(l/C),S[P]=d,l+=C):O[l++]=d,A)O[l++]=_;else{const e=Math.min(4*n,E.length-4),t=l/C*4;l+=C,I[t]=255*E[e],I[t+1]=255*E[e+1],I[t+2]=255*E[e+2],I[t+3]=255*E[e+3]}R&&(O[l++]=g);let c=l/C*4;y()&&i&&(I[c++]=i[0],I[c++]=i[1],I[c++]=i[2],I[c++]=i[3]),P=Math.ceil(.25*c)};P+=v,s(ue,o.data[0],o.data[1],o.data[2]),e&&f(ue,ue,e);const D=this._isClosed(r);if(D){const t=o.data.length-3;s(me,o.data[t],o.data[t+1],o.data[t+2]),e&&f(me,me,e)}else s(Te,o.data[3],o.data[4],o.data[5]),e&&f(Te,Te,e),j(ue,ue,Te,1,Y.LEFT_CAP_START,0,0),j(ue,ue,Te,1,Y.RIGHT_CAP_START,0,0),c(me,ue),c(ue,Te);const F=D?0:1,w=D?p:p-1;for(let h=F;h<w;h++){const t=(h+1)%p*3;s(Te,o.data[t],o.data[t+1],o.data[t+2]),e&&f(Te,Te,e),b(me,ue,h),j(me,ue,Te,0,Y.LEFT_JOIN_END,h,L),j(me,ue,Te,0,Y.RIGHT_JOIN_END,h,L);const r=this.numJoinSubdivisions;for(let e=0;e<r;++e){const t=(e+1)/(r+1);j(me,ue,Te,t,Y.LEFT_JOIN_END,h,L),j(me,ue,Te,t,Y.RIGHT_JOIN_END,h,L)}j(me,ue,Te,1,Y.LEFT_JOIN_START,h,L),j(me,ue,Te,1,Y.RIGHT_JOIN_START,h,L),c(me,ue),c(ue,Te)}D?(s(Te,o.data[3],o.data[4],o.data[5]),e&&f(Te,Te,e),L=b(me,ue,w),j(me,ue,Te,0,Y.LEFT_JOIN_END,F,L),j(me,ue,Te,0,Y.RIGHT_JOIN_END,F,L)):(L=b(me,ue,w),j(me,ue,ue,0,Y.LEFT_CAP_END,w,L),j(me,ue,ue,0,Y.RIGHT_CAP_END,w,L)),$(S,N+v,S,N,v);return P=$(S,P-v,S,P,v),this._parameters.wireframe&&this._addWireframeVertices(a,N,P,v),null}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=$(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function $(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function ee(e,t){if(!e.isClosed)return!1;return t.get(B.POSITION).indices.length>2}function te(e){return e.anchor===z.Tip&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}const re=m(),ie=m(),se=m(),ae=m(),ne=m(),oe=r(),le=r(),ce=m(),pe=m(),he=E(),fe=E(),me=m(),ue=m(),Te=m(),de=[r(),r(),r(),r()],Ee=[m(),m(),m(),m()],_e=g(),Ae=g(),Re=g(),ge=g();export{Q as Parameters,q as RibbonLineMaterial};
5
+ import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as r}from"../../../../core/screenUtils.js";import{copy as i}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{i as s,d as a,e as n,g as o,f as l,c,l as p,j as h,t as f}from"../../../../chunks/vec32.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as u}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as T}from"../../../../geometry/support/float16.js";import{PlaneIndex as d}from"../../../../geometry/support/frustum.js";import{create as E,distance2 as _,fromPoints as A,closestLineSegmentPoint as R}from"../../../../geometry/support/lineSegment.js";import{create as g,fromPoints as S,signedDistance as O,getNormal as I}from"../../../../geometry/support/plane.js";import{newLayout as v}from"../../support/buffer/InterleavedLayout.js";import{isHighlightOrOID as P,isColorOrColorEmission as N,isDepth as L,isColorEmissionHighlightOIDOrDepth as b,is2DGeometryOutput as C,ShaderOutput as U}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as y}from"../effects/geometry/olidUtils.js";import j from"../lib/GLMaterial.js";import{Material as D,RenderOccludedFlag as F}from"../lib/Material.js";import{RenderSlot as w}from"../lib/RenderSlot.js";import{isTranslationMatrix as M}from"../lib/Util.js";import{VertexAttribute as B}from"../lib/VertexAttribute.js";import{VisualVariablePassParameters as x}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as J}from"./internal/bufferWriterUtils.js";import{LineMarkerAnchor as z}from"../shaders/LineMarkerTechniqueConfiguration.js";import{r as H}from"../../../../chunks/RibbonLine.glsl.js";import{vertexAttributeLocations as G,RibbonLineTechnique as k}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as Z,CapType as V}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as W}from"../../../../webscene/support/AlphaCutoff.js";var Y;!function(e){e[e.LEFT_JOIN_START=-2]="LEFT_JOIN_START",e[e.LEFT_JOIN_END=-1]="LEFT_JOIN_END",e[e.LEFT_CAP_START=-4]="LEFT_CAP_START",e[e.LEFT_CAP_END=-5]="LEFT_CAP_END",e[e.RIGHT_JOIN_START=2]="RIGHT_JOIN_START",e[e.RIGHT_JOIN_END=1]="RIGHT_JOIN_END",e[e.RIGHT_CAP_START=4]="RIGHT_CAP_START",e[e.RIGHT_CAP_END=5]="RIGHT_CAP_END"}(Y||(Y={}));class q extends D{constructor(e){super(e,Q),this._configuration=new Z,this.vertexAttributeLocations=G,this.produces=new Map([[w.OPAQUE_MATERIAL,e=>P(e)||N(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.OPAQUE_MATERIAL_WITHOUT_NORMALS,e=>L(e)],[w.OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_OCCLUDER_MATERIAL,e=>b(e)&&this.parameters.renderOccluded===F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL,e=>N(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>N(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==F.OccludeAndTransparentStencil],[w.DRAPED_MATERIAL,e=>C(e)]])}getConfiguration(e,t){super.getConfiguration(e,t,this._configuration),this._configuration.oitPass=t.oitPass,this._configuration.draped=t.slot===w.DRAPED_MATERIAL;const r=null!=this.parameters.stipplePattern&&e!==U.Highlight;return this._configuration.stippleEnabled=r,this._configuration.stippleOffColorEnabled=r&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=r&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&te(this.parameters.markerParameters),this._configuration.hasPolygonOffset=this.parameters.hasPolygonOffset,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=this.parameters.renderOccluded===F.OccludeAndTransparentStencil,this._configuration.terrainDepthTest=t.terrainDepthTest&&N(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration}get visible(){return this.parameters.color[3]>=W||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>W}intersectDraped({attributes:e,screenToWorldRatio:r},i,s,a,n){if(!i.options.selectionMode)return;const o=e.get(B.SIZE);let l=this.parameters.width;if(this.parameters.vvSize){const r=e.get(B.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(r)?l*=this.parameters.vvSize.fallback[0]:l*=t(this.parameters.vvSize.offset[0]+r*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else o&&(l*=o.data[0]);const c=s[0],p=s[1],h=(l/2+4)*r;let f=Number.MAX_VALUE,m=0;const u=e.get(B.POSITION).data,T=ee(this.parameters,e)?u.length-2:u.length-5;for(let d=0;d<T;d+=3){const e=u[d],r=u[d+1],i=(d+3)%u.length,s=c-e,a=p-r,n=u[i]-e,o=u[i+1]-r,l=t((n*s+o*a)/(n*n+o*o),0,1),h=n*l-s,T=o*l-a,E=h*h+T*T;E<f&&(f=E,m=d/3)}f<h*h&&a(n.distance,n.normal,m)}intersect(r,f,m,u,T,E){const{options:g,camera:v,rayBegin:P,rayEnd:N}=m;if(!g.selectionMode||!r.visible||!v)return;if(!M(f))return void e.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const L=r.attributes,b=L.get(B.POSITION).data;let C=this.parameters.width;if(this.parameters.vvSize){const e=L.get(B.SIZEFEATUREATTRIBUTE).data[0];Number.isNaN(e)||(C*=t(this.parameters.vvSize.offset[0]+e*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else L.has(B.SIZE)&&(C*=L.get(B.SIZE).data[0]);const U=ne;i(U,m.point);const y=C*v.pixelRatio/2+4*v.pixelRatio;s(de[0],U[0]-y,U[1]+y,0),s(de[1],U[0]+y,U[1]+y,0),s(de[2],U[0]+y,U[1]-y,0),s(de[3],U[0]-y,U[1]-y,0);for(let e=0;e<4;e++)if(!v.unprojectFromRenderScreen(de[e],Ee[e]))return;S(v.eye,Ee[0],Ee[1],_e),S(v.eye,Ee[1],Ee[2],Ae),S(v.eye,Ee[2],Ee[3],Re),S(v.eye,Ee[3],Ee[0],ge);let j=Number.MAX_VALUE,D=0;const F=ee(this.parameters,L)?b.length-2:b.length-5;for(let e=0;e<F;e+=3){re[0]=b[e]+f[12],re[1]=b[e+1]+f[13],re[2]=b[e+2]+f[14];const t=(e+3)%b.length;if(ie[0]=b[t]+f[12],ie[1]=b[t+1]+f[13],ie[2]=b[t+2]+f[14],O(_e,re)<0&&O(_e,ie)<0||O(Ae,re)<0&&O(Ae,ie)<0||O(Re,re)<0&&O(Re,ie)<0||O(ge,re)<0&&O(ge,ie)<0)continue;if(v.projectToRenderScreen(re,oe),v.projectToRenderScreen(ie,le),oe[2]<0&&le[2]>0){a(se,re,ie);const e=v.frustum,t=-O(e[d.NEAR],re)/n(se,I(e[d.NEAR]));o(se,se,t),l(re,re,se),v.projectToRenderScreen(re,oe)}else if(oe[2]>0&&le[2]<0){a(se,ie,re);const e=v.frustum,t=-O(e[d.NEAR],ie)/n(se,I(e[d.NEAR]));o(se,se,t),l(ie,ie,se),v.projectToRenderScreen(ie,le)}else if(oe[2]<0&&le[2]<0)continue;oe[2]=0,le[2]=0;const r=_(A(oe,le,he),U);r<j&&(j=r,c(ce,re),c(pe,ie),D=e/3)}if(j<y*y){let e=Number.MAX_VALUE;if(R(A(ce,pe,he),A(P,N,fe),ae)){a(ae,ae,P);const t=p(ae);o(ae,ae,1/t),e=t/h(P,N)}E(e,ae,D)}}get _layout(){const e=v().vec3f(B.POSITION).vec4f16(B.PREVIOUSDELTA).vec4f16(B.NEXTDELTA).f32(B.U0).vec2f16(B.LINEPARAMETERS);return this.parameters.vvSize?e.f32(B.SIZEFEATUREATTRIBUTE):e.f16(B.SIZE),this.parameters.vvColor?e.f16(B.COLORFEATUREATTRIBUTE):e.vec4u8(B.COLOR,{glNormalized:!0}),this.parameters.vvOpacity&&e.f16(B.OPACITYFEATUREATTRIBUTE),y()&&e.vec4u8(B.OLIDCOLOR),e}createBufferWriter(){return new K(this._layout,this.parameters)}createGLMaterial(e){return new X(e)}validateParameters(e){"miter"!==e.join&&(e.miterLimit=0),null!=e.markerParameters&&(e.markerScale=e.markerParameters.width/e.width)}}class X extends j{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){const t=this._material.parameters.stipplePattern;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(k,e)}}class Q extends x{constructor(){super(...arguments),this.width=0,this.color=u,this.join="miter",this.cap=V.BUTT,this.miterLimit=5,this.writeDepth=!0,this.hasPolygonOffset=!1,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1}get transparent(){return this.color[3]<1||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}}class K{constructor(e,t){this.vertexBufferLayout=e,this._parameters=t;const r=t.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=r;break;case"round":this.numJoinSubdivisions=H+r}}_isClosed(e){return ee(this._parameters,e)}allocate(e){return this.vertexBufferLayout.createBuffer(e)}elementCount(e){const t=2,r=e.get(B.POSITION).indices.length/2+1,i=this._isClosed(e);let s=i?2:2*t;return s+=((i?r:r-1)-(i?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(e,t,r,i,a,n){const o=r.get(B.POSITION),l=o.indices,p=o.data.length/3,m=r.get(B.DISTANCETOSTART)?.data;l&&l.length!==2*(p-1)&&console.warn("RibbonLineMaterial does not support indices");const u=this.vertexBufferLayout.fields.has(B.SIZEFEATUREATTRIBUTE),d=(u?r.get(B.SIZEFEATUREATTRIBUTE)?.data[0]:r.get(B.SIZE)?.data[0])??1;let E=[1,1,1,1],_=0;const A=this.vertexBufferLayout.fields.has(B.COLORFEATUREATTRIBUTE);A?_=r.get(B.COLORFEATUREATTRIBUTE).data[0]:r.has(B.COLOR)&&(E=r.get(B.COLOR).data);const R=this.vertexBufferLayout.fields.has(B.OPACITYFEATUREATTRIBUTE),g=R?r.get(B.OPACITYFEATUREATTRIBUTE).data[0]:0,S=new Float32Array(a.buffer),O=T(a.buffer),I=new Uint8Array(a.buffer),v=this.vertexBufferLayout.stride/4;let P=n*v;const N=P;let L=0;const b=m?(e,t,r)=>L=m[r]:(e,t,r)=>L+=h(e,t),C=S.BYTES_PER_ELEMENT/O.BYTES_PER_ELEMENT,U=4/C,j=(e,t,r,s,a,n,o)=>{S[P++]=t[0],S[P++]=t[1],S[P++]=t[2],J(e,t,O,P*C),P+=U,J(r,t,O,P*C),P+=U,S[P++]=o;let l=P*C;if(O[l++]=s,O[l++]=a,u?(P=Math.ceil(l/C),S[P]=d,l+=C):O[l++]=d,A)O[l++]=_;else{const e=Math.min(4*n,E.length-4),t=l/C*4;l+=C,I[t]=255*E[e],I[t+1]=255*E[e+1],I[t+2]=255*E[e+2],I[t+3]=255*E[e+3]}R&&(O[l++]=g);let c=l/C*4;y()&&i&&(I[c++]=i[0],I[c++]=i[1],I[c++]=i[2],I[c++]=i[3]),P=Math.ceil(.25*c)};P+=v,s(ue,o.data[0],o.data[1],o.data[2]),e&&f(ue,ue,e);const D=this._isClosed(r);if(D){const t=o.data.length-3;s(me,o.data[t],o.data[t+1],o.data[t+2]),e&&f(me,me,e)}else s(Te,o.data[3],o.data[4],o.data[5]),e&&f(Te,Te,e),j(ue,ue,Te,1,Y.LEFT_CAP_START,0,0),j(ue,ue,Te,1,Y.RIGHT_CAP_START,0,0),c(me,ue),c(ue,Te);const F=D?0:1,w=D?p:p-1;for(let h=F;h<w;h++){const t=(h+1)%p*3;s(Te,o.data[t],o.data[t+1],o.data[t+2]),e&&f(Te,Te,e),b(me,ue,h),j(me,ue,Te,0,Y.LEFT_JOIN_END,h,L),j(me,ue,Te,0,Y.RIGHT_JOIN_END,h,L);const r=this.numJoinSubdivisions;for(let e=0;e<r;++e){const t=(e+1)/(r+1);j(me,ue,Te,t,Y.LEFT_JOIN_END,h,L),j(me,ue,Te,t,Y.RIGHT_JOIN_END,h,L)}j(me,ue,Te,1,Y.LEFT_JOIN_START,h,L),j(me,ue,Te,1,Y.RIGHT_JOIN_START,h,L),c(me,ue),c(ue,Te)}D?(s(Te,o.data[3],o.data[4],o.data[5]),e&&f(Te,Te,e),L=b(me,ue,w),j(me,ue,Te,0,Y.LEFT_JOIN_END,F,L),j(me,ue,Te,0,Y.RIGHT_JOIN_END,F,L)):(L=b(me,ue,w),j(me,ue,ue,0,Y.LEFT_CAP_END,w,L),j(me,ue,ue,0,Y.RIGHT_CAP_END,w,L)),$(S,N+v,S,N,v);return P=$(S,P-v,S,P,v),this._parameters.wireframe&&this._addWireframeVertices(a,N,P,v),null}_addWireframeVertices(e,t,r,i){const s=new Float32Array(e.buffer,r*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(e.buffer,t*Float32Array.BYTES_PER_ELEMENT,r-t);let n=0;const o=e=>n=$(a,e,s,n,i);for(let l=0;l<a.length-1;l+=2*i)o(l),o(l+2*i),o(l+1*i),o(l+2*i),o(l+1*i),o(l+3*i)}}function $(e,t,r,i,s){for(let a=0;a<s;a++)r[i++]=e[t++];return i}function ee(e,t){if(!e.isClosed)return!1;return t.get(B.POSITION).indices.length>2}function te(e){return e.anchor===z.Tip&&e.hideOnShortSegments&&"begin-end"===e.placement&&e.worldSpace}const re=m(),ie=m(),se=m(),ae=m(),ne=m(),oe=r(),le=r(),ce=m(),pe=m(),he=E(),fe=E(),me=m(),ue=m(),Te=m(),de=[r(),r(),r(),r()],Ee=[m(),m(),m(),m()],_e=g(),Ae=g(),Re=g(),ge=g();export{Q as Parameters,q as RibbonLineMaterial};
@@ -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{i as e,g as t,f as r,n as i}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{center as n,scale as o}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as c}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as h}from"../../support/buffer/InterleavedLayout.js";import{isColorOrOID as l,ShaderOutput as p,isColorOrColorEmission as u}from"../core/shaderLibrary/ShaderOutput.js";import{CullFaceOptions as f}from"../lib/basicInterfaces.js";import m from"../lib/GLMaterial.js";import{Material as d,MaterialParameters as g}from"../lib/Material.js";import{intersectTriangleGeometry as S}from"../lib/RayIntersections.js";import{RenderSlot as b}from"../lib/RenderSlot.js";import{assert as T}from"../lib/Util.js";import{VertexAttribute as E}from"../lib/VertexAttribute.js";import{writeDefaultAttributes as A,writePosition as j}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocations as F,ShadedColorMaterialTechnique as w}from"../shaders/ShadedColorMaterialTechnique.js";import{ShadedColorMaterialTechniqueConfiguration as _}from"../shaders/ShadedColorMaterialTechniqueConfiguration.js";import{alphaCutoff as v}from"../../../../webscene/support/AlphaCutoff.js";class x extends d{constructor(e){super(e,O),this._configuration=new _,this.vertexAttributeLocations=F,this.supportsEdges=!0,this.produces=new Map([[b.OPAQUE_MATERIAL,e=>e===p.Highlight||l(e)&&!this.parameters.transparent],[b.TRANSPARENT_MATERIAL,e=>l(e)&&this.parameters.transparent&&this.parameters.writeDepth],[b.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>l(e)&&this.parameters.transparent&&!this.parameters.writeDepth]])}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.screenSizeEnabled=this.parameters.screenSizeEnabled,this._configuration.shadingEnabled=this.parameters.shadingEnabled,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&u(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=v}intersect(i,s,a,c,h,l){if(this.parameters.screenSizeEnabled){const s=i.attributes.get(E.OFFSET),p={applyToVertex:(i,n,o,c)=>{const h=e(P,s.data[3*c],s.data[3*c+1],s.data[3*c+2]),l=e(I,i,n,o);return t(h,h,this.parameters.screenSizeScale*a.camera.computeScreenPixelSizeAt(h)),r(l,l,h),[l[0],l[1],l[2]]},applyToAabb:e=>{const t=n(e,P);return o(e,this.parameters.screenSizeScale*a.camera.computeScreenPixelSizeAt(t))}};S(i,a,c,h,p,l)}else S(i,a,c,h,void 0,l)}createGLMaterial(e){return new z(e)}createBufferWriter(){return new M(this.parameters.screenSizeEnabled)}}class z extends m{beginSlot(e){return this.getTechnique(w,e)}}class O extends g{constructor(){super(...arguments),this.color=a(1,1,1,1),this.shadingTint=a(0,0,0,.25),this.shadingDirection=i(s(),[.5,-.5,-.5]),this.screenSizeScale=14,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.cullFace=f.None,this.screenSizeEnabled=!1,this.shadingEnabled=!0}get transparent(){return this.color[3]<1||this.forceTransparentMode}}class M{constructor(e){this.screenSizeEnabled=e;const t=h().vec3f(E.POSITION).vec3f(E.NORMAL);this.screenSizeEnabled&&t.vec3f(E.OFFSET),this.vertexBufferLayout=t}elementCount(e){return e.get(E.POSITION).indices.length}write(e,t,r,i,s,a){const n=A(r,i,this.vertexBufferLayout,e,t,s,a);if(this.screenSizeEnabled){if(!r.has(E.OFFSET))throw new Error(`${E.OFFSET} vertex attribute required for screenSizeEnabled ShadedColorMaterial`);{const e=r.get(E.OFFSET);T(3===e.size);const i=s.getField(E.OFFSET,c);if(!i)throw new Error("unable to acquire view for "+E.OFFSET);j(e,t,i,a)}}return n}}const P=s(),I=s();export{O as Parameters,x as ShadedColorMaterial};
5
+ import{i as e,g as t,f as r,n as i}from"../../../../chunks/vec32.js";import{fromValues as s,create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as n}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{center as o,scale as c}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f as h}from"../../../../geometry/support/buffer/BufferView.js";import{newLayout as p}from"../../support/buffer/InterleavedLayout.js";import{isColorOrOID as l,ShaderOutput as u,isColorOrColorEmission as f}from"../core/shaderLibrary/ShaderOutput.js";import{CullFaceOptions as m}from"../lib/basicInterfaces.js";import d from"../lib/GLMaterial.js";import{Material as g,MaterialParameters as S}from"../lib/Material.js";import{intersectTriangleGeometry as b}from"../lib/RayIntersections.js";import{RenderSlot as T}from"../lib/RenderSlot.js";import{assert as E}from"../lib/Util.js";import{VertexAttribute as _}from"../lib/VertexAttribute.js";import{writeDefaultAttributes as A,writePosition as j}from"./internal/bufferWriterUtils.js";import{vertexAttributeLocations as F,ShadedColorMaterialTechnique as w}from"../shaders/ShadedColorMaterialTechnique.js";import{ShadedColorMaterialTechniqueConfiguration as v}from"../shaders/ShadedColorMaterialTechniqueConfiguration.js";import{alphaCutoff as x}from"../../../../webscene/support/AlphaCutoff.js";class z extends g{constructor(e){super(e,M),this._configuration=new v,this.vertexAttributeLocations=F,this.supportsEdges=!0,this._pp0=s(0,0,1),this._pp1=s(0,0,0),this.produces=new Map([[T.OPAQUE_MATERIAL,e=>e===u.Highlight||l(e)&&!this.parameters.transparent],[T.TRANSPARENT_MATERIAL,e=>l(e)&&this.parameters.transparent&&this.parameters.writeDepth],[T.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>l(e)&&this.parameters.transparent&&!this.parameters.writeDepth]])}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.parameters.transparent,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.screenSizeEnabled=this.parameters.screenSizeEnabled,this._configuration.shadingEnabled=this.parameters.shadingEnabled,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest&&f(e),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}get visible(){return this.parameters.color[3]>=x}intersect(e,t,r,i,s,a){this._intersect(e,r,i,s,a)}intersectDraped(e,t,r,i){return this._pp0[0]=this._pp1[0]=r[0],this._pp0[1]=this._pp1[1]=r[1],this._intersect(e,t,this._pp0,this._pp1,i)}_intersect(i,s,a,n,h){if(this.parameters.screenSizeEnabled){const p=i.attributes.get(_.OFFSET),l={applyToVertex:(i,a,n,o)=>{const c=e(I,p.data[3*o],p.data[3*o+1],p.data[3*o+2]),h=e(L,i,a,n);return t(c,c,this.parameters.screenSizeScale*(s.camera?.computeScreenPixelSizeAt(c)??1)),r(h,h,c),[h[0],h[1],h[2]]},applyToAabb:e=>{const t=o(e,I);return c(e,this.parameters.screenSizeScale*(s.camera?.computeScreenPixelSizeAt(t)??1))}};b(i,s,a,n,l,h)}else b(i,s,a,n,void 0,h)}createGLMaterial(e){return new O(e)}createBufferWriter(){return new P(this.parameters.screenSizeEnabled)}}class O extends d{beginSlot(e){return this.getTechnique(w,e)}}class M extends S{constructor(){super(...arguments),this.color=n(1,1,1,1),this.shadingTint=n(0,0,0,.25),this.shadingDirection=i(a(),[.5,-.5,-.5]),this.screenSizeScale=14,this.forceTransparentMode=!1,this.writeDepth=!0,this.hasSlicePlane=!1,this.cullFace=m.None,this.screenSizeEnabled=!1,this.shadingEnabled=!0}get transparent(){return this.color[3]<1||this.forceTransparentMode}}class P{constructor(e){this.screenSizeEnabled=e;const t=p().vec3f(_.POSITION).vec3f(_.NORMAL);this.screenSizeEnabled&&t.vec3f(_.OFFSET),this.vertexBufferLayout=t}elementCount(e){return e.get(_.POSITION).indices.length}write(e,t,r,i,s,a){const n=A(r,i,this.vertexBufferLayout,e,t,s,a);if(this.screenSizeEnabled){if(!r.has(_.OFFSET))throw new Error(`${_.OFFSET} vertex attribute required for screenSizeEnabled ShadedColorMaterial`);{const e=r.get(_.OFFSET);E(3===e.size);const i=s.getField(_.OFFSET,h);if(!i)throw new Error("unable to acquire view for "+_.OFFSET);j(e,t,i,a)}}return n}}const I=a(),L=a();export{M as Parameters,z as ShadedColorMaterial};
@@ -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{Material as r}from"../lib/Material.js";import{intersectTriangleGeometry as t}from"../lib/RayIntersections.js";class e extends r{intersect(r,e,i,s,o,n){return t(r,i,s,o,void 0,n)}}export{e as TriangleMaterial};
5
+ import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{Material as i}from"../lib/Material.js";import{intersectTriangleGeometry as p}from"../lib/RayIntersections.js";class r extends i{constructor(){super(...arguments),this._pp0=t(0,0,1),this._pp1=t(0,0,0)}intersect(t,i,r,s,e,o){return p(t,r,s,e,void 0,o)}intersectDraped(t,i,r,s){return this._pp0[0]=this._pp1[0]=r[0],this._pp0[1]=this._pp1[1]=r[1],p(t,i,this._pp0,this._pp1,void 0,s)}}export{r as TriangleMaterial};
@@ -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{p as l}from"../../../../chunks/vec32.js";import{freeze as e,ZEROS as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";function n({normalTexture:e,metallicRoughnessTexture:n,metallicFactor:r,roughnessFactor:t,emissiveTexture:o,emissiveFactor:s,occlusionTexture:c}){return null==e&&null==n&&null==o&&(null==s||l(s,u))&&null==c&&(null==t||1===t)&&(null==r||1===r)}function r({normalTexture:e,metallicRoughnessTexture:n,metallicFactor:r,roughnessFactor:t,emissiveTexture:o,emissiveFactor:s,occlusionTexture:c}){return null==e&&null==n&&null==o&&(null==s||l(s,u))&&null==c&&(null==t||1===t)&&(null==r||1===r||0===r)}const t=e(1,1,.5),o=e(0,.6,.2),s=e(0,1,.2);export{t as advancedMRRFactors,s as esriSymbologyMRRFactors,o as schematicMRRFactors,n as useSchematicPBR,r as useSchematicPBRI3S};
5
+ import{q as l}from"../../../../chunks/vec32.js";import{freeze as e,ZEROS as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";function n({normalTexture:e,metallicRoughnessTexture:n,metallicFactor:r,roughnessFactor:t,emissiveTexture:o,emissiveFactor:s,occlusionTexture:c}){return null==e&&null==n&&null==o&&(null==s||l(s,u))&&null==c&&(null==t||1===t)&&(null==r||1===r)}function r({normalTexture:e,metallicRoughnessTexture:n,metallicFactor:r,roughnessFactor:t,emissiveTexture:o,emissiveFactor:s,occlusionTexture:c}){return null==e&&null==n&&null==o&&(null==s||l(s,u))&&null==c&&(null==t||1===t)&&(null==r||1===r||0===r)}const t=e(1,1,.5),o=e(0,.6,.2),s=e(0,1,.2);export{t as advancedMRRFactors,s as esriSymbologyMRRFactors,o as schematicMRRFactors,n as useSchematicPBR,r as useSchematicPBRI3S};
@@ -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{ShaderTechniqueConfiguration as e,parameter as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";var i;!function(t){t[t.None=0]="None",t[t.Alpha=1]="Alpha",t[t.PremultipliedAlpha=2]="PremultipliedAlpha",t[t.Depth=3]="Depth",t[t.COUNT=4]="COUNT"}(i||(i={}));class r extends e{constructor(){super(...arguments),this.blitMode=i.None,this.hasOpacityFactor=!1}}t([o({count:i.COUNT})],r.prototype,"blitMode",void 0),t([o()],r.prototype,"hasOpacityFactor",void 0);export{i as BlitMode,r as CompositingTechniqueConfiguration};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import{parameter as e,ShaderTechniqueConfiguration as o}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";var i;!function(t){t[t.None=0]="None",t[t.Alpha=1]="Alpha",t[t.PremultipliedAlpha=2]="PremultipliedAlpha",t[t.Depth=3]="Depth",t[t.COUNT=4]="COUNT"}(i||(i={}));class r extends o{constructor(){super(...arguments),this.blitMode=i.None,this.hasOpacityFactor=!1}}t([e({count:i.COUNT})],r.prototype,"blitMode",void 0),t([e()],r.prototype,"hasOpacityFactor",void 0);export{i as BlitMode,r as CompositingTechniqueConfiguration};
@@ -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 r from"../core/Accessor.js";import e from"../core/Collection.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";let i=0,p=class extends r{constructor(){super(...arguments),this.id=Date.now().toString(16)+"-focusarea-"+i++,this.enabled=!0,this.geometries=new e}};o([t()],p.prototype,"id",void 0),o([t()],p.prototype,"title",void 0),o([t()],p.prototype,"enabled",void 0),o([t()],p.prototype,"geometries",void 0),o([t()],p.prototype,"outline",void 0),p=o([s("esri.views.FocusArea")],p);export{p as FocusArea};
5
+ import{_ as o}from"../chunks/tslib.es6.js";import r from"../core/Accessor.js";import e from"../core/Collection.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{FocusAreaOutline as i}from"./FocusAreaOutline.js";let p=0,c=class extends r{constructor(){super(...arguments),this.id=Date.now().toString(16)+"-focusarea-"+p++,this.enabled=!0,this.geometries=new e,this.outline=null}};o([t()],c.prototype,"id",void 0),o([t()],c.prototype,"title",void 0),o([t()],c.prototype,"enabled",void 0),o([t()],c.prototype,"geometries",void 0),o([t({type:i})],c.prototype,"outline",void 0),c=o([s("esri.views.FocusArea")],c);export{c as FocusArea};
@@ -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{_ as o}from"../chunks/tslib.es6.js";import r from"../Color.js";import s from"../core/Accessor.js";import{property as e}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as t}from"../core/accessorSupport/decorators/subclass.js";let c=class extends s{constructor(){super(...arguments),this.color=null}};o([e({type:r})],c.prototype,"color",void 0),c=o([t("esri.views.FocusAreaOutline")],c);export{c as FocusAreaOutline};
@@ -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{_ as e}from"../chunks/tslib.es6.js";import t from"../Color.js";import o from"../core/Accessor.js";import{destroyMaybe as r}from"../core/maybe.js";import{watch as i,syncAndInitial as s}from"../core/reactiveUtils.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import{OutlineVisualElement as m}from"./3d/interactive/visualElements/OutlineVisualElement.js";let a=class extends o{constructor(e){super(e),this._outlineElement=null}initialize(){this.addHandles([i((()=>({enabled:this.area.enabled,outlineColor:this.area.outline?.color,geometries:this.area.geometries})),(({enabled:e,outlineColor:o,geometries:i},s)=>{e&&o?this._outlineElement?(i!==s?.geometries&&(this._outlineElement.geometry=this._mergePolygons(i)),this._outlineElement.color=t.toUnitRGBA(o)):this._outlineElement=new m({view:this.view,geometry:this._mergePolygons(i),isDraped:!0,attached:!0,isDecoration:!1,color:t.toUnitRGBA(o),width:5}):this._outlineElement=r(this._outlineElement)}),s)])}destroy(){this.removeAllHandles(),this._outlineElement=r(this._outlineElement)}_mergePolygons(e){if(!e||0===e.length)return null;const t=e.at(0).clone();t.rings=[];for(let o=0;o<e.length;o++)t.rings.push(e.at(o).rings[0]);return t}};e([l({constructOnly:!0})],a.prototype,"area",void 0),e([l()],a.prototype,"_outlineElement",void 0),e([l({constructOnly:!0})],a.prototype,"view",void 0),a=e([n("esri.views.FocusAreaOutlineItem")],a);export{a as FocusAreaOutlineItem};
@@ -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 o from"../core/Accessor.js";import r from"../core/Collection.js";import{destroyMaybe as s}from"../core/maybe.js";import{watch as t,syncAndInitial as i}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import{e as c}from"../chunks/earcut.js";import{create as d}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as m}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import p from"../geometry/Point.js";import{computeTranslationToOriginAndRotation as l}from"../geometry/projection/computeTranslationToOriginAndRotation.js";import{newDoubleArray as h}from"../geometry/support/DoubleArray.js";import{newIndexArray as u}from"../geometry/support/Indices.js";import{t as f}from"../chunks/vec3.js";import{ViewingMode as g}from"./ViewingMode.js";import{ElevationContext as y}from"./3d/layers/graphics/ElevationContext.js";import{extrudePolygon as v}from"./3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js";import{computeCentroid as j}from"./3d/layers/graphics/graphicUtils.js";import{geometryToRenderInfo as _}from"./3d/support/renderInfoUtils/polygon.js";import{FocusAreaColorNode as w}from"./3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js";import{FocusAreaGeometry as A,FocusAreaMaskNode as R}from"./3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js";const b=-2e4,P=5e6,C=.42,G=.32;function N(e,o){if(e){if("bright"===o){const o=(e[0]+e[1]+e[2])/3;return[o*G+(1-G),o*G+(1-G),o*G+(1-G),e[3]*G]}return"dark"===o?[e[0]*C,e[1]*C,e[2]*C,e[3]*C]:e}}let x=class extends o{constructor(e){super(e),this.style="dark",this.geometries=new Array,this._areas=new r,this._elevationContext=new y}initialize(){this.addHandles([t((()=>this.style),(()=>this._updateRenderNodes()),i)]),this.addHandles([t((()=>this.activePolygons),(()=>this._updateFocusAreaGeometries()),i)])}get activePolygons(){const e=new r;for(const o of this.areas)if(o.enabled)for(const r of o.geometries)e.push(r);return e}add(e){this.areas.add(e),this._updateFocusAreaGeometries()}addMany(e){this.areas.addMany(e),this._updateFocusAreaGeometries()}remove(e){this.areas.remove(e),this._updateFocusAreaGeometries()}removeMany(e){this.areas.removeMany(e),this._updateFocusAreaGeometries()}removeAll(){this.areas.removeAll(),this._updateFocusAreaGeometries()}containsGeometry(e){const o=!0;if(0===this.activePolygons.length)return o;const r=new p(e);return this.activePolygons.some((e=>e.contains(r)))}get areas(){return this._areas}_updateFocusAreaGeometries(){this._extrudePolygons(),this._updateRenderNodes()}_extrudePolygons(){if(!this.view.renderCoordsHelper)return;this.geometries.length=0;const e=P-b,o=m(),r=this.view.renderCoordsHelper.viewingMode===g.Global,s=d(),t=d();r||this.view.renderCoordsHelper.worldUpAtPosition([0,0,0],o);for(const i of this.areas)if(i.enabled)for(const n of i.geometries){const a=j(n);if(null==a)continue;l(n.spatialReference,[a.x,a.y,0],s,this.view.renderCoordsHelper.spatialReference);const d=this.view.renderCoordsHelper.worldUpAtPosition([s[12],s[13],s[14]],k);t[12]=-s[12],t[13]=-s[13],t[14]=-s[14];const m=_(n,this.view.elevationProvider,this.view.renderCoordsHelper,this._elevationContext),{polygons:p,mapPositions:g,position:y}=m;for(const n of p){const a=n.count,m=c(n.mapPositions,n.holeIndices,3);if(0===m.length)continue;const p=m.length,l=6*a,j=u(l+p),_=u(p),w=h(3*l),R=h(3*l),P=h(3*l),C=h(l);v(y,g,m,n,w,P,R,C,j,_,e,o,r),f(w,w,t);const G=new A(w,_,j,e,[s[12]+b*d[0],s[13]+b*d[1],s[14]+b*d[2]],i.outline?.color);this.geometries.push(G)}}this._maskRenderNode?.updateGeometries()}_updateRenderNodes(){this.view.stage&&("none"===this.style||0===this.geometries.length?(this._maskRenderNode=s(this._maskRenderNode),this._colorRenderNode=s(this._colorRenderNode)):(this._maskRenderNode??=new R({focusAreas:this}),this._colorRenderNode??=new w({focusAreas:this})))}};e([n()],x.prototype,"activePolygons",null),e([n()],x.prototype,"style",void 0),e([n()],x.prototype,"geometries",void 0),e([n({constructOnly:!0})],x.prototype,"view",void 0),e([n()],x.prototype,"_areas",void 0),x=e([a("esri.views.FocusAreas")],x);const k=m();export{x as FocusAreas,N as focusAreaHUDColor};
5
+ import{_ as r}from"../chunks/tslib.es6.js";import e from"../core/Accessor.js";import o from"../core/Collection.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 t}from"../core/accessorSupport/decorators/subclass.js";let a=class extends e{constructor(){super(...arguments),this.style="dark",this._areas=new o}get activePolygons(){const r=new o;for(const e of this.areas)if(e.enabled)for(const o of e.geometries)r.push(o);return r}add(r){this.areas.add(r)}addMany(r){this.areas.addMany(r)}remove(r){this.areas.remove(r)}removeMany(r){this.areas.removeMany(r)}removeAll(){this.areas.removeAll()}get areas(){return this._areas}};r([s()],a.prototype,"activePolygons",null),r([s()],a.prototype,"areas",null),r([s()],a.prototype,"style",void 0),r([s()],a.prototype,"_areas",void 0),a=r([t("esri.views.FocusAreas")],a);export{a as FocusAreas};
@@ -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
+ const n=.42,r=.32;function t(t,e){if(t){if("bright"===e){const n=(t[0]+t[1]+t[2])/3;return[n*r+(1-r),n*r+(1-r),n*r+(1-r),t[3]*r]}return"dark"===e?[t[0]*n,t[1]*n,t[2]*n,t[3]*n]:t}}function e(n,r){return n.focusAreasView?.containsGeometry(r)??!0}export{t as focusAreaHUDColor,e as isGeometryFocused};
@@ -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{_ as e}from"../chunks/tslib.es6.js";import o from"../core/Accessor.js";import s from"../core/Collection.js";import{mapCollection as r}from"../core/mapCollectionUtils.js";import{destroyMaybe as t}from"../core/maybe.js";import{watch as i,syncAndInitial as n}from"../core/reactiveUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{e as m}from"../chunks/earcut.js";import{create as p}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as l}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import d from"../geometry/Point.js";import{computeTranslationToOriginAndRotation as h}from"../geometry/projection/computeTranslationToOriginAndRotation.js";import{newDoubleArray as f}from"../geometry/support/DoubleArray.js";import{newIndexArray as u}from"../geometry/support/Indices.js";import{t as g}from"../chunks/vec3.js";import{clonePoint as w}from"../layers/graphics/hydratedFeatures.js";import{FocusAreaOutlineItem as v}from"./FocusAreaOutlineItem.js";import{ViewingMode as y}from"./ViewingMode.js";import{ElevationContext as j}from"./3d/layers/graphics/ElevationContext.js";import{extrudePolygon as A}from"./3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js";import{computeCentroid as _}from"./3d/layers/graphics/graphicUtils.js";import{geometryToRenderInfo as R}from"./3d/support/renderInfoUtils/polygon.js";import{FocusAreaColorNode as C}from"./3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js";import{FocusAreaGeometry as N,FocusAreaMaskNode as b}from"./3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js";const x=-2e4,P=65e5;let k=class extends o{constructor(e){super(e),this.style="dark",this.geometries=new Array,this._elevationContext=new j,this._outlineMap=new s}initialize(){this.addHandles([i((()=>this.view.focusAreas.style),(()=>this._updateRenderNodes()),n)]),this.addHandles([i((()=>this.view.focusAreas.activePolygons),(()=>this._updateFocusAreaGeometries()),n)]),this._outlineMap=r((()=>this.view.focusAreas.areas),(e=>new v({area:e,view:this.view})),{recycleItems:!0})}destroy(){this.removeAllHandles(),this._outlineMap.forEach((e=>e.destroy()))}containsGeometry(e){if(0===this.view.focusAreas.activePolygons.length)return!0;let o;return o=e instanceof d?w(e,new d):new d(e),this.view.focusAreas.activePolygons.some((e=>e.contains(o)))}_updateFocusAreaGeometries(){this._extrudePolygons(),this._updateRenderNodes()}_extrudePolygons(){if(!this.view.renderCoordsHelper)return;this.geometries.length=0;const e=P-x,o=l(),s=this.view.renderCoordsHelper.viewingMode===y.Global,r=p(),t=p();s||this.view.renderCoordsHelper.worldUpAtPosition([0,0,0],o);for(const i of this.view.focusAreas.areas)if(i.enabled)for(const n of i.geometries){const i=_(n);if(null==i)continue;h(n.spatialReference,[i.x,i.y,0],r,this.view.renderCoordsHelper.spatialReference);const a=this.view.renderCoordsHelper.worldUpAtPosition([r[12],r[13],r[14]],H);t[12]=-r[12],t[13]=-r[13],t[14]=-r[14];const c=R(n,this.view.elevationProvider,this.view.renderCoordsHelper,this._elevationContext),{polygons:p,mapPositions:l,position:d}=c;for(const n of p){const i=n.count,c=m(n.mapPositions,n.holeIndices,3);if(0===c.length)continue;const p=c.length,h=6*i,w=u(h+p),v=u(p),y=f(3*h),j=f(3*h),_=f(3*h),R=f(h);A(d,l,c,n,y,_,j,R,w,v,e,o,s),g(y,y,t);const C=new N(y,v,w,e,[r[12]+x*a[0],r[13]+x*a[1],r[14]+x*a[2]]);this.geometries.push(C)}}this._maskRenderNode?.updateGeometries()}_updateRenderNodes(){this.view.stage&&("none"===this.view.focusAreas.style||0===this.geometries.length?(this._maskRenderNode=t(this._maskRenderNode),this._colorRenderNode=t(this._colorRenderNode)):(this.style=this.view.focusAreas.style,this._maskRenderNode??=new b({focusAreasView:this}),this._colorRenderNode??=new C({focusAreasView:this})))}};e([a()],k.prototype,"geometries",void 0),e([a({constructOnly:!0})],k.prototype,"view",void 0),k=e([c("esri.views.FocusAreasView")],k);const H=l();export{k as FocusAreasView};