@arcgis/core 5.0.0-next.16 → 5.0.0-next.17

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 (182) hide show
  1. package/analysis/ElevationProfile/ElevationProfileLineInput.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/234b52b2a391631ceff6.js +1 -0
  4. package/assets/esri/core/workers/chunks/{8f3503b2fb6cd38757b9.js → 458e87902abc24b375da.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{57b410198d83bf0ab708.js → 4a89e120be142ab58a27.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{a410dcf80d17a2383337.js → 65a4099bdbe31834d0cc.js} +1 -1
  7. package/assets/esri/core/workers/chunks/722da7a39a0ad9300752.js +1 -0
  8. package/assets/esri/core/workers/chunks/{cdb4664fd59860ddeb5a.js → 888f188541f8bd68e33e.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{319c3f46f2afb8f3e5a9.js → 89c9cf7f799858d14c76.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{e19cd07df8ce87e18832.js → 8b33732e3c2924c1f60d.js} +1 -1
  11. package/assets/esri/core/workers/chunks/98739414c107ad78e4d8.js +1 -0
  12. package/assets/esri/core/workers/chunks/{bc318b6fef192cee2a72.js → a4518f25b9f8fe704286.js} +17 -17
  13. package/assets/esri/core/workers/chunks/{8b73db0f4d6714396eb0.js → a6fa90eab77ac0e1cdfc.js} +1 -1
  14. package/assets/esri/core/workers/chunks/ac366221e8636b60aee5.js +1 -0
  15. package/assets/esri/core/workers/chunks/{23e17b745adf71a5efc7.js → aca72ca7f43f70eb8077.js} +1 -1
  16. package/assets/esri/core/workers/chunks/ad0c7225941437d18408.js +1 -0
  17. package/assets/esri/core/workers/chunks/b30897952494a3e5b9fe.js +1 -0
  18. package/assets/esri/core/workers/chunks/bfd3d81e8e148be99686.js +1 -0
  19. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  20. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  21. package/assets/esri/themes/base/widgets/_Editor.scss +2 -1
  22. package/assets/esri/themes/base/widgets/_FeatureForm.scss +1 -1
  23. package/assets/esri/themes/dark/main.css +1 -1
  24. package/assets/esri/themes/light/main.css +1 -1
  25. package/assets/esri/themes/light/view.css +1 -1
  26. package/chunks/GaussianSplat.glsl.js +2 -2
  27. package/chunks/lyr3DMain.js +1 -1
  28. package/config.js +1 -1
  29. package/graphic/graphicOriginUtils.js +1 -1
  30. package/interfaces.d.ts +66 -26
  31. package/kernel.js +1 -1
  32. package/layers/BingMapsLayer.js +1 -1
  33. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  34. package/layers/support/attributionUtils.js +5 -0
  35. package/layers/support/fieldConfigUtils.js +1 -1
  36. package/layers/support/fieldFormatUtils.js +1 -1
  37. package/layers/video/VideoController.js +1 -1
  38. package/libs/parquet/parquet.js +1 -1
  39. package/package.json +1 -1
  40. package/support/revision.js +1 -1
  41. package/symbols/cim/SDFHelper.js +1 -1
  42. package/symbols/cim/cimAnalyzer.js +1 -1
  43. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  44. package/views/2d/engine/flow/dataUtils.js +1 -1
  45. package/views/2d/engine/webgl/TextureManager.js +1 -1
  46. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +1 -1
  47. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
  48. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
  49. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
  50. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  51. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  52. package/views/2d/layers/features/Processor.js +1 -1
  53. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  54. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  55. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  56. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  57. package/views/3d/analysis/ElevationProfile/ElevationProfileGeometryVisualization3D.js +1 -1
  58. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
  59. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  60. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  61. package/views/3d/environment/CloudsCompositionTechnique.js +1 -1
  62. package/views/3d/environment/CloudsTechnique.js +1 -1
  63. package/views/3d/environment/FogTechnique.js +1 -1
  64. package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
  65. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  66. package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
  67. package/views/3d/layers/FlowSubView3D.js +1 -1
  68. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  69. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  70. package/views/3d/layers/TiledLayerView3D.js +1 -1
  71. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  72. package/views/3d/support/DisplayQualityProfile.js +1 -1
  73. package/views/3d/support/QualitySettings.js +1 -1
  74. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  75. package/views/3d/support/flow/FlowWorker.js +1 -1
  76. package/views/3d/support/flow/FlowWorkerHandle.js +1 -1
  77. package/views/3d/support/flow/StreamlineResources3D.js +1 -1
  78. package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
  79. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  80. package/views/3d/support/flow/constants.js +1 -1
  81. package/views/3d/support/flow/loadUtils.js +1 -1
  82. package/views/3d/support/popupHitTest.js +1 -1
  83. package/views/3d/terrain/BlendLayersTechnique.js +1 -1
  84. package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
  85. package/views/3d/terrain/TerrainSurface.js +1 -1
  86. package/views/3d/terrain/TileAgent.js +1 -1
  87. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  88. package/views/3d/webgl-engine/core/shaderTechnique/{ReloadableShaderModule.js → ReloadableShader.js} +1 -1
  89. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  90. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
  91. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  92. package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +1 -1
  93. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
  94. package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
  95. package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
  96. package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
  97. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
  98. package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
  99. package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
  100. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
  101. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
  102. package/views/3d/webgl-engine/effects/laserlines/LaserlineTechnique.js +1 -1
  103. package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
  104. package/views/3d/webgl-engine/effects/smaa/SMAABlendWeightsTechnique.js +1 -1
  105. package/views/3d/webgl-engine/effects/smaa/SMAABlurTechnique.js +1 -1
  106. package/views/3d/webgl-engine/effects/smaa/SMAAEdgeDetectTechnique.js +1 -1
  107. package/views/3d/webgl-engine/effects/ssao/SSAOBlurTechnique.js +1 -1
  108. package/views/3d/webgl-engine/effects/ssao/SSAOTechnique.js +1 -1
  109. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  110. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  111. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  112. package/views/3d/webgl-engine/lib/Program.js +1 -1
  113. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  114. package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
  115. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
  116. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  117. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  118. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
  119. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  120. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  121. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  122. package/views/3d/webgl-engine/shaders/CutFillCompositionTechnique.js +1 -1
  123. package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +1 -1
  124. package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
  125. package/views/3d/webgl-engine/shaders/CutFillReductionTechnique.js +1 -1
  126. package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +1 -1
  127. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  128. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  129. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechnique.js +1 -1
  130. package/views/3d/webgl-engine/shaders/GaussianSplatDepthCompositionTechnique.js +1 -1
  131. package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +1 -1
  132. package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
  133. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  134. package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +1 -1
  135. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  136. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  137. package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
  138. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  139. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  140. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  141. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  142. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  143. package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
  144. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  145. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  146. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  147. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  148. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  149. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
  150. package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +1 -1
  151. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
  152. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  153. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  154. package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
  155. package/views/SceneView.js +1 -1
  156. package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
  157. package/views/analysis/ElevationProfile/types.d.ts +5 -0
  158. package/views/analysis/ElevationProfile/types.js +5 -0
  159. package/views/webgl/VertexAttributeLocations.js +1 -1
  160. package/widgets/Attribution/AttributionViewModel.js +1 -1
  161. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  162. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  163. package/widgets/Editor/UpdateWorkflow.js +1 -1
  164. package/widgets/Editor/Workflow.js +1 -1
  165. package/widgets/Editor/components/CreateFeaturesPanelContent.js +1 -1
  166. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  167. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  168. package/widgets/Editor.js +1 -1
  169. package/widgets/Feature/support/featureUtils.js +1 -1
  170. package/widgets/FeatureTable/FieldColumn.js +1 -1
  171. package/widgets/FeatureTable/Grid/Column.js +1 -1
  172. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  173. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  174. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  175. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  176. package/assets/esri/core/workers/chunks/38ee69125da60464d5a1.js +0 -1
  177. package/assets/esri/core/workers/chunks/4f0016111fd84c612f41.js +0 -1
  178. package/assets/esri/core/workers/chunks/8208dfa8f7fae7e616b9.js +0 -1
  179. package/assets/esri/core/workers/chunks/847f4fc39100fac1df01.js +0 -1
  180. package/assets/esri/core/workers/chunks/ab005fe84952f0676020.js +0 -1
  181. package/assets/esri/core/workers/chunks/bc19a232076d98825eef.js +0 -1
  182. package/assets/esri/core/workers/chunks/c3dcfe26c2c3c829762d.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import has from"../../../core/has.js";import t from"../../../core/Logger.js";import{destroyMaybe as i,removeMaybe as s}from"../../../core/maybe.js";import{initial as r,watch as o,when as n}from"../../../core/reactiveUtils.js";import{schedule as a}from"../../../core/scheduling.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import{fromMat4 as d,invert as h}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as m,IDENTITY as u}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as p}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as f}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{o as g,g as b,a as y,f as _}from"../../../chunks/vec32.js";import{fromArray as w,clone as v,create as j}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as x}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{SphericalECEFSpatialReferenceLike as M}from"../../../geometry/ellipsoidUtils.js";import{computeTranslationToOriginAndRotation as C}from"../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{localLinearScaleFactors as O}from"../../../geometry/projection/localLinearScaleFactors.js";import{projectVectorToVector as T}from"../../../geometry/projection/projectVectorToVector.js";import{create as U}from"../../../geometry/support/aaBoundingRect.js";import{BufferViewVec2f as P,BufferViewVec4f as H,BufferViewVec4u8 as S,BufferViewVec4u16 as E,BufferViewVec3f as R,BufferViewVec3u8 as V,BufferViewVec3u16 as A,BufferViewInt16 as k,BufferViewUint32 as F,BufferViewUint16 as I}from"../../../geometry/support/buffer/BufferView.js";import D from"../../../layers/support/SceneModification.js";import{getElevationOffsetInMeters as L}from"../../../support/elevationInfoUtils.js";import{toWasmModification as B}from"./I3SMeshWorkerHandle.js";import{LayerView3D as G}from"./LayerView3D.js";import{Lyr3DViewPerformanceInfo as z}from"./Lyr3DViewPerformanceInfo.js";import{addLayerViewToWasm as N,removeLayerViewFromWasm as W,getLyr3DWasm as $}from"./Lyr3DWasm.js";import{LayerElevationProvider as q}from"./i3s/LayerElevationProvider.js";import{primTypeConversion as J,wrapModeConversion as K,lyr3DTypeToByteSize as Q,alphaModeConversion as X,faceCullingConversion as Y}from"./support/lyr3dTypeConversions.js";import{Tiles3DIntersectionHandler as Z}from"./support/Tiles3DIntersectionHandler.js";import{ElevationRange as ee}from"../support/ElevationRange.js";import{toBoundingRect as te}from"../support/extentUtils.js";import{Obb as ie,compute as se}from"../support/orientedBoundingBox.js";import{ObjectParameters as re}from"../webgl-engine/collections/Component/ObjectParameters.js";import{GeometryParameters as oe,createVertexBufferLayout as ne,SourceGeometry as ae}from"../webgl-engine/collections/Component/SourceGeometry.js";import{Transform as le}from"../webgl-engine/collections/Component/Transform.js";import{RenderTexture as ce}from"../webgl-engine/core/material/RenderTexture.js";import{getEllipsoidMode as de}from"../webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{Attribute as he}from"../webgl-engine/lib/Attribute.js";import{compressAndTransformNormals as me}from"../webgl-engine/lib/Normals.js";import{Texture as ue}from"../webgl-engine/lib/Texture.js";import{writeAttribute as pe,writeBufferVec2 as fe}from"../webgl-engine/materials/internal/bufferWriterUtils.js";import ge from"../../layers/LayerView.js";import{spatialReferenceIncompatibleError as be,isInEffectiveScaleRange as ye}from"../../support/layerViewUtils.js";import{TextureCompressionTracker as _e}from"../../support/TextureCompressionTracker.js";import{alphaCutoff as we}from"../../../webscene/support/AlphaCutoff.js";class ve{constructor(e,t,i,s,r,o,n){this.handle=e,this.componentObjects=t,this.textures=i,this.cpuMemoryUsage=s,this.vboMemoryUsage=r,this.textureMemoryUsage=o,this.obb=n,this.isVisible=!1,this.usedMemory=this.textureMemoryUsage+this.vboMemoryUsage+this.cpuMemoryUsage;const a=j();n?.getCenter(a),this._obbCenter=a,this._obbRadiusSquared=n?n?.radius**2:0}boundingVolumeIntersectsRay(e,t){if(!this.obb)return!0;const i=y(je,this._obbCenter,e),s=_(i,t);return _(i,i)-s*s<=this._obbRadiusSquared&&this.obb.intersectRay(e,t)}}const je=j();function xe(e){return Math.round(e/1048.576)/1e3}let Me=class extends(G(ge)){get hasModifications(){return this._modifications&&this._modifications.length>0}constructor(e){super(e),this.type="integrated-mesh-3dtiles",this._compressionTracker=new _e,this._modifications=new Array,this._visibleGeometryChangedSchedulerHandle=null,this._wasmLayerId=-1,this.ignoresMemoryFactor=!1,this._usedMemory=0,this._cacheMemory=0,this.drapeTargetType=1,this._applySSAO=!has("disable-feature:im-ssao"),this._shadeNormals=!!has("enable-feature:im-shading"),this._lyrHandleToObjects=new Map,this._visibleObjects=new Set,this._suspendedHandle=null,this._dbgFlags=new Set,this._memCache=e.view.resourceController.memoryController.newCache(`IM3DTiles-${this.uid}`,e=>this._deletePerObjectData(e))}initialize(){this._dbgFlags.add(3),this._dbg(2,"Tiles3DLayerView3D initialize() called");const{view:e}=this;if(this._updatingHandles.add(()=>this.layer.modifications,()=>this._loadModifications(),r),!this._canProjectWithoutEngine())throw be("layer",this.layer.spatialReference.wkid,e.renderSpatialReference?.wkid);const t=N(this).then(t=>{this._wasmLayerId=t,this._intersectionHandler=new Z(this),e.sceneIntersectionHelper.addIntersectionHandler(this._intersectionHandler),this._updatingHandles.add(()=>this.slicePlaneEnabled,e=>this._slicePlaneEnabledChange(e)),this._updatingHandles.add(()=>this._modifications,()=>this._modificationsChanged(),r),this._updatingHandles.add(()=>this.fullOpacity,()=>this._opacityChange()),this._updatingHandles.add(()=>e.clippingArea,()=>this._clippingAreaChanged(),r),this._elevationProvider=new q({view:e,layerElevationSource:this,intersectionHandler:this._intersectionHandler}),e.elevationProvider.register(1,this._elevationProvider),e.overlayManager.registerDrapeTarget(this),this.addHandles([o(()=>this.layer.elevationInfo,e=>this._elevationInfoChanged(e))]),this._suspendedHandle=o(()=>this.suspended,e=>this._wasm?.setEnabled(this,!e),r)});this.addResolvingPromise(t),this._replacesTerrain&&this.addHandles(n(()=>this.view.map.ground.opacity,()=>{this._opacityChange()}))}get _replacesTerrain(){return this.layer.replacesTerrain&&!!this.view.map.basemap?.groundLayers.includes(this.layer)}get fullOpacity(){return this._replacesTerrain?this.view.map.ground.opacity:1}get opacity(){return 1}_opacityChange(){const{fullOpacity:e}=this;this.forEachComponentObject(t=>{this._collection.getMaterial(t).objectOpacity=e})}intersect(e,t,i,s){this._intersectionHandler.intersect(e,t,i,s,null,!1)}get ready(){return!0}destroy(){this._dbg(2,"Tiles3DLayerView3D destroy() called"),W(this),this._suspendedHandle&&(this._suspendedHandle.remove(),this._suspendedHandle=null),this._intersectionHandler&&(this.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler),this._intersectionHandler=null),this._elevationProvider&&(this._elevationProvider.notifyObjectsChangedFunctional(e=>this.forEachComponentObject(t=>e(t.obb))),this.view.elevationProvider.unregister(this._elevationProvider),this._elevationProvider=null),this.view.overlayManager.unregisterDrapeTarget(this),this._lyrHandleToObjects.forEach(e=>this.freeObject(e)),this._lyrHandleToObjects.clear(),this._visibleObjects.clear(),this._usedMemory=this._cacheMemory=0,this._memCache.destroy(),this._updatingHandles=i(this._updatingHandles),this.emit("visible-geometry-changed"),this._visibleGeometryChangedSchedulerHandle=s(this._visibleGeometryChangedSchedulerHandle)}_modificationsChanged(){const e=this.layer.spatialReference,t=B(this._layerClippingArea,this._modifications,e);this._wasm?.setMeshModifications(this,t,e.wkid)}_clippingAreaChanged(){const e=this.layer.spatialReference,t=U();this._layerClippingArea=te(this.view.clippingArea,t,e)?t:null,this._modificationsChanged()}_visibleGeometryChanged(){this._visibleGeometryChangedSchedulerHandle??=a(()=>{this.emit("visible-geometry-changed"),this._visibleGeometryChangedSchedulerHandle=null})}_slicePlaneEnabledChange(e){this._intersectionHandler&&(this._intersectionHandler.slicePlaneEnabled=e),this.forEachComponentObject(t=>this._collection.getMaterial(t).commonMaterialParameters.hasSlicePlane=e)}_elevationInfoChanged(e){this._wasm?.setLayerOffset(this,L(e))}get _wasm(){return $(this.view)}get wasmLayerId(){return this._wasmLayerId}get usedMemory(){return this._usedMemory}get unloadedMemory(){return 0}get cachedMemory(){return this._cacheMemory}get visibleAtCurrentScale(){return ye(this.layer.effectiveScaleRange,this.view.scale)}get performanceInfo(){let e=0,t=0,i=0,s=0,r=0,o=0;return this._lyrHandleToObjects.forEach(n=>{n.isVisible?(e+=n.textureMemoryUsage,t+=n.vboMemoryUsage,r++):(i+=n.textureMemoryUsage,s+=n.vboMemoryUsage,o++)}),new z(this.usedMemory,r,o,xe(t),xe(e),xe(s),xe(i))}_canProjectWithoutEngine(){if(2===this.view.state.viewingMode){const e=this.view.renderSpatialReference?.isWebMercator?3857:this.view.renderSpatialReference?.wkid??-1;if(3857!==e&&32662!==e)return!1}return!0}get _stage(){return this.view.stage}get _collection(){return this._stage.renderView.componentObjectCollection}get elevationProvider(){return this._elevationProvider}get elevationOffset(){return L(this.layer.elevationInfo)}get elevationRange(){const e=this.fullExtent;return e?.zmin&&e?.zmax?new ee(e.zmin,e.zmax):null}getElevationRange(e){return null}get fullExtent(){return this.layer.fullExtent}forEachComponentObject(e){this._forEachObject(this._lyrHandleToObjects.values(),e)}forEachVisibleTile(e){for(const t of this._visibleObjects)e(t)}forEachVisibleComponentObject(e){this._forEachObject(this._visibleObjects,e)}_forEachObject(e,t){for(const i of e)for(const e of i.componentObjects)t(e)}isUpdating(){const e=this._wasm;return!(this._wasmLayerId<0||null==e)&&(e.isUpdating(this._wasmLayerId)||this._compressionTracker.compressing)}updatingFlagChanged(){this.notifyChange("updating")}async createRenderable(e){const t=e.meshData;if(null==t.data)throw new Error("meshData.data undefined");if(t.desc=JSON.parse(t.desc),null==t.desc)throw new Error("meshData.desc undefined");const i=w(t.desc.origin),s=new Array,r=this.view.basemapTerrain.spatialReference;let o,n;if("global"===this.view.viewingMode){const e=p();C(M,i,e,r),o=d(m(),e),n=h(m(),o)}else o=u,n=u;const a=v(i),l=j(),c=Ue(t.desc.obb);let f=0,b=0;const y={textureMemoryUsage:0},_=new Array,U=new Map,H=t.desc.prims.length;for(let d=0;d<H;d++){const e=t.desc.prims[d];this._dbg(2,JSON.stringify(e));if(null==J[e.ptype]||null==t.data){this._dbg(2,"[Unsupported Feature] Unsupported primitive mode ("+e.ptype+"). Skipping primitive.");continue}const h=t.desc?.materials&&null!=e.materialId?t.desc.materials[e.materialId]:null,m=null!=h?h.lightingModel:"Unlit",{positionView:p,positionAttr:w,normalsView:v,normalsAttr:M,colorAttr:C,texCoord0Attr:H,indicesView:S}=this.getBufferViews(e,t.data.buffer,o);if(null==w||null==p||null==S)continue;const E=new oe(null!=C,H?1:0,null!=v,this._shadeNormals||this._replacesTerrain,this._applySSAO),R=w.data.length/w.size,V=(e,t)=>!e||e.data.length/e.size===R||(this._dbg(3,`${t} !== numPos. Skipping primitive.`),!1);if(!V(H,"numTexcoord")||!V(C,"numColors")||!V(M,"normals"))continue;const A=ne(E),k=c?.clone()??Te(w,i);if(o!==u)for(let t=0;t<p.count;t++)p.getVec(t,l),g(l,l,o),p.setVec(t,l);const F=A.createBuffer(w.data.length);if(pe("position",w,null,null,F,0),null!=H){const e=F.getField("uv0",P);fe(H,e,0)}null!=C&&pe("color",C,null,null,F,0),null!=M&&pe("normalCompressed",M,null,null,F,0);const I=new Uint32Array([0,S.typedBuffer.length]),D=new ae({data:F.buffer,count:F.byteLength/A.stride,layoutParameters:E},{positions:p.typedBuffer,indices:S.typedBuffer},S.typedBuffer,I);f+=p.count+S.count;const L=this.view.renderSpatialReference,B=j(),G=[1,1,1];O(a,L,G,r)||this._dbg(3,"Unsupported coordinate system for IM overlay"),T(a,L,B,r);const z=this._collection.createObject(new re(x(B[0],B[1],G[0],G[1]),new le(a,n),k,D,!1));if(h){const e=e=>{e.baseColor=h.baseColorFactor,e.usePBR="Pbr"===m,e.hasParametersFromSource=!1,e.baseColorTexture=this._getTexture(h.baseColorTex,t,U,y),e.usePBR&&(e.mrrFactors=[h.metallicFactor,h.roughnessFactor,0],e.emissiveBaseColor=h.emissiveFactor??[0,0,0],e.metallicRoughnessTexture=this._getTexture(h.metalTex,t,U,y),e.emissionTexture=this._getTexture(h.emissiveTex,t,U,y),e.occlusionTexture=this._getTexture(h.occlusionTex,t,U,y),e.normalTexture=this._getTexture(h.normalTex,t,U,y)),e.objectOpacity=0,e.alphaDiscardMode=2;const i=[];e.baseColorTexture&&i.push(e.baseColorTexture.loadPromise),e.usePBR&&(e.metallicRoughnessTexture&&i.push(e.metallicRoughnessTexture.loadPromise),e.emissionTexture&&i.push(e.emissionTexture.loadPromise),e.occlusionTexture&&i.push(e.occlusionTexture.loadPromise),e.normalTexture&&i.push(e.normalTexture.loadPromise));const r=Promise.all(i);s.push(r),r.then(()=>{e.alphaDiscardMode=X[h.alphaMode],e.objectOpacity=this.fullOpacity,y.textureMemoryUsage+=e.baseColorTexture?.glTexture?.usedMemory??0,e.usePBR&&(y.textureMemoryUsage+=(e.metallicRoughnessTexture?.glTexture?.usedMemory??0)+(e.emissionTexture?.glTexture?.usedMemory??0)+(e.occlusionTexture?.glTexture?.usedMemory??0)+(e.normalTexture?.glTexture?.usedMemory??0))}),e.commonMaterialParameters.doubleSided=h.isDoubleSided,e.commonMaterialParameters.cullFace=Y[h.faceCulling??"NotSet"],e.commonMaterialParameters.hasSlicePlane=this.slicePlaneEnabled,e.componentParameters.castShadows=0,e.textureAlphaCutoff=h.alphaCutoff??we,e.alphaDiscardMode=X[h.alphaMode],e.isIntegratedMesh=!0,e.sphereDepthInterpolate=this.layer.hasGoogleUrl,e.polygonOffsetEnabled=!1,e.hasOccludees=!1,e.ellipsoidMode=de(this.view.spatialReference)};this._collection.updateMaterial(z,e)}_.push(z),b+=this._collection.getObjectGPUMemoryUsage(z)}await Promise.all(s);const S=new Array;U.forEach(e=>{S.push(e)});const E=new ve(e.handle,_,S,f,b,y.textureMemoryUsage,c);return this._memCache.put(`${E.handle}`,E),this._lyrHandleToObjects.set(e.handle,E),this._cacheMemory+=E.usedMemory,{memUsageBytes:E.usedMemory}}freeRenderable(e){const t=this._lyrHandleToObjects.get(e);t&&(t.isVisible?(this._visibleObjects.delete(t),this._usedMemory-=t.usedMemory):this._cacheMemory-=t.usedMemory,this.freeObject(t),this._lyrHandleToObjects.delete(e))}freeObject(e){this._memCache.pop(`${e.handle}`),e.textures.forEach(e=>this._stage.removeTexture(e)),e.componentObjects.forEach(e=>this._collection.destroyObject(e))}setRenderableVisibility(e,t,i){for(let s=0;s<i;++s){const i=t[s];if(!i)continue;const r=e[s],o=this._lyrHandleToObjects.get(r);if(o){if(o.isVisible)continue;this._visibleGeometryChanged(),o.isVisible=!0,this._visibleObjects.add(o),this._usedMemory+=o.usedMemory,this._cacheMemory-=o.usedMemory,o.componentObjects.forEach(e=>{this._collection.setObjectVisibility(e,i),this._elevationProvider.notifyObjectChanged(this._collection.getComponentObb(e))}),this._memCache.pop(`${r}`)}}for(let s=0;s<i;++s){const i=e[s],r=t[s];if(r)continue;const o=this._lyrHandleToObjects.get(i);if(o){if(!o.isVisible)continue;this._visibleGeometryChanged(),o.isVisible=!1,this._visibleObjects.delete(o),this._usedMemory-=o.usedMemory,this._cacheMemory+=o.usedMemory,o.componentObjects.forEach(e=>{this._collection.setObjectVisibility(e,r),this._elevationProvider.notifyObjectChanged(this._collection.getComponentObb(e))}),this._memCache.put(`${i}`,o)}}}_getTexture(e,t,i,s){let r=null;if(e&&t.desc?.images&&t.data?.buffer){const o=t.desc.images[e?.imageId];if(r=i.get(o),!r&&o){const n=this._stage.renderView.renderingContext.parameters.maxMaxAnisotropy,a=!!o.mipCount||n>1,l=K[e.wrapMode??"None"];let c=o.alpha?6408:6407;const d=new Uint8Array(t.data.buffer,o.data.byteOffset,o.data.byteCount);let h=null,m=null,u=null;switch(o.format){case"Raw":"R8"===o.pixelFormat?(h=d,c=6403,m=""):"Rgb8"===o.pixelFormat?(h=d,c=6407,m=""):"Rgba8"===o.pixelFormat&&(h=d,c=6408,m="");break;case"Dxt1":h=d,c=6407,m="image/vnd-ms.dds";break;case"Dxt5":h=d,c=6408,m="image/vnd-ms.dds";break;case"Basis":h=d,c=6407,m="image/ktx2";break;case"Png":m="image/png",u=document.createElement("img");break;case"Jpeg":m="image/jpeg",u=document.createElement("img");break;case"Etc2":m="image/ktx",u=document.createElement("img");break;case"Astc":this._dbg(3,"Astc texture not supported");break;case"Pvrtc":this._dbg(3,"Pvrtc texture not supported")}if(u&&m){const e=new Blob([d],{type:m});u.src=URL.createObjectURL(e),h=u}if(h&&null!=m){const e=has("enable-feature:esri-compress-IM-textures")?{compressionTracker:this._compressionTracker,compressionCallback:e=>{e&&e>0&&(s.textureMemoryUsage-=e)}}:void 0;r=new ue(h,{mipmap:a,maxAnisotropy:n,encoding:m,wrap:l,pixelFormat:c,compressionOptions:e,noUnpackFlip:!0,width:o.mip0Width,height:o.mip0Height}),this._stage.addTexture(r),i.set(o,r)}}}return r?new ce(this.view.stage.renderView.textures,r.id):null}getBufferViews(e,t,i){let s,r,o,n,a,l,c,d=null;for(let m=0;m<e.atrbs.length;m++){const c=e.atrbs[m],u=c.view,p=void 0,f=u.byteOffset+u.byteCount,g=u.byteCount/Q[u.type],b=[...Array(g).keys()].map(e=>e);try{switch(c.sem){case"Position":3!==u.ncomp||"F32"!==u.type?this._dbg(3,"[Unsupported Feature] Unsupported view for Position ("+u+")"):(s=new R(t,u.byteOffset,p,f),r=new he(s.typedBuffer,b,3));break;case"Normal":if(3!==u.ncomp||"F32"!==u.type)this._dbg(3,"[Unsupported Feature] Unsupported view for Normal ("+u+")");else{const e=new R(t,u.byteOffset,p,f),s=me(e.typedBuffer,i);a=new k(s.buffer),l=new he(a.typedBuffer,b,2)}break;case"TexCoord":2!==u.ncomp||"F32"!==u.type?this._dbg(3,"[Unsupported Feature] Unsupported view for Texcoord ("+u+")"):void 0===n&&(n=new he(new P(t,u.byteOffset,p,f).typedBuffer,b,2));break;case"Color":4===u.ncomp?("F32"===u.type&&(d=new H(t,u.byteOffset,p,f)),"U8"===u.type&&(d=new S(t,u.byteOffset,p,f)),"U16"===u.type&&(d=new E(t,u.byteOffset,p,f))):3===u.ncomp&&("F32"===u.type&&(d=new R(t,u.byteOffset,p,f)),"U8"===u.type&&(d=new V(t,u.byteOffset,p,f)),"U16"===u.type&&(d=new A(t,u.byteOffset,p,f))),null==d?this._dbg(2,"[Unsupported Feature] Unsupported view for Color ("+u+")"):o=new he(d.typedBuffer,b,u.ncomp);break;case"FeatureIndex":break;default:this._dbg(2,"[Unsupported Feature] Unsupported semantic ("+c.sem+"). Skipping vertex attribute.")}}catch(h){this._dbg(2,"Error Creating buffer ("+h+"). Skipping vertex attribute.")}}if(e.index){const i=e.index.view,s=void 0,r=i.byteOffset+i.byteCount;switch(e.index.view.type){case"U16":c=new I(t,i.byteOffset,s,r);break;case"U32":c=new F(t,i.byteOffset,s,r);break;default:this._dbg(3,"[Unsupported Feature] index type not supported ("+i.type+").")}}if(null==c&&null!=s){const e=s.count;if(e<65535){const t=new Uint16Array(e);c=new I(t.buffer)}else{const t=new Uint32Array(e);c=new F(t.buffer)}for(let t=0;t<e;t++)c.set(t,t)}return{positionView:s,positionAttr:r,colorAttr:o,texCoord0Attr:n,indicesView:c,normalsView:a,normalsAttr:l}}_loadModifications(){if(this.removeHandles("modifications"),null==this.layer.modifications)return void(this._modifications=[]);const e=this.layer.modifications;this.addHandles(this._updatingHandles.addOnCollectionChange(()=>e,()=>this._modifications=e.toArray(),r),"modifications")}_deletePerObjectData(e){this._wasm?.onRenderableEvicted(this,e.handle,e.usedMemory),this.freeRenderable(e.handle)}_dbg(e,i){this._dbgFlags.has(e)&&(3===e?t.getLogger(this).error(i):t.getLogger(this).warn(i))}};e([l()],Me.prototype,"fullOpacity",null),e([l({type:[D]})],Me.prototype,"_modifications",void 0),e([l()],Me.prototype,"_visibleGeometryChangedSchedulerHandle",void 0),e([l()],Me.prototype,"layer",void 0),e([l({readOnly:!0})],Me.prototype,"visibleAtCurrentScale",null),e([l()],Me.prototype,"elevationOffset",null),Me=e([c("esri.views.3d.layers.IntegratedMesh3DTilesLayerView3D")],Me);const Ce=Me,Oe=j();function Te(e,t){const i=se(e);return b(Oe,i.center,t),i.center=Oe,i}function Ue(e){return e?new ie(e.center,e.halfSize,f(...e.quaternion)):null}export{Ce as default};
5
+ import{__decorate as e}from"tslib";import has from"../../../core/has.js";import t from"../../../core/Logger.js";import{destroyMaybe as i,removeMaybe as s}from"../../../core/maybe.js";import{initial as r,watch as o,when as n}from"../../../core/reactiveUtils.js";import{schedule as a}from"../../../core/scheduling.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import{fromMat4 as d,invert as h}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as m,IDENTITY as u}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as p}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as f}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{o as g,g as b,a as y,f as _}from"../../../chunks/vec32.js";import{fromArray as w,clone as v,create as j}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as x}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{SphericalECEFSpatialReferenceLike as M}from"../../../geometry/ellipsoidUtils.js";import{computeTranslationToOriginAndRotation as C}from"../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{localLinearScaleFactors as O}from"../../../geometry/projection/localLinearScaleFactors.js";import{projectVectorToVector as T}from"../../../geometry/projection/projectVectorToVector.js";import{create as P}from"../../../geometry/support/aaBoundingRect.js";import{BufferViewVec2f as U,BufferViewVec4f as H,BufferViewVec4u8 as S,BufferViewVec4u16 as E,BufferViewVec3f as R,BufferViewVec3u8 as V,BufferViewVec3u16 as A,BufferViewInt16 as k,BufferViewUint32 as F,BufferViewUint16 as I}from"../../../geometry/support/buffer/BufferView.js";import L from"../../../layers/support/SceneModification.js";import{getElevationOffsetInMeters as D}from"../../../support/elevationInfoUtils.js";import{toWasmModification as B}from"./I3SMeshWorkerHandle.js";import{LayerView3D as G}from"./LayerView3D.js";import{Lyr3DViewPerformanceInfo as z}from"./Lyr3DViewPerformanceInfo.js";import{addLayerViewToWasm as N,removeLayerViewFromWasm as W,getLyr3DWasm as $}from"./Lyr3DWasm.js";import{LayerElevationProvider as q}from"./i3s/LayerElevationProvider.js";import{primTypeConversion as J,wrapModeConversion as K,lyr3DTypeToByteSize as Q,alphaModeConversion as X,faceCullingConversion as Y}from"./support/lyr3dTypeConversions.js";import{Tiles3DIntersectionHandler as Z}from"./support/Tiles3DIntersectionHandler.js";import{ElevationRange as ee}from"../support/ElevationRange.js";import{toBoundingRect as te}from"../support/extentUtils.js";import{Obb as ie,compute as se}from"../support/orientedBoundingBox.js";import{ObjectParameters as re}from"../webgl-engine/collections/Component/ObjectParameters.js";import{GeometryParameters as oe,createVertexBufferLayout as ne,SourceGeometry as ae}from"../webgl-engine/collections/Component/SourceGeometry.js";import{Transform as le}from"../webgl-engine/collections/Component/Transform.js";import{RenderTexture as ce}from"../webgl-engine/core/material/RenderTexture.js";import{getEllipsoidMode as de}from"../webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{Attribute as he}from"../webgl-engine/lib/Attribute.js";import{compressAndTransformNormals as me}from"../webgl-engine/lib/Normals.js";import{Texture as ue}from"../webgl-engine/lib/Texture.js";import{writeAttribute as pe,writeBufferVec2 as fe}from"../webgl-engine/materials/internal/bufferWriterUtils.js";import ge from"../../layers/LayerView.js";import{spatialReferenceIncompatibleError as be,isInEffectiveScaleRange as ye}from"../../support/layerViewUtils.js";import{TextureCompressionTracker as _e}from"../../support/TextureCompressionTracker.js";import{alphaCutoff as we}from"../../../webscene/support/AlphaCutoff.js";class ve{constructor(e,t,i,s,r,o,n){this.handle=e,this.componentObjects=t,this.textures=i,this.cpuMemoryUsage=s,this.vboMemoryUsage=r,this.textureMemoryUsage=o,this.obb=n,this.isVisible=!1,this.usedMemory=this.textureMemoryUsage+this.vboMemoryUsage+this.cpuMemoryUsage;const a=j();n?.getCenter(a),this._obbCenter=a,this._obbRadiusSquared=n?n?.radius**2:0}boundingVolumeIntersectsRay(e,t){if(!this.obb)return!0;const i=y(je,this._obbCenter,e),s=_(i,t);return _(i,i)-s*s<=this._obbRadiusSquared&&this.obb.intersectRay(e,t)}}const je=j();function xe(e){return Math.round(e/1048.576)/1e3}let Me=class extends(G(ge)){get hasModifications(){return this._modifications&&this._modifications.length>0}constructor(e){super(e),this.type="integrated-mesh-3dtiles",this._compressionTracker=new _e,this._modifications=new Array,this._visibleGeometryChangedSchedulerHandle=null,this._wasmLayerId=-1,this.ignoresMemoryFactor=!1,this._usedMemory=0,this._cacheMemory=0,this.drapeTargetType=1,this._applySSAO=!has("disable-feature:im-ssao"),this._shadeNormals=!!has("enable-feature:im-shading"),this._lyrHandleToObjects=new Map,this._visibleObjects=new Set,this._suspendedHandle=null,this._dbgFlags=new Set,this._memCache=e.view.resourceController.memoryController.newCache(`IM3DTiles-${this.uid}`,e=>this._deletePerObjectData(e))}initialize(){this._dbgFlags.add(3),this._dbg(2,"Tiles3DLayerView3D initialize() called");const{view:e}=this;if(this._updatingHandles.add(()=>this.layer.modifications,()=>this._loadModifications(),r),!this._canProjectWithoutEngine())throw be("layer",this.layer.spatialReference.wkid,e.renderSpatialReference?.wkid);const t=N(this).then(t=>{this._wasmLayerId=t,this._intersectionHandler=new Z(this),e.sceneIntersectionHelper.addIntersectionHandler(this._intersectionHandler),this._updatingHandles.add(()=>this.slicePlaneEnabled,e=>this._slicePlaneEnabledChange(e)),this._updatingHandles.add(()=>this._modifications,()=>this._modificationsChanged(),r),this._updatingHandles.add(()=>this.fullOpacity,()=>this._opacityChange()),this._updatingHandles.add(()=>e.clippingArea,()=>this._clippingAreaChanged(),r),this._elevationProvider=new q({view:e,layerElevationSource:this,intersectionHandler:this._intersectionHandler}),e.elevationProvider.register(1,this._elevationProvider),e.overlayManager.registerDrapeTarget(this),this.addHandles([o(()=>this.layer.elevationInfo,e=>this._elevationInfoChanged(e))]),this._suspendedHandle=o(()=>this.suspended,e=>this._wasm?.setEnabled(this,!e),r)});this.addResolvingPromise(t),this._replacesTerrain&&this.addHandles(n(()=>this.view.map.ground.opacity,()=>{this._opacityChange()}))}get _replacesTerrain(){return this.layer.replacesTerrain&&!!this.view.map.basemap?.groundLayers.includes(this.layer)}get fullOpacity(){return this._replacesTerrain?this.view.map.ground.opacity:1}get opacity(){return 1}_opacityChange(){const{fullOpacity:e}=this;this.forEachComponentObject(t=>{this._collection.getMaterial(t).objectOpacity=e})}intersect(e,t,i,s){this._intersectionHandler.intersect(e,t,i,s,null,!1)}get ready(){return!0}destroy(){this._dbg(2,"Tiles3DLayerView3D destroy() called"),W(this),this._suspendedHandle&&(this._suspendedHandle.remove(),this._suspendedHandle=null),this._intersectionHandler&&(this.view.sceneIntersectionHelper.removeIntersectionHandler(this._intersectionHandler),this._intersectionHandler=null),this._elevationProvider&&(this._elevationProvider.notifyObjectsChangedFunctional(e=>this.forEachComponentObject(t=>e(t.obb))),this.view.elevationProvider.unregister(this._elevationProvider),this._elevationProvider=null),this.view.overlayManager.unregisterDrapeTarget(this),this._lyrHandleToObjects.forEach(e=>this.freeObject(e)),this._lyrHandleToObjects.clear(),this._visibleObjects.clear(),this._usedMemory=this._cacheMemory=0,this._memCache.destroy(),this._updatingHandles=i(this._updatingHandles),this.emit("visible-geometry-changed"),this._visibleGeometryChangedSchedulerHandle=s(this._visibleGeometryChangedSchedulerHandle)}_modificationsChanged(){const e=this.layer.spatialReference,t=B(this._layerClippingArea,this._modifications,e);this._wasm?.setMeshModifications(this,t,e.wkid)}_clippingAreaChanged(){const e=this.layer.spatialReference,t=P();this._layerClippingArea=te(this.view.clippingArea,t,e)?t:null,this._modificationsChanged()}_visibleGeometryChanged(){this._visibleGeometryChangedSchedulerHandle??=a(()=>{this.emit("visible-geometry-changed"),this._visibleGeometryChangedSchedulerHandle=null})}_slicePlaneEnabledChange(e){this._intersectionHandler&&(this._intersectionHandler.slicePlaneEnabled=e),this.forEachComponentObject(t=>this._collection.getMaterial(t).commonMaterialParameters.hasSlicePlane=e)}_elevationInfoChanged(e){this._wasm?.setLayerOffset(this,D(e))}get _wasm(){return $(this.view)}get wasmLayerId(){return this._wasmLayerId}get usedMemory(){return this._usedMemory}get unloadedMemory(){return 0}get cachedMemory(){return this._cacheMemory}get visibleAtCurrentScale(){return ye(this.layer.effectiveScaleRange,this.view.scale)}get performanceInfo(){let e=0,t=0,i=0,s=0,r=0,o=0;return this._lyrHandleToObjects.forEach(n=>{n.isVisible?(e+=n.textureMemoryUsage,t+=n.vboMemoryUsage,r++):(i+=n.textureMemoryUsage,s+=n.vboMemoryUsage,o++)}),new z(this.usedMemory,r,o,xe(t),xe(e),xe(s),xe(i))}_canProjectWithoutEngine(){if(2===this.view.state.viewingMode){const e=this.view.renderSpatialReference?.isWebMercator?3857:this.view.renderSpatialReference?.wkid??-1;if(3857!==e&&32662!==e)return!1}return!0}get _stage(){return this.view.stage}get _collection(){return this._stage.renderView.componentObjectCollection}get elevationProvider(){return this._elevationProvider}get elevationOffset(){return D(this.layer.elevationInfo)}get elevationRange(){const e=this.fullExtent;return e?.zmin&&e?.zmax?new ee(e.zmin,e.zmax):null}getElevationRange(e){return null}get fullExtent(){return this.layer.fullExtent}forEachComponentObject(e){this._forEachObject(this._lyrHandleToObjects.values(),e)}forEachVisibleTile(e){for(const t of this._visibleObjects)e(t)}forEachVisibleComponentObject(e){this._forEachObject(this._visibleObjects,e)}_forEachObject(e,t){for(const i of e)for(const e of i.componentObjects)t(e)}isUpdating(){const e=this._wasm;return!(this._wasmLayerId<0||null==e)&&(e.isUpdating(this._wasmLayerId)||this._compressionTracker.compressing)}updatingFlagChanged(){this.notifyChange("updating")}async createRenderable(e){const t=e.meshData;if(null==t.data)throw new Error("meshData.data undefined");if(t.desc=JSON.parse(t.desc),null==t.desc)throw new Error("meshData.desc undefined");const i=w(t.desc.origin),s=new Array,r=this.view.basemapTerrain.spatialReference;let o,n;if("global"===this.view.viewingMode){const e=p();C(M,i,e,r),o=d(m(),e),n=h(m(),o)}else o=u,n=u;const a=v(i),l=j(),c=Pe(t.desc.obb);let f=0,b=0;const y={textureMemoryUsage:0},_=new Array,P=new Map,H=t.desc.prims.length;for(let d=0;d<H;d++){const e=t.desc.prims[d];this._dbg(2,JSON.stringify(e));if(null==J[e.ptype]||null==t.data){this._dbg(2,"[Unsupported Feature] Unsupported primitive mode ("+e.ptype+"). Skipping primitive.");continue}const h=t.desc?.materials&&null!=e.materialId?t.desc.materials[e.materialId]:null,m=null!=h?h.lightingModel:"Unlit",{positionView:p,positionAttr:w,normalsView:v,normalsAttr:M,colorAttr:C,texCoord0Attr:H,indicesView:S}=this.getBufferViews(e,t.data.buffer,o);if(null==w||null==p||null==S)continue;const E=new oe(null!=C,H?1:0,null!=v,this._shadeNormals||this._replacesTerrain,this._applySSAO),R=w.data.length/w.size,V=(e,t)=>!e||e.data.length/e.size===R||(this._dbg(3,`${t} !== numPos. Skipping primitive.`),!1);if(!V(H,"numTexcoord")||!V(C,"numColors")||!V(M,"normals"))continue;const A=ne(E),k=c?.clone()??Te(w,i);if(o!==u)for(let t=0;t<p.count;t++)p.getVec(t,l),g(l,l,o),p.setVec(t,l);const F=A.createBuffer(w.data.length);if(pe("position",w,null,null,F,0),null!=H){const e=F.getField("uv0",U);fe(H,e,0)}null!=C&&pe("color",C,null,null,F,0),null!=M&&pe("normalCompressed",M,null,null,F,0);const I=new Uint32Array([0,S.typedBuffer.length]),L=new ae({data:F.buffer,count:F.byteLength/A.stride,layoutParameters:E},{positions:p.typedBuffer,indices:S.typedBuffer},S.typedBuffer,I);f+=p.count+S.count;const D=this.view.renderSpatialReference,B=j(),G=[1,1,1];O(a,D,G,r)||this._dbg(3,"Unsupported coordinate system for IM overlay"),T(a,D,B,r);const z=this._collection.createObject(new re(x(B[0],B[1],G[0],G[1]),new le(a,n),k,L,!1));if(h){const e=e=>{e.baseColor=h.baseColorFactor,e.usePBR="Pbr"===m,e.hasParametersFromSource=!1,e.baseColorTexture=this._getTexture(h.baseColorTex,t,P,y),e.usePBR&&(e.mrrFactors=[h.metallicFactor,h.roughnessFactor,0],e.emissiveBaseColor=h.emissiveFactor??[0,0,0],e.metallicRoughnessTexture=this._getTexture(h.metalTex,t,P,y),e.emissionTexture=this._getTexture(h.emissiveTex,t,P,y),e.occlusionTexture=this._getTexture(h.occlusionTex,t,P,y),e.normalTexture=this._getTexture(h.normalTex,t,P,y)),e.objectOpacity=0,e.alphaDiscardMode=2;const i=[];e.baseColorTexture&&i.push(e.baseColorTexture.loadPromise),e.usePBR&&(e.metallicRoughnessTexture&&i.push(e.metallicRoughnessTexture.loadPromise),e.emissionTexture&&i.push(e.emissionTexture.loadPromise),e.occlusionTexture&&i.push(e.occlusionTexture.loadPromise),e.normalTexture&&i.push(e.normalTexture.loadPromise));const r=Promise.all(i);s.push(r),r.then(()=>{e.alphaDiscardMode=X[h.alphaMode],e.objectOpacity=this.fullOpacity,y.textureMemoryUsage+=e.baseColorTexture?.glTexture?.usedMemory??0,e.usePBR&&(y.textureMemoryUsage+=(e.metallicRoughnessTexture?.glTexture?.usedMemory??0)+(e.emissionTexture?.glTexture?.usedMemory??0)+(e.occlusionTexture?.glTexture?.usedMemory??0)+(e.normalTexture?.glTexture?.usedMemory??0))}),e.commonMaterialParameters.doubleSided=h.isDoubleSided,e.commonMaterialParameters.cullFace=Y[h.faceCulling??"NotSet"],e.commonMaterialParameters.hasSlicePlane=this.slicePlaneEnabled,e.componentParameters.castShadows=0,e.textureAlphaCutoff=h.alphaCutoff??we,e.alphaDiscardMode=X[h.alphaMode],e.isIntegratedMesh=!0,e.sphereDepthInterpolate=this.layer.hasGoogleUrl,e.polygonOffsetEnabled=!1,e.hasOccludees=!1,e.ellipsoidMode=de(this.view.spatialReference)};this._collection.updateMaterial(z,e)}_.push(z),b+=this._collection.getObjectGPUMemoryUsage(z)}await Promise.all(s);const S=new Array;P.forEach(e=>{S.push(e)});const E=new ve(e.handle,_,S,f,b,y.textureMemoryUsage,c);return this._memCache.put(`${E.handle}`,E),this._lyrHandleToObjects.set(e.handle,E),this._cacheMemory+=E.usedMemory,{memUsageBytes:E.usedMemory}}freeRenderable(e){const t=this._lyrHandleToObjects.get(e);t&&(t.isVisible?(this._visibleObjects.delete(t),this._usedMemory-=t.usedMemory):this._cacheMemory-=t.usedMemory,this.freeObject(t),this._lyrHandleToObjects.delete(e))}freeObject(e){this._memCache.pop(`${e.handle}`),e.textures.forEach(e=>this._stage.removeTexture(e)),e.componentObjects.forEach(e=>this._collection.destroyObject(e))}setRenderableVisibility(e,t,i){for(let s=0;s<i;++s){const i=t[s];if(!i)continue;const r=e[s],o=this._lyrHandleToObjects.get(r);if(o){if(o.isVisible)continue;this._visibleGeometryChanged(),o.isVisible=!0,this._visibleObjects.add(o),this._usedMemory+=o.usedMemory,this._cacheMemory-=o.usedMemory,o.componentObjects.forEach(e=>{this._collection.setObjectVisibility(e,i),this._elevationProvider.notifyObjectChanged(this._collection.getComponentObb(e))}),this._memCache.pop(`${r}`)}}for(let s=0;s<i;++s){const i=e[s],r=t[s];if(r)continue;const o=this._lyrHandleToObjects.get(i);if(o){if(!o.isVisible)continue;this._visibleGeometryChanged(),o.isVisible=!1,this._visibleObjects.delete(o),this._usedMemory-=o.usedMemory,this._cacheMemory+=o.usedMemory,o.componentObjects.forEach(e=>{this._collection.setObjectVisibility(e,r),this._elevationProvider.notifyObjectChanged(this._collection.getComponentObb(e))}),this._memCache.put(`${i}`,o)}}}setLodPixelThreshold(e){this._wasm?.setLodPixelThreshold(this,e)}_getTexture(e,t,i,s){let r=null;if(e&&t.desc?.images&&t.data?.buffer){const o=t.desc.images[e?.imageId];if(r=i.get(o),!r&&o){const n=this._stage.renderView.renderingContext.parameters.maxMaxAnisotropy,a=!!o.mipCount||n>1,l=K[e.wrapMode??"None"];let c=o.alpha?6408:6407;const d=new Uint8Array(t.data.buffer,o.data.byteOffset,o.data.byteCount);let h=null,m=null,u=null;switch(o.format){case"Raw":"R8"===o.pixelFormat?(h=d,c=6403,m=""):"Rgb8"===o.pixelFormat?(h=d,c=6407,m=""):"Rgba8"===o.pixelFormat&&(h=d,c=6408,m="");break;case"Dxt1":h=d,c=6407,m="image/vnd-ms.dds";break;case"Dxt5":h=d,c=6408,m="image/vnd-ms.dds";break;case"Basis":h=d,c=6407,m="image/ktx2";break;case"Png":m="image/png",u=document.createElement("img");break;case"Jpeg":m="image/jpeg",u=document.createElement("img");break;case"Etc2":m="image/ktx",u=document.createElement("img");break;case"Astc":this._dbg(3,"Astc texture not supported");break;case"Pvrtc":this._dbg(3,"Pvrtc texture not supported")}if(u&&m){const e=new Blob([d],{type:m});u.src=URL.createObjectURL(e),h=u}if(h&&null!=m){const e=has("enable-feature:esri-compress-IM-textures")?{compressionTracker:this._compressionTracker,compressionCallback:e=>{e&&e>0&&(s.textureMemoryUsage-=e)}}:void 0;r=new ue(h,{mipmap:a,maxAnisotropy:n,encoding:m,wrap:l,pixelFormat:c,compressionOptions:e,noUnpackFlip:!0,width:o.mip0Width,height:o.mip0Height}),this._stage.addTexture(r),i.set(o,r)}}}return r?new ce(this.view.stage.renderView.textures,r.id):null}getBufferViews(e,t,i){let s,r,o,n,a,l,c,d=null;for(let m=0;m<e.atrbs.length;m++){const c=e.atrbs[m],u=c.view,p=void 0,f=u.byteOffset+u.byteCount,g=u.byteCount/Q[u.type],b=[...Array(g).keys()].map(e=>e);try{switch(c.sem){case"Position":3!==u.ncomp||"F32"!==u.type?this._dbg(3,"[Unsupported Feature] Unsupported view for Position ("+u+")"):(s=new R(t,u.byteOffset,p,f),r=new he(s.typedBuffer,b,3));break;case"Normal":if(3!==u.ncomp||"F32"!==u.type)this._dbg(3,"[Unsupported Feature] Unsupported view for Normal ("+u+")");else{const e=new R(t,u.byteOffset,p,f),s=me(e.typedBuffer,i);a=new k(s.buffer),l=new he(a.typedBuffer,b,2)}break;case"TexCoord":2!==u.ncomp||"F32"!==u.type?this._dbg(3,"[Unsupported Feature] Unsupported view for Texcoord ("+u+")"):void 0===n&&(n=new he(new U(t,u.byteOffset,p,f).typedBuffer,b,2));break;case"Color":4===u.ncomp?("F32"===u.type&&(d=new H(t,u.byteOffset,p,f)),"U8"===u.type&&(d=new S(t,u.byteOffset,p,f)),"U16"===u.type&&(d=new E(t,u.byteOffset,p,f))):3===u.ncomp&&("F32"===u.type&&(d=new R(t,u.byteOffset,p,f)),"U8"===u.type&&(d=new V(t,u.byteOffset,p,f)),"U16"===u.type&&(d=new A(t,u.byteOffset,p,f))),null==d?this._dbg(2,"[Unsupported Feature] Unsupported view for Color ("+u+")"):o=new he(d.typedBuffer,b,u.ncomp);break;case"FeatureIndex":break;default:this._dbg(2,"[Unsupported Feature] Unsupported semantic ("+c.sem+"). Skipping vertex attribute.")}}catch(h){this._dbg(2,"Error Creating buffer ("+h+"). Skipping vertex attribute.")}}if(e.index){const i=e.index.view,s=void 0,r=i.byteOffset+i.byteCount;switch(e.index.view.type){case"U16":c=new I(t,i.byteOffset,s,r);break;case"U32":c=new F(t,i.byteOffset,s,r);break;default:this._dbg(3,"[Unsupported Feature] index type not supported ("+i.type+").")}}if(null==c&&null!=s){const e=s.count;if(e<65535){const t=new Uint16Array(e);c=new I(t.buffer)}else{const t=new Uint32Array(e);c=new F(t.buffer)}for(let t=0;t<e;t++)c.set(t,t)}return{positionView:s,positionAttr:r,colorAttr:o,texCoord0Attr:n,indicesView:c,normalsView:a,normalsAttr:l}}_loadModifications(){if(this.removeHandles("modifications"),null==this.layer.modifications)return void(this._modifications=[]);const e=this.layer.modifications;this.addHandles(this._updatingHandles.addOnCollectionChange(()=>e,()=>this._modifications=e.toArray(),r),"modifications")}_deletePerObjectData(e){this._wasm?.onRenderableEvicted(this,e.handle,e.usedMemory),this.freeRenderable(e.handle)}_dbg(e,i){this._dbgFlags.has(e)&&(3===e?t.getLogger(this).error(i):t.getLogger(this).warn(i))}};e([l()],Me.prototype,"fullOpacity",null),e([l({type:[L]})],Me.prototype,"_modifications",void 0),e([l()],Me.prototype,"_visibleGeometryChangedSchedulerHandle",void 0),e([l()],Me.prototype,"layer",void 0),e([l({readOnly:!0})],Me.prototype,"visibleAtCurrentScale",null),e([l()],Me.prototype,"elevationOffset",null),Me=e([c("esri.views.3d.layers.IntegratedMesh3DTilesLayerView3D")],Me);const Ce=Me,Oe=j();function Te(e,t){const i=se(e);return b(Oe,i.center,t),i.center=Oe,i}function Pe(e){return e?new ie(e.center,e.halfSize,f(...e.quaternion)):null}export{Ce as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{whenOnce as i}from"../../../core/reactiveUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerViewPerformanceInfo as l}from"./support/LayerViewPerformanceInfo.js";import{updatingProgress as s,updatingProgressValue as n}from"../support/updatingProperties.js";import{checkIfTileInfoSupportedForView as o}from"../terrain/terrainUtils.js";import{isScaleRangeActive as c,validateScaleRange as h}from"../../support/layerViewUtils.js";const p=p=>{const m=p;let u=class extends m{constructor(){super(...arguments),this.hasMixedImageFormats=!0}get imageFormatIsOpaque(){return!1}get fullExtent(){return this.layer.fullExtent}get isOpaque(){return this.fullOpacity>=1&&this.imageFormatIsOpaque}get visibleAtCurrentScale(){const{minScale:e,maxScale:t}=this.layer;if(!c(e,t))return!0;const{basemapTerrain:i}=this.view,r=i.getLayerIndexByUID(1,this.uid);if(null==r)return!1;const{tilingScheme:a}=i,l=e&&a.levelAtScale(e),s=t&&a.levelAtScale(t);return i.renderer.visibleTiles.some(e=>!!e.layerInfo[1][r]&&(!l||e.level>=l)&&(!s||e.level<=s))}get dataScaleRange(){const e=this.tileInfo.lods;let t=e[0].scale,i=e[e.length-1].scale;if("tilemapCache"in this.layer&&this.layer.tilemapCache){const{effectiveMinLOD:e,effectiveMaxLOD:r}=this.layer.tilemapCache;t=this.tileInfo.lodAt(e).scale,i=this.tileInfo.lodAt(r).scale}return{minScale:t,maxScale:i}}canResume(){const e=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;return this.visible&&this.layer?.loaded&&!this.parent?.suspended&&this.view?.ready&&h(e)&&this.visibleAtCurrentTimeExtent||!1}get dataLevelRange(){const{minScale:e,maxScale:t}=this.dataScaleRange;return this.levelRangeFromScaleRange(e,t)}get fetchLevelRange(){return this.dataLevelRange}get displayLevelRange(){const e=this.layer.minScale||this.dataScaleRange.minScale,t=this.layer.maxScale||this.dataScaleRange.maxScale,i=this.levelRangeFromScaleRange(e,t);return this.layer.maxScale&&i.maxLevel++,i}get performanceInfo(){return new l(this.view.basemapTerrain.getUsedMemoryForLayerView(this))}getTileUrl(e){return this.layer.getTileUrl(e[0],e[1],e[2])}_addTilingSchemeMatchPromise(){if(null==this.fullExtent)return this.addResolvingPromise(Promise.reject(new t("tilingscheme:extent-not-defined","This layer doesn't define a fullExtent.")));const e=this._getTileInfoSupportError(this.tileInfo,this.fullExtent);if(e)return this.addResolvingPromise(Promise.reject(e));this.addResolvingPromise(i(()=>this.view?.basemapTerrain?.tilingSchemeLocked).then(()=>{const e=this.view.basemapTerrain.tilingScheme,t="tilemapCache"in this.layer?this.layer.tilemapCache?.effectiveMaxLOD:void 0,i=this._getTileInfoCompatibilityError(this.tileInfo,e,t);if(i)throw i}))}_getTileInfoSupportError(e,i){const r=o(e,i,this.view.spatialReference,this.view.state.viewingMode,"tilemapCache"in this.layer?this.layer.tilemapCache?.effectiveMaxLOD:void 0);if(!r)return;const a={layer:this.layer,error:r};switch(r.name){case"tilingscheme:spatial-reference-mismatch":case"tilingscheme:global-unsupported-spatial-reference":case"tilingscheme:local-unsupported-spatial-reference":return new t("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",a);default:return new t("layerview:tiling-scheme-unsupported","The tiling scheme of this layer is not supported by SceneView",a)}}_getTileInfoCompatibilityError(e,i,r){return null!=e&&i.compatibleWith(e,r)?null:new t("layerview:tiling-scheme-incompatible","The tiling scheme of this layer is incompatible with the tiling scheme of the surface")}levelRangeFromScaleRange(e,t){const i={minLevel:0,maxLevel:1/0},r=this.view&&this.view.basemapTerrain&&this.view.basemapTerrain.tilingScheme;if(!r)return i;const a=r.levels[0],l=e=>{const t=Math.log(a.scale/e)/Math.LN2;return.5-Math.abs(.5-t%1)<1e-9?Math.round(t):Math.ceil(t)};return null!=e&&e>0&&(i.minLevel=Math.max(0,l(e))),null!=t&&t>0&&(i.maxLevel=Math.max(0,l(t))),i}isUpdating(){return!!(this.view&&this.view.basemapTerrain&&this.view.basemapTerrain.updating)}};return e([r({readOnly:!0})],u.prototype,"imageFormatIsOpaque",null),e([r({readOnly:!0})],u.prototype,"updating",void 0),e([r(s)],u.prototype,"updatingProgress",void 0),e([r(n)],u.prototype,"updatingProgressValue",void 0),e([r()],u.prototype,"hasMixedImageFormats",void 0),e([r()],u.prototype,"fullExtent",null),e([r({readOnly:!0})],u.prototype,"isOpaque",null),e([r({readOnly:!0})],u.prototype,"visibleAtCurrentScale",null),e([r()],u.prototype,"dataScaleRange",null),e([r({readOnly:!0})],u.prototype,"dataLevelRange",null),e([r({readOnly:!0})],u.prototype,"fetchLevelRange",null),e([r({readOnly:!0})],u.prototype,"displayLevelRange",null),e([r()],u.prototype,"layer",void 0),u=e([a("esri.views.3d.layers.TiledLayerView3D")],u),u};export{p as TiledLayerView3D};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{whenOnce as i}from"../../../core/reactiveUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerViewPerformanceInfo as l}from"./support/LayerViewPerformanceInfo.js";import{updatingProgress as s,updatingProgressValue as n}from"../support/updatingProperties.js";import{checkIfTileInfoSupportedForView as o}from"../terrain/terrainUtils.js";import{isScaleRangeActive as c,validateScaleRange as h}from"../../support/layerViewUtils.js";const p=p=>{const m=p;let u=class extends m{constructor(){super(...arguments),this.hasMixedImageFormats=!0}get imageFormatIsOpaque(){return!1}get fullExtent(){return this.layer.fullExtent}get isOpaque(){return this.fullOpacity>=1&&this.imageFormatIsOpaque}tilesVisibleAtCurrentScale(){const{minScale:e,maxScale:t}=this.layer;if(!c(e,t))return!0;const{basemapTerrain:i}=this.view,r=i.getLayerIndexByUID(1,this.uid);if(null==r)return!1;const{tilingScheme:a}=i,l=e&&a.levelAtScale(e),s=t&&a.levelAtScale(t);return i.renderer.visibleTiles.some(e=>!!e.layerInfo[1][r]&&(!l||e.level>=l)&&(!s||e.level<=s))}get visibleAtCurrentScale(){return this.tilesVisibleAtCurrentScale()}get dataScaleRange(){const e=this.tileInfo.lods;let t=e[0].scale,i=e[e.length-1].scale;if("tilemapCache"in this.layer&&this.layer.tilemapCache){const{effectiveMinLOD:e,effectiveMaxLOD:r}=this.layer.tilemapCache;t=this.tileInfo.lodAt(e).scale,i=this.tileInfo.lodAt(r).scale}return{minScale:t,maxScale:i}}canResume(){const e=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;return this.visible&&this.layer?.loaded&&!this.parent?.suspended&&this.view?.ready&&h(e)&&this.visibleAtCurrentTimeExtent||!1}get dataLevelRange(){const{minScale:e,maxScale:t}=this.dataScaleRange;return this.levelRangeFromScaleRange(e,t)}get displayLevelRange(){const e=this.layer.minScale||this.dataScaleRange.minScale,t=this.layer.maxScale||this.dataScaleRange.maxScale,i=this.levelRangeFromScaleRange(e,t);return this.layer.maxScale&&i.maxLevel++,i}get performanceInfo(){return new l(this.view.basemapTerrain.getUsedMemoryForLayerView(this))}getTileUrl(e){return this.layer.getTileUrl(e[0],e[1],e[2])}_addTilingSchemeMatchPromise(){if(null==this.fullExtent)return this.addResolvingPromise(Promise.reject(new t("tilingscheme:extent-not-defined","This layer doesn't define a fullExtent.")));const e=this._getTileInfoSupportError(this.tileInfo,this.fullExtent);if(e)return this.addResolvingPromise(Promise.reject(e));this.addResolvingPromise(i(()=>this.view?.basemapTerrain?.tilingSchemeLocked).then(()=>{const e=this.view.basemapTerrain.tilingScheme,t="tilemapCache"in this.layer?this.layer.tilemapCache?.effectiveMaxLOD:void 0,i=this._getTileInfoCompatibilityError(this.tileInfo,e,t);if(i)throw i}))}_getTileInfoSupportError(e,i){const r=o(e,i,this.view.spatialReference,this.view.state.viewingMode,"tilemapCache"in this.layer?this.layer.tilemapCache?.effectiveMaxLOD:void 0);if(!r)return;const a={layer:this.layer,error:r};switch(r.name){case"tilingscheme:spatial-reference-mismatch":case"tilingscheme:global-unsupported-spatial-reference":case"tilingscheme:local-unsupported-spatial-reference":return new t("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",a);default:return new t("layerview:tiling-scheme-unsupported","The tiling scheme of this layer is not supported by SceneView",a)}}_getTileInfoCompatibilityError(e,i,r){return null!=e&&i.compatibleWith(e,r)?null:new t("layerview:tiling-scheme-incompatible","The tiling scheme of this layer is incompatible with the tiling scheme of the surface")}levelRangeFromScaleRange(e,t){const i={minLevel:0,maxLevel:1/0},r=this.view&&this.view.basemapTerrain&&this.view.basemapTerrain.tilingScheme;if(!r)return i;const a=r.levels[0],l=e=>{const t=Math.log(a.scale/e)/Math.LN2;return.5-Math.abs(.5-t%1)<1e-9?Math.round(t):Math.ceil(t)};return null!=e&&e>0&&(i.minLevel=Math.max(0,l(e))),null!=t&&t>0&&(i.maxLevel=Math.max(0,l(t))),i}isUpdating(){return!!(this.view&&this.view.basemapTerrain&&this.view.basemapTerrain.updating)}};return e([r({readOnly:!0})],u.prototype,"imageFormatIsOpaque",null),e([r({readOnly:!0})],u.prototype,"updating",void 0),e([r(s)],u.prototype,"updatingProgress",void 0),e([r(n)],u.prototype,"updatingProgressValue",void 0),e([r()],u.prototype,"hasMixedImageFormats",void 0),e([r()],u.prototype,"fullExtent",null),e([r({readOnly:!0})],u.prototype,"isOpaque",null),e([r({readOnly:!0})],u.prototype,"visibleAtCurrentScale",null),e([r()],u.prototype,"dataScaleRange",null),e([r({readOnly:!0})],u.prototype,"dataLevelRange",null),e([r({readOnly:!0})],u.prototype,"displayLevelRange",null),e([r()],u.prototype,"layer",void 0),u=e([a("esri.views.3d.layers.TiledLayerView3D")],u),u};export{p as TiledLayerView3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{neverReached as e}from"../../../../core/compilerUtils.js";import has from"../../../../core/has.js";import{defaultPrimitive as r}from"../../../../symbols/support/ObjectSymbol3DLayerResource.js";import{pathNumCircleProfileSubdivisions as t,pathNumRoundJoinSubdivisions as a,pathNumRoundCapExtrusionSubdivisions as s}from"./Graphics3DPathSymbolLayerConstants.js";import{primitiveLodResources as u}from"./primitiveObjectSymbolUtils.js";import{EstimatedSymbolComplexity as o,SymbolComplexityMemory as b,EstimatedAggregateSymbolComplexity as y,AggregateSymbolComplexity as i,SymbolComplexity as c}from"./SymbolComplexity.js";import{hasEdges as n}from"../support/edgeUtils.js";import{DefaultMaterial as l}from"../../webgl-engine/materials/DefaultMaterial.js";const P=new o({});function m(e){if("web-style"===e.type)return P;return F(e.symbolLayers.toArray().map(r=>L(e,r)))}function F(e){let r=0,t=0,a=0,s=!1,u=0;const o=new b;for(const b of e)null!=b&&(r+=b.verticesPerFeature,t+=b.verticesPerCoordinate,a+=b.drawCallsPerFeature,o.bytesPerFeature+=b.memory.bytesPerFeature,o.bytesPerFeatureLabel+=b.memory.bytesPerFeatureLabel,o.resourceBytes+=b.memory.resourceBytes,o.draped.bytesPerFeature+=b.memory.bytesPerFeature,o.draped.bytesPerFeatureLabel+=b.memory.bytesPerFeatureLabel,s=s||b.estimated,++u);return s?new y(u,{verticesPerFeature:r,verticesPerCoordinate:t,drawCallsPerFeature:a,memory:o}):new i(u,{verticesPerFeature:r,verticesPerCoordinate:t,drawCallsPerFeature:a,memory:o})}function d(e){const r=F(e);return r.numComplexities>0&&(r.verticesPerFeature/=r.numComplexities,r.verticesPerCoordinate/=r.numComplexities,r.drawCallsPerFeature/=r.numComplexities,r.memory.bytesPerFeature/=r.numComplexities,r.memory.bytesPerFeatureLabel/=r.numComplexities,r.memory.resourceBytes/=r.numComplexities,r.memory.draped.bytesPerFeature/=r.numComplexities,r.memory.draped.bytesPerFeatureLabel/=r.numComplexities),r}const p={};function L(u,b){const y=C(u,b),i=n(b)?2:0;switch(b.type){case"extrude":return new c({verticesPerFeature:-12,verticesPerCoordinate:12,drawCallsPerFeature:i,memory:y});case"fill":if("mesh-3d"===u.type)return new c({drawCallsPerFeature:i,memory:y});if(null!=b.outline&&b.outline.size>0)return new c({verticesPerFeature:-12,verticesPerCoordinate:9,memory:y});case"water":return new c({verticesPerFeature:-6,verticesPerCoordinate:3,memory:y});case"line":return new c({verticesPerFeature:-6,verticesPerCoordinate:6,memory:y});case"object":return b.resource?.href?new o({verticesPerFeature:100,memory:y}):{...f(b.resource?.primitive??r),memory:y};case"path":{let r=0,u=0;switch(b.profile){case"circle":r=t;break;case"quad":r=4;break;default:return void e(b.profile)}switch(b.join){case"round":u=a;break;case"miter":case"bevel":u=1;break;default:return}const o=2*r,i=r*u*2,n=i+o;let l=-2*i-o;switch(b.cap){case"none":break;case"butt":case"square":l+=2*(r-1);break;case"round":l+=2*(r*(s-1)*2+r);break;default:return}return new c({verticesPerFeature:l,verticesPerCoordinate:n,memory:y})}case"text":{const e="label-3d"===u.type?0:2;return new c({verticesPerFeature:6,memory:y,drawCallsPerFeature:e})}case"icon":return new c({verticesPerFeature:6,memory:y});default:return}}function C(r,t){const a="point-3d"===r.type;switch(t.type){case"extrude":return t.edges&&t.edges.size>0?E.EXTRUDE_EDGES:E.EXTRUDE;case"fill":return null!=t.outline&&t.outline.size>0?E.FILL_OUTLINE:E.FILL;case"water":return E.FILL;case"line":return"round"===t.join?E.LINE_ROUND:E.LINE_MITER;case"path":switch(t.join){case"round":switch(t.profile){case"circle":return E.PATH_ROUND_CIRCLE;case"quad":return E.PATH_ROUND_QUAD;default:return void e(t.profile)}case"miter":case"bevel":switch(t.profile){case"circle":return E.PATH_MITER_CIRCLE;case"quad":return E.PATH_MITER_QUAD;default:return void e(t.profile)}default:return}case"object":return a?E.OBJECT_POINT:E.OBJECT_POLYGON;case"icon":case"text":return a?E.ICON_POINT:E.ICON_POLYGON;default:return}}function f(e){const r=p[e];if(r)return r;const t=w(u(e,new l({},{spherical:!0})).levels);return p[e]=new c({verticesPerFeature:t}),p[e]}function w(e){return e.reduce((e,r,t)=>e+r.numVertices*(1/10**t),0)/e.reduce((e,r,t)=>e+1/10**t,0)}const E={ICON_POINT:{bytesPerFeature:2658,bytesPerFeatureLabel:3484,resourceBytes:0,draped:{bytesPerFeature:1845,bytesPerFeatureLabel:3498}},ICON_POLYGON:{bytesPerFeature:3086,bytesPerFeatureLabel:2996,resourceBytes:0,draped:{bytesPerFeature:2694,bytesPerFeatureLabel:3014}},OBJECT_POINT:{bytesPerFeature:497,bytesPerFeatureLabel:2933,resourceBytes:0,draped:{bytesPerFeature:497,bytesPerFeatureLabel:2933}},OBJECT_POLYGON:{bytesPerFeature:867,bytesPerFeatureLabel:2491,resourceBytes:0,draped:{bytesPerFeature:867,bytesPerFeatureLabel:2491}},LINE_MITER:{bytesPerFeature:2337,bytesPerFeatureLabel:2658,resourceBytes:0,draped:{bytesPerFeature:1864,bytesPerFeatureLabel:2656}},LINE_ROUND:{bytesPerFeature:2341,bytesPerFeatureLabel:2672,resourceBytes:0,draped:{bytesPerFeature:1873,bytesPerFeatureLabel:2643}},PATH_MITER_CIRCLE:{bytesPerFeature:22374,bytesPerFeatureLabel:2558,resourceBytes:0,draped:{bytesPerFeature:22374,bytesPerFeatureLabel:2558}},PATH_ROUND_CIRCLE:{bytesPerFeature:24004,bytesPerFeatureLabel:2598,resourceBytes:0,draped:{bytesPerFeature:24004,bytesPerFeatureLabel:2598}},PATH_MITER_QUAD:{bytesPerFeature:24040,bytesPerFeatureLabel:2940,resourceBytes:0,draped:{bytesPerFeature:24040,bytesPerFeatureLabel:2940}},PATH_ROUND_QUAD:{bytesPerFeature:23088,bytesPerFeatureLabel:2886,resourceBytes:0,draped:{bytesPerFeature:23088,bytesPerFeatureLabel:2886}},FILL:{bytesPerFeature:3059,bytesPerFeatureLabel:2838,resourceBytes:0,draped:{bytesPerFeature:2352,bytesPerFeatureLabel:2808}},FILL_OUTLINE:{bytesPerFeature:3093,bytesPerFeatureLabel:2632,resourceBytes:0,draped:{bytesPerFeature:2480,bytesPerFeatureLabel:2601}},EXTRUDE:{bytesPerFeature:5075,bytesPerFeatureLabel:2559,resourceBytes:0,draped:{bytesPerFeature:5075,bytesPerFeatureLabel:2559}},EXTRUDE_EDGES:{bytesPerFeature:2843,bytesPerFeatureLabel:2139,resourceBytes:0,draped:{bytesPerFeature:2843,bytesPerFeatureLabel:2139}}};if(has("esri-tests-disable-symbol-memory-estimators"))for(const _ in E){const e=E[_];e.bytesPerFeature=0,e.bytesPerFeatureLabel=0,e.draped.bytesPerFeature=0,e.draped.bytesPerFeatureLabel=0}export{d as averageSymbolComplexities,m as defaultSymbolComplexity,L as defaultSymbolLayerComplexity,C as defaultSymbolLayerMemoryComplexity,P as emptySymbolComplexity,w as estimateNumVerticesForLods,F as totalSymbolComplexities};
5
+ import{neverReached as e}from"../../../../core/compilerUtils.js";import has from"../../../../core/has.js";import{defaultPrimitive as r}from"../../../../symbols/support/ObjectSymbol3DLayerResource.js";import{pathNumCircleProfileSubdivisions as t,pathNumRoundJoinSubdivisions as a,pathNumRoundCapExtrusionSubdivisions as s}from"./Graphics3DPathSymbolLayerConstants.js";import{primitiveLodResources as u}from"./primitiveObjectSymbolUtils.js";import{EstimatedSymbolComplexity as o,SymbolComplexityMemory as b,EstimatedAggregateSymbolComplexity as y,AggregateSymbolComplexity as i,SymbolComplexity as c}from"./SymbolComplexity.js";import{hasEdges as n}from"../support/edgeUtils.js";import{DefaultMaterial as l}from"../../webgl-engine/materials/DefaultMaterial.js";const P=new o({});function m(e){if("web-style"===e.type)return P;return F(e.symbolLayers.toArray().map(r=>L(e,r)))}function F(e){let r=0,t=0,a=0,s=!1,u=0;const o=new b;for(const b of e)null!=b&&(r+=b.verticesPerFeature,t+=b.verticesPerCoordinate,a+=b.drawCallsPerFeature,o.bytesPerFeature+=b.memory.bytesPerFeature,o.bytesPerFeatureLabel+=b.memory.bytesPerFeatureLabel,o.resourceBytes+=b.memory.resourceBytes,o.draped.bytesPerFeature+=b.memory.bytesPerFeature,o.draped.bytesPerFeatureLabel+=b.memory.bytesPerFeatureLabel,s=s||b.estimated,++u);return s?new y(u,{verticesPerFeature:r,verticesPerCoordinate:t,drawCallsPerFeature:a,memory:o}):new i(u,{verticesPerFeature:r,verticesPerCoordinate:t,drawCallsPerFeature:a,memory:o})}function d(e){const r=F(e);return r.numComplexities>0&&(r.verticesPerFeature/=r.numComplexities,r.verticesPerCoordinate/=r.numComplexities,r.drawCallsPerFeature/=r.numComplexities,r.memory.bytesPerFeature/=r.numComplexities,r.memory.bytesPerFeatureLabel/=r.numComplexities,r.memory.resourceBytes/=r.numComplexities,r.memory.draped.bytesPerFeature/=r.numComplexities,r.memory.draped.bytesPerFeatureLabel/=r.numComplexities),r}const p={};function L(u,b){const y=C(u,b),i=n(b)?2:0;switch(b.type){case"extrude":return new c({verticesPerFeature:-12,verticesPerCoordinate:12,drawCallsPerFeature:i,memory:y});case"fill":if("mesh-3d"===u.type)return new c({drawCallsPerFeature:i,memory:y});if(null!=b.outline&&b.outline.size>0)return new c({verticesPerFeature:-12,verticesPerCoordinate:9,memory:y});case"water":return new c({verticesPerFeature:-6,verticesPerCoordinate:3,memory:y});case"line":return new c({verticesPerFeature:-6,verticesPerCoordinate:6,memory:y});case"object":return b.resource?.href?new o({verticesPerFeature:100,memory:y}):{...f(b.resource?.primitive??r),memory:y};case"path":{let r=0,u=0;switch(b.profile){case"circle":r=t;break;case"quad":r=4;break;default:return void e(b.profile)}switch(b.join){case"round":u=a;break;case"miter":case"bevel":u=1;break;default:return}const o=2*r,i=r*u*2,n=i+o;let l=-2*i-o;switch(b.cap){case"none":break;case"butt":case"square":l+=2*(r-1);break;case"round":l+=2*(r*(s-1)*2+r);break;default:return}return new c({verticesPerFeature:l,verticesPerCoordinate:n,memory:y})}case"text":{const e="label-3d"===u.type?0:2;return new c({verticesPerFeature:6,memory:y,drawCallsPerFeature:e})}case"icon":return new c({verticesPerFeature:6,memory:y});default:return}}function C(r,t){const a="point-3d"===r.type;switch(t.type){case"extrude":return t.edges&&t.edges.size>0?E.EXTRUDE_EDGES:E.EXTRUDE;case"fill":return null!=t.outline&&t.outline.size>0?E.FILL_OUTLINE:E.FILL;case"water":return E.FILL;case"line":return"round"===t.join?E.LINE_ROUND:E.LINE_MITER;case"path":switch(t.join){case"round":switch(t.profile){case"circle":return E.PATH_ROUND_CIRCLE;case"quad":return E.PATH_ROUND_QUAD;default:return void e(t.profile)}case"miter":case"bevel":switch(t.profile){case"circle":return E.PATH_MITER_CIRCLE;case"quad":return E.PATH_MITER_QUAD;default:return void e(t.profile)}default:return}case"object":return a?E.OBJECT_POINT:E.OBJECT_POLYGON;case"icon":case"text":return a?E.ICON_POINT:E.ICON_POLYGON;default:return}}function f(e){const r=p[e];if(r)return r;const t=w(u(e,new l({},{spherical:!0})).levels);return p[e]=new c({verticesPerFeature:t}),p[e]}function w(e){return e.reduce((e,r,t)=>e+r.numVertices*(1/10**t),0)/e.reduce((e,r,t)=>e+1/10**t,0)}const E={ICON_POINT:{bytesPerFeature:2658,bytesPerFeatureLabel:3484,resourceBytes:0,draped:{bytesPerFeature:1845,bytesPerFeatureLabel:3498}},ICON_POLYGON:{bytesPerFeature:3086,bytesPerFeatureLabel:2996,resourceBytes:0,draped:{bytesPerFeature:2694,bytesPerFeatureLabel:3014}},OBJECT_POINT:{bytesPerFeature:497,bytesPerFeatureLabel:2933,resourceBytes:0,draped:{bytesPerFeature:497,bytesPerFeatureLabel:2933}},OBJECT_POLYGON:{bytesPerFeature:867,bytesPerFeatureLabel:2491,resourceBytes:0,draped:{bytesPerFeature:867,bytesPerFeatureLabel:2491}},LINE_MITER:{bytesPerFeature:2337,bytesPerFeatureLabel:2658,resourceBytes:0,draped:{bytesPerFeature:1864,bytesPerFeatureLabel:2656}},LINE_ROUND:{bytesPerFeature:2341,bytesPerFeatureLabel:2672,resourceBytes:0,draped:{bytesPerFeature:1873,bytesPerFeatureLabel:2643}},PATH_MITER_CIRCLE:{bytesPerFeature:22374,bytesPerFeatureLabel:2558,resourceBytes:0,draped:{bytesPerFeature:22374,bytesPerFeatureLabel:2558}},PATH_ROUND_CIRCLE:{bytesPerFeature:24004,bytesPerFeatureLabel:2598,resourceBytes:0,draped:{bytesPerFeature:24004,bytesPerFeatureLabel:2598}},PATH_MITER_QUAD:{bytesPerFeature:24040,bytesPerFeatureLabel:2940,resourceBytes:0,draped:{bytesPerFeature:24040,bytesPerFeatureLabel:2940}},PATH_ROUND_QUAD:{bytesPerFeature:23088,bytesPerFeatureLabel:2886,resourceBytes:0,draped:{bytesPerFeature:23088,bytesPerFeatureLabel:2886}},FILL:{bytesPerFeature:3059,bytesPerFeatureLabel:2838,resourceBytes:0,draped:{bytesPerFeature:2352,bytesPerFeatureLabel:2808}},FILL_OUTLINE:{bytesPerFeature:3093,bytesPerFeatureLabel:2632,resourceBytes:0,draped:{bytesPerFeature:2480,bytesPerFeatureLabel:2601}},EXTRUDE:{bytesPerFeature:5075,bytesPerFeatureLabel:2559,resourceBytes:0,draped:{bytesPerFeature:5075,bytesPerFeatureLabel:2559}},EXTRUDE_EDGES:{bytesPerFeature:2843,bytesPerFeatureLabel:2139,resourceBytes:0,draped:{bytesPerFeature:2843,bytesPerFeatureLabel:2139}}};if(has("esri-tests-disable-symbol-memory-estimators"))for(const _ in E){const e=E[_];e.bytesPerFeature=0,e.bytesPerFeatureLabel=0,e.draped.bytesPerFeature=0,e.draped.bytesPerFeatureLabel=0}export{d as averageSymbolComplexities,m as defaultSymbolComplexity,L as defaultSymbolLayerComplexity,C as defaultSymbolLayerMemoryComplexity,P as emptySymbolComplexity,w as estimateNumVerticesForLods,E as memoryEstimators,F as totalSymbolComplexities};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../core/has.js";import{Milliseconds as e}from"../../../core/time.js";class a{static isValidProfile(e){return e in l}static getDefaultProfile(){return has("esri-iPhone")?"low":"medium"}static apply(e,a){const i=l[e];a.graphics3D.maxTotalNumberOfFeatures=i.graphics3D.maxTotalNumberOfFeatures,a.graphics3D.maxNumberOfDrawCalls=i.graphics3D.maxNumberOfDrawCalls,a.graphics3D.maxTotalNumberOfVertices=i.graphics3D.maxTotalNumberOfVertices,a.graphics3D.polygonLodFactor=i.graphics3D.polygonLodFactor,a.graphics3D.polylineLodFactor=i.graphics3D.polylineLodFactor,a.graphics3D.snapshotAvailable=i.graphics3D.snapshotAvailable,a.graphics3D.skipHighSymbolLods=i.graphics3D.skipHighSymbolLods;const t=a.sceneService.object,o=i.sceneService.object;t.lodFactor=o.lodFactor,a.sceneService.point.lodFactor=i.sceneService.point.lodFactor,a.sceneService.integratedMesh.lodFactor=i.sceneService.integratedMesh.lodFactor,a.sceneService.pointCloud.lodFactor=i.sceneService.pointCloud.lodFactor,a.tiledSurface.lodBias=i.tiledSurface.lodBias,a.tiledSurface.angledSplitBias=i.tiledSurface.angledSplitBias,a.tiledSurface.vtlContentZoom=i.tiledSurface.vtlContentZoom,a.tiledSurface.elevationLevelDelta=i.tiledSurface.elevationLevelDelta,a.tiledSurface.reduceTileLevelDifferences=i.tiledSurface.reduceTileLevelDifferences,a.gaussianSplat.minimumSplatPixelRadius=i.gaussianSplat.minimumSplatPixelRadius,a.gaussianSplat.minimumOpacity=i.gaussianSplat.minimumOpacity,a.gaussianSplat.maxAllowedVisibleGaussians=i.gaussianSplat.maxAllowedVisibleGaussians,a.heatmap.pixelRatio=i.heatmap.pixelRatio,a.fadeDuration=i.fadeDuration,a.antialiasingEnabled=i.antialiasingEnabled,a.physicallyBasedRenderingEnabled=i.physicalBasedRenderingEnabled,a.highQualityTransparency=i.highQualityTransparency,a.highResolutionAtmosphere=i.highResolutionAtmosphere,a.reflections=i.reflections,a.ambientOcclusion=i.ambientOcclusion,a.maxTexturePixels=i.maxTexturePixels,a.memoryLimit=i.memoryLimit,a.additionalCacheMemory=i.additionalCacheMemory,a.frameRate=i.frameRate,a.maximumPixelRatio=i.maximumPixelRatio}static{this.test={reset(){const e=t();for(const a of Object.keys(e))l[a]=e[a]}}}}const i={IPhone12Pro:120,GalaxyS20:200,FullHD:240,SurfacePro7:300,FullHDRetina:430},l=t();function t(){const a=!!has("esri-mobile"),l=!!has("ios"),t=e(400);return{low:{graphics3D:{maxTotalNumberOfFeatures:5e4,maxNumberOfDrawCalls:8e3,maxTotalNumberOfVertices:255e4,polygonLodFactor:.5,polylineLodFactor:1,snapshotAvailable:!1,skipHighSymbolLods:!0},heatmap:{pixelRatio:.125},sceneService:{object:{lodFactor:.2},point:{lodFactor:1},integratedMesh:{lodFactor:.6},pointCloud:{lodFactor:.5}},gaussianSplat:{minimumSplatPixelRadius:2,minimumOpacity:.1,maxAllowedVisibleGaussians:4e6},tiledSurface:{lodBias:-1,angledSplitBias:.5,vtlContentZoom:.75,elevationLevelDelta:3,reduceTileLevelDifferences:!0},fadeDuration:e(0),antialiasingEnabled:!1,physicalBasedRenderingEnabled:!1,highQualityTransparency:!1,highResolutionAtmosphere:!1,reflections:!1,ambientOcclusion:!1,maxTexturePixels:a?1048576:4194304,memoryLimit:200+i.IPhone12Pro,additionalCacheMemory:0,frameRate:0,maximumPixelRatio:1},medium:{graphics3D:{maxTotalNumberOfFeatures:15e4,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:625e4,polygonLodFactor:a?.8:1,polylineLodFactor:a?1.2:1.5,snapshotAvailable:!l,skipHighSymbolLods:!1},heatmap:{pixelRatio:.25},sceneService:{object:{lodFactor:1},point:{lodFactor:1},integratedMesh:{lodFactor:1},pointCloud:{lodFactor:1}},gaussianSplat:{minimumSplatPixelRadius:1,minimumOpacity:.05,maxAllowedVisibleGaussians:8e6},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:3,reduceTileLevelDifferences:!has("disable-feature:reduce-map-tile-levels")},fadeDuration:t,antialiasingEnabled:!1,physicalBasedRenderingEnabled:!0,highQualityTransparency:!0,highResolutionAtmosphere:!1,reflections:!1,ambientOcclusion:!1,maxTexturePixels:a?4194304:4096**2,memoryLimit:a?600+i.GalaxyS20:750+i.FullHD,additionalCacheMemory:a?-100:150,frameRate:0,maximumPixelRatio:1},high:{graphics3D:{maxTotalNumberOfFeatures:3e5,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:125e5,polygonLodFactor:a?1.2:2,polylineLodFactor:a?1.2:2,snapshotAvailable:!l,skipHighSymbolLods:!1},heatmap:{pixelRatio:.5},sceneService:{object:{lodFactor:1},point:{lodFactor:1},integratedMesh:{lodFactor:1},pointCloud:{lodFactor:1}},gaussianSplat:{minimumSplatPixelRadius:.5,minimumOpacity:.005,maxAllowedVisibleGaussians:16e6},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:2,reduceTileLevelDifferences:!has("disable-feature:reduce-map-tile-levels")},fadeDuration:t,antialiasingEnabled:!0,physicalBasedRenderingEnabled:!0,highQualityTransparency:!0,highResolutionAtmosphere:!0,reflections:!0,ambientOcclusion:!0,maxTexturePixels:a?4096**2:1/0,memoryLimit:a?900+i.SurfacePro7:1500+i.FullHDRetina,additionalCacheMemory:a?-150:0,frameRate:0,maximumPixelRatio:a?1:1/0}}}export{a as default};
5
+ import has from"../../../core/has.js";import{Milliseconds as e}from"../../../core/time.js";class a{static isValidProfile(e){return e in l}static getDefaultProfile(){return has("esri-iPhone")?"low":"medium"}static apply(e,a){const i=l[e];a.graphics3D.maxTotalNumberOfFeatures=i.graphics3D.maxTotalNumberOfFeatures,a.graphics3D.maxNumberOfDrawCalls=i.graphics3D.maxNumberOfDrawCalls,a.graphics3D.maxTotalNumberOfVertices=i.graphics3D.maxTotalNumberOfVertices,a.graphics3D.polygonLodFactor=i.graphics3D.polygonLodFactor,a.graphics3D.polylineLodFactor=i.graphics3D.polylineLodFactor,a.graphics3D.snapshotAvailable=i.graphics3D.snapshotAvailable,a.graphics3D.skipHighSymbolLods=i.graphics3D.skipHighSymbolLods;const t=a.sceneService.object,o=i.sceneService.object;t.lodFactor=o.lodFactor,a.sceneService.point.lodFactor=i.sceneService.point.lodFactor,a.sceneService.integratedMesh.lodFactor=i.sceneService.integratedMesh.lodFactor,a.sceneService.pointCloud.lodFactor=i.sceneService.pointCloud.lodFactor,a.tiledSurface.lodBias=i.tiledSurface.lodBias,a.tiledSurface.angledSplitBias=i.tiledSurface.angledSplitBias,a.tiledSurface.vtlContentZoom=i.tiledSurface.vtlContentZoom,a.tiledSurface.elevationLevelDelta=i.tiledSurface.elevationLevelDelta,a.tiledSurface.reduceTileLevelDifferences=i.tiledSurface.reduceTileLevelDifferences,a.gaussianSplat.minimumSplatPixelRadius=i.gaussianSplat.minimumSplatPixelRadius,a.gaussianSplat.minimumOpacity=i.gaussianSplat.minimumOpacity,a.gaussianSplat.maxAllowedVisibleGaussians=i.gaussianSplat.maxAllowedVisibleGaussians,a.heatmap.pixelRatio=i.heatmap.pixelRatio,a.flow3D.maxTotalNumberOfStreamlines=i.flow3D.maxTotalNumberOfStreamlines,a.flow3D.maxTracingResolution=i.flow3D.maxTracingResolution,a.fadeDuration=i.fadeDuration,a.antialiasingEnabled=i.antialiasingEnabled,a.physicallyBasedRenderingEnabled=i.physicalBasedRenderingEnabled,a.highQualityTransparency=i.highQualityTransparency,a.highResolutionAtmosphere=i.highResolutionAtmosphere,a.reflections=i.reflections,a.ambientOcclusion=i.ambientOcclusion,a.maxTexturePixels=i.maxTexturePixels,a.memoryLimit=i.memoryLimit,a.additionalCacheMemory=i.additionalCacheMemory,a.frameRate=i.frameRate,a.maximumPixelRatio=i.maximumPixelRatio}static{this.test={reset(){const e=t();for(const a of Object.keys(e))l[a]=e[a]}}}}const i={IPhone12Pro:120,GalaxyS20:200,FullHD:240,SurfacePro7:300,FullHDRetina:430},l=t();function t(){const a=!!has("esri-mobile"),l=!!has("ios"),t=e(400);return{low:{flow3D:{maxTotalNumberOfStreamlines:25e3,maxTracingResolution:1024},graphics3D:{maxTotalNumberOfFeatures:5e4,maxNumberOfDrawCalls:8e3,maxTotalNumberOfVertices:255e4,polygonLodFactor:.5,polylineLodFactor:1,snapshotAvailable:!1,skipHighSymbolLods:!0},heatmap:{pixelRatio:.125},sceneService:{object:{lodFactor:.2},point:{lodFactor:1},integratedMesh:{lodFactor:.6},pointCloud:{lodFactor:.5}},gaussianSplat:{minimumSplatPixelRadius:2,minimumOpacity:0,maxAllowedVisibleGaussians:4e6},tiledSurface:{lodBias:-1,angledSplitBias:.5,vtlContentZoom:.75,elevationLevelDelta:3,reduceTileLevelDifferences:!0},fadeDuration:e(0),antialiasingEnabled:!1,physicalBasedRenderingEnabled:!1,highQualityTransparency:!1,highResolutionAtmosphere:!1,reflections:!1,ambientOcclusion:!1,maxTexturePixels:a?1048576:4194304,memoryLimit:200+i.IPhone12Pro,additionalCacheMemory:0,frameRate:0,maximumPixelRatio:1},medium:{flow3D:{maxTotalNumberOfStreamlines:1e5,maxTracingResolution:2048},graphics3D:{maxTotalNumberOfFeatures:15e4,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:625e4,polygonLodFactor:a?.8:1,polylineLodFactor:a?1.2:1.5,snapshotAvailable:!l,skipHighSymbolLods:!1},heatmap:{pixelRatio:.25},sceneService:{object:{lodFactor:1},point:{lodFactor:1},integratedMesh:{lodFactor:1},pointCloud:{lodFactor:1}},gaussianSplat:{minimumSplatPixelRadius:1,minimumOpacity:1,maxAllowedVisibleGaussians:8e6},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:3,reduceTileLevelDifferences:!has("disable-feature:reduce-map-tile-levels")},fadeDuration:t,antialiasingEnabled:!1,physicalBasedRenderingEnabled:!0,highQualityTransparency:!0,highResolutionAtmosphere:!1,reflections:!1,ambientOcclusion:!1,maxTexturePixels:a?4194304:4096**2,memoryLimit:a?600+i.GalaxyS20:750+i.FullHD,additionalCacheMemory:a?-100:150,frameRate:0,maximumPixelRatio:1},high:{flow3D:{maxTotalNumberOfStreamlines:1e5,maxTracingResolution:2048},graphics3D:{maxTotalNumberOfFeatures:3e5,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:125e5,polygonLodFactor:a?1.2:2,polylineLodFactor:a?1.2:2,snapshotAvailable:!l,skipHighSymbolLods:!1},heatmap:{pixelRatio:.5},sceneService:{object:{lodFactor:1},point:{lodFactor:1},integratedMesh:{lodFactor:1},pointCloud:{lodFactor:1}},gaussianSplat:{minimumSplatPixelRadius:.5,minimumOpacity:2,maxAllowedVisibleGaussians:16e6},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:2,reduceTileLevelDifferences:!has("disable-feature:reduce-map-tile-levels")},fadeDuration:t,antialiasingEnabled:!0,physicalBasedRenderingEnabled:!0,highQualityTransparency:!0,highResolutionAtmosphere:!0,reflections:!0,ambientOcclusion:!0,maxTexturePixels:a?4096**2:1/0,memoryLimit:a?900+i.SurfacePro7:1500+i.FullHDRetina,additionalCacheMemory:a?-150:0,frameRate:0,maximumPixelRatio:a?1:1/0}}}export{a as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{Milliseconds as o}from"../../../core/time.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";let r=class extends e{constructor(){super(...arguments),this.minTotalNumberOfFeatures=2e3,this.maxTotalNumberOfFeatures=5e4,this.maxNumberOfDrawCalls=17e3,this.maxTotalNumberOfVertices=17e5,this.snapshotAvailable=!0,this.polygonLodFactor=1,this.polylineLodFactor=1,this.skipHighSymbolLods=!1}};t([i()],r.prototype,"minTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxNumberOfDrawCalls",void 0),t([i()],r.prototype,"maxTotalNumberOfVertices",void 0),t([i()],r.prototype,"snapshotAvailable",void 0),t([i()],r.prototype,"polygonLodFactor",void 0),t([i()],r.prototype,"polylineLodFactor",void 0),t([i()],r.prototype,"skipHighSymbolLods",void 0),r=t([s("esri.views.3d.support.QualitySettings.Graphics3DSettings")],r);let p=class{constructor(){this.minimumSplatPixelRadius=1,this.minimumOpacity=.05,this.maxAllowedVisibleGaussians=8e6}};t([i()],p.prototype,"minimumSplatPixelRadius",void 0),t([i()],p.prototype,"minimumOpacity",void 0),t([i()],p.prototype,"maxAllowedVisibleGaussians",void 0),p=t([s("esri.views.3d.support.QualitySettings.GaussianSplatSettings")],p);let a=class extends e{constructor(){super(...arguments),this.lodFactor=1}};t([i()],a.prototype,"lodFactor",void 0),a=t([s("esri.views.3d.support.QualitySettings.LoDFactorSettings")],a);let l=class extends e{constructor(){super(...arguments),this.object=new a,this.point=new a,this.integratedMesh=new a,this.pointCloud=new a}};t([i({type:a})],l.prototype,"object",void 0),t([i({type:a})],l.prototype,"point",void 0),t([i({type:a})],l.prototype,"integratedMesh",void 0),t([i({type:a})],l.prototype,"pointCloud",void 0),l=t([s("esri.views.3d.support.QualitySettings.SceneServiceSettings")],l);let n=class extends e{constructor(){super(...arguments),this.lodBias=0,this.angledSplitBias=1,this.vtlContentZoom=1,this.elevationLevelDelta=3,this.reduceTileLevelDifferences=!0}};t([i()],n.prototype,"lodBias",void 0),t([i()],n.prototype,"angledSplitBias",void 0),t([i()],n.prototype,"vtlContentZoom",void 0),t([i()],n.prototype,"elevationLevelDelta",void 0),t([i()],n.prototype,"reduceTileLevelDifferences",void 0),n=t([s("esri.views.3d.support.QualitySettings.TiledSurfaceSettings")],n);let d=class extends e{constructor(){super(...arguments),this.pixelRatio=1}};t([i()],d.prototype,"pixelRatio",void 0),d=t([s("esri.views.3d.support.QualitySettings.HeatmapSettings")],d);let c=class extends e{constructor(){super(...arguments),this.graphics3D=new r,this.sceneService=new l,this.tiledSurface=new n,this.gaussianSplat=new p,this.heatmap=new d,this.fadeDuration=o(400),this.antialiasingEnabled=!0,this.physicallyBasedRenderingEnabled=!1,this.highQualityTransparency=!0,this.highResolutionAtmosphere=!1,this.reflections=!1,this.ambientOcclusion=!1,this.glow=!1,this.maxTexturePixels=1/0,this.memoryLimit=750,this.additionalCacheMemory=0,this.frameRate=void 0,this.maximumPixelRatio=1/0}};t([i({type:r})],c.prototype,"graphics3D",void 0),t([i({type:l})],c.prototype,"sceneService",void 0),t([i({type:n})],c.prototype,"tiledSurface",void 0),t([i({type:p})],c.prototype,"gaussianSplat",void 0),t([i({type:d})],c.prototype,"heatmap",void 0),t([i()],c.prototype,"fadeDuration",void 0),t([i()],c.prototype,"antialiasingEnabled",void 0),t([i()],c.prototype,"physicallyBasedRenderingEnabled",void 0),t([i()],c.prototype,"highQualityTransparency",void 0),t([i()],c.prototype,"highResolutionAtmosphere",void 0),t([i()],c.prototype,"reflections",void 0),t([i()],c.prototype,"ambientOcclusion",void 0),t([i()],c.prototype,"glow",void 0),t([i()],c.prototype,"maxTexturePixels",void 0),t([i()],c.prototype,"memoryLimit",void 0),t([i()],c.prototype,"additionalCacheMemory",void 0),t([i()],c.prototype,"frameRate",void 0),t([i()],c.prototype,"maximumPixelRatio",void 0),c=t([s("esri.views.3d.support.QualitySettings")],c);const y=c;export{y as default};
5
+ import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{Milliseconds as o}from"../../../core/time.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";let r=class extends e{constructor(){super(...arguments),this.minTotalNumberOfFeatures=2e3,this.maxTotalNumberOfFeatures=5e4,this.maxNumberOfDrawCalls=17e3,this.maxTotalNumberOfVertices=17e5,this.snapshotAvailable=!0,this.polygonLodFactor=1,this.polylineLodFactor=1,this.skipHighSymbolLods=!1}};t([i()],r.prototype,"minTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxNumberOfDrawCalls",void 0),t([i()],r.prototype,"maxTotalNumberOfVertices",void 0),t([i()],r.prototype,"snapshotAvailable",void 0),t([i()],r.prototype,"polygonLodFactor",void 0),t([i()],r.prototype,"polylineLodFactor",void 0),t([i()],r.prototype,"skipHighSymbolLods",void 0),r=t([s("esri.views.3d.support.QualitySettings.Graphics3DSettings")],r);let p=class{constructor(){this.minimumSplatPixelRadius=1,this.minimumOpacity=1,this.maxAllowedVisibleGaussians=8e6}};t([i()],p.prototype,"minimumSplatPixelRadius",void 0),t([i()],p.prototype,"minimumOpacity",void 0),t([i()],p.prototype,"maxAllowedVisibleGaussians",void 0),p=t([s("esri.views.3d.support.QualitySettings.GaussianSplatSettings")],p);let a=class extends e{constructor(){super(...arguments),this.lodFactor=1}};t([i()],a.prototype,"lodFactor",void 0),a=t([s("esri.views.3d.support.QualitySettings.LoDFactorSettings")],a);let l=class extends e{constructor(){super(...arguments),this.object=new a,this.point=new a,this.integratedMesh=new a,this.pointCloud=new a}};t([i({type:a})],l.prototype,"object",void 0),t([i({type:a})],l.prototype,"point",void 0),t([i({type:a})],l.prototype,"integratedMesh",void 0),t([i({type:a})],l.prototype,"pointCloud",void 0),l=t([s("esri.views.3d.support.QualitySettings.SceneServiceSettings")],l);let n=class extends e{constructor(){super(...arguments),this.lodBias=0,this.angledSplitBias=1,this.vtlContentZoom=1,this.elevationLevelDelta=3,this.reduceTileLevelDifferences=!0}};t([i()],n.prototype,"lodBias",void 0),t([i()],n.prototype,"angledSplitBias",void 0),t([i()],n.prototype,"vtlContentZoom",void 0),t([i()],n.prototype,"elevationLevelDelta",void 0),t([i()],n.prototype,"reduceTileLevelDifferences",void 0),n=t([s("esri.views.3d.support.QualitySettings.TiledSurfaceSettings")],n);let d=class extends e{constructor(){super(...arguments),this.pixelRatio=1}};t([i()],d.prototype,"pixelRatio",void 0),d=t([s("esri.views.3d.support.QualitySettings.HeatmapSettings")],d);let c=class extends e{constructor(){super(...arguments),this.maxTotalNumberOfStreamlines=1e5,this.maxTracingResolution=2048}};t([i()],c.prototype,"maxTotalNumberOfStreamlines",void 0),t([i()],c.prototype,"maxTracingResolution",void 0),c=t([s("esri.views.3d.support.QualitySettings.Flow3DSettings")],c);let m=class extends e{constructor(){super(...arguments),this.graphics3D=new r,this.sceneService=new l,this.tiledSurface=new n,this.gaussianSplat=new p,this.heatmap=new d,this.flow3D=new c,this.fadeDuration=o(400),this.antialiasingEnabled=!0,this.physicallyBasedRenderingEnabled=!1,this.highQualityTransparency=!0,this.highResolutionAtmosphere=!1,this.reflections=!1,this.ambientOcclusion=!1,this.glow=!1,this.maxTexturePixels=1/0,this.memoryLimit=750,this.additionalCacheMemory=0,this.frameRate=void 0,this.maximumPixelRatio=1/0}};t([i({type:r})],m.prototype,"graphics3D",void 0),t([i({type:l})],m.prototype,"sceneService",void 0),t([i({type:n})],m.prototype,"tiledSurface",void 0),t([i({type:p})],m.prototype,"gaussianSplat",void 0),t([i({type:d})],m.prototype,"heatmap",void 0),t([i({type:c})],m.prototype,"flow3D",void 0),t([i()],m.prototype,"fadeDuration",void 0),t([i()],m.prototype,"antialiasingEnabled",void 0),t([i()],m.prototype,"physicallyBasedRenderingEnabled",void 0),t([i()],m.prototype,"highQualityTransparency",void 0),t([i()],m.prototype,"highResolutionAtmosphere",void 0),t([i()],m.prototype,"reflections",void 0),t([i()],m.prototype,"ambientOcclusion",void 0),t([i()],m.prototype,"glow",void 0),t([i()],m.prototype,"maxTexturePixels",void 0),t([i()],m.prototype,"memoryLimit",void 0),t([i()],m.prototype,"additionalCacheMemory",void 0),t([i()],m.prototype,"frameRate",void 0),t([i()],m.prototype,"maximumPixelRatio",void 0),m=t([s("esri.views.3d.support.QualitySettings")],m);const y=m;export{y as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{watch as t,sync as s}from"../../../../core/reactiveUtils.js";import{throttle as r}from"../../../../core/throttle.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as l}from"../../../../core/accessorSupport/decorators/subclass.js";import{clone as a}from"../../../../geometry/support/aaBoundingRect.js";import{toFlowData as o}from"../../../2d/engine/flow/dataUtils.js";import n from"../../layers/FlowSubView3D.js";import{tilesWaitingTime as d}from"./constants.js";import{tileToKey as h,FlowDataTile as u}from"./loadUtils.js";import{isRasterTile as g}from"../../terrain/TerrainData.js";let c=class extends n{constructor(e){super(e),this._resetTileData=!0,this._throttledTriggerLoad=null,this._throttling=!1}initialize(){this.addHandles([this.surface.on("tile-data-changed",({tile:e,layerIndex:t,layerClass:s})=>{null!=this.renderedTiles&&this.loadByTileTreesAllowed&&t===this._layerIndex&&1===s&&this._updateFlowDataTile(e)}),t(()=>this.renderedTiles,e=>{const t=this.frameTask.scheduleGenerator(t=>this._updateFlowDataTiles(e,t));this.updatingHandles.addPromise(t)},s)]),this._throttledTriggerLoad=r(()=>{super.triggerLoad(),this._throttling=!1},()=>this._throttling=!0,d,this),this.addHandles(this._throttledTriggerLoad)}async*_updateFlowDataTiles(e,t){const s=f();for(const r of e??[]){const e=this._flowDataTiles?.get(h(r)),i=null==e||"delete"===e||"waiting"===e?this._getFlowDataCopy(r):e;null!=i&&s.set(h(r),i),t.madeProgress(),t.done&&(t=yield)}this._flowDataTiles=s,this._resetTileData=!0,this.triggerLoad()}abort(){super.abort(),this._throttling=!1}get _layerIndex(){return this.surface.getLayerIndexByUID(1,this.layerView.uid)}get loadByTileTreesAllowed(){return super.loadByTileTreesAllowed||!this._allTilesLoaded}doRefresh(){const{_flowDataTiles:e}=this;null!=e&&(e.forEach((t,s)=>{e.set(s,"waiting")}),super.doRefresh())}triggerLoad(){const{_throttledTriggerLoad:e}=this;this._allTilesLoaded?(e.hasPendingUpdates()||e(),e.forceUpdate()):e()}async fetchDataAndGenerateStreamlines(e,t){const{_flowDataTiles:s,needsMagnitude:r,workerHandle:i}=this,l=this.getSimulationSettings(e);if(null==l||null==i||null==s)return;const a=this._resetTileData;this._resetTileData=!1;const o=f();s.forEach((e,t)=>{"delete"===e?(o.set(t,"delete"),s.delete(t)):(a||"on-worker"!==e&&"waiting"!==e)&&(o.set(t,e),s.set(t,"on-worker"))});const n={simulationSettings:l,flowExtentInfo:e.flowExtentInfo,flowDataTiles:o,pixelSize:this.surface.tilingScheme.pixelSize,reset:a,needsMagnitude:r,startPositions:this.startPositions(e)},{streamlines:d}=await i.generateTiledStreamlines(n,t);return d}getUpdating(){return super.getUpdating()||this._throttling}_getFlowDataCopy(e){const{_layerIndex:t}=this,s=null==e.surface;if(null==t||s)return null;const r=e.getLayerInfo(t,1);if(null==r)return null;if(!e.visible&&null==r.requestAbort)return r.requestAbort=new AbortController,this.surface.requestTileData(e,t,1,r.requestAbort),null;if(r.dataMissing||!e.hasLayerData(t,1))return null;const{data:i}=r;if(!g(i))return null;const l=o(this.layer.serviceRasterInfo.dataType,i.source),n=new Uint8Array(l.width*l.height);for(let a=0;a<n.length;a++)n[a]=l.mask[a];return new u(l.data,n,l.width,l.height,e.lij,a(e.extent))}_updateFlowDataTile(e){const t=this.renderedTiles?.has(e)?this._getFlowDataCopy(e)??"delete":"delete";this._setTileData(e,t)&&this.triggerLoad()}_setTileData(e,t){const{_flowDataTiles:s}=this;if(null==s)return!1;const r=h(e);return(null!=s.get(r)||"delete"!==t)&&(s.set(r,t),!0)}get _allTilesLoaded(){let e=0;for(const t of this._flowDataTiles?.values()??[])"delete"!==t&&"waiting"!==t&&e++;return e===this.renderedTiles?.size}get test(){return{...super.test,loadedTiles:this._flowDataTiles??f()}}};function f(){return new Map}e([i()],c.prototype,"_throttling",void 0),c=e([l("esri.views.3d.support.flow.FlowSubViewTiles3D")],c);export{c as default};
5
+ import{__decorate as e}from"tslib";import{watch as t,sync as s}from"../../../../core/reactiveUtils.js";import{throttle as i}from"../../../../core/throttle.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{clone as l}from"../../../../geometry/support/aaBoundingRect.js";import{toFlowData as o}from"../../../2d/engine/flow/dataUtils.js";import n from"../../layers/FlowSubView3D.js";import{tilesWaitingTime as d}from"./constants.js";import{tileToKey as u,FlowDataTile as h}from"./loadUtils.js";import{isRasterTile as p}from"../../terrain/TerrainData.js";const c={type:"delete"},g={type:"waiting"},f={type:"on-worker",upsampled:!1},_={type:"on-worker",upsampled:!0};let T=class extends n{constructor(e){super(e),this._resetTileData=!0,this._throttledTriggerLoad=null,this._throttling=!1}initialize(){this.addHandles([this.surface.on("tile-data-changed",({tile:e,layerIndex:t,layerClass:s})=>{null!=this.renderedTiles&&(this.loadByTileTreesAllowed||this._tileIsUpsampled(e))&&t===this._layerIndex&&1===s&&this._updateFlowDataTile(e)}),t(()=>this.renderedTiles,e=>{const t=this.frameTask.scheduleGenerator(t=>this._updateFlowDataTiles(e,t));this.updatingHandles.addPromise(t)},s),t(()=>this._pixelSize,()=>{this.invalidateTileData(),this._resetTileData=!0},s)]),this._throttledTriggerLoad=i(()=>{super.triggerLoad(),this._throttling=!1},()=>this._throttling=!0,d,this),this.addHandles(this._throttledTriggerLoad)}async*_updateFlowDataTiles(e,t){const s=m();for(const i of e??[]){const e=this._flowDataTiles?.get(u(i)),r=null==e||"delete"===e.type||"waiting"===e.type?this._getLoadedState(i):e;null!=r&&s.set(u(i),r),t.madeProgress(),t.done&&(t=yield)}this._flowDataTiles=s,this._resetTileData=!0,this.triggerLoad()}abort(){super.abort(),this._throttling=!1}get _layerIndex(){return this.surface.getLayerIndexByUID(1,this.layerView.uid)}get loadByTileTreesAllowed(){return super.loadByTileTreesAllowed||!this._allTilesLoaded}get _pixelSize(){return this.surface.tilingScheme.pixelSize}doRefresh(){this.invalidateTileData(),super.doRefresh()}triggerLoad(){const{_throttledTriggerLoad:e}=this;this._allTilesLoaded?(e.hasPendingUpdates()||e(),e.forceUpdate()):e()}async fetchDataAndGenerateStreamlines(e,t){const{_flowDataTiles:s,needsMagnitude:i,workerHandle:r}=this,a=this.getSimulationSettings(e);if(null==a||null==r||null==s)return;const l=this._resetTileData;this._resetTileData=!1;const o=m();s.forEach((e,t)=>{"delete"===e.type?(o.set(t,c),s.delete(t)):(l||"on-worker"!==e.type&&"waiting"!==e.type)&&(o.set(t,e),s.set(t,"waiting"!==e.type&&e.upsampled?_:f))});const n={simulationSettings:a,flowExtentInfo:e.flowExtentInfo,flowDataTiles:o,reset:l,needsMagnitude:i,startPositions:this.startPositions(e)},{streamlines:d}=await r.generateTiledStreamlines(n,t);return d}getUpdating(){return super.getUpdating()||this._throttling}_getLoadedState(e){const{_layerIndex:t}=this,s=null==e.surface;if(null==t||s)return c;const i=e.getLayerInfo(t,1);if(null==i)return c;if(!e.visible&&null==i.requestAbort)return i.requestAbort=new AbortController,this.surface.requestTileData(e,t,1,i.requestAbort),c;const r=this._getRasterTile(i,e,t);return null==r?this._upsampleFlowData(t,i.upsampleInfo,e.lij,e.extent):{type:"loaded",data:this._createFlowDataTile(r,e.lij,e.extent,this._pixelSize),upsampled:!1}}_upsampleFlowData(e,t,s,i){if(null==t)return c;const r=t.tile;if(null==r)return c;const a=r.getLayerInfo(e,1);if(null==a)return c;const l=this._getRasterTile(a,r,e);if(null==l)return c;const{scale:o,offset:n}=t,d=Math.max(Math.floor(this._pixelSize*o),1),u=l.source,h=Math.floor(n[0]*u.width),p=Math.floor((1-n[1]-o)*u.height);return{type:"loaded",data:this._createFlowDataTile(l,s,i,d,h,p),upsampled:!0}}_getRasterTile(e,t,s){const{data:i}=e;return!e.dataMissing&&t.hasLayerData(s,1)&&p(i)?i:null}_createFlowDataTile(e,t,s,i,r,a){const n=o(this.layer.serviceRasterInfo.dataType,e.source,i,i,r,a),d=n.mask.slice();return new h(n.data,d,n.width,n.height,t,l(s))}_updateFlowDataTile(e){const{renderedTiles:t,_layerIndex:s}=this;if(null==t||null==s)return;if(t.has(e)){const t=this._getLoadedState(e);return void(this._setTileData(e,t)&&this.triggerLoad())}let i=this._setTileData(e,c);for(const r of t.values()){const t=r.getLayerInfo(s,1);if(null==t)continue;if(null!=this._getRasterTile(t,r,s))continue;const a=t.upsampleInfo?.tile;if(a!==e)continue;const l=this._getLoadedState(r),o=this._setTileData(r,l);i||=o}i&&this.triggerLoad()}_setTileData(e,t){const{_flowDataTiles:s}=this;if(null==s)return!1;const i=u(e);return(null!=s.get(i)||"delete"!==t.type)&&(s.set(i,t),!0)}get _allTilesLoaded(){let e=0;for(const t of this._flowDataTiles?.values()??[])"delete"!==t.type&&"waiting"!==t.type&&e++;return e===this.renderedTiles?.size}invalidateTileData(){const{_flowDataTiles:e}=this;e?.forEach((t,s)=>{e.set(s,g)})}_tileIsUpsampled(e){const t=this._flowDataTiles?.get(u(e));return null!=t&&("loaded"===t.type||"on-worker"===t.type)&&t.upsampled}get usedMemory(){const e=9*this._pixelSize**2,t=(this._flowDataTiles?.size??0)*e;return super.usedMemory+t}get test(){return{...super.test,loadedTiles:this._flowDataTiles??m()}}};function m(){return new Map}e([r()],T.prototype,"_throttling",void 0),T=e([a("esri.views.3d.support.flow.FlowSubViewTiles3D")],T);export{T as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{createFlowFieldFromData as s,traceFlowPaths as r}from"../../../2d/engine/flow/dataUtils.js";import{createFlowFieldFromDataTiled as o,valuesPerFlowVertex as i}from"./loadUtils.js";let a=class{constructor(){this._tileData=new Map}async generateStreamlines(t){const{flowData:e,flowExtentInfo:r,needsMagnitude:o,simulationSettings:i,startPositions:a}=t,n=l(s(i,e),i,r.modelSize,o,a);return{result:{streamlines:n},transferList:n?.map(t=>t.vertices.buffer)}}async generateTiledStreamlines(t){const{flowDataTiles:e,flowExtentInfo:s,needsMagnitude:r,reset:i,pixelSize:a,simulationSettings:n,startPositions:c}=t;this._updateTileData(e,i);const f=l(o(n,this._tileData,s,a),n,s.modelSize,r,c);return{result:{streamlines:f},transferList:f?.map(t=>t.vertices.buffer)??[]}}_updateTileData(t,e){e&&this._tileData.forEach((e,s)=>{null==t.get(s)&&this._tileData.delete(s)}),t.forEach((t,e)=>{"delete"===t?this._tileData.delete(e):"on-worker"!==t&&"waiting"!==t&&this._tileData.set(e,t)})}};a=t([e("esri.views.3d.support.flow.FlowWorker")],a);const n=a;function l(t,e,s,o,a){if(null==t)return;const n=r(e,t,s[0],s[1],{positions:a}),l=[],c=i(o);for(const{vertices:r,stage:i}of n){const t=new Float32Array(r.length*c);for(let e=0;e<r.length;e++)t[e*c]=r[e].x,t[e*c+1]=r[e].y,t[e*c+2]=r[e].t,o&&(t[e*c+3]=r[e].speed);l.push({vertices:t,stage:i,hasMagnitude:o})}return l}export{n as default};
5
+ import{__decorate as t}from"tslib";import"../../../../core/Logger.js";import"../../../../core/has.js";import"../../../../core/RandomLCG.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{createFlowFieldFromData as s,traceFlowPaths as r}from"../../../2d/engine/flow/dataUtils.js";import{createFlowFieldFromDataTiled as o,valuesPerFlowVertex as a}from"./loadUtils.js";let i=class{constructor(){this._tileData=new Map}async generateStreamlines(t){const{flowData:e,flowExtentInfo:r,needsMagnitude:o,simulationSettings:a,startPositions:i}=t,n=l(s(a,e),a,r.modelSize,o,i);return{result:{streamlines:n},transferList:n?.map(t=>t.vertices.buffer)}}async generateTiledStreamlines(t){const{flowDataTiles:e,flowExtentInfo:s,needsMagnitude:r,reset:a,simulationSettings:i,startPositions:n}=t;this._updateTileData(e,a);const c=l(o(i,this._tileData,s),i,s.modelSize,r,n);return{result:{streamlines:c},transferList:c?.map(t=>t.vertices.buffer)??[]}}_updateTileData(t,e){e&&this._tileData.forEach((e,s)=>{null==t.get(s)&&this._tileData.delete(s)}),t.forEach((t,e)=>{"delete"===t.type?this._tileData.delete(e):"on-worker"!==t.type&&"waiting"!==t.type&&this._tileData.set(e,t.data)})}};i=t([e("esri.views.3d.support.flow.FlowWorker")],i);const n=i;function l(t,e,s,o,i){if(null==t)return;const n=r(e,t,s[0],s[1],{positions:i}),l=[],c=a(o);for(const{vertices:r,stage:a}of n){const t=new Float32Array(r.length*c);for(let e=0;e<r.length;e++)t[e*c]=r[e].x,t[e*c+1]=r[e].y,t[e*c+2]=r[e].t,o&&(t[e*c+3]=r[e].speed);l.push({vertices:t,stage:a,hasMagnitude:o})}return l}export{n as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{WorkerHandle as e}from"../../../../core/workers/WorkerHandle.js";class r extends e{constructor(e){super("FlowWorker","generateStreamlines",{generateStreamlines:e=>[e.flowData.data.buffer,e.flowData.mask.buffer],generateTiledStreamlines:e=>{const r=[];return e.flowDataTiles.forEach(e=>{"string"!=typeof e&&r.push(e.data.buffer,e.mask.buffer)}),r}},e,{strategy:"dedicated"})}generateStreamlines(e,r){return this.invokeMethod("generateStreamlines",e,r)}generateTiledStreamlines(e,r){return this.invokeMethod("generateTiledStreamlines",e,r)}}export{r as FlowWorkerHandle};
5
+ import{WorkerHandle as e}from"../../../../core/workers/WorkerHandle.js";class r extends e{constructor(e){super("FlowWorker","generateStreamlines",{generateStreamlines:e=>[e.flowData.data.buffer,e.flowData.mask.buffer],generateTiledStreamlines:e=>{const r=[];return e.flowDataTiles.forEach(e=>{"loaded"===e.type&&r.push(e.data.data.buffer,e.data.mask.buffer)}),r}},e,{strategy:"dedicated"})}generateStreamlines(e,r){return this.invokeMethod("generateStreamlines",e,r)}generateTiledStreamlines(e,r){return this.invokeMethod("generateTiledStreamlines",e,r)}}export{r as FlowWorkerHandle};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../core/has.js";import{Seconds as e}from"../../../../core/time.js";import{FlowQuery3D as t}from"./FlowQuery3D.js";class i{constructor(e,t,i,r){this._query=e,this.streamlines=t,this._material=i,this.geometries=r,this._startTime=0,this._endTime=1/0,this.startTime=this._query.time}get startTime(){return this._startTime}set startTime(i){this._query.time!==i&&(this._query=new t(this._query.extent,this._query.timeExtent,this._query.size,this._query.pixelRatio,e(i))),this._startTime=i,this.setMaterialParameters({startTime:i})}get endTime(){return this._endTime}set endTime(e){this._endTime=e,this.setMaterialParameters({endTime:e})}get query(){return this._query}hasFadedOut(e){return this.endTime+this._material.parameters.fadeOutTime<e}setMaterialParameters(e){this._material.setParameters(e)}get test(){return null}}export{i as StreamlineResources3D};
5
+ import"../../../../core/has.js";import{estimateNestedObjectMemory as e}from"../../../../core/memoryEstimations.js";import{Seconds as t}from"../../../../core/time.js";import{FlowQuery3D as s}from"./FlowQuery3D.js";class i{constructor(e,t,s,i,r){this._query=e,this.streamlines=t,this._material=s,this.geometries=i,this._bytesPerFeature=r,this._startTime=0,this._endTime=1/0,this.usedMemory=null,this.startTime=this._query.time,this.computeMemory()}computeMemory(){const t=e(this.streamlines),s=e(this.geometries.map(e=>e.attributes)),i=this.streamlines.length*this._bytesPerFeature;this.usedMemory=t+s+i}get startTime(){return this._startTime}set startTime(e){this._query.time!==e&&(this._query=new s(this._query.extent,this._query.timeExtent,this._query.size,this._query.pixelRatio,t(e))),this._startTime=e,this.setMaterialParameters({startTime:e})}get endTime(){return this._endTime}set endTime(e){this._endTime=e,this.setMaterialParameters({endTime:e})}get query(){return this._query}hasFadedOut(e){return this.endTime+this._material.parameters.fadeOutTime<e}setMaterialParameters(e){this._material.setParameters(e)}get test(){return null}}export{i as StreamlineResources3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{removeMaybe as e,destroyMaybe as r}from"../../../../core/maybe.js";import{streamlinGeometryBatchSize as t}from"./constants.js";import{StreamlineResources3D as s}from"./StreamlineResources3D.js";import{RenderGeometry as i}from"../../webgl-engine/lib/RenderGeometry.js";import{TaskPriority as a}from"../../../support/Scheduler.js";class h extends s{constructor(e,r,t,s,i){super(e,r,t,s),this._layerView=i,this._drapeRenderer=null,this.drapeSourceType=2,this.updatePolicy=0,this.renderGroup=0,this._frameTask=null,this._renderGeometries=[]}get _view(){return this._layerView.view}get layer(){return this._layerView.layer}get fullOpacity(){return this._layerView.fullOpacity}get attached(){return null!=this._drapeRenderer}get destroyed(){return this.attached}async attach(){const{geometries:e}=this;null!=e&&(this.detach(),this._frameTask=this._view.resourceController.scheduler.registerTask(a.FLOW_GENERATOR),await this._frameTask.scheduleGenerator(r=>this._addGeometryToOverlay(e,r)))}async*_addGeometryToOverlay(e,r){this._drapeRenderer=this._view.overlayManager.registerGeometryDrapeSource(this);for(let s=0;s<e.length;s+=t){const a=e.slice(s,s+t).map(e=>new i(e));this._drapeRenderer.addGeometries(a,0),this._renderGeometries.push(...a),this._drapeRenderer.commitChanges(),r.madeProgress(),r.done&&(r=yield)}}detach(){this._frameTask=e(this._frameTask),this._drapeRenderer&&(this._drapeRenderer.removeGeometries(this._renderGeometries,2),this._drapeRenderer.commitChanges(),this._renderGeometries.length=0),this.attached&&this._view.overlayManager.unregisterDrapeSource(this),this._drapeRenderer=r(this._drapeRenderer)}}export{h as StreamlineResources3DOverlay};
5
+ import{removeMaybe as e,destroyMaybe as r}from"../../../../core/maybe.js";import{memoryEstimators as t}from"../../layers/graphics/defaultSymbolComplexity.js";import{streamlinGeometryBatchSize as s}from"./constants.js";import{StreamlineResources3D as i}from"./StreamlineResources3D.js";import{RenderGeometry as a}from"../../webgl-engine/lib/RenderGeometry.js";import{TaskPriority as o}from"../../../support/Scheduler.js";class d extends i{constructor(e,r,s,i,a){super(e,r,s,i,t.LINE_ROUND.draped.bytesPerFeature),this._layerView=a,this._drapeRenderer=null,this.drapeSourceType=2,this.updatePolicy=0,this.renderGroup=0,this._frameTask=null,this._renderGeometries=[]}get _view(){return this._layerView.view}get layer(){return this._layerView.layer}get fullOpacity(){return this._layerView.fullOpacity}get attached(){return null!=this._drapeRenderer}get destroyed(){return this.attached}async attach(){const{geometries:e}=this;null!=e&&(this.detach(),this._frameTask=this._view.resourceController.scheduler.registerTask(o.FLOW_GENERATOR),await this._frameTask.scheduleGenerator(r=>this._addGeometryToOverlay(e,r)))}async*_addGeometryToOverlay(e,r){this._drapeRenderer=this._view.overlayManager.registerGeometryDrapeSource(this);for(let t=0;t<e.length;t+=s){const i=e.slice(t,t+s).map(e=>new a(e));this._drapeRenderer.addGeometries(i,0),this._renderGeometries.push(...i),this._drapeRenderer.commitChanges(),r.madeProgress(),r.done&&(r=yield)}}detach(){this._frameTask=e(this._frameTask),this._drapeRenderer&&(this._drapeRenderer.removeGeometries(this._renderGeometries,2),this._drapeRenderer.commitChanges(),this._renderGeometries.length=0),this.attached&&this._view.overlayManager.unregisterDrapeSource(this),this._drapeRenderer=r(this._drapeRenderer)}}export{d as StreamlineResources3DOverlay};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{removeMaybe as e}from"../../../../core/maybe.js";import{streamlinGeometryBatchSize as t}from"./constants.js";import{StreamlineResources3D as s}from"./StreamlineResources3D.js";import{Object3D as r}from"../../webgl-engine/lib/Object3D.js";import{WebGLLayer as i}from"../../webgl-engine/lib/WebGLLayer.js";import{TaskPriority as a}from"../../../support/Scheduler.js";class o extends s{constructor(e,t,s,r,i){super(e,t,s,r),this._view=i,this._objects3D=[],this._engineLayer=null,this._frameTask=null}get attached(){return null!=this._engineLayer}async attach(){const{geometries:e}=this;null!=e&&(this.detach(),this._frameTask=this._view.resourceController.scheduler.registerTask(a.FLOW_GENERATOR),await this._frameTask.scheduleGenerator(t=>this._addGeometryToLayer(e,t)))}detach(){this.attached&&(this._engineLayer?.removeMany(this._objects3D),this._objects3D.forEach(e=>e.dispose()),this._objects3D=[],this._engineLayer=null,this._frameTask=e(this._frameTask))}async*_addGeometryToLayer(e,s){const{stage:a}=this._view,o=new i(a,{pickable:!1,updatePolicy:1});for(let i=0;i<e.length;i+=t){const a=new r({geometries:e.slice(i,i+t),castShadow:!1});o.add(a),this._objects3D.push(a),o.commit(),s.madeProgress(),s.done&&(s=yield)}this._engineLayer=o}}export{o as StreamlineResources3DShape};
5
+ import{removeMaybe as e}from"../../../../core/maybe.js";import{memoryEstimators as t}from"../../layers/graphics/defaultSymbolComplexity.js";import{streamlinGeometryBatchSize as s}from"./constants.js";import{StreamlineResources3D as r}from"./StreamlineResources3D.js";import{Object3D as i}from"../../webgl-engine/lib/Object3D.js";import{WebGLLayer as a}from"../../webgl-engine/lib/WebGLLayer.js";import{TaskPriority as o}from"../../../support/Scheduler.js";class n extends r{constructor(e,s,r,i,a){super(e,s,r,i,t.LINE_ROUND.bytesPerFeature),this._view=a,this._objects3D=[],this._engineLayer=null,this._frameTask=null}get attached(){return null!=this._engineLayer}async attach(){const{geometries:e}=this;null!=e&&(this.detach(),this._frameTask=this._view.resourceController.scheduler.registerTask(o.FLOW_GENERATOR),await this._frameTask.scheduleGenerator(t=>this._addGeometryToLayer(e,t)))}detach(){this.attached&&(this._engineLayer?.removeMany(this._objects3D),this._objects3D.forEach(e=>e.dispose()),this._engineLayer?.commit(),this._objects3D=[],this._engineLayer=null,this._frameTask=e(this._frameTask))}async*_addGeometryToLayer(e,t){const{stage:r}=this._view,o=new a(r,{pickable:!1,updatePolicy:1});for(let a=0;a<e.length;a+=s){const r=new i({geometries:e.slice(a,a+s),castShadow:!1});o.add(r),this._objects3D.push(r),o.commit(),t.madeProgress(),t.done&&(t=yield)}this._engineLayer=o}}export{n as StreamlineResources3DShape};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- const e=.1,o=1,t=1,c=1e3,n=!1,p=3,r=1,s=1.1,x=501;export{e as averageLoadingTimeSmoothingFactor,r as defaultTransitionDuration,t as fadeInTime,o as fadeOutTime,n as seamlessTransitionEnabled,x as streamlinGeometryBatchSize,s as thresholdForLoadingAllTiles,c as tilesWaitingTime,p as transitionDurationFactor};
5
+ const e=.1,o=1,t=1,c=1e3,n=!1,p=3,r=1,s=1.1,x=501,a=256,b=!0,d=3;export{e as averageLoadingTimeSmoothingFactor,r as defaultTransitionDuration,t as fadeInTime,o as fadeOutTime,a as minimumTracingResolution,n as seamlessTransitionEnabled,x as streamlinGeometryBatchSize,s as thresholdForLoadingAllTiles,d as tileFilterDistance,b as tileFilteringByDistanceEnabled,c as tilesWaitingTime,p as transitionDurationFactor};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{containsXY as t,width as n,height as r,create as e}from"../../../../geometry/support/aaBoundingRect.js";import{createFlowFieldFromData as l}from"../../../2d/engine/flow/dataUtils.js";import{getFeatureTileId as o}from"../../layers/support/FeatureTileDescriptor.js";import{modelToMapSpace as u,insideMapExtent as i,isFullExtent as s}from"./FlowQuery3D.js";function f(t){return t?4:3}function a(t){return t[0].vertices instanceof Float32Array}class c{constructor(t,n,r,e,l,o){this.data=t,this.mask=n,this.width=r,this.height=e,this.lij=l,this.extent=o}}function h(t){return o(t.lij[0],t.lij[1],t.lij[2])}function m(t,n){let[r,l,o,u]=[null,null,null,null];for(const e of t){const t=e.extent;r=d(t[0],r),l=d(t[1],l),o=p(t[2],o),u=p(t[3],u)}if(null==r||null==l||null==o||null==u)return null;if(s(r,o,n)){const n=[...t].toSorted((t,n)=>t.extent[0]-n.extent[0]);let e=n[0].extent[2],l=0,u=0,i=0;for(let t=1;t<n.length;t++){const[r,o,s]=n[t].extent;if(e<r&&(i++,l=e,u=r,i>1))break;e=Math.max(e,s)}1===i&&(r=u,o=l)}return e([r,l,o,u])}function p(t,n){return null==n?t:Math.max(t,n)}function d(t,n){return null==n?t:Math.min(t,n)}function x(e,o,s,f){const[a,c]=s.modelSize;let h=null;const m=new Map;o.forEach(t=>{m.set(t.lij,l(e,t))});const p=(n,r,e)=>t(n.extent,r,e);return(t,l)=>{const d=Math.round(t),x=Math.round(l);if(!e.wrapAround&&(d<0||d>=a||x<0||x>=c))return[0,0];const[j,g]=u(s,t,l,!0);if(!i(s,j,g))return[0,0];if(null==h||!p(h,j,g)){h=null;for(const[t,n]of o)if(p(n,j,g)){h=n;break}}if(null==h?.data)return[0,0];const M=m.get(h.lij);if(null==M)return[0,0];const w=h.extent;return M((j-w[0])/n(w)*f,f-(g-w[1])/r(w)*f)}}export{c as FlowDataTile,m as boundingRectOfTiles,x as createFlowFieldFromDataTiled,a as isFlowPathBuffer,h as tileToKey,f as valuesPerFlowVertex};
5
+ import{containsXY as t,width as n,height as e,create as r}from"../../../../geometry/support/aaBoundingRect.js";import{createFlowFieldFromData as l}from"../../../2d/engine/flow/dataUtils.js";import{getFeatureTileId as o}from"../../layers/support/FeatureTileDescriptor.js";import{modelToMapSpace as i,insideMapExtent as u,isFullExtent as s}from"./FlowQuery3D.js";function f(t){return t?4:3}function a(t){return t[0].vertices instanceof Float32Array}class c{constructor(t,n,e,r,l,o){this.data=t,this.mask=n,this.width=e,this.height=r,this.lij=l,this.extent=o}}function h(t){return o(t.lij[0],t.lij[1],t.lij[2])}function m(t,n){let[e,l,o,i]=[null,null,null,null];for(const r of t){const t=r.extent;e=p(t[0],e),l=p(t[1],l),o=d(t[2],o),i=d(t[3],i)}if(null==e||null==l||null==o||null==i)return null;if(s(e,o,n)){const n=[...t].toSorted((t,n)=>t.extent[0]-n.extent[0]);let r=n[0].extent[2],l=0,i=0,u=0;for(let t=1;t<n.length;t++){const[e,o,s]=n[t].extent;if(r<e&&(u++,l=r,i=e,u>1))break;r=Math.max(r,s)}1===u&&(e=i,o=l)}return r([e,l,o,i])}function d(t,n){return null==n?t:Math.max(t,n)}function p(t,n){return null==n?t:Math.min(t,n)}function x(r,o,s){const[f,a]=s.modelSize;let c=null;const h=new Map;o.forEach(t=>{h.set(t.lij,l(r,t))});const m=(n,e,r)=>t(n.extent,e,r);return(t,l)=>{const d=Math.round(t),p=Math.round(l);if(!r.wrapAround&&(d<0||d>=f||p<0||p>=a))return[0,0];const[x,j]=i(s,t,l,!0);if(!u(s,x,j))return[0,0];if(null==c||!m(c,x,j)){c=null;for(const[t,n]of o)if(m(n,x,j)){c=n;break}}if(null==c?.data)return[0,0];const g=h.get(c.lij);if(null==g)return[0,0];const{width:w,height:M,extent:y}=c;return g((x-y[0])/n(y)*w,M-(j-y[1])/e(y)*M)}}export{c as FlowDataTile,m as boundingRectOfTiles,x as createFlowFieldFromDataTiled,a as isFlowPathBuffer,h as tileToKey,f as valuesPerFlowVertex};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{isIntegratedMeshLayer as e}from"../../../layers/support/layerUtils.js";import{hitTestSelectSimilarDistance as a}from"../../support/hitTestSelectUtils.js";async function r(r,i){const{results:o,ground:l}=await a(r,i),c=(!l.layer||!e(l.layer))&&l.mapPoint,y=[],p=s(r),d=c?t(r,p):n;let u=0,f=0;const m=()=>{const e=d.layerViews[f];c&&e&&"fetchPopupFeaturesAtLocation"in e&&y.push({mapPoint:l.mapPoint,layerView:e}),++f};let w=null;for(;u<o.length||f<d.layerViews.length;){const e=o[u];if(e&&"graphic"!==e.type)++u;else if("scene"!==e?.layer?.type||e?.layer?.parent!==r?.map?.basemap)if(e){const a=e.layer?.uid,r=d.layerUids.has(a)&&e.distance===l.distance,t=p.get(e.layer?.uid);if(w??=e.mapPoint,f<d.layerViews.length&&(r||(e.distance??0)>l.distance)&&d.layerViews[f]!==t){m();continue}y.push({graphic:e.graphic,layerView:t}),++u}else m();else++u}return w??=l.mapPoint,{hits:y,location:w}}function t(e,a){const r=new Set,t=new Set;for(let s=e.basemapTerrain.numLayers(1)-1;s>=0;s--){const a=e.basemapTerrain.layerViewByIndex(s,1);r.add(a.layer.uid),t.add(a)}const n=e.overlayManager.renderer.layers;for(const{uid:s}of n){const e=a.get(s);e&&(r.add(s),t.add(e))}return{layerUids:r,layerViews:Array.from(t).reverse()}}const n={layerUids:new Set,layerViews:[]};function s(e){const a=new Map;for(const r of e.allLayerViews){const e=r.layer.uid;a.set(e,r)}return a}export{r as popupHitTest};
5
+ import{isIntegratedMeshLayer as e,isTiledLayer as a}from"../../../layers/support/layerUtils.js";import{hitTestSelectSimilarDistance as r}from"../../support/hitTestSelectUtils.js";import{isInEffectiveScaleRange as t}from"../../support/layerViewUtils.js";async function n(n,o){const{results:c,ground:y}=await r(n,o),p=(!y.layer||!e(y.layer))&&y.mapPoint,f=[],u=l(n),d=p?s(n,u):i;let m=0,w=0;const g=()=>{const e=d.layerViews[w++];if(!p||!e||!("fetchPopupFeaturesAtLocation"in e))return;const r=y.mapPoint,s=e.layer;if(a(s)&&"effectiveScaleRange"in s){const a=n.basemapTerrain.getScale(r);if(!t(e.layer.effectiveScaleRange,a))return}f.push({mapPoint:r,layerView:e})};let h=null;for(;m<c.length||w<d.layerViews.length;){const e=c[m];if(e&&"graphic"!==e.type)++m;else if("scene"!==e?.layer?.type||e?.layer?.parent!==n?.map?.basemap)if(e){const a=e.layer?.uid,r=d.layerUids.has(a)&&e.distance===y.distance,t=u.get(e.layer?.uid);if(h??=e.mapPoint,w<d.layerViews.length&&(r||(e.distance??0)>y.distance)&&d.layerViews[w]!==t){g();continue}f.push({graphic:e.graphic,layerView:t}),++m}else g();else++m}return h??=y.mapPoint,{hits:f,location:h}}function s(e,a){const r=new Set,t=new Set;for(let s=e.basemapTerrain.numLayers(1)-1;s>=0;s--){const a=e.basemapTerrain.layerViewByIndex(s,1);r.add(a.layer.uid),t.add(a)}const n=e.overlayManager.renderer.layers;for(const{uid:s}of n){const e=a.get(s);e&&(r.add(s),t.add(e))}return{layerUids:r,layerViews:Array.from(t).reverse()}}const i={layerUids:new Set,layerViews:[]};function l(e){const a=new Map;for(const r of e.allLayerViews){const e=r.layer.uid;a.set(e,r)}return a}export{n as popupHitTest};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{ZEROS as e}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{TileCompositePassParameters as r}from"../webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{B as s}from"../../../chunks/BlendLayers.glsl.js";import{ReloadableShaderModule as o}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Pos2TexF16 as i}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{fromLayout as l}from"../../webgl/VertexAttributeLocations.js";class n extends r{constructor(){super(...arguments),this.opacity=1,this.baseOpacity=1,this.texture=null,this.fboTexture=null,this.backgroundColor=e}}class a extends t{constructor(e,r){super(e,r,new o(s,()=>import("../webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js")),l(i))}}export{n as BlendLayersPassParameters,a as BlendLayersTechnique};
5
+ import{__decorate as e}from"tslib";import"../../../core/Logger.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import"../../../core/Error.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{ZEROS as s}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{TileCompositePassParameters as o}from"../webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js";import{B as t}from"../../../chunks/BlendLayers.glsl.js";import{ReloadableShader as i}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as l}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Pos2TexF16 as a}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{PrimitiveType as c}from"../../webgl/enums.js";import{fromLayout as n}from"../../webgl/VertexAttributeLocations.js";class m extends o{constructor(){super(...arguments),this.opacity=1,this.baseOpacity=1,this.texture=null,this.fboTexture=null,this.backgroundColor=s}}let p=class extends l{constructor(e,r){super(e,r,n(a)),this.shader=new i(t,()=>import("../webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js")),this.primitiveType=c.TRIANGLE_STRIP}};p=e([r("esri.views.3d.terrain.BlendLayersTechnique")],p);export{m as BlendLayersPassParameters,p as BlendLayersTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{R as e}from"../../../chunks/RasterColorizer.glsl.js";import{ReloadableShaderModule as r}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as o}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Pos2TexF16 as s}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{fromLayout as t}from"../../webgl/VertexAttributeLocations.js";class i extends o{constructor(o,i){super(o,i,new r(e,()=>import("../webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js")),t(s))}}export{i as RasterColorizerTechnique};
5
+ import{__decorate as r}from"tslib";import"../../../core/Logger.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import"../../../core/Error.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import{R as o}from"../../../chunks/RasterColorizer.glsl.js";import{ReloadableShader as s}from"../webgl-engine/core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{Pos2TexF16 as t}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{PrimitiveType as a}from"../../webgl/enums.js";import{fromLayout as m}from"../../webgl/VertexAttributeLocations.js";let c=class extends i{constructor(r,e){super(r,e,m(t)),this.shader=new s(o,()=>import("../webgl-engine/core/shaderLibrary/raster/RasterColorizer.glsl.js")),this.primitiveType=a.TRIANGLE_STRIP}};c=r([e("esri.views.3d.terrain.RasterColorizerTechnique")],c);export{c as RasterColorizerTechnique};