@arcgis/core 4.34.0-next.50 → 4.34.0-next.52

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 (263) hide show
  1. package/analysis/ElevationProfile/GroundLine.d.ts +4 -0
  2. package/analysis/ElevationProfile/GroundLine.js +5 -0
  3. package/analysis/ElevationProfile/InputLine.d.ts +4 -0
  4. package/analysis/ElevationProfile/InputLine.js +5 -0
  5. package/analysis/ElevationProfile/Line.d.ts +4 -0
  6. package/analysis/ElevationProfile/Line.js +5 -0
  7. package/analysis/ElevationProfile/LineChartOptions.d.ts +4 -0
  8. package/analysis/ElevationProfile/LineChartOptions.js +5 -0
  9. package/analysis/ElevationProfile/LineViewOptions.d.ts +4 -0
  10. package/analysis/ElevationProfile/LineViewOptions.js +5 -0
  11. package/analysis/ElevationProfile/QueryLine.d.ts +4 -0
  12. package/analysis/ElevationProfile/QueryLine.js +5 -0
  13. package/analysis/ElevationProfile/SceneLine.d.ts +4 -0
  14. package/analysis/ElevationProfile/SceneLine.js +5 -0
  15. package/analysis/ElevationProfile/Units.d.ts +4 -0
  16. package/analysis/ElevationProfile/Units.js +5 -0
  17. package/analysis/ElevationProfile/ViewOptions.d.ts +4 -0
  18. package/analysis/ElevationProfile/ViewOptions.js +5 -0
  19. package/analysis/ElevationProfile/elevationProfileLineTypes.js +5 -0
  20. package/analysis/ElevationProfileAnalysis.js +1 -1
  21. package/assets/esri/core/workers/RemoteClient.js +1 -1
  22. package/assets/esri/core/workers/chunks/{7bd672e534cde0d5787d.js → 0021118bafefd1e47ff7.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{beb77cdae0b1b6ad73da.js → 0445de3a8968c0734c91.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{0b52c0ca432761076076.js → 081b22fa73ef7b696409.js} +2 -2
  25. package/assets/esri/core/workers/chunks/0a6d33d013628f671aea.js +1 -0
  26. package/assets/esri/core/workers/chunks/0ce671588de2858516d2.js +1 -0
  27. package/assets/esri/core/workers/chunks/14c6ae4feb4859cfa7c5.js +1 -0
  28. package/assets/esri/core/workers/chunks/20a2b3d1f826e9059884.js +1 -0
  29. package/assets/esri/core/workers/chunks/{c4651243525026e6ddde.js → 2da12a64d3baef4aaaa1.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{5b0c42bb95d81085061d.js → 35fc8a64674005b1d1d7.js} +1 -1
  31. package/assets/esri/core/workers/chunks/37a97e690786814bf0b3.js +1 -0
  32. package/assets/esri/core/workers/chunks/38f84294fb2fb4663ba5.js +1 -0
  33. package/assets/esri/core/workers/chunks/3eb3af0b6cf3c2f28131.js +1 -0
  34. package/assets/esri/core/workers/chunks/48e64f99720907017778.js +1 -0
  35. package/assets/esri/core/workers/chunks/4bd92232928b832dea76.js +1 -0
  36. package/assets/esri/core/workers/chunks/50e9eafb118d2a221f10.js +1 -0
  37. package/assets/esri/core/workers/chunks/55588e668b6acb6aa390.js +1 -0
  38. package/assets/esri/core/workers/chunks/5b112471dca94b2e8462.js +1 -0
  39. package/assets/esri/core/workers/chunks/5dfe1aed10095385c066.js +1 -0
  40. package/assets/esri/core/workers/chunks/7389841fabe0f319f1e5.js +1 -0
  41. package/assets/esri/core/workers/chunks/77493aa2118d462612a0.js +1 -0
  42. package/assets/esri/core/workers/chunks/7a8d740d1226719a578a.js +1 -0
  43. package/assets/esri/core/workers/chunks/81e518dd62bd95611d00.js +1 -0
  44. package/assets/esri/core/workers/chunks/8e0559cc6295008fcdf7.js +1 -0
  45. package/assets/esri/core/workers/chunks/{69e37365c17e7cc4168f.js → 93af38d29d066f27ed28.js} +1 -1
  46. package/assets/esri/core/workers/chunks/944fa8261aad94ae0542.js +1 -0
  47. package/assets/esri/core/workers/chunks/{6775d2ab5faf1fa161db.js → 97a38d700f2cb8807d51.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{45121b7258333c8ebbdb.js → 98ea12c7a000a30f3dc0.js} +1 -1
  49. package/assets/esri/core/workers/chunks/9e479e7e2e51476c3d27.js +1 -0
  50. package/assets/esri/core/workers/chunks/a1e179dd6de9c8769b02.js +1 -0
  51. package/assets/esri/core/workers/chunks/a829969ed44cdb814f27.js +1 -0
  52. package/assets/esri/core/workers/chunks/ac41b882f9cbf8d56f0c.js +1 -0
  53. package/assets/esri/core/workers/chunks/b0ee061747bef6729bb9.js +1 -0
  54. package/assets/esri/core/workers/chunks/b2a035befeeff1a55ad8.js +1 -0
  55. package/assets/esri/core/workers/chunks/ba45dccb4dab5a74d224.js +1 -0
  56. package/assets/esri/core/workers/chunks/c5b2a261d8c216ca4a10.js +1 -0
  57. package/assets/esri/core/workers/chunks/{edc4f230a5bdf928f9fd.js → d1aeb9fe9eb573beefcc.js} +2 -2
  58. package/assets/esri/core/workers/chunks/e3f68f7b408a08d7cd5d.js +1 -0
  59. package/assets/esri/core/workers/chunks/e9716995ce0c3683eafc.js +1 -0
  60. package/assets/esri/core/workers/chunks/{4cc982c99d84e896d535.js → ed25bf087f52e5d3e71b.js} +1 -1
  61. package/assets/esri/core/workers/chunks/f92e608931b1c168cb45.js +1 -0
  62. package/assets/esri/core/workers/chunks/f9f94b5efa9a64cdb407.js +1 -0
  63. package/assets/esri/core/workers/chunks/fb4950995f6780f6c22a.js +1 -0
  64. package/assets/esri/themes/base/widgets/_Search.scss +12 -0
  65. package/assets/esri/themes/base/widgets/_VideoPlayer.scss +16 -2
  66. package/assets/esri/themes/dark/main.css +1 -1
  67. package/assets/esri/themes/light/main.css +1 -1
  68. package/assets/esri/themes/light/view.css +1 -1
  69. package/chunks/Laserlines.glsl.js +12 -12
  70. package/chunks/sphere.js +1 -1
  71. package/chunks/vec42.js +1 -1
  72. package/config.js +1 -1
  73. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  74. package/core/libs/gl-matrix-2/math/vec4.js +1 -1
  75. package/geometry/projection/projectBoundingSphere.js +1 -1
  76. package/geometry/support/DoubleArray.js +1 -1
  77. package/geometry/support/aaBoundingRect.js +1 -1
  78. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  79. package/geometry/support/curves/circleUtils.js +1 -1
  80. package/geometry/support/curves/ellipticArc4Utils.js +1 -1
  81. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  82. package/geometry/support/curves/mathUtils.js +1 -1
  83. package/geometry/support/sphere.js +1 -1
  84. package/identity/OAuthCredential.js +1 -1
  85. package/interfaces.d.ts +272 -279
  86. package/kernel.js +1 -1
  87. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  88. package/layers/mixins/ArcGISImageService.js +1 -1
  89. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  90. package/package.json +1 -1
  91. package/request.js +1 -1
  92. package/support/revision.js +1 -1
  93. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  94. package/views/2d/engine/imagery/RasterTileContainer.js +1 -1
  95. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  96. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +5 -0
  97. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/AspectTechnique.js +1 -1
  98. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BandArithmeticTechnique.js +1 -1
  99. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BaseRasterProcessorTechnique.js +1 -1
  100. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ColormapToRGBTechnique.js +1 -1
  101. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CompositeBandTechnique.js +1 -1
  102. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ComputeChangeTechnique.js +1 -1
  103. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ContrastBrightnessTechnique.js +1 -1
  104. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ConvolutionTechnique.js +1 -1
  105. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CurvatureTechnique.js +1 -1
  106. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ExtractBandTechnique.js +1 -1
  107. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/FocalStatisticsTechnique.js +1 -1
  108. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/GrayscaleTechnique.js +1 -1
  109. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/HillshadeTechnique.js +1 -1
  110. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/LocalTechnique.js +1 -1
  111. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/MaskTechnique.js +1 -1
  112. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/NDVITechnique.js +1 -1
  113. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/RemapTechnique.js +1 -1
  114. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
  115. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ShadedReliefTechnique.js +1 -1
  116. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/SlopeTechnique.js +1 -1
  117. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/StretchTechnique.js +1 -1
  118. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
  119. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
  120. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterRangeHighlightShader.js +5 -0
  121. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  122. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  123. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  124. package/views/2d/layers/imagery/ImageryView2D.js +1 -1
  125. package/views/3d/analysis/ElevationProfile/ProfileLinesVisualization.js +1 -1
  126. package/views/3d/analysis/ElevationProfile/SceneLineComputation.js +5 -0
  127. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  128. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementController.js +1 -1
  129. package/views/3d/analysis/support/measurementUtils.js +1 -1
  130. package/views/3d/camera/constraintUtils/distance.js +1 -1
  131. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  132. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  133. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  134. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  135. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  136. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  137. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  138. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  139. package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
  140. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  141. package/views/3d/layers/I3SMeshView3D.js +1 -1
  142. package/views/3d/layers/SceneLayerWorker.js +1 -1
  143. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  144. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  145. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  146. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  147. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  148. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  149. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  150. package/views/3d/layers/i3s/I3SProjectionUtil.js +1 -1
  151. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  152. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  153. package/views/3d/state/NearFarHeuristic.js +1 -1
  154. package/views/3d/state/ViewStateManager.js +1 -1
  155. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  156. package/views/3d/state/utils/navigationUtils.js +1 -1
  157. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  158. package/views/3d/support/orientedBoundingBox.js +1 -1
  159. package/views/3d/terrain/OverlayManager.js +1 -1
  160. package/views/3d/terrain/ScaleRangeQueries.js +1 -1
  161. package/views/3d/terrain/SphericalPatch.js +1 -1
  162. package/views/3d/terrain/TerrainSurface.js +1 -1
  163. package/views/3d/terrain/Tile.js +1 -1
  164. package/views/3d/webgl/RenderCamera.js +1 -1
  165. package/views/3d/webgl-engine/Stage.js +1 -1
  166. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  167. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  168. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  169. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  170. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  171. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  172. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  173. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  174. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  175. package/views/3d/webgl-engine/lib/screenSizePerspectiveUtils.js +1 -1
  176. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  177. package/views/analysis/ElevationProfile/Controller.js +5 -0
  178. package/views/analysis/ElevationProfile/GroundLineComputation.js +5 -0
  179. package/views/analysis/ElevationProfile/InputLineComputation.js +5 -0
  180. package/views/analysis/ElevationProfile/LineComputation.js +5 -0
  181. package/views/analysis/ElevationProfile/QueryLineComputation.js +5 -0
  182. package/views/analysis/ElevationProfile/Result.d.ts +4 -0
  183. package/views/analysis/{ElevationProfileResult.js → ElevationProfile/Result.js} +1 -1
  184. package/views/interactive/coordinateHelper.js +1 -1
  185. package/views/interactive/editGeometry/operations/curveOperationUtils.js +1 -1
  186. package/views/interactive/sketch/constraints.js +1 -1
  187. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  188. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  189. package/views/support/LayerLayerViewInfo.js +1 -1
  190. package/views/support/LayerViewManager.js +1 -1
  191. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
  192. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
  193. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
  194. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
  195. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  196. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  197. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +5 -0
  198. package/widgets/Search/css.js +1 -1
  199. package/widgets/Search.js +1 -1
  200. package/widgets/VideoPlayer/components/PlayerActionsGroup.js +1 -1
  201. package/widgets/VideoPlayer/css.js +1 -1
  202. package/widgets/VideoPlayer.js +1 -1
  203. package/analysis/ElevationProfileLine.d.ts +0 -4
  204. package/analysis/ElevationProfileLine.js +0 -5
  205. package/analysis/ElevationProfileLineChartOptions.d.ts +0 -4
  206. package/analysis/ElevationProfileLineChartOptions.js +0 -5
  207. package/analysis/ElevationProfileLineGround.d.ts +0 -4
  208. package/analysis/ElevationProfileLineGround.js +0 -5
  209. package/analysis/ElevationProfileLineInput.d.ts +0 -4
  210. package/analysis/ElevationProfileLineInput.js +0 -5
  211. package/analysis/ElevationProfileLineQuery.d.ts +0 -4
  212. package/analysis/ElevationProfileLineQuery.js +0 -5
  213. package/analysis/ElevationProfileLineScene.d.ts +0 -4
  214. package/analysis/ElevationProfileLineScene.js +0 -5
  215. package/analysis/ElevationProfileLineViewOptions.d.ts +0 -4
  216. package/analysis/ElevationProfileLineViewOptions.js +0 -5
  217. package/analysis/ElevationProfileUnits.d.ts +0 -4
  218. package/analysis/ElevationProfileUnits.js +0 -5
  219. package/analysis/ElevationProfileViewOptions.d.ts +0 -4
  220. package/analysis/ElevationProfileViewOptions.js +0 -5
  221. package/analysis/support/elevationProfileLineTypes.js +0 -5
  222. package/assets/esri/core/workers/chunks/21a90083f29e44ccd735.js +0 -1
  223. package/assets/esri/core/workers/chunks/224872bfd923cf4c9d78.js +0 -1
  224. package/assets/esri/core/workers/chunks/237c96d946efa5ed0386.js +0 -1
  225. package/assets/esri/core/workers/chunks/2942ab268f24cea2e722.js +0 -1
  226. package/assets/esri/core/workers/chunks/32789077e37d5c8191e7.js +0 -1
  227. package/assets/esri/core/workers/chunks/3610357c8fa9bec9e0dc.js +0 -1
  228. package/assets/esri/core/workers/chunks/3e3886a51c0f8c86df75.js +0 -1
  229. package/assets/esri/core/workers/chunks/6d786fac4bb5efcb7acc.js +0 -1
  230. package/assets/esri/core/workers/chunks/7b95da70d39ba316b051.js +0 -1
  231. package/assets/esri/core/workers/chunks/7df8c78e36b04ad657d2.js +0 -1
  232. package/assets/esri/core/workers/chunks/838c7fd37b2e78b1d582.js +0 -1
  233. package/assets/esri/core/workers/chunks/8c6119dde0eead8d90d9.js +0 -1
  234. package/assets/esri/core/workers/chunks/8c8c8f1058a4b58a3181.js +0 -1
  235. package/assets/esri/core/workers/chunks/8f70650aba8e55eb7a96.js +0 -1
  236. package/assets/esri/core/workers/chunks/96a34b240d17147902f4.js +0 -1
  237. package/assets/esri/core/workers/chunks/9af47a4da3a0b84f1add.js +0 -1
  238. package/assets/esri/core/workers/chunks/9affcf990ea810fa426b.js +0 -1
  239. package/assets/esri/core/workers/chunks/a3dce23ca98c9b0f945f.js +0 -1
  240. package/assets/esri/core/workers/chunks/a50026e567b1edff87c6.js +0 -1
  241. package/assets/esri/core/workers/chunks/a7ff44157b8cf19de37e.js +0 -1
  242. package/assets/esri/core/workers/chunks/b884bd2f50aaccfa24c5.js +0 -1
  243. package/assets/esri/core/workers/chunks/c483d2149d9d0099bfdb.js +0 -1
  244. package/assets/esri/core/workers/chunks/cfc3f202e7313ca56823.js +0 -1
  245. package/assets/esri/core/workers/chunks/d1c97fdcba6eb443cb1c.js +0 -1
  246. package/assets/esri/core/workers/chunks/d7c679374aa2d256becf.js +0 -1
  247. package/assets/esri/core/workers/chunks/d8d17e3ecccec7e99f0b.js +0 -1
  248. package/assets/esri/core/workers/chunks/e4069352d5d1104749ae.js +0 -1
  249. package/assets/esri/core/workers/chunks/e408ccee12bfe089c913.js +0 -1
  250. package/assets/esri/core/workers/chunks/e5522c85ca4f0efab8ea.js +0 -1
  251. package/assets/esri/core/workers/chunks/e59e09766b130a05c617.js +0 -1
  252. package/assets/esri/core/workers/chunks/ef02e33ea53b46b566cb.js +0 -1
  253. package/assets/esri/core/workers/chunks/ff79a8df1b1941ae350d.js +0 -1
  254. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +0 -5
  255. package/views/analysis/ElevationProfile/ElevationProfileController.js +0 -5
  256. package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +0 -5
  257. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +0 -5
  258. package/views/analysis/ElevationProfile/ElevationProfileLineInputComputation.js +0 -5
  259. package/views/analysis/ElevationProfile/ElevationProfileLineQueryComputation.js +0 -5
  260. package/views/analysis/ElevationProfileResult.d.ts +0 -4
  261. package/views/support/PixelHighlightOptions.js +0 -5
  262. /package/assets/esri/core/workers/chunks/{edc4f230a5bdf928f9fd.js.LICENSE.txt → d1aeb9fe9eb573beefcc.js.LICENSE.txt} +0 -0
  263. /package/views/analysis/ElevationProfile/{profileUtils.js → profileGenerationUtils.js} +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{c as t,i as e,f as r,n,h as o,e as s,g as i,s as f}from"../../../../chunks/vec32.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import a from"../../../../geometry/Polygon.js";import{a as u}from"../../../../chunks/sphere.js";import{planeFromPoints as c}from"../../support/mathUtils.js";function h(t,n){const o=u(n);e(o,0,0,0);for(let e=0;e<t.length;++e)r(o,o,t[e]);i(o,o,1/t.length);let s=0;for(let e=0;e<t.length;++e)s=Math.max(s,f(o,t[e]));n[3]=Math.sqrt(s)}function g(t,e){if(t.length<3)throw new Error("need at least 3 points to fit a plane");c(t[0],t[1],t[2],e)}function m(t,e){return s(t,e)+t[3]}function p(e,r,n,o,{geodesicArea:s}){const i=x;return t(i.rings[0][0],e),t(i.rings[0][1],r),t(i.rings[0][2],n),t(i.rings[0][3],e),i.spatialReference=o,i.clearCache(),s(i)}function j(i,f=null,l=!0){const a=(t,e)=>{if(0===e[0]&&0===e[1]&&0===e[2])return!1;for(let r=0;r<t.length;++r)if(s(e,t[r])<-1e-6)return!1;return!0};if(0===i.length)return!1;if(1===i.length)return f&&t(f,i[0]),!0;e(y,0,0,0);for(let t=0;t<i.length;++t)r(y,y,i[t]);if(n(y,y),a(i,y))return f&&t(f,y),!0;if(!l)return!1;for(let e=0;e<i.length;++e)for(let r=0;r<i.length;++r)if(e!==r&&(o(y,i[e],i[r]),n(y,y),a(i,y)))return f&&t(f,y),!0;return!1}function w(t){return"mouse"!==t.pointerType||0===t.button}const x=new a({hasM:!1,hasZ:!0,rings:[[l(),l(),l(),l()]],spatialReference:null}),y=l();export{g as bestFitPlane,h as boundingSphere,j as fitHemisphere,w as isPrimaryPointerAction,m as planePointDistance,p as triangleAreaGeodesic};
5
+ import{c as t,i as e,f as r,n,h as o,e as s,g as i,s as f}from"../../../../chunks/vec32.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import a from"../../../../geometry/Polygon.js";import{e as u}from"../../../../chunks/sphere.js";import{planeFromPoints as c}from"../../support/mathUtils.js";function h(t,n){const o=e(g,0,0,0);for(let e=0;e<t.length;++e)r(o,o,t[e]);i(o,o,1/t.length);let s=0;for(let e=0;e<t.length;++e)s=Math.max(s,f(o,t[e]));u(n,o,Math.sqrt(s))}const g=l();function m(t,e){if(t.length<3)throw new Error("need at least 3 points to fit a plane");c(t[0],t[1],t[2],e)}function p(t,e){return s(t,e)+t[3]}function j(e,r,n,o,{geodesicArea:s}){const i=y;return t(i.rings[0][0],e),t(i.rings[0][1],r),t(i.rings[0][2],n),t(i.rings[0][3],e),i.spatialReference=o,i.clearCache(),s(i)}function w(i,f=null,l=!0){const a=(t,e)=>{if(0===e[0]&&0===e[1]&&0===e[2])return!1;for(let r=0;r<t.length;++r)if(s(e,t[r])<-1e-6)return!1;return!0};if(0===i.length)return!1;if(1===i.length)return f&&t(f,i[0]),!0;e(M,0,0,0);for(let t=0;t<i.length;++t)r(M,M,i[t]);if(n(M,M),a(i,M))return f&&t(f,M),!0;if(!l)return!1;for(let e=0;e<i.length;++e)for(let r=0;r<i.length;++r)if(e!==r&&(o(M,i[e],i[r]),n(M,M),a(i,M)))return f&&t(f,M),!0;return!1}function x(t){return"mouse"!==t.pointerType||0===t.button}const y=new a({hasM:!1,hasZ:!0,rings:[[l(),l(),l(),l()]],spatialReference:null}),M=l();export{m as bestFitPlane,h as boundingSphere,w as fitHemisphere,x as isPrimaryPointerAction,p as planePointDistance,j as triangleAreaGeodesic};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{c as e,d as n,f as r,j as t,E as o}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{wrap as c}from"../../../../geometry/support/ray.js";import{i as s,l as a}from"../../../../chunks/sphere.js";import{defaultConstraintOptions as f,interactionDirectionTowardsConstraintMinimization as m,adjustRangeForInteraction as u}from"./common.js";function p(e,n,r=f){if(!e.state.isLocal)return 0;const t=e.state.constraints.distance;if(!e.pointsOfInterest.surfaceOrigin.renderLocation||t===1/0)return 0;L.min=0,L.max=t,l(e,r,L);const o=y(e,n),i=L.max-o;return i>=-1e-6?0:i}function d(t,o,i=f){const u=p(t,o,i);if(0===u)return!1;const d=t.pointsOfInterest.surfaceOrigin;if(!d.renderLocation)return!1;const l=y(t,o)+u,L=e(g,o.eye),C=m(o,i.interactionDirection,x(o,d.renderLocation,I),O);if(!s(a(d.renderLocation,l),c(o.eye,C),h))return!1;o.eye=h;const k=n(j,o.eye,L);o.center=r(h,o.center,k);const v=t.renderCoordsHelper.getAltitude(o.center),H=t.renderCoordsHelper.intersectInfiniteManifold(o.ray,v,h);return null!=H&&(o.center=H),!0}function l(e,n,r){const t=n.interactionType;if(0===t)return;const{min:o,max:i}=r,{interactionStartCamera:c,interactionFactor:s}=n;if(!c)return;const a=1===t||4===t,f=p(e,c),m=0===f?0:y(e,c);r.min=o,r.max=i;u(f,m,a,s,.05*m,r)}function y(e,n){const r=e.pointsOfInterest.surfaceOrigin;return r.renderLocation?t(n.eye,r.renderLocation):0}function x(e,n,r){return o(r,e.eye,n)}const L={min:0,max:0},g=i(),j=i(),O=i(),I=i(),h=i();export{d as applyDistanceConstraint,p as getDistanceConstraintError};
5
+ import{c as e,d as r,f as n,j as t,E as o}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{wrap as c}from"../../../../geometry/support/ray.js";import{i as s,r as a}from"../../../../chunks/sphere.js";import{defaultConstraintOptions as f,interactionDirectionTowardsConstraintMinimization as m,adjustRangeForInteraction as u}from"./common.js";function p(e,r,n=f){if(!e.state.isLocal)return 0;const t=e.state.constraints.distance;if(!e.pointsOfInterest.surfaceOrigin.renderLocation||t===1/0)return 0;L.min=0,L.max=t,y(e,n,L);const o=l(e,r),i=L.max-o;return i>=-1e-6?0:i}function d(t,o,i=f){const u=p(t,o,i);if(0===u)return!1;const d=t.pointsOfInterest.surfaceOrigin;if(!d.renderLocation)return!1;const y=l(t,o)+u,L=e(g,o.eye),C=m(o,i.interactionDirection,x(o,d.renderLocation,I),O);if(!s(a(d.renderLocation,y),c(o.eye,C),h))return!1;o.eye=h;const k=r(j,o.eye,L);o.center=n(h,o.center,k);const v=t.renderCoordsHelper.getAltitude(o.center),H=t.renderCoordsHelper.intersectInfiniteManifold(o.ray,v,h);return null!=H&&(o.center=H),!0}function y(e,r,n){const t=r.interactionType;if(0===t)return;const{min:o,max:i}=n,{interactionStartCamera:c,interactionFactor:s}=r;if(!c)return;const a=1===t||4===t,f=p(e,c),m=0===f?0:l(e,c);n.min=o,n.max=i;u(f,m,a,s,.05*m,n)}function l(e,r){const n=e.pointsOfInterest.surfaceOrigin;return n.renderLocation?t(r.eye,n.renderLocation):0}function x(e,r,n){return o(n,e.eye,r)}const L={min:0,max:0},g=i(),j=i(),O=i(),I=i(),h=i();export{d as applyDistanceConstraint,p as getDistanceConstraintError};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{neverReached as e}from"../../../../core/compilerUtils.js";import{acosClamped as t,clamp as r,asinClamped as n,deg2rad as i}from"../../../../core/mathUtils.js";import{fromRotation as a}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{d as c,t as o,g as u,f as l,k as m,j as d,e as f,n as h,l as p}from"../../../../chunks/vec32.js";import{create as M}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as y}from"../../../../geometry/ellipsoidUtils.js";import{e as C,b as I,t as x}from"../../../../chunks/sphere.js";import{defaultConstraintOptions as S,hasConstraintType as v,adjustRangeForInteraction as w}from"./common.js";import{viewAngle as A}from"../../state/utils/viewUtils.js";function R(t,r,n,i=!0){Q.eyeCenterDistance=0,Q.requiresTwoSteps=!1;const s=T(t,r,n,S,Q);if(0===s)return!1;switch(a(z,-s,r.viewRight),n.tiltMode){case 1:o(L,r.viewForward,z),u(L,L,Q.eyeCenterDistance),r.center=l(B,r.eye,L);break;case 0:c(L,r.center,r.eye),o(L,L,z),r.eye=c(B,r.center,L);break;default:e(n.tiltMode)}return r.up=o(B,r.up,z),!Q.requiresTwoSteps||!i||R(t,r,n,!1)}function T(e,t,r,n=S,i){if(!e.state.constraints.tilt)return 0;const a=Math.min(t.relativeElevation*J,t.distance),s=e.state.constraints.tilt(a,K);return E(e,r,s),2===n.interactionType&&v(n.selection,2)&&U(e,n.interactionStartCamera,s),1===r.tiltMode||1===n.tiltMode?P(e,t,s,i):j(e,t,s)}function j(e,t,n){const i=A(e.renderCoordsHelper,t.center,t.eye),a=i-r(i,n.min,n.max);return q(a)?a:0}function P(e,t,r,n){switch(n&&(n.requiresTwoSteps=!1),e.viewingMode){case"global":return g(e,t,r,n);case"local":return b(e,t,r,n)}}function b(e,t,n,i){const a=A(e.renderCoordsHelper,t.center,t.eye),s=r(a,n.min,n.max),c=a-s;if(!q(c))return 0;if(i){const r=Math.abs(e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude),n=e.renderCoordsHelper.getAltitude(t.eye)-r,a=Math.max(Math.cos(s),1e-4);Math.abs(a)>1e-4?i.eyeCenterDistance=n/a:i.eyeCenterDistance=t.distance}return c}function g(e,t,n,i){const a=O(e,t,N),s=r(a.tiltAtCenter,n.min,n.max);if(!q(a.tiltAtCenter-s))return 0;let c,o;return a.centerIsOnSurface?(c=H(a),o=k(a,c)):(c=a.constraints.clampTilt(a.distance,a.tiltAtCenter),i&&c<Math.PI/2&&(i.requiresTwoSteps=!0,c=Math.PI/2-1e-5),o=F(a,c)),i&&(i.eyeCenterDistance=D(a,c)),o}function O(e,r,n){const i=e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,a=i+y(e.spatialReference).radius,s=e.renderCoordsHelper.intersectManifold(r.ray,i,B);return n.distance=Math.min(r.relativeElevation*J,r.distance),n.centerIsOnSurface=!1,null!=s?(n.distance=Math.min(r.relativeElevation*J,d(r.eye,s)),n.tiltAtCenter=A(e.renderCoordsHelper,s,r.eye),n.centerIsOnSurface=!0):e.state.isLocal?n.tiltAtCenter=A(e.renderCoordsHelper,r.center,r.eye):(C(I(x,a),r.ray,B),n.distance=Math.min(r.relativeElevation*J,d(r.eye,B)),n.tiltAtCenter=t(-f(r.viewForward,h(B,B)))),n.radius=a,n.eyeRadius=p(r.eye),n.constraints=e.state.constraints,n}function q(e){return Math.abs(e)>1e-9}function H(e){const{constraints:t,distance:r,tiltAtCenter:n}=e;let i=n,a=t.clampTilt(r,n);const s=D(e,a);if(t.clampTilt(s,n)===a)return a;let c=0;for(;c<10&&q(a-i);){const r=(i+a)/2,n=D(e,r);q(t.clampTilt(n,r)-r)?i=r:a=r,c++}return a}function D(e,t){if(!e.centerIsOnSurface)return e.distance;const i=Math.PI-r(t,0,Math.PI),a=n(e.radius/e.eyeRadius*Math.sin(i)),s=Math.PI-i-a,c=Math.sin(s)/Math.sin(i);if(e.eyeRadius<e.radius&&c>1){const t=Math.PI-a,r=Math.PI-i-t;return Math.sin(r)/Math.sin(i)*e.eyeRadius}return c*e.eyeRadius}function k(e,t){const r=n(e.radius/e.eyeRadius*Math.sin(e.tiltAtCenter)),i=n(e.radius/e.eyeRadius*Math.sin(t));return e.eyeRadius>e.radius?r-i:i-r}function F(e,t){return e.tiltAtCenter-Math.PI/2-(t-Math.PI/2)}function E(e,t,r){if(0===t.interactionType)return;const{interactionStartCamera:n,interactionFactor:i}=t;if(!n)return;const{min:a,max:s}=r,c=T(e,n,S,t),o=0===c?0:A(e.renderCoordsHelper,n.center,n.eye);r.min=a,r.max=s,2===t.interactionType?(v(t.selection,2)&&U(e,n,r),w(c,o,!0,i,G,r)):w(c,o,!1,i,G,r)}function U(e,r,n){const i=e.state.constraints;if(e.state.isLocal||!i.altitude||!r)return;const a=m(r.center),s=Math.sqrt(a),c=r.distance,o=y(e.spatialReference).radius,u=i.altitude.min+o,l=i.altitude.max+o,d=(u*u-c*c-a)/(-2*s*c),f=(l*l-c*c-a)/(-2*s*c);n.min=Math.max(n.min,Math.min(Math.PI-t(f),n.max)),n.max=Math.min(n.max,Math.PI-t(d))}const L=M(),z=s(),B=M(),G=i(5),J=30,K={min:0,max:0},N={constraints:null,radius:0,eyeRadius:0,centerIsOnSurface:!0,distance:0,tiltAtCenter:0},Q={eyeCenterDistance:0,requiresTwoSteps:!1};export{R as applyTiltConstraint,T as getTiltConstraintError};
5
+ import{neverReached as e}from"../../../../core/compilerUtils.js";import{acosClamped as t,clamp as r,asinClamped as n,deg2rad as i}from"../../../../core/mathUtils.js";import{fromRotation as a}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{d as c,t as o,g as u,f as l,k as m,j as d,e as f,n as h,l as p}from"../../../../chunks/vec32.js";import{create as M}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as y}from"../../../../geometry/ellipsoidUtils.js";import{h as C,b as I,t as x}from"../../../../chunks/sphere.js";import{defaultConstraintOptions as S,hasConstraintType as v,adjustRangeForInteraction as w}from"./common.js";import{viewAngle as A}from"../../state/utils/viewUtils.js";function R(t,r,n,i=!0){Q.eyeCenterDistance=0,Q.requiresTwoSteps=!1;const s=T(t,r,n,S,Q);if(0===s)return!1;switch(a(z,-s,r.viewRight),n.tiltMode){case 1:o(L,r.viewForward,z),u(L,L,Q.eyeCenterDistance),r.center=l(B,r.eye,L);break;case 0:c(L,r.center,r.eye),o(L,L,z),r.eye=c(B,r.center,L);break;default:e(n.tiltMode)}return r.up=o(B,r.up,z),!Q.requiresTwoSteps||!i||R(t,r,n,!1)}function T(e,t,r,n=S,i){if(!e.state.constraints.tilt)return 0;const a=Math.min(t.relativeElevation*J,t.distance),s=e.state.constraints.tilt(a,K);return E(e,r,s),2===n.interactionType&&v(n.selection,2)&&U(e,n.interactionStartCamera,s),1===r.tiltMode||1===n.tiltMode?P(e,t,s,i):j(e,t,s)}function j(e,t,n){const i=A(e.renderCoordsHelper,t.center,t.eye),a=i-r(i,n.min,n.max);return q(a)?a:0}function P(e,t,r,n){switch(n&&(n.requiresTwoSteps=!1),e.viewingMode){case"global":return g(e,t,r,n);case"local":return b(e,t,r,n)}}function b(e,t,n,i){const a=A(e.renderCoordsHelper,t.center,t.eye),s=r(a,n.min,n.max),c=a-s;if(!q(c))return 0;if(i){const r=Math.abs(e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude),n=e.renderCoordsHelper.getAltitude(t.eye)-r,a=Math.max(Math.cos(s),1e-4);Math.abs(a)>1e-4?i.eyeCenterDistance=n/a:i.eyeCenterDistance=t.distance}return c}function g(e,t,n,i){const a=O(e,t,N),s=r(a.tiltAtCenter,n.min,n.max);if(!q(a.tiltAtCenter-s))return 0;let c,o;return a.centerIsOnSurface?(c=H(a),o=k(a,c)):(c=a.constraints.clampTilt(a.distance,a.tiltAtCenter),i&&c<Math.PI/2&&(i.requiresTwoSteps=!0,c=Math.PI/2-1e-5),o=F(a,c)),i&&(i.eyeCenterDistance=D(a,c)),o}function O(e,r,n){const i=e.pointsOfInterest.centerOnSurfaceFrequent.estimatedSurfaceAltitude,a=i+y(e.spatialReference).radius,s=e.renderCoordsHelper.intersectManifold(r.ray,i,B);return n.distance=Math.min(r.relativeElevation*J,r.distance),n.centerIsOnSurface=!1,null!=s?(n.distance=Math.min(r.relativeElevation*J,d(r.eye,s)),n.tiltAtCenter=A(e.renderCoordsHelper,s,r.eye),n.centerIsOnSurface=!0):e.state.isLocal?n.tiltAtCenter=A(e.renderCoordsHelper,r.center,r.eye):(C(I(x,a),r.ray,B),n.distance=Math.min(r.relativeElevation*J,d(r.eye,B)),n.tiltAtCenter=t(-f(r.viewForward,h(B,B)))),n.radius=a,n.eyeRadius=p(r.eye),n.constraints=e.state.constraints,n}function q(e){return Math.abs(e)>1e-9}function H(e){const{constraints:t,distance:r,tiltAtCenter:n}=e;let i=n,a=t.clampTilt(r,n);const s=D(e,a);if(t.clampTilt(s,n)===a)return a;let c=0;for(;c<10&&q(a-i);){const r=(i+a)/2,n=D(e,r);q(t.clampTilt(n,r)-r)?i=r:a=r,c++}return a}function D(e,t){if(!e.centerIsOnSurface)return e.distance;const i=Math.PI-r(t,0,Math.PI),a=n(e.radius/e.eyeRadius*Math.sin(i)),s=Math.PI-i-a,c=Math.sin(s)/Math.sin(i);if(e.eyeRadius<e.radius&&c>1){const t=Math.PI-a,r=Math.PI-i-t;return Math.sin(r)/Math.sin(i)*e.eyeRadius}return c*e.eyeRadius}function k(e,t){const r=n(e.radius/e.eyeRadius*Math.sin(e.tiltAtCenter)),i=n(e.radius/e.eyeRadius*Math.sin(t));return e.eyeRadius>e.radius?r-i:i-r}function F(e,t){return e.tiltAtCenter-Math.PI/2-(t-Math.PI/2)}function E(e,t,r){if(0===t.interactionType)return;const{interactionStartCamera:n,interactionFactor:i}=t;if(!n)return;const{min:a,max:s}=r,c=T(e,n,S,t),o=0===c?0:A(e.renderCoordsHelper,n.center,n.eye);r.min=a,r.max=s,2===t.interactionType?(v(t.selection,2)&&U(e,n,r),w(c,o,!0,i,G,r)):w(c,o,!1,i,G,r)}function U(e,r,n){const i=e.state.constraints;if(e.state.isLocal||!i.altitude||!r)return;const a=m(r.center),s=Math.sqrt(a),c=r.distance,o=y(e.spatialReference).radius,u=i.altitude.min+o,l=i.altitude.max+o,d=(u*u-c*c-a)/(-2*s*c),f=(l*l-c*c-a)/(-2*s*c);n.min=Math.max(n.min,Math.min(Math.PI-t(f),n.max)),n.max=Math.min(n.max,Math.PI-t(d))}const L=M(),z=s(),B=M(),G=i(5),J=30,K={min:0,max:0},N={constraints:null,radius:0,eyeRadius:0,centerIsOnSurface:!0,distance:0,tiltAtCenter:0},Q={eyeCenterDistance:0,requiresTwoSteps:!1};export{R as applyTiltConstraint,T as getTiltConstraintError};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/has.js";import{c as e,d as t,q as r,u as i}from"../../../../chunks/vec32.js";import{create as s,fromValues as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a,c as o}from"../../../../chunks/vec42.js";import{fromValues as l,clone as h}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromRay as d,create as _,getStart as p,getEnd as c}from"../../../../geometry/support/clipRay.js";import{intersectClipRay as u}from"../../../../geometry/support/frustum.js";import{create as f,fromPoints as m,pointAt as y}from"../../../../geometry/support/lineSegment.js";import{create as g,fromPoints as b}from"../../../../geometry/support/ray.js";import{EngineVisualElement as D}from"./EngineVisualElement.js";import{LaserlineVisualElement as O}from"./LaserlineVisualElement.js";import{drapedZ as w}from"../../terrain/OverlayRenderer.js";import{createPolylineGeometry as j}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderGeometry as C}from"../../webgl-engine/lib/RenderGeometry.js";import{RibbonLineMaterial as E}from"../../webgl-engine/materials/RibbonLineMaterial.js";class x extends D{constructor(e){super(e),this._ray=g(),this._isWorldDown=!1,this._start=s(),this._end=n(1,0,0),this._width=1,this._color=l(1,0,1,1),this._polygonOffset=!1,this._writeDepthEnabled=!0,this._innerWidth=0,this._innerColor=l(1,1,1,1),this._stipplePattern=null,this._stippleOffColor=null,this._stipplePreferContinuous=!0,this._falloff=0,this._extensionType=0,this._laserlineStyle=null,this._laserlineEnabled=!1,this._renderOccluded=4,this._fadedExtensions=A,this._laserline=new O({view:this.view,isDecoration:e.isDecoration}),this.applyProperties(e)}destroy(){this._laserline.destroy(),super.destroy()}createObject3DResourceFactory(e){return{view:e,createResources:e=>this._createObject3DResources(e),destroyResources:P,recreateGeometry:(e,t)=>this._recreateObject3DGeometry(e,t),cameraChanged:()=>this._updateGeometry(),forEachMaterial:(e,t)=>t(e.material)}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:P,recreateGeometry:e=>this._recreateDrapedGeometry(e),forEachMaterial:(e,t)=>t(e.material)}}updateVisibility(e){super.updateVisibility(e),this._laserline.visible=e}onAttachedChange(){this._laserline.attached=this._laserlineAttached}setStartEndFromWorldDownAtLocation(r){this._isWorldDown=!0,e(this._start,r),this.view.renderCoordsHelper.worldUpAtPosition(r,this._end),t(this._end,r,this._end),b(this._start,this._end,this._ray),this._updateGeometry()}get start(){return this._start}set start(t){this._isWorldDown=!1,r(this._start,t)||(e(this._start,t),b(this._start,this._end,this._ray),this._updateGeometry())}get end(){return this._end}set end(t){this._isWorldDown=!1,r(this._end,t)||(e(this._end,t),b(this._start,this._end,this._ray),this._updateGeometry())}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get color(){return this._color}set color(e){a(e,this._color)||(o(this._color,e),this._updateMaterial())}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){e!==this._polygonOffset&&(this._polygonOffset=e,this._updateMaterial())}get writeDepthEnabled(){return this._writeDepthEnabled}set writeDepthEnabled(e){this._writeDepthEnabled!==e&&(this._writeDepthEnabled=e,this._updateMaterial())}get innerWidth(){return this._innerWidth}set innerWidth(e){e!==this._innerWidth&&(this._innerWidth=e,this._updateMaterial())}get innerColor(){return this._innerColor}set innerColor(e){a(e,this._innerColor)||(o(this._innerColor,e),this._updateMaterial())}get stipplePattern(){return this._stipplePattern}set stipplePattern(e){const t=null!=e!=(null!=this._stipplePattern);this._stipplePattern=e,t?this.recreate():this._updateMaterial()}get stippleOffColor(){return this._stippleOffColor}set stippleOffColor(e){null!=e&&null!=this._stippleOffColor&&a(e,this._stippleOffColor)||(this._stippleOffColor=null!=e?h(e):null,this._updateMaterial())}get stipplePreferContinuous(){return this._stipplePreferContinuous}set stipplePreferContinuous(e){e!==this._stipplePreferContinuous&&(this._stipplePreferContinuous=e,this._updateMaterial())}get falloff(){return this._falloff}set falloff(e){e!==this._falloff&&(this._falloff=e,this._updateMaterial())}get extensionType(){return this._extensionType}set extensionType(e){e!==this._extensionType&&(this._extensionType=e,this.recreateGeometry())}get _laserlineAttached(){return this._laserlineEnabled&&null!=this._laserlineStyle&&this.attached&&!this.isDraped}get laserlineStyle(){return this._laserlineStyle}set laserlineStyle(e){this._laserlineStyle=e,this._laserline.attached=this._laserlineAttached,null!=e&&(this._laserline.style=e)}get laserlineEnabled(){return this._laserlineEnabled}set laserlineEnabled(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,this._laserline.attached=this._laserlineAttached)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get _normalizedRenderOccluded(){return this.isDraped&&8===this._renderOccluded?4:this._renderOccluded}get fadedExtensions(){return this._fadedExtensions}set fadedExtensions(e){this._fadedExtensions=e??A,this.recreateGeometry()}_updateMaterial(){const{materialParameters:e}=this;this.object3dResources.resources?.material.setParameters(e),this.drapedResources.resources?.material.setParameters(e)}get materialParameters(){return{width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:this._stipplePreferContinuous,innerWidth:this._innerWidth,innerColor:this._innerColor,falloff:this._falloff,hasPolygonOffset:this._polygonOffset,renderOccluded:this._normalizedRenderOccluded,isDecoration:this.isDecoration,writeDepth:this._writeDepthEnabled}}_createObject3DResources(e){const t=new E(this.materialParameters),r=new Array;return this._createObject3DGeometry(t,e,r),{material:t,geometries:r}}_recreateObject3DGeometry(e,t){e.geometries.length=0,this._createObject3DGeometry(e.material,t,e.geometries)}_createObject3DGeometry(e,t,r){const i=this._createGeometry(e);r.push(i),t.addGeometry(i),this._updateVerticesObject3D(t)}_createDrapedResources(){const e=new E(this.materialParameters);return{material:e,geometries:[this._createDrapedGeometry(e)]}}_recreateDrapedGeometry(e){e.geometries=[this._createDrapedGeometry(e.material)]}_createDrapedGeometry(e){const t=this._createGeometry(e);return this._updateVerticesDraped(t),new C(t)}_createGeometry(e){const t=3===this.extensionType,r=t?[s(),s(),s(),s()]:[s(),s()];return j(e,r,null,t?[1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0]:null)}_updateGeometry(){if(this.isDraped)this.drapedResources.recreateGeometry();else{const e=this.object3dResources.object;e&&this._updateVerticesObject3D(e)}}_updateVerticesObject3D(e){const t=this._lineSegment;this._updateVertexAttributesObject3D(e,t),this._laserline.intersectsLine=t}_updateVerticesDraped(e){this._updateVertexAttributesDraped(e,this._lineSegment)}get _lineSegment(){return 3===this._extensionType?this._updateLineSegmentFinite(M):this._updateLineSegmentInfinite(this._extensionType,M)}_updateLineSegmentFinite(e){return m(this._start,this._end,e)}_updateLineSegmentInfinite(e,t){const r=this.view.state.camera;switch(d(this._ray,G),e){case 0:G.c0=-Number.MAX_VALUE;break;case 1:case 2:{const e=this._ray.origin,t=this.view.elevationProvider.getElevation(e[0],e[1],e[2],this.view.renderCoordsHelper.spatialReference,"ground")??0,r=this.view.renderCoordsHelper.getAltitude(e);this._isWorldDown&&r<t&&i(G.ray.direction,G.ray.direction),2===this._extensionType&&null!=t&&(G.c1=Math.abs(r-t));break}}if(!u(r.frustum,G))return this._updateLineSegmentFinite(t);const s=p(G,R),n=c(G,v);return m(s,n,t)}_updateVertexAttributesObject3D(e,t){const r=e.geometries[0].getMutableAttribute("position")?.data;if(!r)return;let i=0;for(const s of this._lineVertices(t))r[i++]=s[0],r[i++]=s[1],r[i++]=s[2];e.geometryVertexAttributeUpdated(e.geometries[0],"position")}_updateVertexAttributesDraped(e,t){const r=e.getMutableAttribute("position")?.data;if(!r)return;let i=0;for(const s of this._lineVertices(t))r[i++]=s[0],r[i++]=s[1],r[i++]=w;e.invalidateBoundingInfo()}*_lineVertices(e){3===this.extensionType?(yield y(e,-this.fadedExtensions.start,R),yield y(e,0,R),yield y(e,1,R),yield y(e,1+this.fadedExtensions.end,R)):(yield y(e,0,R),yield y(e,1,R))}}function P(e){e.geometries=[]}const G=_(),R=s(),v=s(),M=f(),V=1/3,A={start:V,end:V};export{x as ExtendedLineVisualElement};
5
+ import"../../../../core/has.js";import{c as e,d as t,q as r,u as i}from"../../../../chunks/vec32.js";import{create as s,fromValues as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a,d as o}from"../../../../chunks/vec42.js";import{fromValues as l,clone as h}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromRay as d,create as _,getStart as p,getEnd as c}from"../../../../geometry/support/clipRay.js";import{intersectClipRay as u}from"../../../../geometry/support/frustum.js";import{create as f,fromPoints as m,pointAt as y}from"../../../../geometry/support/lineSegment.js";import{create as g,fromPoints as b}from"../../../../geometry/support/ray.js";import{EngineVisualElement as D}from"./EngineVisualElement.js";import{LaserlineVisualElement as O}from"./LaserlineVisualElement.js";import{drapedZ as w}from"../../terrain/OverlayRenderer.js";import{createPolylineGeometry as j}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderGeometry as C}from"../../webgl-engine/lib/RenderGeometry.js";import{RibbonLineMaterial as E}from"../../webgl-engine/materials/RibbonLineMaterial.js";class x extends D{constructor(e){super(e),this._ray=g(),this._isWorldDown=!1,this._start=s(),this._end=n(1,0,0),this._width=1,this._color=l(1,0,1,1),this._polygonOffset=!1,this._writeDepthEnabled=!0,this._innerWidth=0,this._innerColor=l(1,1,1,1),this._stipplePattern=null,this._stippleOffColor=null,this._stipplePreferContinuous=!0,this._falloff=0,this._extensionType=0,this._laserlineStyle=null,this._laserlineEnabled=!1,this._renderOccluded=4,this._fadedExtensions=A,this._laserline=new O({view:this.view,isDecoration:e.isDecoration}),this.applyProperties(e)}destroy(){this._laserline.destroy(),super.destroy()}createObject3DResourceFactory(e){return{view:e,createResources:e=>this._createObject3DResources(e),destroyResources:P,recreateGeometry:(e,t)=>this._recreateObject3DGeometry(e,t),cameraChanged:()=>this._updateGeometry(),forEachMaterial:(e,t)=>t(e.material)}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:P,recreateGeometry:e=>this._recreateDrapedGeometry(e),forEachMaterial:(e,t)=>t(e.material)}}updateVisibility(e){super.updateVisibility(e),this._laserline.visible=e}onAttachedChange(){this._laserline.attached=this._laserlineAttached}setStartEndFromWorldDownAtLocation(r){this._isWorldDown=!0,e(this._start,r),this.view.renderCoordsHelper.worldUpAtPosition(r,this._end),t(this._end,r,this._end),b(this._start,this._end,this._ray),this._updateGeometry()}get start(){return this._start}set start(t){this._isWorldDown=!1,r(this._start,t)||(e(this._start,t),b(this._start,this._end,this._ray),this._updateGeometry())}get end(){return this._end}set end(t){this._isWorldDown=!1,r(this._end,t)||(e(this._end,t),b(this._start,this._end,this._ray),this._updateGeometry())}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get color(){return this._color}set color(e){a(e,this._color)||(o(this._color,e),this._updateMaterial())}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){e!==this._polygonOffset&&(this._polygonOffset=e,this._updateMaterial())}get writeDepthEnabled(){return this._writeDepthEnabled}set writeDepthEnabled(e){this._writeDepthEnabled!==e&&(this._writeDepthEnabled=e,this._updateMaterial())}get innerWidth(){return this._innerWidth}set innerWidth(e){e!==this._innerWidth&&(this._innerWidth=e,this._updateMaterial())}get innerColor(){return this._innerColor}set innerColor(e){a(e,this._innerColor)||(o(this._innerColor,e),this._updateMaterial())}get stipplePattern(){return this._stipplePattern}set stipplePattern(e){const t=null!=e!=(null!=this._stipplePattern);this._stipplePattern=e,t?this.recreate():this._updateMaterial()}get stippleOffColor(){return this._stippleOffColor}set stippleOffColor(e){null!=e&&null!=this._stippleOffColor&&a(e,this._stippleOffColor)||(this._stippleOffColor=null!=e?h(e):null,this._updateMaterial())}get stipplePreferContinuous(){return this._stipplePreferContinuous}set stipplePreferContinuous(e){e!==this._stipplePreferContinuous&&(this._stipplePreferContinuous=e,this._updateMaterial())}get falloff(){return this._falloff}set falloff(e){e!==this._falloff&&(this._falloff=e,this._updateMaterial())}get extensionType(){return this._extensionType}set extensionType(e){e!==this._extensionType&&(this._extensionType=e,this.recreateGeometry())}get _laserlineAttached(){return this._laserlineEnabled&&null!=this._laserlineStyle&&this.attached&&!this.isDraped}get laserlineStyle(){return this._laserlineStyle}set laserlineStyle(e){this._laserlineStyle=e,this._laserline.attached=this._laserlineAttached,null!=e&&(this._laserline.style=e)}get laserlineEnabled(){return this._laserlineEnabled}set laserlineEnabled(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,this._laserline.attached=this._laserlineAttached)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get _normalizedRenderOccluded(){return this.isDraped&&8===this._renderOccluded?4:this._renderOccluded}get fadedExtensions(){return this._fadedExtensions}set fadedExtensions(e){this._fadedExtensions=e??A,this.recreateGeometry()}_updateMaterial(){const{materialParameters:e}=this;this.object3dResources.resources?.material.setParameters(e),this.drapedResources.resources?.material.setParameters(e)}get materialParameters(){return{width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:this._stipplePreferContinuous,innerWidth:this._innerWidth,innerColor:this._innerColor,falloff:this._falloff,hasPolygonOffset:this._polygonOffset,renderOccluded:this._normalizedRenderOccluded,isDecoration:this.isDecoration,writeDepth:this._writeDepthEnabled}}_createObject3DResources(e){const t=new E(this.materialParameters),r=new Array;return this._createObject3DGeometry(t,e,r),{material:t,geometries:r}}_recreateObject3DGeometry(e,t){e.geometries.length=0,this._createObject3DGeometry(e.material,t,e.geometries)}_createObject3DGeometry(e,t,r){const i=this._createGeometry(e);r.push(i),t.addGeometry(i),this._updateVerticesObject3D(t)}_createDrapedResources(){const e=new E(this.materialParameters);return{material:e,geometries:[this._createDrapedGeometry(e)]}}_recreateDrapedGeometry(e){e.geometries=[this._createDrapedGeometry(e.material)]}_createDrapedGeometry(e){const t=this._createGeometry(e);return this._updateVerticesDraped(t),new C(t)}_createGeometry(e){const t=3===this.extensionType,r=t?[s(),s(),s(),s()]:[s(),s()];return j(e,r,null,t?[1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0]:null)}_updateGeometry(){if(this.isDraped)this.drapedResources.recreateGeometry();else{const e=this.object3dResources.object;e&&this._updateVerticesObject3D(e)}}_updateVerticesObject3D(e){const t=this._lineSegment;this._updateVertexAttributesObject3D(e,t),this._laserline.intersectsLine=t}_updateVerticesDraped(e){this._updateVertexAttributesDraped(e,this._lineSegment)}get _lineSegment(){return 3===this._extensionType?this._updateLineSegmentFinite(M):this._updateLineSegmentInfinite(this._extensionType,M)}_updateLineSegmentFinite(e){return m(this._start,this._end,e)}_updateLineSegmentInfinite(e,t){const r=this.view.state.camera;switch(d(this._ray,G),e){case 0:G.c0=-Number.MAX_VALUE;break;case 1:case 2:{const e=this._ray.origin,t=this.view.elevationProvider.getElevation(e[0],e[1],e[2],this.view.renderCoordsHelper.spatialReference,"ground")??0,r=this.view.renderCoordsHelper.getAltitude(e);this._isWorldDown&&r<t&&i(G.ray.direction,G.ray.direction),2===this._extensionType&&null!=t&&(G.c1=Math.abs(r-t));break}}if(!u(r.frustum,G))return this._updateLineSegmentFinite(t);const s=p(G,R),n=c(G,v);return m(s,n,t)}_updateVertexAttributesObject3D(e,t){const r=e.geometries[0].getMutableAttribute("position")?.data;if(!r)return;let i=0;for(const s of this._lineVertices(t))r[i++]=s[0],r[i++]=s[1],r[i++]=s[2];e.geometryVertexAttributeUpdated(e.geometries[0],"position")}_updateVertexAttributesDraped(e,t){const r=e.getMutableAttribute("position")?.data;if(!r)return;let i=0;for(const s of this._lineVertices(t))r[i++]=s[0],r[i++]=s[1],r[i++]=w;e.invalidateBoundingInfo()}*_lineVertices(e){3===this.extensionType?(yield y(e,-this.fadedExtensions.start,R),yield y(e,0,R),yield y(e,1,R),yield y(e,1+this.fadedExtensions.end,R)):(yield y(e,0,R),yield y(e,1,R))}}function P(e){e.geometries=[]}const G=_(),R=s(),v=s(),M=f(),V=1/3,A={start:V,end:V};export{x as ExtendedLineVisualElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{getTranslation as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{copy as r}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{d as o}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as s,c}from"../../../../chunks/vec42.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{Object3DVisualElement as l}from"./Object3DVisualElement.js";import{Attribute as h}from"../../webgl-engine/lib/Attribute.js";import{Geometry as n}from"../../webgl-engine/lib/Geometry.js";import{CheckerBoardMaterial as d}from"../../webgl-engine/materials/CheckerBoardMaterial.js";class m extends l{constructor(e){super(e),this._checkerBoardMaterial=null,this._renderOccluded=4,this._geometry=null,this._size=t(1,1),this._color1=a(1,.5,0,.5),this._color2=a(1,1,1,.5),this.applyProperties(e)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get geometry(){return this._geometry}set geometry(e){this._geometry=e,this.recreateGeometry()}get size(){return this._size}set size(e){r(this._size,e),this._updateMaterial()}get color1(){return this._color1}set color1(e){s(e,this._color1)||(c(this._color1,e),this._updateMaterial())}get color2(){return this._color2}set color2(e){s(e,this._color2)||(c(this._color2,e),this._updateMaterial())}_updateMaterial(){this._checkerBoardMaterial?.setParameters({size:this._size,color1:this._color1,color2:this._color2,renderOccluded:this._renderOccluded})}createExternalResources(){this._checkerBoardMaterial=new d({size:this._size,color1:this._color1,color2:this._color2,writeDepth:!1,polygonOffset:!0,renderOccluded:4,isDecoration:this.isDecoration})}destroyExternalResources(){this._checkerBoardMaterial=null}forEachMaterial(e){e(this._checkerBoardMaterial)}createGeometries(r){if(null==this._geometry||null==this._checkerBoardMaterial)return;const t=_;e(t,this.transform);const s=this._geometry,c=[],a=i();s.position.forEach(e=>{o(a,e,t),c.push(a[0],a[1],a[2])});const l=[];s.uv.forEach(e=>{l.push(e[0],e[1])});const d=new n(this._checkerBoardMaterial,[["position",new h(c,s.triangleIndices,3,!0)],["uv0",new h(l,s.triangleIndices,2,!0)]]);r.addGeometry(d)}}const _=i();export{m as MeasurementAreaVisualElement};
5
+ import{getTranslation as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{copy as r}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{d as o}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as s,d as c}from"../../../../chunks/vec42.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{Object3DVisualElement as l}from"./Object3DVisualElement.js";import{Attribute as h}from"../../webgl-engine/lib/Attribute.js";import{Geometry as n}from"../../webgl-engine/lib/Geometry.js";import{CheckerBoardMaterial as d}from"../../webgl-engine/materials/CheckerBoardMaterial.js";class m extends l{constructor(e){super(e),this._checkerBoardMaterial=null,this._renderOccluded=4,this._geometry=null,this._size=t(1,1),this._color1=a(1,.5,0,.5),this._color2=a(1,1,1,.5),this.applyProperties(e)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get geometry(){return this._geometry}set geometry(e){this._geometry=e,this.recreateGeometry()}get size(){return this._size}set size(e){r(this._size,e),this._updateMaterial()}get color1(){return this._color1}set color1(e){s(e,this._color1)||(c(this._color1,e),this._updateMaterial())}get color2(){return this._color2}set color2(e){s(e,this._color2)||(c(this._color2,e),this._updateMaterial())}_updateMaterial(){this._checkerBoardMaterial?.setParameters({size:this._size,color1:this._color1,color2:this._color2,renderOccluded:this._renderOccluded})}createExternalResources(){this._checkerBoardMaterial=new d({size:this._size,color1:this._color1,color2:this._color2,writeDepth:!1,polygonOffset:!0,renderOccluded:4,isDecoration:this.isDecoration})}destroyExternalResources(){this._checkerBoardMaterial=null}forEachMaterial(e){e(this._checkerBoardMaterial)}createGeometries(r){if(null==this._geometry||null==this._checkerBoardMaterial)return;const t=_;e(t,this.transform);const s=this._geometry,c=[],a=i();s.position.forEach(e=>{o(a,e,t),c.push(a[0],a[1],a[2])});const l=[];s.uv.forEach(e=>{l.push(e[0],e[1])});const d=new n(this._checkerBoardMaterial,[["position",new h(c,s.triangleIndices,3,!0)],["uv0",new h(l,s.triangleIndices,2,!0)]]);r.addGeometry(d)}}const _=i();export{m as MeasurementAreaVisualElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{colorVectorEquals as t}from"../../../../core/colorUtils.js";import e from"../../../../core/Handles.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{watch as s}from"../../../../core/reactiveUtils.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{c as i,d as a,a as n,h,H as l}from"../../../../chunks/vec32.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{c as d}from"../../../../chunks/vec42.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{sv3d as m}from"../../../../geometry/support/vectorStacks.js";import{Object3DVisualElement as p}from"./Object3DVisualElement.js";import{headingTiltToDirectionUp as g}from"../../support/cameraUtils.js";import{createDirectionUp as u}from"../../support/cameraUtilsInternal.js";import{createPolylineGeometry as w}from"../../webgl-engine/lib/GeometryUtil.js";import{MeasurementArrowMaterial as f}from"../../webgl-engine/materials/MeasurementArrowMaterial.js";class C extends p{constructor(t){super(t),this._arrowWidth=16,this._arrowSubdivisions=128,this._origin=c(),this._originTransform=o(),this._arrowCenter=c(),this._renderOccluded=4,this._geometry=null,this._stripeLength=1,this._stripesEnabled=!0,this._color=_(),this._contrastColor=_(),this.applyProperties(t)}get renderOccluded(){return this._renderOccluded}set renderOccluded(t){t!==this._renderOccluded&&(this._renderOccluded=t,this._arrowMaterial?.setParameters({renderOccluded:t}))}get geometry(){return this._geometry}set geometry(t){this._geometry=t,this._geometryChanged()}get stripeLength(){return this._stripeLength}set stripeLength(t){this._stripeLength=t,this.attached&&this._arrowMaterial.setParameters({stripeLength:this._stripeLength})}get stripesEnabled(){return this._stripesEnabled}set stripesEnabled(t){if(this._stripesEnabled=t,this.attached){const t=this._stripesEnabled?this._contrastColor:this._color;this._arrowMaterial.setParameters({stripeEvenColor:t})}}get color(){return this._color}set color(e){t(e,this._color)||(d(this._color,e),this._updateArrowColor())}get contrastColor(){return this._contrastColor}set contrastColor(e){t(e,this._color)||(d(this._contrastColor,e),this._updateArrowColor())}createExternalResources(){const t=this._color,r=this._contrastColor,o=this._stripesEnabled?r:t;this._arrowMaterial=new f({outlineColor:t,stripeEvenColor:o,stripeOddColor:t,renderOccluded:this.renderOccluded,polygonOffset:!0,isDecoration:this.isDecoration}),this._handles=new e,this._handles.add(s(()=>this.view.state.camera,()=>{this._viewChanged()}))}destroyExternalResources(){this._arrowMaterial=null,this._handles=r(this._handles)}forEachMaterial(t){t(this._arrowMaterial)}createGeometries(t){if(null==this._geometry?.startRenderSpace||null==this._geometry.endRenderSpace)return;const e=this._createArrowGeometry(this._geometry.startRenderSpace,this._geometry.endRenderSpace,this._origin,this._geometry);e.transformation=this._originTransform,t.addGeometry(e),this._viewChanged()}_createArrowGeometry(t,e,r,s){const o=this.view,n=o.renderCoordsHelper,h=[],l=[],c=(t,e)=>{const s=m.get();a(s,t,r),h.push(s),l.push(e)};if("euclidean"===s.type){s.eval(.5,this._arrowCenter);const r=m.get();if(n.worldUpAtPosition(this._arrowCenter,r),y(t,e,r)){const{heading:e,tilt:s}=o.camera,{direction:a}=g(o,t,e,s,b);i(r,a)}c(t,r),c(e,r)}else{s.eval(.5,this._arrowCenter);const t=this._arrowSubdivisions+1&-2;for(let e=0;e<t;++e){const r=e/(t-1),o=m.get(),i=m.get();s.eval(r,o),n.worldUpAtPosition(o,i),c(o,i)}}return w(this._arrowMaterial,h,l)}_geometryChanged(){this.recreateGeometry()}_viewChanged(){if(this.view.ready&&this.attached&&null!=this._geometry){const t=this.view.state.camera.computeScreenPixelSizeAt(this._arrowCenter);this._arrowMaterial.setParameters({width:this._arrowWidth*t})}}_updateArrowColor(){if(!this.attached)return;const t=this._color,e=this._contrastColor,r=this._stripesEnabled?e:t,s=t,o=t;this._arrowMaterial.setParameters({stripeEvenColor:r,outlineColor:s,stripeOddColor:o})}}function y(t,e,r){const s=n(v,e,t),o=h(v,s,r);return 0===l(o)}const v=c(),b=u();export{C as MeasurementArrowVisualElement};
5
+ import{colorVectorEquals as t}from"../../../../core/colorUtils.js";import e from"../../../../core/Handles.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{watch as s}from"../../../../core/reactiveUtils.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{c as i,d as a,a as n,h,H as l}from"../../../../chunks/vec32.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d}from"../../../../chunks/vec42.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{sv3d as m}from"../../../../geometry/support/vectorStacks.js";import{Object3DVisualElement as p}from"./Object3DVisualElement.js";import{headingTiltToDirectionUp as g}from"../../support/cameraUtils.js";import{createDirectionUp as u}from"../../support/cameraUtilsInternal.js";import{createPolylineGeometry as w}from"../../webgl-engine/lib/GeometryUtil.js";import{MeasurementArrowMaterial as f}from"../../webgl-engine/materials/MeasurementArrowMaterial.js";class C extends p{constructor(t){super(t),this._arrowWidth=16,this._arrowSubdivisions=128,this._origin=c(),this._originTransform=o(),this._arrowCenter=c(),this._renderOccluded=4,this._geometry=null,this._stripeLength=1,this._stripesEnabled=!0,this._color=_(),this._contrastColor=_(),this.applyProperties(t)}get renderOccluded(){return this._renderOccluded}set renderOccluded(t){t!==this._renderOccluded&&(this._renderOccluded=t,this._arrowMaterial?.setParameters({renderOccluded:t}))}get geometry(){return this._geometry}set geometry(t){this._geometry=t,this._geometryChanged()}get stripeLength(){return this._stripeLength}set stripeLength(t){this._stripeLength=t,this.attached&&this._arrowMaterial.setParameters({stripeLength:this._stripeLength})}get stripesEnabled(){return this._stripesEnabled}set stripesEnabled(t){if(this._stripesEnabled=t,this.attached){const t=this._stripesEnabled?this._contrastColor:this._color;this._arrowMaterial.setParameters({stripeEvenColor:t})}}get color(){return this._color}set color(e){t(e,this._color)||(d(this._color,e),this._updateArrowColor())}get contrastColor(){return this._contrastColor}set contrastColor(e){t(e,this._color)||(d(this._contrastColor,e),this._updateArrowColor())}createExternalResources(){const t=this._color,r=this._contrastColor,o=this._stripesEnabled?r:t;this._arrowMaterial=new f({outlineColor:t,stripeEvenColor:o,stripeOddColor:t,renderOccluded:this.renderOccluded,polygonOffset:!0,isDecoration:this.isDecoration}),this._handles=new e,this._handles.add(s(()=>this.view.state.camera,()=>{this._viewChanged()}))}destroyExternalResources(){this._arrowMaterial=null,this._handles=r(this._handles)}forEachMaterial(t){t(this._arrowMaterial)}createGeometries(t){if(null==this._geometry?.startRenderSpace||null==this._geometry.endRenderSpace)return;const e=this._createArrowGeometry(this._geometry.startRenderSpace,this._geometry.endRenderSpace,this._origin,this._geometry);e.transformation=this._originTransform,t.addGeometry(e),this._viewChanged()}_createArrowGeometry(t,e,r,s){const o=this.view,n=o.renderCoordsHelper,h=[],l=[],c=(t,e)=>{const s=m.get();a(s,t,r),h.push(s),l.push(e)};if("euclidean"===s.type){s.eval(.5,this._arrowCenter);const r=m.get();if(n.worldUpAtPosition(this._arrowCenter,r),y(t,e,r)){const{heading:e,tilt:s}=o.camera,{direction:a}=g(o,t,e,s,b);i(r,a)}c(t,r),c(e,r)}else{s.eval(.5,this._arrowCenter);const t=this._arrowSubdivisions+1&-2;for(let e=0;e<t;++e){const r=e/(t-1),o=m.get(),i=m.get();s.eval(r,o),n.worldUpAtPosition(o,i),c(o,i)}}return w(this._arrowMaterial,h,l)}_geometryChanged(){this.recreateGeometry()}_viewChanged(){if(this.view.ready&&this.attached&&null!=this._geometry){const t=this.view.state.camera.computeScreenPixelSizeAt(this._arrowCenter);this._arrowMaterial.setParameters({width:this._arrowWidth*t})}}_updateArrowColor(){if(!this.attached)return;const t=this._color,e=this._contrastColor,r=this._stripesEnabled?e:t,s=t,o=t;this._arrowMaterial.setParameters({stripeEvenColor:r,outlineColor:s,stripeOddColor:o})}}function y(t,e,r){const s=n(v,e,t),o=h(v,s,r);return 0===l(o)}const v=c(),b=u();export{C as MeasurementArrowVisualElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{EventEmitter as e}from"../../../../core/Evented.js";import{i as t,f as r,g as i}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as o,c as a}from"../../../../chunks/vec42.js";import{fromValues as n,clone as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{projectBuffer as h}from"../../../../geometry/projection/projectBuffer.js";import{expandWithBuffer as c}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as d}from"../../../../geometry/support/DoubleArray.js";import{makeDehydratedPoint as m}from"../../../../layers/graphics/dehydratedPoint.js";import{getGeometryEffectiveElevationMode as p}from"../../../../support/elevationInfoUtils.js";import u from"../../../../symbols/support/ElevationInfo.js";import{EngineVisualElement as _}from"./EngineVisualElement.js";import{LaserlineVisualElement as f}from"./LaserlineVisualElement.js";import{ElevationContext as g}from"../../layers/graphics/ElevationContext.js";import{createGeometry as y}from"../../support/engineContent/line.js";import{geometryToRenderInfoDraped as O,geometryToRenderInfo as C}from"../../support/renderInfoUtils/line.js";import{RenderGeometry as v}from"../../webgl-engine/lib/RenderGeometry.js";import{RibbonLineMaterial as R}from"../../webgl-engine/materials/RibbonLineMaterial.js";class w extends _{constructor(t){super(t),this._attachmentOrigin=m(0,0,0,null),this._attachmentOriginDirty=!0,this.events=new e,this._geometry=null,this._width=1,this._color=n(1,0,1,1),this._innerWidth=0,this._innerColor=n(1,1,1,1),this._stipplePattern=null,this._stippleOffColor=null,this._falloff=0,this._elevationInfo=null,this._laserlineStyle=null,this._laserlineEnabled=!1,this._renderOccluded=8,this._attachmentOrigin.spatialReference=t.view.spatialReference,this._laserline=new f({view:t.view,isDecoration:t.isDecoration}),this.applyProperties(t),this.attached=t.attached??!0}destroy(){this._laserline.destroy(),super.destroy()}createObject3DResourceFactory(e){return{view:e,createResources:e=>this._createObject3DResources(e),destroyResources:b,recreateGeometry:(e,t)=>{e.geometries.length=0,this._recreateGeometry(t,e.material,e.geometries)},forEachMaterial:(e,t)=>t(e.material)}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:b,recreateGeometry:e=>{e.geometries=this._createRenderGeometriesDraped(e.material),this._attachmentOriginChanged()},forEachMaterial:(e,t)=>t(e.material)}}get _laserlineAttached(){return this.attached&&this.visible&&null!=this._laserlineStyle&&!this.isDraped&&this.laserlineEnabled}onAttachedChange(e){this._laserline.attached=this._laserlineAttached,e&&this._attachmentOriginChanged()}get isDecoration(){return this._isDecoration}set isDecoration(e){this._isDecoration=e,this._updateMaterial()}get geometry(){return this._geometry}set geometry(e){const t=this._isClosed;this._geometry=e,this.recreateGeometry(),t!==this._isClosed&&this._updateMaterial()}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get color(){return this._color}set color(e){o(e,this._color)||(a(this._color,e),this._updateMaterial())}get innerWidth(){return this._innerWidth}set innerWidth(e){e!==this._innerWidth&&(this._innerWidth=e,this._updateMaterial())}get innerColor(){return this._innerColor}set innerColor(e){o(e,this._innerColor)||(a(this._innerColor,e),this._updateMaterial())}get stipplePattern(){return this._stipplePattern}set stipplePattern(e){const t=null!=e!=(null!=this._stipplePattern);this._stipplePattern=e,t?this.recreate():this._updateMaterial()}get stippleOffColor(){return this._stippleOffColor}set stippleOffColor(e){e&&this._stippleOffColor&&o(e,this._stippleOffColor)||(this._stippleOffColor=e?l(e):null,this._updateMaterial())}get falloff(){return this._falloff}set falloff(e){e!==this._falloff&&(this._falloff=e,this._updateMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this.recreateGeometry()}get laserlineStyle(){return this._laserlineStyle}set laserlineStyle(e){this._laserlineStyle=e,this._laserline.attached=this._laserlineAttached,null!=e&&(this._laserline.style=e)}get laserlineEnabled(){return this._laserlineEnabled}set laserlineEnabled(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,this._laserline.attached=this._laserlineAttached)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get attachmentOrigin(){if(!this._attachmentOriginDirty)return this._attachmentOrigin;const e=this.object3dResources.resources?.geometries;if(!e||0===e.length)return null;t(D,0,0,0);let s=0;for(const t of e)t.computeAttachmentOrigin(j)&&(r(D,D,j),s++);return 0===s?null:(i(D,D,1/s),this.view.renderCoordsHelper.fromRenderCoords(D,this._attachmentOrigin),this._attachmentOriginDirty=!1,this._attachmentOrigin)}_updateMaterial(){this.object3dResources.resources?.material.setParameters(this._materialParameters),this.drapedResources.resources?.material.setParameters(this._materialParameters)}get _isClosed(){return null!=this.geometry&&"polygon"===this.geometry.type}get _materialParameters(){return{width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:!1,isClosed:this._isClosed,falloff:this._falloff,innerColor:this._innerColor,innerWidth:this._innerWidth,join:"round",hasPolygonOffset:!0,renderOccluded:this._normalizedRenderOccluded,isDecoration:this.isDecoration}}get _normalizedRenderOccluded(){return this.isDraped&&8===this._renderOccluded?4:this._renderOccluded}_recreateGeometry(e,t,r){this._createRenderGeometries(t,r);for(const i of r)e.addGeometry(i);this._attachmentOriginChanged()}_attachmentOriginChanged(){this._attachmentOriginDirty=!0,this.events.emit("attachment-origin-changed")}_createObject3DResources(e){const t=new R(this._materialParameters),r=new Array;return this._recreateGeometry(e,t,r),{material:t,geometries:r}}_createDrapedResources(){const e=new R(this._materialParameters);return{material:e,geometries:this._createRenderGeometriesDraped(e)}}_createRenderGeometriesDraped(e){const{geometry:t,view:r}=this,i=r.basemapTerrain.spatialReference;if(null==t||null==i)return[];return O(t,i).lines.map(({position:t})=>{const s={overlayInfo:{spatialReference:i,renderCoordsHelper:r.renderCoordsHelper},attributeData:{position:t},removeDuplicateStartEnd:this._isClosed};return new v(y(e,s))})}calculateMapBounds(e){if(null==this.object3dResources.resources)return!1;const t=this.view.renderCoordsHelper;for(const r of this.object3dResources.resources.geometries){const i=r.attributes.get("position"),s=d(i.data.length);h(i.data,t.spatialReference,0,s,this.view.spatialReference,0),c(e,s)}return!0}_createRenderGeometries(e,t){const r=this.geometry;if(null==r)return;const i=C(r,this.view.elevationProvider,this.view.renderCoordsHelper,g.fromElevationInfo(this.elevationInfo??new u({mode:p(r,null)}))),s=new Array;for(const{position:o,mapPositions:a}of i.lines){const r={mapPositions:a,attributeData:{position:o},removeDuplicateStartEnd:this._isClosed};t.push(y(e,r)),s.push(o)}this._laserline.pathVerticalPlane=s}}function b(e){e.geometries=[]}const j=s(),D=s();export{w as OutlineVisualElement};
5
+ import{EventEmitter as e}from"../../../../core/Evented.js";import{i as t,f as r,g as i}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as o,d as a}from"../../../../chunks/vec42.js";import{fromValues as n,clone as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{projectBuffer as h}from"../../../../geometry/projection/projectBuffer.js";import{expandWithBuffer as c}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as d}from"../../../../geometry/support/DoubleArray.js";import{makeDehydratedPoint as m}from"../../../../layers/graphics/dehydratedPoint.js";import{getGeometryEffectiveElevationMode as p}from"../../../../support/elevationInfoUtils.js";import u from"../../../../symbols/support/ElevationInfo.js";import{EngineVisualElement as _}from"./EngineVisualElement.js";import{LaserlineVisualElement as f}from"./LaserlineVisualElement.js";import{ElevationContext as g}from"../../layers/graphics/ElevationContext.js";import{createGeometry as y}from"../../support/engineContent/line.js";import{geometryToRenderInfoDraped as O,geometryToRenderInfo as C}from"../../support/renderInfoUtils/line.js";import{RenderGeometry as v}from"../../webgl-engine/lib/RenderGeometry.js";import{RibbonLineMaterial as R}from"../../webgl-engine/materials/RibbonLineMaterial.js";class w extends _{constructor(t){super(t),this._attachmentOrigin=m(0,0,0,null),this._attachmentOriginDirty=!0,this.events=new e,this._geometry=null,this._width=1,this._color=n(1,0,1,1),this._innerWidth=0,this._innerColor=n(1,1,1,1),this._stipplePattern=null,this._stippleOffColor=null,this._falloff=0,this._elevationInfo=null,this._laserlineStyle=null,this._laserlineEnabled=!1,this._renderOccluded=8,this._attachmentOrigin.spatialReference=t.view.spatialReference,this._laserline=new f({view:t.view,isDecoration:t.isDecoration}),this.applyProperties(t),this.attached=t.attached??!0}destroy(){this._laserline.destroy(),super.destroy()}createObject3DResourceFactory(e){return{view:e,createResources:e=>this._createObject3DResources(e),destroyResources:b,recreateGeometry:(e,t)=>{e.geometries.length=0,this._recreateGeometry(t,e.material,e.geometries)},forEachMaterial:(e,t)=>t(e.material)}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:b,recreateGeometry:e=>{e.geometries=this._createRenderGeometriesDraped(e.material),this._attachmentOriginChanged()},forEachMaterial:(e,t)=>t(e.material)}}get _laserlineAttached(){return this.attached&&this.visible&&null!=this._laserlineStyle&&!this.isDraped&&this.laserlineEnabled}onAttachedChange(e){this._laserline.attached=this._laserlineAttached,e&&this._attachmentOriginChanged()}get isDecoration(){return this._isDecoration}set isDecoration(e){this._isDecoration=e,this._updateMaterial()}get geometry(){return this._geometry}set geometry(e){const t=this._isClosed;this._geometry=e,this.recreateGeometry(),t!==this._isClosed&&this._updateMaterial()}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get color(){return this._color}set color(e){o(e,this._color)||(a(this._color,e),this._updateMaterial())}get innerWidth(){return this._innerWidth}set innerWidth(e){e!==this._innerWidth&&(this._innerWidth=e,this._updateMaterial())}get innerColor(){return this._innerColor}set innerColor(e){o(e,this._innerColor)||(a(this._innerColor,e),this._updateMaterial())}get stipplePattern(){return this._stipplePattern}set stipplePattern(e){const t=null!=e!=(null!=this._stipplePattern);this._stipplePattern=e,t?this.recreate():this._updateMaterial()}get stippleOffColor(){return this._stippleOffColor}set stippleOffColor(e){e&&this._stippleOffColor&&o(e,this._stippleOffColor)||(this._stippleOffColor=e?l(e):null,this._updateMaterial())}get falloff(){return this._falloff}set falloff(e){e!==this._falloff&&(this._falloff=e,this._updateMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this.recreateGeometry()}get laserlineStyle(){return this._laserlineStyle}set laserlineStyle(e){this._laserlineStyle=e,this._laserline.attached=this._laserlineAttached,null!=e&&(this._laserline.style=e)}get laserlineEnabled(){return this._laserlineEnabled}set laserlineEnabled(e){this._laserlineEnabled!==e&&(this._laserlineEnabled=e,this._laserline.attached=this._laserlineAttached)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get attachmentOrigin(){if(!this._attachmentOriginDirty)return this._attachmentOrigin;const e=this.object3dResources.resources?.geometries;if(!e||0===e.length)return null;t(D,0,0,0);let s=0;for(const t of e)t.computeAttachmentOrigin(j)&&(r(D,D,j),s++);return 0===s?null:(i(D,D,1/s),this.view.renderCoordsHelper.fromRenderCoords(D,this._attachmentOrigin),this._attachmentOriginDirty=!1,this._attachmentOrigin)}_updateMaterial(){this.object3dResources.resources?.material.setParameters(this._materialParameters),this.drapedResources.resources?.material.setParameters(this._materialParameters)}get _isClosed(){return null!=this.geometry&&"polygon"===this.geometry.type}get _materialParameters(){return{width:this._width,color:this._color,stippleOffColor:this._stippleOffColor,stipplePattern:this._stipplePattern,stipplePreferContinuous:!1,isClosed:this._isClosed,falloff:this._falloff,innerColor:this._innerColor,innerWidth:this._innerWidth,join:"round",hasPolygonOffset:!0,renderOccluded:this._normalizedRenderOccluded,isDecoration:this.isDecoration}}get _normalizedRenderOccluded(){return this.isDraped&&8===this._renderOccluded?4:this._renderOccluded}_recreateGeometry(e,t,r){this._createRenderGeometries(t,r);for(const i of r)e.addGeometry(i);this._attachmentOriginChanged()}_attachmentOriginChanged(){this._attachmentOriginDirty=!0,this.events.emit("attachment-origin-changed")}_createObject3DResources(e){const t=new R(this._materialParameters),r=new Array;return this._recreateGeometry(e,t,r),{material:t,geometries:r}}_createDrapedResources(){const e=new R(this._materialParameters);return{material:e,geometries:this._createRenderGeometriesDraped(e)}}_createRenderGeometriesDraped(e){const{geometry:t,view:r}=this,i=r.basemapTerrain.spatialReference;if(null==t||null==i)return[];return O(t,i).lines.map(({position:t})=>{const s={overlayInfo:{spatialReference:i,renderCoordsHelper:r.renderCoordsHelper},attributeData:{position:t},removeDuplicateStartEnd:this._isClosed};return new v(y(e,s))})}calculateMapBounds(e){if(null==this.object3dResources.resources)return!1;const t=this.view.renderCoordsHelper;for(const r of this.object3dResources.resources.geometries){const i=r.attributes.get("position"),s=d(i.data.length);h(i.data,t.spatialReference,0,s,this.view.spatialReference,0),c(e,s)}return!0}_createRenderGeometries(e,t){const r=this.geometry;if(null==r)return;const i=C(r,this.view.elevationProvider,this.view.renderCoordsHelper,g.fromElevationInfo(this.elevationInfo??new u({mode:p(r,null)}))),s=new Array;for(const{position:o,mapPositions:a}of i.lines){const r={mapPositions:a,attributeData:{position:o},removeDuplicateStartEnd:this._isClosed};t.push(y(e,r)),s.push(o)}this._laserline.pathVerticalPlane=s}}function b(e){e.geometries=[]}const j=s(),D=s();export{w as OutlineVisualElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{watch as e}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as t,castScreenPointArray as r}from"../../../../core/screenUtils.js";import{normalize as i,subtract as s,scale as o,set as a,add as c}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{q as d,c as h,n as l,d as m,f as u}from"../../../../chunks/vec32.js";import{create as p,fromValues as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as f,c as g}from"../../../../chunks/vec42.js";import{fromValues as b}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeDehydratedPoint as y}from"../../../../layers/graphics/dehydratedPoint.js";import{EngineVisualElement as j}from"./EngineVisualElement.js";import{drapedZ as D}from"../../terrain/OverlayRenderer.js";import{createPolylineGeometry as G}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderGeometry as R}from"../../webgl-engine/lib/RenderGeometry.js";import{RibbonLineMaterial as w}from"../../webgl-engine/materials/RibbonLineMaterial.js";class O extends j{constructor(e){super(e),this._location=p(),this._direction=_(1,0,0),this._width=1,this._offset=1,this._length=18,this._color=b(1,0,1,1),this._renderOccluded=4,this.applyProperties(e)}createObject3DResourceFactory(e){return{view:e,createResources:e=>this._createObject3DResources(e),destroyResources:V,recreateGeometry:(e,t)=>this._recreateObject3DGeometry(e,t),cameraChanged:()=>this._updateGeometry(),forEachMaterial:(e,t)=>t(e.material)}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:M,recreateGeometry:e=>this._recreateDrapedGeometry(e),forEachMaterial:(e,t)=>t(e.material)}}get location(){return this._location}set location(e){d(this._location,e)||(h(this._location,e),this._updateGeometry())}get direction(){return this._direction}set direction(e){d(this._direction,e)||(h(this._direction,e),this._updateGeometry())}setDirectionFromPoints(e,t){l(this._direction,m(this._direction,t,e)),this._updateGeometry()}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get offset(){return this._offset}set offset(e){e!==this._offset&&(this._offset=e,this._updateGeometry())}get length(){return this._length}set length(e){e!==this._length&&(this._length=e,this._updateGeometry())}get color(){return this._color}set color(e){f(e,this._color)||(g(this._color,e),this._updateMaterial())}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get isDecoration(){return this._isDecoration}set isDecoration(e){this._isDecoration=e,this._updateMaterial()}_createObject3DResources(e){const t=new w(this.materialParameters),r=new Array;return this._createObject3DGeometry(t,e,r),{material:t,geometries:r}}_recreateObject3DGeometry(e,t){e.geometries.length=0,this._createObject3DGeometry(e.material,t,e.geometries)}_createObject3DGeometry(e,t,r){const[i,s]=v(e);t.addGeometry(i),t.addGeometry(s),r.push(i),r.push(s),this._updateVerticesObject3D(t)}_createDrapedResources(){const t=new w(this.materialParameters),r=e(()=>this.view.state.contentPixelRatio,()=>this.drapedResources.recreateGeometry());return{material:t,geometries:this._createDrapedGeometry(t),pixelRatioHandle:r}}_recreateDrapedGeometry(e){e.geometries=this._createDrapedGeometry(e.material)}_createDrapedGeometry(e){const t=v(e);return this._updateVerticesDraped(t),t.map(e=>new R(e))}_updateMaterial(){const{materialParameters:e}=this;this.object3dResources.resources?.material.setParameters(e),this.drapedResources.resources?.material.setParameters(e)}get materialParameters(){return{width:this._width,color:this._color,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateGeometry(){if(this.isDraped)this.drapedResources.recreateGeometry();else{const e=this.object3dResources.object;e&&this._updateVerticesObject3D(e)}}_updateVerticesObject3D(e){const t=this.view.state.camera;t.projectToScreen(this.location,U),u(P,this.location,this.direction),t.projectToScreen(P,E),i(E,s(E,E,U)),this._updateVertexAttributesObject3D(t,e,0,U,E,1),this._updateVertexAttributesObject3D(t,e,1,U,E,-1)}_updateVertexAttributesObject3D(e,t,i,s,o,a){const c=t.geometries[i],n=c.getMutableAttribute("position")?.data;if(!n)return;const{start:d,end:h}=x(o,s,a,this.offset,this.width,this.length);e.unprojectFromScreen(r(d),P),n[0]=P[0],n[1]=P[1],n[2]=P[2],e.unprojectFromScreen(r(h),P),n[3]=P[0],n[4]=P[1],n[5]=P[2],t.geometryVertexAttributeUpdated(c,"position")}_updateVerticesDraped(e){const{view:{basemapTerrain:{overlayManager:t},state:{contentPixelRatio:r}}}=this,{location:i,width:s,length:o,offset:a}=this,c=T;c.spatialReference=t.renderer.spatialReference,c.x=i[0],c.y=i[1];const n=this.view.overlayPixelSizeInMapUnits(c)*r,d=s*n,h=o*n,l=a*n;this._updateVertexAttributesDraped(e[0],d,h,l,-1),this._updateVertexAttributesDraped(e[1],d,h,l,1)}_updateVertexAttributesDraped(e,t,r,i,s){const o=e.getMutableAttribute("position")?.data;if(!o)return;const{location:a,direction:c}=this,{start:n,end:d}=x(c,a,s,i,t,r);o[0]=n[0],o[1]=n[1],o[2]=D,o[3]=d[0],o[4]=d[1],o[5]=D,e.invalidateBoundingInfo()}}function v(e){return[G(e,[p(),p()]),G(e,[p(),p()])]}function x(e,t,r,i,s,n){const d=o(A,a(A,e[1]*r,e[0]*-r),i+s/2),h=c(F,c(F,c(F,t,o(F,e,n/2)),d),d);return{start:h,end:c(S,h,o(S,e,-n))}}function V(e){e.geometries.length=0}function M(e){e.pixelRatioHandle.remove(),e.geometries=[]}const P=p(),A=n(),F=n(),S=n(),U=t(),E=t(),T=y(0,0,void 0,null);export{O as ParallelLineVisualElement};
5
+ import{watch as e}from"../../../../core/reactiveUtils.js";import{createScreenPointArray as t,castScreenPointArray as r}from"../../../../core/screenUtils.js";import{normalize as i,subtract as s,scale as o,set as a,add as c}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{q as d,c as h,n as l,d as m,f as u}from"../../../../chunks/vec32.js";import{create as p,fromValues as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as f,d as g}from"../../../../chunks/vec42.js";import{fromValues as b}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeDehydratedPoint as y}from"../../../../layers/graphics/dehydratedPoint.js";import{EngineVisualElement as j}from"./EngineVisualElement.js";import{drapedZ as D}from"../../terrain/OverlayRenderer.js";import{createPolylineGeometry as G}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderGeometry as R}from"../../webgl-engine/lib/RenderGeometry.js";import{RibbonLineMaterial as w}from"../../webgl-engine/materials/RibbonLineMaterial.js";class O extends j{constructor(e){super(e),this._location=p(),this._direction=_(1,0,0),this._width=1,this._offset=1,this._length=18,this._color=b(1,0,1,1),this._renderOccluded=4,this.applyProperties(e)}createObject3DResourceFactory(e){return{view:e,createResources:e=>this._createObject3DResources(e),destroyResources:V,recreateGeometry:(e,t)=>this._recreateObject3DGeometry(e,t),cameraChanged:()=>this._updateGeometry(),forEachMaterial:(e,t)=>t(e.material)}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:M,recreateGeometry:e=>this._recreateDrapedGeometry(e),forEachMaterial:(e,t)=>t(e.material)}}get location(){return this._location}set location(e){d(this._location,e)||(h(this._location,e),this._updateGeometry())}get direction(){return this._direction}set direction(e){d(this._direction,e)||(h(this._direction,e),this._updateGeometry())}setDirectionFromPoints(e,t){l(this._direction,m(this._direction,t,e)),this._updateGeometry()}get width(){return this._width}set width(e){e!==this._width&&(this._width=e,this._updateMaterial())}get offset(){return this._offset}set offset(e){e!==this._offset&&(this._offset=e,this._updateGeometry())}get length(){return this._length}set length(e){e!==this._length&&(this._length=e,this._updateGeometry())}get color(){return this._color}set color(e){f(e,this._color)||(g(this._color,e),this._updateMaterial())}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial())}get isDecoration(){return this._isDecoration}set isDecoration(e){this._isDecoration=e,this._updateMaterial()}_createObject3DResources(e){const t=new w(this.materialParameters),r=new Array;return this._createObject3DGeometry(t,e,r),{material:t,geometries:r}}_recreateObject3DGeometry(e,t){e.geometries.length=0,this._createObject3DGeometry(e.material,t,e.geometries)}_createObject3DGeometry(e,t,r){const[i,s]=v(e);t.addGeometry(i),t.addGeometry(s),r.push(i),r.push(s),this._updateVerticesObject3D(t)}_createDrapedResources(){const t=new w(this.materialParameters),r=e(()=>this.view.state.contentPixelRatio,()=>this.drapedResources.recreateGeometry());return{material:t,geometries:this._createDrapedGeometry(t),pixelRatioHandle:r}}_recreateDrapedGeometry(e){e.geometries=this._createDrapedGeometry(e.material)}_createDrapedGeometry(e){const t=v(e);return this._updateVerticesDraped(t),t.map(e=>new R(e))}_updateMaterial(){const{materialParameters:e}=this;this.object3dResources.resources?.material.setParameters(e),this.drapedResources.resources?.material.setParameters(e)}get materialParameters(){return{width:this._width,color:this._color,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateGeometry(){if(this.isDraped)this.drapedResources.recreateGeometry();else{const e=this.object3dResources.object;e&&this._updateVerticesObject3D(e)}}_updateVerticesObject3D(e){const t=this.view.state.camera;t.projectToScreen(this.location,U),u(P,this.location,this.direction),t.projectToScreen(P,E),i(E,s(E,E,U)),this._updateVertexAttributesObject3D(t,e,0,U,E,1),this._updateVertexAttributesObject3D(t,e,1,U,E,-1)}_updateVertexAttributesObject3D(e,t,i,s,o,a){const c=t.geometries[i],n=c.getMutableAttribute("position")?.data;if(!n)return;const{start:d,end:h}=x(o,s,a,this.offset,this.width,this.length);e.unprojectFromScreen(r(d),P),n[0]=P[0],n[1]=P[1],n[2]=P[2],e.unprojectFromScreen(r(h),P),n[3]=P[0],n[4]=P[1],n[5]=P[2],t.geometryVertexAttributeUpdated(c,"position")}_updateVerticesDraped(e){const{view:{basemapTerrain:{overlayManager:t},state:{contentPixelRatio:r}}}=this,{location:i,width:s,length:o,offset:a}=this,c=T;c.spatialReference=t.renderer.spatialReference,c.x=i[0],c.y=i[1];const n=this.view.overlayPixelSizeInMapUnits(c)*r,d=s*n,h=o*n,l=a*n;this._updateVertexAttributesDraped(e[0],d,h,l,-1),this._updateVertexAttributesDraped(e[1],d,h,l,1)}_updateVertexAttributesDraped(e,t,r,i,s){const o=e.getMutableAttribute("position")?.data;if(!o)return;const{location:a,direction:c}=this,{start:n,end:d}=x(c,a,s,i,t,r);o[0]=n[0],o[1]=n[1],o[2]=D,o[3]=d[0],o[4]=d[1],o[5]=D,e.invalidateBoundingInfo()}}function v(e){return[G(e,[p(),p()]),G(e,[p(),p()])]}function x(e,t,r,i,s,n){const d=o(A,a(A,e[1]*r,e[0]*-r),i+s/2),h=c(F,c(F,c(F,t,o(F,e,n/2)),d),d);return{start:h,end:c(S,h,o(S,e,-n))}}function V(e){e.geometries.length=0}function M(e){e.pixelRatioHandle.remove(),e.geometries=[]}const P=p(),A=n(),F=n(),S=n(),U=t(),E=t(),T=y(0,0,void 0,null);export{O as ParallelLineVisualElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as e}from"../../../../core/mathUtils.js";import{i as t}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as r,c as s}from"../../../../chunks/vec42.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{projectVectorToVector as n}from"../../../../geometry/projection/projectVectorToVector.js";import{expandWithBuffer as a}from"../../../../geometry/support/aaBoundingBox.js";import{sv3d as l}from"../../../../geometry/support/vectorStacks.js";import{Object3DVisualElement as u}from"./Object3DVisualElement.js";import{evaluateElevationAlignmentAtPoint as h}from"../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as p}from"../../layers/graphics/ElevationContext.js";import{defaultBoundingBox as m,requiresHalfTexelOffset as c,defaultSymbolSizeRatio as _,createTexture as g}from"../../support/engineContent/sdfPrimitives.js";import{createPointGeometry as d}from"../../webgl-engine/lib/GeometryUtil.js";import{HUDMaterial as f}from"../../webgl-engine/materials/HUDMaterial.js";class x extends u{constructor(e){super(e),this._material=null,this._texture=null,this._geometry=null,this._size=3,this._color=o(1,0,1,1),this._pixelSnappingEnabled=!0,this._primitive="square",this._outlineSize=1,this._outlineColor=o(1,1,1,1),this._elevationInfo=null,this.applyProperties(e)}get geometry(){return this._geometry}set geometry(e){this._geometry=e,this.recreateGeometry()}get size(){return this._size}set size(e){if(e!==this._size){const t=this._preferredTextureSize;this._size=e,t<this._preferredTextureSize?this.recreate():this._updateSizeAttribute()}}get color(){return this._color}set color(e){r(e,this._color)||(s(this._color,e),this._updateMaterial())}get pixelSnappingEnabled(){return this._pixelSnappingEnabled}set pixelSnappingEnabled(e){this._pixelSnappingEnabled!==e&&(this._pixelSnappingEnabled=e,this._updateMaterial())}get primitive(){return this._primitive}set primitive(e){this._primitive!==e&&(this._primitive=e,this.recreate())}get outlineSize(){return this._outlineSize}set outlineSize(e){e!==this._outlineSize&&(this._outlineSize=e,this._updateMaterial())}get outlineColor(){return this._outlineColor}set outlineColor(e){r(e,this._outlineColor)||(s(this._outlineColor,e),this._updateMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this.recreateGeometry()}_updateMaterial(){this._material?.setParameters(this._materialParameters)}_updateSizeAttribute(){const e=this.object;if(null==e)return;const t=e.geometries[0];if(null==t)return;const i=t.getMutableAttribute("size").data,r=this._geometrySize;i[0]=r,i[1]=r,e.geometryVertexAttributeUpdated(e.geometries[0],"size")}get _materialParameters(){return{color:this._color,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:c(this._primitive),distanceFieldBoundingBox:m,occlusionTest:!1,outlineColor:this._outlineColor,outlineSize:this._outlineSize,textureId:this._texture?.id,polygonOffset:!1,shaderPolygonOffset:0,drawAsLabel:!0,depthEnabled:!1,pixelSnappingEnabled:this.pixelSnappingEnabled,isDecoration:this.isDecoration}}get _geometrySize(){return this._size/_}createExternalResources(){this._texture=g(this._primitive,this._preferredTextureSize),this._material=new f(this._materialParameters,1===this.view.state.viewingMode);const e=this.view.stage;this._texture.load(e.renderView.renderingContext),e.addTexture(this._texture)}destroyExternalResources(){if(this._texture){this.view.stage.removeTexture(this._texture),this._texture.dispose(),this._texture=null}this._material=null}createGeometries(e){const t=this._createRenderGeometry();null!=t&&e.addGeometry(t)}forEachMaterial(e){e(this._material)}get _preferredTextureSize(){return e(2*this._geometrySize,16,128)}calculateMapBounds(e){const t=this.object?.geometries[0];if(!t)return!1;const i=t.attributes.get("position").data;return n(i,this.view.renderCoordsHelper.spatialReference,v,this.view.spatialReference),a(e,v),!0}_createRenderGeometry(){const{geometry:e,_material:i}=this;if(null==e||null==i)return null;const{renderCoordsHelper:r,elevationProvider:s}=this.view,o=h(e,s,p.fromElevationInfo(this.elevationInfo),r),a=t(l.get(),e.x,e.y,o),u=l.get();n(a,e.spatialReference,u,r.spatialReference);const m=this._geometrySize;return d(i,{position:u,size:[m,m],centerOffsetAndDistance:[0,0,0,1]})}}const v=i();export{x as PointVisualElement};
5
+ import{clamp as e}from"../../../../core/mathUtils.js";import{i as t}from"../../../../chunks/vec32.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as r,d as s}from"../../../../chunks/vec42.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{projectVectorToVector as n}from"../../../../geometry/projection/projectVectorToVector.js";import{expandWithBuffer as a}from"../../../../geometry/support/aaBoundingBox.js";import{sv3d as l}from"../../../../geometry/support/vectorStacks.js";import{Object3DVisualElement as u}from"./Object3DVisualElement.js";import{evaluateElevationAlignmentAtPoint as h}from"../../layers/graphics/elevationAlignmentUtils.js";import{ElevationContext as p}from"../../layers/graphics/ElevationContext.js";import{defaultBoundingBox as m,requiresHalfTexelOffset as c,defaultSymbolSizeRatio as _,createTexture as g}from"../../support/engineContent/sdfPrimitives.js";import{createPointGeometry as d}from"../../webgl-engine/lib/GeometryUtil.js";import{HUDMaterial as f}from"../../webgl-engine/materials/HUDMaterial.js";class x extends u{constructor(e){super(e),this._material=null,this._texture=null,this._geometry=null,this._size=3,this._color=o(1,0,1,1),this._pixelSnappingEnabled=!0,this._primitive="square",this._outlineSize=1,this._outlineColor=o(1,1,1,1),this._elevationInfo=null,this.applyProperties(e)}get geometry(){return this._geometry}set geometry(e){this._geometry=e,this.recreateGeometry()}get size(){return this._size}set size(e){if(e!==this._size){const t=this._preferredTextureSize;this._size=e,t<this._preferredTextureSize?this.recreate():this._updateSizeAttribute()}}get color(){return this._color}set color(e){r(e,this._color)||(s(this._color,e),this._updateMaterial())}get pixelSnappingEnabled(){return this._pixelSnappingEnabled}set pixelSnappingEnabled(e){this._pixelSnappingEnabled!==e&&(this._pixelSnappingEnabled=e,this._updateMaterial())}get primitive(){return this._primitive}set primitive(e){this._primitive!==e&&(this._primitive=e,this.recreate())}get outlineSize(){return this._outlineSize}set outlineSize(e){e!==this._outlineSize&&(this._outlineSize=e,this._updateMaterial())}get outlineColor(){return this._outlineColor}set outlineColor(e){r(e,this._outlineColor)||(s(this._outlineColor,e),this._updateMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this.recreateGeometry()}_updateMaterial(){this._material?.setParameters(this._materialParameters)}_updateSizeAttribute(){const e=this.object;if(null==e)return;const t=e.geometries[0];if(null==t)return;const i=t.getMutableAttribute("size").data,r=this._geometrySize;i[0]=r,i[1]=r,e.geometryVertexAttributeUpdated(e.geometries[0],"size")}get _materialParameters(){return{color:this._color,textureIsSignedDistanceField:!0,sampleSignedDistanceFieldTexelCenter:c(this._primitive),distanceFieldBoundingBox:m,occlusionTest:!1,outlineColor:this._outlineColor,outlineSize:this._outlineSize,textureId:this._texture?.id,polygonOffset:!1,shaderPolygonOffset:0,drawAsLabel:!0,depthEnabled:!1,pixelSnappingEnabled:this.pixelSnappingEnabled,isDecoration:this.isDecoration}}get _geometrySize(){return this._size/_}createExternalResources(){this._texture=g(this._primitive,this._preferredTextureSize),this._material=new f(this._materialParameters,1===this.view.state.viewingMode);const e=this.view.stage;this._texture.load(e.renderView.renderingContext),e.addTexture(this._texture)}destroyExternalResources(){if(this._texture){this.view.stage.removeTexture(this._texture),this._texture.dispose(),this._texture=null}this._material=null}createGeometries(e){const t=this._createRenderGeometry();null!=t&&e.addGeometry(t)}forEachMaterial(e){e(this._material)}get _preferredTextureSize(){return e(2*this._geometrySize,16,128)}calculateMapBounds(e){const t=this.object?.geometries[0];if(!t)return!1;const i=t.attributes.get("position").data;return n(i,this.view.renderCoordsHelper.spatialReference,v,this.view.spatialReference),a(e,v),!0}_createRenderGeometry(){const{geometry:e,_material:i}=this;if(null==e||null==i)return null;const{renderCoordsHelper:r,elevationProvider:s}=this.view,o=h(e,s,p.fromElevationInfo(this.elevationInfo),r),a=t(l.get(),e.x,e.y,o),u=l.get();n(a,e.spatialReference,u,r.spatialReference);const m=this._geometrySize;return d(i,{position:u,size:[m,m],centerOffsetAndDistance:[0,0,0,1]})}}const v=i();export{x as PointVisualElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{watch as e}from"../../../../core/reactiveUtils.js";import{fromTranslation as t,scale as r}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{j as s,n as a,d as o,c as n,q as c,f as l}from"../../../../chunks/vec32.js";import{create as u,ZEROS as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{c as d}from"../../../../chunks/vec42.js";import{fromValues as m}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{sv3d as _}from"../../../../geometry/support/vectorStacks.js";import{makeDehydratedPoint as p}from"../../../../layers/graphics/dehydratedPoint.js";import{EngineVisualElement as f}from"./EngineVisualElement.js";import{drapedZ as g}from"../../terrain/OverlayRenderer.js";import{Attribute as M}from"../../webgl-engine/lib/Attribute.js";import{Geometry as R}from"../../webgl-engine/lib/Geometry.js";import{createPolylineGeometry as b}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderGeometry as j}from"../../webgl-engine/lib/RenderGeometry.js";import{ColorMaterial as O}from"../../webgl-engine/materials/ColorMaterial.js";import{RibbonLineMaterial as D}from"../../webgl-engine/materials/RibbonLineMaterial.js";class z extends f{constructor(e){super(e),this._maxSize=0,this._position=u(),this._up=u(),this._right=u(),this._renderOccluded=4,this._color=m(1,0,0,1),this._outlineColor=m(0,0,0,1),this._outlineSize=0,this._size=32,this._outlineRenderOccluded=16,this.applyProperties(e)}createObject3DResourceFactory(e){return{view:e,createResources:e=>this._createObject3DResources(e),destroyResources:()=>{},cameraChanged:()=>this._updateTransformObject3D(),forEachMaterial:(e,t)=>{t(e.outlineMaterial),t(e.quadMaterial)}}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:y,forEachMaterial:(e,t)=>{t(e.outlineMaterial),t(e.quadMaterial)}}}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateQuadMaterial())}get isDecoration(){return this._isDecoration}set isDecoration(e){this._isDecoration=e,this._updateOutlineMaterial(),this._updateQuadMaterial()}get color(){return this._color}set color(e){d(this._color,e),this._updateQuadMaterial()}get outlineColor(){return this._outlineColor}set outlineColor(e){d(this._outlineColor,e),this._updateOutlineMaterial()}get outlineSize(){return this._outlineSize}set outlineSize(e){const t=0===this._outlineSize!=(0===e);this._outlineSize=e,t?this.recreateGeometry():this._updateOutlineMaterial()}get size(){return this._size}set size(e){e!==this._size&&(this._size=e,this._updateTransform())}get outlineRenderOccluded(){return this._outlineRenderOccluded}set outlineRenderOccluded(e){this._outlineRenderOccluded=e,this._updateOutlineMaterial()}set geometry({previous:e,center:t,next:r}){this._maxSize=Math.min(s(t,e),s(t,r))/3,a(this._up,o(this._up,e,t)),a(this._right,o(this._right,r,t)),n(this._position,t),this.recreateGeometry()}_createObject3DResources(e){const t=new O(this._quadMaterialParameters),r=0===this._outlineSize?void 0:new D(this._outlineMaterialParameters);return this._createObject3DGeometries(e,t,r),{quadMaterial:t,outlineMaterial:r}}_createObject3DGeometries(e,t,r){if(c(this._up,h)&&c(this._right,h))return;const i=this._createGeometries(t,r);for(const s of i)e.addGeometry(s);this._updateTransformObject3D(e)}_createDrapedResources(){const t=new O(this._quadMaterialParameters),r=0===this._outlineSize?void 0:new D(this._outlineMaterialParameters),i=this._createGeometries(t,r).map(e=>new j(e));this._setTransformDraped(i);return{quadMaterial:t,outlineMaterial:r,geometries:i,pixelRatioHandle:e(()=>this.view.state.contentPixelRatio,()=>this.drapedResources.recreateGeometry())}}_createGeometries(e,t){const{up:r,right:i,corner:s}=this._getVertices(),a=w(r,i,s,e);if(!t)return[a];return[a,b(t,[r,s,i])]}_getVertices(){let e=this._up,t=this._right;const r=l(_.get(),e,t);return this.isDraped&&(e=n(_.get(),e),t=n(_.get(),t),e[2]=0,t[2]=0,r[2]=0),{up:e,right:t,corner:r}}_updateTransform(){this.isDraped?this.drapedResources.recreateGeometry():this._updateTransformObject3D()}_updateTransformObject3D(e=this.object3dResources.object){if(!e)return;const i=this.view.state.camera,s=this._size*i.computeScreenPixelSizeAt(this._position),a=Math.min(this._maxSize,s);t(v,this._position),r(v,v,[a,a,a]),e.transformation=v}_setTransformDraped(e){if(0===e.length)return;const{view:{basemapTerrain:{overlayManager:i},state:{contentPixelRatio:s}}}=this,{_position:a,_size:o}=this,c=n(_.get(),a);c[2]=g;const l=P;l.spatialReference=i.renderer.spatialReference,l.x=c[0],l.y=c[1];const u=o*(this.view.overlayPixelSizeInMapUnits(l)*s),h=Math.min(this._maxSize,u);t(v,c),r(v,v,[h,h,1]);for(const t of e)t.transformation=v}get _quadMaterialParameters(){return{color:this._color,forceTransparentMode:!0,writeDepth:!1,polygonOffset:!0,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateQuadMaterial(){this.object3dResources.resources?.quadMaterial.setParameters(this._quadMaterialParameters),this.drapedResources.resources?.quadMaterial.setParameters(this._quadMaterialParameters)}get _outlineMaterialParameters(){return{color:this._outlineColor,width:this._outlineSize,renderOccluded:this._outlineRenderOccluded,isDecoration:this.isDecoration}}_updateOutlineMaterial(){this.object3dResources.resources?.outlineMaterial?.setParameters(this._outlineMaterialParameters),this.drapedResources.resources?.outlineMaterial?.setParameters(this._outlineMaterialParameters)}}function y(e){e.pixelRatioHandle.remove(),e.geometries=[]}function w(e,t,r,i){return new R(i,[["position",new M([0,0,0,...t,...e,...r],[0,1,2,1,2,3],3,!0)]])}const v=i(),P=p(0,0,void 0,null);export{z as RightAngleQuadVisualElement};
5
+ import{watch as e}from"../../../../core/reactiveUtils.js";import{fromTranslation as t,scale as r}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{j as s,n as a,d as o,c as n,q as c,f as l}from"../../../../chunks/vec32.js";import{create as u,ZEROS as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{d}from"../../../../chunks/vec42.js";import{fromValues as m}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{sv3d as _}from"../../../../geometry/support/vectorStacks.js";import{makeDehydratedPoint as p}from"../../../../layers/graphics/dehydratedPoint.js";import{EngineVisualElement as f}from"./EngineVisualElement.js";import{drapedZ as g}from"../../terrain/OverlayRenderer.js";import{Attribute as M}from"../../webgl-engine/lib/Attribute.js";import{Geometry as R}from"../../webgl-engine/lib/Geometry.js";import{createPolylineGeometry as b}from"../../webgl-engine/lib/GeometryUtil.js";import{RenderGeometry as j}from"../../webgl-engine/lib/RenderGeometry.js";import{ColorMaterial as O}from"../../webgl-engine/materials/ColorMaterial.js";import{RibbonLineMaterial as D}from"../../webgl-engine/materials/RibbonLineMaterial.js";class z extends f{constructor(e){super(e),this._maxSize=0,this._position=u(),this._up=u(),this._right=u(),this._renderOccluded=4,this._color=m(1,0,0,1),this._outlineColor=m(0,0,0,1),this._outlineSize=0,this._size=32,this._outlineRenderOccluded=16,this.applyProperties(e)}createObject3DResourceFactory(e){return{view:e,createResources:e=>this._createObject3DResources(e),destroyResources:()=>{},cameraChanged:()=>this._updateTransformObject3D(),forEachMaterial:(e,t)=>{t(e.outlineMaterial),t(e.quadMaterial)}}}createDrapedResourceFactory(e){return{view:e,createResources:()=>this._createDrapedResources(),destroyResources:y,forEachMaterial:(e,t)=>{t(e.outlineMaterial),t(e.quadMaterial)}}}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateQuadMaterial())}get isDecoration(){return this._isDecoration}set isDecoration(e){this._isDecoration=e,this._updateOutlineMaterial(),this._updateQuadMaterial()}get color(){return this._color}set color(e){d(this._color,e),this._updateQuadMaterial()}get outlineColor(){return this._outlineColor}set outlineColor(e){d(this._outlineColor,e),this._updateOutlineMaterial()}get outlineSize(){return this._outlineSize}set outlineSize(e){const t=0===this._outlineSize!=(0===e);this._outlineSize=e,t?this.recreateGeometry():this._updateOutlineMaterial()}get size(){return this._size}set size(e){e!==this._size&&(this._size=e,this._updateTransform())}get outlineRenderOccluded(){return this._outlineRenderOccluded}set outlineRenderOccluded(e){this._outlineRenderOccluded=e,this._updateOutlineMaterial()}set geometry({previous:e,center:t,next:r}){this._maxSize=Math.min(s(t,e),s(t,r))/3,a(this._up,o(this._up,e,t)),a(this._right,o(this._right,r,t)),n(this._position,t),this.recreateGeometry()}_createObject3DResources(e){const t=new O(this._quadMaterialParameters),r=0===this._outlineSize?void 0:new D(this._outlineMaterialParameters);return this._createObject3DGeometries(e,t,r),{quadMaterial:t,outlineMaterial:r}}_createObject3DGeometries(e,t,r){if(c(this._up,h)&&c(this._right,h))return;const i=this._createGeometries(t,r);for(const s of i)e.addGeometry(s);this._updateTransformObject3D(e)}_createDrapedResources(){const t=new O(this._quadMaterialParameters),r=0===this._outlineSize?void 0:new D(this._outlineMaterialParameters),i=this._createGeometries(t,r).map(e=>new j(e));this._setTransformDraped(i);return{quadMaterial:t,outlineMaterial:r,geometries:i,pixelRatioHandle:e(()=>this.view.state.contentPixelRatio,()=>this.drapedResources.recreateGeometry())}}_createGeometries(e,t){const{up:r,right:i,corner:s}=this._getVertices(),a=w(r,i,s,e);if(!t)return[a];return[a,b(t,[r,s,i])]}_getVertices(){let e=this._up,t=this._right;const r=l(_.get(),e,t);return this.isDraped&&(e=n(_.get(),e),t=n(_.get(),t),e[2]=0,t[2]=0,r[2]=0),{up:e,right:t,corner:r}}_updateTransform(){this.isDraped?this.drapedResources.recreateGeometry():this._updateTransformObject3D()}_updateTransformObject3D(e=this.object3dResources.object){if(!e)return;const i=this.view.state.camera,s=this._size*i.computeScreenPixelSizeAt(this._position),a=Math.min(this._maxSize,s);t(v,this._position),r(v,v,[a,a,a]),e.transformation=v}_setTransformDraped(e){if(0===e.length)return;const{view:{basemapTerrain:{overlayManager:i},state:{contentPixelRatio:s}}}=this,{_position:a,_size:o}=this,c=n(_.get(),a);c[2]=g;const l=P;l.spatialReference=i.renderer.spatialReference,l.x=c[0],l.y=c[1];const u=o*(this.view.overlayPixelSizeInMapUnits(l)*s),h=Math.min(this._maxSize,u);t(v,c),r(v,v,[h,h,1]);for(const t of e)t.transformation=v}get _quadMaterialParameters(){return{color:this._color,forceTransparentMode:!0,writeDepth:!1,polygonOffset:!0,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateQuadMaterial(){this.object3dResources.resources?.quadMaterial.setParameters(this._quadMaterialParameters),this.drapedResources.resources?.quadMaterial.setParameters(this._quadMaterialParameters)}get _outlineMaterialParameters(){return{color:this._outlineColor,width:this._outlineSize,renderOccluded:this._outlineRenderOccluded,isDecoration:this.isDecoration}}_updateOutlineMaterial(){this.object3dResources.resources?.outlineMaterial?.setParameters(this._outlineMaterialParameters),this.drapedResources.resources?.outlineMaterial?.setParameters(this._outlineMaterialParameters)}}function y(e){e.pixelRatioHandle.remove(),e.geometries=[]}function w(e,t,r,i){return new R(i,[["position",new M([0,0,0,...t,...e,...r],[0,1,2,1,2,3],3,!0)]])}const v=i(),P=p(0,0,void 0,null);export{z as RightAngleQuadVisualElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{c as r}from"../../../../chunks/vec42.js";import{fromValues as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{Object3DVisualElement as t}from"./Object3DVisualElement.js";import{createSquareGeometry as i}from"../../webgl-engine/lib/GeometryUtil.js";import{SlicePlaneMaterial as a}from"../../webgl-engine/materials/SlicePlaneMaterial.js";class s extends t{constructor(r){super(r),this._material=null,this._renderOccluded=4,this._gridWidth=1,this._gridColor=e(1,0,0,1),this._backgroundColor=e(1,0,0,1),this.applyProperties(r)}get renderOccluded(){return this._renderOccluded}set renderOccluded(r){r!==this._renderOccluded&&(this._renderOccluded=r,this._updateMaterial())}get gridWidth(){return this._gridWidth}set gridWidth(r){this._gridWidth!==r&&(this._gridWidth=r,this._updateMaterial())}get gridColor(){return this._gridColor}set gridColor(e){r(this._gridColor,e),this._updateMaterial()}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){r(this._backgroundColor,e),this._updateMaterial()}createExternalResources(){this._material=new a(this._materialParameters)}destroyExternalResources(){this._material=null}forEachMaterial(r){r(this._material)}createGeometries(r){if(null!=this._material){const e=i(this._material);r.addGeometry(e)}}get _materialParameters(){return{backgroundColor:this._backgroundColor,gridWidth:this._gridWidth,gridColor:this._gridColor,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateMaterial(){this._material?.setParameters(this._materialParameters)}}export{s as SlicePlaneVisualElement};
5
+ import{d as r}from"../../../../chunks/vec42.js";import{fromValues as e}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{Object3DVisualElement as t}from"./Object3DVisualElement.js";import{createSquareGeometry as i}from"../../webgl-engine/lib/GeometryUtil.js";import{SlicePlaneMaterial as a}from"../../webgl-engine/materials/SlicePlaneMaterial.js";class s extends t{constructor(r){super(r),this._material=null,this._renderOccluded=4,this._gridWidth=1,this._gridColor=e(1,0,0,1),this._backgroundColor=e(1,0,0,1),this.applyProperties(r)}get renderOccluded(){return this._renderOccluded}set renderOccluded(r){r!==this._renderOccluded&&(this._renderOccluded=r,this._updateMaterial())}get gridWidth(){return this._gridWidth}set gridWidth(r){this._gridWidth!==r&&(this._gridWidth=r,this._updateMaterial())}get gridColor(){return this._gridColor}set gridColor(e){r(this._gridColor,e),this._updateMaterial()}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){r(this._backgroundColor,e),this._updateMaterial()}createExternalResources(){this._material=new a(this._materialParameters)}destroyExternalResources(){this._material=null}forEachMaterial(r){r(this._material)}createGeometries(r){if(null!=this._material){const e=i(this._material);r.addGeometry(e)}}get _materialParameters(){return{backgroundColor:this._backgroundColor,gridWidth:this._gridWidth,gridColor:this._gridColor,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateMaterial(){this._material?.setParameters(this._materialParameters)}}export{s as SlicePlaneVisualElement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{i as e}from"../../../../chunks/vec32.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as r,c as i}from"../../../../chunks/vec42.js";import{fromArray as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{Object3DVisualElement as a}from"./Object3DVisualElement.js";import{ElevationContext as l}from"../../layers/graphics/ElevationContext.js";import{geometryToRenderInfo as o}from"../../support/renderInfoUtils/point.js";import{createSphereGeometry as n}from"../../webgl-engine/lib/GeometryUtil.js";import{ShadedColorMaterial as c}from"../../webgl-engine/materials/ShadedColorMaterial.js";class h extends a{constructor(e){super(e),this.view=null,this._renderOccluded=4,this._vertices=null,this._spatialReference=null,this._color=s([1,127/255,0,1]),this._size=11,this._outlineColor=s([0,0,0,.5]),this._outlineSize=1,this._elevationInfo=null,this.applyProperties(e)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial(),this._updateOutlineMaterial())}get vertices(){return this._vertices}set vertices(e){this._vertices=e,this.recreateGeometry()}get spatialReference(){return this._spatialReference}set spatialReference(e){this._spatialReference=e,this.recreateGeometry()}get color(){return this._color}set color(e){r(e,this._color)||(i(this._color,e),this._updateMaterial())}get size(){return this._size}set size(e){e!==this._size&&(this._size=e,this._updateMaterial())}get outlineColor(){return this._outlineColor}set outlineColor(e){r(e,this._outlineColor)||(i(this._outlineColor,e),this._updateOutlineMaterial())}get outlineSize(){return this._outlineSize}set outlineSize(e){e!==this._outlineSize&&(this._outlineSize=e,this._updateOutlineMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this.recreateGeometry()}get _vertexMaterialParameters(){return{color:this._color,screenSizeScale:this.size,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}get _vertexOutlineMaterialParameters(){return{color:this._outlineColor,screenSizeScale:this.size+2*this.outlineSize,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateMaterial(){this.attached&&this._vertexMaterial.setParameters(this._vertexMaterialParameters)}_updateOutlineMaterial(){this.attached&&this._vertexOutlineMaterial.setParameters(this._vertexOutlineMaterialParameters)}_createRenderGeometries(){const t=this.vertices;if(null==t||0===t.length)return[];const r=.5,i=.5,s=o(t,this.spatialReference,this.view.elevationProvider,this.view.renderCoordsHelper,l.fromElevationInfo(this.elevationInfo)),a=[],n=s.numVertices,c=s.position;for(let l=0;l<n;++l){const t=e(u,c[3*l],c[3*l+1],c[3*l+2]),s=d(this._vertexMaterial,r,t),o=d(this._vertexOutlineMaterial,i,t);a.push({vertexGeometry:s,vertexOutlineGeometry:o})}return a}createGeometries(e){const t=this._createRenderGeometries();for(const{vertexGeometry:r,vertexOutlineGeometry:i}of t)e.addGeometry(r),e.addGeometry(i)}createExternalResources(){this._vertexMaterial=new c({...this._vertexMaterialParameters,writeDepth:!0,cullFace:2,screenSizeEnabled:!0}),this._vertexOutlineMaterial=new c({...this._vertexOutlineMaterialParameters,forceTransparentMode:!0,writeDepth:!0,cullFace:1,screenSizeEnabled:!0,shadingEnabled:!1})}destroyExternalResources(){this._vertexMaterial=null,this._vertexOutlineMaterial=null}forEachMaterial(e){e(this._vertexMaterial),e(this._vertexOutlineMaterial)}}const u=t();function d(e,t,r){return n(e,t,16,16,{offset:r})}export{h as VerticesVisualElement};
5
+ import{i as e}from"../../../../chunks/vec32.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as r,d as i}from"../../../../chunks/vec42.js";import{fromArray as s}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{Object3DVisualElement as a}from"./Object3DVisualElement.js";import{ElevationContext as l}from"../../layers/graphics/ElevationContext.js";import{geometryToRenderInfo as o}from"../../support/renderInfoUtils/point.js";import{createSphereGeometry as n}from"../../webgl-engine/lib/GeometryUtil.js";import{ShadedColorMaterial as c}from"../../webgl-engine/materials/ShadedColorMaterial.js";class h extends a{constructor(e){super(e),this.view=null,this._renderOccluded=4,this._vertices=null,this._spatialReference=null,this._color=s([1,127/255,0,1]),this._size=11,this._outlineColor=s([0,0,0,.5]),this._outlineSize=1,this._elevationInfo=null,this.applyProperties(e)}get renderOccluded(){return this._renderOccluded}set renderOccluded(e){e!==this._renderOccluded&&(this._renderOccluded=e,this._updateMaterial(),this._updateOutlineMaterial())}get vertices(){return this._vertices}set vertices(e){this._vertices=e,this.recreateGeometry()}get spatialReference(){return this._spatialReference}set spatialReference(e){this._spatialReference=e,this.recreateGeometry()}get color(){return this._color}set color(e){r(e,this._color)||(i(this._color,e),this._updateMaterial())}get size(){return this._size}set size(e){e!==this._size&&(this._size=e,this._updateMaterial())}get outlineColor(){return this._outlineColor}set outlineColor(e){r(e,this._outlineColor)||(i(this._outlineColor,e),this._updateOutlineMaterial())}get outlineSize(){return this._outlineSize}set outlineSize(e){e!==this._outlineSize&&(this._outlineSize=e,this._updateOutlineMaterial())}get elevationInfo(){return this._elevationInfo}set elevationInfo(e){this._elevationInfo=e,this.recreateGeometry()}get _vertexMaterialParameters(){return{color:this._color,screenSizeScale:this.size,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}get _vertexOutlineMaterialParameters(){return{color:this._outlineColor,screenSizeScale:this.size+2*this.outlineSize,renderOccluded:this._renderOccluded,isDecoration:this.isDecoration}}_updateMaterial(){this.attached&&this._vertexMaterial.setParameters(this._vertexMaterialParameters)}_updateOutlineMaterial(){this.attached&&this._vertexOutlineMaterial.setParameters(this._vertexOutlineMaterialParameters)}_createRenderGeometries(){const t=this.vertices;if(null==t||0===t.length)return[];const r=.5,i=.5,s=o(t,this.spatialReference,this.view.elevationProvider,this.view.renderCoordsHelper,l.fromElevationInfo(this.elevationInfo)),a=[],n=s.numVertices,c=s.position;for(let l=0;l<n;++l){const t=e(u,c[3*l],c[3*l+1],c[3*l+2]),s=d(this._vertexMaterial,r,t),o=d(this._vertexOutlineMaterial,i,t);a.push({vertexGeometry:s,vertexOutlineGeometry:o})}return a}createGeometries(e){const t=this._createRenderGeometries();for(const{vertexGeometry:r,vertexOutlineGeometry:i}of t)e.addGeometry(r),e.addGeometry(i)}createExternalResources(){this._vertexMaterial=new c({...this._vertexMaterialParameters,writeDepth:!0,cullFace:2,screenSizeEnabled:!0}),this._vertexOutlineMaterial=new c({...this._vertexOutlineMaterialParameters,forceTransparentMode:!0,writeDepth:!0,cullFace:1,screenSizeEnabled:!0,shadingEnabled:!1})}destroyExternalResources(){this._vertexMaterial=null,this._vertexOutlineMaterial=null}forEachMaterial(e){e(this._vertexMaterial),e(this._vertexOutlineMaterial)}}const u=t();function d(e,t,r){return n(e,t,16,16,{offset:r})}export{h as VerticesVisualElement};