@arcgis/core 6.0.0-next.54 → 6.0.0-next.56

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 (467) hide show
  1. package/WebScene.js +2 -2
  2. package/applications/Components/OrientedImageryViewer/shared/constants.js +1 -1
  3. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  4. package/arcade/arcadeAsyncRuntime.js +1 -1
  5. package/arcade/arcadeCompiler.js +1 -1
  6. package/arcade/arcadeRuntime.js +1 -1
  7. package/arcade/featureset/support/sqlUtils.js +1 -1
  8. package/arcade/validation/arcadeValidator.js +1 -1
  9. package/arcgisGlobal.d.ts +1 -0
  10. package/assets/esri/core/workers/RemoteClient.js +1 -1
  11. package/assets/esri/core/workers/chunks/0329fa3aa3403f1c243b.js +1 -0
  12. package/assets/esri/core/workers/chunks/033b9fcd9833db3b6e7d.js +1 -0
  13. package/assets/esri/core/workers/chunks/{6602310c3fcd91fb6a2f.js → 07c8ac092e4b9e8d5b3c.js} +1 -1
  14. package/assets/esri/core/workers/chunks/0978e12dd6a1cbc50b80.js +1 -0
  15. package/assets/esri/core/workers/chunks/0a97b1974367382cfdf5.js +1 -0
  16. package/assets/esri/core/workers/chunks/{db0a7671ab5cbe8afd72.js → 123661019bb69c53f2d3.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{e956845255bce0910944.js → 1507297550c3cd1268e2.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{1b41ba050cde068d2860.js → 193a73a2c7f4f8482c21.js} +1 -1
  19. package/assets/esri/core/workers/chunks/1c0f5c42331fb6fc26cb.js +1 -0
  20. package/assets/esri/core/workers/chunks/20acb6f3ed5140b6c6c6.js +1 -0
  21. package/assets/esri/core/workers/chunks/2cd2fcf4a37d180d5d5c.js +1 -0
  22. package/assets/esri/core/workers/chunks/2f9adf0b809ce8797ebf.js +1 -0
  23. package/assets/esri/core/workers/chunks/{afb4dfb89fbc8a342cc5.js → 3354f1fa90f8ce4c8fde.js} +1 -1
  24. package/assets/esri/core/workers/chunks/3982409149571a827390.js +1 -0
  25. package/assets/esri/core/workers/chunks/{9b458b0d1627f22fdd93.js → 3b11e4d2e69b7aea1d65.js} +1 -1
  26. package/assets/esri/core/workers/chunks/3d851710f7fcc27c5b60.js +2 -0
  27. package/assets/esri/core/workers/chunks/3e8d70039800f2395d66.js +1 -0
  28. package/assets/esri/core/workers/chunks/41694ee8990e799da225.js +1 -0
  29. package/assets/esri/core/workers/chunks/4d8539674fc2e4fea03c.js +1 -0
  30. package/assets/esri/core/workers/chunks/{12add2003631fa314f25.js → 5060be52a380fc4920f8.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{2aa6be0b047a1b25a520.js → 53bbb9aa6e4e4a0a8121.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{c6d82397044e403a1f61.js → 5954f02c3901b28d8e73.js} +1 -1
  33. package/assets/esri/core/workers/chunks/5ba6007c3c49a8153256.js +1 -0
  34. package/assets/esri/core/workers/chunks/5bdd95eeb8f34dbf26f2.js +2 -0
  35. package/assets/esri/core/workers/chunks/{4707aedcc1b3bdf5e987.js → 5c34d49a6c9cc34b7626.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{ced5dfb2bf46fc5eac8c.js → 5e47026c681238038955.js} +2 -2
  37. package/assets/esri/core/workers/chunks/{2baf35b1b19482d603b5.js → 5f7505ada0991cfbdd84.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{976303f47c342b9d1cc0.js → 62ddd3a82864e26f009a.js} +1 -1
  39. package/assets/esri/core/workers/chunks/69a09c6acb5ae03c67f6.js +1 -0
  40. package/assets/esri/core/workers/chunks/{542a9c414c99d84d52ab.js → 6a202ef9ba9b89e09153.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{0826feebdca8a31eb630.js → 6ba6fece5c11fe2a6ace.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{5eb69e2895e5aec81051.js → 6fd10891506925560443.js} +1 -1
  43. package/assets/esri/core/workers/chunks/7b156905d168bf973518.js +1 -0
  44. package/assets/esri/core/workers/chunks/7b6fd287e7043ad50f4e.js +1 -0
  45. package/assets/esri/core/workers/chunks/7baa49055bc31618b56e.js +1 -0
  46. package/assets/esri/core/workers/chunks/8570e3df90fb76a8741a.js +1 -0
  47. package/assets/esri/core/workers/chunks/{c3c0f24a9e0047232ae1.js → 8679dfc0c53355b6feb0.js} +1 -1
  48. package/assets/esri/core/workers/chunks/8a636dc51372e14c98f5.js +1 -0
  49. package/assets/esri/core/workers/chunks/{d14732a57c8e63948c60.js → 9117c9b720c9ba6e7a6e.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{f7e33d37dd11fb08f3f8.js → 97107e64407fa6825620.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{5118c7269b706089c88e.js → a05a2c2aaf0c288f9681.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{944f17e9c9f681b971fb.js → a12e2a345005189c64be.js} +1 -1
  53. package/assets/esri/core/workers/chunks/a22458e5272332d86cb9.js +1 -0
  54. package/assets/esri/core/workers/chunks/{15b3386ad92a0b4149b8.js → a24dc5350af001db417a.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{10967a36c77c5188690d.js → a66d6298236d59a615db.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{3ea480cebf8ee56228a5.js → a7dfca326883384d2751.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{723d8316f5d4b6ce2942.js → a9539393e2f1812a973a.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{ac8d38016e4bee37a77c.js → ab784764ddf9d7f693a1.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{255f5b45c4d32f97f86c.js → ac0861014b3d2f1a1de2.js} +1 -1
  60. package/assets/esri/core/workers/chunks/ace210d313ce53f3ae10.js +1 -0
  61. package/assets/esri/core/workers/chunks/ae48ee283cfa5b3c14b0.js +1 -0
  62. package/assets/esri/core/workers/chunks/b38b6fe08a367e9de4f5.js +1 -0
  63. package/assets/esri/core/workers/chunks/{4e651869e9a196494694.js → b6e628b5d2643af4c19b.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{b37ab6b1cb4cfc85cd9d.js → b7828d7e2c5b75644057.js} +1 -1
  65. package/assets/esri/core/workers/chunks/bbd8fcb0bbba7bde3d9b.js +1 -0
  66. package/assets/esri/core/workers/chunks/{ec465abb0344ad719e9d.js → bd8e329ec74d921d311a.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{56e6e70aa40e51827290.js → c3f94024c6c9eed9f273.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{6d17b45022dfd2548098.js → c5ddf8b347c31fe772a3.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{ee9af58ae202b803bba7.js → c7a0c4ca37ebd1d98cf1.js} +1 -1
  70. package/assets/esri/core/workers/chunks/d0659f1b0495734be4b3.js +1 -0
  71. package/assets/esri/core/workers/chunks/d7763c42754152510e13.js +2 -0
  72. package/assets/esri/core/workers/chunks/{b9a2b05ede02c305e865.js → d8ffb1502def5c85740b.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{7dfe1e78d2e66de6be22.js → d9ef244019954d5a8a27.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{95403bb27a4ea0a4b7b1.js → ddbfa664e69612295785.js} +1 -1
  75. package/assets/esri/core/workers/chunks/dfa1b0308e5e82d1ddfe.js +1120 -0
  76. package/assets/esri/core/workers/chunks/e566102c7ed7a8ebf89e.js +1 -0
  77. package/assets/esri/core/workers/chunks/e74586b074d0fa6abb4b.js +1 -0
  78. package/assets/esri/core/workers/chunks/e7dff025780726d5feae.js +1 -0
  79. package/assets/esri/core/workers/chunks/e96fa029acba59c04e4e.js +2 -0
  80. package/assets/esri/core/workers/chunks/{55d28d3f5b8ced061e39.js → eaf73ce60f39a48ddd2a.js} +1 -1
  81. package/assets/esri/core/workers/chunks/ed2f2a5da830d058e339.js +1 -0
  82. package/assets/esri/core/workers/chunks/{e592f2483db71230e8e5.js → efd6ea0966f60ab19520.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{944cb751c85d3a127f49.js → f52d081bbde5c95265cf.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{1de9be7b65109c207bd5.js → fbd5f3b81cd9f061824d.js} +1 -1
  85. package/assets/esri/core/workers/chunks/fdfbd201be372d3796bf.js +2 -0
  86. package/assets/esri/core/workers/chunks/ff0a0819bba5e8264c47.js +1 -0
  87. package/assets/esri/layers/raster/formats/blosc-wasm.wasm +0 -0
  88. package/assets/esri/libs/librust-parquet/pkg/parquet_bg.wasm +0 -0
  89. package/basemapGallery/support/basemapCompatibilityUtils.js +1 -1
  90. package/chunks/BlendLayers.glsl.js +1 -1
  91. package/chunks/ColorMaterial.glsl.js +14 -14
  92. package/chunks/Component.glsl.js +37 -37
  93. package/chunks/CypherParser.js +1 -1
  94. package/chunks/DefaultMaterial.glsl.js +15 -15
  95. package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
  96. package/chunks/HUDMaterial.glsl.js +3 -3
  97. package/chunks/MultiPathImpl.js +1 -1
  98. package/chunks/OperatorGeodesicBuffer.js +1 -1
  99. package/chunks/Path.glsl.js +15 -15
  100. package/chunks/Pattern.glsl.js +20 -20
  101. package/chunks/RasterColorizer.glsl.js +1 -1
  102. package/chunks/ShadowHighlight.glsl.js +1 -1
  103. package/chunks/Terrain.glsl.js +24 -24
  104. package/chunks/UnitFactory.js +1 -1
  105. package/chunks/Water.glsl.js +29 -20
  106. package/chunks/blosc-wasm.js +2 -0
  107. package/chunks/cameraUtilsSpherical.js +1 -1
  108. package/chunks/parquet.js +1 -1
  109. package/chunks/pdf.js +57 -0
  110. package/chunks/text.js +1 -1
  111. package/config.js +1 -1
  112. package/core/accessorSupport/write.js +1 -1
  113. package/core/scheduling.js +1 -1
  114. package/core/sql/SqlInterval.js +1 -1
  115. package/core/urlUtils.js +1 -1
  116. package/geometry/geometryEngine.js +1 -1
  117. package/geometry/operators/gx/operatorOffset.js +1 -1
  118. package/geometry/support/Ellipsoid.js +1 -1
  119. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  120. package/geometry/support/geodesicConstants.js +1 -1
  121. package/geometry/support/meshUtils/primitives.js +1 -1
  122. package/kernel.js +1 -1
  123. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  124. package/layers/VoxelWasmPerSceneView.js +1 -1
  125. package/layers/effects/parser.js +1 -1
  126. package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
  127. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -56
  128. package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
  129. package/layers/geospatialPDF/parserUtils.js +2 -0
  130. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  131. package/layers/graphics/data/QueryEngineResult.js +1 -1
  132. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  133. package/layers/parquet.js +1 -1
  134. package/layers/raster/datasets/ZarrRaster.js +1 -1
  135. package/layers/raster/datasets/wcsCoverageParser.js +1 -1
  136. package/layers/raster/formats/RasterCodec.js +1 -1
  137. package/layers/raster/formats/blosc.js +2 -0
  138. package/layers/support/BuildingFilter.js +1 -1
  139. package/layers/support/ControlPoint.js +1 -1
  140. package/layers/support/ControlPointsGeoreference.js +1 -1
  141. package/layers/support/IntegratedMeshSemantics.js +1 -1
  142. package/layers/support/commonProperties.js +1 -1
  143. package/layers/support/fieldUtils.d.ts +23 -87
  144. package/layers/support/fieldUtils.js +1 -1
  145. package/layers/support/geospatialPDFUtils.d.ts +63 -0
  146. package/layers/support/geospatialPDFUtils.js +2 -0
  147. package/layers/support/layersMapping.js +1 -1
  148. package/layers/video/VideoController.js +1 -1
  149. package/legend/ActiveLayerInfo.js +1 -1
  150. package/libs/ajv/ajv.bundle-wrapper.js +1 -1
  151. package/package.json +6 -6
  152. package/renderers/types.d.ts +1 -1
  153. package/rest/knowledgeGraphService.js +1 -1
  154. package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
  155. package/smartMapping/statistics/support/attributeDensity.js +1 -1
  156. package/smartMapping/support/adapters/support/utils.js +1 -1
  157. package/support/tests/serviceMockDependencies.js +1 -1
  158. package/symbols/CIMSymbol.d.ts +9 -9
  159. package/symbols/PathSymbol3DLayer.d.ts +1 -1
  160. package/symbols/WaterSymbol3DLayer.d.ts +13 -1
  161. package/symbols/WaterSymbol3DLayer.js +1 -1
  162. package/symbols/cim/CIMEffects.js +1 -1
  163. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  164. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  165. package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
  166. package/symbols/cim/rasterizingUtils.js +1 -1
  167. package/views/2d/PaddedViewState.js +1 -1
  168. package/views/2d/engine/vectorTiles/buckets/FillBucket.js +1 -1
  169. package/views/2d/engine/vectorTiles/constants.js +1 -1
  170. package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +1 -1
  171. package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
  172. package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
  173. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  174. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  175. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  176. package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
  177. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  178. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  179. package/views/2d/layers/ParquetLayerView2D.js +1 -1
  180. package/views/2d/layers/features/Processor.js +1 -1
  181. package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
  182. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  183. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  184. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  185. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  186. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  187. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  188. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  189. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  190. package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
  191. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  192. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  193. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  194. package/views/3d/analysis/Viewshed/ViewshedObserverManipulatedObject3D.js +1 -1
  195. package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
  196. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  197. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  198. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
  199. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementVisualization.js +1 -1
  200. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  201. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  202. package/views/3d/camera/constraintUtils.js +1 -1
  203. package/views/3d/camera/intersectionUtils.js +1 -1
  204. package/views/3d/environment/EnvironmentView.js +1 -1
  205. package/views/3d/focusAreaUtils.js +1 -1
  206. package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
  207. package/views/3d/interactive/Manipulator3D.js +1 -1
  208. package/views/3d/interactive/Manipulator3DBase.js +1 -1
  209. package/views/3d/interactive/editingTools/ManipulatedObject3DGraphic.js +1 -1
  210. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  211. package/views/3d/interactive/editingTools/manipulations/config.js +1 -1
  212. package/views/3d/interactive/editingTools/media/MediaElementControllerControlPoints.js +1 -1
  213. package/views/3d/interactive/editingTools/media/MediaElementControllerShape.js +1 -1
  214. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  215. package/views/3d/interactive/editingTools/transform/ScaleRotateMeshAdapter.js +1 -1
  216. package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
  217. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  218. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  219. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  220. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  221. package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
  222. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  223. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  224. package/views/3d/layers/DrapedSubView3D.js +1 -1
  225. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  226. package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
  227. package/views/3d/layers/FlowSubView3D.js +1 -1
  228. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  229. package/views/3d/layers/I3SMeshView3D.js +1 -1
  230. package/views/3d/layers/RouteLayerView3D.js +1 -1
  231. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  232. package/views/3d/layers/TiledLayerView3D.js +1 -1
  233. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  234. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  235. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  236. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  237. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  238. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  239. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  240. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  241. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  242. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  243. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  244. package/views/3d/layers/graphics/Graphics3DSymbolFactory.js +1 -1
  245. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  246. package/views/3d/layers/graphics/LabelInfo.js +1 -1
  247. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  248. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  249. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  250. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  251. package/views/3d/layers/i3s/I3SNode.js +1 -1
  252. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  253. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  254. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  255. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  256. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  257. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  258. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  259. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  260. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  261. package/views/3d/layers/support/Tiles3DBVH.js +1 -1
  262. package/views/3d/layers/support/Tiles3DLayerViewRegistration.js +1 -1
  263. package/views/3d/layers/support/createTileBVHForLayer.js +1 -1
  264. package/views/3d/layers/support/selectTiles3DSpatialReference.js +1 -1
  265. package/views/3d/layers/support/uvUtils.js +1 -1
  266. package/views/3d/state/Constraints.js +1 -1
  267. package/views/3d/state/ConstraintsManager.js +1 -1
  268. package/views/3d/state/NearFarHeuristic.js +1 -1
  269. package/views/3d/state/ViewState.js +1 -1
  270. package/views/3d/state/ViewStateManager.js +1 -1
  271. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  272. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  273. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  274. package/views/3d/state/controllers/RotateController.js +1 -1
  275. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  276. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  277. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  278. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  279. package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
  280. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  281. package/views/3d/state/utils/navigationUtils.js +1 -1
  282. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  283. package/views/3d/support/QualityProfile.js +1 -1
  284. package/views/3d/support/QualitySettings.js +1 -1
  285. package/views/3d/support/RenderCoordsHelper.js +1 -1
  286. package/views/3d/support/SweptSphereVolume.js +1 -1
  287. package/views/3d/support/cameraUtils.js +1 -1
  288. package/views/3d/support/elevationUpdateExtentUtils.js +1 -1
  289. package/views/3d/support/engineContent/line.js +1 -1
  290. package/views/3d/support/engineContent/marker.js +1 -1
  291. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  292. package/views/3d/support/hitTest.js +1 -1
  293. package/views/3d/support/orientedBoundingBox.js +1 -1
  294. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  295. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  296. package/views/3d/support/pointsOfInterest/SurfaceGeometryUpdates.js +1 -1
  297. package/views/3d/support/sunUtils.js +1 -1
  298. package/views/3d/terrain/BlendLayersTechniqueConfiguration.js +1 -1
  299. package/views/3d/terrain/ExtentHelper.js +1 -1
  300. package/views/3d/terrain/OverlayManager.js +1 -1
  301. package/views/3d/terrain/OverlayRenderer.js +1 -1
  302. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  303. package/views/3d/terrain/RasterColorizerTechniqueConfiguration.js +1 -1
  304. package/views/3d/terrain/TerrainRenderer.js +1 -1
  305. package/views/3d/terrain/TerrainSurface.js +1 -1
  306. package/views/3d/terrain/Tile.js +1 -1
  307. package/views/3d/terrain/TilingSchemeLogic.js +1 -1
  308. package/views/3d/terrain/terrainUtils.js +1 -1
  309. package/views/3d/webgl/RenderCamera.js +1 -1
  310. package/views/3d/webgl-engine/Stage.js +1 -1
  311. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  312. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  313. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
  314. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentGeometryBVH.js +1 -1
  315. package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
  316. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  317. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  318. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  319. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
  320. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  321. package/views/3d/webgl-engine/core/shaderLibrary/clampShadowPosition.glsl.js +2 -0
  322. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +14 -14
  323. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +1 -1
  324. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  325. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +2 -3
  326. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  327. package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
  328. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  329. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  330. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
  331. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +1 -1
  332. package/views/3d/webgl-engine/lib/BufferGeometry.js +1 -1
  333. package/views/3d/webgl-engine/lib/BufferObject3D.js +1 -1
  334. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  335. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  336. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  337. package/views/3d/webgl-engine/lib/Program.js +1 -1
  338. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  339. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  340. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  341. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  342. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  343. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  344. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  345. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  346. package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
  347. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  348. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  349. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  350. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  351. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  352. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  353. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  354. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  355. package/views/3d/webgl-engine/parts/Model.js +1 -1
  356. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  357. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  358. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  359. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  360. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  361. package/views/Attribution.js +5 -5
  362. package/views/DOMContainer.d.ts +2 -1
  363. package/views/MapView.d.ts +1 -0
  364. package/views/SceneView.js +1 -1
  365. package/views/View2D.js +1 -1
  366. package/views/ViewingMode.js +1 -1
  367. package/views/analysis/ElevationProfile/elevationProfileChartBoundsUtils.js +1 -1
  368. package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
  369. package/views/draw/DrawAction.js +1 -1
  370. package/views/draw/DrawGraphicTool.js +1 -1
  371. package/views/draw/DrawOperation.js +1 -1
  372. package/views/draw/DrawTool.js +1 -1
  373. package/views/draw/SegmentDrawAction.js +1 -1
  374. package/views/draw/support/Reshape.js +1 -1
  375. package/views/draw/support/helpMessageUtils.js +1 -1
  376. package/views/draw/support/managers/EditSessionManager.js +1 -1
  377. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  378. package/views/interactive/dragEventPipeline.js +1 -1
  379. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  380. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  381. package/views/interactive/editGeometry/operations/AddOrUpdatePart.js +1 -1
  382. package/views/layers/support/editableLayerViews.js +1 -1
  383. package/views/overlay/TextOverlayItem.js +1 -1
  384. package/views/support/DefaultsFromMap.js +1 -1
  385. package/views/support/Scheduler.js +1 -1
  386. package/views/support/spatialReferenceSupport.js +1 -1
  387. package/views/webgl/Program.js +3 -3
  388. package/views/webgl/ShaderBuilder.js +23 -23
  389. package/views/webgl/ShaderTranspiler.js +2 -2
  390. package/webscene/Slide.js +1 -1
  391. package/webscene/VirtualLighting.d.ts +2 -4
  392. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  393. package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
  394. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +17 -1
  395. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  396. package/widgets/BatchAttributeForm/inputs/support/inputUtils.d.ts +7 -0
  397. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  398. package/widgets/BatchAttributeForm.js +1 -1
  399. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  400. package/widgets/Editor/workflowUtils.js +1 -1
  401. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  402. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  403. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  404. package/widgets/FeatureForm.js +1 -1
  405. package/widgets/Legend/styles/card/ColorRamp.js +1 -1
  406. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  407. package/widgets/Measurement.js +1 -1
  408. package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
  409. package/widgets/OrientedImageryViewer/components/ImageMeasurementWidget.js +1 -1
  410. package/widgets/Search/support/layerSearchUtils.js +1 -1
  411. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  412. package/widgets/Sketch/SketchViewModel.js +1 -1
  413. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  414. package/widgets/UtilityNetworkAssociations.js +1 -1
  415. package/widgets/Weather/WeatherViewModel.js +1 -1
  416. package/widgets/Weather/css.js +1 -1
  417. package/widgets/Weather.js +1 -1
  418. package/widgets/support/ContingentValuesManager.js +1 -1
  419. package/widgets/support/forms/types.d.ts +23 -1
  420. package/assets/esri/core/workers/chunks/021bd07b9a3e70598840.js +0 -1
  421. package/assets/esri/core/workers/chunks/032733b863426c5bde00.js +0 -1121
  422. package/assets/esri/core/workers/chunks/144f18a3dd2c8cf07cf7.js +0 -1
  423. package/assets/esri/core/workers/chunks/170e68624b71ac96de4a.js +0 -1
  424. package/assets/esri/core/workers/chunks/23fc1c1ed483ed3b2298.js +0 -1
  425. package/assets/esri/core/workers/chunks/2634927d26cb1139c6d0.js +0 -1
  426. package/assets/esri/core/workers/chunks/2d1b8154ee40afc9d40b.js +0 -1
  427. package/assets/esri/core/workers/chunks/2d3e977f3b75474d7ebc.js +0 -1
  428. package/assets/esri/core/workers/chunks/4a41bf3d1e2e9bb79771.js +0 -2
  429. package/assets/esri/core/workers/chunks/5f324d88785ffcb73ae0.js +0 -1
  430. package/assets/esri/core/workers/chunks/70695e0fb53018d48e7b.js +0 -2
  431. package/assets/esri/core/workers/chunks/723c9ad4c25be2b82476.js +0 -1
  432. package/assets/esri/core/workers/chunks/766a1357be2ed7f4e125.js +0 -1
  433. package/assets/esri/core/workers/chunks/817bf487df056da1e6ec.js +0 -1
  434. package/assets/esri/core/workers/chunks/89e55895683369b5277a.js +0 -1
  435. package/assets/esri/core/workers/chunks/8a820e303941b351de81.js +0 -1
  436. package/assets/esri/core/workers/chunks/8c94e987754b3919181e.js +0 -1
  437. package/assets/esri/core/workers/chunks/90d567e920b6982b402d.js +0 -1
  438. package/assets/esri/core/workers/chunks/919115788da38049aea7.js +0 -2
  439. package/assets/esri/core/workers/chunks/97cdcedfe853280f6258.js +0 -1
  440. package/assets/esri/core/workers/chunks/9ebc6026934400fc1e1f.js +0 -1
  441. package/assets/esri/core/workers/chunks/b33e7e74cf8fa3926617.js +0 -1
  442. package/assets/esri/core/workers/chunks/b4a325dcf50e276751d7.js +0 -1
  443. package/assets/esri/core/workers/chunks/bb2af16e55cb39163827.js +0 -1
  444. package/assets/esri/core/workers/chunks/be5857b0d1b00faf430b.js +0 -1
  445. package/assets/esri/core/workers/chunks/cd9100a7c8309dfa7569.js +0 -1
  446. package/assets/esri/core/workers/chunks/d5bb9f9b7b341c671525.js +0 -1
  447. package/assets/esri/core/workers/chunks/d96e63d66f7b1f4ea54a.js +0 -2
  448. package/assets/esri/core/workers/chunks/e3bcd2e356f75afc316a.js +0 -1
  449. package/assets/esri/core/workers/chunks/e507dfc4788295d9c244.js +0 -1
  450. package/assets/esri/core/workers/chunks/e58f51618251f74aaafd.js +0 -1
  451. package/assets/esri/core/workers/chunks/e80526571f1a34de3278.js +0 -1
  452. package/assets/esri/core/workers/chunks/e83806797979138fd22a.js +0 -1
  453. package/assets/esri/core/workers/chunks/ea71850ba87ae6038000.js +0 -1
  454. package/assets/esri/core/workers/chunks/f537a5e808dc546813c7.js +0 -1
  455. package/assets/esri/core/workers/chunks/fe811d651d201f698b8f.js +0 -2
  456. package/chunks/NativeLine.glsl.js +0 -8
  457. package/layers/geospatialPDF/geospatialPDFParserUtils.js +0 -2
  458. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +0 -2
  459. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +0 -2
  460. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +0 -2
  461. package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +0 -2
  462. /package/assets/esri/core/workers/chunks/{919115788da38049aea7.js.LICENSE.txt → 3d851710f7fcc27c5b60.js.LICENSE.txt} +0 -0
  463. /package/assets/esri/core/workers/chunks/{fe811d651d201f698b8f.js.LICENSE.txt → 5bdd95eeb8f34dbf26f2.js.LICENSE.txt} +0 -0
  464. /package/assets/esri/core/workers/chunks/{ced5dfb2bf46fc5eac8c.js.LICENSE.txt → 5e47026c681238038955.js.LICENSE.txt} +0 -0
  465. /package/assets/esri/core/workers/chunks/{4a41bf3d1e2e9bb79771.js.LICENSE.txt → d7763c42754152510e13.js.LICENSE.txt} +0 -0
  466. /package/assets/esri/core/workers/chunks/{d96e63d66f7b1f4ea54a.js.LICENSE.txt → e96fa029acba59c04e4e.js.LICENSE.txt} +0 -0
  467. /package/assets/esri/core/workers/chunks/{70695e0fb53018d48e7b.js.LICENSE.txt → fdfbd201be372d3796bf.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"../../../../../../core/has.js";import"../../../../../../core/Logger.js";import{ComponentMaterial as e,computeMaterialPass as t,getEmissionSource as n}from"./ComponentMaterial.js";import{ComponentMaterialGlobalParameters as r}from"./ComponentMaterialGlobalParameters.js";class i{constructor(e,t){this._store=new Map,this.globals=new r(e,t)}destroy(){this._store.forEach(({material:e})=>e.destroy()),this._store.clear()}acquire(t,n,r){let i=this.globals,o=a(t,n,r,i),s=this._store.get(o);if(s)return s.refCount++,s.material.key,s.material;let c=new e(t,n,r,i,o);return this._store.set(o,{material:c,refCount:1}),c}release(e){let{key:t}=e,n=this._store.get(t);if(!n||n.refCount<1)throw Error(`Internal error in material repository`);n.refCount===1?this._store.delete(t):n.refCount--}}function a(e,r,i,a){let o=t(e,i),s=n(e,i);return`|${+a.useFloatBlend}|${+e.usePBR}|${+e.hasParametersFromSource}|${+e.integratedMeshSemantics.shouldDrapeRaster}|${+e.integratedMeshSemantics.shouldFadeSlicedSurface}|${+e.integratedMeshSemantics.shouldDrapeFeatures}|${+e.integratedMeshSemantics.shouldRenderSliceAsTransparent}|${+e.groundTransparencyMode}|${+e.slicePlaneEnabled}|${+e.isIntegratedMesh}|${+e.applySSAO}|${+o}|${+i.componentDataType}|${+s}|${+e.sphereDepthInterpolate}|${+e.ellipsoidMode}|${+e.doubleSided}|${+e.cullFace}|${+e.alphaDiscardMode}|${+r.hasVertexColors}|${+r.textureCoordinateType}|${+r.shadeNormals}|${+r.hasNormals}|${e.polygonOffset}|${+r.vertexPositionRotationType}|${+e.hasBaseColorTexture}|${+e.hasEmissionTexture}|${+e.hasMetallicRoughnessTexture}|${+e.hasOcclusionTexture}|${+e.hasNormalTexture}|${+e.hasColorTextureTransform}|${+e.hasNormalTextureTransform}|${+e.hasEmissiveTextureTransform}|${+e.hasOcclusionTextureTransform}|${+e.hasMetallicRoughnessTextureTransform}|${+i.emissiveOverride}`}export{i as ComponentMaterialRepository,a as makeMaterialKey};
2
+ import"../../../../../../core/has.js";import"../../../../../../core/Logger.js";import{ComponentMaterial as e,computeMaterialPass as t,getEmissionSource as n}from"./ComponentMaterial.js";import{ComponentMaterialGlobalParameters as r}from"./ComponentMaterialGlobalParameters.js";class i{constructor(e,t){this._store=new Map,this.globals=new r(e,t)}destroy(){this._store.forEach(({material:e})=>e.destroy()),this._store.clear()}acquire(t,n,r){let i=this.globals,o=a(t,n,r,i),s=this._store.get(o);if(s)return s.refCount++,s.material.key,s.material;let c=new e(t,n,r,i,o);return this._store.set(o,{material:c,refCount:1}),c}release(e){let{key:t}=e,n=this._store.get(t);if(!n||n.refCount<1)throw Error(`Internal error in material repository`);n.refCount===1?this._store.delete(t):n.refCount--}}function a(e,r,i,a){let o=t(e,i),s=n(e,i);return`|${+a.useFloatBlend}|${+e.usePBR}|${+e.hasParametersFromSource}|${+e.integratedMeshSemantics.shouldStencilTerrain}|${+e.integratedMeshSemantics.shouldDrape}|${+e.integratedMeshSemantics.shouldDrapeRaster}|${+e.integratedMeshSemantics.shouldRenderSliceAsTransparent}|${+e.integratedMeshSemantics.shouldFadeSlicedSurface}|${+e.groundTransparencyMode}|${+e.slicePlaneEnabled}|${+e.isIntegratedMesh}|${+e.applySSAO}|${+o}|${+i.componentDataType}|${+s}|${+e.sphereDepthInterpolate}|${+e.ellipsoidMode}|${+e.doubleSided}|${+e.cullFace}|${+e.alphaDiscardMode}|${+r.hasVertexColors}|${+r.textureCoordinateType}|${+r.shadeNormals}|${+r.hasNormals}|${e.polygonOffset}|${+r.vertexPositionRotationType}|${+e.hasBaseColorTexture}|${+e.hasEmissionTexture}|${+e.hasMetallicRoughnessTexture}|${+e.hasOcclusionTexture}|${+e.hasNormalTexture}|${+e.hasColorTextureTransform}|${+e.hasNormalTextureTransform}|${+e.hasEmissiveTextureTransform}|${+e.hasOcclusionTextureTransform}|${+e.hasMetallicRoughnessTextureTransform}|${+i.emissiveOverride}`}export{i as ComponentMaterialRepository,a as makeMaterialKey};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{isColorHighlightOrOLID as t}from"../../../core/shaderLibrary/ShaderOutput.js";import{parameter as n}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{SphereDepthInterpolateConfiguration as r}from"../../../shaders/SphereDepthInterpolate.glsl.js";class i extends r{constructor(e){super(),this.output=0,this.textureCoordinateType=0,this.componentDataType=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.shadeNormals=1,this.polygonOffset=0,this.vertexPositionRotationType=1,this.hasEmission=!1,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.isGround=!1,this.isGroundSlice=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.receiveAmbientOcclusion=!0,this.receiveGlobalIllumination=!1,this.receiveShadows=!0,this.hasShadowHighlights=!1,this.transparent=!0,this.groundTransparencyMode=1,this.screenSpaceReflections=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.hasColorTextureTransform=!1,this.hasEmissiveTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.renderOccluded=!1,this.enableOITOffset=!1,this.sphereDepthInterpolate=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1,this.occlusionPass=!1,this.bindType=2,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.hasSliceTranslatedView=!1,this.rayMarchMaxReach=1,this.rayMarchMaxSteps=75,this.useProjectedRayLength=!1,this.clampRayToScreen=!0,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.draped=!1,this.useTransformationTexture=!0,this.sphericalSR=e.sphericalSR,this.useFloatBlend=e.useFloatBlend}get spherical(){return this.sphericalSR!==0}get overlayEnabled(){return(this.integratedMeshMode===2||this.integratedMeshMode===3)&&t(this.output)}get hasWater(){return this.pbrMode===3||this.pbrMode===4||this.pbrMode===6}}e([n()],i.prototype,`useFloatBlend`,void 0),e([n({count:12})],i.prototype,`output`,void 0),e([n({count:3})],i.prototype,`textureCoordinateType`,void 0),e([n({count:2})],i.prototype,`componentDataType`,void 0),e([n({count:3})],i.prototype,`cullFace`,void 0),e([n({count:3})],i.prototype,`vertexDiscardMode`,void 0),e([n({count:3})],i.prototype,`doubleSidedMode`,void 0),e([n({count:4})],i.prototype,`alphaDiscardMode`,void 0),e([n({count:4})],i.prototype,`integratedMeshMode`,void 0),e([n({count:8})],i.prototype,`pbrMode`,void 0),e([n({count:3})],i.prototype,`normalType`,void 0),e([n({count:8})],i.prototype,`emissionSource`,void 0),e([n({count:3})],i.prototype,`shadeNormals`,void 0),e([n({count:5})],i.prototype,`polygonOffset`,void 0),e([n({count:3})],i.prototype,`vertexPositionRotationType`,void 0),e([n()],i.prototype,`hasEmission`,void 0),e([n()],i.prototype,`hasVertexColors`,void 0),e([n()],i.prototype,`hasSlicePlane`,void 0),e([n()],i.prototype,`isGround`,void 0),e([n()],i.prototype,`isGroundSlice`,void 0),e([n()],i.prototype,`hasColorTexture`,void 0),e([n()],i.prototype,`hasHighlightMixTexture`,void 0),e([n()],i.prototype,`emissionDimmingPass`,void 0),e([n()],i.prototype,`receiveAmbientOcclusion`,void 0),e([n()],i.prototype,`receiveGlobalIllumination`,void 0),e([n()],i.prototype,`receiveShadows`,void 0),e([n()],i.prototype,`hasShadowHighlights`,void 0),e([n()],i.prototype,`transparent`,void 0),e([n({count:4})],i.prototype,`groundTransparencyMode`,void 0),e([n()],i.prototype,`screenSpaceReflections`,void 0),e([n()],i.prototype,`hasMetallicRoughnessTexture`,void 0),e([n()],i.prototype,`hasOcclusionTexture`,void 0),e([n()],i.prototype,`hasNormalTexture`,void 0),e([n()],i.prototype,`hasOccludees`,void 0),e([n()],i.prototype,`terrainDepthTest`,void 0),e([n()],i.prototype,`cullAboveTerrain`,void 0),e([n()],i.prototype,`hasNormalTextureTransform`,void 0),e([n()],i.prototype,`hasColorTextureTransform`,void 0),e([n()],i.prototype,`hasEmissiveTextureTransform`,void 0),e([n()],i.prototype,`hasOcclusionTextureTransform`,void 0),e([n()],i.prototype,`hasMetallicRoughnessTextureTransform`,void 0),e([n()],i.prototype,`cloudReflections`,void 0),e([n()],i.prototype,`snowCover`,void 0),e([n()],i.prototype,`renderOccluded`,void 0),e([n()],i.prototype,`enableOITOffset`,void 0),e([n()],i.prototype,`sphereDepthInterpolate`,void 0);export{i as ComponentTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{isColorHighlightOrOLID as t}from"../../../core/shaderLibrary/ShaderOutput.js";import{parameter as n}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{SphereDepthInterpolateConfiguration as r}from"../../../shaders/SphereDepthInterpolate.glsl.js";class i extends r{constructor(e){super(),this.output=0,this.textureCoordinateType=0,this.componentDataType=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.shadeNormals=1,this.polygonOffset=0,this.vertexPositionRotationType=1,this.hasEmission=!1,this.hasVertexColors=!1,this.hasSlicePlane=!1,this.shouldDrapeRaster=!1,this.isGroundSlice=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.receiveAmbientOcclusion=!0,this.receiveGlobalIllumination=!1,this.receiveShadows=!0,this.hasShadowHighlights=!1,this.transparent=!0,this.groundTransparencyMode=1,this.screenSpaceReflections=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.hasColorTextureTransform=!1,this.hasEmissiveTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.renderOccluded=!1,this.enableOITOffset=!1,this.sphereDepthInterpolate=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1,this.occlusionPass=!1,this.bindType=2,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.hasSliceTranslatedView=!1,this.rayMarchMaxReach=1,this.rayMarchMaxSteps=75,this.useProjectedRayLength=!1,this.clampRayToScreen=!0,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.draped=!1,this.useTransformationTexture=!0,this.sphericalSR=e.sphericalSR,this.useFloatBlend=e.useFloatBlend}get spherical(){return this.sphericalSR!==0}get overlayEnabled(){return(this.integratedMeshMode===2||this.integratedMeshMode===3)&&t(this.output)}get hasWater(){return this.pbrMode===3||this.pbrMode===4||this.pbrMode===6}}e([n()],i.prototype,`useFloatBlend`,void 0),e([n({count:12})],i.prototype,`output`,void 0),e([n({count:3})],i.prototype,`textureCoordinateType`,void 0),e([n({count:2})],i.prototype,`componentDataType`,void 0),e([n({count:3})],i.prototype,`cullFace`,void 0),e([n({count:3})],i.prototype,`vertexDiscardMode`,void 0),e([n({count:3})],i.prototype,`doubleSidedMode`,void 0),e([n({count:4})],i.prototype,`alphaDiscardMode`,void 0),e([n({count:4})],i.prototype,`integratedMeshMode`,void 0),e([n({count:8})],i.prototype,`pbrMode`,void 0),e([n({count:3})],i.prototype,`normalType`,void 0),e([n({count:8})],i.prototype,`emissionSource`,void 0),e([n({count:3})],i.prototype,`shadeNormals`,void 0),e([n({count:5})],i.prototype,`polygonOffset`,void 0),e([n({count:3})],i.prototype,`vertexPositionRotationType`,void 0),e([n()],i.prototype,`hasEmission`,void 0),e([n()],i.prototype,`hasVertexColors`,void 0),e([n()],i.prototype,`hasSlicePlane`,void 0),e([n()],i.prototype,`shouldDrapeRaster`,void 0),e([n()],i.prototype,`isGroundSlice`,void 0),e([n()],i.prototype,`hasColorTexture`,void 0),e([n()],i.prototype,`hasHighlightMixTexture`,void 0),e([n()],i.prototype,`emissionDimmingPass`,void 0),e([n()],i.prototype,`receiveAmbientOcclusion`,void 0),e([n()],i.prototype,`receiveGlobalIllumination`,void 0),e([n()],i.prototype,`receiveShadows`,void 0),e([n()],i.prototype,`hasShadowHighlights`,void 0),e([n()],i.prototype,`transparent`,void 0),e([n({count:4})],i.prototype,`groundTransparencyMode`,void 0),e([n()],i.prototype,`screenSpaceReflections`,void 0),e([n()],i.prototype,`hasMetallicRoughnessTexture`,void 0),e([n()],i.prototype,`hasOcclusionTexture`,void 0),e([n()],i.prototype,`hasNormalTexture`,void 0),e([n()],i.prototype,`hasOccludees`,void 0),e([n()],i.prototype,`terrainDepthTest`,void 0),e([n()],i.prototype,`cullAboveTerrain`,void 0),e([n()],i.prototype,`hasNormalTextureTransform`,void 0),e([n()],i.prototype,`hasColorTextureTransform`,void 0),e([n()],i.prototype,`hasEmissiveTextureTransform`,void 0),e([n()],i.prototype,`hasOcclusionTextureTransform`,void 0),e([n()],i.prototype,`hasMetallicRoughnessTextureTransform`,void 0),e([n()],i.prototype,`cloudReflections`,void 0),e([n()],i.prototype,`snowCover`,void 0),e([n()],i.prototype,`renderOccluded`,void 0),e([n()],i.prototype,`enableOITOffset`,void 0),e([n()],i.prototype,`sphereDepthInterpolate`,void 0);export{i as ComponentTechniqueConfiguration};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{isShadow as e}from"./ShaderOutput.js";function t(t,n){e(n.output)&&t.vertex.main.add(`gl_Position.z = 0.0;`)}export{t as clampShadowPosition};
@@ -1,21 +1,21 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{glsl as e,If as t}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as n}from"../../shaderModules/Texture2DPassUniform.js";import{NormalAttribute as r}from"../attributes/NormalAttribute.glsl.js";import{ObjectAndLayerIdColor as i}from"../attributes/ObjectAndLayerIdColor.glsl.js";import{TextureCoordinateAttribute as a}from"../attributes/TextureCoordinateAttribute.glsl.js";import{outputDepth as o}from"../output/OutputDepth.glsl.js";import{OutputHighlight as s}from"../output/OutputHighlight.glsl.js";import{VisualVariables as c}from"../shading/VisualVariables.glsl.js";import{sliceDraw as l}from"../Slice.glsl.js";import{Transform as u}from"../Transform.glsl.js";import{nearFar as d}from"../util/cameraUniforms.js";import{DiscardOrAdjustAlphaPass as f}from"../util/DiscardOrAdjustAlpha.glsl.js";import{addProjViewLocalOrigin as p}from"../util/View.glsl.js";import{DefaultMaterialExternalColor as m}from"./DefaultMaterialExternalColor.glsl.js";function h(h,g){let{vertex:_,fragment:v,varyings:y}=h,{hasColorTexture:b,alphaDiscardMode:x}=g,S=b&&x!==1,{output:C,normalType:w,hasColorTextureTransform:T}=g;switch(C){case 3:p(_,g),h.include(u),v.include(l,g),h.include(a,g),S&&v.uniforms.add(new n(`tex`,e=>e.texture)),_.main.add(e`vpos = getVertexInLocalOriginSpace();
2
+ import{glsl as e,If as t}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as n}from"../../shaderModules/Texture2DPassUniform.js";import{NormalAttribute as r}from"../attributes/NormalAttribute.glsl.js";import{ObjectAndLayerIdColor as i}from"../attributes/ObjectAndLayerIdColor.glsl.js";import{TextureCoordinateAttribute as a}from"../attributes/TextureCoordinateAttribute.glsl.js";import{clampShadowPosition as o}from"../clampShadowPosition.glsl.js";import{outputDepth as s}from"../output/OutputDepth.glsl.js";import{OutputHighlight as c}from"../output/OutputHighlight.glsl.js";import{VisualVariables as l}from"../shading/VisualVariables.glsl.js";import{sliceDraw as u}from"../Slice.glsl.js";import{Transform as d}from"../Transform.glsl.js";import{nearFar as f}from"../util/cameraUniforms.js";import{DiscardOrAdjustAlphaPass as p}from"../util/DiscardOrAdjustAlpha.glsl.js";import{addProjViewLocalOrigin as m}from"../util/View.glsl.js";import{DefaultMaterialExternalColor as h}from"./DefaultMaterialExternalColor.glsl.js";function g(g,_){let{vertex:v,fragment:y,varyings:b}=g,{hasColorTexture:x,alphaDiscardMode:S}=_,C=x&&S!==1,{output:w,normalType:T,hasColorTextureTransform:E}=_;switch(w){case 3:m(v,_),g.include(d),y.include(u,_),g.include(a,_),C&&y.uniforms.add(new n(`tex`,e=>e.texture)),v.main.add(e`vpos = getVertexInLocalOriginSpace();
3
3
  vpos = subtractOrigin(vpos);
4
4
  vpos = addVerticalOffset(vpos, localOrigin);
5
5
  gl_Position = transformPosition(proj, view, vpos);
6
- forwardTextureCoordinates();`),h.include(f,g),v.main.add(e`
6
+ forwardTextureCoordinates();`),g.include(p,_),y.main.add(e`
7
7
  discardBySlice(vpos);
8
- ${t(S,e`vec4 texColor = texture(tex, ${T?`colorUV`:`vuv0`});
9
- discardOrAdjustAlpha(texColor);`)}`);break;case 5:case 6:case 7:case 8:case 11:p(_,g),h.include(u),h.include(a,g),h.include(c,g),h.include(o,g),v.include(l,g),h.include(i,g),y.add(`depth`,`float`,{invariant:!0}),S&&v.uniforms.add(new n(`tex`,e=>e.texture)),_.uniforms.add(d).main.add(e`vpos = getVertexInLocalOriginSpace();
8
+ ${t(C,e`vec4 texColor = texture(tex, ${E?`colorUV`:`vuv0`});
9
+ discardOrAdjustAlpha(texColor);`)}`);break;case 5:case 6:case 7:case 8:case 11:m(v,_),g.include(d),g.include(a,_),g.include(l,_),g.include(s,_),y.include(u,_),g.include(i,_),b.add(`depth`,`float`,{invariant:!0}),C&&y.uniforms.add(new n(`tex`,e=>e.texture)),v.uniforms.add(f).main.add(e`vpos = getVertexInLocalOriginSpace();
10
10
  vpos = subtractOrigin(vpos);
11
11
  vpos = addVerticalOffset(vpos, localOrigin);
12
12
  gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);
13
13
  forwardTextureCoordinates();
14
- forwardObjectAndLayerIdColor();`),h.include(f,g),v.main.add(e`
14
+ forwardObjectAndLayerIdColor();`),g.include(o,_),g.include(p,_),y.main.add(e`
15
15
  discardBySlice(vpos);
16
- ${t(S,e`vec4 texColor = texture(tex, ${T?`colorUV`:`vuv0`});
16
+ ${t(C,e`vec4 texColor = texture(tex, ${E?`colorUV`:`vuv0`});
17
17
  discardOrAdjustAlpha(texColor);`)}
18
- ${C===11?e`outputObjectAndLayerIdColor();`:e`outputDepth(depth);`}`);break;case 4:{p(_,g),h.include(u),h.include(r,g),h.include(a,g),h.include(c,g),h.include(m,g),S&&v.uniforms.add(new n(`tex`,e=>e.texture)),w===2&&y.add(`vPositionView`,`vec3`,{invariant:!0});let i=w===0||w===1;i&&y.add(`vNormalWorld`,`vec3`),_.main.add(e`
18
+ ${w===11?e`outputObjectAndLayerIdColor();`:e`outputDepth(depth);`}`);break;case 4:{m(v,_),g.include(d),g.include(r,_),g.include(a,_),g.include(l,_),g.include(h,_),C&&y.uniforms.add(new n(`tex`,e=>e.texture)),T===2&&b.add(`vPositionView`,`vec3`,{invariant:!0});let i=T===0||T===1;i&&b.add(`vNormalWorld`,`vec3`),v.main.add(e`
19
19
  forwardDefaultMaterialExternalColor();
20
20
 
21
21
  if (shouldCullByOpacity()) {
@@ -28,22 +28,22 @@ forwardObjectAndLayerIdColor();`),h.include(f,g),v.main.add(e`
28
28
  vpos = subtractOrigin(vpos);
29
29
  vpos = addVerticalOffset(vpos, localOrigin);
30
30
  gl_Position = transformPosition(proj, view, vpos);
31
- forwardTextureCoordinates();`),v.include(l,g),h.include(f,g),v.main.add(e`
31
+ forwardTextureCoordinates();`),y.include(u,_),g.include(p,_),y.main.add(e`
32
32
  discardBySlice(vpos);
33
- ${t(S,e`vec4 texColor = texture(tex, ${T?`colorUV`:`vuv0`});
33
+ ${t(C,e`vec4 texColor = texture(tex, ${E?`colorUV`:`vuv0`});
34
34
  discardOrAdjustAlpha(texColor);`,e`vec4 texColor = vec4(1.0);`)}
35
35
  float opacity = getDefaultMaterialOpacity(texColor.a);
36
36
 
37
- ${w===2?e`vec3 normal = screenDerivativeNormal(vPositionView);`:e`vec3 normal = normalize(vNormalWorld);
37
+ ${T===2?e`vec3 normal = screenDerivativeNormal(vPositionView);`:e`vec3 normal = normalize(vNormalWorld);
38
38
  if (gl_FrontFacing == false){
39
39
  normal = -normal;
40
40
  }`}
41
- fragColor = vec4(0.5 + 0.5 * normal, opacity);`);break}case 10:p(_,g),h.include(u),h.include(a,g),h.include(c,g),S&&v.uniforms.add(new n(`tex`,e=>e.texture)),_.main.add(e`vpos = getVertexInLocalOriginSpace();
41
+ fragColor = vec4(0.5 + 0.5 * normal, opacity);`);break}case 10:m(v,_),g.include(d),g.include(a,_),g.include(l,_),C&&y.uniforms.add(new n(`tex`,e=>e.texture)),v.main.add(e`vpos = getVertexInLocalOriginSpace();
42
42
  vpos = subtractOrigin(vpos);
43
43
  vpos = addVerticalOffset(vpos, localOrigin);
44
44
  gl_Position = transformPosition(proj, view, vpos);
45
- forwardTextureCoordinates();`),v.include(l,g),h.include(f,g),h.include(s,g),v.main.add(e`
45
+ forwardTextureCoordinates();`),y.include(u,_),g.include(p,_),g.include(c,_),y.main.add(e`
46
46
  discardBySlice(vpos);
47
- ${t(S,e`vec4 texColor = texture(tex, ${T?`colorUV`:`vuv0`});
47
+ ${t(C,e`vec4 texColor = texture(tex, ${E?`colorUV`:`vuv0`});
48
48
  discardOrAdjustAlpha(texColor);`)}
49
- calculateOcclusionAndOutputHighlight();`)}}export{h as DefaultMaterialAuxiliaryPasses};
49
+ calculateOcclusionAndOutputHighlight();`)}}export{g as DefaultMaterialAuxiliaryPasses};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{FloatBindUniform as e}from"../../shaderModules/FloatBindUniform.js";import{FloatPassUniform as t}from"../../shaderModules/FloatPassUniform.js";import{glsl as n}from"../../shaderModules/glsl.js";import{addVerticalOffset as r}from"../attributes/VerticalOffset.glsl.js";import{viewport as i,viewNormal as a,pixelRatio as o}from"../util/cameraUniforms.js";import{ScreenSizePerspective as s,addScreenSizePerspectiveAlignment as c}from"../util/ScreenSizePerspective.glsl.js";import{addProjViewLocalOrigin as l,addCameraPosition as u}from"../util/View.glsl.js";const d=.5;function f(f,p){let m=f.vertex;f.include(s),f.attributes.add(`position`,`vec3`),f.vertex.inputs.add(`position`,()=>`position`),f.attributes.add(`normal`,`vec3`),p.hasVertexCenterOffset?f.attributes.add(`centerOffset`,`vec3`):m.constants.add(`centerOffset`,`vec3`,[0,0,0]),f.attributes.add(`groundDistance`,`float`),l(m,p),u(m,p),m.uniforms.add(i,new t(`polygonOffset`,e=>e.shaderPolygonOffset),new e(`aboveGround`,e=>e.camera.aboveGround?1:-1)),p.hasVerticalOffset&&r(m),m.code.add(n`struct ProjectHUDAux {
2
+ import{FloatBindUniform as e}from"../../shaderModules/FloatBindUniform.js";import{FloatPassUniform as t}from"../../shaderModules/FloatPassUniform.js";import{glsl as n}from"../../shaderModules/glsl.js";import{addVerticalOffset as r}from"../attributes/VerticalOffset.glsl.js";import{viewport as i,viewNormal as a,pixelRatio as o}from"../util/cameraUniforms.js";import{ScreenSizePerspective as s,addScreenSizePerspectiveAlignment as c}from"../util/ScreenSizePerspective.glsl.js";import{addProjView as l,addCameraPosition as u}from"../util/View.glsl.js";const d=.5;function f(f,p){let m=f.vertex;f.include(s),f.attributes.add(`position`,`vec3`),f.vertex.inputs.add(`position`,()=>`position`),f.attributes.add(`normal`,`vec3`),p.hasVertexCenterOffset?f.attributes.add(`centerOffset`,`vec3`):m.constants.add(`centerOffset`,`vec3`,[0,0,0]),f.attributes.add(`groundDistance`,`float`),l(m,p),u(m,p),m.uniforms.add(i,new t(`polygonOffset`,e=>e.shaderPolygonOffset),new e(`aboveGround`,e=>e.camera.aboveGround?1:-1)),p.hasVerticalOffset&&r(m),m.code.add(n`struct ProjectHUDAux {
3
3
  vec3 posModel;
4
4
  vec3 posView;
5
5
  vec3 vnormal;
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{create as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{hasArea as t,width as n,height as r}from"../../../../../../geometry/support/aaBoundingRect.js";import{Uniform as i}from"../../../../../webgl/Uniform.js";import{Float4DrawUniform as a}from"../../shaderModules/Float4DrawUniform.js";import{FloatPassUniform as o}from"../../shaderModules/FloatPassUniform.js";import{glsl as s}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as c}from"../../shaderModules/Texture2DPassUniform.js";import{Texture2DUintPassUniform as l}from"../../shaderModules/Texture2DUintPassUniform.js";import{isColor as u}from"../ShaderOutput.js";import{mainLightDirection as d,mainLightIntensity as f}from"../shading/lightingUniforms.js";import{WaterColor as p}from"../shading/WaterColor.glsl.js";import{BlendColorsPremultiplied as m}from"../util/BlendColorsPremultiplied.glsl.js";function h(e,t){let{vertex:n,fragment:r}=e;n.uniforms.add(new a(`overlayTexOffset`,(e,n)=>C(t.spherical,e,n)),new a(`overlayTexScale`,(e,n)=>w(t.spherical,e,n))),r.uniforms.add(new a(`overlayTexOffset`,(e,n)=>C(t.spherical,e,n)),new a(`overlayTexScale`,(e,n)=>w(t.spherical,e,n))),r.constants.add(`overlayOpacity`,`float`,1),r.uniforms.add(new c(`ovColorTex`,(e,n)=>g(e,n,t.isGround===!0))),x(e,t)}function g(e,t,n){let r=_(e,t,n);return r==null?null:t.overlay?.getTexture(r)}function _(e,t,n){return e.identifier===0?u(t.output)?!e.occludedGround||t.overlay?.allSourcesOccluders?v(n):4:t.output===3||t.output===4?v(n):t.output===11?5:null:e.identifier===2?2:null}function v(e){return+!e}function y(e,t){let{vertex:n,fragment:r}=e;n.uniforms.add(new E(`overlayTexOffset`),new E(`overlayTexScale`)),r.uniforms.add(new o(`overlayOpacity`,e=>e.overlayOpacity)),t.output!==10&&r.uniforms.add(new c(`ovColorTex`,(e,t)=>t.overlay?.getTexture(e.overlayContent))),x(e,t)}function b(e,t){switch(e){case 0:case 1:case 2:return t.slot===9&&!t.overlay?.allSourcesOccluders?4:0;case 3:case 4:return 0;case 10:return 2;case 5:case 7:case 8:case 9:return null;case 11:return 5}return null}function x(e,t){let{hasWater:n,output:r}=t;n&&e.include(p,t);let{vertex:i,fragment:a,varyings:o}=e;o.add(`vtcOverlay`,`vec4`);let c=r===10;i.code.add(s`void setOverlayVTC(in vec2 uv) {
2
+ import{create as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{hasArea as t,width as n,height as r}from"../../../../../../geometry/support/aaBoundingRect.js";import{Uniform as i}from"../../../../../webgl/Uniform.js";import{Float4DrawUniform as a}from"../../shaderModules/Float4DrawUniform.js";import{FloatPassUniform as o}from"../../shaderModules/FloatPassUniform.js";import{glsl as s}from"../../shaderModules/glsl.js";import{Texture2DPassUniform as c}from"../../shaderModules/Texture2DPassUniform.js";import{Texture2DUintPassUniform as l}from"../../shaderModules/Texture2DUintPassUniform.js";import{isColor as u}from"../ShaderOutput.js";import{mainLightDirection as d,mainLightIntensity as f}from"../shading/lightingUniforms.js";import{WaterColor as p}from"../shading/WaterColor.glsl.js";import{BlendColorsPremultiplied as m}from"../util/BlendColorsPremultiplied.glsl.js";function h(e,t){let{vertex:n,fragment:r}=e;n.uniforms.add(new a(`overlayTexOffset`,(e,n)=>C(t.spherical,e,n)),new a(`overlayTexScale`,(e,n)=>w(t.spherical,e,n))),r.uniforms.add(new a(`overlayTexOffset`,(e,n)=>C(t.spherical,e,n)),new a(`overlayTexScale`,(e,n)=>w(t.spherical,e,n))),r.constants.add(`overlayOpacity`,`float`,1),r.uniforms.add(new c(`ovColorTex`,(e,n)=>g(e,n,t.shouldDrapeRaster===!0))),x(e,t)}function g(e,t,n){let r=_(e,t,n);return r==null?null:t.overlay?.getTexture(r)}function _(e,t,n){return e.identifier===0?u(t.output)?!e.occludedGround||t.overlay?.allSourcesOccluders?v(n):4:t.output===3||t.output===4?v(n):t.output===11?5:null:e.identifier===2?2:null}function v(e){return+!e}function y(e,t){let{vertex:n,fragment:r}=e;n.uniforms.add(new E(`overlayTexOffset`),new E(`overlayTexScale`)),r.uniforms.add(new o(`overlayOpacity`,e=>e.overlayOpacity)),t.output!==10&&r.uniforms.add(new c(`ovColorTex`,(e,t)=>t.overlay?.getTexture(e.overlayContent))),x(e,t)}function b(e,t){switch(e){case 0:case 1:case 2:return t.slot===9&&!t.overlay?.allSourcesOccluders?4:0;case 3:case 4:return 0;case 10:return 2;case 5:case 7:case 8:case 9:return null;case 11:return 5}return null}function x(e,t){let{hasWater:n,output:r}=t;n&&e.include(p,t);let{vertex:i,fragment:a,varyings:o}=e;o.add(`vtcOverlay`,`vec4`);let c=r===10;i.code.add(s`void setOverlayVTC(in vec2 uv) {
3
3
  vtcOverlay = vec4(uv, uv) * overlayTexScale + overlayTexOffset;
4
4
  }`),a.code.add(s`bool isValid(vec2 uv, vec2 dxdy) {
5
5
  return (uv.x >= 0.0 + dxdy.x) && (uv.x <= 1.0 - dxdy.x) && (uv.y >= 0.0 + dxdy.y) && (uv.y <= 1.0 - dxdy.y);
@@ -1,4 +1,3 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{ZEROS as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{NoParameters as t}from"../../../../../webgl/NoParameters.js";import{Float2PassUniform as n}from"../../shaderModules/Float2PassUniform.js";import{FloatPassUniform as r}from"../../shaderModules/FloatPassUniform.js";import{glsl as i}from"../../shaderModules/glsl.js";class a extends t{constructor(){super(...arguments),this.scale=1,this.offset=e}}function o(e){e.attributes.add(`position`,`vec2`),e.attributes.add(`uv0`,`vec2`),e.varyings.add(`uv`,`vec2`),e.varyings.add(`vuv`,`vec2`),e.vertex.uniforms.add(new r(`scale`,e=>e.scale),new n(`offset`,e=>e.offset)).main.add(i`gl_Position = vec4(position, 0.0, 1.0);
3
- uv = uv0 * scale + offset;
4
- vuv = uv0;`)}export{o as TileComposite,a as TileCompositePassParameters};
2
+ import{ZEROS as e}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{NoParameters as t}from"../../../../../webgl/NoParameters.js";import{Float2PassUniform as n}from"../../shaderModules/Float2PassUniform.js";import{FloatPassUniform as r}from"../../shaderModules/FloatPassUniform.js";import{glsl as i}from"../../shaderModules/glsl.js";class a extends t{constructor(){super(...arguments),this.scale=1,this.offset=e}}function o(e,t){e.attributes.add(`position`,`vec2`),e.vertex.main.add(`gl_Position = vec4(position, 0.0, 1.0);`),t.needsUV&&(e.attributes.add(`uv0`,`vec2`),e.varyings.add(`uv`,`vec2`),e.varyings.add(`vuv`,`vec2`),e.vertex.uniforms.add(new r(`scale`,e=>e.scale),new n(`offset`,e=>e.offset)).main.add(i`uv = uv0 * scale + offset;
3
+ vuv = uv0;`))}export{o as TileComposite,a as TileCompositePassParameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{translate 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{set as n}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as r,create as i}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{Float3BindUniform as a}from"../../shaderModules/Float3BindUniform.js";import{Float3DrawUniform as o}from"../../shaderModules/Float3DrawUniform.js";import{Matrix4BindUniform as s}from"../../shaderModules/Matrix4BindUniform.js";import{Matrix4DrawUniform as c}from"../../shaderModules/Matrix4DrawUniform.js";import{projMatrix as l}from"./cameraUniforms.js";function u(e,t){t.instancedDoublePrecision?e.constants.add(`cameraPosition`,`vec3`,r):e.uniforms.add(new o(`cameraPosition`,({origin:e},{camera:t})=>n(m,t.viewInverseTransposeMatrix[3]-e[0],t.viewInverseTransposeMatrix[7]-e[1],t.viewInverseTransposeMatrix[11]-e[2])))}function d(t,n){n.instancedDoublePrecision?t.uniforms.add(l,new s(`view`,t=>e(p,t.camera.viewMatrix,f(t))),new a(`localOrigin`,e=>f(e))):t.uniforms.add(l,new c(`view`,(t,n)=>e(p,n.camera.viewMatrix,t.origin)),new o(`localOrigin`,e=>e.origin))}function f({camera:e}){return n(m,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11])}const p=t(),m=i();export{u as addCameraPosition,d as addProjViewLocalOrigin};
2
+ import{translate 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{set as n}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as r,create as i}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{Float3BindUniform as a}from"../../shaderModules/Float3BindUniform.js";import{Float3DrawUniform as o}from"../../shaderModules/Float3DrawUniform.js";import{Matrix4BindUniform as s}from"../../shaderModules/Matrix4BindUniform.js";import{Matrix4DrawUniform as c}from"../../shaderModules/Matrix4DrawUniform.js";import{projMatrix as l}from"./cameraUniforms.js";function u(e,t){t.instancedDoublePrecision?e.constants.add(`cameraPosition`,`vec3`,r):e.uniforms.add(new o(`cameraPosition`,({origin:e},{camera:t})=>n(h,t.viewInverseTransposeMatrix[3]-e[0],t.viewInverseTransposeMatrix[7]-e[1],t.viewInverseTransposeMatrix[11]-e[2])))}function d(e,t){f(e,t),e.uniforms.add(t.instancedDoublePrecision?new a(`localOrigin`,e=>p(e)):new o(`localOrigin`,e=>e.origin))}function f(t,n){t.uniforms.add(l,n.instancedDoublePrecision?new s(`view`,t=>e(m,t.camera.viewMatrix,p(t))):new c(`view`,(t,n)=>e(m,n.camera.viewMatrix,t.origin)))}function p({camera:e}){return n(h,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11])}const m=t(),h=i();export{u as addCameraPosition,f as addProjView,d as addProjViewLocalOrigin};
@@ -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{lookAt as n}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as i}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{length as a,scale as o,add as s,distance as c,cross as l,squaredLength as u}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{lerp as f,clamp as p}from"../../../../../core/mathUtils.js";import{disposeMaybe as m}from"../../../../../core/maybe.js";import{watch as h,initial as g}from"../../../../../core/reactiveUtils.js";import{getReferenceEllipsoid as _}from"../../../../../geometry/ellipsoidUtils.js";import{newFloatArray as v}from"../../../../../geometry/support/FloatArray.js";import{PrimitiveType as y}from"../../../../webgl/enums.js";import{Texture as b}from"../../../../webgl/Texture.js";import{TextureDescriptor as x}from"../../../../webgl/TextureDescriptor.js";import{VertexBuffer as S}from"../../../../webgl/VertexBuffer.js";import{glLayout as C}from"../../../support/buffer/glUtil.js";import{makePiecewiseLinearFunction as w}from"../../../support/mathUtils.js";import{InternalRenderCategory as T}from"../../../webgl.js";import{createQuadVAO as E}from"../../lib/glUtil3D.js";import{project as D}from"../../lib/Util.js";import{VertexArrayObject as O}from"../../lib/VertexArrayObject.js";import{OpaqueEnvironment as k}from"../OpaqueEnvironment.js";import{computeInnerAltitudeFade as A,innerAtmosphereDepth as j}from"./atmosphereUtils.js";import{marsAtmosphereTextureSimple as M}from"./MarsAtmosphereTexture.js";import{S as N}from"../../../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechnique as P,layout as F}from"./SimpleAtmosphereTechnique.js";import{SimpleAtmosphereTechniqueConfiguration as I}from"./SimpleAtmosphereTechniqueConfiguration.js";const L=-j,R=()=>1-511/512,z=w([[50,1-460/512],[500,1-400/512],[5e3,1-250/512],[5e4,1-300/512]]);let B=class extends k{constructor(e){super(e),this._passParameters=new N,this._configuration=new I,this._vao=null,this._fadeVao=null,this._texV1=1;let t=e.view,{outerAtmosphereRimWidth:n,radius:r}=_(t.spatialReference);this._planetRadius=r,this._innerRimFactor=1+L/r,this._middleRimFactor=1+0/r,this._outerRimFactor=1+n/r,this._texV0=0/n,this._texVScale=this._texV1-this._texV0}initialize(){this.addHandles(h(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),g))}destroy(){this._passParameters.texture=m(this._passParameters.texture),this._fadeVao=m(this._fadeVao),this._vao=m(this._vao)}render(e){let t=e.find(({name:e})=>e===T.OPAQUE_ENVIRONMENT);this._update();let n=this.renderingContext;if(!this._passParameters.texture){let e=new x(1,512);e.wrapMode=33071,e.flipped=!0,this._passParameters.texture=new b(n,e,M)}if(this._passParameters.undergroundFadeAlpha<1){this._vao??=this._createRibbon(n),this._configuration.geometry=0;let e=this.techniques.getCompiled(P,this._configuration);if(!e)return this.requestRender(1),t;n.bindTechnique(e,this.bindParameters,this._passParameters),n.bindVAO(this._vao),n.drawArrays(y.TRIANGLES,0,this._vao.vertexCount(`geometry`))}if(this._passParameters.undergroundFadeAlpha>0){this._fadeVao??=E(n),this._configuration.geometry=2;let e=this.techniques.getCompiled(P,this._configuration);if(!e)return this.requestRender(1),t;n.bindTechnique(e,this.bindParameters,this._passParameters),n.bindVAO(this._fadeVao),n.drawArrays(y.TRIANGLE_STRIP,0,this._fadeVao.vertexCount(`geometry`))}return t}_update(){let e=this.bindParameters.camera,t=d(),n=this._planetRadius,r=a(e.eye),s=r-n;if(s<0){let e=Math.min(-s/5e3,1);this._passParameters.undergroundFadeAlpha=e}else this._passParameters.undergroundFadeAlpha=0;let c=Math.max(50,s),l=n+L;this._passParameters.innerScale=G(n+c,n,l)-1,this._passParameters.altitudeFade=A(s),o(t,e.eye,(n+50)/r),V(t,e.center,e.up,n,this._passParameters.silhouette);let u=this._computeScreenRimWidth(e,t,e.up,this._passParameters.silhouette),m=R(),h=z(s),g=this._texV0+m*this._texVScale,_=this._texV0+u*h*this._texVScale;if(s>50){V(e.eye,e.center,e.up,n,this._passParameters.silhouette);let t=this._computeScreenRimWidth(e,e.eye,e.up,this._passParameters.silhouette),r=p((t-1.5)/(u-1.5),0,1);g=this._texV0+r*m*this._texVScale,_=this._texV0+f(this._texV1,u*h,r)*this._texVScale}i(this._passParameters.texV,g,_)}_createRibbon(e){let t=v(1155),n=new Uint32Array(1920);t[0]=0,t[1]=0,t[2]=-1;for(let e=0;e<128;e++){let r=e*9+3;t[r]=e,t[r+1]=this._innerRimFactor,t[r+2]=-1,t[r+3]=e,t[r+4]=this._middleRimFactor,t[r+5]=0,t[r+6]=e,t[r+7]=this._outerRimFactor,t[r+8]=1;let i=3*e+1,a=e===127?1:i+3,o=e*15;n[o]=i,n[o+1]=i+1,n[o+2]=a+1,n[o+3]=a+1,n[o+4]=a,n[o+5]=i,n[o+6]=i+1,n[o+7]=i+2,n[o+8]=a+2,n[o+9]=a+2,n[o+10]=a+1,n[o+11]=i+1,n[o+12]=i,n[o+13]=a,n[o+14]=0}let r=F.createBuffer(n.length),i=r.position;for(let e=0;e<n.length;++e){let r=n[e]*3;i.set(e,0,t[r]),i.set(e,1,t[r+1]),i.set(e,2,t[r+2])}return new O(e,new S(e,C(F),r.buffer))}_computeScreenRimWidth(e,t,r,i){return s(U,i.center,i.v2),o(W,U,this._outerRimFactor),n(H,t,U,r),D(U,H,e.projectionMatrix,e.viewport,U),D(W,H,e.projectionMatrix,e.viewport,W),c(U,W)/e.height}};B=e([t(`esri.views.3d.webgl-engine.effects.atmosphere.MarsAtmosphere`)],B);function V(e,t,n,r,i){let s=a(e),c=r*Math.sqrt(s*s-r*r)/s,d=Math.sqrt(r*r-c*c),f=i.v1,p=i.v2;return o(i.center,e,d/s),l(f,e,t),u(f)<1&&l(f,e,n),o(f,f,c/a(f)),l(p,f,e),o(p,p,c/a(p)),c}const H=r(),U=d(),W=d();function G(e,t,n){let r=Math.sqrt(e*e-t*t),i=Math.sqrt(e*e-n*n);return e*e/(r*i+t*n)}export{B as MarsAtmosphere};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{lookAt as n}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as i}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{length as a,scale as o,add as s,distance as c,cross as l,squaredLength as u}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{lerp as f,clamp as p}from"../../../../../core/mathUtils.js";import{disposeMaybe as m}from"../../../../../core/maybe.js";import{watch as h,initial as g}from"../../../../../core/reactiveUtils.js";import{getReferenceEllipsoid as _}from"../../../../../geometry/ellipsoidUtils.js";import{newFloatArray as v}from"../../../../../geometry/support/FloatArray.js";import{PrimitiveType as y}from"../../../../webgl/enums.js";import{Texture as b}from"../../../../webgl/Texture.js";import{TextureDescriptor as x}from"../../../../webgl/TextureDescriptor.js";import{VertexBuffer as S}from"../../../../webgl/VertexBuffer.js";import{glLayout as C}from"../../../support/buffer/glUtil.js";import{makePiecewiseLinearFunction as w}from"../../../support/mathUtils.js";import{InternalRenderCategory as T}from"../../../webgl.js";import{createQuadVAO as E}from"../../lib/glUtil3D.js";import{project as D}from"../../lib/Util.js";import{VertexArrayObject as O}from"../../lib/VertexArrayObject.js";import{OpaqueEnvironment as k}from"../OpaqueEnvironment.js";import{computeInnerAltitudeFade as A,innerAtmosphereDepth as j}from"./atmosphereUtils.js";import{marsAtmosphereTextureSimple as M}from"./MarsAtmosphereTexture.js";import{S as N}from"../../../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechnique as P,layout as F}from"./SimpleAtmosphereTechnique.js";import{SimpleAtmosphereTechniqueConfiguration as I}from"./SimpleAtmosphereTechniqueConfiguration.js";const L=-j,R=()=>1-511/512,z=w([[50,1-460/512],[500,.21875],[5e3,1-250/512],[5e4,1-300/512]]);let B=class extends k{constructor(e){super(e),this._passParameters=new N,this._configuration=new I,this._vao=null,this._fadeVao=null,this._texV1=1;let t=e.view,{outerAtmosphereRimWidth:n,radius:r}=_(t.spatialReference);this._planetRadius=r,this._innerRimFactor=1+L/r,this._middleRimFactor=1+0/r,this._outerRimFactor=1+n/r,this._texV0=0/n,this._texVScale=this._texV1-this._texV0}initialize(){this.addHandles(h(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),g))}destroy(){this._passParameters.texture=m(this._passParameters.texture),this._fadeVao=m(this._fadeVao),this._vao=m(this._vao)}render(e){let t=e.find(({name:e})=>e===T.OPAQUE_ENVIRONMENT);this._update();let n=this.renderingContext;if(!this._passParameters.texture){let e=new x(1,512);e.wrapMode=33071,e.flipped=!0,this._passParameters.texture=new b(n,e,M)}if(this._passParameters.undergroundFadeAlpha<1){this._vao??=this._createRibbon(n),this._configuration.geometry=0;let e=this.techniques.getCompiled(P,this._configuration);if(!e)return this.requestRender(1),t;n.bindTechnique(e,this.bindParameters,this._passParameters),n.bindVAO(this._vao),n.drawArrays(y.TRIANGLES,0,this._vao.vertexCount(`geometry`))}if(this._passParameters.undergroundFadeAlpha>0){this._fadeVao??=E(n),this._configuration.geometry=2;let e=this.techniques.getCompiled(P,this._configuration);if(!e)return this.requestRender(1),t;n.bindTechnique(e,this.bindParameters,this._passParameters),n.bindVAO(this._fadeVao),n.drawArrays(y.TRIANGLE_STRIP,0,this._fadeVao.vertexCount(`geometry`))}return t}_update(){let e=this.bindParameters.camera,t=d(),n=this._planetRadius,r=a(e.eye),s=r-n;if(s<0){let e=Math.min(-s/5e3,1);this._passParameters.undergroundFadeAlpha=e}else this._passParameters.undergroundFadeAlpha=0;let c=Math.max(50,s),l=n+L;this._passParameters.innerScale=G(n+c,n,l)-1,this._passParameters.altitudeFade=A(s),o(t,e.eye,(n+50)/r),V(t,e.center,e.up,n,this._passParameters.silhouette);let u=this._computeScreenRimWidth(e,t,e.up,this._passParameters.silhouette),m=R(),h=z(s),g=this._texV0+m*this._texVScale,_=this._texV0+u*h*this._texVScale;if(s>50){V(e.eye,e.center,e.up,n,this._passParameters.silhouette);let t=this._computeScreenRimWidth(e,e.eye,e.up,this._passParameters.silhouette),r=p((t-1.5)/(u-1.5),0,1);g=this._texV0+r*m*this._texVScale,_=this._texV0+f(this._texV1,u*h,r)*this._texVScale}i(this._passParameters.texV,g,_)}_createRibbon(e){let t=v(1155),n=new Uint32Array(1920);t[0]=0,t[1]=0,t[2]=-1;for(let e=0;e<128;e++){let r=e*9+3;t[r]=e,t[r+1]=this._innerRimFactor,t[r+2]=-1,t[r+3]=e,t[r+4]=this._middleRimFactor,t[r+5]=0,t[r+6]=e,t[r+7]=this._outerRimFactor,t[r+8]=1;let i=3*e+1,a=e===127?1:i+3,o=e*15;n[o]=i,n[o+1]=i+1,n[o+2]=a+1,n[o+3]=a+1,n[o+4]=a,n[o+5]=i,n[o+6]=i+1,n[o+7]=i+2,n[o+8]=a+2,n[o+9]=a+2,n[o+10]=a+1,n[o+11]=i+1,n[o+12]=i,n[o+13]=a,n[o+14]=0}let r=F.createBuffer(n.length),i=r.position;for(let e=0;e<n.length;++e){let r=n[e]*3;i.set(e,0,t[r]),i.set(e,1,t[r+1]),i.set(e,2,t[r+2])}return new O(e,new S(e,C(F),r.buffer))}_computeScreenRimWidth(e,t,r,i){return s(U,i.center,i.v2),o(W,U,this._outerRimFactor),n(H,t,U,r),D(U,H,e.projectionMatrix,e.viewport,U),D(W,H,e.projectionMatrix,e.viewport,W),c(U,W)/e.height}};B=e([t(`esri.views.3d.webgl-engine.effects.atmosphere.MarsAtmosphere`)],B);function V(e,t,n,r,i){let s=a(e),c=r*Math.sqrt(s*s-r*r)/s,d=Math.sqrt(r*r-c*c),f=i.v1,p=i.v2;return o(i.center,e,d/s),l(f,e,t),u(f)<1&&l(f,e,n),o(f,f,c/a(f)),l(p,f,e),o(p,p,c/a(p)),c}const H=r(),U=d(),W=d();function G(e,t,n){let r=Math.sqrt(e*e-t*t),i=Math.sqrt(e*e-n*n);return e*e/(r*i+t*n)}export{B as MarsAtmosphere};
@@ -1,7 +1,7 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
2
  import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{ZEROS as r}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{releaseMaybe as i}from"../../../../../core/maybe.js";import{checkWebGLError as a}from"../../../../webgl/checkWebGLError.js";import{ColorAttachment0 as o,SizedPixelFormat as s,DataType as c}from"../../../../webgl/enums.js";import{RenderNodeOutput as l}from"../../../webgl.js";import u from"../../../webgl/RenderNode.js";import{If as d,glsl as f}from"../../core/shaderModules/glsl.js";import{Pos2Locations as p}from"../../lib/DefaultVertexBufferLayouts.js";import{floatBlendReductionFactor as m}from"../../shaders/floatBlendScale.glsl.js";let h=class extends u{constructor(e){super(e),this.destroyedCB=null,this.consumes={required:[l.FINAL]},this.produces=l.FINAL,this.clearColor=r,this._focusedFBOType=7,this._programs=new Map}destroy(){this._programs.clear(),this.destroyedCB()}render(){let e=this.input;if(!this._focusedTexture)return e;let t=this.renderingContext,n=t.boundFramebuffer;t.bindFramebuffer(e.fbo),t.setClearColor(0,0,0,0),t.clear(16384);let r=this._focusedTexture.attachment,i=[_(r)],a=this._ensureProgram(t,!1,i);return t.useProgram(a),t.bindTexture(r,0),a.setUniform1i(`colorTex0`,0),a.setUniform1i(`inputType`,this._focusedFBOType),this._focusedFBOType===3&&a.setUniform2fv(`nearFar`,this.camera.nearFar),t.setDrawBuffers([o]),t.screen.draw(),t.bindFramebuffer(n),e}getDownscaledFBO(e,t,n,r,i,c){if(i?.startsWith(`${t}\n`)??!1){let t=1/2**e.level;n=e.width*t,r=e.height*t}else c=null;let l=t===`linear depth`||t.includes(`shadow`),u=t===`overlay highlight`||t===`highlights`||t===`highlight mix`,d=t===`highlight coverage`,f=e.colorTexture?.descriptor?.internalFormat,p=[],m=[],h=[],g=!1;e.colorAttachments.forEach((t,n)=>{let r=e.getColorTexture(t);if(r){let e=_(r);p.push(e);let{hasMipmap:t,isImmutable:i}=r.descriptor;e===`float`&&!t&&!i&&(r.generateMipmap(),m[n]=!0),g||=t}if(n>0){let e=r?.descriptor.internalFormat;e===s.RGBA8&&(r?.debugName?.indexOf(`emissive`)??-1)>=0?h.push(8):h.push(y(e))}else h.push(l?0:u?1:d?2:c??y(f))});let v=this.renderingContext,{depthStencilTexture:x,level:S}=e,C=this._ensureProgram(v,x!=null,p,g?S:null),w=this.fboCache.acquire(n,r,`fbo visualizer`);v.useProgram(C);let T=v.boundFramebuffer;v.bindFramebuffer(w.fbo);let E=[];e.colorAttachments.forEach((t,n)=>{let r=`colorTex${n.toFixed()}`;v.bindTexture(e.getColorTexture(t),n),C.setUniform1i(r,n),n>0&&w.acquireColor(o+n,5,`fbo visualizer`),E.push(t)});let D=x?.descriptor.linearFilterDepth??!1;if(x){let t=e.colorAttachments.length;x.setShadowFiltering(!1),v.bindTexture(x,t),C.setUniform1i(`depthTex`,t);let n=o+t;n>o&&w.acquireColor(n,5,`fbo visualizer`),E.push(n)}v.gl.drawBuffers(E),a(v.gl);let O=v.getViewport();return v.setViewport(0,0,n,r),v.setClearColor(0,0,0,0),v.clear(16384),v.setBlendingEnabled(!0),v.setBlendFunction(1,771),C.setUniform1iv(`inputTypes`,h.length>0?h:[7]),C.setUniform2fv(`nearFar`,this.camera.nearFar),v.screen.draw(),a(v.gl),v.bindFramebuffer(T),v.setViewport(O.x,O.y,O.width,O.height),e.colorAttachments.forEach((n,r)=>{let a=e.getColorTexture(n);m[r]&&a?.clearMipmap(),i===b(t,e,n,!1)&&(this._focusedTexture?.release(),this._focusedTexture=w.getAttachment(n),this._focusedTexture?.retain(),this._focusedFBOType=h[r]===9?y(a?.descriptor.internalFormat):h[r])}),x&&x.setShadowFiltering(D),w}clearFocusedFBO(){this._focusedTexture=i(this._focusedTexture)}getPreviewContent(e,t,n,r){let i=this.renderingContext,o=r.includes(`
3
3
  depth`),l=this.fboCache.acquire(e,t,`fbo visualizer`),u=i.boundFramebuffer;i.bindFramebuffer(l?.fbo);let d=i.getViewport();i.setViewport(0,0,e,t),i.setClearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),i.clear(16384),i.setBlendingEnabled(!0),i.setBlendFunction(1,771);let f=n.attachment,p=this._ensureProgram(i,!1,[_(f)]);i.useProgram(p),i.bindTexture(f,0),p.setUniform1i(`colorTex0`,0),p.setUniform1iv(`inputTypes`,[!o&&f.descriptor.internalFormat===s.RGBA16F?5:7]),i.screen.draw();let m=new ImageData(new Uint8ClampedArray(e*t*4),e,t);return i.gl.readPixels(0,0,e,t,6408,c.UNSIGNED_BYTE,new Uint8Array(m.data.buffer)),a(i.gl),i.bindFramebuffer(u),i.setViewport(d.x,d.y,d.width,d.height),l?.release(),m}_ensureProgram(e,t,n,r){let i=v({hasDepthAttachment:t,colorSamplerTypes:n,lod:r}),a=this._programs.get(i);if(a)return a;let o=e=>{let t=``;for(let n=0;n<e.length;++n){let r=e[n];t+=`layout(location = ${f.int(n)}) out vec4 fragColor${f.int(n)};
4
- uniform ${g(r)} colorTex${f.int(n)};`}return t},s=r??0,c=r==null?1:1/2**(r+1)/1,l=e=>e.reduce((e,t,n)=>e+`{
4
+ uniform ${g(r)} colorTex${f.int(n)};`}return t},s=r??0,c=r==null?1:1/2**(r+1),l=e=>e.reduce((e,t,n)=>e+`{
5
5
  int inputType = inputTypes[${n}];
6
6
  if (inputType == ${3 .toFixed()}) {
7
7
  fragColor${n} = vec4(vec3(readTexture(colorTex${n}, uv, ${s}).r), 1.0);
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{normalize as r,set as i,dot as a}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{smoothstep as s,clamp as c}from"../../../../../core/mathUtils.js";import{watch as l,syncAndInitial as u}from"../../../../../core/reactiveUtils.js";import{defaultShadowOpacity as d,defaultShadowDifference as f,defaultShadowColor as p}from"../../../../support/HighlightDefaults.js";import{RenderNodeOutput as m}from"../../../webgl.js";import h from"../../../webgl/RenderNode.js";import{EmissiveTechniqueConfiguration as g}from"../../shaders/EmissiveTechniqueConfiguration.js";import{ShadowHighlightPassParameters as _,ShadowHighlightTechnique as v}from"./ShadowHighlightTechnique.js";let y=class extends h{constructor(e){super(e),this.consumes={required:[m.COMPOSITE,`highlights`]},this.produces=m.COMPOSITE,this._configuration=new g,this._passParameters=new _,this._maxOpacity=1,this._shadowDifference=.2}initialize(){this.addHandles([l(()=>this.view.defaultHighlight?.shadowOpacity,e=>{this._passParameters.shadowOpacity=e??d,this._updateOccludedShadowOpacity(),this._ensureMaxOpacity()},u),l(()=>this.view.defaultHighlight?.shadowDifference,e=>{this._shadowDifference=e??f,this._updateOccludedShadowOpacity(),this._ensureMaxOpacity()},u),l(()=>this.view.defaultHighlight?.shadowColor,e=>{this._passParameters.shadowColor=(e??p).toUnitRGBA(),this._ensureMaxOpacity()},u)])}_updateOccludedShadowOpacity(){this._passParameters.occludedShadowOpacity=this._passParameters.shadowOpacity*(1-this._shadowDifference)}_ensureMaxOpacity(){let e=Math.max(this._passParameters.shadowOpacity,this._passParameters.occludedShadowOpacity);this._maxOpacity=e*this._passParameters.shadowColor[3],this.requestRender(1)}precompile(){this._ensureIfVisible()&&(this._configuration.hasEmissive=this.bindParameters.emissions!==0,this.techniques.precompile(v,this._configuration))}render(e){let t=this.input;if(!this._ensureIfVisible())return t;let n=this.bindParameters;this._passParameters.highlightTexture=e.find(({name:e})=>e===`highlights`)?.getTexture(),this._passParameters.origin=n.camera.center;let r=this.renderingContext,i=this.techniques.get(v,this._configuration),a=t.obtainDepthTexture();return r.bindFramebuffer(t.fbo),r.bindTechnique(i,n,this._passParameters),r.screen.draw(),t.attachDepth(a),a?.release(),t}_ensureIfVisible(){let e=this.bindParameters;if(!e.hasShadowHighlights||!e.mainDepth||!e.shadowHighlight?.getTexture())return!1;let{camera:t,lighting:n}=e;this._passParameters.opacityElevation=1-s(4e4,5e4,t.relativeElevation);let o=this.viewingMode===1?r(b,t.center):i(b,0,0,1),l=a(o,n.mainLight.direction);return this._passParameters.dayNightTerminator=s(0,1,c(l*30,0,1)),this._maxOpacity*this._passParameters.opacityElevation*this._passParameters.dayNightTerminator>=.001953125}};e([t()],y.prototype,`consumes`,void 0),e([t()],y.prototype,`produces`,void 0),e([t({constructOnly:!0})],y.prototype,`viewingMode`,void 0),y=e([n(`esri.views.3d.webgl-engine.effects.highlight.ShadowHighlight`)],y);const b=o();export{y as ShadowHighlight};
2
+ import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{normalize as r,set as i,dot as a}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{smoothstep as s,clamp as c}from"../../../../../core/mathUtils.js";import{watch as l,syncAndInitial as u}from"../../../../../core/reactiveUtils.js";import{defaultShadowOpacity as d,defaultShadowDifference as f,defaultShadowColor as p}from"../../../../support/HighlightDefaults.js";import{RenderNodeOutput as m}from"../../../webgl.js";import h from"../../../webgl/RenderNode.js";import{EmissiveTechniqueConfiguration as g}from"../../shaders/EmissiveTechniqueConfiguration.js";import{ShadowHighlightPassParameters as _,ShadowHighlightTechnique as v}from"./ShadowHighlightTechnique.js";let y=class extends h{constructor(e){super(e),this.consumes={required:[m.COMPOSITE,`highlights`]},this.produces=m.COMPOSITE,this._configuration=new g,this._passParameters=new _,this._maxOpacity=1,this._shadowDifference=.2}initialize(){this.addHandles([l(()=>this.view.defaultHighlight?.shadowOpacity,e=>{this._passParameters.shadowOpacity=e??d,this._updateOccludedShadowOpacity(),this._ensureMaxOpacity()},u),l(()=>this.view.defaultHighlight?.shadowDifference,e=>{this._shadowDifference=e??f,this._updateOccludedShadowOpacity(),this._ensureMaxOpacity()},u),l(()=>this.view.defaultHighlight?.shadowColor,e=>{this._passParameters.shadowColor=(e??p).toUnitRGBA(),this._ensureMaxOpacity()},u)])}_updateOccludedShadowOpacity(){this._passParameters.occludedShadowOpacity=this._passParameters.shadowOpacity*(1-this._shadowDifference)}_ensureMaxOpacity(){let e=Math.max(this._passParameters.shadowOpacity,this._passParameters.occludedShadowOpacity);this._maxOpacity=e*this._passParameters.shadowColor[3],this.requestRender(1)}precompile(){this._ensureIfVisible()&&(this._configuration.hasEmissive=this.bindParameters.emissions!==0,this.techniques.precompile(v,this._configuration))}render(e){let t=this.input;if(!this._ensureIfVisible())return t;let n=this.bindParameters;this._passParameters.highlightTexture=e.find(({name:e})=>e===`highlights`)?.getTexture(),this._passParameters.origin=n.camera.center;let r=this.renderingContext,i=this.techniques.get(v,this._configuration),a=t.obtainDepthTexture();return r.bindFramebuffer(t.fbo),r.bindTechnique(i,n,this._passParameters),r.screen.draw(),t.attachDepth(a),a?.release(),t}_ensureIfVisible(){let e=this.bindParameters;if(!e.hasShadowHighlights||!e.mainDepth||!e.shadowHighlight?.getTexture())return!1;let{camera:t,lighting:n}=e;this._passParameters.opacityElevation=1-s(4e4,5e4,t.relativeElevation);let o=this.isGlobal?r(b,t.center):i(b,0,0,1),l=a(o,n.mainLight.direction);return this._passParameters.dayNightTerminator=s(0,1,c(l*30,0,1)),this._maxOpacity*this._passParameters.opacityElevation*this._passParameters.dayNightTerminator>=.001953125}};e([t()],y.prototype,`consumes`,void 0),e([t()],y.prototype,`produces`,void 0),e([t({constructOnly:!0})],y.prototype,`isGlobal`,void 0),y=e([n(`esri.views.3d.webgl-engine.effects.highlight.ShadowHighlight`)],y);const b=o();export{y as ShadowHighlight};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{set as e,subtract as t}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newDoubleArray as r}from"../../../../../geometry/support/DoubleArray.js";import{PrimitiveType as i}from"../../../../webgl/enums.js";import{VertexBuffer as a}from"../../../../webgl/VertexBuffer.js";import{glLayout as o}from"../../../support/buffer/glUtil.js";import{VertexArrayObject as s}from"../../lib/VertexArrayObject.js";import{layoutSpherical as c,layoutPlanar as l}from"./LaserlinePathTechnique.js";class u{constructor(e){this._renderCoordsHelper=e,this._origin=n(),this._dirty=!1,this._count=0}set vertices(e){let t=r(e.length*3),n=0;for(let r of e)t[n++]=r[0],t[n++]=r[1],t[n++]=r[2];this.buffers=[t]}set buffers(t){if(this._buffers=t,this._buffers.length>0){let t=this._buffers[0],n=Math.floor(t.length/3/2)*3;e(this._origin,t[n],t[n+1],t[n+2])}else e(this._origin,0,0,0);this._dirty=!0}get origin(){return this._origin}draw(e){let t=this._ensureVAO(e);t!=null&&(e.bindVAO(t),e.drawArrays(i.TRIANGLES,0,this._count))}dispose(){this._vao!=null&&this._vao.dispose()}get _layout(){return this._renderCoordsHelper.viewingMode===1?c:l}_ensureVAO(e){return this._buffers==null?null:(this._vao??=this._createVAO(e,this._buffers),this._ensureVertexData(this._vao,this._buffers),this._vao)}_createVAO(e,t){let n=this._createDataBuffer(t);return this._dirty=!1,new s(e,new a(e,o(this._layout),n))}_ensureVertexData(e,t){if(!this._dirty)return;let n=this._createDataBuffer(t);e.buffer()?.setData(n),this._dirty=!1}_createDataBuffer(n){let r=n.reduce((e,t)=>e+d(t),0);this._count=r;let i=this._layout.createBuffer(r),a=this._origin,o=0,s=0,c=`startUp`in i?this._setUpVectors.bind(this,i):void 0;for(let r of n){for(let n=0;n<r.length;n+=3){let l=e(p,r[n],r[n+1],r[n+2]);n===0?s=this._renderCoordsHelper.getAltitude(l):this._renderCoordsHelper.setAltitude(l,s);let u=o+n*2;c?.(n,u,r,l);let d=t(p,l,a);if(n<r.length-3){for(let e=0;e<6;e++)i.start.setVec(u+e,d);i.extrude.setValues(u,0,-1),i.extrude.setValues(u+1,1,-1),i.extrude.setValues(u+2,1,1),i.extrude.setValues(u+3,0,-1),i.extrude.setValues(u+4,1,1),i.extrude.setValues(u+5,0,1)}if(n>0)for(let e=-6;e<0;e++)i.end.setVec(u+e,d)}o+=d(r)}return i.buffer}_setUpVectors(e,t,n,r,i){let a=this._renderCoordsHelper.worldUpAtPosition(i,f);if(t<r.length-3)for(let t=0;t<6;t++)e.startUp.setVec(n+t,a);if(t>0)for(let t=-6;t<0;t++)e.endUp.setVec(n+t,a)}}function d(e){return(e.length/3-1)*2*3}const f=n(),p=n();export{u as LaserlinePathData};
2
+ import{set as e,subtract as t}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{newDoubleArray as r}from"../../../../../geometry/support/DoubleArray.js";import{PrimitiveType as i}from"../../../../webgl/enums.js";import{VertexBuffer as a}from"../../../../webgl/VertexBuffer.js";import{glLayout as o}from"../../../support/buffer/glUtil.js";import{VertexArrayObject as s}from"../../lib/VertexArrayObject.js";import{layoutSpherical as c,layoutPlanar as l}from"./LaserlinePathTechnique.js";class u{constructor(e){this._renderCoordsHelper=e,this._origin=n(),this._dirty=!1,this._count=0}set vertices(e){let t=r(e.length*3),n=0;for(let r of e)t[n++]=r[0],t[n++]=r[1],t[n++]=r[2];this.buffers=[t]}set buffers(t){if(this._buffers=t,this._buffers.length>0){let t=this._buffers[0],n=Math.floor(t.length/3/2)*3;e(this._origin,t[n],t[n+1],t[n+2])}else e(this._origin,0,0,0);this._dirty=!0}get origin(){return this._origin}draw(e){let t=this._ensureVAO(e);t!=null&&(e.bindVAO(t),e.drawArrays(i.TRIANGLES,0,this._count))}dispose(){this._vao!=null&&this._vao.dispose()}get _layout(){return this._renderCoordsHelper.isGlobal?c:l}_ensureVAO(e){return this._buffers==null?null:(this._vao??=this._createVAO(e,this._buffers),this._ensureVertexData(this._vao,this._buffers),this._vao)}_createVAO(e,t){let n=this._createDataBuffer(t);return this._dirty=!1,new s(e,new a(e,o(this._layout),n))}_ensureVertexData(e,t){if(!this._dirty)return;let n=this._createDataBuffer(t);e.buffer()?.setData(n),this._dirty=!1}_createDataBuffer(n){let r=n.reduce((e,t)=>e+d(t),0);this._count=r;let i=this._layout.createBuffer(r),a=this._origin,o=0,s=0,c=`startUp`in i?this._setUpVectors.bind(this,i):void 0;for(let r of n){for(let n=0;n<r.length;n+=3){let l=e(p,r[n],r[n+1],r[n+2]);n===0?s=this._renderCoordsHelper.getAltitude(l):this._renderCoordsHelper.setAltitude(l,s);let u=o+n*2;c?.(n,u,r,l);let d=t(p,l,a);if(n<r.length-3){for(let e=0;e<6;e++)i.start.setVec(u+e,d);i.extrude.setValues(u,0,-1),i.extrude.setValues(u+1,1,-1),i.extrude.setValues(u+2,1,1),i.extrude.setValues(u+3,0,-1),i.extrude.setValues(u+4,1,1),i.extrude.setValues(u+5,0,1)}if(n>0)for(let e=-6;e<0;e++)i.end.setVec(u+e,d)}o+=d(r)}return i.buffer}_setUpVectors(e,t,n,r,i){let a=this._renderCoordsHelper.worldUpAtPosition(i,f);if(t<r.length-3)for(let t=0;t<6;t++)e.startUp.setVec(n+t,a);if(t>0)for(let t=-6;t<0;t++)e.endUp.setVec(n+t,a)}}function d(e){return(e.length/3-1)*2*3}const f=n(),p=n();export{u as LaserlinePathData};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{sliceEquals as r}from"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{copy as i,equals as a}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{disposeMaybe as s}from"../../../../../core/maybe.js";import{watch as c,sync as l}from"../../../../../core/reactiveUtils.js";import{signal as u}from"../../../../../core/signal.js";import{PrimitiveType as d,DepthStencilAttachment as f,PixelType as p}from"../../../../webgl/enums.js";import{DisposableFramebufferObject as m}from"../../../../webgl/FramebufferObject.js";import{noParameters as h}from"../../../../webgl/NoParameters.js";import{InternalRenderCategory as g}from"../../../webgl.js";import _ from"../../../webgl/RenderNode.js";import{ReadShadowMapPassParameters as v}from"../../core/shaderLibrary/shading/readShadow.glsl.js";import{BindParameters as y}from"../../lib/BindParameters.js";import{DepthRange as b}from"../../lib/DepthRange.js";import{createQuadVAO as x}from"../../lib/glUtil3D.js";import{ShadowMap as S}from"../../lib/ShadowMap.js";import{V as C}from"../../../../../chunks/VolumeMask.glsl.js";import{volumeToVao as w}from"../focusArea/focusAreaMaskUtils.js";import{S as T}from"../../../../../chunks/ShadowCastAccumulate.glsl.js";import{ShadowCastAccumulateTechnique as E}from"./ShadowCastAccumulateTechnique.js";import{ShadowCastAccumulateTechniqueConfiguration as D}from"./ShadowCastAccumulateTechniqueConfiguration.js";import{ShadowCastClearTechnique as O}from"./ShadowCastClearTechnique.js";import{ShadowCastMaskTechnique as k}from"./ShadowCastMaskTechnique.js";let A=class extends _{constructor(e){super(e),this.consumes={required:[]},this.produces=g.SHADOW_ACCUMULATION,this._fullyRecompute=!1,this._analysisVolumeGeometry=null,this._primarySet=new N(new D(0),()=>this._requestRenderIfEnabled()),this._contextSet=new N(new D(1),()=>this._requestRenderIfEnabled()),this._passParameters=new v,this._maskParameters=new C,this._volumeVao=null,this._volumeVertexCount=0,this._depthRange=b.Zero,this._didAccumulate=!1,this._enabled=!1,this._previewing=!1,this.accumulationRenderer=null,this._shadowAccumulatorKey=Symbol(`shadowAccumulator`);let{view:t}=e,n=t.stage.renderer.fboCache;this._accumulationBindParameters=new y(new S(n,t.stage.viewingMode)),this._accumulationBindParameters.shadowMap.enabled=!0,this._vao=x(n.rctx),this._tmpReadFbo=new m(n.rctx),this.addHandles([c(()=>this._previewing,e=>{e?this._invalidateAccumulationSets():this._requestRenderIfEnabled()},l),c(()=>this._numActive,()=>this._numActiveChanged(),l)],this._shadowAccumulatorKey)}destroy(){this._disable(),this.removeHandles(this._shadowAccumulatorKey),this.accumulationRenderer=null,this._fboHandle=s(this._fboHandle),this._vao=s(this._vao),this._volumeVao=s(this._volumeVao),this._tmpReadFbo=s(this._tmpReadFbo),this._accumulationBindParameters.destroy();for(let e of this._accumulationSets())e.destroy();this._contextSet=null,this._primarySet=null}*_accumulationSets(){yield this._primarySet,yield this._contextSet}get computedSamples(){return[this._primarySet.progress,this._contextSet.progress]}get shadowCastTexture(){return this._fboHandle?.getTexture()}get accumulating(){return this.active&&(this._previewing||this._refining||this._fullyRecompute)}get _refining(){return this.active&&!this._doneAccumulating&&!this._previewing}get active(){return this._enabled&&this._accumulationSets().some(e=>e.active)}get canAccumulate(){return this._accumulationBindParameters.depth!=null&&this._depthRange!==b.Zero&&this.accumulationRenderer!=null&&this.accumulationRenderer.isAboveElevationThreshold}get _doneAccumulating(){return this._accumulationSets().every(e=>e.doneAccumulating)}get _numActive(){return this._accumulationSets().reduce((e,t)=>e+ +t.active,0)}get _colorFormat(){return this._numActive===2?2:0}get _analysisVolume(){return this._analysisVolumeGeometry}set _analysisVolume(e){if(this._analysisVolumeGeometry===e)return;this._invalidateAccumulationSets(),this._analysisVolumeGeometry=e,this._volumeVao=s(this._volumeVao),this._volumeVertexCount=0;let t=e!=null;for(let e of this._accumulationSets())e.configuration.useMask=t;if(!t)return;let n=e.geometryVolume,{vao:r,vertexCount:i}=w(this._rctx,n);this._volumeVao=r,this._volumeVertexCount=i}get requireGeometryDepth(){return this.accumulating||this._volumeVao!=null}precompile(){if(this.active&&(this._fullyRecompute=this.bindParameters.frameRendererTarget!==0,this.accumulating)){for(let e of this._accumulationSets())this.techniques.precompile(E,e.configuration),this.techniques.precompile(O,e.configuration);this.techniques.precompile(k)}}get didAccumulate(){return this._didAccumulate}render(){this._updateCamera(),this._didAccumulate=this._renderAccumulation(),this._updateMask();let e=this._fboHandle;return e?.retain(),e}_renderAccumulation(){if(!this.active)return!1;if(this._accumulationBindParameters.contentCamera=this.bindParameters.contentCamera,this._accumulationBindParameters.depth=this.bindParameters.depth,this._passParameters.origin=this._accumulationBindParameters.camera.center,!this.canAccumulate||(this._renderAreaMask(),!this.accumulating))return this._accumulationBindParameters.depth=null,!1;(this._previewing||this._fullyRecompute)&&this._reset(),this._clearBuffersOnAccumulationStart(this._accumulationBindParameters);let e=this._accumulateSetsForRenderFrame(this._previewing&&!this._fullyRecompute,this._accumulationBindParameters);return this._accumulationBindParameters.depth=null,e}_renderAreaMask(){let e=this.techniques.getCompiled(k),t=this._volumeVao,n=this._volumeVertexCount,r=this._fboHandle,i=this._analysisVolume;if(r?.detachDepth(),!e||!t||n<1||!r||!i)return;r.acquireDepth(14);let a=this._rctx,o=this._accumulationBindParameters,s=o.depth,c=this._tmpReadFbo;c.attachDepthStencil(s?.attachment),a.blitFramebuffer(c,r.fbo,256),c.detachDepthStencilTexture(),a.bindFramebuffer(r.fbo),a.setClearStencil(0),a.clear(1024),a.setViewport(0,0,o.camera.width,o.camera.height);let l=a.bindTechnique(e,o,h);this._maskParameters.origin=i.origin,l.bindDraw(o,h,this._maskParameters),a.bindVAO(t),a.drawArrays(d.TRIANGLES,0,n)}_clearBuffersOnAccumulationStart(e){if(this._accumulationSets().every(e=>e.progress===0))this._clearFramebuffer();else for(let t of this._accumulationSets())t.progress===0&&this._clearFramebufferForSet(this._fboHandle,t,e)}_accumulateSetsForRenderFrame(e,t){let n=!1;for(let r of this._accumulationSets())this._accumulateSet(r,e,t),n=!0;return n&&this.requestRender(1),n}_accumulateSet(e,t,n){let r=t?Math.min(j,e.sampleCount)-e.progress:e.sampleCount-e.progress;for(let t=0;t<r;++t)this._accumulateShadow(e,n)}_updateMask(){this.accumulationRenderer?.setStencilMask(this._fboHandle?.getAttachment(f))}setParameters(e){e.previewing!==void 0&&(this._previewing=e.previewing),e.lightDirections!==void 0&&(this._primarySet.lightDirections=e.lightDirections),e.lightDirectionsContext!==void 0&&(this._contextSet.lightDirections=e.lightDirectionsContext),e.enabled===!0?this._enable():e.enabled===!1&&this._disable(),e.analysisVolume!==void 0&&(this._analysisVolume=e.analysisVolume),this.accumulationRenderer?.setOptions(e)}readAccumulatedShadow(e,t){let n=this._primarySet.progress;return!this.active||!this._fboHandle||n<1||e<0||e>=this._fboHandle.fbo.width||t<0||t>=this._fboHandle.fbo.height?0:(this._fboHandle.fbo.readPixels(e,t,1,1,6408,p.UNSIGNED_BYTE,M),M[0]/n)}_updateCamera(){if(!this.active)return;let e=this.bindParameters.camera,t=this._accumulationBindParameters.camera;e.equals(t)||t.copyFrom(e),this._isAccumulationValid(e)||(this._fboHandle?.release(),this._fboHandle=this._createFBO(e.fullWidth,e.fullHeight),this._reset()),this.accumulationRenderer?.setOpacityFromElevation(e.relativeElevation)}_numActiveChanged(){if(!this._enabled||!this._fboHandle)return;let e=this._numActive===2,{width:t,height:n}=this._fboHandle.fbo,r=this._createFBO(t,n);e&&(this._clearFramebuffer(r),this._contextSet.reset()),this._rctx.blitFramebuffer(this._fboHandle.fbo,r.fbo),this._fboHandle.dispose(),this._fboHandle=r,this.requestRender(1)}_enable(){this._enabled||(this._enabled=!0,this._invalidateAccumulationSets())}_disable(){this._enabled&&(this._fboHandle=s(this._fboHandle),this._enabled=!1,this.requestRender(1))}_createFBO(e,t){return this.fboCache.acquire(e,t,this.produces,this._colorFormat)}_invalidateAccumulationSets(){for(let e of this._accumulationSets())e.reset();this._requestRenderIfEnabled()}_reset(){for(let e of this._accumulationSets())e.reset()}_clearFramebuffer(e=this._fboHandle){e&&(this._rctx.bindFramebuffer(e.fbo),this._rctx.setClearColor(0,0,0,0),this._rctx.clear(16384))}_clearFramebufferForSet(e,t,n){if(!e)return;let r=this.techniques.get(O,t.configuration);this._rctx.bindFramebuffer(e.fbo),this._rctx.bindTechnique(r,n,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(r.primitiveType,0,this._vao.vertexCount(`geometry`))}_accumulateShadow(e,t){this.view.stage.renderer.renderShadowAccumulationShadowMap(t.camera,t.contentCamera,this._accumulationBindParameters.shadowMap,e.lightDirections[e.progress++],this._depthRange);let n=this.techniques.get(E,e.configuration);this._rctx.bindFramebuffer(this._fboHandle?.fbo),this._rctx.bindTechnique(n,t,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(n.primitiveType,0,this._vao.vertexCount(`geometry`))}_isAccumulationValid(e){return this._fboHandle?.fbo.width===e.fullWidth&&this._fboHandle?.fbo.height===e.fullHeight}_requestRenderIfEnabled(){this._enabled&&this.requestRender(1)}get _rctx(){return this.renderingContext}updateDepthRange(e){this._depthRange.equals(e)||(this._depthRange=e,this._invalidateAccumulationSets())}get test(){}};e([t()],A.prototype,`consumes`,void 0),e([t()],A.prototype,`produces`,void 0),e([t()],A.prototype,`_refining`,null),e([t()],A.prototype,`active`,null),e([t()],A.prototype,`_doneAccumulating`,null),e([t()],A.prototype,`_numActive`,null),e([t()],A.prototype,`_colorFormat`,null),e([t()],A.prototype,`_depthRange`,void 0),e([t()],A.prototype,`_enabled`,void 0),e([t()],A.prototype,`_previewing`,void 0),e([t()],A.prototype,`accumulationRenderer`,void 0),A=e([n(`esri.views.3d.webgl-engine.effects.shadowAccumulation.ShadowAccumulator`)],A);const j=6,M=new Uint8Array(4);class N{constructor(e,t){this.configuration=e,this._notifyChange=t,this._cachedLightDirections=[],this._progress=u(0),this._sampleCount=u(0)}get progress(){return this._progress.value}set progress(e){this._progress.value=e}get sampleCount(){return this._sampleCount.value}get doneAccumulating(){return this.progress>=this.sampleCount}get running(){return this.progress>0}get active(){return this.sampleCount>0}get lightDirections(){return this._cachedLightDirections}set lightDirections(e){let t=this._cachedLightDirections,n=Math.min(T,e.length);if(!r(t,0,t.length,e,0,n,a)){t.length=n,this._sampleCount.value=n;for(let r=0;r<n;++r)t[r]=i(t[r]??o(),e[r]);this.reset(),this._notifyChange()}}destroy(){this._cachedLightDirections.length=0,this._sampleCount.value=0}reset(){this.progress=0}}export{A as ShadowAccumulator};
2
+ import{__decorate as e}from"tslib";import{property as t,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{sliceEquals as r}from"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import{copy as i,equals as a}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{disposeMaybe as s}from"../../../../../core/maybe.js";import{watch as c,sync as l}from"../../../../../core/reactiveUtils.js";import{signal as u}from"../../../../../core/signal.js";import{PrimitiveType as d,DepthStencilAttachment as f,PixelType as p}from"../../../../webgl/enums.js";import{DisposableFramebufferObject as m}from"../../../../webgl/FramebufferObject.js";import{noParameters as h}from"../../../../webgl/NoParameters.js";import{InternalRenderCategory as g}from"../../../webgl.js";import _ from"../../../webgl/RenderNode.js";import{ReadShadowMapPassParameters as v}from"../../core/shaderLibrary/shading/readShadow.glsl.js";import{BindParameters as y}from"../../lib/BindParameters.js";import{DepthRange as b}from"../../lib/DepthRange.js";import{createQuadVAO as x}from"../../lib/glUtil3D.js";import{ShadowMap as S}from"../../lib/ShadowMap.js";import{V as C}from"../../../../../chunks/VolumeMask.glsl.js";import{volumeToVao as w}from"../focusArea/focusAreaMaskUtils.js";import{S as T}from"../../../../../chunks/ShadowCastAccumulate.glsl.js";import{ShadowCastAccumulateTechnique as E}from"./ShadowCastAccumulateTechnique.js";import{ShadowCastAccumulateTechniqueConfiguration as D}from"./ShadowCastAccumulateTechniqueConfiguration.js";import{ShadowCastClearTechnique as O}from"./ShadowCastClearTechnique.js";import{ShadowCastMaskTechnique as k}from"./ShadowCastMaskTechnique.js";let A=class extends _{constructor(e){super(e),this.consumes={required:[]},this.produces=g.SHADOW_ACCUMULATION,this._fullyRecompute=!1,this._analysisVolumeGeometry=null,this._primarySet=new N(new D(0),()=>this._requestRenderIfEnabled()),this._contextSet=new N(new D(1),()=>this._requestRenderIfEnabled()),this._passParameters=new v,this._maskParameters=new C,this._volumeVao=null,this._volumeVertexCount=0,this._depthRange=b.Zero,this._didAccumulate=!1,this._enabled=!1,this._previewing=!1,this.accumulationRenderer=null,this._shadowAccumulatorKey=Symbol(`shadowAccumulator`);let{view:t}=e,n=t.stage.renderer.fboCache;this._accumulationBindParameters=new y(new S(n,t.stage.isGlobal)),this._accumulationBindParameters.shadowMap.enabled=!0,this._vao=x(n.rctx),this._tmpReadFbo=new m(n.rctx),this.addHandles([c(()=>this._previewing,e=>{e?this._invalidateAccumulationSets():this._requestRenderIfEnabled()},l),c(()=>this._numActive,()=>this._numActiveChanged(),l)],this._shadowAccumulatorKey)}destroy(){this._disable(),this.removeHandles(this._shadowAccumulatorKey),this.accumulationRenderer=null,this._fboHandle=s(this._fboHandle),this._vao=s(this._vao),this._volumeVao=s(this._volumeVao),this._tmpReadFbo=s(this._tmpReadFbo),this._accumulationBindParameters.destroy();for(let e of this._accumulationSets())e.destroy();this._contextSet=null,this._primarySet=null}*_accumulationSets(){yield this._primarySet,yield this._contextSet}get computedSamples(){return[this._primarySet.progress,this._contextSet.progress]}get shadowCastTexture(){return this._fboHandle?.getTexture()}get accumulating(){return this.active&&(this._previewing||this._refining||this._fullyRecompute)}get _refining(){return this.active&&!this._doneAccumulating&&!this._previewing}get active(){return this._enabled&&this._accumulationSets().some(e=>e.active)}get canAccumulate(){return this._accumulationBindParameters.depth!=null&&this._depthRange!==b.Zero&&this.accumulationRenderer!=null&&this.accumulationRenderer.isAboveElevationThreshold}get _doneAccumulating(){return this._accumulationSets().every(e=>e.doneAccumulating)}get _numActive(){return this._accumulationSets().reduce((e,t)=>e+ +t.active,0)}get _colorFormat(){return this._numActive===2?2:0}get _analysisVolume(){return this._analysisVolumeGeometry}set _analysisVolume(e){if(this._analysisVolumeGeometry===e)return;this._invalidateAccumulationSets(),this._analysisVolumeGeometry=e,this._volumeVao=s(this._volumeVao),this._volumeVertexCount=0;let t=e!=null;for(let e of this._accumulationSets())e.configuration.useMask=t;if(!t)return;let n=e.geometryVolume,{vao:r,vertexCount:i}=w(this._rctx,n);this._volumeVao=r,this._volumeVertexCount=i}get requireGeometryDepth(){return this.accumulating||this._volumeVao!=null}precompile(){if(this.active&&(this._fullyRecompute=this.bindParameters.frameRendererTarget!==0,this.accumulating)){for(let e of this._accumulationSets())this.techniques.precompile(E,e.configuration),this.techniques.precompile(O,e.configuration);this.techniques.precompile(k)}}get didAccumulate(){return this._didAccumulate}render(){this._updateCamera(),this._didAccumulate=this._renderAccumulation(),this._updateMask();let e=this._fboHandle;return e?.retain(),e}_renderAccumulation(){if(!this.active)return!1;if(this._accumulationBindParameters.contentCamera=this.bindParameters.contentCamera,this._accumulationBindParameters.depth=this.bindParameters.depth,this._passParameters.origin=this._accumulationBindParameters.camera.center,!this.canAccumulate||(this._renderAreaMask(),!this.accumulating))return this._accumulationBindParameters.depth=null,!1;(this._previewing||this._fullyRecompute)&&this._reset(),this._clearBuffersOnAccumulationStart(this._accumulationBindParameters);let e=this._accumulateSetsForRenderFrame(this._previewing&&!this._fullyRecompute,this._accumulationBindParameters);return this._accumulationBindParameters.depth=null,e}_renderAreaMask(){let e=this.techniques.getCompiled(k),t=this._volumeVao,n=this._volumeVertexCount,r=this._fboHandle,i=this._analysisVolume;if(r?.detachDepth(),!e||!t||n<1||!r||!i)return;r.acquireDepth(14);let a=this._rctx,o=this._accumulationBindParameters,s=o.depth,c=this._tmpReadFbo;c.attachDepthStencil(s?.attachment),a.blitFramebuffer(c,r.fbo,256),c.detachDepthStencilTexture(),a.bindFramebuffer(r.fbo),a.setClearStencil(0),a.clear(1024),a.setViewport(0,0,o.camera.width,o.camera.height);let l=a.bindTechnique(e,o,h);this._maskParameters.origin=i.origin,l.bindDraw(o,h,this._maskParameters),a.bindVAO(t),a.drawArrays(d.TRIANGLES,0,n)}_clearBuffersOnAccumulationStart(e){if(this._accumulationSets().every(e=>e.progress===0))this._clearFramebuffer();else for(let t of this._accumulationSets())t.progress===0&&this._clearFramebufferForSet(this._fboHandle,t,e)}_accumulateSetsForRenderFrame(e,t){let n=!1;for(let r of this._accumulationSets())this._accumulateSet(r,e,t),n=!0;return n&&this.requestRender(1),n}_accumulateSet(e,t,n){let r=t?Math.min(j,e.sampleCount)-e.progress:e.sampleCount-e.progress;for(let t=0;t<r;++t)this._accumulateShadow(e,n)}_updateMask(){this.accumulationRenderer?.setStencilMask(this._fboHandle?.getAttachment(f))}setParameters(e){e.previewing!==void 0&&(this._previewing=e.previewing),e.lightDirections!==void 0&&(this._primarySet.lightDirections=e.lightDirections),e.lightDirectionsContext!==void 0&&(this._contextSet.lightDirections=e.lightDirectionsContext),e.enabled===!0?this._enable():e.enabled===!1&&this._disable(),e.analysisVolume!==void 0&&(this._analysisVolume=e.analysisVolume),this.accumulationRenderer?.setOptions(e)}readAccumulatedShadow(e,t){let n=this._primarySet.progress;return!this.active||!this._fboHandle||n<1||e<0||e>=this._fboHandle.fbo.width||t<0||t>=this._fboHandle.fbo.height?0:(this._fboHandle.fbo.readPixels(e,t,1,1,6408,p.UNSIGNED_BYTE,M),M[0]/n)}_updateCamera(){if(!this.active)return;let e=this.bindParameters.camera,t=this._accumulationBindParameters.camera;e.equals(t)||t.copyFrom(e),this._isAccumulationValid(e)||(this._fboHandle?.release(),this._fboHandle=this._createFBO(e.fullWidth,e.fullHeight),this._reset()),this.accumulationRenderer?.setOpacityFromElevation(e.relativeElevation)}_numActiveChanged(){if(!this._enabled||!this._fboHandle)return;let e=this._numActive===2,{width:t,height:n}=this._fboHandle.fbo,r=this._createFBO(t,n);e&&(this._clearFramebuffer(r),this._contextSet.reset()),this._rctx.blitFramebuffer(this._fboHandle.fbo,r.fbo),this._fboHandle.dispose(),this._fboHandle=r,this.requestRender(1)}_enable(){this._enabled||(this._enabled=!0,this._invalidateAccumulationSets())}_disable(){this._enabled&&(this._fboHandle=s(this._fboHandle),this._enabled=!1,this.requestRender(1))}_createFBO(e,t){return this.fboCache.acquire(e,t,this.produces,this._colorFormat)}_invalidateAccumulationSets(){for(let e of this._accumulationSets())e.reset();this._requestRenderIfEnabled()}_reset(){for(let e of this._accumulationSets())e.reset()}_clearFramebuffer(e=this._fboHandle){e&&(this._rctx.bindFramebuffer(e.fbo),this._rctx.setClearColor(0,0,0,0),this._rctx.clear(16384))}_clearFramebufferForSet(e,t,n){if(!e)return;let r=this.techniques.get(O,t.configuration);this._rctx.bindFramebuffer(e.fbo),this._rctx.bindTechnique(r,n,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(r.primitiveType,0,this._vao.vertexCount(`geometry`))}_accumulateShadow(e,t){this.view.stage.renderer.renderShadowAccumulationShadowMap(t.camera,t.contentCamera,this._accumulationBindParameters.shadowMap,e.lightDirections[e.progress++],this._depthRange);let n=this.techniques.get(E,e.configuration);this._rctx.bindFramebuffer(this._fboHandle?.fbo),this._rctx.bindTechnique(n,t,this._passParameters),this._rctx.bindVAO(this._vao),this._rctx.drawArrays(n.primitiveType,0,this._vao.vertexCount(`geometry`))}_isAccumulationValid(e){return this._fboHandle?.fbo.width===e.fullWidth&&this._fboHandle?.fbo.height===e.fullHeight}_requestRenderIfEnabled(){this._enabled&&this.requestRender(1)}get _rctx(){return this.renderingContext}updateDepthRange(e){this._depthRange.equals(e)||(this._depthRange=e,this._invalidateAccumulationSets())}get test(){}};e([t()],A.prototype,`consumes`,void 0),e([t()],A.prototype,`produces`,void 0),e([t()],A.prototype,`_refining`,null),e([t()],A.prototype,`active`,null),e([t()],A.prototype,`_doneAccumulating`,null),e([t()],A.prototype,`_numActive`,null),e([t()],A.prototype,`_colorFormat`,null),e([t()],A.prototype,`_depthRange`,void 0),e([t()],A.prototype,`_enabled`,void 0),e([t()],A.prototype,`_previewing`,void 0),e([t()],A.prototype,`accumulationRenderer`,void 0),A=e([n(`esri.views.3d.webgl-engine.effects.shadowAccumulation.ShadowAccumulator`)],A);const j=6,M=new Uint8Array(4);class N{constructor(e,t){this.configuration=e,this._notifyChange=t,this._cachedLightDirections=[],this._progress=u(0),this._sampleCount=u(0)}get progress(){return this._progress.value}set progress(e){this._progress.value=e}get sampleCount(){return this._sampleCount.value}get doneAccumulating(){return this.progress>=this.sampleCount}get running(){return this.progress>0}get active(){return this.sampleCount>0}get lightDirections(){return this._cachedLightDirections}set lightDirections(e){let t=this._cachedLightDirections,n=Math.min(T,e.length);if(!r(t,0,t.length,e,0,n,a)){t.length=n,this._sampleCount.value=n;for(let r=0;r<n;++r)t[r]=i(t[r]??o(),e[r]);this.reset(),this._notifyChange()}}destroy(){this._cachedLightDirections.length=0,this._sampleCount.value=0}reset(){this.progress=0}}export{A as ShadowAccumulator};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{add as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{integerArrayElementBytes as t}from"../../../../core/memoryEstimations.js";import{getContinuousIndexArray as n}from"../../../../geometry/support/Indices.js";import{NullSphere as r,Sphere as i}from"../../../../geometry/support/sphere.js";import{affectsGeometry as a}from"./affectsGeometry.js";import{BoundingInfo as o}from"./BoundingInfo.js";import{BufferGeometryBaseInstance as s}from"./BufferGeometryBaseInstance.js";import{Object3DHighlightStateID as c}from"./Object3DStateID.js";import{assert as l}from"./Util.js";class u extends s{constructor(e,t,n,r=null,i=null){super(t),this.material=e,this.localOrigin=n,this.mapPositions=r,this.baseGeometry=i,this.layerViewUid=null,this.graphicUid=null,this.castShadow=!1,this._readPrimitivePosition=null,this._boundingInfo=null,this._boundingSphere=null,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0;let a=e?.useIndexing??!1,o=t.index!=null,s=i!=null;l(!s||!a&&i.buffers.index==null&&!o,`Instancing for index materials is not supported`),l(!s||t.vertex.count===1,`Instanced BufferGeometry requires exactly one instance`),l(a===o,`Material index requirement and BufferGeometry.buffers.index must match`)}instantiate(e){return new u(e,this._buffers,this.localOrigin,this.mapPositions,this.baseGeometry)}get usedMemoryExcludingBuffers(){return this._boundingInfo?.usedMemory??0}computeBufferMemory(e){return e.arrayMemory(this._buffers.index,t,!0)+e.arrayMemory(this._buffers.storage?.texelElementBuffer)+e.arrayMemory(this.mapPositions)+e.bufferMemory(this._buffers.vertex.buffer)}get indexCount(){return this.baseGeometry?.buffers.indexCount??this._buffers.indexCount??0}get faceCount(){return this.indexCount/3}get readPrimitivePosition(){return this._readPrimitivePosition??=this.material.createPrimitivePositionReader(this.buffers,this.baseGeometry?.buffers),this._readPrimitivePosition}get boundingInfo(){return this._boundingInfo||(this._boundingInfo=this._calculateBoundingInfo(),this._boundingInfo&&this.notifyMemoryChange?.(this._boundingInfo.usedMemory)),this._boundingInfo}get boundingSphere(){let t=this.boundingInfo?.sphere;if(t==null)return r;if(this._boundingSphere==null){let n=new i;n.copyFrom(t),e(n.center,n.center,this.localOrigin.vec3),this._boundingSphere=n}return this._boundingSphere}_calculateBoundingInfo(){let e=this.material.getPrimitivePositionCount(this.buffers,this.baseGeometry?.buffers);if(e===0)return null;let t=this.material.primitiveVertexCount;l(e%t===0,`Indexing error: `+e+` not divisible by `+t);let r=n(e/t);return new o(r,t,this.readPrimitivePosition,e=>this.notifyMemoryChange?.(e))}invalidateBoundingInfo(){let e=this._boundingInfo?.usedMemory??0;this._boundingInfo=null,this._boundingSphere=null,e&&this.notifyMemoryChange?.(-e)}getMutableBuffers(){return this._invalidatePositionCaches(),this._buffers}getMutableVertexField(e,t){let n=this._buffers.vertex.getField(e,t);return n!=null&&a(e)&&this._invalidatePositionCaches(),n}getMutableStorageField(e,t){let n=this._buffers.storage?.getField(e,t);return n!=null&&a(e)&&this._invalidatePositionCaches(),n}_invalidatePositionCaches(){this._readPrimitivePosition=null,this.invalidateBoundingInfo()}computeAttachmentOrigin(t){let n=this.material.getPrimitivePositionCount(this.buffers,this.baseGeometry?.buffers);return this.material.computeAttachmentOrigin(t,this.readPrimitivePosition,n)?(e(t,t,this.localOrigin.vec3),!0):!1}get highlights(){return this._highlights||d}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}forEachHighlightOption(e){this._highlightOptionsCounts?.forEach((t,n)=>e(n))}allocateIdAndHighlight(e){let t=new c(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);let{highlightName:t}=e,n=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,n),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){let{highlightName:t}=e,n=this._highlightOptionsCounts?.get(t)??0;n<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,n-1)}}}const d=new Set;export{u as BufferGeometry};
2
+ import{add as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{integerArrayElementBytes as t}from"../../../../core/memoryEstimations.js";import{getContinuousIndexArray as n}from"../../../../geometry/support/Indices.js";import{NullSphere as r,Sphere as i}from"../../../../geometry/support/sphere.js";import{affectsGeometry as a}from"./affectsGeometry.js";import{BoundingInfo as o}from"./BoundingInfo.js";import{BufferGeometryBaseInstance as s}from"./BufferGeometryBaseInstance.js";import{Object3DHighlightStateID as c}from"./Object3DStateID.js";import{assert as l}from"./Util.js";class u extends s{constructor(e,t,n,r=null,i=null){super(t),this.material=e,this.localOrigin=n,this.mapPositions=r,this.baseGeometry=i,this.layerViewUid=null,this.graphicUid=null,this.castShadows=!1,this._readPrimitivePosition=null,this._boundingInfo=null,this._boundingSphere=null,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0;let a=e?.useIndexing??!1,o=t.index!=null,s=i!=null;l(!s||!a&&i.buffers.index==null&&!o,`Instancing for index materials is not supported`),l(!s||t.vertex.count===1,`Instanced BufferGeometry requires exactly one instance`),l(a===o,`Material index requirement and BufferGeometry.buffers.index must match`)}instantiate(e){return new u(e,this._buffers,this.localOrigin,this.mapPositions,this.baseGeometry)}get usedMemoryExcludingBuffers(){return this._boundingInfo?.usedMemory??0}computeBufferMemory(e){return e.arrayMemory(this._buffers.index,t,!0)+e.arrayMemory(this._buffers.storage?.texelElementBuffer)+e.arrayMemory(this.mapPositions)+e.bufferMemory(this._buffers.vertex.buffer)}get indexCount(){return this.baseGeometry?.buffers.indexCount??this._buffers.indexCount??0}get faceCount(){return this.indexCount/3}get readPrimitivePosition(){return this._readPrimitivePosition??=this.material.createPrimitivePositionReader(this.buffers,this.baseGeometry?.buffers),this._readPrimitivePosition}get boundingInfo(){return this._boundingInfo||(this._boundingInfo=this._calculateBoundingInfo(),this._boundingInfo&&this.notifyMemoryChange?.(this._boundingInfo.usedMemory)),this._boundingInfo}get boundingSphere(){let t=this.boundingInfo?.sphere;if(t==null)return r;if(this._boundingSphere==null){let n=new i;n.copyFrom(t),e(n.center,n.center,this.localOrigin.vec3),this._boundingSphere=n}return this._boundingSphere}_calculateBoundingInfo(){let e=this.material.getPrimitivePositionCount(this.buffers,this.baseGeometry?.buffers);if(e===0)return null;let t=this.material.primitiveVertexCount;l(e%t===0,`Indexing error: `+e+` not divisible by `+t);let r=n(e/t);return new o(r,t,this.readPrimitivePosition,e=>this.notifyMemoryChange?.(e))}invalidateBoundingInfo(){let e=this._boundingInfo?.usedMemory??0;this._boundingInfo=null,this._boundingSphere=null,e&&this.notifyMemoryChange?.(-e)}getMutableBuffers(){return this._invalidatePositionCaches(),this._buffers}getMutableVertexField(e,t){let n=this._buffers.vertex.getField(e,t);return n!=null&&a(e)&&this._invalidatePositionCaches(),n}getMutableStorageField(e,t){let n=this._buffers.storage?.getField(e,t);return n!=null&&a(e)&&this._invalidatePositionCaches(),n}_invalidatePositionCaches(){this._readPrimitivePosition=null,this.invalidateBoundingInfo()}computeAttachmentOrigin(t){let n=this.material.getPrimitivePositionCount(this.buffers,this.baseGeometry?.buffers);return this.material.computeAttachmentOrigin(t,this.readPrimitivePosition,n)?(e(t,t,this.localOrigin.vec3),!0):!1}get highlights(){return this._highlights||d}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}forEachHighlightOption(e){this._highlightOptionsCounts?.forEach((t,n)=>e(n))}allocateIdAndHighlight(e){let t=new c(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);let{highlightName:t}=e,n=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,n),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){let{highlightName:t}=e,n=this._highlightOptionsCounts?.get(t)??0;n<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,n-1)}}}const d=new Set;export{u as BufferGeometry};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{identity as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as t,IDENTITY as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{distance as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{generateUID as i}from"../../../../core/uid.js";import{empty as a,copy as o,offset as s,expandWithAABB as c,center as l,create as u}from"../../../../geometry/support/aaBoundingBox.js";import{addObject3DStateID as d,removeObject3DStateID as f}from"../materials/renderers/utils.js";import{affectsGeometry as p}from"./affectsGeometry.js";import{BoundingVolume as m}from"./BoundingVolume.js";import{Object3DOccludeeStateID as h,Object3DHighlightStateID as g}from"./Object3DStateID.js";import{assert as _}from"./Util.js";class v{constructor(e){this.id=i(),this.type=1,this.lastValidElevationBB=void 0,this._layer=null,this._visible=!0,this._highlightIds=new Set,this._boundingVolume=null,this._geometries=Array.from(e.geometries),this.castShadow=e.castShadow??!1,this.graphicUid=e.graphicUid,this.layerViewUid=e.layerViewUid;for(let e of this._geometries)this._applyObjectProperties(e);e.isElevationSource&&(this.lastValidElevationBB=a())}dispose(){this._geometries.length=0}get geometries(){return this._geometries}addGeometry(e){this._applyObjectProperties(e),this._geometries.push(e);for(let t of this._highlightIds)e.highlights.has(t)||e.addHighlight(t);this._emit(`geometriesChanged`,{object:this,removed:[],added:[e]}),this._highlightIds.size&&this._emit(`highlightChanged`,this),this._invalidateBoundingVolume()}removeGeometry(e){let t=this._geometries.splice(e,1)[0];if(t){for(let e of this._highlightIds)t.removeHighlight(e);this._emit(`geometriesChanged`,{object:this,removed:[t],added:[]}),this._highlightIds.size&&this._emit(`highlightChanged`,this),this._invalidateBoundingVolume()}}removeAllGeometries(){for(;this._geometries.length>0;)this.removeGeometry(0)}_applyObjectProperties(e){e.castShadow=this.castShadow,e.graphicUid=this.graphicUid,e.layerViewUid=this.layerViewUid,e.visible=this._visible}get layer(){return this._layer}set layer(e){_(this._layer==null||e==null,`BufferObject3D can only be added to a single Layer`),this._layer=e}get visible(){return this._visible}set visible(e){if(this._visible!==e){this._visible=e;for(let e of this._geometries)e.visible=this._visible;this._emit(`visibilityChanged`,this)}}_emit(e,t){this.layer?.events.emit(e,t)}maskOccludee(){let e=new h;for(let t of this._geometries)t.occludees=d(t.occludees,e);return this._emit(`occlusionChanged`,this),e}removeOcclude(e){for(let t of this._geometries)t.occludees=f(t.occludees,e);this._emit(`occlusionChanged`,this)}highlight(e){let t=new g(e);for(let e of this._geometries)e.addHighlight(t);return this._highlightIds.add(t),this._emit(`highlightChanged`,this),t}removeHighlight(e){if(this._highlightIds.delete(e)){for(let t of this._geometries)t.removeHighlight(e);this._emit(`highlightChanged`,this)}}removeStateID(e){e.channel===0?this.removeHighlight(e):this.removeOcclude(e)}getCombinedStaticTransformation(t,n){return e(n)}getCombinedShaderTransformation(n,r=t()){return e(r)}get boundingVolumeWorldSpace(){return this._boundingVolume||(this._boundingVolume=new m,this._validateBoundingVolume(this._boundingVolume)),this._boundingVolume}get boundingVolumeObjectSpace(){return this.boundingVolumeWorldSpace}_validateBoundingVolume(e){for(let t of this._geometries){let{boundingInfo:n,localOrigin:r}=t;if(n==null)continue;let[i,a,l]=r.vec3;o(y,n.box),s(y,i,a,l),c(e.box,y)}l(e.box,e.sphere.center);for(let t of this._geometries){let{boundingInfo:n,boundingSphere:i}=t;if(n==null)continue;let a=r(i.center,e.sphere.center);e.sphere.radius=Math.max(e.sphere.radius,a+n.sphere.radius)}}get transformation(){return n}get shaderTransformation(){return null}get effectiveTransformation(){return n}geometryVertexAttributeUpdated(e,t,n=!1){p(t)&&this._invalidateBoundingVolume(),this._emit(`attributesChanged`,{object:this,geometry:e,attribute:t,sync:n})}_invalidateBoundingVolume(){let e=this._boundingVolume?.sphere;this._boundingVolume=void 0,this.layer&&e&&this.layer.notifyObjectBBChanged(this,e)}}const y=u();export{v as BufferObject3D};
2
+ import{identity as e}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as t,IDENTITY as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{distance as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{generateUID as i}from"../../../../core/uid.js";import{empty as a,copy as o,offset as s,expandWithAABB as c,center as l,create as u}from"../../../../geometry/support/aaBoundingBox.js";import{addObject3DStateID as d,removeObject3DStateID as f}from"../materials/renderers/utils.js";import{affectsGeometry as p}from"./affectsGeometry.js";import{BoundingVolume as m}from"./BoundingVolume.js";import{Object3DOccludeeStateID as h,Object3DHighlightStateID as g}from"./Object3DStateID.js";import{assert as _}from"./Util.js";class v{constructor(e){this.id=i(),this.type=1,this.lastValidElevationBB=void 0,this._layer=null,this._visible=!0,this._highlightIds=new Set,this._boundingVolume=null,this._geometries=Array.from(e.geometries),this.castShadows=e.castShadows??!1,this.graphicUid=e.graphicUid,this.layerViewUid=e.layerViewUid;for(let e of this._geometries)this._applyObjectProperties(e);e.isElevationSource&&(this.lastValidElevationBB=a())}dispose(){this._geometries.length=0}get geometries(){return this._geometries}addGeometry(e){this._applyObjectProperties(e),this._geometries.push(e);for(let t of this._highlightIds)e.highlights.has(t)||e.addHighlight(t);this._emit(`geometriesChanged`,{object:this,removed:[],added:[e]}),this._highlightIds.size&&this._emit(`highlightChanged`,this),this._invalidateBoundingVolume()}removeGeometry(e){let t=this._geometries.splice(e,1)[0];if(t){for(let e of this._highlightIds)t.removeHighlight(e);this._emit(`geometriesChanged`,{object:this,removed:[t],added:[]}),this._highlightIds.size&&this._emit(`highlightChanged`,this),this._invalidateBoundingVolume()}}removeAllGeometries(){for(;this._geometries.length>0;)this.removeGeometry(0)}_applyObjectProperties(e){e.castShadows=this.castShadows,e.graphicUid=this.graphicUid,e.layerViewUid=this.layerViewUid,e.visible=this._visible}get layer(){return this._layer}set layer(e){_(this._layer==null||e==null,`BufferObject3D can only be added to a single Layer`),this._layer=e}get visible(){return this._visible}set visible(e){if(this._visible!==e){this._visible=e;for(let e of this._geometries)e.visible=this._visible;this._emit(`visibilityChanged`,this)}}_emit(e,t){this.layer?.events.emit(e,t)}maskOccludee(){let e=new h;for(let t of this._geometries)t.occludees=d(t.occludees,e);return this._emit(`occlusionChanged`,this),e}removeOcclude(e){for(let t of this._geometries)t.occludees=f(t.occludees,e);this._emit(`occlusionChanged`,this)}highlight(e){let t=new g(e);for(let e of this._geometries)e.addHighlight(t);return this._highlightIds.add(t),this._emit(`highlightChanged`,this),t}removeHighlight(e){if(this._highlightIds.delete(e)){for(let t of this._geometries)t.removeHighlight(e);this._emit(`highlightChanged`,this)}}removeStateID(e){e.channel===0?this.removeHighlight(e):this.removeOcclude(e)}getCombinedStaticTransformation(t,n){return e(n)}getCombinedShaderTransformation(n,r=t()){return e(r)}get boundingVolumeWorldSpace(){return this._boundingVolume||(this._boundingVolume=new m,this._validateBoundingVolume(this._boundingVolume)),this._boundingVolume}get boundingVolumeObjectSpace(){return this.boundingVolumeWorldSpace}_validateBoundingVolume(e){for(let t of this._geometries){let{boundingInfo:n,localOrigin:r}=t;if(n==null)continue;let[i,a,l]=r.vec3;o(y,n.box),s(y,i,a,l),c(e.box,y)}l(e.box,e.sphere.center);for(let t of this._geometries){let{boundingInfo:n,boundingSphere:i}=t;if(n==null)continue;let a=r(i.center,e.sphere.center);e.sphere.radius=Math.max(e.sphere.radius,a+n.sphere.radius)}}get transformation(){return n}get shaderTransformation(){return null}get effectiveTransformation(){return n}geometryVertexAttributeUpdated(e,t,n=!1){p(t)&&this._invalidateBoundingVolume(),this._emit(`attributesChanged`,{object:this,geometry:e,attribute:t,sync:n})}_invalidateBoundingVolume(){let e=this._boundingVolume?.sphere;this._boundingVolume=void 0,this.layer&&e&&this.layer.notifyObjectBBChanged(this,e)}}const y=u();export{v as BufferObject3D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"../../../../core/has.js";import{subtract as e,distance as t}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{generateUID as i}from"../../../../core/uid.js";import{getMetersPerUnitForSR as a}from"../../../../core/units.js";import{projectBuffer as o}from"../../../../geometry/projection/projectBuffer.js";import{RibbonLineMaterial as s}from"../materials/RibbonLineMaterial.js";import{Attribute as c}from"./Attribute.js";import{Geometry as l}from"./Geometry.js";import{fromValues as u}from"./LocalOriginFactory.js";import{Object3D as d}from"./Object3D.js";import{gridLocalOriginFactory as f}from"./testUtils.js";import{WebGLLayer as p}from"./WebGLLayer.js";class m{constructor(e){this._originSR=e,this._rootOriginId=`root/`+i(),this._origins=new Map,this._objects=new Map,this._gridSize=5e5,this._originSR?.isGeographic&&(this._gridSize/=a(this._originSR)),this._baselineDistance=this._gridSize*.5;let t=this._baselineDistance*g;this._baselineObjectSize=t/_}getOrigin(t){let n=this._origins.get(this._rootOriginId);if(n==null){let e=f.rootOrigin;if(e!=null)return this._origins.set(this._rootOriginId,u(e[0],e[1],e[2],this._rootOriginId)),this.getOrigin(t);let n=u(t[0],t[1],t[2],this._rootOriginId);return this._origins.set(this._rootOriginId,n),n}let r=this._gridSize,i=Math.round(t[0]/r),a=Math.round(t[1]/r),o=Math.round(t[2]/r),s=`${i}/${a}/${o}`,c=this._origins.get(s),l=r*.5;if(e(h,t,n.vec3),h[0]=Math.abs(h[0]),h[1]=Math.abs(h[1]),h[2]=Math.abs(h[2]),h[0]<l&&h[1]<l&&h[2]<l){if(c){let n=Math.max(...h);if(e(h,t,c.vec3),h[0]=Math.abs(h[0]),h[1]=Math.abs(h[1]),h[2]=Math.abs(h[2]),Math.max(...h)<n)return c}return n}return c||(c=u(i*r,a*r,o*r,s),this._origins.set(s,c)),c}needsOriginUpdate(e,n,r){let i=t(e.vec3,n),a=Math.max(1,r/this._baselineObjectSize);return i>this._baselineDistance*a}_drawOriginBox(e,t=r(1,1,0,1)){let n=window.view,i=n.stage,a=t.toString();if(!this._objects.has(a)){this._material=new s({width:2,color:t},n);let e=new p(i,{pickable:!1}),r=new d({castShadow:!1});e.add(r),this._objects.set(a,r)}let u=this._objects.get(a),f=[0,1,5,4,0,2,1,7,6,2,0,1,3,7,5,4,6,2,0],m=f.length,h=Array(m*3),g=[],_=this._gridSize*.5;for(let t=0;t<m;t++)h[t*3]=e[0]+(f[t]&1?_:-_),h[t*3+1]=e[1]+(f[t]&2?_:-_),h[t*3+2]=e[2]+(f[t]&4?_:-_),t>0&&g.push(t-1,t);o(h,this._originSR,0,h,n.renderSpatialReference,0,m);let v=new l(this._material,[[`position`,new c(h,g,3,!0)]],null);u.addGeometry(v)}get test(){}}const h=n(),g=2**-23,_=.05;export{m as GridLocalOriginFactory};
2
+ import"../../../../core/has.js";import{subtract as e,distance as t}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{generateUID as i}from"../../../../core/uid.js";import{getMetersPerUnitForSR as a}from"../../../../core/units.js";import{projectBuffer as o}from"../../../../geometry/projection/projectBuffer.js";import{RibbonLineMaterial as s}from"../materials/RibbonLineMaterial.js";import{Attribute as c}from"./Attribute.js";import{Geometry as l}from"./Geometry.js";import{fromValues as u}from"./LocalOriginFactory.js";import{Object3D as d}from"./Object3D.js";import{gridLocalOriginFactory as f}from"./testUtils.js";import{WebGLLayer as p}from"./WebGLLayer.js";class m{constructor(e){this._originSR=e,this._rootOriginId=`root/`+i(),this._origins=new Map,this._objects=new Map,this._gridSize=5e5,this._originSR?.isGeographic&&(this._gridSize/=a(this._originSR)),this._baselineDistance=this._gridSize*.5;let t=this._baselineDistance*g;this._baselineObjectSize=t/_}getOrigin(t){let n=this._origins.get(this._rootOriginId);if(n==null){let e=f.rootOrigin;if(e!=null)return this._origins.set(this._rootOriginId,u(e[0],e[1],e[2],this._rootOriginId)),this.getOrigin(t);let n=u(t[0],t[1],t[2],this._rootOriginId);return this._origins.set(this._rootOriginId,n),n}let r=this._gridSize,i=Math.round(t[0]/r),a=Math.round(t[1]/r),o=Math.round(t[2]/r),s=`${i}/${a}/${o}`,c=this._origins.get(s),l=r*.5;if(e(h,t,n.vec3),h[0]=Math.abs(h[0]),h[1]=Math.abs(h[1]),h[2]=Math.abs(h[2]),h[0]<l&&h[1]<l&&h[2]<l){if(c){let n=Math.max(...h);if(e(h,t,c.vec3),h[0]=Math.abs(h[0]),h[1]=Math.abs(h[1]),h[2]=Math.abs(h[2]),Math.max(...h)<n)return c}return n}return c||(c=u(i*r,a*r,o*r,s),this._origins.set(s,c)),c}needsOriginUpdate(e,n,r){let i=t(e.vec3,n),a=Math.max(1,r/this._baselineObjectSize);return i>this._baselineDistance*a}_drawOriginBox(e,t=r(1,1,0,1)){let n=window.view,i=n.stage,a=t.toString();if(!this._objects.has(a)){this._material=new s({width:2,color:t},n);let e=new p(i,{pickable:!1}),r=new d({castShadows:!1});e.add(r),this._objects.set(a,r)}let u=this._objects.get(a),f=[0,1,5,4,0,2,1,7,6,2,0,1,3,7,5,4,6,2,0],m=f.length,h=Array(m*3),g=[],_=this._gridSize*.5;for(let t=0;t<m;t++)h[t*3]=e[0]+(f[t]&1?_:-_),h[t*3+1]=e[1]+(f[t]&2?_:-_),h[t*3+2]=e[2]+(f[t]&4?_:-_),t>0&&g.push(t-1,t);o(h,this._originSR,0,h,n.renderSpatialReference,0,m);let v=new l(this._material,[[`position`,new c(h,g,3,!0)]],null);u.addGeometry(v)}get test(){}}const h=n(),g=2**-23,_=.05;export{m as GridLocalOriginFactory};
@@ -1,2 +1,2 @@
1
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{add as n,transformMat4 as r,copy as i}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as o}from"../../../../geometry/support/frustumPlanes.js";import{create as s,fromPoints as c,copy as l}from"../../../../geometry/support/ray.js";import u from"../../webgl/RenderCamera.js";import{HUDTarget as d,HUDIntersectorResult as f}from"./HUDIntersectorResult.js";import{IntersectorOptions as p}from"./IntersectorInterfaces.js";import{IntersectorResultRay as m,compareOrderedIntersectionHits as h}from"./IntersectorResult.js";import{ObjectTarget as g}from"./ObjectTarget.js";import{PolygonIntersectionResults as _}from"./PolygonIntersectionResults.js";import{IntersectorTransform as v,getVerticalOffsetObject3D as y}from"./verticalOffsetUtils.js";const b=1e-5,x=t();class S{constructor(e){this.options=new p,this._results=new C,this.polygonResults=new _,this.transform=new v,this.camera=new u,this.metersPerRenderUnit=1,this.screenPolygonPrimitiveProcessor=w,this.tolerance=b,this.verticalOffset=null,this._ray=s(),this._rayEnd=a(),this._rayBeginTransformed=a(),this._rayEndTransformed=a(),this.viewingMode=e??1}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(e,t,n){this.resetWithRay(c(e,t,this._ray),n)}resetWithRay(e,t){this.camera=t,e!==this._ray&&l(e,this._ray),this.options.verticalOffset===0?this.verticalOffset=null:this.viewingMode===2?this._ray.origin[2]-=this.options.verticalOffset:this.verticalOffset=this.options.verticalOffset,n(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray),this.polygonResults.init()}intersect(e=null,t,n,r,i){this.point=t,this.filterPredicate=r,this.tolerance=n??b;let a=y(this.verticalOffset);if(e&&e.length>0){let t=i?e=>{i(e)&&this.intersectObject(e)}:e=>{this.intersectObject(e)};for(let n of e){let e=n.getSpatialQueryAccelerator?.();e==null?n.objects.forEach(e=>t(e)):(a==null?e.forEachAlongRay(this._ray.origin,this._ray.direction,t):e.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,t,a),this.options.selectionMode&&this.options.hud&&e.forEachDegenerateObject(t))}}this.sortResults()}*intersectScreenPolygon(e=null,t){if(this.verticalOffset=null,e?.length)for(let n of e){let e=n.getSpatialQueryAccelerator?.();if(e!=null)for(let n of e.intersectingFrustumValues(t.broadPhaseFrustum,e=>e.visible))yield*this._intersectScreenPolygonObject(n,t);else for(let e of n.objects.values())e.visible&&o(t.broadPhaseFrustum,e.boundingVolumeWorldSpace.sphere)&&(yield*this._intersectScreenPolygonObject(e,t))}}*intersectHUDScreenPolygon(e=null,t){if(this.verticalOffset=null,this.options.selectionMode&&this.options.hud&&e?.length)for(let n of e){let e=(n.getSpatialQueryAccelerator?.())?.degenerateObjectValues()??n.objects.values();for(let n of e)yield*this._intersectScreenPolygonObject(n,t)}}*_intersectScreenPolygonObject(e,t){let n=e.geometries;if(!e.visible||!n)return;let r=e.effectiveTransformation;for(let i of n){if(!i.visible)continue;let{material:n,id:a}=i;if(!n.visible||!n.intersectScreenPolygon)continue;this._setGeometryTransform(r,i);let o=n.intersectScreenPolygon(i,this.transform.transform,this,t);o?.valid&&this._handleObjectScreenPolygonIntersection(o.type,new g(e,a,o.primitiveIndex),o.distance,o.renderDistance,o.point),yield}}intersectObject(e){let t=e.geometries;if(!t)return;let n=e.effectiveTransformation,i=y(this.verticalOffset);for(let a of t){if(!a.visible)continue;let{material:t,id:o}=a;if(!t.visible)continue;this._setGeometryTransform(n,a),r(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),r(this._rayEndTransformed,this.rayEnd,this.transform.inverse);let s=this.transform.transform;i!=null&&(i.objectTransform=this.transform),t.intersectRay(a,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,(t,n,r,i,a)=>this.handleObjectIntersection({object:e,geometryId:o,primitiveIndex:i},t,n,r,s,a))}}_setGeometryTransform(t,n){let r=n.type===1?e(x,n.localOrigin.vec3):n.transformation;this.transform.setAndInvalidateLazyTransforms(t,r)}handleObjectIntersection(e,t,n,r,i,a){if(t<0||this.filterPredicate!=null&&!this.filterPredicate(this._ray.origin,this._rayEnd,n))return;let o=a?this._results.hud:this._results;e=a?new d(e,a):e;let s=a?i=>i.set(1,e,t,n,r):a=>a.set(4,e,t,n,r,i);if((o.min.renderDistance==null||n<o.min.renderDistance)&&s(o.min),this.options.store!==0&&(o.max.renderDistance==null||n>o.max.renderDistance)&&s(o.max),this.options.store===2){if(a){let e=new f(this._ray);s(e),this._results.hud.all.push(e)}else{let e=new m(this._ray);s(e),this._results.all.push(e)}}}_handleObjectScreenPolygonIntersection(e,t,n,r,i){n<0||(this.filterPredicate==null||i!=null&&this.filterPredicate(this.camera.eye,i,1))&&this.polygonResults.add(e,e===1&&i?new d(t,i):t,n,r)}sortResults(e=this._results.all){e.sort(h)}}class C{constructor(){this.min=new m(s()),this.max=new m(s()),this.hud={min:new f(s()),max:new f(s()),all:[]},this.ground=new m(s()),this.all=[]}init(e){this.min.init(e),this.max.init(e),this.ground.init(e),this.all.length=0,this.hud.min.init(e),this.hud.max.init(e),this.hud.all.length=0}}const w={*processTriangle(e){yield e},*processLineSegment(e,t,n){i(e[0],t),i(e[1],n),yield e},validatePoint(){return!0}};export{S as Intersector,w as defaultScreenPolygonPrimitiveProcessor,b as defaultTolerance};
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{add as n,transformMat4 as r,copy as i}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as o}from"../../../../geometry/support/frustumPlanes.js";import{create as s,fromPoints as c,copy as l}from"../../../../geometry/support/ray.js";import u from"../../webgl/RenderCamera.js";import{HUDTarget as d,HUDIntersectorResult as f}from"./HUDIntersectorResult.js";import{IntersectorOptions as p}from"./IntersectorInterfaces.js";import{IntersectorResultRay as m,compareOrderedIntersectionHits as h}from"./IntersectorResult.js";import{ObjectTarget as g}from"./ObjectTarget.js";import{PolygonIntersectionResults as _}from"./PolygonIntersectionResults.js";import{IntersectorTransform as v,getVerticalOffsetObject3D as y}from"./verticalOffsetUtils.js";const b=1e-5,x=t();class S{constructor(e){this.isGlobal=e,this.options=new p,this._results=new C,this.polygonResults=new _,this.transform=new v,this.camera=new u,this.metersPerRenderUnit=1,this.screenPolygonPrimitiveProcessor=w,this.tolerance=b,this.verticalOffset=null,this._ray=s(),this._rayEnd=a(),this._rayBeginTransformed=a(),this._rayEndTransformed=a()}get results(){return this._results}get ray(){return this._ray}get rayBegin(){return this._ray.origin}get rayEnd(){return this._rayEnd}reset(e,t,n){this.resetWithRay(c(e,t,this._ray),n)}resetWithRay(e,t){this.camera=t,e!==this._ray&&l(e,this._ray),this.options.verticalOffset===0?this.verticalOffset=null:this.isGlobal?this.verticalOffset=this.options.verticalOffset:this._ray.origin[2]-=this.options.verticalOffset,n(this._rayEnd,this._ray.origin,this._ray.direction),this._results.init(this._ray),this.polygonResults.init()}intersect(e=null,t,n,r,i){this.point=t,this.filterPredicate=r,this.tolerance=n??b;let a=y(this.verticalOffset);if(e&&e.length>0){let t=i?e=>{i(e)&&this.intersectObject(e)}:e=>{this.intersectObject(e)};for(let n of e){let e=n.getSpatialQueryAccelerator?.();e==null?n.objects.forEach(e=>t(e)):(a==null?e.forEachAlongRay(this._ray.origin,this._ray.direction,t):e.forEachAlongRayWithVerticalOffset(this._ray.origin,this._ray.direction,t,a),this.options.selectionMode&&this.options.hud&&e.forEachDegenerateObject(t))}}this.sortResults()}*intersectScreenPolygon(e=null,t){if(this.verticalOffset=null,e?.length)for(let n of e){let e=n.getSpatialQueryAccelerator?.();if(e!=null)for(let n of e.intersectingFrustumValues(t.broadPhaseFrustum,e=>e.visible))yield*this._intersectScreenPolygonObject(n,t);else for(let e of n.objects.values())e.visible&&o(t.broadPhaseFrustum,e.boundingVolumeWorldSpace.sphere)&&(yield*this._intersectScreenPolygonObject(e,t))}}*intersectHUDScreenPolygon(e=null,t){if(this.verticalOffset=null,this.options.selectionMode&&this.options.hud&&e?.length)for(let n of e){let e=(n.getSpatialQueryAccelerator?.())?.degenerateObjectValues()??n.objects.values();for(let n of e)yield*this._intersectScreenPolygonObject(n,t)}}*_intersectScreenPolygonObject(e,t){let n=e.geometries;if(!e.visible||!n)return;let r=e.effectiveTransformation;for(let i of n){if(!i.visible)continue;let{material:n,id:a}=i;if(!n.visible||!n.intersectScreenPolygon)continue;this._setGeometryTransform(r,i);let o=n.intersectScreenPolygon(i,this.transform.transform,this,t);o?.valid&&this._handleObjectScreenPolygonIntersection(o.type,new g(e,a,o.primitiveIndex),o.distance,o.renderDistance,o.point),yield}}intersectObject(e){let t=e.geometries;if(!t)return;let n=e.effectiveTransformation,i=y(this.verticalOffset);for(let a of t){if(!a.visible)continue;let{material:t,id:o}=a;if(!t.visible)continue;this._setGeometryTransform(n,a),r(this._rayBeginTransformed,this.rayBegin,this.transform.inverse),r(this._rayEndTransformed,this.rayEnd,this.transform.inverse);let s=this.transform.transform;i!=null&&(i.objectTransform=this.transform),t.intersectRay(a,this.transform.transform,this,this._rayBeginTransformed,this._rayEndTransformed,(t,n,r,i,a)=>this.handleObjectIntersection({object:e,geometryId:o,primitiveIndex:i},t,n,r,s,a))}}_setGeometryTransform(t,n){let r=n.type===1?e(x,n.localOrigin.vec3):n.transformation;this.transform.setAndInvalidateLazyTransforms(t,r)}handleObjectIntersection(e,t,n,r,i,a){if(t<0||this.filterPredicate!=null&&!this.filterPredicate(this._ray.origin,this._rayEnd,n))return;let o=a?this._results.hud:this._results;e=a?new d(e,a):e;let s=a?i=>i.set(1,e,t,n,r):a=>a.set(4,e,t,n,r,i);if((o.min.renderDistance==null||n<o.min.renderDistance)&&s(o.min),this.options.store!==0&&(o.max.renderDistance==null||n>o.max.renderDistance)&&s(o.max),this.options.store===2){if(a){let e=new f(this._ray);s(e),this._results.hud.all.push(e)}else{let e=new m(this._ray);s(e),this._results.all.push(e)}}}_handleObjectScreenPolygonIntersection(e,t,n,r,i){n<0||(this.filterPredicate==null||i!=null&&this.filterPredicate(this.camera.eye,i,1))&&this.polygonResults.add(e,e===1&&i?new d(t,i):t,n,r)}sortResults(e=this._results.all){e.sort(h)}}class C{constructor(){this.min=new m(s()),this.max=new m(s()),this.hud={min:new f(s()),max:new f(s()),all:[]},this.ground=new m(s()),this.all=[]}init(e){this.min.init(e),this.max.init(e),this.ground.init(e),this.all.length=0,this.hud.min.init(e),this.hud.max.init(e),this.hud.all.length=0}}const w={*processTriangle(e){yield e},*processLineSegment(e,t,n){i(e[0],t),i(e[1],n),yield e},validatePoint(){return!0}};export{S as Intersector,w as defaultScreenPolygonPrimitiveProcessor,b as defaultTolerance};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"../../../../core/has.js";import{multiply as e,copy as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n,IDENTITY as r}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as i,distance as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{generateUID as s}from"../../../../core/uid.js";import{empty as c,center as l}from"../../../../geometry/support/aaBoundingBox.js";import{maxScale as u}from"../../support/mathUtils.js";import{addObject3DStateID as d,removeObject3DStateID as f}from"../materials/renderers/utils.js";import{affectsGeometry as p}from"./affectsGeometry.js";import{BoundingVolume as m,expandWithTransformedBox as h}from"./BoundingVolume.js";import{Object3DOccludeeStateID as g,Object3DHighlightStateID as _}from"./Object3DStateID.js";import{assert as v}from"./Util.js";class y{constructor(e={}){this.id=s(),this.type=0,this._highlightIds=new Set,this._shaderTransformation=null,this._visible=!0,this.castShadow=e.castShadow??!0,this.graphicUid=e.graphicUid,this.layerViewUid=e.layerViewUid,e.isElevationSource&&(this.lastValidElevationBB=c()),this._geometries=e.geometries?Array.from(e.geometries):[]}dispose(){this._geometries.length=0}get layer(){return this._layer}set layer(e){v(this._layer==null||e==null,`Object3D can only be added to a single Layer`),this._layer=e}addGeometry(e){e.visible=this._visible,this._geometries.push(e);for(let t of this._highlightIds)e.addHighlight(t);this._emit(`geometriesChanged`,{object:this,removed:[],added:[e]}),this._highlightIds.size&&this._emit(`highlightChanged`,this),this._invalidateBoundingVolume()}removeGeometry(e){let t=this._geometries.splice(e,1)[0];if(t){for(let e of this._highlightIds)t.removeHighlight(e);this._emit(`geometriesChanged`,{object:this,removed:[t],added:[]}),this._highlightIds.size&&this._emit(`highlightChanged`,this),this._invalidateBoundingVolume()}}removeAllGeometries(){for(;this._geometries.length>0;)this.removeGeometry(0)}replaceGeometries(e){let t=this._geometries,n=Array.from(e);for(let e of t)for(let t of this._highlightIds)e.removeHighlight(t);for(let e of n){e.visible=this._visible;for(let t of this._highlightIds)e.addHighlight(t)}this._geometries=n,this._invalidateBoundingVolume(),this._emit(`geometriesChanged`,{object:this,removed:t,added:n}),this._highlightIds.size&&this._emit(`highlightChanged`,this)}geometryVertexAttributeUpdated(e,t,n=!1){this._emit(`attributesChanged`,{object:this,geometry:e,attribute:t,sync:n}),p(t)&&this._invalidateBoundingVolume()}get visible(){return this._visible}set visible(e){if(this._visible!==e){this._visible=e;for(let e of this._geometries)e.visible=this._visible;this._emit(`visibilityChanged`,this)}}maskOccludee(){let e=new g;for(let t of this._geometries)t.occludees=d(t.occludees,e);return this._emit(`occlusionChanged`,this),e}removeOcclude(e){for(let t of this._geometries)t.occludees=f(t.occludees,e);this._emit(`occlusionChanged`,this)}highlight(e){let t=new _(e);for(let e of this._geometries)e.addHighlight(t);return this._emit(`highlightChanged`,this),this._highlightIds.add(t),t}removeHighlight(e){this._highlightIds.delete(e);for(let t of this._geometries)t.removeHighlight(e);this._emit(`highlightChanged`,this)}removeStateID(e){e.channel===0?this.removeHighlight(e):this.removeOcclude(e)}getCombinedStaticTransformation(t,n){return e(n,this.transformation,t.transformation)}getCombinedShaderTransformation(t,r=n()){return e(r,this.effectiveTransformation,t.transformation)}get boundingVolumeWorldSpace(){return this._bvWorldSpace||(this._bvWorldSpace=new m,this._validateBoundingVolume(this._bvWorldSpace,0)),this._bvWorldSpace}get boundingVolumeObjectSpace(){return this._bvObjectSpace||(this._bvObjectSpace=new m,this._validateBoundingVolume(this._bvObjectSpace,1)),this._bvObjectSpace}_validateBoundingVolume(e,t){let n=t===1;for(let t of this._geometries){let r=t.boundingInfo;r&&h(e.box,r.box,n?t.transformation:this.getCombinedShaderTransformation(t))}l(e.box,e.sphere.center);for(let t of this._geometries){let r=t.boundingInfo;if(r==null)continue;let o=n?t.transformation:this.getCombinedShaderTransformation(t),s=u(o);i(b,r.sphere.center,o);let c=a(b,e.sphere.center),l=r.sphere.radius*s;e.sphere.radius=Math.max(e.sphere.radius,c+l)}}_invalidateBoundingVolume(){let e=this._bvWorldSpace?.sphere;this._bvObjectSpace=this._bvWorldSpace=void 0,this.layer&&e&&this.layer.notifyObjectBBChanged(this,e)}_emit(e,t){this.layer?.events.emit(e,t)}get geometries(){return this._geometries}get transformation(){return this._transformation??r}set transformation(e){this._transformation=t(this._transformation??n(),e),this._invalidateBoundingVolume(),this._emit(`transformationChanged`,this)}get shaderTransformation(){return this._shaderTransformation}set shaderTransformation(e){this._shaderTransformation=e?t(this._shaderTransformation??n(),e):null,this._invalidateBoundingVolume(),this._emit(`shaderTransformationChanged`,this)}get effectiveTransformation(){return this.shaderTransformation??this.transformation}get test(){}}const b=o();export{y as Object3D};
2
+ import"../../../../core/has.js";import{multiply as e,copy as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n,IDENTITY as r}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as i,distance as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{generateUID as s}from"../../../../core/uid.js";import{empty as c,center as l}from"../../../../geometry/support/aaBoundingBox.js";import{maxScale as u}from"../../support/mathUtils.js";import{addObject3DStateID as d,removeObject3DStateID as f}from"../materials/renderers/utils.js";import{affectsGeometry as p}from"./affectsGeometry.js";import{BoundingVolume as m,expandWithTransformedBox as h}from"./BoundingVolume.js";import{Object3DOccludeeStateID as g,Object3DHighlightStateID as _}from"./Object3DStateID.js";import{assert as v}from"./Util.js";class y{constructor(e={}){this.id=s(),this.type=0,this._highlightIds=new Set,this._shaderTransformation=null,this._visible=!0,this.castShadows=e.castShadows??!0,this.graphicUid=e.graphicUid,this.layerViewUid=e.layerViewUid,e.isElevationSource&&(this.lastValidElevationBB=c()),this._geometries=e.geometries?Array.from(e.geometries):[]}dispose(){this._geometries.length=0}get layer(){return this._layer}set layer(e){v(this._layer==null||e==null,`Object3D can only be added to a single Layer`),this._layer=e}addGeometry(e){e.visible=this._visible,this._geometries.push(e);for(let t of this._highlightIds)e.addHighlight(t);this._emit(`geometriesChanged`,{object:this,removed:[],added:[e]}),this._highlightIds.size&&this._emit(`highlightChanged`,this),this._invalidateBoundingVolume()}removeGeometry(e){let t=this._geometries.splice(e,1)[0];if(t){for(let e of this._highlightIds)t.removeHighlight(e);this._emit(`geometriesChanged`,{object:this,removed:[t],added:[]}),this._highlightIds.size&&this._emit(`highlightChanged`,this),this._invalidateBoundingVolume()}}removeAllGeometries(){for(;this._geometries.length>0;)this.removeGeometry(0)}replaceGeometries(e){let t=this._geometries,n=Array.from(e);for(let e of t)for(let t of this._highlightIds)e.removeHighlight(t);for(let e of n){e.visible=this._visible;for(let t of this._highlightIds)e.addHighlight(t)}this._geometries=n,this._invalidateBoundingVolume(),this._emit(`geometriesChanged`,{object:this,removed:t,added:n}),this._highlightIds.size&&this._emit(`highlightChanged`,this)}geometryVertexAttributeUpdated(e,t,n=!1){this._emit(`attributesChanged`,{object:this,geometry:e,attribute:t,sync:n}),p(t)&&this._invalidateBoundingVolume()}get visible(){return this._visible}set visible(e){if(this._visible!==e){this._visible=e;for(let e of this._geometries)e.visible=this._visible;this._emit(`visibilityChanged`,this)}}maskOccludee(){let e=new g;for(let t of this._geometries)t.occludees=d(t.occludees,e);return this._emit(`occlusionChanged`,this),e}removeOcclude(e){for(let t of this._geometries)t.occludees=f(t.occludees,e);this._emit(`occlusionChanged`,this)}highlight(e){let t=new _(e);for(let e of this._geometries)e.addHighlight(t);return this._emit(`highlightChanged`,this),this._highlightIds.add(t),t}removeHighlight(e){this._highlightIds.delete(e);for(let t of this._geometries)t.removeHighlight(e);this._emit(`highlightChanged`,this)}removeStateID(e){e.channel===0?this.removeHighlight(e):this.removeOcclude(e)}getCombinedStaticTransformation(t,n){return e(n,this.transformation,t.transformation)}getCombinedShaderTransformation(t,r=n()){return e(r,this.effectiveTransformation,t.transformation)}get boundingVolumeWorldSpace(){return this._bvWorldSpace||(this._bvWorldSpace=new m,this._validateBoundingVolume(this._bvWorldSpace,0)),this._bvWorldSpace}get boundingVolumeObjectSpace(){return this._bvObjectSpace||(this._bvObjectSpace=new m,this._validateBoundingVolume(this._bvObjectSpace,1)),this._bvObjectSpace}_validateBoundingVolume(e,t){let n=t===1;for(let t of this._geometries){let r=t.boundingInfo;r&&h(e.box,r.box,n?t.transformation:this.getCombinedShaderTransformation(t))}l(e.box,e.sphere.center);for(let t of this._geometries){let r=t.boundingInfo;if(r==null)continue;let o=n?t.transformation:this.getCombinedShaderTransformation(t),s=u(o);i(b,r.sphere.center,o);let c=a(b,e.sphere.center),l=r.sphere.radius*s;e.sphere.radius=Math.max(e.sphere.radius,c+l)}}_invalidateBoundingVolume(){let e=this._bvWorldSpace?.sphere;this._bvObjectSpace=this._bvWorldSpace=void 0,this.layer&&e&&this.layer.notifyObjectBBChanged(this,e)}_emit(e,t){this.layer?.events.emit(e,t)}get geometries(){return this._geometries}get transformation(){return this._transformation??r}set transformation(e){this._transformation=t(this._transformation??n(),e),this._invalidateBoundingVolume(),this._emit(`transformationChanged`,this)}get shaderTransformation(){return this._shaderTransformation}set shaderTransformation(e){this._shaderTransformation=e?t(this._shaderTransformation??n(),e):null,this._invalidateBoundingVolume(),this._emit(`shaderTransformationChanged`,this)}get effectiveTransformation(){return this.shaderTransformation??this.transformation}get test(){}}const b=o();export{y as Object3D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"../../../../core/has.js";import e from"../../../../core/Logger.js";import{webglDebugEnabled as t}from"../../../webgl/checkWebGLError.js";import{debugFlags as n}from"../../support/debugFlags.js";class r{constructor(n,r,i){this._context=n,this.locations=i,this._textures=new Map,this.source=t()?r:null,r.attributeNames.forEach(t=>{i.has(t)||e.getLogger(`esri.views.3d.webgl-engine.lib.Program`).error(`Missing VertexAttributeLocation for ${t} used in shader`)}),this._glProgram=n.programCache.get(r.generate(`vertex`,!0),r.generate(`fragment`,!0),i),this._glProgram.stop=()=>{throw Error(`Wrapped _glProgram used directly`)},this.bind=r.generateBind(this),this.bindPass=r.generateBindPass(this),this.bindDraw=r.generateBindDraw(this)}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,+!!t)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t,n){this._glProgram.setUniform1f(e,t,n)}setUniform2fv(e,t,n){this._glProgram.setUniform2fv(e,t,n)}setUniform3fv(e,t,n){this._glProgram.setUniform3fv(e,t,n)}setUniform4fv(e,t,n){this._glProgram.setUniform4fv(e,t,n)}setUniformMatrix3fv(e,t,n){this._glProgram.setUniformMatrix3fv(e,t,!1,n)}setUniformMatrix4fv(e,t,n){this._glProgram.setUniformMatrix4fv(e,t,!1,n)}setUniformMatrices4fv(e,t,n){this._glProgram.setUniformMatrices4fv(e,t,!1,n)}setUniform1fv(e,t,n){this._glProgram.setUniform1fv(e,t,n)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e,t){if(n.ENABLE_OPTIMIZATIONS)return;let r=e.locations;if(t){let e=new Map(r);t.forEach((t,n)=>e.set(n,r.size+t)),r=e}this.locations.forEach((e,t)=>{r.get(t)!==e&&console.error(`VertexAttributeLocations are incompatible: Program has ${t} at position ${e}, VAO has it at position ${r.get(t)}.`)})}stop(){this._textures.clear()}bindTexture(e,n,r){if(!n?.glName){let r=`Texture sampler ${e} in ${this._context.debugBoundTechnique} has no given Texture in ${Error().stack}`;t()&&console.error(r),n=this._context.emptyTexture}let i=this._ensureTextureUnit(e,n);this._context.useProgram(this);let a=i.unit;this.setUniform1i(e,a),this._context.bindTexture(n,a,!1,r)}_ensureTextureUnit(e,t){let n=this._textures.get(e);return n==null?(n={texture:t,unit:this._textures.size},this._textures.set(e,n)):n.texture=t,n}}export{r as Program};
2
+ import"../../../../core/has.js";import e from"../../../../core/Logger.js";import{webglDebugEnabled as t}from"../../../webgl/checkWebGLError.js";import{debugFlags as n}from"../../support/debugFlags.js";class r{constructor(n,r,i){this._context=n,this.locations=i,this._textures=new Map,this.source=t()?r:null,r.attributeNames.forEach(t=>{i.has(t)||e.getLogger(`esri.views.3d.webgl-engine.lib.Program`).error(`Missing VertexAttributeLocation for ${t} used in shader`)}),this._glProgram=n.programCache.get(r.generate(`vertex`,!0),r.generate(`fragment`,!0),i),this._glProgram.stop=()=>{throw Error(`Wrapped _glProgram used directly`)},this.bind=r.generateBind(this),this.bindPass=r.generateBindPass(this),this.bindDraw=r.generateBindDraw(this)}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}hasUniform(e){return this._glProgram.hasUniform(e)}setUniform1b(e,t){this._glProgram.setUniform1i(e,+!!t)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t,n){this._glProgram.setUniform1f(e,t,n)}setUniform2fv(e,t,n){this._glProgram.setUniform2fv(e,t,n)}setUniform3fv(e,t,n){this._glProgram.setUniform3fv(e,t,n)}setUniform4fv(e,t,n){this._glProgram.setUniform4fv(e,t,n)}setUniformMatrix3fv(e,t,n){this._glProgram.setUniformMatrix3fv(e,t,!1,n)}setUniformMatrix4fv(e,t,n){this._glProgram.setUniformMatrix4fv(e,t,!1,n)}setUniformMatrices4fv(e,t,n){this._glProgram.setUniformMatrices4fv(e,t,!1,n)}setUniform1fv(e,t,n){this._glProgram.setUniform1fv(e,t,n)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e,t){if(n.ENABLE_OPTIMIZATIONS)return;let r=e.locations;if(t){let e=new Map(r);t.forEach((t,n)=>e.set(n,r.size+t)),r=e}this.locations.forEach((e,t)=>{r.get(t)!==e&&console.error(`VertexAttributeLocations are incompatible: Program has ${t} at position ${e}, VAO has it at position ${r.get(t)}.`)})}stop(){this._textures.clear()}bindTexture(e,n,r){if(!n?.glName){let r=`Texture sampler ${e} in ${this._context.debugBoundTechnique} has no given Texture in ${Error().stack}`;t()&&console.error(r),n=this._context.emptyTexture}let i=this._ensureTextureUnit(e,n);this._context.useProgram(this);let a=i.unit;this.setUniform1i(e,a),this._context.bindTexture(n,a,!1,r)}_ensureTextureUnit(e,t){let n=this._textures.get(e);return n==null?(n={texture:t,unit:this._textures.size},this._textures.set(e,n)):n.texture=t,n}}export{r as Program};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{copy as e,multiply as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{generateUID as i}from"../../../../core/uid.js";import{NullSphere as a,Sphere as o}from"../../../../geometry/support/sphere.js";import{maxScale as s}from"../../support/mathUtils.js";class c{get type(){return 0}constructor(e,t={}){this.geometry=e,this._transformation=n(),this._shaderTransformation=null,this._boundingSphere=null,this.id=i(),this.layerViewUid=t.layerViewUid,this.graphicUid=t.graphicUid,this.castShadow=t.castShadow??!1,t.objectShaderTransformation&&this.objectShaderTransformationChanged(t.objectShaderTransformation)}get indexCount(){return this.geometry.indexCount}get faceCount(){return this.geometry.faceCount}get transformation(){return this._transformation}set transformation(t){e(this._transformation,t),this._boundingSphere=null}get boundingInfo(){return this.geometry.boundingInfo}objectShaderTransformationChanged(e){e==null?this._shaderTransformation=null:(this._shaderTransformation??=n(),t(this._shaderTransformation,e,this.geometry.transformation)),this._boundingSphere=null}get boundingSphere(){return this.boundingInfo?(this._boundingSphere??(this._boundingSphere??=new o,r(this._boundingSphere.center,this.boundingInfo.sphere.center,this.shaderTransformation),this._boundingSphere.radius=this.boundingInfo.sphere.radius*s(this.shaderTransformation)),this._boundingSphere):a}get material(){return this.geometry.material}get shaderTransformation(){return this._shaderTransformation??this.transformation}get attributes(){return this.geometry.attributes}forEachHighlightOption(e){this.geometry.forEachHighlightOption(e)}get hasHighlights(){return this.geometry.hasHighlights}get occludees(){return this.geometry.occludees}get visible(){return this.geometry.visible}set visible(e){this.geometry.visible=e}get readPrimitivePosition(){return this.geometry.readPrimitivePosition}}class l extends c{}export{c as RenderGeometry,l as ValidatedRenderGeometry};
2
+ import{copy as e,multiply as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{transformMat4 as r}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{generateUID as i}from"../../../../core/uid.js";import{NullSphere as a,Sphere as o}from"../../../../geometry/support/sphere.js";import{maxScale as s}from"../../support/mathUtils.js";class c{get type(){return 0}constructor(e,t={}){this.geometry=e,this._transformation=n(),this._shaderTransformation=null,this._boundingSphere=null,this.id=i(),this.layerViewUid=t.layerViewUid,this.graphicUid=t.graphicUid,this.castShadows=t.castShadows??!1,t.objectShaderTransformation&&this.objectShaderTransformationChanged(t.objectShaderTransformation)}get indexCount(){return this.geometry.indexCount}get faceCount(){return this.geometry.faceCount}get transformation(){return this._transformation}set transformation(t){e(this._transformation,t),this._boundingSphere=null}get boundingInfo(){return this.geometry.boundingInfo}objectShaderTransformationChanged(e){e==null?this._shaderTransformation=null:(this._shaderTransformation??=n(),t(this._shaderTransformation,e,this.geometry.transformation)),this._boundingSphere=null}get boundingSphere(){return this.boundingInfo?(this._boundingSphere??(this._boundingSphere??=new o,r(this._boundingSphere.center,this.boundingInfo.sphere.center,this.shaderTransformation),this._boundingSphere.radius=this.boundingInfo.sphere.radius*s(this.shaderTransformation)),this._boundingSphere):a}get material(){return this.geometry.material}get shaderTransformation(){return this._shaderTransformation??this.transformation}get attributes(){return this.geometry.attributes}forEachHighlightOption(e){this.geometry.forEachHighlightOption(e)}get hasHighlights(){return this.geometry.hasHighlights}get occludees(){return this.geometry.occludees}get visible(){return this.geometry.visible}set visible(e){this.geometry.visible=e}get readPrimitivePosition(){return this.geometry.readPrimitivePosition}}class l extends c{}export{c as RenderGeometry,l as ValidatedRenderGeometry};