@arcgis/core 6.0.0-next.36 → 6.0.0-next.38

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 (389) hide show
  1. package/analysis/DimensionAnalysis.js +1 -1
  2. package/analysis/DimensionSimpleStyle.js +1 -1
  3. package/analysis/LengthDimension.js +1 -1
  4. package/analysis/LineOfSightAnalysis.js +1 -1
  5. package/analysis/LineOfSightAnalysisTarget.js +1 -1
  6. package/analysis/Viewshed.js +1 -1
  7. package/analysis/ViewshedAnalysis.js +1 -1
  8. package/assets/esri/core/workers/RemoteClient.js +1 -1
  9. package/assets/esri/core/workers/chunks/{0202eb8c2b2865f99981.js → 00311d1b18d5952a014b.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{9503eedfdda55fc5adab.js → 091ec4fe83038f3558f4.js} +1 -1
  11. package/assets/esri/core/workers/chunks/0b21d0e2e5a91c34a108.js +1 -0
  12. package/assets/esri/core/workers/chunks/{322b22a5d54e404bebd5.js → 0c893837f67829757df7.js} +1 -1
  13. package/assets/esri/core/workers/chunks/123541f79be7adff0818.js +1 -0
  14. package/assets/esri/core/workers/chunks/{155861fbd0e5fc2db80c.js → 1a91443970d64a59521d.js} +1 -1
  15. package/assets/esri/core/workers/chunks/1e37337f47f45d6d8005.js +1 -0
  16. package/assets/esri/core/workers/chunks/{4e5405134d079bdf9b7a.js → 1f76f6dcdae9f55389cb.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{f717005e14a7e9141df7.js → 2050c844b5a29b1df28a.js} +1 -1
  18. package/assets/esri/core/workers/chunks/2c3612379111457c3221.js +1 -0
  19. package/assets/esri/core/workers/chunks/2d16b5a44f840147e882.js +1 -0
  20. package/assets/esri/core/workers/chunks/{d9a240a3c6bf85124474.js → 342a97974a78007b25e0.js} +1 -1
  21. package/assets/esri/core/workers/chunks/34467f7d84baffd772a3.js +1 -0
  22. package/assets/esri/core/workers/chunks/396299c22994c502e41c.js +1 -0
  23. package/assets/esri/core/workers/chunks/{03daf6f235c6edef6268.js → 398ec098fffe6abceedd.js} +1 -1
  24. package/assets/esri/core/workers/chunks/3b32a24488b3068f0cb7.js +1 -0
  25. package/assets/esri/core/workers/chunks/3b5e9e0b180dc10491ec.js +1 -0
  26. package/assets/esri/core/workers/chunks/{4d18b48d4a282a0f341c.js → 427d929dc7f89b0a1ea9.js} +1 -1
  27. package/assets/esri/core/workers/chunks/432728c557be5dfa26b5.js +1 -0
  28. package/assets/esri/core/workers/chunks/46969f379623810b2eca.js +1 -0
  29. package/assets/esri/core/workers/chunks/46edd6c9ed6701e6b975.js +1 -0
  30. package/assets/esri/core/workers/chunks/{8b0d5551978ab0aac0d1.js → 520f499d79fa71f262c7.js} +1 -1
  31. package/assets/esri/core/workers/chunks/5473409fee59db80f87d.js +1 -0
  32. package/assets/esri/core/workers/chunks/553a8bf5bc5c56d1bcaf.js +1 -0
  33. package/assets/esri/core/workers/chunks/{2211ff0a1f1ae8100231.js → 585ae43c7bcb86a26762.js} +1 -1
  34. package/assets/esri/core/workers/chunks/58716a3a6106a1b0fb9d.js +1 -0
  35. package/assets/esri/core/workers/chunks/{aa6ee2aa4ff6e6d41efb.js → 5882f349f3771868e67f.js} +1 -1
  36. package/assets/esri/core/workers/chunks/592b5db1459c02cf6a0c.js +1 -0
  37. package/assets/esri/core/workers/chunks/{1b17f5f720f6cf3f6d73.js → 5be386b3af867b19ff39.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{ea81f9d71b0842a4be26.js → 5e48898cebb6dbaf09b5.js} +1 -1
  39. package/assets/esri/core/workers/chunks/6a21dc13a465757ba007.js +1 -0
  40. package/assets/esri/core/workers/chunks/{139e753d95cfc9470e74.js → 6a65fc1a2931230fe994.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{3e406043a374ee17475b.js → 6f2e7e663229b223b4df.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{379db67f78161ebd5468.js → 7023651ed6398dcf8efb.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{90360c0bd053d3e3fd77.js → 7027a0e7bfabb3bb7fc2.js} +1 -1
  44. package/assets/esri/core/workers/chunks/76e80381fa6d1e084796.js +1 -0
  45. package/assets/esri/core/workers/chunks/78818c2a898444f7e890.js +1 -0
  46. package/assets/esri/core/workers/chunks/{40c2674dae73f0942751.js → 7d497df6e13162156342.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{3b380e64566a6cce59e2.js → 7e0ed6e8f7b77e43f628.js} +1 -1
  48. package/assets/esri/core/workers/chunks/8c3779de09291170497f.js +1 -0
  49. package/assets/esri/core/workers/chunks/8e391b5b82429f39791e.js +1 -0
  50. package/assets/esri/core/workers/chunks/947f3a1cad976bba9738.js +1 -0
  51. package/assets/esri/core/workers/chunks/{59a1b637d2c107504a04.js → 966204d6dedc8149c3e9.js} +1 -1
  52. package/assets/esri/core/workers/chunks/9826baa3c15ea2062669.js +1 -0
  53. package/assets/esri/core/workers/chunks/{d3369ffed19f4c264dcd.js → 9ab0735e86cf8932bf9d.js} +1 -1
  54. package/assets/esri/core/workers/chunks/ab0ea4042f4e13874aed.js +1 -0
  55. package/assets/esri/core/workers/chunks/ab98ade3257360015d6c.js +1 -0
  56. package/assets/esri/core/workers/chunks/ac107079342251a984dd.js +1 -0
  57. package/assets/esri/core/workers/chunks/{572aec57593a08b8045b.js → b15a8d4322f3b7819d2f.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{552c36b40e5a5ec117fb.js → b472c0a21ae29e653f7d.js} +1 -1
  59. package/assets/esri/core/workers/chunks/b90271ce38522bcf813b.js +1 -0
  60. package/assets/esri/core/workers/chunks/ba91df9835cdea7698a9.js +1 -0
  61. package/assets/esri/core/workers/chunks/bdd76a0b6c14e7fb6984.js +1 -0
  62. package/assets/esri/core/workers/chunks/bfe13ac9fa1aafb190a1.js +1 -0
  63. package/assets/esri/core/workers/chunks/{f372f4eb5527238c46f5.js → c31830ee897d5a7f2582.js} +1 -1
  64. package/assets/esri/core/workers/chunks/c48d97c38e821be17dc5.js +1 -0
  65. package/assets/esri/core/workers/chunks/{0a508e25ec05363e1f04.js → c7ad62f54d2abe1d17a0.js} +1 -1
  66. package/assets/esri/core/workers/chunks/cb1642ea8b66231cbfb5.js +1 -0
  67. package/assets/esri/core/workers/chunks/ce0274847ccce6a1ac53.js +1 -0
  68. package/assets/esri/core/workers/chunks/cf21b217b13770757cb8.js +1 -0
  69. package/assets/esri/core/workers/chunks/cf2e5f827cea7d7319ce.js +1 -0
  70. package/assets/esri/core/workers/chunks/d42a4f47843e075c56a8.js +1 -0
  71. package/assets/esri/core/workers/chunks/dae2036faa28dade2119.js +1 -0
  72. package/assets/esri/core/workers/chunks/e2430bc3a1edeb5c3266.js +1 -0
  73. package/assets/esri/core/workers/chunks/e9457a67befc61e11095.js +1 -0
  74. package/assets/esri/core/workers/chunks/f06ef153e106b26a6748.js +1 -0
  75. package/assets/esri/core/workers/chunks/faae3c43048b42341536.js +1 -0
  76. package/assets/esri/core/workers/chunks/fc77eb7683e708774168.js +1 -0
  77. package/assets/esri/core/workers/chunks/fd967a9f3cf0e2890dbb.js +1 -0
  78. package/chunks/Clouds.glsl.js +7 -11
  79. package/chunks/h.js +2 -0
  80. package/chunks/projector.js +2 -0
  81. package/config.js +1 -1
  82. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  83. package/core/sanitizerUtils.js +1 -1
  84. package/form/FormTemplate.js +1 -1
  85. package/form/elements/Element.js +1 -1
  86. package/form/elements/FieldElement.js +1 -1
  87. package/geometry/ellipsoidUtils.js +4 -4
  88. package/geometry/support/frustumPlanes.js +1 -1
  89. package/geometry/support/plane.js +1 -1
  90. package/geometry/support/triangle.js +1 -1
  91. package/kernel.js +1 -1
  92. package/layers/BaseElevationLayer.js +1 -1
  93. package/layers/ElevationLayer.js +1 -1
  94. package/layers/GraphicsLayer.js +1 -1
  95. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  96. package/layers/IntegratedMeshLayer.d.ts +2 -0
  97. package/layers/IntegratedMeshLayer.js +1 -1
  98. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  99. package/layers/geospatialPDF/geospatialPDFParserUtils.js +1 -1
  100. package/layers/geospatialPDF/support/datumUtils.js +2 -0
  101. package/layers/geospatialPDF/support/ellipsoidUtils.js +2 -0
  102. package/layers/geospatialPDF/support/geographicProjectionUtils.js +2 -0
  103. package/layers/geospatialPDF/support/parameterUtils.js +2 -0
  104. package/layers/geospatialPDF/support/projectedProjectionUtils.js +3 -0
  105. package/layers/geospatialPDF/support/projectionToSpatialReference.js +2 -0
  106. package/layers/geospatialPDF/support/statePlaneUtils.js +2 -0
  107. package/layers/geospatialPDF/support/unitUtils.js +2 -0
  108. package/layers/geospatialPDF/support/validateProjectionUtils.js +2 -0
  109. package/layers/graphics/sources/support/clientSideDefaults.js +2 -2
  110. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  111. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  112. package/layers/ogc/ogcFeatureUtils.js +1 -1
  113. package/layers/save/imageryUtils.js +1 -1
  114. package/layers/save/mediaLayerUtils.js +1 -1
  115. package/layers/save/streamLayerUtils.js +1 -1
  116. package/layers/support/ControlPoint.js +1 -1
  117. package/layers/support/ControlPointsGeoreference.js +1 -1
  118. package/layers/support/DimensionalDefinition.js +1 -1
  119. package/layers/support/ElevationQuery.js +1 -1
  120. package/layers/support/LabelClass.js +1 -1
  121. package/layers/support/LabelExpressionInfo.js +1 -1
  122. package/layers/support/MediaElementBase.js +1 -1
  123. package/layers/support/MosaicRule.js +1 -1
  124. package/layers/support/MultidimensionalSubset.js +1 -1
  125. package/layers/support/RasterBandInfo.js +1 -1
  126. package/layers/support/RasterFunction.js +1 -1
  127. package/layers/support/RasterFunctionTemplate.js +1 -1
  128. package/layers/support/RasterInfo.js +1 -1
  129. package/layers/support/RasterSensorInfo.js +1 -1
  130. package/layers/support/RasterStorageInfo.js +1 -1
  131. package/layers/support/VideoElement.js +1 -1
  132. package/layers/support/layersLoader.js +1 -1
  133. package/layers/video/VideoController.js +3 -3
  134. package/layers/video/types.d.ts +12 -0
  135. package/legend/ActiveLayerInfo.d.ts +5 -1
  136. package/legend/ActiveLayerInfo.js +1 -1
  137. package/libs/maquette-advanced-projector/projector.js +1 -1
  138. package/linkChart/LayoutSettings.js +1 -1
  139. package/linkChart/RootedLayoutSettings.js +1 -1
  140. package/package.json +3 -3
  141. package/renderers/FlowRenderer.js +1 -1
  142. package/renderers/RasterColormapRenderer.js +1 -1
  143. package/renderers/RasterShadedReliefRenderer.js +1 -1
  144. package/renderers/RasterStretchRenderer.js +1 -1
  145. package/renderers/VectorFieldRenderer.js +1 -1
  146. package/renderers/support/ColormapInfo.js +1 -1
  147. package/renderers/support/RasterPresetRenderer.js +1 -1
  148. package/renderers/support/rasterRendererHelper.js +1 -1
  149. package/rest/knowledgeGraph/GraphApplyEdits.js +1 -1
  150. package/rest/support/BaseImageMeasureParameters.js +1 -1
  151. package/rest/support/BaseImageMeasureResult.js +1 -1
  152. package/rest/support/FindImagesParameters.js +1 -1
  153. package/rest/support/FindImagesResult.js +1 -1
  154. package/rest/support/ImageAngleParameters.js +1 -1
  155. package/rest/support/ImageAngleResult.js +1 -1
  156. package/rest/support/ImageAreaParameters.js +1 -1
  157. package/rest/support/ImageAreaResult.js +1 -1
  158. package/rest/support/ImageBoundaryParameters.js +1 -1
  159. package/rest/support/ImageBoundaryResult.js +1 -1
  160. package/rest/support/ImageDistanceParameters.js +1 -1
  161. package/rest/support/ImageDistanceResult.js +1 -1
  162. package/rest/support/ImageGPSInfoParameters.js +1 -1
  163. package/rest/support/ImageGPSInfoResult.js +1 -1
  164. package/rest/support/ImageHeightParameters.js +1 -1
  165. package/rest/support/ImageHeightResult.js +1 -1
  166. package/rest/support/ImageHistogramParameters.js +1 -1
  167. package/rest/support/ImageIdentifyParameters.js +1 -1
  168. package/rest/support/ImageIdentifyResult.js +1 -1
  169. package/rest/support/ImagePixelLocationParameters.js +1 -1
  170. package/rest/support/ImagePixelLocationResult.js +1 -1
  171. package/rest/support/ImagePointParameters.js +1 -1
  172. package/rest/support/ImagePointResult.js +1 -1
  173. package/rest/support/ImageSample.js +1 -1
  174. package/rest/support/ImageSampleParameters.js +1 -1
  175. package/rest/support/ImageSampleResult.js +1 -1
  176. package/rest/support/ImageToMapMultirayParameters.js +1 -1
  177. package/rest/support/ImageToMapParameters.js +1 -1
  178. package/rest/support/ImageUrlParameters.js +1 -1
  179. package/rest/support/ImageUrlResult.js +1 -1
  180. package/rest/support/ImageVolumeParameters.js +1 -1
  181. package/rest/support/ImageVolumeResult.js +1 -1
  182. package/rest/support/MapToImageParameters.js +1 -1
  183. package/rest/support/MeasureAreaFromImageResult.js +1 -1
  184. package/rest/support/MeasureFromImageParameters.js +1 -1
  185. package/rest/support/MeasureLengthFromImageResult.js +1 -1
  186. package/symbols/support/cimSymbolUtils.js +1 -1
  187. package/symbols/support/renderUtils.js +1 -1
  188. package/views/2d/ViewState.d.ts +3 -3
  189. package/views/2d/ViewState.js +1 -1
  190. package/views/2d/ViewStateManager.js +1 -1
  191. package/views/2d/engine/Bitmap.js +1 -1
  192. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  193. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  194. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  195. package/views/2d/engine/vectorTiles/decluttering/CollisionJob.js +1 -1
  196. package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +1 -1
  197. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  198. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  199. package/views/2d/engine/webgl/Overlay.js +1 -1
  200. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  201. package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
  202. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  203. package/views/2d/engine/webgl/animations/store/AnimationStore.js +1 -1
  204. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  205. package/views/2d/engine/webgl/collisions/LabelStore.js +1 -1
  206. package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  208. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  209. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  210. package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
  211. package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +1 -1
  212. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
  213. package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
  214. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
  215. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  216. package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
  217. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  218. package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
  219. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  220. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
  221. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
  222. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  223. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
  224. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  225. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  226. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  227. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTexture.js +1 -1
  228. package/views/2d/engine/webgl/textureUtils.js +1 -1
  229. package/views/2d/engine/webgl/util/IntervalMatcher.js +1 -1
  230. package/views/2d/layers/LayerView2D.js +1 -1
  231. package/views/2d/webglDeps.js +1 -1
  232. package/views/3d/FocusAreasView.js +1 -1
  233. package/views/3d/GroundView3D.js +1 -1
  234. package/views/3d/input/SceneInputManager.js +1 -1
  235. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  236. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  237. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  238. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  239. package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
  240. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  241. package/views/3d/state/ConstraintsManager.js +1 -1
  242. package/views/3d/state/ViewState.js +1 -1
  243. package/views/3d/state/ViewStateManager.js +1 -1
  244. package/views/3d/support/engineContent/line.js +1 -1
  245. package/views/3d/support/engineContent/marker.js +1 -1
  246. package/views/3d/support/flow/StreamlineResources3D.js +1 -1
  247. package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
  248. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  249. package/views/3d/support/flow/geometryUtils.js +1 -1
  250. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  251. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  252. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  253. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  254. package/views/3d/support/gaussianSplatting/GaussianTileBuilder.js +2 -0
  255. package/views/3d/support/gaussianSplatting/GaussianTileLifecycle.js +2 -0
  256. package/views/3d/support/gaussianSplatting/formatConstants.js +2 -0
  257. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  258. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  259. package/views/3d/terrain/OverlayManager.js +1 -1
  260. package/views/3d/terrain/OverlayRenderer.js +1 -1
  261. package/views/3d/terrain/TerrainRenderer.js +1 -1
  262. package/views/3d/terrain/TerrainSurface.js +1 -1
  263. package/views/3d/terrain/Tile.js +1 -1
  264. package/views/3d/terrain/TileCompositor.js +1 -1
  265. package/views/3d/terrain/TileRenderer.js +1 -1
  266. package/views/3d/terrain/tileUtils.js +1 -1
  267. package/views/3d/webgl/RenderNode.d.ts +1 -1
  268. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  269. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  270. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +1 -1
  271. package/views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js +1 -1
  272. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +15 -11
  273. package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
  274. package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
  275. package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
  276. package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
  277. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +19 -9
  278. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  279. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  280. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  281. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  282. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  283. package/views/3d/webgl-engine/lib/AttributeView.js +1 -1
  284. package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
  285. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  286. package/views/3d/webgl-engine/lib/DDSUtil.js +1 -1
  287. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  288. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  289. package/views/3d/webgl-engine/lib/GaussianSplatRenderUtils.js +1 -1
  290. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  291. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  292. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  293. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  294. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  295. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBufferView.js +1 -1
  296. package/views/3d/webgl-engine/lib/VerticesView.js +2 -0
  297. package/views/3d/webgl-engine/lib/attributeViewUtils.js +1 -1
  298. package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
  299. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  300. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  301. package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
  302. package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
  303. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  304. package/views/3d/webgl-engine/materials/HUDMaterialBaseInstance.js +1 -1
  305. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  306. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  307. package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
  308. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  309. package/views/3d/webgl-engine/materials/internal/lineMarkerBufferUtils.js +2 -0
  310. package/views/3d/webgl-engine/materials/internal/ribbonLineBufferUtils.js +2 -0
  311. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  312. package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
  313. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  314. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  315. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  316. package/views/3d/webgl-engine/shaders/hudMaterialLayouts.js +2 -0
  317. package/views/3d/webgl-engine/shaders/lineMarkerLayouts.js +2 -0
  318. package/views/draw/support/ManagedTooltipField.js +1 -1
  319. package/views/overlay/LineOverlayItem.js +1 -1
  320. package/views/overlay/TextOverlayItem.js +1 -1
  321. package/views/overlay/ViewOverlay.js +1 -1
  322. package/views/support/GroundElevationSampler.js +1 -1
  323. package/views/support/HighlightOptions.d.ts +2 -2
  324. package/views/support/HighlightOptions.js +1 -1
  325. package/views/support/TextureCompressionHelper.js +1 -1
  326. package/views/support/imageReprojection.js +1 -1
  327. package/views/webgl/FramebufferObject.js +1 -1
  328. package/views/webgl/RenderingContext.js +1 -1
  329. package/views/webgl/Texture.js +1 -1
  330. package/views/webgl/Util.js +1 -1
  331. package/views/webgl/rasterUtils.js +1 -1
  332. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  333. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  334. package/widgets/Legend/styles/support/univariateUtils.js +1 -1
  335. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  336. package/widgets/OrientedImageryViewer.js +1 -1
  337. package/widgets/ScaleRangeSlider/types.d.ts +3 -3
  338. package/assets/esri/core/workers/chunks/01f55004d64309f8538b.js +0 -1
  339. package/assets/esri/core/workers/chunks/039d9bc5b5015012f811.js +0 -1
  340. package/assets/esri/core/workers/chunks/08140725277de5d2e41a.js +0 -1
  341. package/assets/esri/core/workers/chunks/0d99bfb75dcb9fa29080.js +0 -1
  342. package/assets/esri/core/workers/chunks/144bad0c2415c345736a.js +0 -1
  343. package/assets/esri/core/workers/chunks/165ca7a97b611c8f26c4.js +0 -1
  344. package/assets/esri/core/workers/chunks/16cda273927ab0a39544.js +0 -1
  345. package/assets/esri/core/workers/chunks/1989410a618865f02dec.js +0 -1
  346. package/assets/esri/core/workers/chunks/29c610ce1c81ebb84a6b.js +0 -1
  347. package/assets/esri/core/workers/chunks/3223f9fbc76ba9ef8d13.js +0 -1
  348. package/assets/esri/core/workers/chunks/338d800d4efcc91cead1.js +0 -1
  349. package/assets/esri/core/workers/chunks/3415531224f8494d79ca.js +0 -1
  350. package/assets/esri/core/workers/chunks/3fdcc383bbd9cf0d274c.js +0 -1
  351. package/assets/esri/core/workers/chunks/46c290108a90518ef695.js +0 -1
  352. package/assets/esri/core/workers/chunks/48b8b57f559a53c6c513.js +0 -1
  353. package/assets/esri/core/workers/chunks/4a979fce1c971b614a18.js +0 -1
  354. package/assets/esri/core/workers/chunks/59a88dd53f8806bbec06.js +0 -1
  355. package/assets/esri/core/workers/chunks/5aeb5e18514644fe2cf9.js +0 -1
  356. package/assets/esri/core/workers/chunks/5bd1414220e42cb8ebcf.js +0 -1
  357. package/assets/esri/core/workers/chunks/5d781c2c6204cffffd0d.js +0 -1
  358. package/assets/esri/core/workers/chunks/6edc13a426e00bb93a9b.js +0 -1
  359. package/assets/esri/core/workers/chunks/723df53cfa0189837d01.js +0 -1
  360. package/assets/esri/core/workers/chunks/7400b8c454b47ee4fb3c.js +0 -1
  361. package/assets/esri/core/workers/chunks/7862abd24fb5c3b12e6b.js +0 -1
  362. package/assets/esri/core/workers/chunks/796c6195b6bf59dcc9bd.js +0 -1
  363. package/assets/esri/core/workers/chunks/7af4edc6e87d27b9d467.js +0 -1
  364. package/assets/esri/core/workers/chunks/81bcc495e6eaf2cf7474.js +0 -1
  365. package/assets/esri/core/workers/chunks/934e1f2153e6fad6ed23.js +0 -1
  366. package/assets/esri/core/workers/chunks/990e96139b5a1dccb061.js +0 -1
  367. package/assets/esri/core/workers/chunks/a607541959169741a943.js +0 -1
  368. package/assets/esri/core/workers/chunks/aa779896fd9e5c341349.js +0 -1
  369. package/assets/esri/core/workers/chunks/c131e0dd180a4c10e12e.js +0 -1
  370. package/assets/esri/core/workers/chunks/c7adb7b77721c75891f4.js +0 -1
  371. package/assets/esri/core/workers/chunks/cd55cad81accf51d2989.js +0 -1
  372. package/assets/esri/core/workers/chunks/ce324dde6d7daea33638.js +0 -1
  373. package/assets/esri/core/workers/chunks/d3412518a7b518860fbb.js +0 -1
  374. package/assets/esri/core/workers/chunks/dac69c0047488fdf986d.js +0 -1
  375. package/assets/esri/core/workers/chunks/dba5f44c4e4a3f075df2.js +0 -1
  376. package/assets/esri/core/workers/chunks/e67ea2f1714e5abeae44.js +0 -1
  377. package/assets/esri/core/workers/chunks/e8fb2ba7b7a4f0916325.js +0 -1
  378. package/assets/esri/core/workers/chunks/f10c883eb26330e3421c.js +0 -1
  379. package/assets/esri/core/workers/chunks/f3b4159c0722df8ffe13.js +0 -1
  380. package/assets/esri/core/workers/chunks/f75eec2cbc541eec9712.js +0 -1
  381. package/layers/geospatialPDF/projectionToWKTUtils.js +0 -3
  382. package/libs/maquette/cache.js +0 -2
  383. package/libs/maquette/dom.js +0 -2
  384. package/libs/maquette/h.js +0 -2
  385. package/libs/maquette/index.js +0 -2
  386. package/libs/maquette/mapping.js +0 -2
  387. package/libs/maquette/projection.js +0 -2
  388. package/libs/maquette/projector.js +0 -2
  389. package/libs/maquette/utilities/window-performance-projector-logger.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{set as e,equals as t,transformMat4 as n}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isColor as i,isDepth as a,isColorHighlightOLIDOrDepth as o}from"../core/shaderLibrary/ShaderOutput.js";import s from"../lib/GLMaterial.js";import{LineMaterial as c}from"../lib/LineMaterial.js";import{VisualVariablePassParameters as l}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as u}from"./internal/bufferWriterUtils.js";import{getLayout as d,LineMarkerTechnique as f}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as p}from"../shaders/LineMarkerTechniqueConfiguration.js";import{alphaCutoff as m}from"../../../../webscene/support/AlphaCutoff.js";class h extends c{constructor(e,t){super(e,_),this.produces=new Map([[2,e=>e===10||i(e)&&this.parameters.renderOccluded===8],[3,e=>a(e)],[10,e=>o(e)&&this.parameters.renderOccluded===8],[11,e=>o(e)&&this.parameters.renderOccluded===8],[4,e=>i(e)],[18,e=>i(e)||e===10]]),this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this._configuration=new p(t)}updateConfiguration(e){super.updateConfiguration(e),this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=this.parameters.cap!==0,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.worldSpace=this.parameters.worldSpace&&!this._configuration.draped,this._configuration.hasScreenSizePerspective=this.parameters.screenSizePerspective!=null&&!this._configuration.worldSized}get visible(){return this.parameters.color[3]>=m}get emissions(){return this.parameters.emissiveStrength>0?this.parameters.renderOccluded===8?1:2:0}intersectRay(){}intersectScreenPolygon(){return null}createBufferWriter(){return new v(d(this.parameters),this.parameters)}createGLMaterial(e){return new g(e)}}class g extends s{dispose(){super.dispose(),this._markerTextures?.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){let t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this.getTechnique(f,e)}}class _ extends l{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive=`arrow`,this.markerScale=1,this.placement=`end`,this.cap=0,this.anchor=0,this.hasTip=!1,this.shadingEnabled=!1,this.worldSpace=!1,this.worldSized=!1,this.hideOnShortSegments=!1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.stipplePattern=null,this.markerTexture=null}}class v{constructor(e,t){this.layout=e,this._parameters=t}elementCount(){return this._parameters.placement===`begin-end`?12:6}write(r,i,a,o){if(o==null)return;let{buffer:s,offset:c}=o,l=a.get(`position`).data,d=l.length/3,f=[1,0,0],p=a.get(`normal`);this._parameters.worldSpace&&p!=null&&(f=p.data);let m=1,h=0;this._parameters.vvSize?h=a.get(`sizeFeatureAttribute`).data[0]:a.has(`size`)&&(m=a.get(`size`).data[0]);let g=[1,1,1,1],_=0;this._parameters.vvColor?_=a.get(`colorFeatureAttribute`).data[0]:a.has(`color`)&&(g=a.get(`color`).data);let v=0;this._parameters.vvOpacity&&(v=a.get(`opacityFeatureAttribute`).data[0]);let x=new Float32Array(s.buffer),S=new Float16Array(s.buffer),C=new Uint8Array(s.buffer),w=c*(this.layout.stride/4),T=x.BYTES_PER_ELEMENT/S.BYTES_PER_ELEMENT,E=4/T,D=(e,t,n,r)=>{x[w++]=e[0],x[w++]=e[1],x[w++]=e[2],u(t,e,S,w*T),w+=E;let i=w*T;if(S[i++]=n[0],S[i++]=n[1],w=Math.ceil(i/T),this._parameters.vvColor)x[w++]=_;else{let e=Math.min(r*4,g.length-4),t=w++*4;C[t]=g[e]*255,C[t+1]=g[e+1]*255,C[t+2]=g[e+2]*255,C[t+3]=g[e+3]*255}this._parameters.vvOpacity&&(x[w++]=v),i=w*T,this._parameters.vvSize?(x[w++]=h,i+=2):S[i++]=m,this._parameters.worldSpace&&(S[i++]=f[0],S[i++]=f[1],S[i++]=f[2]),w=Math.ceil(i/T)},O=(i,a)=>{let o=e(y,l[i*3],l[i*3+1],l[i*3+2]),s=b,c=i+a;do e(s,l[c*3],l[c*3+1],l[c*3+2]),c+=a;while(t(o,s)&&c>=0&&c<d);r&&(n(o,o,r),n(s,s,r)),D(o,s,[-1,-1],i),D(o,s,[1,-1],i),D(o,s,[1,1],i),D(o,s,[-1,-1],i),D(o,s,[1,1],i),D(o,s,[-1,1],i)},k=this._parameters.placement;(k===`begin`||k===`begin-end`)&&O(0,1),(k===`end`||k===`begin-end`)&&O(d-1,-1)}}const y=r(),b=r();export{h as LineMarkerMaterial,_ as Parameters};
2
+ import{BufferViewVec3f as e}from"../../../../geometry/support/buffer/BufferView.js";import{isColor as t,isDepth as n,isColorHighlightOLIDOrDepth as r}from"../core/shaderLibrary/ShaderOutput.js";import i from"../lib/GLMaterial.js";import{LineMaterial as a}from"../lib/LineMaterial.js";import{createVerticesView as o}from"../lib/VerticesView.js";import{VisualVariablePassParameters as s}from"./VisualVariablePassParameters.js";import{writeLineMarkerBuffer as c}from"./internal/lineMarkerBufferUtils.js";import{getLayout as l}from"../shaders/lineMarkerLayouts.js";import{LineMarkerTechnique as u}from"../shaders/LineMarkerTechnique.js";import{LineMarkerTechniqueConfiguration as d}from"../shaders/LineMarkerTechniqueConfiguration.js";import{alphaCutoff as f}from"../../../../webscene/support/AlphaCutoff.js";class p extends a{constructor(e,i){super(e,h),this.produces=new Map([[2,e=>e===10||t(e)&&this.parameters.renderOccluded===8],[3,e=>n(e)],[10,e=>r(e)&&this.parameters.renderOccluded===8],[11,e=>r(e)&&this.parameters.renderOccluded===8],[4,e=>t(e)],[18,e=>t(e)||e===10]]),this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this._configuration=new d(i)}updateConfiguration(e){super.updateConfiguration(e),this._configuration.hideOnShortSegments=this.parameters.hideOnShortSegments,this._configuration.hasCap=this.parameters.cap!==0,this._configuration.anchor=this.parameters.anchor,this._configuration.hasTip=this.parameters.hasTip,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.worldSpace=this.parameters.worldSpace&&!this._configuration.draped,this._configuration.hasScreenSizePerspective=this.parameters.screenSizePerspective!=null&&!this._configuration.worldSized}get visible(){return this.parameters.color[3]>=f}get emissions(){return this.parameters.emissiveStrength>0?this.parameters.renderOccluded===8?1:2:0}intersectRay(){}intersectScreenPolygon(){return null}computeAttachmentOrigin(){return!1}createPrimitivePositionReader(t){let n=t.vertex.getField(`position`,e);return(e,t)=>n.getVec(t,e)}createBufferWriter(){return new g(l(this.parameters),this.parameters)}createGLMaterial(e){return new m(e)}}class m extends i{dispose(){super.dispose(),this._markerTextures?.release(this._markerPrimitive),this._markerPrimitive=null}beginSlot(e){let t=this._material.parameters.markerPrimitive;return t!==this._markerPrimitive&&(this._material.setParameters({markerTexture:this._markerTextures.swap(t,this._markerPrimitive)}),this._markerPrimitive=t),this.getTechnique(u,e)}}class h extends s{constructor(){super(...arguments),this.width=0,this.color=[1,1,1,1],this.markerPrimitive=`arrow`,this.markerScale=1,this.placement=`end`,this.cap=0,this.anchor=0,this.hasTip=!1,this.shadingEnabled=!1,this.worldSpace=!1,this.worldSized=!1,this.hideOnShortSegments=!1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.stipplePattern=null,this.markerTexture=null}}class g{constructor(e,t){this.layout=e,this._parameters=t}elementCount(){return this._parameters.placement===`begin-end`?12:6}rebaseBuffers(e,t){t?.buffer.copyFrom(e.vertex,0,t.offset)}write(e,t,n,r){if(r==null)return;let i=n.get(`position`);c({position:o(i,3),normal:n.get(`normal`)?.data,color:n.get(`color`)?.data,size:n.get(`size`)?.data[0],colorFeature:this._parameters.vvColor?n.get(`colorFeatureAttribute`).data[0]:void 0,sizeFeature:this._parameters.vvSize?n.get(`sizeFeatureAttribute`).data[0]:void 0,opacityFeature:this._parameters.vvOpacity?n.get(`opacityFeatureAttribute`).data[0]:void 0},this._parameters,r,e)}}export{p as LineMarkerMaterial,h as Parameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as n,createScreenPointArray as r}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as i,Seconds as a}from"../../../../core/time.js";import{copy as o,set as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as l,subtract as u,dot as d,scale as f,add as p,copy as m,length as h,distance as g,lerp as _,transformMat4 as v,normalize as y}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as x}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromPoints as S,distance2 as C,closestLineSegmentPoint as w,projectPoint as T,projectPointFraction as E,create as D}from"../../../../geometry/support/lineSegment.js";import{fromPoints as O,signedDistance as k,getNormal as ee,create as A}from"../../../../geometry/support/plane.js";import{BufferViewVec3f as te,BufferViewFloat as j,BufferViewVec4Unorm8 as ne,BufferViewVec4f16 as re,BufferViewUint32 as ie}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as ae,isColor as M,isDepth as oe,isColorHighlightOLIDOrDepth as se,is2DGeometryOutput as ce}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as le}from"../effects/geometry/olidUtils.js";import ue from"../lib/GLMaterial.js";import{LineMaterial as de}from"../lib/LineMaterial.js";import{ribbonLineVertexInfoPacking as fe,encodeRibbonLineVertexInfo as pe}from"../lib/RibbonLineVertexInfo.js";import{projectWorldLineSegmentToRenderScreen as me,screenPolygonIntersectsBufferedSegment as he}from"../lib/screenPolygonOverlapUtils.js";import{Hit as ge,DrapedHit as _e}from"../lib/screenPolygonTriangleIntersections.js";import{ScreenSizePerspectiveEvaluator as ve}from"../lib/screenSizePerspectiveUtils.js";import{isTranslationMatrix as ye,assert as N}from"../lib/Util.js";import{isImagePattern as be}from"./lineStippleUtils.js";import{VisualVariablePassParameters as xe}from"./VisualVariablePassParameters.js";import{writeColor as Se}from"./internal/bufferWriterUtils.js";import{intersectRayWithWorldSizedLineSegment as Ce,intersectScreenPolygonWithWorldSizedLineSegment as we}from"./internal/worldSizedRibbonLineIntersectionUtils.js";import{n as Te}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as Ee,getTextureBufferLayout as De}from"../shaders/RibbonLineLayouts.js";import{RibbonLineTechnique as Oe}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as ke}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as Ae}from"../../../../webscene/support/AlphaCutoff.js";class je extends de{constructor(e,t){super(e,Ne),this.produces=new Map([[2,e=>ae(e)||M(e)&&this.parameters.renderOccluded===8],[3,e=>oe(e)],[10,e=>se(e)&&this.parameters.renderOccluded===8],[11,e=>se(e)&&this.parameters.renderOccluded===8],[4,e=>M(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==8],[8,e=>M(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==8],[18,e=>ce(e)]]),this._configuration=new ke(t.state.isGlobal),this._isAssumedMetalDriver=t.stage.renderer.renderContext.rctx.isAssumedMetalDriver}updateConfiguration(e){super.updateConfiguration(e),this._configuration.useFlatJoinVarying=!this._isAssumedMetalDriver;let t=this.parameters.stipplePattern!=null&&this.parameters.stippleTexture!=null&&e.output!==10,n=t&&this.parameters.isImagePattern()&&this._configuration.draped,r=this.parameters.usesWorldSizedWidth(n);this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.stippleEnabled=t,this._configuration.stippleOffColorEnabled=t&&this.parameters.stippleOffColor!=null,this._configuration.stipplePreferContinuous=t&&this.parameters.stipplePreferContinuous,this._configuration.numJoinSubdivisions=Le(this.parameters.join,t),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins=this.parameters.join===`round`,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=this.parameters.markerParameters!=null&&Ie(this.parameters.markerParameters),this._configuration.polygonOffsetIndex=this.parameters.polygonOffsetIndex,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&this.parameters.innerColor!=null,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=+!!this.emissions,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective&&!r,this._configuration.worldSized=r,this._configuration.imagePattern=n,this._configuration.hasVertexColor=this.parameters.hasVertexColor,this._configuration.hasVertexSize=this.parameters.hasVertexSize,this._configuration.hasLineDistance=this.parameters.hasLineDistance}get visible(){return this.parameters.color[3]>=Ae||this.parameters.stipplePattern!=null&&(this.parameters.stippleOffColor?.[3]??0)>Ae}get emissions(){return this.parameters.emissiveStrength>0?this.parameters.renderOccluded===8?1:2:0}setParameters(e,t){e.animation=this.parameters.animation,super.setParameters(e,t)}intersectRayDraped({attributes:e},n,r,i,a,o,s){if(!n.options.selectionMode)return;let c=this._getLineSize(e,!0),l=r[0],u=r[1],d=F(c,o,s,this.parameters.usesWorldSizedWidth()),f=Number.MAX_VALUE,p=0;for(let n of Fe(R,z,this.parameters,e)){let e=l-R[0],r=u-R[1],i=z[0]-R[0],a=z[1]-R[1],o=i*e+a*r,s=i*i+a*a,c=t(o/s,0,1),d=i*c-e,m=a*c-r,h=d*d+m*m;h<f&&(f=h,p=n)}f<d*d&&i(a.distance,a.renderDistance,a.normal,p)}intersectRay(t,n,r,i,a,o){let{options:s,camera:c}=r;if(!s.selectionMode||!t.visible||!c)return;if(!ye(n)){e.getLogger(`esri.views.3d.webgl-engine.materials.RibbonLineMaterial`).error(`intersection assumes a translation-only matrix`);return}let l=this._getLineSize(t.attributes);this.parameters.worldSized?this._intersectRayWithWorldSizedLine(t,n,r,l,o):this._intersectRayWithScreenSizedLine(t,n,r,l,o)}_intersectRayWithScreenSizedLine(e,t,n,r,i){let{camera:a}=n,s=e.attributes,c=s.get(`position`).data,_=W;o(_,n.point);let v=r*a.pixelRatio,y=$*a.pixelRatio,b=v/2+y;l(Y[0],_[0]-b,_[1]+b,0),l(Y[1],_[0]+b,_[1]+b,0),l(Y[2],_[0]+b,_[1]-b,0),l(Y[3],_[0]-b,_[1]-b,0);for(let e=0;e<4;e++)if(!a.unprojectFromRenderScreen(Y[e],X[e]))return;O(a.eye,X[0],X[1],Z),O(a.eye,X[1],X[2],qe),O(a.eye,X[2],X[3],Je),O(a.eye,X[3],X[0],Q);let x=Number.MAX_VALUE,T=0;for(let e of this._forEachTransformedLineSegment(I,L,c,t,P(this.parameters,s))){if(k(Z,I)<0&&k(Z,L)<0||k(qe,I)<0&&k(qe,L)<0||k(Je,I)<0&&k(Je,L)<0||k(Q,I)<0&&k(Q,L)<0)continue;let t=a.projectToRenderScreen(I,G),n=a.projectToRenderScreen(L,K);if(t==null||n==null)continue;if(t[2]<0&&n[2]>0){u(H,I,L);let e=a.frustum,n=-k(e[4],I)/d(H,ee(e[4]));if(f(H,H,n),p(I,I,H),!a.projectToRenderScreen(I,t))continue}else if(t[2]>0&&n[2]<0){u(H,L,I);let e=a.frustum,t=-k(e[4],L)/d(H,ee(e[4]));if(f(H,H,t),p(L,L,H),!a.projectToRenderScreen(L,n))continue}else if(t[2]<0&&n[2]<0)continue;t[2]=0,n[2]=0;let i=S(t,n,Ge),o=C(i,_);if(!(o>=x)){if(this.parameters.screenSizePerspective){let e=this.computeScreenSizePerspectiveWidth(i,I,L,_,a,r,y);if(o>=e*e)continue}x=o,m(He,I),m(Ue,L),T=e}}if(x<b*b){let{rayBegin:e,rayEnd:t}=n,r=Number.MAX_VALUE;if(w(S(He,Ue,Ge),S(e,t,Ke),U)){u(U,U,e);let n=h(U);f(U,U,1/n),r=n/g(e,t)}i(r,r,U,T)}}_intersectRayWithWorldSizedLine(e,t,n,r,i){let{camera:a,ray:o,metersPerRenderUnit:s}=n,c=e.attributes,l=c.get(`position`).data,u=r/(2*s),d=1/0,f=0;for(let e of this._forEachTransformedLineSegment(I,L,l,t,P(this.parameters,c))){let t=Ce(I,L,u,a,o,We);if(t!=null&&t<d&&(d=t,f=e,m(U,We),t===0))break}d<1/0&&i(d,d,U,f)}intersectScreenPolygon(t,n,r,i){let{options:a}=r;if(!a.selectionMode||!t.visible)return null;if(!ye(n))return e.getLogger(`esri.views.3d.webgl-engine.materials.RibbonLineMaterial`).error(`intersection assumes a translation-only matrix`),null;let o=this._getLineSize(t.attributes);return this.parameters.worldSized?this._intersectWorldSizedPolygon(t,n,r,i,o):this._intersectScreenSizedPolygon(t,n,r,i,o)}_intersectScreenSizedPolygon(e,t,n,r,i){let{camera:a,screenPolygonPrimitiveProcessor:o}=n,s=e.attributes,c=s.get(`position`).data,l=$,u=l*a.pixelRatio,d=new ge(4);for(let e of this._forEachTransformedLineSegment(I,L,c,t,P(this.parameters,s)))for(let[t,n]of o.processLineSegment(Xe,I,L)){if(!me(a,t,n,G,K))continue;let o=S(G,K,Ge),s=i/2+l;this.parameters.screenSizePerspective&&(_(W,G,K,.5),s=Math.max(s,this.computeScreenSizePerspectiveWidth(o,t,n,W,a,i,u)/a.pixelRatio)),a.renderToScreen(G,Be),a.renderToScreen(K,Ve),he(r,Be,Ve,s)&&(T(S(t,n,Ke),a.eye,B),d.updateIfCloserFromValues(g(a.eye,B),e,B,null))}return d}_intersectWorldSizedPolygon(e,t,n,r,i){let{camera:a,screenPolygonPrimitiveProcessor:o,metersPerRenderUnit:s}=n,{attributes:c}=e,l=c.get(`position`).data,u=i/(2*s),d=new ge(4);for(let e of this._forEachTransformedLineSegment(I,L,l,t,P(this.parameters,c)))for(let[t,n]of o.processLineSegment(Xe,I,L)){T(S(t,n,Ke),a.eye,B);let i=g(a.eye,B);d.valid&&i>=d.distance||we(t,n,u,a,r)&&d.updateIfCloserFromValues(i,e,B,null)}return d}intersectScreenPolygonDraped({attributes:e},t,n,r,i,a){if(!n.options.selectionMode)return null;let o=F(this._getLineSize(e,!0),i,a,this.parameters.usesWorldSizedWidth());for(let n of Fe(R,z,this.parameters,e,t))if(he(r,R,z,o))return new _e(n);return null}createBufferWriter(){return new Pe(Ee(this.parameters),De(this.parameters),this.parameters)}createGLMaterial(e){return new Me(e)}validateParameters(e){N(e.hasLineDistance||e.stipplePattern==null,`Patterned ribbon lines require line distances`),e.join!==`miter`&&(e.miterLimit=0),e.markerParameters!=null&&(e.markerScale=e.markerParameters.width/e.width)}update(e){return this.parameters.hasAnimation?(this.setParameters({timeElapsed:i(e.time)},!1),e.dt!==0):!1}computeScreenSizePerspectiveWidth(e,t,n,r,i,a,o){let s=E(e,r);_(B,t,n,s),v(ze,B,i.viewMatrix);let c=h(ze),l=this.computeCameraAbsCosAngle(B,i,this._configuration.spherical);return Re.update(l,c,this.parameters.screenSizePerspective,this.parameters.screenSizePerspectiveMinPixelReferenceSize),Re.apply(a)*i.pixelRatio/2+o}computeCameraAbsCosAngle(e,t,n){return n?y(U,e):l(U,0,0,1),u(V,e,t.eye),y(V,V),Math.abs(d(U,V))}_getLineSize(e,n=!1){let r=this.parameters.width;if(this.parameters.vvSize){let i=e.get(`sizeFeatureAttribute`).data[0];Number.isNaN(i)?n&&(r*=this.parameters.vvSize.fallback[0]):r*=t(this.parameters.vvSize.offset[0]+i*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else this.parameters.hasVertexSize&&e.has(`size`)&&(r*=e.get(`size`).data[0]);return r}*_forEachTransformedLineSegment(e,t,n,r,i){let a=i?n.length-2:n.length-5;for(let i=0;i<a;i+=3){e[0]=n[i]+r[12],e[1]=n[i+1]+r[13],e[2]=n[i+2]+r[14];let a=(i+3)%n.length;t[0]=n[a]+r[12],t[1]=n[a+1]+r[13],t[2]=n[a+2]+r[14],yield i/3}}}class Me extends ue{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){let{stipplePattern:t}=this._material.parameters;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(Oe,e)}}class Ne extends xe{constructor(){super(...arguments),this._width=0,this.color=x,this.hasVertexColor=!0,this.hasVertexSize=!0,this.hasLineDistance=!0,this.join=`miter`,this.cap=0,this.miterLimit=5,this.shadingEnabled=!1,this.writeDepth=!0,this.polygonOffset=0,this.polygonOffsetIndex=0,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=a(0),this.animation=0,this.animationSpeed=1,this.trailLength=1,this.startTime=a(0),this.endTime=a(1/0),this.worldSized=!1}get width(){return this.isImagePattern()?this.stipplePattern.width:this._width}set width(e){this._width=e}get transparent(){return this.color[3]<1||this.hasAnimation||this.stipplePattern!=null&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return this.animation!==0}usesWorldSizedWidth(e=this.isImagePattern()){return this.worldSized||e}isImagePattern(){return be(this.stipplePattern)&&this.stippleTexture!=null}}class Pe{constructor(e,t,n){this.layout=e,this.textureBufferLayout=t,this._parameters=n,this.maxTextureBufferItemIndex=fe.getField(0).max,this.numJoinSubdivisions=Le(this._parameters.join,this._parameters.stipplePattern!=null)}_isClosed(e){return P(this._parameters,e)}allocate(e){return this.layout.createBuffer(e)}elementCountTextureBuffer(e){return e.get(`position`).data.length/3+(this._isClosed(e)?3:2)}elementCount(e){let t=e.get(`position`).indices.length/2+1,n=this._isClosed(e),r=n?2:4,i=+!n,a=n?t:t-1,o=this.numJoinSubdivisions*2+4;return r+=(a-i)*o,r+=2,this._parameters.wireframe&&(r=2+(r-2)*4),r}write(e,t,n,r,i,a){a!=null&&this._writeTextureBuffer(e,n,a),r!=null&&this._writeVertexBuffer(n,r,i)}_writeTextureBuffer(e,t,n){let r=t.get(`position`),i=r.data.length/3,a=this._isClosed(t),{buffer:o,offset:s}=n,c=o.getField(`position`,te),l=o.getField(`u0`,j),u=o.getField(`sizeFeatureAttribute`,j),d=o.getField(`size`,j),f=o.getField(`colorFeatureAttribute`,j),p=o.getField(`color`,ne),h=o.getField(`olidColor`,ne),_=o.getField(`timeStamps`,re),v=o.getField(`opacityFeatureAttribute`,j),y=t.get(`sizeFeatureAttribute`)?.data,b=t.get(`size`)?.data,x=t.get(`colorFeatureAttribute`)?.data,S=t.get(`color`)?.data,C=t.get(`opacityFeatureAttribute`)?.data,w=t.get(`distanceToStart`)?.data,T=t.get(`timeStamps`);N(c!==null,`Expected valid position field in texture buffer`);let E=0;for(let t=0;t<i;++t){this._getTransformedPosition(J,r.data,t,e),l!=null&&t>0&&(w==null?E+=g(q,J):E=w[t]??E);let n=s+t+1;if(c.setVec(n,J),l!=null&&(l.set(n,E),m(q,J)),u&&u.set(n,y?.length===1?y[0]:y?.[t]??0),d&&d.set(n,b?.length===1?b[0]:b?.[t]??1),f&&f.set(n,x?.length===1?x[0]:x?.[t]??0),p){if(S!=null){let e=Math.min(t*4,S.length-4);p.setValues(n,S[e],S[e+1],S[e+2],S[e+3])}else p.setValues(n,1,1,1,1)}v&&v.set(n,C?.length===1?C[0]:C?.[t]??0)}if(_!=null&&T!=null){N(T.size===4);let e=T.data;for(let t=0;t<i;++t){let n=t*4,r=s+t+1;_.set(r,0,e[n]),_.set(r,1,e[n+1]),_.set(r,2,e[n+2]),_.set(r,3,e[n+3])}}if(a){let e=s,t=s+1,n=s+2,r=s+i,a=r+1,u=r+2;if(o.copyItem(r,e),o.copyItem(t,a),o.copyItem(n,u),l!=null){c.getVec(r,q),c.getVec(t,J);let e=w?.[i]??E+g(q,J);l.set(a,e)}}else{let e=s,t=s+1,n=s+i,r=n+1;o.copyItem(t,e),o.copyItem(n,r)}let D=t.get(`olidColor`);le()&&D!=null&&h!=null&&Se(D,4,h,s)}_writeVertexBuffer(e,t,n){let{buffer:r,offset:i}=t,a=e.get(`position`),o=a.indices,s=a.data.length/3,c=this._isClosed(e),l=s+(c?3:2);o&&o.length!==2*(s-1)&&console.warn(`RibbonLineMaterial does not support indices`);let u=r.getField(`ribbonLineVertexInfo`,ie);N(u!=null,`Missing ribbon vertex information field`),N(n!=null,`Using a texture layout, but the texture range for this instance was not provided`);let d=n.from;N(n.numElements===l,`Expected number of elements in TextureBuffer to equal number of points`);let f=u.typedBuffer,p=i+1,m=(e,t,n)=>{f[p++]=pe(d+n+1,t,e)},h=0,g=0;c?(h=0,g=s):(m(1,7,0),m(1,5,0),h=1,g=s-1);for(let e=h;e<g;e++){m(0,2,e),m(0,0,e);let t=this.numJoinSubdivisions;for(let n=0;n<t;++n){let r=(n+1)/(t+1);m(r,2,e),m(r,0,e)}m(1,6,e),m(1,4,e)}c?(m(0,2,g),m(0,0,g)):(m(0,3,g),m(0,1,g)),f[i]=f[i+1],f[p]=f[p-1],p++,this._parameters.wireframe&&this._addWireframeVertices(f,i,p)}_getTransformedPosition(e,t,n,r){let i=n*3;l(e,t[i+0],t[i+1],t[i+2]),r&&v(e,e,r)}_addWireframeVertices(e,t,n){let r=n;for(let i=t;i<=n-4;i+=2)e[r++]=e[i],e[r++]=e[i+2],e[r++]=e[i+1],e[r++]=e[i+2],e[r++]=e[i+1],e[r++]=e[i+3]}}function P(e,t){return e.isClosed?t.get(`position`).indices.length>2:!1}function F(e,t,n,r){return r?e/(2*n)+$*t:(e/2+$)*t}function*Fe(e,t,n,r,i){let a=r.get(`position`).data,c=P(n,r)?a.length-2:a.length-5,l=i?.[0]??0,u=i?.[1]??0;s(e,a[0]+l,a[1]+u);for(let n=3;n<c+3;n+=3){let r=n%a.length;s(t,a[r]+l,a[r+1]+u),yield n/3,o(e,t)}}function Ie(e){return e.anchor===1&&e.hideOnShortSegments&&e.placement===`begin-end`&&e.worldSpace}function Le(e,t){let n=+!!t;switch(e){case`miter`:case`bevel`:return n;case`round`:return Te+n}}const Re=new ve,I=b(),L=b(),R=c(),z=c(),B=b(),ze=b(),V=b(),H=b(),U=b(),W=b(),G=n(),K=n(),Be=r(),Ve=r(),He=b(),Ue=b(),We=b(),Ge=D(),Ke=D(),q=b(),J=b(),Y=[n(),n(),n(),n()],X=[b(),b(),b(),b()],Z=A(),qe=A(),Je=A(),Q=A(),$=4,Ye={getDrapedRibbonLineMaxDistance:F},Xe=[b(),b()];export{Ne as Parameters,je as RibbonLineMaterial,Ye as test};
2
+ import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as n,createScreenPointArray as r}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as i,Seconds as a}from"../../../../core/time.js";import{copy as o,set as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as l,subtract as u,dot as d,scale as f,add as p,copy as m,length as h,distance as g,lerp as _,transformMat4 as v,normalize as y,applyTranslation as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as x}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as ee}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromPoints as S,distance2 as te,closestLineSegmentPoint as ne,projectPoint as re,projectPointFraction as ie,create as ae}from"../../../../geometry/support/lineSegment.js";import{fromPoints as C,signedDistance as w,getNormal as oe,create as T}from"../../../../geometry/support/plane.js";import{BufferViewUint32 as E,BufferViewVec3f as se}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as ce,isColor as D,isDepth as le,isColorHighlightOLIDOrDepth as ue,is2DGeometryOutput as de}from"../core/shaderLibrary/ShaderOutput.js";import{getScalarAttributeView as fe}from"../lib/attributeViewUtils.js";import pe from"../lib/GLMaterial.js";import{LineMaterial as me}from"../lib/LineMaterial.js";import{ribbonLineVertexInfoPacking as O}from"../lib/RibbonLineVertexInfo.js";import{projectWorldLineSegmentToRenderScreen as he,screenPolygonIntersectsBufferedSegment as ge}from"../lib/screenPolygonOverlapUtils.js";import{Hit as _e,DrapedHit as ve}from"../lib/screenPolygonTriangleIntersections.js";import{ScreenSizePerspectiveEvaluator as ye}from"../lib/screenSizePerspectiveUtils.js";import{isTranslationMatrix as be,assert as k}from"../lib/Util.js";import{createVerticesView as xe}from"../lib/VerticesView.js";import{isImagePattern as Se}from"./lineStippleUtils.js";import{VisualVariablePassParameters as Ce}from"./VisualVariablePassParameters.js";import{getNumJoinSubdivisions as we,getRibbonLinePositions as A,ribbonLineVertexCount as Te,writeRibbonLineTextureBuffer as Ee,writeRibbonLineVertices as De}from"./internal/ribbonLineBufferUtils.js";import{intersectRayWithWorldSizedLineSegment as Oe,intersectScreenPolygonWithWorldSizedLineSegment as ke}from"./internal/worldSizedRibbonLineIntersectionUtils.js";import{getLayout as Ae,getTextureBufferLayout as je}from"../shaders/RibbonLineLayouts.js";import{RibbonLineTechnique as Me}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as Ne}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as Pe}from"../../../../webscene/support/AlphaCutoff.js";class Fe extends me{constructor(e,t){super(e,Le),this.produces=new Map([[2,e=>ce(e)||D(e)&&this.parameters.renderOccluded===8],[3,e=>le(e)],[10,e=>ue(e)&&this.parameters.renderOccluded===8],[11,e=>ue(e)&&this.parameters.renderOccluded===8],[4,e=>D(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==8],[8,e=>D(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==8],[18,e=>de(e)]]),this._configuration=new Ne(t.state.isGlobal),this._isAssumedMetalDriver=t.stage.renderer.renderContext.rctx.isAssumedMetalDriver}updateConfiguration(e){super.updateConfiguration(e),this._configuration.useFlatJoinVarying=!this._isAssumedMetalDriver;let t=this.parameters.stipplePattern!=null&&this.parameters.stippleTexture!=null&&e.output!==10,n=t&&this.parameters.isImagePattern()&&this._configuration.draped,r=this.parameters.usesWorldSizedWidth(n);this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.stippleEnabled=t,this._configuration.stippleOffColorEnabled=t&&this.parameters.stippleOffColor!=null,this._configuration.stipplePreferContinuous=t&&this.parameters.stipplePreferContinuous,this._configuration.numJoinSubdivisions=we(this.parameters.join,t),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins=this.parameters.join===`round`,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=this.parameters.markerParameters!=null&&Be(this.parameters.markerParameters),this._configuration.polygonOffsetIndex=this.parameters.polygonOffsetIndex,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&this.parameters.innerColor!=null,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=+!!this.emissions,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective&&!r,this._configuration.worldSized=r,this._configuration.imagePattern=n,this._configuration.hasVertexColor=this.parameters.hasVertexColor,this._configuration.hasVertexSize=this.parameters.hasVertexSize,this._configuration.hasLineDistance=this.parameters.hasLineDistance}get visible(){return this.parameters.color[3]>=Pe||this.parameters.stipplePattern!=null&&(this.parameters.stippleOffColor?.[3]??0)>Pe}get emissions(){return this.parameters.emissiveStrength>0?this.parameters.renderOccluded===8?1:2:0}setParameters(e,t){e.animation=this.parameters.animation,super.setParameters(e,t)}intersectRayDraped(e,n,r,i,a,o,s){if(!n.options.selectionMode)return;let c=this._getLineSize(e,!0),l=A(e,!!this.parameters.isClosed),u=r[0],d=r[1],f=M(c,o,s,this.parameters.usesWorldSizedWidth()),p=Number.MAX_VALUE,m=0;for(let e of ze(F,I,l,j(this.parameters,l.count))){let n=u-F[0],r=d-F[1],i=I[0]-F[0],a=I[1]-F[1],o=i*n+a*r,s=i*i+a*a,c=t(o/s,0,1),l=i*c-n,f=a*c-r,h=l*l+f*f;h<p&&(p=h,m=e)}p<f*f&&i(a.distance,a.renderDistance,a.normal,m)}intersectRay(t,n,r,i,a,o){let{options:s,camera:c}=r;if(!s.selectionMode||!t.visible||!c)return;if(!be(n)){e.getLogger(`esri.views.3d.webgl-engine.materials.RibbonLineMaterial`).error(`intersection assumes a translation-only matrix`);return}let l=this._getLineSize(t);this.parameters.worldSized?this._intersectRayWithWorldSizedLine(t,n,r,l,o):this._intersectRayWithScreenSizedLine(t,n,r,l,o)}_intersectRayWithScreenSizedLine(e,t,n,r,i){let{camera:a}=n,s=A(e,!!this.parameters.isClosed),c=V;o(c,n.point);let _=r*a.pixelRatio,v=$*a.pixelRatio,y=_/2+v;l(q[0],c[0]-y,c[1]+y,0),l(q[1],c[0]+y,c[1]+y,0),l(q[2],c[0]+y,c[1]-y,0),l(q[3],c[0]-y,c[1]-y,0);for(let e=0;e<4;e++)if(!a.unprojectFromRenderScreen(q[e],J[e]))return;C(a.eye,J[0],J[1],Y),C(a.eye,J[1],J[2],X),C(a.eye,J[2],J[3],Z),C(a.eye,J[3],J[0],Q);let b=Number.MAX_VALUE,x=0;for(let e of this._forEachTransformedLineSegment(N,P,s,t,j(this.parameters,s.count))){if(w(Y,N)<0&&w(Y,P)<0||w(X,N)<0&&w(X,P)<0||w(Z,N)<0&&w(Z,P)<0||w(Q,N)<0&&w(Q,P)<0)continue;let t=a.projectToRenderScreen(N,H),n=a.projectToRenderScreen(P,U);if(t==null||n==null)continue;if(t[2]<0&&n[2]>0){u(z,N,P);let e=a.frustum,n=-w(e[4],N)/d(z,oe(e[4]));if(f(z,z,n),p(N,N,z),!a.projectToRenderScreen(N,t))continue}else if(t[2]>0&&n[2]<0){u(z,P,N);let e=a.frustum,t=-w(e[4],P)/d(z,oe(e[4]));if(f(z,z,t),p(P,P,z),!a.projectToRenderScreen(P,n))continue}else if(t[2]<0&&n[2]<0)continue;t[2]=0,n[2]=0;let i=S(t,n,G),o=te(i,c);if(!(o>=b)){if(this.parameters.screenSizePerspective){let e=this.computeScreenSizePerspectiveWidth(i,N,P,c,a,r,v);if(o>=e*e)continue}b=o,m(Ge,N),m(Ke,P),x=e}}if(b<y*y){let{rayBegin:e,rayEnd:t}=n,r=Number.MAX_VALUE;if(ne(S(Ge,Ke,G),S(e,t,K),B)){u(B,B,e);let n=h(B);f(B,B,1/n),r=n/g(e,t)}i(r,r,B,x)}}_intersectRayWithWorldSizedLine(e,t,n,r,i){let{camera:a,ray:o,metersPerRenderUnit:s}=n,c=A(e,!!this.parameters.isClosed),l=r/(2*s),u=1/0,d=0;for(let e of this._forEachTransformedLineSegment(N,P,c,t,j(this.parameters,c.count))){let t=Oe(N,P,l,a,o,W);if(t!=null&&t<u&&(u=t,d=e,m(B,W),t===0))break}u<1/0&&i(u,u,B,d)}intersectScreenPolygon(t,n,r,i){let{options:a}=r;if(!a.selectionMode||!t.visible)return null;if(!be(n))return e.getLogger(`esri.views.3d.webgl-engine.materials.RibbonLineMaterial`).error(`intersection assumes a translation-only matrix`),null;let o=this._getLineSize(t);return this.parameters.worldSized?this._intersectWorldSizedPolygon(t,n,r,i,o):this._intersectScreenSizedPolygon(t,n,r,i,o)}_intersectScreenSizedPolygon(e,t,n,r,i){let{camera:a,screenPolygonPrimitiveProcessor:o}=n,s=A(e,!!this.parameters.isClosed),c=$,l=c*a.pixelRatio,u=new _e(4);for(let e of this._forEachTransformedLineSegment(N,P,s,t,j(this.parameters,s.count)))for(let[t,n]of o.processLineSegment(Je,N,P)){if(!he(a,t,n,H,U))continue;let o=S(H,U,G),s=i/2+c;this.parameters.screenSizePerspective&&(_(V,H,U,.5),s=Math.max(s,this.computeScreenSizePerspectiveWidth(o,t,n,V,a,i,l)/a.pixelRatio)),a.renderToScreen(H,Ue),a.renderToScreen(U,We),ge(r,Ue,We,s)&&(re(S(t,n,K),a.eye,L),u.updateIfCloserFromValues(g(a.eye,L),e,L,null))}return u}_intersectWorldSizedPolygon(e,t,n,r,i){let{camera:a,screenPolygonPrimitiveProcessor:o,metersPerRenderUnit:s}=n,c=A(e,!!this.parameters.isClosed),l=i/(2*s),u=new _e(4);for(let e of this._forEachTransformedLineSegment(N,P,c,t,j(this.parameters,c.count)))for(let[t,n]of o.processLineSegment(Je,N,P)){re(S(t,n,K),a.eye,L);let i=g(a.eye,L);u.valid&&i>=u.distance||ke(t,n,l,a,r)&&u.updateIfCloserFromValues(i,e,L,null)}return u}intersectScreenPolygonDraped(e,t,n,r,i,a){if(!n.options.selectionMode)return null;let o=this._getLineSize(e,!0),s=A(e,!!this.parameters.isClosed),c=M(o,i,a,this.parameters.usesWorldSizedWidth());for(let e of ze(F,I,s,j(this.parameters,s.count),t))if(ge(r,F,I,c))return new ve(e);return null}createPrimitivePositionReader(e){let t=e.vertex.getField(`ribbonLineVertexInfo`,E),n=e.storage.getField(`position`,se),r=O.getField(0);return(e,i)=>n.getVec(r.get(t.get(i)),e)}computeAttachmentOrigin(e,t,n){return!this.parameters.wireframe&&super.computeAttachmentOrigin(e,t,n)}createBufferWriter(){return new Re(Ae(this.parameters),je(this.parameters),this.parameters)}createGLMaterial(e){return new Ie(e)}validateParameters(e){k(e.hasLineDistance||e.stipplePattern==null,`Patterned ribbon lines require line distances`),e.join!==`miter`&&(e.miterLimit=0),e.markerParameters!=null&&(e.markerScale=e.markerParameters.width/e.width)}update(e){return this.parameters.hasAnimation?(this.setParameters({timeElapsed:i(e.time)},!1),e.dt!==0):!1}computeScreenSizePerspectiveWidth(e,t,n,r,i,a,o){let s=ie(e,r);_(L,t,n,s),v(He,L,i.viewMatrix);let c=h(He),l=this.computeCameraAbsCosAngle(L,i,this._configuration.spherical);return Ve.update(l,c,this.parameters.screenSizePerspective,this.parameters.screenSizePerspectiveMinPixelReferenceSize),Ve.apply(a)*i.pixelRatio/2+o}computeCameraAbsCosAngle(e,t,n){return n?y(B,e):l(B,0,0,1),u(R,e,t.eye),y(R,R),Math.abs(d(B,R))}_getLineSize(e,n=!1){let r=this.parameters.width;if(this.parameters.vvSize){let i=fe(e,`sizeFeatureAttribute`).get(0);Number.isNaN(i)?n&&(r*=this.parameters.vvSize.fallback[0]):r*=t(this.parameters.vvSize.offset[0]+i*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else if(this.parameters.hasVertexSize){let t=fe(e,`size`);t!=null&&(r*=t.get(0))}return r}*_forEachTransformedLineSegment(e,t,n,r,i){let a=i?n.count:n.count-1;for(let i=0;i<a;i++)n.getVec(i,e),b(e,e,r),n.getVec((i+1)%n.count,t),b(t,t,r),yield i}}class Ie extends pe{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){let{stipplePattern:t}=this._material.parameters;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(Me,e)}}class Le extends Ce{constructor(){super(...arguments),this._width=0,this.color=ee,this.hasVertexColor=!0,this.hasVertexSize=!0,this.hasLineDistance=!0,this.join=`miter`,this.cap=0,this.miterLimit=5,this.shadingEnabled=!1,this.writeDepth=!0,this.polygonOffset=0,this.polygonOffsetIndex=0,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=a(0),this.animation=0,this.animationSpeed=1,this.trailLength=1,this.startTime=a(0),this.endTime=a(1/0),this.worldSized=!1}get width(){return this.isImagePattern()?this.stipplePattern.width:this._width}set width(e){this._width=e}get transparent(){return this.color[3]<1||this.hasAnimation||this.stipplePattern!=null&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return this.animation!==0}usesWorldSizedWidth(e=this.isImagePattern()){return this.worldSized||e}isImagePattern(){return Se(this.stipplePattern)&&this.stippleTexture!=null}}class Re{constructor(e,t,n){this.layout=e,this.textureBufferLayout=t,this._parameters=n,this.maxTextureBufferItemIndex=O.getField(0).max}_isClosed(e){return j(this._parameters,e)}allocate(e){return this.layout.createBuffer(e)}elementCountTextureBuffer(e){let t=e.get(`position`);return t.data.length/3+(this._isClosed(t.data.length/t.stride)?3:2)}elementCount(e){let t=e.get(`position`),n=t.indices.length/2+1;return Te(n,this._isClosed(t.data.length/t.stride),this._parameters)}rebaseBuffers(e,t,n,r){if(r?.buffer.copyFrom(e.storage,0,r.offset),t!=null){let r=n.from,i=e.vertex.getField(`ribbonLineVertexInfo`,E),a=t.buffer.getField(`ribbonLineVertexInfo`,E),o=O.getField(0);for(let e=0;e<i.count;e++){let n=i.get(e),s=o.get(n)+r;a.set(t.offset+e,n===0?0:o.set(n,s))}}}write(e,t,n,r,i,a){a!=null&&this._writeTextureBuffer(e,n,a),r!=null&&this._writeVertexBuffer(n,r,i)}_writeTextureBuffer(e,t,n){let r=xe(t.get(`position`),3),i=t.get(`timeStamps`);i!=null&&n.buffer.layout.fields.has(`timeStamps`)&&k(i.size===4),Ee({position:r,color:t.get(`color`)?.data,size:t.get(`size`)?.data,colorFeature:t.get(`colorFeatureAttribute`)?.data,sizeFeature:t.get(`sizeFeatureAttribute`)?.data,opacityFeature:t.get(`opacityFeatureAttribute`)?.data,distancesToStart:t.get(`distanceToStart`)?.data,timeStamps:i?.data,olidColor:t.get(`olidColor`)?.data},this._isClosed(r.count),n,e)}_writeVertexBuffer(e,t,n){let r=e.get(`position`),i=r.indices,a=r.data.length/3,o=this._isClosed(r.data.length/r.stride),s=a+(o?3:2);i&&i.length!==2*(a-1)&&console.warn(`RibbonLineMaterial does not support indices`),k(n!=null,`Using a texture layout, but the texture range for this instance was not provided`);let c=n.from;k(n.numElements===s,`Expected number of elements in TextureBuffer to equal number of points`),De(a,o,this._parameters,t,c)}}function j(e,t){return e.isClosed&&t>2}function M(e,t,n,r){return r?e/(2*n)+$*t:(e/2+$)*t}function*ze(e,t,n,r,i){let a=r?n.count:n.count-1,c=i?.[0]??0,l=i?.[1]??0;s(e,n.get(0,0)+c,n.get(0,1)+l);for(let r=1;r<=a;r++){let i=r%n.count;s(t,n.get(i,0)+c,n.get(i,1)+l),yield r,o(e,t)}}function Be(e){return e.anchor===1&&e.hideOnShortSegments&&e.placement===`begin-end`&&e.worldSpace}const Ve=new ye,N=x(),P=x(),F=c(),I=c(),L=x(),He=x(),R=x(),z=x(),B=x(),V=x(),H=n(),U=n(),Ue=r(),We=r(),Ge=x(),Ke=x(),W=x(),G=ae(),K=ae(),q=[n(),n(),n(),n()],J=[x(),x(),x(),x()],Y=T(),X=T(),Z=T(),Q=T(),$=4,qe={getDrapedRibbonLineMaxDistance:M},Je=[x(),x()];export{Le as Parameters,Fe as RibbonLineMaterial,qe as test};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{getAssetUrl as t}from"../../../../../assets.js";import n from"../../../../../core/Accessor.js";import{createTask as r}from"../../../../../core/asyncUtils.js";import i from"../../../../../core/Logger.js";import{abortMaybe as a,disposeMaybe as o}from"../../../../../core/maybe.js";import{throwIfAborted as s}from"../../../../../core/promiseUtils.js";import{property as c,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{requestImage as u}from"../../../../../request/image.js";import{NoParameters as d}from"../../../../webgl/NoParameters.js";import f from"../../../../webgl/Texture.js";import{TextureDescriptor as p}from"../../../../webgl/TextureDescriptor.js";let m=class extends n{constructor(){super(...arguments),this._passParameters=new h,this._resourcesTask=null}get passParameters(){return this._passParameters}destroy(){this._resourcesTask=a(this._resourcesTask),this._passParameters.waveNormal=o(this._passParameters.waveNormal),this._passParameters.wavePerturbation=o(this._passParameters.wavePerturbation)}get updating(){return!!this._resourcesTask&&!this._resourcesTask.finished}ensureResources(e){return this._resourcesTask||=r(async n=>{await Promise.allSettled([this._loadImageResource(e,t(`esri/images/materials/water/normals.jpg`),e=>this._passParameters.waveNormal=e,n),this._loadImageResource(e,t(`esri/images/materials/water/perturbation.jpg`),e=>this._passParameters.wavePerturbation=e,n)])}),this._resourcesTask.finished?2:1}async _loadImageResource(e,t,n,r){try{let i=await u(t,{signal:r});s(r);let a=new p(i.width,i.height);a.pixelFormat=6407,a.samplingMode=9987,a.hasMipmap=!0,a.maxAnisotropy=8,n(new f(e,a,i))}catch(e){i.getLogger(this).error(`Failed to load water material normal texture.`,e)}}};e([c()],m.prototype,`_resourcesTask`,void 0),e([c({type:Boolean,readOnly:!0})],m.prototype,`updating`,null),m=e([l(`esri.views.3d.webgl-engine.materials.internal.WaterTextureRepository`)],m);class h extends d{}export{h as WaterTexturePassParameters,m as WaterTextureRepository};
2
+ import{__decorate as e}from"tslib";import{getAssetUrl as t}from"../../../../../assets.js";import n from"../../../../../core/Accessor.js";import{createTask as r}from"../../../../../core/asyncUtils.js";import i from"../../../../../core/Logger.js";import{abortMaybe as a,disposeMaybe as o}from"../../../../../core/maybe.js";import{throwIfAborted as s}from"../../../../../core/promiseUtils.js";import{property as c,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{requestImage as u}from"../../../../../request/image.js";import{NoParameters as d}from"../../../../webgl/NoParameters.js";import{Texture as f}from"../../../../webgl/Texture.js";import{TextureDescriptor as p}from"../../../../webgl/TextureDescriptor.js";let m=class extends n{constructor(){super(...arguments),this._passParameters=new h,this._resourcesTask=null}get passParameters(){return this._passParameters}destroy(){this._resourcesTask=a(this._resourcesTask),this._passParameters.waveNormal=o(this._passParameters.waveNormal),this._passParameters.wavePerturbation=o(this._passParameters.wavePerturbation)}get updating(){return!!this._resourcesTask&&!this._resourcesTask.finished}ensureResources(e){return this._resourcesTask||=r(async n=>{await Promise.allSettled([this._loadImageResource(e,t(`esri/images/materials/water/normals.jpg`),e=>this._passParameters.waveNormal=e,n),this._loadImageResource(e,t(`esri/images/materials/water/perturbation.jpg`),e=>this._passParameters.wavePerturbation=e,n)])}),this._resourcesTask.finished?2:1}async _loadImageResource(e,t,n,r){try{let i=await u(t,{signal:r});s(r);let a=new p(i.width,i.height);a.pixelFormat=6407,a.samplingMode=9987,a.hasMipmap=!0,a.maxAnisotropy=8,n(new f(e,a,i))}catch(e){i.getLogger(this).error(`Failed to load water material normal texture.`,e)}}};e([c()],m.prototype,`_resourcesTask`,void 0),e([c({type:Boolean,readOnly:!0})],m.prototype,`updating`,null),m=e([l(`esri.views.3d.webgl-engine.materials.internal.WaterTextureRepository`)],m);class h extends d{}export{h as WaterTexturePassParameters,m as WaterTextureRepository};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{subtract as e,length as t,scale as n}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as r}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{isOrthoNormal as i,hasIdentityRotation as a}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{BufferViewVec4u8 as o,BufferViewVec4f as s,BufferViewFloat as c,BufferViewVec2i16 as l,BufferViewVec2f16 as u,BufferViewVec2f as d,BufferViewVec3f as f}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as p}from"../../lib/Util.js";function m(e,t,n){let{data:r,indices:i}=e,a=t.typedBuffer,o=t.typedBufferStride,s=i.length;n*=o;for(let e=0;e<s;++e)a[n]=r[i[e]],n+=o}function h(e,t,n,r=1){let{data:i,indices:a}=e,o=t.typedBuffer,s=t.typedBufferStride,c=a.length;if(n*=s,r===1)for(let e=0;e<c;++e)o[n]=i[a[e]],n+=s;else for(let e=0;e<c;++e){let t=i[a[e]];for(let e=0;e<r;e++)o[n]=t,n+=s}}function g(e,t,n){let{data:r,indices:i}=e,a=t.typedBuffer,o=t.typedBufferStride,s=i.length;n*=o;for(let e=0;e<s;++e)a[n]=r[i[e]],n+=o}function _(e,t,n){let{data:r,stride:i,indices:a}=e,o=a.length;for(let e=0;e<o;++e)t.set(n+e,r[i*a[e]])}function v(e,t,n){let{data:r,stride:i,indices:a}=e,o=a.length;for(let e=0;e<o;++e)t.set(n+e,r[i*a[e]])}function y(e,t,n){let{data:r,indices:i}=e,a=t.typedBuffer,o=t.typedBufferStride,s=i.length;n*=o;for(let e=0;e<s;++e){let t=2*i[e];a[n]=r[t],a[n+1]=r[t+1],n+=o}}function b(e,t,n,r=1){let{data:i,indices:a}=e,o=t.typedBuffer,s=t.typedBufferStride,c=a.length;if(n*=s,r===1)for(let e=0;e<c;++e){let t=3*a[e];o[n]=i[t],o[n+1]=i[t+1],o[n+2]=i[t+2],n+=s}else for(let e=0;e<c;++e){let t=3*a[e];for(let e=0;e<r;++e)o[n]=i[t],o[n+1]=i[t+1],o[n+2]=i[t+2],n+=s}}function x(e,t,n,r=1){let{data:i,indices:a}=e,o=t.typedBuffer,s=t.typedBufferStride,c=a.length;if(n*=s,r===1)for(let e=0;e<c;++e){let t=4*a[e];o[n]=i[t],o[n+1]=i[t+1],o[n+2]=i[t+2],o[n+3]=i[t+3],n+=s}else for(let e=0;e<c;++e){let t=4*a[e];for(let e=0;e<r;++e)o[n]=i[t],o[n+1]=i[t+1],o[n+2]=i[t+2],o[n+3]=i[t+3],n+=s}}function S(e,t,n){let{data:r,indices:i}=e,a=t.typedBuffer,o=t.typedBufferStride,s=i.length;n*=o;for(let e=0;e<s;++e){let t=9*i[e];for(let e=0;e<9;++e)a[n+e]=r[t+e];n+=o}}function C(e,t,n){let{data:r,indices:i}=e,a=t.typedBuffer,o=t.typedBufferStride,s=i.length;n*=o;for(let e=0;e<s;++e){let t=16*i[e];for(let e=0;e<16;++e)a[n+e]=r[t+e];n+=o}}function w(e,t,n,r,i=1){if(!t){b(e,n,r,i);return}let{data:o,indices:s}=e,c=n.typedBuffer,l=n.typedBufferStride,u=s.length,d=t[0],f=t[1],p=t[2],m=t[4],h=t[5],g=t[6],_=t[8],v=t[9],y=t[10],x=t[12],S=t[13],C=t[14];r*=l;let w=0,T=0,E=0,D=a(t)?e=>{w=o[e]+x,T=o[e+1]+S,E=o[e+2]+C}:e=>{let t=o[e],n=o[e+1],r=o[e+2];w=d*t+m*n+_*r+x,T=f*t+h*n+v*r+S,E=p*t+g*n+y*r+C};if(i===1)for(let e=0;e<u;++e)D(3*s[e]),c[r]=w,c[r+1]=T,c[r+2]=E,r+=l;else for(let e=0;e<u;++e){D(3*s[e]);for(let e=0;e<i;++e)c[r]=w,c[r+1]=T,c[r+2]=E,r+=l}}function T(e,t,n,r){if(!t){y(e,n,r);return}let{data:i,indices:o}=e,s=n.typedBuffer,c=n.typedBufferStride,l=o.length,u=t[0],d=t[1],f=t[4],p=t[5],m=t[12],h=t[13];r*=c;let g=0,_=0,v=a(t)?e=>{g=i[e]+m,_=i[e+1]+h}:e=>{let t=i[e],n=i[e+1];g=u*t+f*n+m,_=d*t+p*n+h};for(let e=0;e<l;++e)v(2*o[e]),s[r]=g,s[r+1]=_,r+=c}function E(e,t,n,r,o=1){if(!t){b(e,n,r,o);return}let{data:s,indices:c}=e,l=t,u=n.typedBuffer,d=n.typedBufferStride,f=c.length,p=l[0],m=l[1],h=l[2],g=l[4],_=l[5],v=l[6],y=l[8],x=l[9],S=l[10],C=!i(l),w=1e-6,T=.999999;r*=d;let E=0,D=0,O=0,k=a(l)?e=>{E=s[e],D=s[e+1],O=s[e+2]}:e=>{let t=s[e],n=s[e+1],r=s[e+2];E=p*t+g*n+y*r,D=m*t+_*n+x*r,O=h*t+v*n+S*r};if(o===1){if(C)for(let e=0;e<f;++e){k(3*c[e]);let t=E*E+D*D+O*O;if(t<T&&t>w){let e=1/Math.sqrt(t);u[r]=E*e,u[r+1]=D*e,u[r+2]=O*e}else u[r]=E,u[r+1]=D,u[r+2]=O;r+=d}else for(let e=0;e<f;++e)k(3*c[e]),u[r]=E,u[r+1]=D,u[r+2]=O,r+=d}else for(let e=0;e<f;++e){if(k(3*c[e]),C){let e=E*E+D*D+O*O;if(e<T&&e>w){let t=1/Math.sqrt(e);E*=t,D*=t,O*=t}}for(let e=0;e<o;++e)u[r]=E,u[r+1]=D,u[r+2]=O,r+=d}}function D(e,t,n,r,a=1){if(!t){x(e,n,r,a);return}let{data:o,indices:s}=e,c=t,l=n.typedBuffer,u=n.typedBufferStride,d=s.length,f=c[0],p=c[1],m=c[2],h=c[4],g=c[5],_=c[6],v=c[8],y=c[9],b=c[10],S=!i(c),C=1e-6,w=.999999;if(r*=u,a===1)for(let e=0;e<d;++e){let t=4*s[e],n=o[t],i=o[t+1],a=o[t+2],c=o[t+3],d=f*n+h*i+v*a,x=p*n+g*i+y*a,T=m*n+_*i+b*a;if(S){let e=d*d+x*x+T*T;if(e<w&&e>C){let t=1/Math.sqrt(e);d*=t,x*=t,T*=t}}l[r]=d,l[r+1]=x,l[r+2]=T,l[r+3]=c,r+=u}else for(let e=0;e<d;++e){let t=4*s[e],n=o[t],i=o[t+1],c=o[t+2],d=o[t+3],x=f*n+h*i+v*c,T=p*n+g*i+y*c,E=m*n+_*i+b*c;if(S){let e=x*x+T*T+E*E;if(e<w&&e>C){let t=1/Math.sqrt(e);x*=t,T*=t,E*=t}}for(let e=0;e<a;++e)l[r]=x,l[r+1]=T,l[r+2]=E,l[r+3]=d,r+=u}}function O(e,t,n,r,i=1){let{data:a,indices:o}=e,s=n.typedBuffer,c=n.typedBufferStride,l=o.length;if(r*=c,t===a.length&&t===4){s[r]=a[0],s[r+1]=a[1],s[r+2]=a[2],s[r+3]=a[3];let e=new Uint32Array(n.typedBuffer.buffer,n.start),t=c/4;r/=4;let o=e[r];r+=t;let u=l*i;for(let n=1;n<u;++n)e[r]=o,r+=t}else if(i===1){if(t===4){for(let e=0;e<l;++e){let t=4*o[e];s[r]=a[t],s[r+1]=a[t+1],s[r+2]=a[t+2],s[r+3]=a[t+3],r+=c}return}for(let e=0;e<l;++e){let t=3*o[e];s[r]=a[t],s[r+1]=a[t+1],s[r+2]=a[t+2],s[r+3]=255,r+=c}}else if(t===4)for(let e=0;e<l;++e){let t=4*o[e];for(let e=0;e<i;++e)s[r]=a[t],s[r+1]=a[t+1],s[r+2]=a[t+2],s[r+3]=a[t+3],r+=c}else for(let e=0;e<l;++e){let t=3*o[e];for(let e=0;e<i;++e)s[r]=a[t],s[r+1]=a[t+1],s[r+2]=a[t+2],s[r+3]=255,r+=c}}function k(e,t,n){let{data:r,indices:i}=e,a=t.typedBuffer,o=t.typedBufferStride,s=i.length,c=r[0];n*=o;for(let e=0;e<s;++e)a[n]=c,n+=o}function A(r,i,a,o){e(j,r,i);let s=Math.max(Math.sqrt(t(j)),1e-4);n(j,j,1/s),a[o++]=j[0],a[o++]=j[1],a[o++]=j[2],a[o++]=s}const j=r();function M(e,t,n,r,i){let{buffer:a,offset:o}=i;for(let i of t.fields.keys()){let t=e.get(i),s=t?.indices;t&&s&&N(i,t,n,r,a,o)}}function N(e,t,n,r,i,a){switch(e){case`position`:{p(t.size===3);let r=i.getField(e,f);p(!!r,`No buffer view for ${e}`),w(t,n,r,a);break}case`normal`:{p(t.size===3);let n=i.getField(e,f);p(!!n,`No buffer view for ${e}`),E(t,r,n,a);break}case`normalCompressed`:case`profileRight`:case`profileUp`:{p(t.size===2);let n=i.getField(e,l);p(!!n,`No buffer view for ${e}`),y(t,n,a);break}case`uv0`:{p(t.size===2);let n=i.getField(e,u)??i.getField(e,d);p(!!n,`No buffer view for ${e}`),y(t,n,a);break}case`uvi`:{p(t.size===2);let n=i.getField(e,l);p(!!n,`No buffer view for ${e}`),y(t,n,a);break}case`color`:case`symbolColor`:{let n=i.getField(e,o);p(!!n,`No buffer view for ${e}`),p(t.size===3||t.size===4),O(t,t.size,n,a);break}case`colorFeatureAttribute`:case`opacityFeatureAttribute`:case`sizeFeatureAttribute`:{let n=i.getField(e,c)??i.getField(e,c);p(!!n,`No buffer view for ${e}`),p(t.size===1),k(t,n,a);break}case`tangent`:{p(t.size===4);let r=i.getField(e,s);p(!!r,`No buffer view for ${e}`),D(t,n,r,a);break}case`olidColor`:p(t.size===4),O(t,4,i.getField(e,o),a)}}function P(e,t,n,r){let{data:i,stride:a,size:o,indices:s}=e;p(o===1,`Index should be 1D`);let c=s.length;for(let e=0;e<c;++e){let o=i[a*s[e]];t.set(n+e,r+o)}}function F(e,t,n,r){for(let i=0;i<r;++i)e.set(t+i,n)}export{N as writeAttribute,M as writeAttributes,h as writeBufferFloat,m as writeBufferFloat16,g as writeBufferInt16,S as writeBufferMat3f,C as writeBufferMat4f,_ as writeBufferUint32,v as writeBufferUint8,y as writeBufferVec2,b as writeBufferVec3,x as writeBufferVec4,O as writeColor,F as writeConstTextureElementIndex,A as writeDeltaF16Vector,E as writeNormal,w as writePosition,T as writePosition2d,D as writeTangent,P as writeTextureElementIndex,k as writeVVFeatureAttribute};
2
+ import{subtract as e,length as t,scale as n}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as r}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{hasIdentityRotation as i,isOrthoNormal as a}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{BufferViewVec4u8 as o,BufferViewVec4f as s,BufferViewFloat as c,BufferViewVec2i16 as l,BufferViewVec2f16 as u,BufferViewVec2f as d,BufferViewVec3f as f}from"../../../../../geometry/support/buffer/BufferView.js";import{assert as p}from"../../lib/Util.js";function m(e,t,n){let{data:r,indices:i}=e,a=t.typedBuffer,o=t.typedBufferStride,s=i.length;n*=o;for(let e=0;e<s;++e)a[n]=r[i[e]],n+=o}function h(e,t,n,r=1){let{data:i,indices:a}=e,o=t.typedBuffer,s=t.typedBufferStride,c=a.length;if(n*=s,r===1)for(let e=0;e<c;++e)o[n]=i[a[e]],n+=s;else for(let e=0;e<c;++e){let t=i[a[e]];for(let e=0;e<r;e++)o[n]=t,n+=s}}function g(e,t,n){let{data:r,indices:i}=e,a=t.typedBuffer,o=t.typedBufferStride,s=i.length;n*=o;for(let e=0;e<s;++e)a[n]=r[i[e]],n+=o}function _(e,t,n){let{data:r,stride:i,indices:a}=e,o=a.length;for(let e=0;e<o;++e)t.set(n+e,r[i*a[e]])}function v(e,t,n){let{data:r,stride:i,indices:a}=e,o=a.length;for(let e=0;e<o;++e)t.set(n+e,r[i*a[e]])}function y(e,t,n){let{data:r,indices:i}=e,a=t.typedBuffer,o=t.typedBufferStride,s=i.length;n*=o;for(let e=0;e<s;++e){let t=2*i[e];a[n]=r[t],a[n+1]=r[t+1],n+=o}}function b(e,t,n,r=1){let{data:i,indices:a}=e,o=t.typedBuffer,s=t.typedBufferStride,c=a.length;if(n*=s,r===1)for(let e=0;e<c;++e){let t=3*a[e];o[n]=i[t],o[n+1]=i[t+1],o[n+2]=i[t+2],n+=s}else for(let e=0;e<c;++e){let t=3*a[e];for(let e=0;e<r;++e)o[n]=i[t],o[n+1]=i[t+1],o[n+2]=i[t+2],n+=s}}function x(e,t,n,r=1){let{data:i,indices:a}=e,o=t.typedBuffer,s=t.typedBufferStride,c=a.length;if(n*=s,r===1)for(let e=0;e<c;++e){let t=4*a[e];o[n]=i[t],o[n+1]=i[t+1],o[n+2]=i[t+2],o[n+3]=i[t+3],n+=s}else for(let e=0;e<c;++e){let t=4*a[e];for(let e=0;e<r;++e)o[n]=i[t],o[n+1]=i[t+1],o[n+2]=i[t+2],o[n+3]=i[t+3],n+=s}}function S(e,t,n){let{data:r,indices:i}=e,a=t.typedBuffer,o=t.typedBufferStride,s=i.length;n*=o;for(let e=0;e<s;++e){let t=9*i[e];for(let e=0;e<9;++e)a[n+e]=r[t+e];n+=o}}function C(e,t,n){let{data:r,indices:i}=e,a=t.typedBuffer,o=t.typedBufferStride,s=i.length;n*=o;for(let e=0;e<s;++e){let t=16*i[e];for(let e=0;e<16;++e)a[n+e]=r[t+e];n+=o}}function w(e,t,n,r,a=1){if(!t){b(e,n,r,a);return}let{data:o,indices:s}=e,c=n.typedBuffer,l=n.typedBufferStride,u=s.length,d=t[0],f=t[1],p=t[2],m=t[4],h=t[5],g=t[6],_=t[8],v=t[9],y=t[10],x=t[12],S=t[13],C=t[14];r*=l;let w=0,T=0,E=0,D=i(t)?e=>{w=o[e]+x,T=o[e+1]+S,E=o[e+2]+C}:e=>{let t=o[e],n=o[e+1],r=o[e+2];w=d*t+m*n+_*r+x,T=f*t+h*n+v*r+S,E=p*t+g*n+y*r+C};if(a===1)for(let e=0;e<u;++e)D(3*s[e]),c[r]=w,c[r+1]=T,c[r+2]=E,r+=l;else for(let e=0;e<u;++e){D(3*s[e]);for(let e=0;e<a;++e)c[r]=w,c[r+1]=T,c[r+2]=E,r+=l}}function T(e,t,n,r){if(!t){y(e,n,r);return}let{data:a,indices:o}=e,s=n.typedBuffer,c=n.typedBufferStride,l=o.length,u=t[0],d=t[1],f=t[4],p=t[5],m=t[12],h=t[13];r*=c;let g=0,_=0,v=i(t)?e=>{g=a[e]+m,_=a[e+1]+h}:e=>{let t=a[e],n=a[e+1];g=u*t+f*n+m,_=d*t+p*n+h};for(let e=0;e<l;++e)v(2*o[e]),s[r]=g,s[r+1]=_,r+=c}function E(e,t,n,r,o=1){if(!t){b(e,n,r,o);return}let{data:s,indices:c}=e,l=t,u=n.typedBuffer,d=n.typedBufferStride,f=c.length,p=l[0],m=l[1],h=l[2],g=l[4],_=l[5],v=l[6],y=l[8],x=l[9],S=l[10],C=!a(l),w=1e-6,T=.999999;r*=d;let E=0,D=0,O=0,k=i(l)?e=>{E=s[e],D=s[e+1],O=s[e+2]}:e=>{let t=s[e],n=s[e+1],r=s[e+2];E=p*t+g*n+y*r,D=m*t+_*n+x*r,O=h*t+v*n+S*r};if(o===1){if(C)for(let e=0;e<f;++e){k(3*c[e]);let t=E*E+D*D+O*O;if(t<T&&t>w){let e=1/Math.sqrt(t);u[r]=E*e,u[r+1]=D*e,u[r+2]=O*e}else u[r]=E,u[r+1]=D,u[r+2]=O;r+=d}else for(let e=0;e<f;++e)k(3*c[e]),u[r]=E,u[r+1]=D,u[r+2]=O,r+=d}else for(let e=0;e<f;++e){if(k(3*c[e]),C){let e=E*E+D*D+O*O;if(e<T&&e>w){let t=1/Math.sqrt(e);E*=t,D*=t,O*=t}}for(let e=0;e<o;++e)u[r]=E,u[r+1]=D,u[r+2]=O,r+=d}}function D(e,t,n,r,i=1){if(!t){x(e,n,r,i);return}let{data:o,indices:s}=e,c=t,l=n.typedBuffer,u=n.typedBufferStride,d=s.length,f=c[0],p=c[1],m=c[2],h=c[4],g=c[5],_=c[6],v=c[8],y=c[9],b=c[10],S=!a(c),C=1e-6,w=.999999;if(r*=u,i===1)for(let e=0;e<d;++e){let t=4*s[e],n=o[t],i=o[t+1],a=o[t+2],c=o[t+3],d=f*n+h*i+v*a,x=p*n+g*i+y*a,T=m*n+_*i+b*a;if(S){let e=d*d+x*x+T*T;if(e<w&&e>C){let t=1/Math.sqrt(e);d*=t,x*=t,T*=t}}l[r]=d,l[r+1]=x,l[r+2]=T,l[r+3]=c,r+=u}else for(let e=0;e<d;++e){let t=4*s[e],n=o[t],a=o[t+1],c=o[t+2],d=o[t+3],x=f*n+h*a+v*c,T=p*n+g*a+y*c,E=m*n+_*a+b*c;if(S){let e=x*x+T*T+E*E;if(e<w&&e>C){let t=1/Math.sqrt(e);x*=t,T*=t,E*=t}}for(let e=0;e<i;++e)l[r]=x,l[r+1]=T,l[r+2]=E,l[r+3]=d,r+=u}}function O(e,t,n,r,i=1){let{data:a,indices:o}=e,s=n.typedBuffer,c=n.typedBufferStride,l=o.length;if(r*=c,t===a.length&&t===4){s[r]=a[0],s[r+1]=a[1],s[r+2]=a[2],s[r+3]=a[3];let e=new Uint32Array(n.typedBuffer.buffer,n.start),t=c/4;r/=4;let o=e[r];r+=t;let u=l*i;for(let n=1;n<u;++n)e[r]=o,r+=t}else if(i===1){if(t===4){for(let e=0;e<l;++e){let t=4*o[e];s[r]=a[t],s[r+1]=a[t+1],s[r+2]=a[t+2],s[r+3]=a[t+3],r+=c}return}for(let e=0;e<l;++e){let t=3*o[e];s[r]=a[t],s[r+1]=a[t+1],s[r+2]=a[t+2],s[r+3]=255,r+=c}}else if(t===4)for(let e=0;e<l;++e){let t=4*o[e];for(let e=0;e<i;++e)s[r]=a[t],s[r+1]=a[t+1],s[r+2]=a[t+2],s[r+3]=a[t+3],r+=c}else for(let e=0;e<l;++e){let t=3*o[e];for(let e=0;e<i;++e)s[r]=a[t],s[r+1]=a[t+1],s[r+2]=a[t+2],s[r+3]=255,r+=c}}function k(e,t,n){let{data:r,indices:i}=e,a=t.typedBuffer,o=t.typedBufferStride,s=i.length,c=r[0];n*=o;for(let e=0;e<s;++e)a[n]=c,n+=o}function A(r,i,a,o){e(j,r,i);let s=Math.max(Math.sqrt(t(j)),1e-4);n(j,j,1/s),a[o++]=j[0],a[o++]=j[1],a[o++]=j[2],a[o++]=s}const j=r();function M(e,t,n,r,i){let{buffer:a,offset:o}=i;for(let i of t.fields.keys()){let t=e.get(i),s=t?.indices;t&&s&&N(i,t,n,r,a,o)}}function N(e,t,n,r,i,a){switch(e){case`position`:{p(t.size===3);let r=i.getField(e,f);p(!!r,`No buffer view for ${e}`),w(t,n,r,a);break}case`normal`:{p(t.size===3);let n=i.getField(e,f);p(!!n,`No buffer view for ${e}`),E(t,r,n,a);break}case`normalCompressed`:case`profileRight`:case`profileUp`:{p(t.size===2);let n=i.getField(e,l);p(!!n,`No buffer view for ${e}`),y(t,n,a);break}case`uv0`:{p(t.size===2);let n=i.getField(e,u)??i.getField(e,d);p(!!n,`No buffer view for ${e}`),y(t,n,a);break}case`uvi`:{p(t.size===2);let n=i.getField(e,l);p(!!n,`No buffer view for ${e}`),y(t,n,a);break}case`color`:case`symbolColor`:{let n=i.getField(e,o);p(!!n,`No buffer view for ${e}`),p(t.size===3||t.size===4),O(t,t.size,n,a);break}case`colorFeatureAttribute`:case`opacityFeatureAttribute`:case`sizeFeatureAttribute`:{let n=i.getField(e,c)??i.getField(e,c);p(!!n,`No buffer view for ${e}`),p(t.size===1),k(t,n,a);break}case`tangent`:{p(t.size===4);let r=i.getField(e,s);p(!!r,`No buffer view for ${e}`),D(t,n,r,a);break}case`olidColor`:p(t.size===4),O(t,4,i.getField(e,o),a)}}function P(e,t,n,r){let{data:i,stride:a,size:o,indices:s}=e;p(o===1,`Index should be 1D`);let c=s.length;for(let e=0;e<c;++e){let o=i[a*s[e]];t.set(n+e,r+o)}}function F(e,t,n,r){for(let i=0;i<r;++i)e.set(t+i,n)}export{N as writeAttribute,M as writeAttributes,h as writeBufferFloat,m as writeBufferFloat16,g as writeBufferInt16,S as writeBufferMat3f,C as writeBufferMat4f,_ as writeBufferUint32,v as writeBufferUint8,y as writeBufferVec2,b as writeBufferVec3,x as writeBufferVec4,O as writeColor,F as writeConstTextureElementIndex,A as writeDeltaF16Vector,E as writeNormal,w as writePosition,T as writePosition2d,D as writeTangent,P as writeTextureElementIndex,k as writeVVFeatureAttribute};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{fromTranslation as e}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as t}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{negate as n,equals as r,transformMat4 as i}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a,UNIT_X as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as s}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewVec4f16 as c,BufferViewVec3f as l,BufferViewVec2f16 as u,BufferViewVec4u8 as d,BufferViewFloat as f,BufferViewFloat16 as p,BufferViewVec3f16 as m}from"../../../../../geometry/support/buffer/BufferView.js";import{BufferGeometry as h}from"../../lib/BufferGeometry.js";import{Buffers as g}from"../../lib/Buffers.js";import{createVerticesView as _}from"../../lib/VerticesView.js";import{writeDeltaF16Vector as v}from"./bufferWriterUtils.js";import{getLayout as y}from"../../shaders/lineMarkerLayouts.js";function b(t,r,i){let{attributeData:a}=r,o=y(t.parameters).createBuffer(t.parameters.placement===`begin-end`?12:6);return n(k,i.vec3),e(A,k),x({position:_({data:a.position,size:3,stride:3},3),color:a.color??void 0,size:a.size??void 0,normal:a.normal??void 0,colorFeature:C(a.colorFeature),sizeFeature:C(a.sizeFeature),opacityFeature:C(a.opacityFeature)},t.parameters,{buffer:o,offset:0},A),new h(t,new g(o),i,r.mapPositions)}function x(e,t,n,r){S(e.position,t,{position:n.buffer.getField(`position`,l),previousDelta:n.buffer.getField(`previousDelta`,c),offset:n.offset},r);let{buffer:i,offset:a}=n,o=i.getField(`uv0`,u),s=i.getField(`color`,d),h=i.getField(`colorFeatureAttribute`,f),g=i.getField(`size`,p),_=i.getField(`sizeFeatureAttribute`,f),v=i.getField(`opacityFeatureAttribute`,f),y=i.getField(`normal`,m),b=t.placement===`begin-end`?12:6;for(let n=0;n<b;n++){let r=a+n,i=t.placement===`begin`||t.placement===`begin-end`&&n<6?0:e.position.count-1;if(o.setValues(r,w[n%6][0],w[n%6][1]),s!=null){let t=e.color??T,n=Math.min(i*4,t.length-4);s.setValues(r,t[n]*255,t[n+1]*255,t[n+2]*255,t[n+3]*255)}if(h?.set(r,e.colorFeature??0),v?.set(r,e.opacityFeature??0),g?.set(r,e.size??1),_?.set(r,e.sizeFeature??0),t.worldSpace){let t=e.normal??E;y.setValues(r,t[0],t[1],t[2])}}}function S(e,t,n,a=null){let{position:o,previousDelta:s}=n,c=n.offset,l=(t,n)=>{e.getVec(t,D);let l=t+n;do e.getVec(l,O),l+=n;while(r(D,O)&&l>=0&&l<e.count);a!=null&&(i(D,D,a),i(O,O,a));for(let e=0;e<6;e++,c++)o.setVec(c,D),v(O,D,s.typedBuffer,c*s.typedBufferStride)};(t.placement===`begin`||t.placement===`begin-end`)&&l(0,1),(t.placement===`end`||t.placement===`begin-end`)&&l(e.count-1,-1)}function C(e){return typeof e==`number`?e:e?.[0]}const w=[[-1,-1],[1,-1],[1,1],[-1,-1],[1,1],[-1,1]],T=s,E=o,D=a(),O=a(),k=a(),A=t();export{b as createLineMarkerBufferGeometry,x as writeLineMarkerBuffer,S as writeLineMarkerPositions};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{transformMat4 as e,distance as t,copy as n}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as r}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{BufferViewVec3f as i,BufferViewFloat as a,BufferViewVec4Unorm8 as o,BufferViewVec4u8 as s,BufferViewVec4f16 as c,BufferViewUint32 as l}from"../../../../../geometry/support/buffer/BufferView.js";import{olidEnabled as u}from"../../effects/geometry/olidUtils.js";import{encodeRibbonLineVertexInfo as d}from"../../lib/RibbonLineVertexInfo.js";import{assert as f}from"../../lib/Util.js";import{createVerticesView as p}from"../../lib/VerticesView.js";import{n as m}from"../../../../../chunks/RibbonLine.glsl.js";function h(e,t){return(e===`round`?m:0)+ +!!t}function g(e,t,n){let r=t?e:e-2,i=h(n.join,n.stipplePattern!=null),a=(t?2:4)+r*(i*2+4)+2;return n.wireframe?2+(a-2)*4:a}function _(e,t,n,r,i){let{buffer:a,offset:o}=r,s=a.getField(`ribbonLineVertexInfo`,l).typedBuffer,c=h(n.join,n.stipplePattern!=null),u=o+1,f=(e,t,n)=>{s[u++]=d(i+n+1,t,e)};t||(f(1,7,0),f(1,5,0));let p=t?e:e-1;for(let e=+!t;e<p;e++){f(0,2,e),f(0,0,e);for(let t=0;t<c;t++){let n=(t+1)/(c+1);f(n,2,e),f(n,0,e)}f(1,6,e),f(1,4,e)}f(0,t?2:3,p),f(0,+!t,p),s[o]=s[o+1],s[u]=s[u-1],u++,n.wireframe&&v(s,o,u)}function v(e,t,n){let r=n;for(let i=t;i<=n-4;i+=2)e[r++]=e[i],e[r++]=e[i+2],e[r++]=e[i+1],e[r++]=e[i+2],e[r++]=e[i+1],e[r++]=e[i+3]}function y(r,l,d,p){let m=r.position,{buffer:h,offset:g}=d,_=h.getField(`position`,i);f(_!=null,`Expected valid position field in texture buffer`);let v=h.getField(`u0`,a),y=r.distancesToStart,x=h.getField(`color`,o),S=h.getField(`size`,a),C=h.getField(`colorFeatureAttribute`,a),O=h.getField(`sizeFeatureAttribute`,a),k=h.getField(`opacityFeatureAttribute`,a),A=u()?h.getField(`olidColor`,o):null,j=A==null?null:new s(A.buffer,A.start,A.stride),M=h.getField(`timeStamps`,c),N=0;for(let i=0;i<m.count;i++){m.getVec(i,E),p!=null&&e(E,E,p),v!=null&&i>0&&(y==null?N+=t(D,E):N=y[i]??N);let a=g+i+1;if(_.setVec(a,E),v!=null&&(v.set(a,N),n(D,E)),S?.set(a,w(r.size,i,1)),x!=null){let e=r.color??T,t=Math.min(i*4,e.length-4);x.setValues(a,e[t],e[t+1],e[t+2],e[t+3])}if(C?.set(a,w(r.colorFeature,i)),k?.set(a,w(r.opacityFeature,i)),O?.set(a,w(r.sizeFeature,i)),M!=null&&r.timeStamps!=null&&M.setValues(a,r.timeStamps[i*4],r.timeStamps[i*4+1],r.timeStamps[i*4+2],r.timeStamps[i*4+3]),j!=null&&r.olidColor!=null){let e=Math.min(i*4,r.olidColor.length-4);j.setValues(a,r.olidColor[e],r.olidColor[e+1],r.olidColor[e+2],r.olidColor[e+3])}}b(h,m.count,l,g),l&&v!=null&&(m.getVec(0,E),p!=null&&e(E,E,p),v.set(g+m.count+1,y?.[m.count]??N+t(D,E)))}function b(e,t,n,r=0){let i=r+1,a=r+t;n?(e.copyItem(a,r),e.copyItem(i,a+1),e.copyItem(i+1,a+2)):(e.copyItem(i,r),e.copyItem(a,a+1))}function x(e,t){let n=e.count-(t&&e.count>4?3:2);return e.slice(1,n)}function S(e,t){if(e.type===1)return x(e.buffers.storage.getField(`position`,i),t);let n=e.attributes.get(`position`);return p(n,3)}function C(e,r){let o=e.buffers.storage,s=o.getField(`u0`,a);if(s==null)return;let c=x(o.getField(`position`,i),r),l=0;for(let e=0;e<c.count;e++)c.getVec(e,E),e>0&&(l+=t(D,E)),s.set(e+1,l),n(D,E);r&&c.count>2?(c.getVec(0,E),s.set(0,l),s.set(c.count+1,l+t(D,E)),s.set(c.count+2,s.get(2))):(s.set(0,0),s.set(c.count+1,l))}function w(e,t,n=0){return typeof e==`number`?e:e?.[e.length===1?0:t]??n}const T=[1,1,1,1],E=r(),D=r();export{b as fillRibbonLinePadding,h as getNumJoinSubdivisions,x as getRibbonLineBufferPositions,S as getRibbonLinePositions,g as ribbonLineVertexCount,C as updateRibbonLineDistances,y as writeRibbonLineTextureBuffer,_ as writeRibbonLineVertices};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import{disposeMaybe as n}from"../../../../../core/maybe.js";import{property as r,subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{GLMaterialLoader as a}from"../../lib/GLMaterialLoader.js";import{assert as o}from"../../lib/Util.js";import{DrawParameters as s}from"../DrawParameters.js";import{getStrideForDataType as c}from"./IndexLayout.js";import{defaultHighlightName as l}from"../../../../support/HighlightDefaults.js";let u=class extends t{constructor(e){super(e),this._glMaterialLoader=null,this._drawParameters=new s,this._highlightNames=new Set,this._produces=new Map}initialize(){this._updateProduces()}destroy(){this.uninitializeRenderContext()}get _hasHighlights(){return this._highlightNames.size>0}hasHighlight(e){return this._highlightNames.has(e)}get produces(){return this._produces}_updateProduces(){this.material.produces.forEach((e,t)=>{this._produces.set(t,t=>this.dataByBaseInstance.size===0||(t===10||t===6)&&!this._hasHighlights?!1:e(t))})}initializeRenderContext(e){this._glMaterialLoader=new a(this.material,e.materials)}uninitializeRenderContext(){this._glMaterialLoader=n(this._glMaterialLoader)}acquireTechniques(e){if(!this.material.shouldRender(e))return null;let{output:t,bind:n}=e;if(!this.material.produces.get(n.slot)?.(t))return null;let{highlight:r,slot:i}=n,a=t===6,o=t===10,s=o||a,c=r?.name;if(s&&(this._highlightNames.size===0||o&&c&&!this._highlightNames.has(c)))return null;let u=e=>o&&!!c&&!e.has(c),d=t===7,f=!(s||d);for(let r of this.dataByBaseInstance.values())for(let o of r.dataByOrigin.values())for(let r of o.buffers){if(u(r.highlightNames))continue;let o=a?r.drawCommandsHighlights.get(l):s?c?r.drawCommandsHighlights.get(c):r.drawCommandsHighlights.size>0:((d&&r.needsMultipleCommands?r.drawCommandsShadowHighlightRest:r.drawCommandsDefault)||null)?.length??!1,p=f&&r.drawCommandsOccludees||null;if(o||p?.length){let r=this._glMaterialLoader.load(e.rctx,i,t)?.beginSlot(n);if(r)return r}}return null}render(e,t){let{output:n,bind:r}=e,{highlight:i}=r,a=n===10,s=i?.name??``;if(a&&!i)return;let c=n===6,u=a||c,g=n===7,_=!(u||g),{rctx:v}=e,x=v.bindTechnique(t,r,this.material.parameters),S=this.material.useIndexing;for(let e of this.dataByBaseInstance.values()){let{baseInstanceData:n}=e,i=n!=null;o(!(i&&S),`Instanced indexed rendering is not supported`);let C=i?h:S?m:p,w=i?f:d;for(let i of e.dataByOrigin.values()){this._drawParameters.origin=i.origin;for(let e of i.buffers){if(a&&(!e.hasHighlights||!e.drawCommandsHighlights.has(s))||c&&(!e.hasHighlights||!e.drawCommandsHighlights.has(l)))continue;this._drawParameters.textureBuffer=e.textureBuffer?.texture;let i=w(e),o=y(i,e.needsMultipleCommands,s,c,u,g),d=b(i,_);(o?.length||d?.length)&&(x.bindDraw(r,this.material.parameters,this._drawParameters),C(v,e,n,t,o,d,r,this.material.parameters)),this._drawParameters.textureBuffer=null}}}}updateHighlights(){let{_highlightNames:e}=this;e.clear();for(let t of this.dataByBaseInstance.values())for(let n of t.dataByOrigin.values())for(let t of n.buffers)for(let n of t.highlightNames)e.add(n);this._updateProduces()}get test(){}};e([r({constructOnly:!0})],u.prototype,`material`,void 0),e([r({constructOnly:!0})],u.prototype,`dataByBaseInstance`,void 0),u=e([i(`esri.views.3d.webgl-engine.materials.renderers.VaoRenderer`)],u);const d=e=>e,f=e=>e.instancedCommandVAOs,p=(e,{vao:t},n,r,i,a,o,s)=>{r.ensureAttributeLocations(t),e.bindVAO(t),g(e,r,i,o,s,!1),g(e,r,a,o,s,!0)},m=(e,{vao:t},n,r,i,a,s,c)=>{r.ensureAttributeLocations(t),e.bindVAO(t);let l=t.indexBuffer?.indexType;o(l!=null,`Missing index array`),_(e,r,i,s,c,!1,l),_(e,r,a,s,c,!0,l)},h=(e,t,{baseCommand:n},r,i,a,o,s)=>{v(e,r,n,i,o,s,!1),v(e,r,n,a,o,s,!0)};function g(e,t,n,r,i,a){if(n?.length){e.setPipelineState(t.getPipeline(r,i,a));for(let r of n)e.drawArrays(t.primitiveType,r.first,r.count)}}function _(e,t,n,r,i,a,o){if(!n?.length)return;let s=c(o);e.setPipelineState(t.getPipeline(r,i,a));for(let r of n)e.drawElements(t.primitiveType,r.count,o,r.first*s)}function v(e,t,{first:n,count:r},i,a,o,s){if(i?.length){e.setPipelineState(t.getPipeline(a,o,s));for(let{vao:a,instanceCount:o}of i)t.ensureAttributeLocations(a),e.bindVAO(a),e.drawArraysInstanced(t.primitiveType,n,r,o)}}function y(e,t,n,r,i,a){let o=i&&!r?e.drawCommandsHighlights.get(n)??null:null;return r?e.drawCommandsHighlights.get(l):i?o:a&&t?e.drawCommandsShadowHighlightRest:e.drawCommandsDefault}function b(e,t){return t&&e.drawCommandsOccludees||null}export{u as VaoRenderer};
2
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import"../../../../../core/has.js";import{disposeMaybe as n}from"../../../../../core/maybe.js";import{property as r,subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{GLMaterialLoader as a}from"../../lib/GLMaterialLoader.js";import{assert as o}from"../../lib/Util.js";import{DrawParameters as s}from"../DrawParameters.js";import{getStrideForDataType as c}from"./IndexLayout.js";import{defaultHighlightName as l}from"../../../../support/HighlightDefaults.js";let u=class extends t{constructor(e){super(e),this._glMaterialLoader=null,this._drawParameters=new s,this._highlightNames=new Set,this._produces=new Map}initialize(){this.material.produces.forEach((e,t)=>{this._produces.set(t,t=>this.dataByBaseInstance.size===0||(t===10||t===6)&&!this._hasHighlights?!1:e(t))})}destroy(){this.uninitializeRenderContext()}get _hasHighlights(){return this._highlightNames.size>0}hasHighlight(e){return this._highlightNames.has(e)}get produces(){return this._produces}initializeRenderContext(e){this._glMaterialLoader=new a(this.material,e.materials)}uninitializeRenderContext(){this._glMaterialLoader=n(this._glMaterialLoader)}acquireTechniques(e){if(!this.material.shouldRender(e))return null;let{output:t,bind:n}=e;if(!this.material.produces.get(n.slot)?.(t))return null;let{highlight:r,slot:i}=n,a=t===6,o=t===10,s=o||a,c=r?.name;if(s&&(this._highlightNames.size===0||o&&c&&!this._highlightNames.has(c)))return null;let u=e=>o&&!!c&&!e.has(c),d=t===7,f=!(s||d);for(let r of this.dataByBaseInstance.values())for(let o of r.dataByOrigin.values())for(let r of o.buffers){if(u(r.highlightNames))continue;let o=a?r.drawCommandsHighlights.get(l):s?c?r.drawCommandsHighlights.get(c):r.drawCommandsHighlights.size>0:((d&&r.needsMultipleCommands?r.drawCommandsShadowHighlightRest:r.drawCommandsDefault)||null)?.length??!1,p=f&&r.drawCommandsOccludees||null;if(o||p?.length){let r=this._glMaterialLoader.load(e.rctx,i,t)?.beginSlot(n);if(r)return r}}return null}render(e,t){let{output:n,bind:r}=e,{highlight:i}=r,a=n===10,s=i?.name??``;if(a&&!i)return;let c=n===6,u=a||c,g=n===7,_=!(u||g),{rctx:v}=e,x=v.bindTechnique(t,r,this.material.parameters),S=this.material.useIndexing;for(let e of this.dataByBaseInstance.values()){let{baseInstanceData:n}=e,i=n!=null;o(!(i&&S),`Instanced indexed rendering is not supported`);let C=i?h:S?m:p,w=i?f:d;for(let i of e.dataByOrigin.values()){this._drawParameters.origin=i.origin;for(let e of i.buffers){if(a&&(!e.hasHighlights||!e.drawCommandsHighlights.has(s))||c&&(!e.hasHighlights||!e.drawCommandsHighlights.has(l)))continue;this._drawParameters.textureBuffer=e.textureBuffer?.texture;let i=w(e),o=y(i,e.needsMultipleCommands,s,c,u,g),d=b(i,_);(o?.length||d?.length)&&(x.bindDraw(r,this.material.parameters,this._drawParameters),C(v,e,n,t,o,d,r,this.material.parameters)),this._drawParameters.textureBuffer=null}}}}updateHighlights(){let{_highlightNames:e}=this;e.clear();for(let t of this.dataByBaseInstance.values())for(let n of t.dataByOrigin.values())for(let t of n.buffers)for(let n of t.highlightNames)e.add(n)}get test(){}};e([r({constructOnly:!0})],u.prototype,`material`,void 0),e([r({constructOnly:!0})],u.prototype,`dataByBaseInstance`,void 0),u=e([i(`esri.views.3d.webgl-engine.materials.renderers.VaoRenderer`)],u);const d=e=>e,f=e=>e.instancedCommandVAOs,p=(e,{vao:t},n,r,i,a,o,s)=>{r.ensureAttributeLocations(t),e.bindVAO(t),g(e,r,i,o,s,!1),g(e,r,a,o,s,!0)},m=(e,{vao:t},n,r,i,a,s,c)=>{r.ensureAttributeLocations(t),e.bindVAO(t);let l=t.indexBuffer?.indexType;o(l!=null,`Missing index array`),_(e,r,i,s,c,!1,l),_(e,r,a,s,c,!0,l)},h=(e,t,{baseCommand:n},r,i,a,o,s)=>{v(e,r,n,i,o,s,!1),v(e,r,n,a,o,s,!0)};function g(e,t,n,r,i,a){if(n?.length){e.setPipelineState(t.getPipeline(r,i,a));for(let r of n)e.drawArrays(t.primitiveType,r.first,r.count)}}function _(e,t,n,r,i,a,o){if(!n?.length)return;let s=c(o);e.setPipelineState(t.getPipeline(r,i,a));for(let r of n)e.drawElements(t.primitiveType,r.count,o,r.first*s)}function v(e,t,{first:n,count:r},i,a,o,s){if(i?.length){e.setPipelineState(t.getPipeline(a,o,s));for(let{vao:a,instanceCount:o}of i)t.ensureAttributeLocations(a),e.bindVAO(a),e.drawArraysInstanced(t.primitiveType,n,r,o)}}function y(e,t,n,r,i,a){let o=i&&!r?e.drawCommandsHighlights.get(n)??null:null;return r?e.drawCommandsHighlights.get(l):i?o:a&&t?e.drawCommandsShadowHighlightRest:e.drawCommandsDefault}function b(e,t){return t&&e.drawCommandsOccludees||null}export{u as VaoRenderer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{isImagePattern as e}from"./lineStippleUtils.js";import{ProceduralTextureRepository as t}from"./ProceduralTextureRepository.js";import{PixelType as n,SizedPixelFormat as r}from"../../../webgl/enums.js";import i from"../../../webgl/Texture.js";import{TextureDescriptor as a}from"../../../webgl/TextureDescriptor.js";function o(o,c){return new t(t=>{if(e(t))return u(o,t.image);let{data:c,textureSize:l}=s(t),d=new a(l,1);return d.dataType=n.FLOAT,d.pixelFormat=6403,d.internalFormat=r.R16F,d.wrapMode=10497,new i(o,d,c)},t=>e(t)?`image-${t.uuid}`:`${t.pattern.join(`,`)}-r${t.pixelRatio}`,c)}function s(e){let t=c(e),n=1/e.pixelRatio,r=l(e),i=[],a=0,o=0,s=0,u=1;for(let e of t)e>0&&(o!==u&&(i.push(s),a||=u),o=u,s+=e),u=-u;i.length>1&&a===o&&(i[0]=i.pop());let d=Math.round(t[0]/2),f=new Float32Array(r);if(i.length===1)f.fill(a*65504);else if(i.length>1){let e=0,t=a,o=i[0]===0?0:i[0]-r,s=i[1];for(let a=0;a<r;a++){let c=a+d+.5;if(c>=s){e=(e+1)%i.length,t=-t,o=s;let n=i[(e+1)%i.length];s+=(n-i[e]+r)%r}f[a]=t*Math.min(c-o,s-c)*n}}return{data:f,textureSize:r}}function c(e){return e.pattern.map(t=>Math.round(t*e.pixelRatio))}function l(e){if(e==null)return 1;let t=c(e);return Math.floor(t.reduce((e,t)=>e+t,0))}function u(e,t){let{data:o,width:s,height:c}=t,l=new a(s,c);return l.dataType=n.UNSIGNED_BYTE,l.pixelFormat=6408,l.internalFormat=r.RGBA8,l.wrapMode={s:10497,t:33071},l.hasMipmap=!0,l.samplingMode=9987,new i(e,l,o)}export{l as computeTextureSize,o as createStippleTextureRepository,u as imageToTexture,s as patternToTextureData};
2
+ import{isImagePattern as e}from"./lineStippleUtils.js";import{ProceduralTextureRepository as t}from"./ProceduralTextureRepository.js";import{PixelType as n,SizedPixelFormat as r}from"../../../webgl/enums.js";import{Texture as i}from"../../../webgl/Texture.js";import{TextureDescriptor as a}from"../../../webgl/TextureDescriptor.js";function o(o,c){return new t(t=>{if(e(t))return u(o,t.image);let{data:c,textureSize:l}=s(t),d=new a(l,1);return d.dataType=n.FLOAT,d.pixelFormat=6403,d.internalFormat=r.R16F,d.wrapMode=10497,new i(o,d,c)},t=>e(t)?`image-${t.uuid}`:`${t.pattern.join(`,`)}-r${t.pixelRatio}`,c)}function s(e){let t=c(e),n=1/e.pixelRatio,r=l(e),i=[],a=0,o=0,s=0,u=1;for(let e of t)e>0&&(o!==u&&(i.push(s),a||=u),o=u,s+=e),u=-u;i.length>1&&a===o&&(i[0]=i.pop());let d=Math.round(t[0]/2),f=new Float32Array(r);if(i.length===1)f.fill(a*65504);else if(i.length>1){let e=0,t=a,o=i[0]===0?0:i[0]-r,s=i[1];for(let a=0;a<r;a++){let c=a+d+.5;if(c>=s){e=(e+1)%i.length,t=-t,o=s;let n=i[(e+1)%i.length];s+=(n-i[e]+r)%r}f[a]=t*Math.min(c-o,s-c)*n}}return{data:f,textureSize:r}}function c(e){return e.pattern.map(t=>Math.round(t*e.pixelRatio))}function l(e){if(e==null)return 1;let t=c(e);return Math.floor(t.reduce((e,t)=>e+t,0))}function u(e,t){let{data:o,width:s,height:c}=t,l=new a(s,c);return l.dataType=n.UNSIGNED_BYTE,l.pixelFormat=6408,l.internalFormat=r.RGBA8,l.wrapMode={s:10497,t:33071},l.hasMipmap=!0,l.samplingMode=9987,new i(e,l,o)}export{l as computeTextureSize,o as createStippleTextureRepository,u as imageToTexture,s as patternToTextureData};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as n,freeze as r,create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{VertexNormalPassParameters as c,VertexNormalDrawParameters as l}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as u}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as d}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as f}from"../effects/geometry/olidUtils.js";import{depthWrite as p,blending as m,depthTest as h}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as g,stencilBaseAllZeros as _,stencilWriteMaskOn as v}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as y}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as b}from"../materials/pbrUtils.js";import{polygonOffset as x}from"../materials/PolygonOffset.js";import{D as S}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as C,cullingParams as w,defaultColorWrite as T}from"../../../webgl/renderState.js";import{alphaCutoff as E}from"../../../../webscene/support/AlphaCutoff.js";class D extends c{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=b,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType=`normal`,this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=n,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=r(.2,.2,.2),this.diffuse=r(.8,.8,.8),this.externalColor=a(1,1,1,1),this.colorMixMode=`multiply`,this.opacity=1,this.layerOpacity=1,this.origin=i(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=E,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class O extends l{constructor(){super(...arguments),this.origin=i(),this.slicePlaneLocalOrigin=this.origin}get localOrigin(){return this.origin}}let k=class extends d{constructor(e,t){let n=o(M(t));t.instanced&&t.instancedDoublePrecision&&(n=n.concat(o(y(t)))),super(e,t,n),this.shader=new u(S,()=>import(`./DefaultMaterial.glsl.js`)),this.ignoreUnused=!0}_makePipeline(e,t){let{output:n,transparent:r,cullFace:i,customDepthTest:a,hasOccludees:o}=e;return C({blending:r?m(n,!1,e.emissionDimmingPass):null,culling:j(e)?w(i):null,depthTest:h(n,A(a)),depthWrite:p(e),colorWrite:T,stencilWrite:o?v:null,stencilTest:o?t?g:_:null,polygonOffset:x(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,n){return n?this._occludeePipelineState:super.getPipeline(e,t,n)}};k=e([t(`esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique`)],k);function A(e){switch(e){case 1:return 515;case 0:return 513;case 2:return 516;case 3:return 514;case 4:return 513}}function j(e){return e.cullFace!==0||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function M(e){let t=s().vec3f(`position`);return e.normalType===1?t.vec2i16(`normalCompressed`,{glNormalized:!0}):t.vec3f(`normal`),e.hasVertexTangents&&t.vec4f(`tangent`),e.hasTextures&&t.vec2f16(`uv0`),e.hasVertexColors&&t.vec4u8(`color`,{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8(`symbolColor`),!e.instanced&&f()&&t.vec4u8(`olidColor`),t}export{O as DefaultMaterialDrawParameters,D as DefaultMaterialPassParameters,k as DefaultMaterialTechnique,M as getLayout,j as isCullingRequired};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as n,freeze as r,create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{VertexNormalPassParameters as c,VertexNormalDrawParameters as l}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as u}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as d}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as f}from"../effects/geometry/olidUtils.js";import{depthWrite as p,depthTest as m,blending as h}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as g,stencilBaseAllZeros as _,stencilWriteMaskOn as v}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as y}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as b}from"../materials/pbrUtils.js";import{polygonOffset as x}from"../materials/PolygonOffset.js";import{D as S}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as C,defaultColorWrite as w,cullingParams as T}from"../../../webgl/renderState.js";import{alphaCutoff as E}from"../../../../webscene/support/AlphaCutoff.js";class D extends c{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=b,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType=`normal`,this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=n,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=r(.2,.2,.2),this.diffuse=r(.8,.8,.8),this.externalColor=a(1,1,1,1),this.colorMixMode=`multiply`,this.opacity=1,this.layerOpacity=1,this.origin=i(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=E,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class O extends l{constructor(){super(...arguments),this.origin=i(),this.slicePlaneLocalOrigin=this.origin}get localOrigin(){return this.origin}}let k=class extends d{constructor(e,t){let n=o(M(t));t.instanced&&t.instancedDoublePrecision&&(n=n.concat(o(y(t)))),super(e,t,n),this.shader=new u(S,()=>import(`./DefaultMaterial.glsl.js`)),this.ignoreUnused=!0}_makePipeline(e,t){let{output:n,transparent:r,cullFace:i,customDepthTest:a,hasOccludees:o}=e;return C({blending:r?h(n,!1,e.emissionDimmingPass):null,culling:j(e)?T(i):null,depthTest:m(n,A(a)),depthWrite:p(e),colorWrite:w,stencilWrite:o?v:null,stencilTest:o?t?g:_:null,polygonOffset:x(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,n){return n?this._occludeePipelineState:super.getPipeline(e,t,n)}};k=e([t(`esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique`)],k);function A(e){switch(e){case 1:return 515;case 0:return 513;case 2:return 516;case 3:return 514;case 4:return 513}}function j(e){return e.cullFace!==0||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function M(e){let t=s().vec3f(`position`);return e.normalType===1?t.vec2i16(`normalCompressed`,{glNormalized:!0}):t.vec3f(`normal`),e.hasVertexTangents&&t.vec4f(`tangent`),e.hasTextures&&t.vec2f16(`uv0`),e.hasVertexColors&&t.vec4u8(`color`,{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8(`symbolColor`),!e.instanced&&f()&&t.vec4u8(`olidColor`),t}export{O as DefaultMaterialDrawParameters,D as DefaultMaterialPassParameters,k as DefaultMaterialTechnique,M as getLayout,j as isCullingRequired};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as n}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{isOITColorAlpha as i}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as a}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as s}from"../effects/geometry/olidUtils.js";import{blending as c}from"../lib/OrderIndependentTransparency.js";import{polygonOffset as l}from"../materials/PolygonOffset.js";import{H as u}from"../../../../chunks/HUDMaterial.glsl.js";import{PrimitiveType as d}from"../../../webgl/enums.js";import{makePipelineState as f,defaultColorWrite as p,defaultDepthWrite as m}from"../../../webgl/renderState.js";let h=class extends o{constructor(e,t){super(e,t,n(g).concat(n(_(t)))),this.shader=new a(u,()=>import(`./HUDMaterial.glsl.js`)),this.ignoreUnused=!0,this.primitiveType=d.TRIANGLE_STRIP}initializePipeline(e){let{draped:t,output:n,depthTestEnabled:r}=e,a=i(n),o=r&&!t&&!a&&n!==10;return f({blending:c(n,!0),depthTest:r&&!t?{func:515}:null,depthWrite:o?m:null,colorWrite:p,polygonOffset:l(e)})}};h=e([t(`esri.views.3d.webgl-engine.shaders.HUDMaterialTechnique`)],h);const g=r().vec2u8(`uv0`,{glNormalized:!0});function _(e){let t=r().vec3f(`position`).vec3f(`normal`).f32(`groundDistance`);return e.hasVertexCenterOffset&&(t=t.vec3f(`centerOffset`)),e.hasVertexColor&&(t=t.vec4u8(`color`,{glNormalized:!0})),e.hasVertexSize&&(t=t.vec2f(`size`)),e.hasVertexRotation&&(t=t.f32(`rotation`)),(e.hasVVColor||e.hasVVSize)&&(t=t.vec4f(`featureAttribute`)),e.hasVertexUVi&&(t=t.vec4i16(`uvi`)),s()?t.vec4u8(`olidColor`):t}export{h as HUDMaterialTechnique,g as baseLayout,_ as getInstanceLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as n}from"../../support/buffer/glUtil.js";import{isOITColorAlpha as r}from"../core/shaderLibrary/ShaderOutput.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as a}from"../core/shaderTechnique/ShaderTechnique.js";import{blending as o}from"../lib/OrderIndependentTransparency.js";import{polygonOffset as s}from"../materials/PolygonOffset.js";import{H as c}from"../../../../chunks/HUDMaterial.glsl.js";import{baseLayout as l,getInstanceLayout as u}from"./hudMaterialLayouts.js";import{PrimitiveType as d}from"../../../webgl/enums.js";import{makePipelineState as f,defaultColorWrite as p,defaultDepthWrite as m}from"../../../webgl/renderState.js";let h=class extends a{constructor(e,t){super(e,t,n(l).concat(n(u(t)))),this.shader=new i(c,()=>import(`./HUDMaterial.glsl.js`)),this.ignoreUnused=!0,this.primitiveType=d.TRIANGLE_STRIP}initializePipeline(e){let{draped:t,output:n,depthTestEnabled:i}=e,a=r(n),c=i&&!t&&!a&&n!==10;return f({blending:o(n,!0),depthTest:i&&!t?{func:515}:null,depthWrite:c?m:null,colorWrite:p,polygonOffset:s(e)})}};h=e([t(`esri.views.3d.webgl-engine.shaders.HUDMaterialTechnique`)],h);export{h as HUDMaterialTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as n}from"../../support/buffer/glUtil.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as i}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as a}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as o,depthTest as s,blending as c}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as l,stencilBaseAllZeros as u,stencilWriteMaskOn as d,stencilToolTransparentOccluder as f,depthCompareAlways as p,stencilToolMaskOccluder as m,stencilWriteMaskOff as h,depthCompareLess as g}from"../lib/StencilUtils.js";import{lineMarkerPolygonOffset as _}from"../materials/PolygonOffset.js";import{L as v}from"../../../../chunks/LineMarker.glsl.js";import{makePipelineState as y,defaultColorWrite as b,unpremultipliedAlphaToPremultipliedAlpha as x}from"../../../webgl/renderState.js";let S=class extends a{constructor(e,t){super(e,t,n(C(t))),this.shader=new i(v,()=>import(`./LineMarker.glsl.js`))}_makePipelineState(e,t){let{output:n,draped:r,hasOccludees:i}=e;return y({blending:c(n,!1,e.emissionDimmingPass),depthTest:r?null:s(n),depthWrite:o(e),colorWrite:b,stencilWrite:i?d:null,stencilTest:i?t?l:u:null,polygonOffset:_})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=y({blending:x,depthTest:p,depthWrite:null,colorWrite:b,stencilWrite:null,stencilTest:f}),this._occluderPipelineOpaque=y({blending:x,depthTest:p,depthWrite:null,colorWrite:b,stencilWrite:h,stencilTest:m}),this._occluderPipelineMaskWrite=y({blending:null,depthTest:g,depthWrite:null,colorWrite:null,stencilWrite:d,stencilTest:l})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t,n){return n?this._occludeePipelineState:e.occluder===11?this._occluderPipelineTransparent??super.getPipeline(e,t,n):e.occluder===10?this._occluderPipelineOpaque??super.getPipeline(e,t,n):this._occluderPipelineMaskWrite??super.getPipeline(e,t,n)}};S=e([t(`esri.views.3d.webgl-engine.shaders.LineMarkerTechnique`)],S);function C(e){let t=r().vec3f(`position`).vec4f16(`previousDelta`).vec2f16(`uv0`);return e.hasVVColor?t.f32(`colorFeatureAttribute`):t.vec4u8(`color`,{glNormalized:!0}),e.hasVVOpacity&&t.f32(`opacityFeatureAttribute`),e.hasVVSize?t.f32(`sizeFeatureAttribute`):t.f16(`size`),e.worldSpace&&t.vec3f16(`normal`),t.freeze()}export{S as LineMarkerTechnique,C as getLayout};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{glLayout as n}from"../../support/buffer/glUtil.js";import{ReloadableShader as r}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../core/shaderTechnique/ShaderTechnique.js";import{depthWrite as a,depthTest as o,blending as s}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as c,stencilBaseAllZeros as l,stencilWriteMaskOn as u,stencilToolTransparentOccluder as d,depthCompareAlways as f,stencilToolMaskOccluder as p,stencilWriteMaskOff as m,depthCompareLess as h}from"../lib/StencilUtils.js";import{lineMarkerPolygonOffset as g}from"../materials/PolygonOffset.js";import{L as _}from"../../../../chunks/LineMarker.glsl.js";import{getLayout as v}from"./lineMarkerLayouts.js";import{makePipelineState as y,defaultColorWrite as b,unpremultipliedAlphaToPremultipliedAlpha as x}from"../../../webgl/renderState.js";let S=class extends i{constructor(e,t){super(e,t,n(v(t))),this.shader=new r(_,()=>import(`./LineMarker.glsl.js`))}_makePipelineState(e,t){let{output:n,draped:r,hasOccludees:i}=e;return y({blending:s(n,!1,e.emissionDimmingPass),depthTest:r?null:o(n),depthWrite:a(e),colorWrite:b,stencilWrite:i?u:null,stencilTest:i?t?c:l:null,polygonOffset:g})}initializePipeline(e){return e.occluder?(this._occluderPipelineTransparent=y({blending:x,depthTest:f,depthWrite:null,colorWrite:b,stencilWrite:null,stencilTest:d}),this._occluderPipelineOpaque=y({blending:x,depthTest:f,depthWrite:null,colorWrite:b,stencilWrite:m,stencilTest:p}),this._occluderPipelineMaskWrite=y({blending:null,depthTest:h,depthWrite:null,colorWrite:null,stencilWrite:u,stencilTest:c})):this._occluderPipelineTransparent=this._occluderPipelineOpaque=this._occluderPipelineMaskWrite=null,this._occludeePipelineState=this._makePipelineState(e,!0),this._makePipelineState(e,!1)}getPipeline(e,t,n){return n?this._occludeePipelineState:e.occluder===11?this._occluderPipelineTransparent??super.getPipeline(e,t,n):e.occluder===10?this._occluderPipelineOpaque??super.getPipeline(e,t,n):this._occluderPipelineMaskWrite??super.getPipeline(e,t,n)}};S=e([t(`esri.views.3d.webgl-engine.shaders.LineMarkerTechnique`)],S);export{S as LineMarkerTechnique};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{newLayout as e}from"../../support/buffer/InterleavedLayout.js";import{olidEnabled as t}from"../effects/geometry/olidUtils.js";const n=e().vec2u8(`uv0`,{glNormalized:!0});function r(n){let r=e().vec3f(`position`).vec3f(`normal`).f32(`groundDistance`);return n.hasVertexCenterOffset&&(r=r.vec3f(`centerOffset`)),n.hasVertexColor&&(r=r.vec4u8(`color`,{glNormalized:!0})),n.hasVertexSize&&(r=r.vec2f(`size`)),n.hasVertexRotation&&(r=r.f32(`rotation`)),(n.hasVVColor||n.hasVVSize)&&(r=r.vec4f(`featureAttribute`)),n.hasVertexUVi&&(r=r.vec4i16(`uvi`)),t()?r.vec4u8(`olidColor`):r}export{n as baseLayout,r as getInstanceLayout};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{newLayout as e}from"../../support/buffer/InterleavedLayout.js";function t(t){let n=e().vec3f(`position`).vec4f16(`previousDelta`).vec2f16(`uv0`);return t.hasVVColor?n.f32(`colorFeatureAttribute`):n.vec4u8(`color`,{glNormalized:!0}),t.hasVVOpacity&&n.f32(`opacityFeatureAttribute`),t.hasVVSize?n.f32(`sizeFeatureAttribute`):n.f16(`size`),t.worldSpace&&n.vec3f16(`normal`),n.freeze()}export{t as getLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{ignoreAbortErrors as n,debounce as r,isAbortError as i}from"../../../core/promiseUtils.js";import{pausable as a}from"../../../core/reactiveUtils.js";import{property as o,subclass as s}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as c}from"../../../core/support/UpdatingHandles.js";let l=class extends t{constructor(e){super(e),this._debouncedMeasure=null,this._pausableWatch=null,this._inputWatch=null,this._lastSeenValue=void 0,this._getContext=null,this._updatingHandles=new c,this.field=null,this.appliesToHandlesWithRole=null,this.appliesToHandlesWithName=null,this.displayGroup=null}get name(){return this.field.name}get displayOrder(){return this.field.displayOrder}set displayOrder(e){this.field.displayOrder=e}get readOnly(){return this.field.readOnly}set readonly(e){this.field.readOnly=e}get lockable(){return this.field.lockable}set lockable(e){this.field.lockable=e}get unlockOnVertexPlacement(){return this.field.unlockOnVertexPlacement}set unlockOnVertexPlacement(e){this.field.unlockOnVertexPlacement=e}get parse(){return this.field.parse}set parse(e){this.field.parse=e}get format(){return this.field.format}set format(e){this.field.format=e}get formatForInputMode(){return this.field.formatForInputMode}set formatForInputMode(e){this.field.formatForInputMode=e}get suffix(){return this.field.suffix}set suffix(e){this.field.suffix=e}get enabled(){return this._get(`enabled`)}set enabled(e){this._set(`enabled`,e),e?(this._pausableWatch?.resume(),this._debouncedMeasure&&this._updatingHandles.addPromise(n(this._debouncedMeasure(this._inputWatch?.(),this._getContext?.(),this._lastSeenValue)))):this._pausableWatch?.pause()}get updating(){return this._updatingHandles.updating}setActual(e){this.field.setActual(e)}getCommitted(){return this.field.committed}getActual(){return this.field.actual}getInput(){return this.field.inputValue}registerMeasurement(e,t,o){this._inputWatch=e,this._getContext=o;let s=(e,n,r)=>t(e,n,r).then(e=>(this.setActual(e),e)).catch(e=>{if(!i(e))return this.setActual(null),null});this._debouncedMeasure=r(s);let c=this._pausableWatch=a(e,(e,t)=>{this._lastSeenValue=e,o()&&this._debouncedMeasure&&this._updatingHandles.addPromise(n(this._debouncedMeasure(e,o(),t)))});if(!this.enabled)c.pause();else{let t=e();this._updatingHandles.addPromise(n(this._debouncedMeasure(t,o(),void 0)))}this.addHandles(c)}show(){this.field.visible=!0}hide(){this.field.visible=!1}};e([o({constructOnly:!0})],l.prototype,`field`,void 0),e([o()],l.prototype,`name`,null),e([o()],l.prototype,`displayOrder`,null),e([o()],l.prototype,`readOnly`,null),e([o()],l.prototype,`lockable`,null),e([o()],l.prototype,`unlockOnVertexPlacement`,null),e([o()],l.prototype,`parse`,null),e([o()],l.prototype,`format`,null),e([o()],l.prototype,`formatForInputMode`,null),e([o()],l.prototype,`suffix`,null),e([o()],l.prototype,`appliesToHandlesWithRole`,void 0),e([o()],l.prototype,`appliesToHandlesWithName`,void 0),e([o()],l.prototype,`enabled`,null),e([o()],l.prototype,`displayGroup`,void 0),e([o()],l.prototype,`updating`,null),l=e([s(`esri.views.draw.support.ManagedTooltipField`)],l);export{l as ManagedTooltipField};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{ignoreAbortErrors as n,debounce as r,isAbortError as i}from"../../../core/promiseUtils.js";import{pausable as a}from"../../../core/reactiveUtils.js";import{property as o,subclass as s}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as c}from"../../../core/support/UpdatingHandles.js";let l=class extends t{constructor(e){super(e),this._debouncedMeasure=null,this._pausableWatch=null,this._inputWatch=null,this._lastSeenValue=void 0,this._getContext=null,this._updatingHandles=new c,this.field=null,this.appliesToHandlesWithRole=null,this.appliesToHandlesWithName=null,this.displayGroup=null}get name(){return this.field.name}get displayOrder(){return this.field.displayOrder}set displayOrder(e){this.field.displayOrder=e}get readOnly(){return this.field.readOnly}set readOnly(e){this.field.readOnly=e}get lockable(){return this.field.lockable}set lockable(e){this.field.lockable=e}get unlockOnVertexPlacement(){return this.field.unlockOnVertexPlacement}set unlockOnVertexPlacement(e){this.field.unlockOnVertexPlacement=e}get parse(){return this.field.parse}set parse(e){this.field.parse=e}get format(){return this.field.format}set format(e){this.field.format=e}get formatForInputMode(){return this.field.formatForInputMode}set formatForInputMode(e){this.field.formatForInputMode=e}get suffix(){return this.field.suffix}set suffix(e){this.field.suffix=e}get enabled(){return this._get(`enabled`)}set enabled(e){this._set(`enabled`,e),e?(this._pausableWatch?.resume(),this._debouncedMeasure&&this._updatingHandles.addPromise(n(this._debouncedMeasure(this._inputWatch?.(),this._getContext?.(),this._lastSeenValue)))):this._pausableWatch?.pause()}get updating(){return this._updatingHandles.updating}setActual(e){this.field.setActual(e)}getCommitted(){return this.field.committed}getActual(){return this.field.actual}getInput(){return this.field.inputValue}registerMeasurement(e,t,o){this._inputWatch=e,this._getContext=o;let s=(e,n,r)=>t(e,n,r).then(e=>(this.setActual(e),e)).catch(e=>{if(!i(e))return this.setActual(null),null});this._debouncedMeasure=r(s);let c=this._pausableWatch=a(e,(e,t)=>{this._lastSeenValue=e,o()&&this._debouncedMeasure&&this._updatingHandles.addPromise(n(this._debouncedMeasure(e,o(),t)))});if(!this.enabled)c.pause();else{let t=e();this._updatingHandles.addPromise(n(this._debouncedMeasure(t,o(),void 0)))}this.addHandles(c)}show(){this.field.visible=!0}hide(){this.field.visible=!1}};e([o({constructOnly:!0})],l.prototype,`field`,void 0),e([o()],l.prototype,`name`,null),e([o()],l.prototype,`displayOrder`,null),e([o()],l.prototype,`readOnly`,null),e([o()],l.prototype,`lockable`,null),e([o()],l.prototype,`unlockOnVertexPlacement`,null),e([o()],l.prototype,`parse`,null),e([o()],l.prototype,`format`,null),e([o()],l.prototype,`formatForInputMode`,null),e([o()],l.prototype,`suffix`,null),e([o()],l.prototype,`appliesToHandlesWithRole`,void 0),e([o()],l.prototype,`appliesToHandlesWithName`,void 0),e([o()],l.prototype,`enabled`,null),e([o()],l.prototype,`displayGroup`,void 0),e([o()],l.prototype,`updating`,null),l=e([s(`esri.views.draw.support.ManagedTooltipField`)],l);export{l as ManagedTooltipField};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{property as n,subclass as r}from"../../core/accessorSupport/decorators.js";import"../../libs/maquette/projection.js";import{h as i}from"../../libs/maquette/h.js";import"../../libs/maquette/projector.js";let a=class extends t{get startPosition(){return[this.startX,this.startY]}set startPosition(e){this._set(`startX`,e[0]),this._set(`startY`,e[1])}get endPosition(){return[this.endX,this.endY]}set endPosition(e){this._set(`endX`,e[0]),this._set(`endY`,e[1])}constructor(e){super(e),this.startX=0,this.startY=0,this.endX=0,this.endY=0,this.width=1,this.color=[0,0,0,.5],this.visible=!0,this.isDecoration=!0}get _strokeStyle(){let e=this.color;return`rgba(${e[0]}, ${e[1]}, ${e[2]}, ${e[3]})`}get _lineCap(){return`round`}render(){let{height:e,left:t,top:n,width:r,x1:a,x2:s,y1:c,y2:l}=this._calculateCoordinates(o),u=`stroke: ${this._strokeStyle}; stroke-width: ${this.width}; stroke-linecap: ${this._lineCap};`;return i(`div`,{classes:{"esri-line-overlay-item":!0},styles:{left:t+`px`,top:n+`px`,width:r+`px`,height:e+`px`,visibility:this.visible?`visible`:`hidden`}},[i(`svg`,{width:r,height:e},[i(`line`,{x1:a,y1:c,x2:s,y2:l,style:u})])])}renderCanvas(e){if(!this.visible)return;e.strokeStyle=this._strokeStyle,e.lineWidth=this.width,e.lineCap=this._lineCap;let t=this._calculateCoordinates(o);e.beginPath(),e.moveTo(t.left+t.x1,t.top+t.y1),e.lineTo(t.left+t.x2,t.top+t.y2),e.stroke()}_calculateCoordinates(e){let t=Math.min(this.startX,this.endX),n=Math.max(this.startX,this.endX),r=Math.min(this.startY,this.endY),i=Math.max(this.startY,this.endY),a=this.width;return e.left=t-a,e.top=r-a,e.width=n-t+2*a,e.height=Math.max(20,i-r+2*a),e.x1=this.startX-t+a,e.y1=this.startY-r+a,e.x2=this.endX-t+a,e.y2=this.endY-r+a,e}};e([n()],a.prototype,`startX`,void 0),e([n()],a.prototype,`startY`,void 0),e([n()],a.prototype,`endX`,void 0),e([n()],a.prototype,`endY`,void 0),e([n()],a.prototype,`startPosition`,null),e([n()],a.prototype,`endPosition`,null),e([n()],a.prototype,`width`,void 0),e([n()],a.prototype,`color`,void 0),e([n()],a.prototype,`visible`,void 0),e([n()],a.prototype,`isDecoration`,void 0),e([n({readOnly:!0})],a.prototype,`_strokeStyle`,null),a=e([r(`esri.views.overlay.LineOverlayItem`)],a);const o={left:0,top:0,width:0,height:0,x1:0,y1:0,x2:0,y2:0},s=a;export{s as default};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{property as n,subclass as r}from"../../core/accessorSupport/decorators.js";import"../../chunks/projector.js";import{h as i}from"../../chunks/h.js";let a=class extends t{get startPosition(){return[this.startX,this.startY]}set startPosition(e){this._set(`startX`,e[0]),this._set(`startY`,e[1])}get endPosition(){return[this.endX,this.endY]}set endPosition(e){this._set(`endX`,e[0]),this._set(`endY`,e[1])}constructor(e){super(e),this.startX=0,this.startY=0,this.endX=0,this.endY=0,this.width=1,this.color=[0,0,0,.5],this.visible=!0,this.isDecoration=!0}get _strokeStyle(){let e=this.color;return`rgba(${e[0]}, ${e[1]}, ${e[2]}, ${e[3]})`}get _lineCap(){return`round`}render(){let{height:e,left:t,top:n,width:r,x1:a,x2:s,y1:c,y2:l}=this._calculateCoordinates(o),u=`stroke: ${this._strokeStyle}; stroke-width: ${this.width}; stroke-linecap: ${this._lineCap};`;return i(`div`,{classes:{"esri-line-overlay-item":!0},styles:{left:t+`px`,top:n+`px`,width:r+`px`,height:e+`px`,visibility:this.visible?`visible`:`hidden`}},[i(`svg`,{width:r,height:e},[i(`line`,{x1:a,y1:c,x2:s,y2:l,style:u})])])}renderCanvas(e){if(!this.visible)return;e.strokeStyle=this._strokeStyle,e.lineWidth=this.width,e.lineCap=this._lineCap;let t=this._calculateCoordinates(o);e.beginPath(),e.moveTo(t.left+t.x1,t.top+t.y1),e.lineTo(t.left+t.x2,t.top+t.y2),e.stroke()}_calculateCoordinates(e){let t=Math.min(this.startX,this.endX),n=Math.max(this.startX,this.endX),r=Math.min(this.startY,this.endY),i=Math.max(this.startY,this.endY),a=this.width;return e.left=t-a,e.top=r-a,e.width=n-t+2*a,e.height=Math.max(20,i-r+2*a),e.x1=this.startX-t+a,e.y1=this.startY-r+a,e.x2=this.endX-t+a,e.y2=this.endY-r+a,e}};e([n()],a.prototype,`startX`,void 0),e([n()],a.prototype,`startY`,void 0),e([n()],a.prototype,`endX`,void 0),e([n()],a.prototype,`endY`,void 0),e([n()],a.prototype,`startPosition`,null),e([n()],a.prototype,`endPosition`,null),e([n()],a.prototype,`width`,void 0),e([n()],a.prototype,`color`,void 0),e([n()],a.prototype,`visible`,void 0),e([n()],a.prototype,`isDecoration`,void 0),e([n({readOnly:!0})],a.prototype,`_strokeStyle`,null),a=e([r(`esri.views.overlay.LineOverlayItem`)],a);const o={left:0,top:0,width:0,height:0,x1:0,y1:0,x2:0,y2:0},s=a;export{s as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../Color.js";import n from"../../core/Accessor.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import"../../libs/maquette/projection.js";import{h as a}from"../../libs/maquette/h.js";import"../../libs/maquette/projector.js";const o={bottom:`esri-text-overlay-item-anchor-bottom`,"bottom-right":`esri-text-overlay-item-anchor-bottom-right`,"bottom-left":`esri-text-overlay-item-anchor-bottom-left`,top:`esri-text-overlay-item-anchor-top`,"top-right":`esri-text-overlay-item-anchor-top-right`,"top-left":`esri-text-overlay-item-anchor-top-left`,center:`esri-text-overlay-item-anchor-center`,right:`esri-text-overlay-item-anchor-right`,left:`esri-text-overlay-item-anchor-left`};let s=class extends n{get position(){return[this.x,this.y]}set position(e){this._set(`x`,e[0]),this._set(`y`,e[1])}set visible(e){this._visible=e}get visible(){return this._visible&&!!this.text}get _textShadowColor(){let{textColor:e,backgroundColor:t}=this,n=t.clone();return n.a*=e.a,n}get _textShadow(){let e=this._textShadowColor.toCss(!0);return`0 0 ${this._textShadowSize}px ${e}`}get padding(){return .5*this.fontSize}get borderRadius(){return this.padding}set borderRadius(e){this._overrideIfSome(`borderRadius`,e)}constructor(e){super(e),this.x=0,this.y=0,this.text=`-`,this.fontSize=14,this.anchor=`center`,this._visible=!0,this.isDecoration=!0,this.backgroundColor=new t([0,0,0,.6]),this.textColor=new t([255,255,255]),this._textShadowSize=1}render(){return a(`div`,{classes:this._cssClasses(),styles:{left:Math.floor(this.x)+`px`,top:Math.floor(this.y)+`px`,visibility:this.visible?`visible`:`hidden`,fontSize:this.fontSize+`px`,lineHeight:this.fontSize+`px`,backgroundColor:this.backgroundColor.toCss(!0),color:this.textColor.toCss(!0),padding:this.padding+`px`,borderRadius:this.borderRadius+`px`,textShadow:this._textShadow}},[this.text])}renderCanvas(e){if(!this.visible)return;let t=e.font.replace(/^(.*?)px/,``);e.font=`${this.fontSize}px ${t}`;let{padding:n,borderRadius:r}=this,i=e.measureText(this.text).width,a=this.text===``?0:this.fontSize,o=c[this.anchor];e.textAlign=`center`,e.textBaseline=`middle`;let s=i+2*n,l=a+2*n,u=this.x+o.x*s,d=this.y+o.y*l;this._roundedRect(e,u,d,s,l,r),e.fillStyle=this.backgroundColor.toCss(!0),e.fill();let f=this.x+(o.x+.5)*s,p=this.y+(o.y+.5)*l;this._renderTextShadow(e,this.text,f,p),e.fillStyle=this.textColor.toCss(!0),e.fillText(this.text,f,p)}_renderTextShadow(e,t,n,r){e.lineJoin=`miter`,e.fillStyle=`rgba(${this._textShadowColor.r}, ${this._textShadowColor.g}, ${this._textShadowColor.b}, ${1/l.length})`;let i=this._textShadowSize;for(let[a,o]of l)e.fillText(t,n+i*a,r+i*o)}_roundedRect(e,t,n,r,i,a){a=Math.min(a,i/2,r/2),e.beginPath(),e.moveTo(t,n+a),e.arcTo(t,n,t+a,n,a),e.lineTo(t+r-a,n),e.arcTo(t+r,n,t+r,n+a,a),e.lineTo(t+r,n+i-a),e.arcTo(t+r,n+i,t+r-a,n+i,a),e.lineTo(t+a,n+i),e.arcTo(t,n+i,t,n+i-a,a),e.closePath()}_cssClasses(){let e={"esri-text-overlay-item":!0},t;for(t in o)e[o[t]]=this.anchor===t;return e}};e([r()],s.prototype,`x`,void 0),e([r()],s.prototype,`y`,void 0),e([r()],s.prototype,`position`,null),e([r()],s.prototype,`text`,void 0),e([r()],s.prototype,`fontSize`,void 0),e([r()],s.prototype,`anchor`,void 0),e([r()],s.prototype,`_visible`,void 0),e([r()],s.prototype,`visible`,null),e([r()],s.prototype,`isDecoration`,void 0),e([r()],s.prototype,`backgroundColor`,void 0),e([r()],s.prototype,`textColor`,void 0),e([r()],s.prototype,`_textShadowSize`,void 0),e([r()],s.prototype,`_textShadowColor`,null),e([r()],s.prototype,`_textShadow`,null),e([r()],s.prototype,`padding`,null),e([r()],s.prototype,`borderRadius`,null),s=e([i(`esri.views.overlay.TextOverlayItem`)],s);const c={bottom:{x:-.5,y:-1,textAlign:`center`,textBaseline:`bottom`},"bottom-left":{x:0,y:-1,textAlign:`left`,textBaseline:`bottom`},"bottom-right":{x:-1,y:-1,textAlign:`right`,textBaseline:`bottom`},center:{x:-.5,y:-.5,textAlign:`center`,textBaseline:`middle`},left:{x:0,y:-.5,textAlign:`left`,textBaseline:`middle`},right:{x:-1,y:-.5,textAlign:`right`,textBaseline:`middle`},top:{x:-.5,y:0,textAlign:`center`,textBaseline:`top`},"top-left":{x:0,y:0,textAlign:`left`,textBaseline:`top`},"top-right":{x:-1,y:0,textAlign:`right`,textBaseline:`top`}},l=[];for(let e=0;e<360;e+=360/16)l.push([Math.cos(Math.PI*e/180),Math.sin(Math.PI*e/180)]);export{s as default};
2
+ import{__decorate as e}from"tslib";import t from"../../Color.js";import n from"../../core/Accessor.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import"../../chunks/projector.js";import{h as a}from"../../chunks/h.js";const o={bottom:`esri-text-overlay-item-anchor-bottom`,"bottom-right":`esri-text-overlay-item-anchor-bottom-right`,"bottom-left":`esri-text-overlay-item-anchor-bottom-left`,top:`esri-text-overlay-item-anchor-top`,"top-right":`esri-text-overlay-item-anchor-top-right`,"top-left":`esri-text-overlay-item-anchor-top-left`,center:`esri-text-overlay-item-anchor-center`,right:`esri-text-overlay-item-anchor-right`,left:`esri-text-overlay-item-anchor-left`};let s=class extends n{get position(){return[this.x,this.y]}set position(e){this._set(`x`,e[0]),this._set(`y`,e[1])}set visible(e){this._visible=e}get visible(){return this._visible&&!!this.text}get _textShadowColor(){let{textColor:e,backgroundColor:t}=this,n=t.clone();return n.a*=e.a,n}get _textShadow(){let e=this._textShadowColor.toCss(!0);return`0 0 ${this._textShadowSize}px ${e}`}get padding(){return .5*this.fontSize}get borderRadius(){return this.padding}set borderRadius(e){this._overrideIfSome(`borderRadius`,e)}constructor(e){super(e),this.x=0,this.y=0,this.text=`-`,this.fontSize=14,this.anchor=`center`,this._visible=!0,this.isDecoration=!0,this.backgroundColor=new t([0,0,0,.6]),this.textColor=new t([255,255,255]),this._textShadowSize=1}render(){return a(`div`,{classes:this._cssClasses(),styles:{left:Math.floor(this.x)+`px`,top:Math.floor(this.y)+`px`,visibility:this.visible?`visible`:`hidden`,fontSize:this.fontSize+`px`,lineHeight:this.fontSize+`px`,backgroundColor:this.backgroundColor.toCss(!0),color:this.textColor.toCss(!0),padding:this.padding+`px`,borderRadius:this.borderRadius+`px`,textShadow:this._textShadow}},[this.text])}renderCanvas(e){if(!this.visible)return;let t=e.font.replace(/^(.*?)px/,``);e.font=`${this.fontSize}px ${t}`;let{padding:n,borderRadius:r}=this,i=e.measureText(this.text).width,a=this.text===``?0:this.fontSize,o=c[this.anchor];e.textAlign=`center`,e.textBaseline=`middle`;let s=i+2*n,l=a+2*n,u=this.x+o.x*s,d=this.y+o.y*l;this._roundedRect(e,u,d,s,l,r),e.fillStyle=this.backgroundColor.toCss(!0),e.fill();let f=this.x+(o.x+.5)*s,p=this.y+(o.y+.5)*l;this._renderTextShadow(e,this.text,f,p),e.fillStyle=this.textColor.toCss(!0),e.fillText(this.text,f,p)}_renderTextShadow(e,t,n,r){e.lineJoin=`miter`,e.fillStyle=`rgba(${this._textShadowColor.r}, ${this._textShadowColor.g}, ${this._textShadowColor.b}, ${1/l.length})`;let i=this._textShadowSize;for(let[a,o]of l)e.fillText(t,n+i*a,r+i*o)}_roundedRect(e,t,n,r,i,a){a=Math.min(a,i/2,r/2),e.beginPath(),e.moveTo(t,n+a),e.arcTo(t,n,t+a,n,a),e.lineTo(t+r-a,n),e.arcTo(t+r,n,t+r,n+a,a),e.lineTo(t+r,n+i-a),e.arcTo(t+r,n+i,t+r-a,n+i,a),e.lineTo(t+a,n+i),e.arcTo(t,n+i,t,n+i-a,a),e.closePath()}_cssClasses(){let e={"esri-text-overlay-item":!0},t;for(t in o)e[o[t]]=this.anchor===t;return e}};e([r()],s.prototype,`x`,void 0),e([r()],s.prototype,`y`,void 0),e([r()],s.prototype,`position`,null),e([r()],s.prototype,`text`,void 0),e([r()],s.prototype,`fontSize`,void 0),e([r()],s.prototype,`anchor`,void 0),e([r()],s.prototype,`_visible`,void 0),e([r()],s.prototype,`visible`,null),e([r()],s.prototype,`isDecoration`,void 0),e([r()],s.prototype,`backgroundColor`,void 0),e([r()],s.prototype,`textColor`,void 0),e([r()],s.prototype,`_textShadowSize`,void 0),e([r()],s.prototype,`_textShadowColor`,null),e([r()],s.prototype,`_textShadow`,null),e([r()],s.prototype,`padding`,null),e([r()],s.prototype,`borderRadius`,null),s=e([i(`esri.views.overlay.TextOverlayItem`)],s);const c={bottom:{x:-.5,y:-1,textAlign:`center`,textBaseline:`bottom`},"bottom-left":{x:0,y:-1,textAlign:`left`,textBaseline:`bottom`},"bottom-right":{x:-1,y:-1,textAlign:`right`,textBaseline:`bottom`},center:{x:-.5,y:-.5,textAlign:`center`,textBaseline:`middle`},left:{x:0,y:-.5,textAlign:`left`,textBaseline:`middle`},right:{x:-1,y:-.5,textAlign:`right`,textBaseline:`middle`},top:{x:-.5,y:0,textAlign:`center`,textBaseline:`top`},"top-left":{x:0,y:0,textAlign:`left`,textBaseline:`top`},"top-right":{x:-1,y:0,textAlign:`right`,textBaseline:`top`}},l=[];for(let e=0;e<360;e+=360/16)l.push([Math.cos(Math.PI*e/180),Math.sin(Math.PI*e/180)]);export{s as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import n from"../../core/Collection.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as a}from"../../core/support/UpdatingHandles.js";import"../../libs/maquette/projection.js";import{createProjector as o}from"../../libs/maquette/projector.js";let s=class extends t{constructor(){super(...arguments),this.items=new n,this._watchUpdatingTracking=new a,this._callbacks=new Map,this._projector=o(),this._hiddenProjector=o()}get needsRender(){return this.items.length>0}get updating(){return this._watchUpdatingTracking?.updating??!1}initialize(){let e=document.createElement(`div`);e.className=`esri-overlay-surface`,this._set(`surface`,e),this._hiddenSurface=document.createElement(`div`),this._hiddenSurface.setAttribute(`style`,`visibility: hidden;`),e.appendChild(this._hiddenSurface),this._watchUpdatingTracking.addOnCollectionChange(()=>this.items,e=>{for(let t of e.added){let e=()=>t.render();this._callbacks.set(t,e),this._projector.append(this.surface,e)}for(let t of e.removed){let e=this._projector.detach(this._callbacks.get(t));this.surface.removeChild(e.domNode),this._callbacks.delete(t)}})}addItem(e){this.items.add(e)}removeItem(e){this.items.remove(e)}destroy(){this.items.removeAll(),this._callbacks.forEach(e=>this._projector.detach(e)),this._callbacks=null,this._projector=null,this._watchUpdatingTracking.destroy()}render(){this._projector.renderNow()}computeBoundingRect(e){let t=this._hiddenSurface,n=this._hiddenProjector,r,i=()=>(r=e.render(),r);n.append(t,i),n.renderNow();let a={left:0,top:0,right:0,bottom:0};if(r?.domNode){let e=r.domNode.getBoundingClientRect();a.left=e.left,a.top=e.top,a.right=e.right,a.bottom=e.bottom}for(n.detach(i);t.firstChild;)t.removeChild(t.firstChild);return a}overlaps(e,t){let n=this.computeBoundingRect(e),r=this.computeBoundingRect(t);return Math.max(n.left,r.left)<=Math.min(n.right,r.right)&&Math.max(n.top,r.top)<=Math.min(n.bottom,r.bottom)}get hasVisibleItems(){return this.items.some(e=>e.visible)}async prepare(){await document.fonts.load(this._fontString()).catch(()=>{})}renderCanvas(e,t){let n=!!t?.disableDecorations;if(!this.items.some(e=>e.visible&&!(n&&e.isDecoration)))return;let r=e.getContext(`2d`);r.save(),r.font=this._fontString(),this.items.forEach(e=>{n&&e.isDecoration||(r.save(),e.renderCanvas(r),r.restore())}),r.restore()}_fontString(){return`10px ${getComputedStyle(this.surface).fontFamily}`}};e([r({readOnly:!0})],s.prototype,`surface`,void 0),e([r({readOnly:!0})],s.prototype,`items`,void 0),e([r({readOnly:!0})],s.prototype,`needsRender`,null),e([r({readOnly:!0})],s.prototype,`_watchUpdatingTracking`,void 0),e([r({readOnly:!0})],s.prototype,`updating`,null),s=e([i(`esri.views.overlay.ViewOverlay`)],s);const c=s;export{c as default};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import n from"../../core/Collection.js";import{renderingSanitizerOptions as r}from"../../core/sanitizerUtils.js";import{property as i,subclass as a}from"../../core/accessorSupport/decorators.js";import{UpdatingHandles as o}from"../../core/support/UpdatingHandles.js";import{c as s}from"../../chunks/projector.js";let c=class extends t{constructor(){super(...arguments),this.items=new n,this._watchUpdatingTracking=new o,this._callbacks=new Map,this._projector=s(r),this._hiddenProjector=s(r)}get needsRender(){return this.items.length>0}get updating(){return this._watchUpdatingTracking?.updating??!1}initialize(){let e=document.createElement(`div`);e.className=`esri-overlay-surface`,this._set(`surface`,e),this._hiddenSurface=document.createElement(`div`),this._hiddenSurface.setAttribute(`style`,`visibility: hidden;`),e.appendChild(this._hiddenSurface),this._watchUpdatingTracking.addOnCollectionChange(()=>this.items,e=>{for(let t of e.added){let e=()=>t.render();this._callbacks.set(t,e),this._projector.append(this.surface,e)}for(let t of e.removed){let e=this._projector.detach(this._callbacks.get(t));this.surface.removeChild(e.domNode),this._callbacks.delete(t)}})}addItem(e){this.items.add(e)}removeItem(e){this.items.remove(e)}destroy(){this.items.removeAll(),this._callbacks.forEach(e=>this._projector.detach(e)),this._callbacks=null,this._projector=null,this._watchUpdatingTracking.destroy()}render(){this._projector.renderNow()}computeBoundingRect(e){let t=this._hiddenSurface,n=this._hiddenProjector,r,i=()=>(r=e.render(),r);n.append(t,i),n.renderNow();let a={left:0,top:0,right:0,bottom:0};if(r?.domNode){let e=r.domNode.getBoundingClientRect();a.left=e.left,a.top=e.top,a.right=e.right,a.bottom=e.bottom}for(n.detach(i);t.firstChild;)t.removeChild(t.firstChild);return a}overlaps(e,t){let n=this.computeBoundingRect(e),r=this.computeBoundingRect(t);return Math.max(n.left,r.left)<=Math.min(n.right,r.right)&&Math.max(n.top,r.top)<=Math.min(n.bottom,r.bottom)}get hasVisibleItems(){return this.items.some(e=>e.visible)}async prepare(){await document.fonts.load(this._fontString()).catch(()=>{})}renderCanvas(e,t){let n=!!t?.disableDecorations;if(!this.items.some(e=>e.visible&&!(n&&e.isDecoration)))return;let r=e.getContext(`2d`);r.save(),r.font=this._fontString(),this.items.forEach(e=>{n&&e.isDecoration||(r.save(),e.renderCanvas(r),r.restore())}),r.restore()}_fontString(){return`10px ${getComputedStyle(this.surface).fontFamily}`}};e([i({readOnly:!0})],c.prototype,`surface`,void 0),e([i({readOnly:!0})],c.prototype,`items`,void 0),e([i({readOnly:!0})],c.prototype,`needsRender`,null),e([i({readOnly:!0})],c.prototype,`_watchUpdatingTracking`,void 0),e([i({readOnly:!0})],c.prototype,`updating`,null),c=e([a(`esri.views.overlay.ViewOverlay`)],c);const l=c;export{l as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../core/Logger.js";import{when as n}from"../../core/reactiveUtils.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import a from"../../geometry/SpatialReference.js";import{toExtent as o}from"../../geometry/support/aaBoundingRect.js";import{extentContainsXYZ as s}from"../../geometry/support/contains.js";import{GroundViewElevationSampler as c}from"./GroundViewElevationSampler.js";let l=class extends c{initialize(){this.addHandles(n(()=>this.view.groundView,e=>e.on(`elevation-change`,()=>this.emit(`changed`,{}))))}get demResolution(){return this.view.basemapTerrain.demResolution}get extent(){let{groundView:e}=this.view;if(e?.groundExtent==null||e.spatialReference==null)return null;let t=o(e.groundExtent,e.spatialReference);return t.zmin=e.visibleElevationRange.minElevation,t.zmax=e.visibleElevationRange.maxElevation,t}get spatialReference(){return this.view.groundView?.spatialReference??a.WGS84}elevationAt(e,n){if(this.extent==null||!s(this.extent,e,n)){let r=this.extent==null?null:`${this.extent.xmin}, ${this.extent.ymin}, ${this.extent.xmax}, ${this.extent.ymax}`;return t.getLogger(this).warn(`#elevationAt()`,`Point used to sample elevation (${e}, ${n}) is outside of the sampler extent (${r})`),this.noDataValue}return this.view.elevationProvider?.getElevation(e,n,0,this.spatialReference,`ground`)??this.noDataValue}};e([r({readOnly:!0})],l.prototype,`demResolution`,null),e([r({readOnly:!0})],l.prototype,`extent`,null),e([r()],l.prototype,`spatialReference`,null),l=e([i(`esri.views.support.GroundElevationSampler`)],l);export{l as GroundElevationSampler};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Logger.js";import{on as n}from"../../core/reactiveUtils.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import a from"../../geometry/SpatialReference.js";import{toExtent as o}from"../../geometry/support/aaBoundingRect.js";import{extentContainsXYZ as s}from"../../geometry/support/contains.js";import{GroundViewElevationSampler as c}from"./GroundViewElevationSampler.js";let l=class extends c{initialize(){this.addHandles(n(()=>this.view.groundView,`elevation-change`,()=>this.emit(`changed`,{})))}get demResolution(){return this.view.basemapTerrain.demResolution}get extent(){let{groundView:e}=this.view;if(e?.groundExtent==null||e.spatialReference==null)return null;let t=o(e.groundExtent,e.spatialReference);return t.zmin=e.visibleElevationRange.minElevation,t.zmax=e.visibleElevationRange.maxElevation,t}get spatialReference(){return this.view.groundView?.spatialReference??a.WGS84}elevationAt(e,n){if(this.extent==null||!s(this.extent,e,n)){let r=this.extent==null?null:`${this.extent.xmin}, ${this.extent.ymin}, ${this.extent.xmax}, ${this.extent.ymax}`;return t.getLogger(this).warn(`#elevationAt()`,`Point used to sample elevation (${e}, ${n}) is outside of the sampler extent (${r})`),this.noDataValue}return this.view.elevationProvider?.getElevation(e,n,0,this.spatialReference,`ground`)??this.noDataValue}};e([r({readOnly:!0})],l.prototype,`demResolution`,null),e([r({readOnly:!0})],l.prototype,`extent`,null),e([r()],l.prototype,`spatialReference`,null),l=e([i(`esri.views.support.GroundElevationSampler`)],l);export{l as GroundElevationSampler};
@@ -1,6 +1,6 @@
1
1
  import type Color from "../../Color.js";
2
- import type Accessor from "../../core/Accessor.js";
3
2
  import type { ColorLike } from "../../Color.js";
3
+ import type { JSONSupport } from "../../core/JSONSupport.js";
4
4
 
5
5
  export interface HighlightOptionsProperties extends Partial<Pick<HighlightOptions, "fillOpacity" | "haloOpacity" | "shadowDifference" | "shadowOpacity">> {
6
6
  /** The color of the highlight fill. */
@@ -111,7 +111,7 @@ export interface HighlightOptionsProperties extends Partial<Pick<HighlightOption
111
111
  * });
112
112
  * });
113
113
  */
114
- export default class HighlightOptions extends Accessor {
114
+ export default class HighlightOptions extends JSONSupport {
115
115
  constructor(properties?: HighlightOptionsProperties);
116
116
  /** The color of the highlight fill. */
117
117
  get color(): Color;
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../Color.js";import n from"../../core/Accessor.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import{defaultHighlightName as a,defaultColor as o,defaultHaloOpacity as s,defaultFillOpacity as c,defaultShadowColor as l,defaultShadowOpacity as u,defaultShadowDifference as d}from"./HighlightDefaults.js";var f;let p=f=class extends n{constructor(e){super(e),this.name=a,this.color=o.clone(),this.haloColor=null,this.haloOpacity=s,this.fillOpacity=c,this.shadowColor=l.clone(),this.shadowOpacity=u,this.shadowDifference=d,this.haloWidth=2.1,this.haloBlur=.8/this.haloWidth}equals(e){return this.color.equals(e.color)&&(this.haloColor||this.color).equals(e.haloColor||e.color)&&this.haloOpacity===e.haloOpacity&&this.fillOpacity===e.fillOpacity&&this.haloWidth===e.haloWidth&&this.haloBlur===e.haloBlur&&this.shadowColor.equals(e.shadowColor)&&this.shadowOpacity===e.shadowOpacity&&this.shadowDifference===e.shadowDifference}clone(){return new f({...this,color:this.color.clone(),haloColor:this.haloColor?.clone(),shadowColor:this.shadowColor?.clone()})}assignFrom(e){this.color=e.color.clone(),this.haloColor=e.haloColor?.clone(),this.haloOpacity=e.haloOpacity,this.fillOpacity=e.fillOpacity,this.shadowColor=e.shadowColor.clone(),this.shadowDifference=e.shadowDifference,this.shadowOpacity=e.shadowOpacity,this.haloBlur=e.haloBlur,this.haloWidth=e.haloWidth}};e([r({type:String,constructOnly:!0,nonNullable:!0})],p.prototype,`name`,void 0),e([r({type:t,nonNullable:!0})],p.prototype,`color`,void 0),e([r({type:t})],p.prototype,`haloColor`,void 0),e([r({nonNullable:!0})],p.prototype,`haloOpacity`,void 0),e([r({nonNullable:!0})],p.prototype,`fillOpacity`,void 0),e([r({type:t,nonNullable:!0})],p.prototype,`shadowColor`,void 0),e([r({nonNullable:!0})],p.prototype,`shadowOpacity`,void 0),e([r({nonNullable:!0})],p.prototype,`shadowDifference`,void 0),e([r({nonNullable:!0})],p.prototype,`haloWidth`,void 0),e([r({nonNullable:!0})],p.prototype,`haloBlur`,void 0),p=f=e([i(`esri.views.support.HighlightOptions`)],p);const m=p;export{m as default};
2
+ import{__decorate as e}from"tslib";import t from"../../Color.js";import{JSONSupport as n}from"../../core/JSONSupport.js";import{property as r,subclass as i}from"../../core/accessorSupport/decorators.js";import{defaultHighlightName as a,defaultColor as o,defaultHaloOpacity as s,defaultFillOpacity as c,defaultShadowColor as l,defaultShadowOpacity as u,defaultShadowDifference as d}from"./HighlightDefaults.js";var f;let p=f=class extends n{constructor(e){super(e),this.name=a,this.color=o.clone(),this.haloColor=null,this.haloOpacity=s,this.fillOpacity=c,this.shadowColor=l.clone(),this.shadowOpacity=u,this.shadowDifference=d,this.haloWidth=2.1,this.haloBlur=.8/this.haloWidth}equals(e){return this.color.equals(e.color)&&(this.haloColor||this.color).equals(e.haloColor||e.color)&&this.haloOpacity===e.haloOpacity&&this.fillOpacity===e.fillOpacity&&this.haloWidth===e.haloWidth&&this.haloBlur===e.haloBlur&&this.shadowColor.equals(e.shadowColor)&&this.shadowOpacity===e.shadowOpacity&&this.shadowDifference===e.shadowDifference}clone(){return new f({...this,color:this.color.clone(),haloColor:this.haloColor?.clone(),shadowColor:this.shadowColor?.clone()})}assignFrom(e){this.color=e.color.clone(),this.haloColor=e.haloColor?.clone(),this.haloOpacity=e.haloOpacity,this.fillOpacity=e.fillOpacity,this.shadowColor=e.shadowColor.clone(),this.shadowDifference=e.shadowDifference,this.shadowOpacity=e.shadowOpacity,this.haloBlur=e.haloBlur,this.haloWidth=e.haloWidth}};e([r({type:String,constructOnly:!0,nonNullable:!0,json:{write:!0}})],p.prototype,`name`,void 0),e([r({type:t,nonNullable:!0,json:{write:!0}})],p.prototype,`color`,void 0),e([r({type:t,json:{write:!0}})],p.prototype,`haloColor`,void 0),e([r({nonNullable:!0,json:{write:!0}})],p.prototype,`haloOpacity`,void 0),e([r({nonNullable:!0,json:{write:!0}})],p.prototype,`fillOpacity`,void 0),e([r({type:t,nonNullable:!0,json:{write:!0}})],p.prototype,`shadowColor`,void 0),e([r({nonNullable:!0,json:{write:!0}})],p.prototype,`shadowOpacity`,void 0),e([r({nonNullable:!0,json:{write:!0}})],p.prototype,`shadowDifference`,void 0),e([r({nonNullable:!0,json:{write:!0}})],p.prototype,`haloWidth`,void 0),e([r({nonNullable:!0,json:{write:!0}})],p.prototype,`haloBlur`,void 0),p=f=e([i(`esri.views.support.HighlightOptions`)],p);const m=p;export{m as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../core/Logger.js";import{makeScheduleFunction as t}from"../3d/layers/support/makeScheduleFunction.js";import{TextureCompressionWorkerHandle as n}from"./TextureCompressionWorkerHandle.js";import r from"../webgl/Texture.js";const i=new Set,a=()=>e.getLogger(`esri/views/support/TextureCompressionHelper`);function o(e,o){return r.compressionWorkerHandle??=new n(t(o)),i.has(e)?a().warn(`Repeated texture compression worker initialization by the same view.`):i.add(e),r.compressionWorkerHandle}function s(e){let t=r.compressionWorkerHandle;t&&(i.delete(e)||a().warn(`Unknown view attempted to destroy the texture compression worker.`),i.size||(t.destroyWorkerAndSelf(),r.compressionWorkerHandle=null))}export{s as destroyTextureCompressionWorker,o as initializeTextureCompressionWorker};
2
+ import e from"../../core/Logger.js";import{makeScheduleFunction as t}from"../3d/layers/support/makeScheduleFunction.js";import{TextureCompressionWorkerHandle as n}from"./TextureCompressionWorkerHandle.js";import{Texture as r}from"../webgl/Texture.js";const i=new Set,a=()=>e.getLogger(`esri/views/support/TextureCompressionHelper`);function o(e,o){return r.compressionWorkerHandle??=new n(t(o)),i.has(e)?a().warn(`Repeated texture compression worker initialization by the same view.`):i.add(e),r.compressionWorkerHandle}function s(e){let t=r.compressionWorkerHandle;t&&(i.delete(e)||a().warn(`Unknown view attempted to destroy the texture compression worker.`),i.size||(t.destroyWorkerAndSelf(),r.compressionWorkerHandle=null))}export{s as destroyTextureCompressionWorker,o as initializeTextureCompressionWorker};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../request.js";import t from"../../geometry/Point.js";import{projectExecute as n}from"../../geometry/operators/projectOperator.js";import{projectResolution as r,getProjectionOffsetGrid as i,load as a}from"../../layers/raster/functions/rasterProjectionHelper.js";import{isImageSource as o,rasterize as s}from"../2d/engine/Bitmap.js";import{RenderingDevice as c}from"../2d/engine/webgl/RenderingDevice.js";import{SimpleMesh as l}from"../2d/engine/webgl/meshing/SimpleMesh.js";import{ReprojectShader as u}from"../2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ReprojectShader.js";import{PixelType as d}from"../webgl/enums.js";import{DisposableFramebufferObject as f}from"../webgl/FramebufferObject.js";import{createTransformTexture as p}from"../webgl/rasterUtils.js";import{RenderingContext as m}from"../webgl/RenderingContext.js";import{RenderingContextOptions as h}from"../webgl/RenderingContextOptions.js";import g from"../webgl/Texture.js";import{TextureDescriptor as _}from"../webgl/TextureDescriptor.js";const v={color:{blendMode:`none`,write:[!0,!0,!0,!0]},depth:!1,stencil:!1};class y{static{this._instanceRefCount=0}constructor(e){if(this._ownsRctx=!1,e)this._ownsRctx=!1,this._rctx=e;else{if(y._instance)return y._instanceRefCount++,y._instance;y._instanceRefCount=1,y._instance=this,this._ownsRctx=!0;let e=document.createElement(`canvas`).getContext(`webgl2`);e.getExtension(`OES_texture_float`),this._rctx=new m(e,new h)}this._renderingDevice=new c,this._renderingDevice.setPipelineState(v),this._shader=new u,this._quad=l.fromVertexStream(this._rctx,[0,0,1,0,0,1,1,1])}reprojectTexture(e,a,o=!1){let s=n(e.extent,a),c=new t({x:(e.extent.xmax-e.extent.xmin)/e.texture.descriptor.width,y:(e.extent.ymax-e.extent.ymin)/e.texture.descriptor.height,spatialReference:e.extent.spatialReference}),{x:l,y:u}=r(c,a,e.extent),m=(l+u)/2,h=Math.round((s.xmax-s.xmin)/m),g=Math.round((s.ymax-s.ymin)/m);m=(s.width/h+s.height/g)/2;let v=new t({x:m,y:m,spatialReference:s.spatialReference}),y=i({projectedExtent:s,srcBufferExtent:e.extent,pixelSize:v,hasWrapAround:!0,spacing:[16,16]}),b=p(this._rctx,y),x=new _(h,g);x.wrapMode=33071;let S=new f(this._rctx,x);if(this._rctx.bindFramebuffer(S),this._rctx.setViewport(0,0,h,g),this._drawReprojectedTexture(e.texture,b,{targetImageSize:[h,g],transformSpacing:y.spacing,transformGridSize:y.size}),this._rctx.useProgram(null),this._rctx.bindFramebuffer(null),b.dispose(),o){let{width:e,height:t}=S,n=new ImageData(e??0,t??0);S.readPixels(0,0,e??0,t??0,6408,d.UNSIGNED_BYTE,n.data);let r=S.detachColorTexture();return S.dispose(),{texture:r,extent:s,imageData:n}}let C=S.detachColorTexture();return S.dispose(),{texture:C,extent:s}}reprojectBitmapData(e,t){let n=o(e.bitmapData)?s(e.bitmapData):e.bitmapData,r=new _(e.bitmapData.width,e.bitmapData.height);r.wrapMode=33071;let i=new g(this._rctx,r,n),a=this.reprojectTexture({texture:i,extent:e.extent},t,!0);a.texture.dispose();let c=document.createElement(`canvas`),l=a.imageData;return c.width=l.width,c.height=l.height,c.getContext(`2d`).putImageData(l,0,0),{bitmapData:c,extent:a.extent}}async loadAndReprojectBitmapData(t,n,r){let[i]=await Promise.all([e(t,{responseType:`image`}).then(e=>e.data),a()]),o=document.createElement(`canvas`);o.width=i.width,o.height=i.height;let s=o.getContext(`2d`);s.drawImage(i,0,0);let c=s.getImageData(0,0,o.width,o.height);if(n.spatialReference.equals(r))return{bitmapData:c,extent:n};let l=this.reprojectBitmapData({bitmapData:c,extent:n},r);return{bitmapData:l.bitmapData,extent:l.extent}}_drawReprojectedTexture(e,t,n){let{width:r=0,height:i=0}=e.descriptor,a={coordScale:[1,1],srcImageSize:[r,i],opacity:1},o={texture:{texture:e,unit:0},projectionTextures:{transformTexture:{texture:t,unit:1}},pixelMaskTexture:null,highlightTexture:null},s={shader:this._shader,uniforms:{config:a,projectionConfig:n},textures:o,defines:{applyProjection:!0,lookupProjection:n.transformSpacing[0]===1,bilinear:!1,bicubic:!1,nearestOnEdge:!1,applyPixelMask:!1,applyPixelHighlights:!1},optionalAttributes:{},useComputeBuffer:!1};this._renderingDevice.setPipelineStateNeedsUpdate(!0),this._renderingDevice.submitDrawMesh(this._rctx,s,this._quad)}destroy(){this._ownsRctx?(y._instanceRefCount--,y._instanceRefCount===0&&(this._destroyWebGLResource(),this._rctx.dispose(),y._instance=null)):this._destroyWebGLResource()}_destroyWebGLResource(){this._quad.destroy(),this._renderingDevice.dispose()}}export{y as ImageReprojector};
2
+ import e from"../../request.js";import t from"../../geometry/Point.js";import{projectExecute as n}from"../../geometry/operators/projectOperator.js";import{projectResolution as r,getProjectionOffsetGrid as i,load as a}from"../../layers/raster/functions/rasterProjectionHelper.js";import{isImageSource as o,rasterize as s}from"../2d/engine/Bitmap.js";import{RenderingDevice as c}from"../2d/engine/webgl/RenderingDevice.js";import{SimpleMesh as l}from"../2d/engine/webgl/meshing/SimpleMesh.js";import{ReprojectShader as u}from"../2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ReprojectShader.js";import{PixelType as d}from"../webgl/enums.js";import{DisposableFramebufferObject as f}from"../webgl/FramebufferObject.js";import{createTransformTexture as p}from"../webgl/rasterUtils.js";import{RenderingContext as m}from"../webgl/RenderingContext.js";import{RenderingContextOptions as h}from"../webgl/RenderingContextOptions.js";import{Texture as g}from"../webgl/Texture.js";import{TextureDescriptor as _}from"../webgl/TextureDescriptor.js";const v={color:{blendMode:`none`,write:[!0,!0,!0,!0]},depth:!1,stencil:!1};class y{static{this._instanceRefCount=0}constructor(e){if(this._ownsRctx=!1,e)this._ownsRctx=!1,this._rctx=e;else{if(y._instance)return y._instanceRefCount++,y._instance;y._instanceRefCount=1,y._instance=this,this._ownsRctx=!0;let e=document.createElement(`canvas`).getContext(`webgl2`);e.getExtension(`OES_texture_float`),this._rctx=new m(e,new h)}this._renderingDevice=new c,this._renderingDevice.setPipelineState(v),this._shader=new u,this._quad=l.fromVertexStream(this._rctx,[0,0,1,0,0,1,1,1])}reprojectTexture(e,a,o=!1){let s=n(e.extent,a),c=new t({x:(e.extent.xmax-e.extent.xmin)/e.texture.descriptor.width,y:(e.extent.ymax-e.extent.ymin)/e.texture.descriptor.height,spatialReference:e.extent.spatialReference}),{x:l,y:u}=r(c,a,e.extent),m=(l+u)/2,h=Math.round((s.xmax-s.xmin)/m),g=Math.round((s.ymax-s.ymin)/m);m=(s.width/h+s.height/g)/2;let v=new t({x:m,y:m,spatialReference:s.spatialReference}),y=i({projectedExtent:s,srcBufferExtent:e.extent,pixelSize:v,hasWrapAround:!0,spacing:[16,16]}),b=p(this._rctx,y),x=new _(h,g);x.wrapMode=33071;let S=new f(this._rctx,x);if(this._rctx.bindFramebuffer(S),this._rctx.setViewport(0,0,h,g),this._drawReprojectedTexture(e.texture,b,{targetImageSize:[h,g],transformSpacing:y.spacing,transformGridSize:y.size}),this._rctx.useProgram(null),this._rctx.bindFramebuffer(null),b.dispose(),o){let{width:e,height:t}=S,n=new ImageData(e??0,t??0);S.readPixels(0,0,e??0,t??0,6408,d.UNSIGNED_BYTE,n.data);let r=S.detachColorTexture();return S.dispose(),{texture:r,extent:s,imageData:n}}let C=S.detachColorTexture();return S.dispose(),{texture:C,extent:s}}reprojectBitmapData(e,t){let n=o(e.bitmapData)?s(e.bitmapData):e.bitmapData,r=new _(e.bitmapData.width,e.bitmapData.height);r.wrapMode=33071;let i=new g(this._rctx,r,n),a=this.reprojectTexture({texture:i,extent:e.extent},t,!0);a.texture.dispose();let c=document.createElement(`canvas`),l=a.imageData;return c.width=l.width,c.height=l.height,c.getContext(`2d`).putImageData(l,0,0),{bitmapData:c,extent:a.extent}}async loadAndReprojectBitmapData(t,n,r){let[i]=await Promise.all([e(t,{responseType:`image`}).then(e=>e.data),a()]),o=document.createElement(`canvas`);o.width=i.width,o.height=i.height;let s=o.getContext(`2d`);s.drawImage(i,0,0);let c=s.getImageData(0,0,o.width,o.height);if(n.spatialReference.equals(r))return{bitmapData:c,extent:n};let l=this.reprojectBitmapData({bitmapData:c,extent:n},r);return{bitmapData:l.bitmapData,extent:l.extent}}_drawReprojectedTexture(e,t,n){let{width:r=0,height:i=0}=e.descriptor,a={coordScale:[1,1],srcImageSize:[r,i],opacity:1},o={texture:{texture:e,unit:0},projectionTextures:{transformTexture:{texture:t,unit:1}},pixelMaskTexture:null,highlightTexture:null},s={shader:this._shader,uniforms:{config:a,projectionConfig:n},textures:o,defines:{applyProjection:!0,lookupProjection:n.transformSpacing[0]===1,bilinear:!1,bicubic:!1,nearestOnEdge:!1,applyPixelMask:!1,applyPixelHighlights:!1},optionalAttributes:{},useComputeBuffer:!1};this._renderingDevice.setPipelineStateNeedsUpdate(!0),this._renderingDevice.submitDrawMesh(this._rctx,s,this._quad)}destroy(){this._ownsRctx?(y._instanceRefCount--,y._instanceRefCount===0&&(this._destroyWebGLResource(),this._rctx.dispose(),y._instance=null)):this._destroyWebGLResource()}_destroyWebGLResource(){this._quad.destroy(),this._renderingDevice.dispose()}}export{y as ImageReprojector};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../core/Logger.js";import{disposeMaybe as t}from"../../core/maybe.js";import{BufferObject as n}from"./BufferObject.js";import{webglDebugEnabled as r}from"./checkWebGLError.js";import{ResourceType as i,ColorAttachment0 as a,PixelType as o,StencilAttachment as s,SizedDepthStencilFormat as c,DepthStencilAttachment as l,SizedDepthFormat as u,DepthAttachment as d}from"./enums.js";import{Renderbuffer as f}from"./Renderbuffer.js";import p from"./Texture.js";const m=()=>e.getLogger(`esri.views.webgl.FramebufferObject`);class h{constructor(e,t,n){if(this._context=e,this._level=0,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,e.instanceCounter.increment(i.FramebufferObject,this),t!=null){let n=C(e,t);n!=null&&(this._colorAttachments.set(a,n),_(n)?this._validateTextureDescriptor(n.descriptor):this._validateRenderbufferDescriptor(n.descriptor)),this._validateColorAttachmentPoint(a)}if(n!=null){if(y(n))this._depthStencilTexture=_(n)?n:new p(e,n),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{let t=v(n)?n:new f(e,n);this._depthStencilBuffer=t,this._validateRenderbufferDescriptor(t.descriptor)}}}get glName(){return this._glName}get colorTexture(){let e=this._colorAttachments.get(a);return _(e)?e:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){return(this._colorAttachments.get(a)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.width??0}get height(){return(this._colorAttachments.get(a)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.height??0}get usedMemory(){return this._colorAttachments.values().reduce((e,t)=>e+t.usedMemory,this.depthStencil?.usedMemory??0)}get level(){return this._level}set level(e){this._level!==e&&(this._level=e,this._glName&&this._context.temporaryBindFramebuffer(this,()=>this._initializeAttachments()))}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(e){let t=this._colorAttachments.get(e);return!t||!_(t)?null:t}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(e,t=a){if(!e)return;this._validateColorAttachmentPoint(t);let{descriptor:n}=e;this._validateTextureDescriptor(n),this.detachColorTexture(t)?.dispose(),this._colorAttachments.set(t,e),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t))}detachColorTexture(e=a){let t=this._colorAttachments.get(e);if(!t)return;let n=_(t);return this._glName&&this._context.temporaryBindFramebuffer(this,()=>{if(n)this._framebufferTexture2D(null,e);else{let t=this._context.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}}),this._colorAttachments.delete(e),n?t:void 0}detachColorTextures(...e){if(e.length!==0){if(this._glName){let t=this._context.gl;this._context.temporaryBindFramebuffer(this,()=>{e.forEach(e=>{_(this._colorAttachments.get(e))?this._framebufferTexture2D(null,e):t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)})})}e.forEach(e=>this._colorAttachments.delete(e))}}setColorTextureTarget(e,t=a,n=0){let r=this._colorAttachments.get(t);r&&(e===35866?this._framebufferTextureLayer(r.glName,t,36160,n):this._framebufferTexture2D(r.glName,t,e,36160))}attachDepthStencil(e){if(e)switch(e.type){case 1:return this._attachDepthStencilTexture(e);case 2:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(e==null)return;let{descriptor:t}=e,{pixelFormat:n,dataType:r}=t;n!==34041&&n!==6402?console.error(`Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!`):n===34041&&r!==o.UNSIGNED_INT_24_8?console.error(`Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!`):n===6402&&r!==o.UNSIGNED_INT&&r!==o.UNSIGNED_SHORT?console.error(`Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!`):(this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,E(n))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e)}detachDepthStencilTexture(){let e=this._depthStencilTexture;return e&&this._glName&&this._context.temporaryBindFramebuffer(this,()=>{this._framebufferTexture2D(null,E(e.descriptor.pixelFormat))}),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(e==null)return;let t=e.descriptor;if(this._validateRenderbufferDescriptor(t),this._disposeDepthStencilAttachments(),this._glName){this._context.bindFramebuffer(this);let{gl:n}=this._context,r=this._getGLAttachmentPoint(t);n.framebufferRenderbuffer(36160,r,n.RENDERBUFFER,e.glName)}this._depthStencilBuffer=e}detachDepthStencilBuffer(){let e=this._depthStencilBuffer;if(e&&this._glName){let{_context:t}=this,n=t.boundFramebuffer;t.bindFramebuffer(this);let{gl:r}=t,i=this._getGLAttachmentPoint(e.descriptor);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,null),t.bindFramebuffer(n)}return this._depthStencilBuffer=null,e}invalidateAttachments(e){let{_context:t}=this;t.temporaryBindFramebuffer(this,()=>t.gl.invalidateFramebuffer(36160,e),!0)}copyToTexture(e,t,n,r,i,a,o){(e<0||t<0||i<0||a<0)&&console.error(`Offsets cannot be negative!`),(n<=0||r<=0)&&console.error(`Copy width and height must be greater than zero!`);let s=o.descriptor;o.descriptor.target!==3553&&console.error(`Texture target must be TEXTURE_2D!`),(s?.width==null||s?.height==null||e+n>this.width||t+r>this.height||i+n>s.width||a+r>s.height)&&console.error(`Bad dimensions, the current input values will attempt to read or copy out of bounds!`);let c=this._context,l=c.bindTexture(o,p.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(p.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,i,a,e,t,n,r),c.bindTexture(l,p.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,n,r,i,a,o){(n<=0||r<=0)&&console.error(`Copy width and height must be greater than zero!`),o||console.error(`Target memory is not initialized!`),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,n,r,i,a,o)}async readPixelsAsync(e,t,r,i,a,o,s,c){let{gl:l}=this._context,u=n.createPixelPack(this._context,35041,s.byteLength);try{this._context.bindBuffer(u);let n=this._context.boundFramebuffer;try{this._context.bindFramebuffer(this),l.readPixels(e,t,r,i,a,o,0)}finally{this._context.unbindBuffer(35051),this._context.bindFramebuffer(n)}await u.getSubDataAsync(s,void 0,void 0,void 0,c)}finally{u.dispose()}}resize(e,t){if(this.width===e&&this.height===t)return;let n={width:e,height:t};if(w(n,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(e=>e.resize(n.width,n.height)),this._depthStencilTexture?.resize(n.width,n.height),this._glName&&(w(n,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(n.width,n.height),r())){let{gl:e}=this._context;e.checkFramebufferStatus(36160)!==e.FRAMEBUFFER_COMPLETE&&console.error(`Framebuffer is incomplete!`)}}initializeAndBind(e=36160){let{gl:t}=this._context;this._glName?t.bindFramebuffer(e,this._glName):(this._glName&&t.deleteFramebuffer(this._glName),this._glName=t.createFramebuffer(),t.bindFramebuffer(e,this._glName),this._initializeAttachments(e))}_initializeAttachments(e=36160){let{gl:t}=this._context;if(this._colorAttachments.forEach((t,n)=>{if(_(t)){let r=T(t);r===35866?this._framebufferTextureLayer(t.glName,n,e):this._framebufferTexture2D(t.glName,n,r,e)}else if(v(t)){let r=this._context.gl;r.framebufferRenderbuffer(e,n,r.RENDERBUFFER,t.glName)}}),this._depthStencilBuffer){let n=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(e,n,t.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){let t=E(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,t,T(this._depthStencilTexture),e)}r()&&t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error(`Framebuffer is incomplete!`)}_framebufferTexture2D(e,t=a,n=3553,r=36160){this._context.gl.framebufferTexture2D(r,t,n,e,this._level)}_framebufferTextureLayer(e,t=a,n=36160,r=0){this._context.gl.framebufferTextureLayer(n,t,e,this._level,r)}_disposeDepthStencilAttachments(){let e=this._context.gl;if(this._depthStencilBuffer){if(this._glName){this._context.bindFramebuffer(this);let t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(36160,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=t(this._depthStencilBuffer)}this._depthStencilTexture&&=(this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,E(this._depthStencilTexture.descriptor.pixelFormat))),t(this._depthStencilTexture))}_validateTextureDescriptor(e){e.target!==3553&&e.target!==34067&&e.target!==35866&&console.error(`Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!`),w(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderbufferDescriptor(e){w(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width!==e.width||this.height!==e.height)&&console.error(`Attachment size must match framebuffer size!`)}_getGLAttachmentPoint(e){switch(e.internalFormat){case u.DEPTH_COMPONENT16:case u.DEPTH_COMPONENT24:case u.DEPTH_COMPONENT32F:return d;case c.DEPTH24_STENCIL8:case c.DEPTH32F_STENCIL8:return l;case 36168:return s;default:return a}}_validateColorAttachmentPoint(t){if(h._MAX_COLOR_ATTACHMENTS===-1){let{gl:e}=this._context;h._MAX_COLOR_ATTACHMENTS=e.getParameter(e.MAX_COLOR_ATTACHMENTS)}let n=t-a;n+1>h._MAX_COLOR_ATTACHMENTS&&e.getLogger(`esri.views.webgl.FrameBufferObject`).error(`esri.FrameBufferObject`,`illegal attachment point for color attachment: ${n+1}. Implementation supports up to ${h._MAX_COLOR_ATTACHMENTS} color attachments`)}}class g extends h{constructor(e,t,n){super(e,t,n)}dispose(){let{_colorAttachments:e,_glName:t,_context:n}=this;if(n.instanceCounter.decrement(i.FramebufferObject,this),e.size===0&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!t)return;let r=n.boundFramebuffer,a=Array.from(e.values());this.detachColorTextures(...e.keys()),a.forEach(e=>e.dispose()),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),n.gl.deleteFramebuffer(this._glName),this._glName=null,n.bindFramebuffer(r===this?null:r)}}function _(e){return S(e)===1}function v(e){return S(e)===2}function y(e){return _(e)||b(e)}function b(e){return S(e)===0}function x(e){return S(e)===3||e!=null&&`samples`in e}function S(e){return e!=null&&`type`in e?e.type:null}function C(e,t){return _(t)||v(t)?t:b(t)?new p(e,t):x(t)?new f(e,t):null}function w(e,t){let n=Math.max(e.width,e.height);if(n>t){m().warnOnce(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);let r=t/n;return e.width=Math.round(e.width*r),e.height=Math.round(e.height*r),!1}return!0}function T(e){return e.descriptor.target===34067?34069:e.descriptor.target===35866?35866:3553}function E(e){return e===6402?d:l}export{g as DisposableFramebufferObject,h as FramebufferObject,w as ensureAttachmentMaxSize};
2
+ import e from"../../core/Logger.js";import{disposeMaybe as t}from"../../core/maybe.js";import{BufferObject as n}from"./BufferObject.js";import{webglDebugEnabled as r}from"./checkWebGLError.js";import{ResourceType as i,ColorAttachment0 as a,PixelType as o,StencilAttachment as s,SizedDepthStencilFormat as c,DepthStencilAttachment as l,SizedDepthFormat as u,DepthAttachment as d}from"./enums.js";import{Renderbuffer as f}from"./Renderbuffer.js";import{Texture as p}from"./Texture.js";const m=()=>e.getLogger(`esri.views.webgl.FramebufferObject`);class h{constructor(e,t,n){if(this._context=e,this._level=0,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,e.instanceCounter.increment(i.FramebufferObject,this),t!=null){let n=C(e,t);n!=null&&(this._colorAttachments.set(a,n),_(n)?this._validateTextureDescriptor(n.descriptor):this._validateRenderbufferDescriptor(n.descriptor)),this._validateColorAttachmentPoint(a)}if(n!=null){if(y(n))this._depthStencilTexture=_(n)?n:new p(e,n),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{let t=v(n)?n:new f(e,n);this._depthStencilBuffer=t,this._validateRenderbufferDescriptor(t.descriptor)}}}get glName(){return this._glName}get colorTexture(){let e=this._colorAttachments.get(a);return _(e)?e:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){return(this._colorAttachments.get(a)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.width??0}get height(){return(this._colorAttachments.get(a)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.height??0}get usedMemory(){return this._colorAttachments.values().reduce((e,t)=>e+t.usedMemory,this.depthStencil?.usedMemory??0)}get level(){return this._level}set level(e){this._level!==e&&(this._level=e,this._glName&&this._context.temporaryBindFramebuffer(this,()=>this._initializeAttachments()))}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(e){let t=this._colorAttachments.get(e);return!t||!_(t)?null:t}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(e,t=a){if(!e)return;this._validateColorAttachmentPoint(t);let{descriptor:n}=e;this._validateTextureDescriptor(n),this.detachColorTexture(t)?.dispose(),this._colorAttachments.set(t,e),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t))}detachColorTexture(e=a){let t=this._colorAttachments.get(e);if(!t)return;let n=_(t);return this._glName&&this._context.temporaryBindFramebuffer(this,()=>{if(n)this._framebufferTexture2D(null,e);else{let t=this._context.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}}),this._colorAttachments.delete(e),n?t:void 0}detachColorTextures(...e){if(e.length!==0){if(this._glName){let t=this._context.gl;this._context.temporaryBindFramebuffer(this,()=>{e.forEach(e=>{_(this._colorAttachments.get(e))?this._framebufferTexture2D(null,e):t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)})})}e.forEach(e=>this._colorAttachments.delete(e))}}setColorTextureTarget(e,t=a,n=0){let r=this._colorAttachments.get(t);r&&(e===35866?this._framebufferTextureLayer(r.glName,t,36160,n):this._framebufferTexture2D(r.glName,t,e,36160))}attachDepthStencil(e){if(e)switch(e.type){case 1:return this._attachDepthStencilTexture(e);case 2:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(e==null)return;let{descriptor:t}=e,{pixelFormat:n,dataType:r}=t;n!==34041&&n!==6402?console.error(`Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!`):n===34041&&r!==o.UNSIGNED_INT_24_8?console.error(`Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!`):n===6402&&r!==o.UNSIGNED_INT&&r!==o.UNSIGNED_SHORT?console.error(`Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!`):(this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,E(n))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e)}detachDepthStencilTexture(){let e=this._depthStencilTexture;return e&&this._glName&&this._context.temporaryBindFramebuffer(this,()=>{this._framebufferTexture2D(null,E(e.descriptor.pixelFormat))}),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(e==null)return;let t=e.descriptor;if(this._validateRenderbufferDescriptor(t),this._disposeDepthStencilAttachments(),this._glName){this._context.bindFramebuffer(this);let{gl:n}=this._context,r=this._getGLAttachmentPoint(t);n.framebufferRenderbuffer(36160,r,n.RENDERBUFFER,e.glName)}this._depthStencilBuffer=e}detachDepthStencilBuffer(){let e=this._depthStencilBuffer;if(e&&this._glName){let{_context:t}=this,n=t.boundFramebuffer;t.bindFramebuffer(this);let{gl:r}=t,i=this._getGLAttachmentPoint(e.descriptor);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,null),t.bindFramebuffer(n)}return this._depthStencilBuffer=null,e}invalidateAttachments(e){let{_context:t}=this;t.temporaryBindFramebuffer(this,()=>t.gl.invalidateFramebuffer(36160,e),!0)}copyToTexture(e,t,n,r,i,a,o){(e<0||t<0||i<0||a<0)&&console.error(`Offsets cannot be negative!`),(n<=0||r<=0)&&console.error(`Copy width and height must be greater than zero!`);let s=o.descriptor;o.descriptor.target!==3553&&console.error(`Texture target must be TEXTURE_2D!`),(s?.width==null||s?.height==null||e+n>this.width||t+r>this.height||i+n>s.width||a+r>s.height)&&console.error(`Bad dimensions, the current input values will attempt to read or copy out of bounds!`);let c=this._context,l=c.bindTexture(o,p.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(p.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,i,a,e,t,n,r),c.bindTexture(l,p.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,n,r,i,a,o){(n<=0||r<=0)&&console.error(`Copy width and height must be greater than zero!`),o||console.error(`Target memory is not initialized!`),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,n,r,i,a,o)}async readPixelsAsync(e,t,r,i,a,o,s,c){let{gl:l}=this._context,u=n.createPixelPack(this._context,35041,s.byteLength);try{this._context.bindBuffer(u);let n=this._context.boundFramebuffer;try{this._context.bindFramebuffer(this),l.readPixels(e,t,r,i,a,o,0)}finally{this._context.unbindBuffer(35051),this._context.bindFramebuffer(n)}await u.getSubDataAsync(s,void 0,void 0,void 0,c)}finally{u.dispose()}}resize(e,t){if(this.width===e&&this.height===t)return;let n={width:e,height:t};if(w(n,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(e=>e.resize(n.width,n.height)),this._depthStencilTexture?.resize(n.width,n.height),this._glName&&(w(n,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(n.width,n.height),r())){let{gl:e}=this._context;e.checkFramebufferStatus(36160)!==e.FRAMEBUFFER_COMPLETE&&console.error(`Framebuffer is incomplete!`)}}initializeAndBind(e=36160){let{gl:t}=this._context;this._glName?t.bindFramebuffer(e,this._glName):(this._glName&&t.deleteFramebuffer(this._glName),this._glName=t.createFramebuffer(),t.bindFramebuffer(e,this._glName),this._initializeAttachments(e))}_initializeAttachments(e=36160){let{gl:t}=this._context;if(this._colorAttachments.forEach((t,n)=>{if(_(t)){let r=T(t);r===35866?this._framebufferTextureLayer(t.glName,n,e):this._framebufferTexture2D(t.glName,n,r,e)}else if(v(t)){let r=this._context.gl;r.framebufferRenderbuffer(e,n,r.RENDERBUFFER,t.glName)}}),this._depthStencilBuffer){let n=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(e,n,t.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){let t=E(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,t,T(this._depthStencilTexture),e)}r()&&t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error(`Framebuffer is incomplete!`)}_framebufferTexture2D(e,t=a,n=3553,r=36160){this._context.gl.framebufferTexture2D(r,t,n,e,this._level)}_framebufferTextureLayer(e,t=a,n=36160,r=0){this._context.gl.framebufferTextureLayer(n,t,e,this._level,r)}_disposeDepthStencilAttachments(){let e=this._context.gl;if(this._depthStencilBuffer){if(this._glName){this._context.bindFramebuffer(this);let t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(36160,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=t(this._depthStencilBuffer)}this._depthStencilTexture&&=(this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,E(this._depthStencilTexture.descriptor.pixelFormat))),t(this._depthStencilTexture))}_validateTextureDescriptor(e){e.target!==3553&&e.target!==34067&&e.target!==35866&&console.error(`Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!`),w(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderbufferDescriptor(e){w(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width!==e.width||this.height!==e.height)&&console.error(`Attachment size must match framebuffer size!`)}_getGLAttachmentPoint(e){switch(e.internalFormat){case u.DEPTH_COMPONENT16:case u.DEPTH_COMPONENT24:case u.DEPTH_COMPONENT32F:return d;case c.DEPTH24_STENCIL8:case c.DEPTH32F_STENCIL8:return l;case 36168:return s;default:return a}}_validateColorAttachmentPoint(t){if(h._MAX_COLOR_ATTACHMENTS===-1){let{gl:e}=this._context;h._MAX_COLOR_ATTACHMENTS=e.getParameter(e.MAX_COLOR_ATTACHMENTS)}let n=t-a;n+1>h._MAX_COLOR_ATTACHMENTS&&e.getLogger(`esri.views.webgl.FrameBufferObject`).error(`esri.FrameBufferObject`,`illegal attachment point for color attachment: ${n+1}. Implementation supports up to ${h._MAX_COLOR_ATTACHMENTS} color attachments`)}}class g extends h{constructor(e,t,n){super(e,t,n)}dispose(){let{_colorAttachments:e,_glName:t,_context:n}=this;if(n.instanceCounter.decrement(i.FramebufferObject,this),e.size===0&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!t)return;let r=n.boundFramebuffer,a=Array.from(e.values());this.detachColorTextures(...e.keys()),a.forEach(e=>e.dispose()),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),n.gl.deleteFramebuffer(this._glName),this._glName=null,n.bindFramebuffer(r===this?null:r)}}function _(e){return S(e)===1}function v(e){return S(e)===2}function y(e){return _(e)||b(e)}function b(e){return S(e)===0}function x(e){return S(e)===3||e!=null&&`samples`in e}function S(e){return e!=null&&`type`in e?e.type:null}function C(e,t){return _(t)||v(t)?t:b(t)?new p(e,t):x(t)?new f(e,t):null}function w(e,t){let n=Math.max(e.width,e.height);if(n>t){m().warnOnce(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);let r=t/n;return e.width=Math.round(e.width*r),e.height=Math.round(e.height*r),!1}return!0}function T(e){return e.descriptor.target===34067?34069:e.descriptor.target===35866?35866:3553}function E(e){return e===6402?d:l}export{g as DisposableFramebufferObject,h as FramebufferObject,w as ensureAttachmentMaxSize};