@arcgis/core 5.0.0-next.69 → 5.0.0-next.70
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.
- package/Map.d.ts +3 -1
- package/analysis/Analysis.d.ts +1 -0
- package/analysis/Dimension/types.d.ts +1 -0
- package/analysis/DimensionAnalysis.d.ts +10 -10
- package/analysis/DimensionSimpleStyle.d.ts +14 -13
- package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
- package/analysis/DistanceMeasurementAnalysis.d.ts +2 -1
- package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +3 -3
- package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +1 -1
- package/analysis/ElevationProfile/types.d.ts +2 -0
- package/analysis/LengthDimension.d.ts +22 -21
- package/analysis/LineOfSightAnalysis.d.ts +2 -2
- package/analysis/ShadowCast/MinDurationOptions.d.ts +2 -2
- package/analysis/ShadowCast/types.d.ts +6 -2
- package/analysis/Slice/types.d.ts +1 -0
- package/analysis/Viewshed.d.ts +22 -20
- package/analysis/ViewshedAnalysis.d.ts +13 -13
- package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -2
- package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +2 -2
- package/analysis/VolumeMeasurement/types.d.ts +1 -0
- package/analysis/VolumeMeasurementAnalysis.d.ts +1 -0
- package/analysis/types.d.ts +5 -0
- package/arcade.d.ts +2 -2
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/04364f3dd7578c2acb71.js +1 -0
- package/assets/esri/core/workers/chunks/18ed69d563986dc2eb21.js +1 -0
- package/assets/esri/core/workers/chunks/{4c04c54330b693892cfc.js → 1a45b4b4803337f4b99f.js} +2 -2
- package/assets/esri/core/workers/chunks/{60c7f896f2246a8aa6d7.js → 244006d4b0547d574401.js} +53 -53
- package/assets/esri/core/workers/chunks/329b10897c6965948b84.js +1 -0
- package/assets/esri/core/workers/chunks/4387aaf9d5e8f6d1833d.js +1 -0
- package/assets/esri/core/workers/chunks/{944dfa9309da8f49a616.js → 6a3d66d7c92f90cc2a17.js} +1 -1
- package/assets/esri/core/workers/chunks/760a759f9697adde6dd4.js +1 -0
- package/assets/esri/core/workers/chunks/798d227205bd958de6a7.js +1 -0
- package/assets/esri/core/workers/chunks/{9d88b4ba8e511da64583.js → 98d68b145226e7527c84.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ad6595ad44c2d60c1ce.js → a79fad422d41019c8232.js} +1 -1
- package/assets/esri/core/workers/chunks/{10e474d664b20adcd917.js → db4661fd82dc61162115.js} +1 -1
- package/assets/esri/core/workers/chunks/{1d1e25bb61eeeee8ee94.js → df2ba5f9d57080fca183.js} +1 -1
- package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +5 -3
- package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +15 -11
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/ComponentShader.glsl.js +43 -43
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/config.js +1 -1
- package/form/elements/inputs/attachments/Input.d.ts +6 -6
- package/geometry/Mesh.d.ts +20 -21
- package/geometry/Polygon.d.ts +1 -8
- package/geometry/Polygon.js +1 -1
- package/geometry/geometryEngine.d.ts +19 -19
- package/geometry/support/MeshComponent.d.ts +3 -3
- package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +2 -2
- package/geometry/support/MeshLocalVertexSpace.d.ts +2 -2
- package/geometry/support/MeshMaterial.d.ts +8 -8
- package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
- package/geometry/support/MeshTexture.d.ts +3 -3
- package/geometry/support/MeshTextureTransform.d.ts +3 -3
- package/geometry/support/MeshTransform.d.ts +1 -1
- package/geometry/support/MeshVertexAttributes.d.ts +13 -5
- package/geometry/support/intersects.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/geometry/support/meshUtils/centerAt.js +1 -1
- package/geometry/support/meshUtils/geographicUtils.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/geometry/support/meshUtils/rotate.js +1 -1
- package/geometry/support/meshUtils/scale.js +1 -1
- package/geometry/support/meshUtils/types.d.ts +44 -52
- package/geometry/support/meshUtils.d.ts +6 -50
- package/geometry/support/meshUtils.js +1 -1
- package/interfaces.d.ts +5 -151
- package/kernel.js +1 -1
- package/layers/BaseDynamicLayer.d.ts +2 -2
- package/layers/BaseElevationLayer.d.ts +2 -2
- package/layers/BuildingSceneLayer.d.ts +2 -2
- package/layers/CSVLayer.d.ts +2 -2
- package/layers/CatalogLayer.d.ts +2 -2
- package/layers/DimensionLayer.d.ts +2 -2
- package/layers/ElevationLayer.d.ts +2 -2
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/GeoJSONLayer.d.ts +2 -2
- package/layers/GeoRSSLayer.d.ts +2 -2
- package/layers/GraphicsLayer.d.ts +2 -2
- package/layers/GroupLayer.d.ts +2 -2
- package/layers/ImageryLayer.d.ts +2 -2
- package/layers/ImageryTileLayer.d.ts +2 -2
- package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -2
- package/layers/IntegratedMeshLayer.d.ts +2 -2
- package/layers/KMLLayer.d.ts +2 -2
- package/layers/Layer.d.ts +9 -7
- package/layers/LineOfSightLayer.d.ts +3 -3
- package/layers/MapImageLayer.d.ts +2 -2
- package/layers/MapNotesLayer.d.ts +2 -2
- package/layers/MediaLayer.d.ts +2 -2
- package/layers/OGCFeatureLayer.d.ts +2 -2
- package/layers/OrientedImageryLayer.d.ts +2 -2
- package/layers/ParquetLayer.d.ts +2 -2
- package/layers/PointCloudLayer.d.ts +2 -2
- package/layers/RouteLayer.d.ts +2 -2
- package/layers/SceneLayer.d.ts +2 -2
- package/layers/SubtypeGroupLayer.d.ts +2 -2
- package/layers/TileLayer.d.ts +2 -2
- package/layers/UnknownLayer.d.ts +2 -2
- package/layers/UnsupportedLayer.d.ts +2 -2
- package/layers/VectorTileLayer.d.ts +2 -2
- package/layers/VideoLayer.d.ts +2 -2
- package/layers/ViewshedLayer.d.ts +2 -2
- package/layers/VoxelLayer.d.ts +2 -2
- package/layers/WCSLayer.d.ts +2 -2
- package/layers/WFSLayer.d.ts +2 -2
- package/layers/WMSLayer.d.ts +2 -2
- package/layers/WMTSLayer.d.ts +2 -2
- package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -2
- package/layers/catalog/CatalogFootprintLayer.d.ts +2 -2
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/raster/types.d.ts +8 -1
- package/layers/support/PixelBlock.d.ts +7 -7
- package/layers/support/RasterInfo.d.ts +2 -9
- package/layers/types.d.ts +77 -2
- package/networks/support/CircuitSection.d.ts +20 -2
- package/networks/support/CircuitSection.js +1 -1
- package/networks/support/Subcircuit.d.ts +12 -10
- package/networks/support/Subcircuit.js +1 -1
- package/networks/support/typeUtils.d.ts +2 -0
- package/networks/support/typeUtils.js +1 -1
- package/package.json +2 -2
- package/rest/support/AttributeBinsQuery.d.ts +7 -1
- package/rest/support/NormalizationBinParametersMixin.d.ts +29 -9
- package/support/revision.js +1 -1
- package/symbols/patterns/LinePattern3D.d.ts +3 -3
- package/symbols/patterns/Pattern3D.d.ts +3 -3
- package/unionTypes.d.ts +17 -17
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +6 -5
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +7 -6
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/types.d.ts +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +2 -2
- package/views/3d/analysis/DirectLineMeasurement/types.d.ts +1 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/types.d.ts +1 -0
- package/views/3d/analysis/types.d.ts +2 -0
- package/views/3d/constraints/Constraints.d.ts +2 -2
- package/views/3d/environment/ChapmanApproximation.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/layers/DimensionLayerView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
- package/views/3d/layers/ViewshedLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/support/LayerPerformanceInfo.d.ts +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +7 -7
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ViewingModeConfiguration.js +5 -0
- package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +2 -2
- package/views/BreakpointsOwner.d.ts +9 -10
- package/views/MapView.d.ts +18 -17
- package/views/SceneView.d.ts +30 -89
- package/views/SceneView.js +1 -1
- package/views/View2D.d.ts +0 -37
- package/views/View2D.js +1 -1
- package/views/ViewAnimation.d.ts +2 -3
- package/views/analysis/ElevationProfile/types.d.ts +7 -6
- package/views/analysis/types.d.ts +1 -0
- package/views/animation/types.d.ts +3 -1
- package/views/layers/DimensionLayerView.d.ts +97 -4
- package/views/layers/DimensionLayerView.js +1 -1
- package/views/layers/HighlightLayerViewMixin.d.ts +1 -59
- package/views/layers/HighlightLayerViewMixin.js +1 -1
- package/views/layers/ImageryLayerViewMixin.d.ts +1 -55
- package/views/layers/LineOfSightLayerView.d.ts +77 -4
- package/views/layers/LineOfSightLayerView.js +1 -1
- package/views/layers/ViewshedLayerView.d.ts +96 -5
- package/views/layers/ViewshedLayerView.js +1 -1
- package/views/navigation/Navigation.d.ts +1 -22
- package/views/navigation/Navigation.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/types.d.ts +75 -5
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +4 -4
- package/widgets/AreaMeasurement3D.d.ts +2 -2
- package/widgets/BasemapGallery.d.ts +1 -1
- package/widgets/BasemapToggle.d.ts +1 -1
- package/widgets/Bookmarks.d.ts +1 -1
- package/widgets/BuildingExplorer/BuildingExplorerViewModel.d.ts +2 -2
- package/widgets/BuildingExplorer/BuildingLevel.d.ts +2 -2
- package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.d.ts +2 -2
- package/widgets/BuildingExplorer/BuildingPhase.d.ts +2 -2
- package/widgets/BuildingExplorer.d.ts +3 -3
- package/widgets/Compass.d.ts +1 -1
- package/widgets/CoordinateConversion.d.ts +1 -1
- package/widgets/Daylight/DaylightViewModel.d.ts +3 -3
- package/widgets/Daylight/VisibleElements.d.ts +2 -2
- package/widgets/Daylight/types.d.ts +2 -2
- package/widgets/Daylight.d.ts +3 -3
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +4 -4
- package/widgets/DirectLineMeasurement3D.d.ts +2 -2
- package/widgets/DirectionalPad.d.ts +1 -1
- package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +3 -3
- package/widgets/ElevationProfile/ElevationProfileViewModel.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +2 -2
- package/widgets/ElevationProfile/types.d.ts +9 -9
- package/widgets/ElevationProfile.d.ts +2 -2
- package/widgets/Expand/ExpandViewModel.d.ts +1 -1
- package/widgets/Expand.d.ts +1 -1
- package/widgets/Feature.d.ts +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
- package/widgets/Features.d.ts +1 -1
- package/widgets/Fullscreen/FullscreenViewModel.d.ts +1 -1
- package/widgets/Fullscreen.d.ts +1 -1
- package/widgets/Home.d.ts +1 -1
- package/widgets/LayerList.d.ts +12 -0
- package/widgets/Legend.d.ts +1 -1
- package/widgets/LineOfSight/LineOfSightTarget.d.ts +2 -2
- package/widgets/LineOfSight/LineOfSightViewModel.d.ts +2 -2
- package/widgets/LineOfSight.d.ts +2 -2
- package/widgets/Locate/LocateViewModel.d.ts +1 -1
- package/widgets/Locate.d.ts +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
- package/widgets/NavigationToggle.d.ts +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/Arrow.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationNode.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
- package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +5 -0
- package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
- package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +1 -1
- package/widgets/OrientedImageryViewer/support/resolveMediaProps.js +5 -0
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer.js +1 -1
- package/widgets/Print/CustomTemplate.d.ts +1 -1
- package/widgets/Print/PrintViewModel.d.ts +1 -1
- package/widgets/Print.d.ts +1 -1
- package/widgets/ScaleBar.d.ts +1 -1
- package/widgets/Search.d.ts +1 -1
- package/widgets/ShadowCast/DiscreteOptions.d.ts +2 -2
- package/widgets/ShadowCast/DurationOptions.d.ts +2 -2
- package/widgets/ShadowCast/ShadowCastViewModel.d.ts +3 -3
- package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +2 -2
- package/widgets/ShadowCast/ThresholdOptions.d.ts +2 -2
- package/widgets/ShadowCast/types.d.ts +2 -2
- package/widgets/ShadowCast.d.ts +1 -1
- package/widgets/Slice/SliceViewModel.d.ts +2 -2
- package/widgets/Slice.d.ts +2 -2
- package/widgets/Swipe.d.ts +1 -1
- package/widgets/TimeZoneLabel.d.ts +1 -1
- package/widgets/Track.d.ts +1 -1
- package/widgets/UtilityNetworkValidateTopology.js +1 -1
- package/widgets/VideoPlayer.d.ts +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/widgets/Weather/VisibleElements.d.ts +2 -2
- package/widgets/Weather/WeatherViewModel.d.ts +2 -2
- package/widgets/Weather/types.d.ts +1 -1
- package/widgets/Weather.d.ts +2 -2
- package/widgets/Zoom.d.ts +1 -1
- package/widgets/support/GridControls.d.ts +1 -1
- package/assets/esri/core/workers/chunks/35961e71f69ae1d24b9e.js +0 -1
- package/assets/esri/core/workers/chunks/3cce8e894bf37c3e598e.js +0 -1
- package/assets/esri/core/workers/chunks/7ee68f67f9cc48a328f0.js +0 -1
- package/assets/esri/core/workers/chunks/a931515a2569713e743b.js +0 -1
- package/assets/esri/core/workers/chunks/bb4574a87ca21e719f0d.js +0 -1
- package/assets/esri/core/workers/chunks/c9f868f85d740ee32715.js +0 -1
- package/geometry.d.ts +0 -136
- package/geometry.js +0 -5
- package/pointCloudRenderers.d.ts +0 -112
- package/pointCloudRenderers.js +0 -5
- package/rasterRenderers.d.ts +0 -151
- package/rasterRenderers.js +0 -5
- package/renderers.d.ts +0 -166
- package/renderers.js +0 -5
- package/views/layers/DimensionLayerViewMixin.d.ts +0 -1
- package/views/layers/DimensionLayerViewMixin.js +0 -5
- package/views/layers/LineOfSightLayerViewMixin.d.ts +0 -1
- package/views/layers/LineOfSightLayerViewMixin.js +0 -5
- package/views/layers/ViewshedLayerViewMixin.d.ts +0 -98
- package/views/layers/ViewshedLayerViewMixin.js +0 -5
|
@@ -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 s}from"tslib";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{LayerViewAnalysisViewManager as r}from"./support/LayerViewAnalysisViewManager.js";import t from"../../layers/
|
|
5
|
+
import{__decorate as s}from"tslib";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{LayerViewAnalysisViewManager as r}from"./support/LayerViewAnalysisViewManager.js";import t from"../../layers/LineOfSightLayerView.js";var n;let o=class extends(a(t)){static{n=this}constructor(s){super(s),this.type="line-of-sight-3d",this._analysisViewManager=null}initialize(){this._analysisViewManager=new r({getAnalysis:()=>this.layer.analysis,loadAnalysisViewModule:n.loadAnalysisViewModule,parent:this}),this.addResolvingPromise(this._analysisViewManager.whenAnalysisView())}destroy(){this._analysisViewManager.destroy()}get analysisView(){return this._analysisViewManager.analysisView}whenAnalysisView(){return this._analysisViewManager.whenAnalysisView()}isUpdating(){return this._analysisViewManager.updating}static{this.loadAnalysisViewModule=()=>import("../analysis/LineOfSightAnalysisView3D.js")}};s([i()],o.prototype,"type",void 0),s([i()],o.prototype,"_analysisViewManager",void 0),s([i({readOnly:!0})],o.prototype,"analysisView",null),o=n=s([e("esri.views.3d.layers.LineOfSightLayerView3D")],o);const l=o;export{l 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 s}from"tslib";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{LayerViewAnalysisViewManager as r}from"./support/LayerViewAnalysisViewManager.js";import t from"../../layers/
|
|
5
|
+
import{__decorate as s}from"tslib";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView3D as a}from"./LayerView3D.js";import{LayerViewAnalysisViewManager as r}from"./support/LayerViewAnalysisViewManager.js";import t from"../../layers/ViewshedLayerView.js";var n;let o=class extends(a(t)){static{n=this}constructor(s){super(s),this.type="viewshed-3d",this._analysisViewManager=null}initialize(){this._analysisViewManager=new r({getAnalysis:()=>this.layer.source,loadAnalysisViewModule:n.loadAnalysisViewModule,parent:this}),this.addResolvingPromise(this._analysisViewManager.whenAnalysisView())}destroy(){this._analysisViewManager.destroy()}get analysisView(){return this._analysisViewManager.analysisView}whenAnalysisView(){return this._analysisViewManager.whenAnalysisView()}isUpdating(){return this._analysisViewManager.updating}static{this.loadAnalysisViewModule=()=>import("../analysis/ViewshedAnalysisView3D.js")}};s([e()],o.prototype,"type",void 0),s([e()],o.prototype,"_analysisViewManager",void 0),s([e({readOnly:!0})],o.prototype,"analysisView",null),o=n=s([i("esri.views.3d.layers.ViewshedLayerView3D")],o);const l=o;export{l 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{validateColorAndOpacity as e,validateColor as r}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{clamp as a}from"../../../../core/mathUtils.js";import{uncompressedFormats as
|
|
5
|
+
import{validateColorAndOpacity as e,validateColor as r}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{clamp as a}from"../../../../core/mathUtils.js";import{clone as o}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{uncompressedFormats as t,compressibleUsages as s}from"./enums.js";import{RenderTexture as n}from"../../webgl-engine/core/material/RenderTexture.js";import{getEllipsoidMode as l}from"../../webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{ManagedTexture as i}from"../../webgl-engine/lib/ManagedTexture.js";import{useSchematicPBR as u,schematicMRRFactors as c,advancedMRRFactors as m}from"../../webgl-engine/materials/pbrUtils.js";import{alphaCutoff as d}from"../../../../webscene/support/AlphaCutoff.js";function p(r,a,o){const t=new Map,s=(e,r)=>{if(null==e)return-1;const a=t.get(e.id);if(a)return a.usage|=r,a.id;const o=t.size;return t.set(e.id,{id:o,usage:r}),o},n=a.pbrMetallicRoughness,l=n?.baseColorFactor?e(n.baseColorFactor):null,i=a.emissiveFactor,d=o&&0===n?.metallicFactor||u({normalTexture:a.normalTexture,emissiveTexture:a.emissiveTexture,emissiveFactor:a.emissiveFactor,occlusionTexture:a.occlusionTexture,metallicRoughnessTexture:n?.metallicRoughnessTexture,metallicFactor:n?.metallicFactor,roughnessFactor:n?.roughnessFactor}),p=d?c[0]:n?.metallicFactor??m[0],h=d?c[1]:n?.roughnessFactor??m[1],x="mask"===a.alphaMode?33:1,b={baseColorFactor:l?[l[0],l[1],l[2],l[3]]:[1,1,1,1],baseColorTextureId:s(n?.baseColorTexture,x),metallicRoughnessTextureId:s(n?.metallicRoughnessTexture,2),metallicFactor:p,roughnessFactor:h},F={alphaMode:a.alphaMode,alphaCutoff:a.alphaCutoff,doubleSided:a.doubleSided,cullFace:"none"===a.cullFace?0:"back"===a.cullFace?2:"front"===a.cullFace?1:0,normalTextureId:s(a.normalTexture,4),emissiveTextureId:s(a.emissiveTexture,16),occlusionTextureId:s(a.occlusionTexture,8),emissiveFactor:i?[i[0],i[1],i[2]]:[0,0,0],metallicRoughness:b,wrapTextures:!1,hasParametersFromSource:d},T=[];return t.forEach(({usage:e},a)=>{const o=null!=r&&r[a]&&r[a].formats,t=o?g(o.map(({name:e,format:r})=>({name:e,encoding:f[r]}))):[];T.push({id:a,usage:e,encodings:t})}),{material:F,textures:T}}function g(e){return e.sort((e,r)=>e.encoding-r.encoding)}const f={ktx2:1,basis:2,dds:4,png:8,jpg:16,"ktx-etc2":32},h={"image/ktx2":2,"image/x.basis":2,"image/vnd-ms.dds":4,"image/png":8,"image/jpg":16,"image/jpeg":16,"image/ktx":32};function x(e){const o=e?.materialDefinitions?Object.keys(e.materialDefinitions)[0]:null,t=e?.textureDefinitions?Object.keys(e.textureDefinitions)[0]:null,s=o?e.materialDefinitions?.[o]:null,n=t?e.textureDefinitions?.[t]:null,l=b();if(null!=s){const e=s.params;e.diffuse&&(r(e.diffuse),l.metallicRoughness.baseColorFactor=[e.diffuse[0],e.diffuse[1],e.diffuse[2],1]),null!=e.doubleSided&&(l.doubleSided=e.doubleSided,l.cullFace=e.doubleSided?0:2),"none"!==e.cullFace&&"front"!==e.cullFace&&"back"!==e.cullFace||(l.cullFace="none"===e.cullFace?0:"back"===e.cullFace?2:1),e.transparency&&(l.metallicRoughness.baseColorFactor[3]=a(1-e.transparency,0,1)),(e.useVertexColorAlpha||l.metallicRoughness.baseColorFactor[3]<1)&&(l.alphaMode="blend")}const i=[];if(null!=n){const e=0;!n.wrap||"repeat"!==n.wrap[0]&&"repeat"!==n.wrap[1]||(l.wrapTextures=!0);let r=1;"rgba"===n.channels&&(l.alphaMode="blend",r|=32);const a=n.images.length-1,o=n.images[a],t=e=>e?.split("/").pop(),s=Array.isArray(n.encoding)?g(n.encoding.map((e,r)=>({name:t(o.href[r]),encoding:h[e]||0}))):[{name:t(o.href),encoding:h[n.encoding]||0}];i.push({id:e,usage:r,encodings:s}),l.metallicRoughness.baseColorTextureId=e}return{material:l,textures:i}}const b=()=>({alphaMode:"opaque",alphaCutoff:d,doubleSided:!0,cullFace:0,normalTextureId:-1,emissiveTextureId:-1,occlusionTextureId:-1,emissiveFactor:[0,0,0],metallicRoughness:{baseColorFactor:[.8,.8,.8,1],baseColorTextureId:-1,metallicRoughnessTextureId:-1,metallicFactor:0,roughnessFactor:.6},wrapTextures:!1,hasParametersFromSource:!0});function F(e,r,a,o,t,s){if(null==e?.data)return null;const n=e.data,l=o.renderingContext.parameters.maxMaxAnisotropy,u=l>1,c=a||!r.wrapTextures?T:C,m=v(e.encoding),d=1&e.usage?"opaque"===r.alphaMode?6407:6408:6407,p=k(e.encoding,e.usage)?{compressionTracker:t,compressionCallback:s}:void 0;return new i(n,{mipmap:u,maxAnisotropy:l,encoding:m,wrap:c,pixelFormat:d,compressionOptions:p,noUnpackFlip:!0})}const T={s:33071,t:33071},C={s:10497,t:10497};function M(r,a,t,s,i){const u=i.rendererTextureUsage,p=e=>j(t,a,e&u),g=[],f=e=>{const r=p(e);if(null==r)return null;const a=new n(s,r);return g.push(a.loadPromise),a},h=f(33),x=f(2),b=f(16),F=f(8),T=f(4),C={baseColor:o(e(r.metallicRoughness.baseColorFactor)),hasParametersFromSource:!!r.hasParametersFromSource,usePBR:i.usePBR,mrrFactors:[r.metallicRoughness.metallicFactor,r.metallicRoughness.roughnessFactor,r.hasParametersFromSource?c[2]:m[2]],emissiveBaseColor:r.emissiveFactor,isIntegratedMesh:i.isIntegratedMesh,textureAlphaCutoff:"mask"===r.alphaMode?r.alphaCutoff:d,alphaDiscardMode:"opaque"===r.alphaMode?1:"mask"===r.alphaMode?2:3,baseColorTexture:h,metallicRoughnessTexture:x,emissionTexture:b,occlusionTexture:F,normalTexture:T,slicePlaneEnabled:i.slicePlaneEnabled,doubleSided:r.doubleSided,cullFace:r.cullFace,ellipsoidMode:l(i.viewSpatialReference),sphereDepthInterpolate:!1,isGround:!1,objectOpacity:1,polygonOffsetEnabled:!1};return{texturePromise:Promise.all(g),materialParameters:C}}function R(e){const r=!!e.compressedTextureS3TC,a=!!e.compressedTextureETC,o=has("disable-feature:i3s-basis")?0:3;return 24|(r?4|o:0)|(a?o:0)}function w(e,r){if(null!=r)return e.find(e=>0!==(e.encoding&r))}function j(e,r,a){if(null==e||0===a)return null;for(let o=0;o<e.length;o++){const t=e[o];if(null!=t&&0!==(t.usage&a)){const e=r[o];return null!=e?e.id:null}}return null}function k(e,r){return!!has("enable-feature:esri-compress-IM-textures")&&(0!==(e&t)&&!(r&~s))}function v(e){switch(e){case 1:return"image/ktx2";case 2:return"image/x.basis";case 4:return"image/vnd-ms.dds";case 8:return"image/png";case 16:return"image/jpeg";case 32:return"image/ktx";default:return""}}export{M as configureMaterial,F as createTexture,b as defaultMaterial,p as getMaterialAndTextures,x as getMaterialAndTexturesFromShared,R as getSupportedEncodings,j as getTextureIdByUsage,w as selectEncoding};
|
|
@@ -27,7 +27,7 @@ export default abstract class LayerPerformanceInfo {
|
|
|
27
27
|
/**
|
|
28
28
|
* The maximum number of features that can be displayed in the layer.
|
|
29
29
|
*
|
|
30
|
-
* This number depends on the symbol complexity and
|
|
30
|
+
* This number depends on the symbol complexity and [quality profile](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#qualityProfile) of the SceneView.
|
|
31
31
|
* If you want to increase it manually, set the
|
|
32
32
|
* [FeatureLayerView#maximumNumberOfFeatures](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html#maximumNumberOfFeatures)
|
|
33
33
|
* property. This property is only available for [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html),
|
|
@@ -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{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{signal as r}from"../../../../core/signal.js";import{n as t}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as i}from"../../../../geometry/support/frustum.js";import{Sphere as n}from"../../../../geometry/support/sphere.js";import{makeScheduleFunction as a}from"../../layers/support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as o}from"../GaussianSplatWorkerHandle.js";import{GaussianSplatFadeTexture as u}from"./GaussianSplatFadeTexture.js";import{GaussianSplatOrderTexture as h}from"./GaussianSplatOrderTexture.js";import{GaussianSplatTextureAtlas as d}from"./GaussianSplatTextureAtlas.js";class
|
|
5
|
+
import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{signal as r}from"../../../../core/signal.js";import{n as t}from"../../../../chunks/vec32.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as i}from"../../../../geometry/support/frustum.js";import{Sphere as n}from"../../../../geometry/support/sphere.js";import{makeScheduleFunction as a}from"../../layers/support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as o}from"../GaussianSplatWorkerHandle.js";import{GaussianSplatFadeTexture as u}from"./GaussianSplatFadeTexture.js";import{GaussianSplatOrderTexture as h}from"./GaussianSplatOrderTexture.js";import{GaussianSplatTextureAtlas as d}from"./GaussianSplatTextureAtlas.js";import{TaskPriority as l}from"../../../support/Scheduler.js";class _{constructor(e){this._updating=r(!1),this._useDeterministicSort=!1,this.visibleGaussians=0,this._visibleGaussianTiles=new Array,this._workerHandle=null,this._isSorting=!1,this._pendingSortTask=!1,this._bufferCapacity=0,this._minimumBoundingSphere=new n,this._cameraDirectionNormalized=s(),this._frameTask=null,this._renderer=e,this._orderTexture=new h(this._renderer.renderingContext),this._fadingTexture=new u(this._renderer.renderingContext),this._textureAtlas=new d(this._renderer.renderingContext,this._renderer.view.resourceController.memoryController,this._renderer.fboCache);const{resourceController:t}=this._renderer.view;this._workerHandle=new o(a(t)),this._frameTask=t.scheduler.registerTask(l.GAUSSIAN_SPLAT_SORTING)}get textureAtlas(){return this._textureAtlas}get orderTexture(){return this._orderTexture}get fadingTexture(){return this._fadingTexture}get visibleGaussianTiles(){return this._visibleGaussianTiles}updateGaussianVisibility(e){this._visibleGaussianTiles=e,this.requestSort()}isUpdating(){return this._updating.value}destroy(){this._pendingSortTask=!1,this._frameTask.remove(),this._workerHandle?.destroyWorkerAndSelf(),this._textureAtlas.destroy(),this._orderTexture.destroy(),this._fadingTexture.destroy()}requestSort(){this._updating.value=!0,this._isSorting?this._pendingSortTask=!0:(this._isSorting=!0,this._pendingSortTask=!1,this._sortOnWorker().then(()=>this._handleSortComplete()).catch(()=>this._handleSortComplete()))}_handleSortComplete(){this._isSorting=!1,this._pendingSortTask?this.requestSort():this._updating.value=!1}_clearBuffersAndTextures(){this._bufferCapacity=0,this._orderTexture.clear(),this._textureAtlas.clear()}_ensureBufferCapacity(r){if(this._bufferCapacity<r){const t=Math.ceil(r*e);this._atlasIndicesBuffer=new Uint32Array(t),this._sortedAtlasIndicesBuffer=new Uint32Array(t),this._distancesBuffer=new Float64Array(t),this._sortOrderBuffer=new Uint32Array(t),this._bufferCapacity=t}}async _sortOnWorker(){if(0===this._visibleGaussianTiles.length)return this.visibleGaussians=0,this._clearBuffersAndTextures(),void this._renderer.requestRender(1);this._useDeterministicSort&&this._visibleGaussianTiles.sort((e,r)=>e.obb.centerX-r.obb.centerX||e.obb.centerY-r.obb.centerY||e.obb.centerZ-r.obb.centerZ);let e=this._visibleGaussianTiles.reduce((e,r)=>e+r.gaussianAtlasIndices.length,0);this._ensureBufferCapacity(e),this._textureAtlas.ensureTextureAtlas();const{frustum:r}=this._renderer.camera;t(this._cameraDirectionNormalized,this._renderer.camera.ray.direction);const s=this._cameraDirectionNormalized[0],n=this._cameraDirectionNormalized[1],a=this._cameraDirectionNormalized[2];let o=0;if(this._visibleGaussianTiles.forEach(t=>{const{gaussianAtlasIndices:u,positions:h}=t;if(this._minimumBoundingSphere.center=t.obb.center,this._minimumBoundingSphere.radius=t.obb.radius+t.maxScale,i(r,this._minimumBoundingSphere))for(let e=0;e<u.length;e++){this._atlasIndicesBuffer[o]=u[e];const r=3*e,t=h[r],i=h[r+1],d=h[r+2];this._distancesBuffer[o]=t*s+i*n+d*a,this._sortOrderBuffer[o]=o,o++}else e-=u.length}),0===e)return this.visibleGaussians=0,this._clearBuffersAndTextures(),void this._renderer.requestRender(1);const u={distances:this._distancesBuffer,sortOrderIndices:this._sortOrderBuffer,numGaussians:e,preciseSort:this._useDeterministicSort};await(this._workerHandle?.sort(u).then(e=>{this._distancesBuffer=e.distances,this._sortOrderBuffer=e.sortedOrderIndices}));const h=async r=>{const t=this._sortedAtlasIndicesBuffer.subarray(0,e);for(let s=0;s<e;s++)t[s]=this._atlasIndicesBuffer[this._sortOrderBuffer[s]];this._orderTexture.setData(t,e),this.visibleGaussians=e,this._renderer.requestRender(1),r.madeProgress()};await this._frameTask.schedule(h)}set useDeterministicSort(e){this._useDeterministicSort=e}}export{_ as GaussianSplatDataStore};
|
|
@@ -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{destroyMaybe as e}from"../../../../../core/maybe.js";import{s as t,h as o,t as r,i}from"../../../../../chunks/vec32.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as
|
|
5
|
+
import{destroyMaybe as e}from"../../../../../core/maybe.js";import{s as t,h as o,t as r,i}from"../../../../../chunks/vec32.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as n}from"../../../../../geometry/support/aaBoundingBox.js";import{encodeSymbolColor as s}from"../../../layers/support/symbolColorUtils.js";import{computeOffsetObb as l}from"../../../support/orientedBoundingBox.js";import{UniformComponentParameters as m}from"./UniformComponentParameters.js";import{ComponentParametersVarying as h,ComponentParametersUniform as c}from"./Material/ComponentMaterial.js";import{olidEnabled as d}from"../../effects/geometry/olidUtils.js";class f{constructor(e,t,o,r,i){this.transform=e,this.obb=t,this._componentData=o,this._renderable=r,this._intersectionGeometry=i,this.visible=!1,this.offsetObb=null,this._aabbInWorldCoordinates=null}get componentData(){return this._componentData}get renderable(){return this._renderable}get intersectionGeometry(){return this._intersectionGeometry}updateMaterial(e){this._renderable.material.update(e)}updateCameraDerivedParameters(e){const{eye:o}=e;this._renderable.meta.cameraDepthSquared=t(o,this.obb.center)}setComponentData(e,t){const o=this._componentData,{materialDataBuffer:r,materialDataIndices:i}=o,a=new m,n=r.textureBuffer,f=n.getVec4Field("colorAndCastShadows"),p=n.getScalarField("elevationOffset"),b=n.getScalarField("emissiveStrength"),g=n.getScalarField("emissiveSourceMode"),C=n.getVec4Field("olidColor"),_=new Uint8Array(4),v=new Uint32Array(_.buffer);let x,M,y=0,S=0,D=0,O=0,w=0,j=o.verticalOffsets,A=1/0,B=-1/0,I=!1,W=!1,k=!1,G=0;for(let l=0;l<o.count;l++){e(l,a),y+=+(a.externalColor[3]<1),S+=+(3===a.externalColorMixMode&&1===a.externalColor[3]),O+=+(a.emissiveStrength>0),w+=+(1===a.emissiveSource),W||=1!==a.emissiveStrength,D+=+a.castShadows,s(a.externalColor,a.externalColorMixMode,_),_[2]=254&_[2]|+a.castShadows,f.setArray(i[l],_),I||=l>0&&G!==v[0],G=v[0],k||=0!==a.elevationOffset,k&&null==j&&(j=new Array(l).fill(0)),null!=j&&(j[l]=a.elevationOffset),A=Math.min(A,a.elevationOffset),B=Math.max(B,a.elevationOffset),p.set(i[l],a.elevationOffset),b.set(i[l],a.emissiveStrength),g.set(i[l],0===a.emissiveSource?0:255);const t=a.olidColor;null!=t&&C.setArray(i[l],t),a.pickable!==o.isPickable(l)&&o.updatePickabilityWithCount(l,a.pickable)}if(o.verticalOffsets=k?j:null,this.offsetObb=k?l(this.obb,A,B,t,this.offsetObb??this.obb.clone()):null,I||k||d()||(W||w>0)&&O>0){const{count:e}=o;M=new h(u(y,e),u(S,e),u(O,e),u(w,e),u(D,e)),n.updateTexture(),x=n}else M=new c(a.externalColor,a.externalColorMixMode,a.emissiveStrength,a.emissiveSource,a.castShadows?0:2),x=null;this.updateMaterial({textureBackedBuffer:x,componentParameters:M})}addComponentHighlight(e,t){return this._componentData.addComponentHighlight(e,t)}removeComponentHighlight(e,t){return this._componentData.removeComponentHighlight(e,t)}clearHighlights(){this._componentData.clearHighlights()}destroy(){this._intersectionGeometry=e(this._intersectionGeometry),this._renderable=e(this._renderable),this._componentData=e(this._componentData)}get aabbInWorldCoordinates(){let e=this._aabbInWorldCoordinates;return e||(e=this._computeAabbInWorldCoordinates(),this._aabbInWorldCoordinates=e),e}_computeAabbInWorldCoordinates(){const e=n(),{positions:t}=this._intersectionGeometry;if(Math.floor(t.length/3)>0){const{rotationScale:n,position:s}=this.transform;let l=1/0,m=1/0,h=1/0,c=-1/0,d=-1/0,f=-1/0;const u=a();for(let e=0;e<t.length;e+=3)o(u,t[e+0],t[e+1],t[e+2]),r(u,u,n),i(u,u,s),l=Math.min(l,u[0]),m=Math.min(m,u[1]),h=Math.min(h,u[2]),c=Math.max(c,u[0]),d=Math.max(d,u[1]),f=Math.max(f,u[2]);e[0]=l,e[1]=m,e[2]=h,e[3]=c,e[4]=d,e[5]=f}return e}}function u(e,t){return e===t?0:0===e?2:1}export{f as ComponentObject};
|
|
@@ -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 e from"../../../../../core/Logger.js";import t from"../../../../../core/PooledArray.js";import{isTypedArray as i}from"../../../../../core/typedArrayUtil.js";import{clone as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o}from"../../../../../geometry/support/aaBoundingBox.js";import{compactIndices as r}from"../../../../../geometry/support/Indices.js";import{c as s}from"../../../../../chunks/vec3.js";import{c as a}from"../../../../../chunks/vec33.js";import{ComponentData as c}from"./ComponentData.js";import{ComponentObject as l}from"./ComponentObject.js";import{IntersectionGeometry as m}from"./IntersectionGeometry.js";import{Renderable as h}from"./Renderable.js";import{RenderGeometry as
|
|
5
|
+
import"../../../../../core/has.js";import e from"../../../../../core/Logger.js";import t from"../../../../../core/PooledArray.js";import{isTypedArray as i}from"../../../../../core/typedArrayUtil.js";import{clone as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as o}from"../../../../../geometry/support/aaBoundingBox.js";import{compactIndices as r}from"../../../../../geometry/support/Indices.js";import{c as s}from"../../../../../chunks/vec3.js";import{c as a}from"../../../../../chunks/vec33.js";import{ComponentData as c}from"./ComponentData.js";import{ComponentObject as l}from"./ComponentObject.js";import{IntersectionGeometry as m}from"./IntersectionGeometry.js";import{Renderable as h}from"./Renderable.js";import{RenderGeometry as p}from"./RenderGeometry.js";import{RenderSubmitSystem as f}from"./RenderSubmitSystem.js";import{ComponentMaterial as g}from"./Material/ComponentMaterial.js";import{VertexArrayObject as d}from"../../lib/VertexArrayObject.js";import{getVerticalOffsetI3S as u}from"../../lib/verticalOffsetUtils.js";import{BufferManager as b}from"../../lib/TextureBackedBuffer/BufferManager.js";import{getComponentDataLayout as y,IndexGlLayout as v}from"../../materials/DefaultLayouts.js";import{BufferObject as _}from"../../../../webgl/BufferObject.js";import{PrimitiveType as C}from"../../../../webgl/enums.js";import{VertexBuffer as M}from"../../../../webgl/VertexBuffer.js";const j=()=>e.getLogger("esri.views.3d.webgl-engine.collections.Component.ComponentObjectCollection");class O{constructor(e,i,n){this._renderManager=e,this._viewingMode=i,this._sphericalSpatialReference=n,this._elevationRangeCacheVerticalOffset=NaN,this._elevationRangeCacheMin=NaN,this._elevationRangeCacheMax=NaN,this._activeHighlightOptions=new Map,this._visible=new t,this._hidden=new t,this._renderSubmit=new f(this),this._renderManager.register(this._renderSubmit),this._componentBufferManager=new b(e.rctx,y())}destroy(){this._componentBufferManager.destroy(),this._componentBufferManager=null,this._visible.forAll(e=>e.destroy()),this._visible.prune(),this._hidden.forAll(e=>e.destroy()),this._hidden.prune(),this._renderSubmit.destroy()}createObject(e,t){const{geometry:i}=e,n=new c(this._componentBufferManager,r(i.componentOffsets)),o=this._createRenderable(e,t,n),s=new m(this._viewingMode,i.positions,n,e.elevationAlignable),a=new l(e.transform,e.obb.clone(),n,o,s);return(a.visible?this._visible:this._hidden).push(a),a}destroyObject(e){const t=e;(t.visible?this._visible:this._hidden).removeUnordered(t),t.destroy(),this._notifyDirty()}setObjectVisibility(e,t){const i=e;t!==i.visible&&(t?(this._hidden.removeUnordered(i),this._visible.push(i)):(this._visible.removeUnordered(i),this._hidden.push(i)),i.visible=t,this._notifyDirty())}preSubmit(e){const{camera:t}=e;this._componentBufferManager.updateTextures(),this.visibleObjects.forAll(e=>e.updateCameraDerivedParameters(t))}updateMaterial(e,t){const i=e;i.updateMaterial(t),i.renderable.material.dirty&&this._notifyDirty()}getObjectOpacity(e){return e.renderable.material.objectOpacity}updateObjectOpacity(e,t){const{renderable:i}=e,{material:n}=i;t!==n.objectOpacity&&(n.update({objectOpacity:t}),n.dirty&&this._notifyDirty())}isSliceplaneEnabled(e){return e.renderable.material.slicePlaneEnabled}setAllComponentVisibilities(e,t){const i=e;i.componentData.visibility.reset(t),i.componentData.markVisibilityDirty(),this._notifyDirty()}forEachVisibleComponent(e,t){return e.componentData.visibility.forEachComponent(t)}getComponentCount(e){const t=e,{componentData:i}=t,n=i.visibility.componentCount;return{visible:n,invisible:i.count-n}}setComponentData(e,t){e.setComponentData(t,this._viewingMode),this._elevationRangeCacheVerticalOffset=NaN,this._notifyDirty()}getComponentAabb(e,t,i,n=!1){e.intersectionGeometry.getComponentAabb(t,i);const o=e,r=o.componentData.verticalOffsets;if(n||null==r)return i;const s=r[t];if(2===this._viewingMode||0===s)return i[2]+=s,i[5]+=s,i;const a=u(s);return a.localOrigin=o.transform.position,a.applyToAabb(i)}getComponentObb(e){return e.obb}getObjectTransform(e){return e.transform}getComponentPositions(e,t,i){return e.intersectionGeometry.getComponentPositions(t,i)}expandRangeWithComponentObjectElevationRange(e,t,i,n){Number.isNaN(this._elevationRangeCacheVerticalOffset)||this._elevationRangeCacheVerticalOffset!==t||n.expandElevationRangeValues(this._elevationRangeCacheMin,this._elevationRangeCacheMax);const o=e,{componentData:r}=o,s=r.count,{verticalOffsets:a}=r,{intersectionGeometry:c}=o,l=2===this._viewingMode,m=c.getComponentAabbs(),h=w;let p=1/0,f=-1/0;for(let g=0;g<s;g++){const e=6*g,r=a?.[g]??0;let s=1/0,c=-1/0;if(l)s=m[e+2]+r+t,c=m[e+5]+r+t;else{if(h[0]=m[e],h[1]=m[e+1],h[2]=m[e+2],h[3]=m[e+3],h[4]=m[e+4],h[5]=m[e+5],0!==r){const e=u(r);e.localOrigin=o.transform.position,e.applyToAabb(h)}const s=Math.max(Math.abs(h[3]),Math.abs(h[0])),a=Math.max(Math.abs(h[4]),Math.abs(h[1])),c=t+h[5]+i;n.expandElevationRangeValues(t+h[2],Math.sqrt(s*s+a*a+c*c)-i)}n.expandElevationRangeValues(s,c),p=Math.min(p,s),f=Math.max(f,c)}this._elevationRangeCacheVerticalOffset=t,this._elevationRangeCacheMin=p,this._elevationRangeCacheMax=f}intersect(e,t,i,n,o,r){const s=e,{transform:a,componentData:c,intersectionGeometry:l}=s;return null!=n&&(n.localOrigin=a.position),l.intersect(t,i,n,c.verticalOffsets,a,o,r)}addEdges(e,t,i,n,o){const r=e,{indices:s,positions:a}=r.intersectionGeometry,c=r.componentData.offsets;return t.addComponentObject(r,a,s,c,i,n,o)}async extractEdgeInformation(e,t,i){const o=e,r=o.componentData.visibility;if(r.allInvisible()){const{extractComponentsEdgeLocationsLayout:e}=await import("../../lib/edgeRendering/edgeProcessing.js");return{buffer:e.createBuffer(0),origin:[0,0,0]}}const{indices:c,positions:l}=o.intersectionGeometry,m=o.componentData.offsets,{EdgeInputBufferLayout:h}=await import("../../lib/edgeRendering/bufferLayouts.js"),p=h.createBuffer(l.length/3);a(p.position.typedBuffer,l,p.position.typedBufferStride,3),s(p.position,p.position,o.transform.rotationScale),this._setComponentIndices(p.componentIndex,c,m);const f=p.count,g=this._computeVisibilityIndices(c,r,m,f);return{origin:n(o.transform.position),buffer:await t.extractComponentsEdgeLocations({indices:g,indicesLength:g.length,skipDeduplicate:!0,data:p,writerSettings:{reducedPrecision:!1,variants:0}},i)}}_setComponentIndices(e,t,i){let n=0;for(let o=0;o<i.length-1;o++){const r=i[o],s=i[o+1];for(let i=r;i<s;i++){const o=t?t[i]:i;e.set(o,n)}n++}}_computeVisibilityIndices(e,t,n,o){if(e&&t.allVisible())return e;let r=0;t.forEachComponentRange((e,t)=>(r+=n[t]-n[e],!0));const s=i(e)?2===e?.BYTES_PER_ELEMENT||o<=65536?new Uint16Array(r):new Uint32Array(r):new Array(r);let a=0;return t.forEachComponentRange((t,i)=>{const o=n[t],r=n[i];for(let n=o;n<r;n++)s[a++]=e?e[n]:n;return!0}),s}addComponentHighlight(e,t,i){const n=e;{const e=this._activeHighlightOptions.get(i)??0;this._activeHighlightOptions.set(i,e+1)}n.addComponentHighlight(t,i)&&this._notifyDirty()}removeComponentHighlight(e,t,i){const n=e.removeComponentHighlight(t,i);"notfound"!==n&&(this._removeActiveHighlight(i),n&&this._notifyDirty())}_removeActiveHighlight(e,t=1){const i=this._activeHighlightOptions.get(e);if(void 0===i)j().warn(`Removing non-existing highlight "${e}".`);else{const n=i-t;n<0&&j().warn(`Removing non-existing highlight "${e}".`),n<=0?this._activeHighlightOptions.delete(e):this._activeHighlightOptions.set(e,n)}}clearHighlights(e){const t=e,{componentData:i}=t,{componentHighlights:n}=t.componentData;if(n.size>0){for(const e of n)this._removeActiveHighlight(e[0],e[1][i.count]);t.clearHighlights(),this._notifyDirty()}}hasHighlight(e){return this._activeHighlightOptions.has(e)}getObjectGPUMemoryUsage(e){return e.renderable.meta.gpuMemoryEstimate}get visibleObjects(){return this._visible}_createRenderable(e,t,i){const n=this._renderManager.rctx,o=e.geometry,r=o.parameters.layout,s=new M(n,r,o.vertices.data),a=o.indices?_.createIndex(n,35044,o.indices):null,c=new Uint16Array(o.vertices.count);for(let h=0;h<i.count;h++){const e=i.offsets[h],t=i.offsets[h+1],n=i.materialDataIndices[h];if(null!=o.indices)for(let i=e;i<t;i++){c[o.indices[i]]=n}else for(let i=e;i<t;i++)c[i]=n}const l=new M(n,v,c.buffer),m=new g(t,e.transform,e.toMapSpace,e.obb.radius<D,this._sphericalSpatialReference,n.driverTest.floatBufferBlend.result),f=new d(n,new Map([["geometry",s],["componentIndices",l]]),a),u=new p(f,C.TRIANGLES,o.parameters,null!=a),b={cameraDepthSquared:.5,gpuMemoryEstimate:s.usedMemory+l.usedMemory+(null!=a?a.usedMemory:0)};return new h(m,u,b)}_notifyDirty(){this._renderManager.notifyDirty()}}const w=o(),D=5e4;export{O as ComponentObjectCollection};
|
|
@@ -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{invert as t,transpose as
|
|
5
|
+
import{__decorate as e}from"tslib";import{invert as t,transpose as s}from"../../../../../../core/libs/gl-matrix-2/math/mat3.js";import{clone as o}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{m as r,J as i}from"../../../../../../chunks/vec32.js";import{freeze as a,ZEROS as n}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{v as l}from"../../../../../../chunks/vec42.js";import{ones as u,clone as h}from"../../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ComponentTechnique as p}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as c}from"./ComponentTechniqueConfiguration.js";import{parameter as d,parameterBlock as m,MaterialBase as v,MaterialParameterBlock as f}from"../../../core/material/MaterialBase.js";import{isColor as g}from"../../../core/shaderLibrary/ShaderOutput.js";import{TwoVectorPosition as x}from"../../../core/util/TwoVectorPosition.js";import{advancedMRRFactors as y}from"../../../materials/pbrUtils.js";import{defaultHighlightName as b}from"../../../../../support/HighlightDefaults.js";class T extends v{constructor(e,r,i,n,l,h){super(),this.toMapSpace=i,this.useENUForGlobalOverlayUV=n,this.floatBufferBlendSupported=h,this.usePBR=!1,this.hasParametersFromSource=!1,this.sphereDepthInterpolate=!1,this.mrrFactors=y,this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.normalTexture=null,this.occlusionTexture=null,this.emissionTexture=null,this.emissiveBaseColor=a(0,0,0),this.componentParameters=new M(u(),1,0,0,0),this.textureBackedBuffer=null;const p=o(r.rotationScale);t(p,p),s(p,p),this.transformNormalGlobalFromModel=p;const d=new x(r.position);this.transformWorldFromModelTL=d.low,this.transformWorldFromModelTH=d.high,this.transformWorldFromModelRS=r.rotationScale,this.baseColor=e.baseColor,this.usePBR=e.usePBR,this.hasParametersFromSource=e.hasParametersFromSource,this.sphereDepthInterpolate=e.sphereDepthInterpolate,this.mrrFactors=e.mrrFactors,this.baseColorTexture=e.baseColorTexture,this.metallicRoughnessTexture=e.metallicRoughnessTexture,this.normalTexture=e.normalTexture,this.occlusionTexture=e.occlusionTexture,this.emissionTexture=e.emissionTexture,this.emissiveBaseColor=e.emissiveBaseColor,this.doubleSided=e.doubleSided,this.cullFace=e.cullFace,this.isGround=e.isGround,this.slicePlaneEnabled=e.slicePlaneEnabled,this.objectOpacity=e.objectOpacity,this.textureAlphaCutoff=e.textureAlphaCutoff,this.alphaDiscardMode=e.alphaDiscardMode,this.isIntegratedMesh=e.isIntegratedMesh,this.polygonOffsetEnabled=e.polygonOffsetEnabled,this.ellipsoidMode=e.ellipsoidMode,this._configuration=new c(l),this._updateMaterialConfiguration()}dispose(){this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.emissionTexture=null,this.occlusionTexture=null,this.normalTexture=null}get _hasEmissiveBase(){return null!=this.emissionTexture||!r(this.emissiveBaseColor,n)}get _hasEmissiveStrength(){return 2!==this.componentParameters.emissiveOverride}get hasEmissions(){return this.floatBufferBlendSupported&&this._hasEmissiveStrength&&(this._hasEmissiveBase||2!==this.componentParameters.emissiveSourceOverride)}get texture(){return this.baseColorTexture?.texture}get textureMetallicRoughness(){return this.metallicRoughnessTexture?.texture}get textureEmissive(){return this.emissionTexture?.texture}get textureOcclusion(){return this.occlusionTexture?.texture}get textureNormal(){return this.normalTexture?.texture}acquireTechnique(e,t,s,o){const r=this._updateConfiguration(t,s,o);return e.get(p,r,o.layout)}_updateConfiguration(e,t,s){return this._updateMaterialConfiguration(),this._updateDrawConfiguration(e,t,s)}_updateMaterialConfiguration(){if(!this.dirty)return;const e=this._configuration;e.hasMetallicRoughnessTexture=null!=this.metallicRoughnessTexture,e.hasOcclusionTexture=null!=this.occlusionTexture,e.hasNormalTexture=null!=this.normalTexture,e.sphereDepthInterpolate=this.sphereDepthInterpolate&&e.spherical,e.ellipsoidMode=this.ellipsoidMode,e.componentData=this.componentParameters.componentDataType,e.cullFace=this.cullFace,e.doubleSidedMode=this.doubleSided?1:0,e.hasColorTexture=null!=this.baseColorTexture,e.alphaDiscardMode=this.alphaDiscardMode,e.hasPolygonOffset=this.polygonOffsetEnabled,this._setClean()}_updateDrawConfiguration(e,t,s){const o=this._configuration,r=e.identifier,i=0===r;o.hasEmission=t.hasEmission&&i,o.renderOccluded=10===t.slot,o.hasVertexColors=s.hasVertexColors,o.hasNormals=s.hasNormals,o.textureCoordinateType=s.textureCoordinateType,o.oitPass=i?t.oitPass:0,o.terrainDepthTest=i&&t.terrainDepthTest,o.cullAboveTerrain=!!i&&t.cullAboveTerrain,o.integratedMeshMode=this.isIntegratedMesh?P(t)?O(t)?3:2:1:0,o.pbrMode=3===o.integratedMeshMode?4:this.usePBR?this.hasParametersFromSource?s.shadeNormals&&this.isIntegratedMesh?0:2:1:0;const a=1===this.componentParameters.emissiveSourceOverride,n=2===this.componentParameters.emissiveSourceOverride,l=null!=this.emissionTexture;o.emissionSource=this.hasEmissions?this._hasEmissiveBase?n?l?4:2:a?l?5:7:6:a?7:6:0,o.shadeNormals=s.shadeNormals,o.normalType=o.hasNormals?1:2;const u=null!=t.slicePlane&&this.slicePlaneEnabled;o.hasSlicePlane=u,o.isGroundSlice=u&&this.isGround;const h=this._computeMaterialPass();o.blendingEnabled=1===h||2===h||4===h||o.isGroundSlice,o.hasHighlightMixTexture=2===r&&null!=t.highlightMixTexture,o.output=e.output,o.snowCover=i&&t.snowCover>0,o.vertexDiscardMode=i&&2===h?e.transparent?2:1:0,o.olidColor=i&&9===e.output;const p=i&&g(e.output);return o.receiveAmbientOcclusion=p&&s.applySSAO&&null!=t.ssao?.getTexture(),o.hasOccludees=p&&t.hasOccludees,o.receiveShadows=p&&t.shadowMap.ready,o.screenSpaceReflections=p&&null!=t.ssr.lastFrameColor,o.cloudReflections=p&&null!=t.clouds.data?.cubeMap?.colorTexture,o}submit(e,t,s){if(this.objectOpacity<=0)return;const{componentData:o,renderable:r}=s,{geometry:i}=r,a=r.meta.cameraDepthSquared;o.updateHighlights(t.highlights);const{geometryRanges:n,highlightRangesMap:l,shadowmapRanges:u}=o,h=e=>e.submitDraw(this,i,n,a);switch(this._computeMaterialPass()){case 0:h(e.opaque);break;case 1:h(e.transparent);break;case 2:h(e.opaque),h(e.transparent);break;case 3:h(e.integratedMesh),B(t)&&h(e.occludedGround),C(t)&&h(e.highlightIntegratedMesh);break;case 4:h(e.transparentIntegratedMesh)}if(2!==this.componentParameters.castShadows){if(null!=l)for(const t of l)t[0]===b&&e.highlightShadowMap.submitDraw(this,i,t[1],a,t[0]);null!=u&&e.defaultShadowMap.submitDraw(this,i,u,a),h(e.shadowMap)}if(null!=l)for(const p of l)e.highlight.submitDraw(this,i,p[1],a,p[0]);t.viewshedEnabled&&h(e.viewshedShadowMap)}_computeMaterialPass(){if(this.isIntegratedMesh)return this.objectOpacity<1?4:3;if(this.objectOpacity<1)return this.isIntegratedMesh?4:1;if(0===this.componentParameters.opaqueOverride)return 0;if(this.baseColor[3]<1||0===this.alphaDiscardMode||3===this.alphaDiscardMode)return 1;switch(this.componentParameters.transparent){case 2:return 0;case 0:return 1;case 1:return 2}}update(e){void 0!==e.usePBR&&(this.usePBR=e.usePBR),void 0!==e.objectOpacity&&(this.objectOpacity=e.objectOpacity),void 0!==e.slicePlaneEnabled&&(this.slicePlaneEnabled=e.slicePlaneEnabled),void 0!==e.polygonOffsetEnabled&&(this.polygonOffsetEnabled=e.polygonOffsetEnabled),void 0!==e.textureBackedBuffer&&(this.textureBackedBuffer=e.textureBackedBuffer),void 0!==e.componentParameters&&(this.componentParameters=e.componentParameters)}}e([d({vectorOps:l})],T.prototype,"baseColor",void 0),e([d()],T.prototype,"usePBR",void 0),e([d()],T.prototype,"hasParametersFromSource",void 0),e([d()],T.prototype,"sphereDepthInterpolate",void 0),e([d({vectorOps:i})],T.prototype,"mrrFactors",void 0),e([d({dispose:!0})],T.prototype,"baseColorTexture",void 0),e([d({dispose:!0})],T.prototype,"metallicRoughnessTexture",void 0),e([d({dispose:!0})],T.prototype,"normalTexture",void 0),e([d({dispose:!0})],T.prototype,"occlusionTexture",void 0),e([d({dispose:!0})],T.prototype,"emissionTexture",void 0),e([d({vectorOps:i})],T.prototype,"emissiveBaseColor",void 0),e([d()],T.prototype,"doubleSided",void 0),e([d()],T.prototype,"cullFace",void 0),e([d()],T.prototype,"isGround",void 0),e([d()],T.prototype,"slicePlaneEnabled",void 0),e([m()],T.prototype,"componentParameters",void 0),e([d()],T.prototype,"textureBackedBuffer",void 0),e([d()],T.prototype,"objectOpacity",void 0),e([d()],T.prototype,"textureAlphaCutoff",void 0),e([d()],T.prototype,"alphaDiscardMode",void 0),e([d()],T.prototype,"isIntegratedMesh",void 0),e([d()],T.prototype,"polygonOffsetEnabled",void 0),e([d()],T.prototype,"ellipsoidMode",void 0);class M extends f{constructor(e,t,s,o,r){super(),this.castShadows=r,this.componentDataType=0,this.externalColor=h(e),this.externalColorMixMode=t,this.emissiveStrength=s,this.emissiveSource=o}get transparent(){return this.externalColor[3]<1?0:2}get opaqueOverride(){return 3===this.externalColorMixMode&&1===this.externalColor[3]?0:2}get emissiveOverride(){return this.emissiveStrength>0?0:2}get emissiveSourceOverride(){return 1===this.emissiveSource?0:2}}e([d({vectorOps:l})],M.prototype,"externalColor",void 0),e([d()],M.prototype,"externalColorMixMode",void 0),e([d()],M.prototype,"emissiveStrength",void 0),e([d()],M.prototype,"emissiveSource",void 0);class S extends f{constructor(e,t,s,o,r){super(),this.componentDataType=1,this.transparent=e,this.opaqueOverride=t,this.emissiveOverride=s,this.emissiveSourceOverride=o,this.castShadows=r}}function C(e){return null!=e.overlay?.getTexture(2)}function O(e){return null!=e.overlay?.getTexture(3)}function P(e){return null!=e.overlay?.getTexture(1)}function B(e){return null!=e.overlay?.getTexture(e.overlay?.allSourcesOccluders?1:4)}e([d()],S.prototype,"transparent",void 0),e([d()],S.prototype,"opaqueOverride",void 0),e([d()],S.prototype,"emissiveOverride",void 0),e([d()],S.prototype,"emissiveSourceOverride",void 0),e([d()],S.prototype,"castShadows",void 0);export{T as ComponentMaterial,M as ComponentParametersUniform,S as ComponentParametersVarying};
|
|
@@ -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"
|
|
5
|
+
import"./ComponentData.glsl.js";import"../../../core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import"../../../core/shaderLibrary/ShaderOutput.js";import"../../../core/shaderLibrary/Slice.glsl.js";import"../../../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../../../core/shaderLibrary/attributes/VertexColor.glsl.js";import"../../../core/shaderLibrary/attributes/VertexNormal.glsl.js";import"../../../core/shaderLibrary/attributes/VertexPosition.glsl.js";import"../../../core/shaderLibrary/output/OutputDepth.glsl.js";import"../../../core/shaderLibrary/output/OutputHighlight.glsl.js";import"../../../core/shaderLibrary/output/OutputHighlightOverlay.js";import"../../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../../core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import"../../../core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import"../../../core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import"../../../core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import"../../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../../../core/shaderLibrary/shading/PiUtils.glsl.js";import"../../../core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import"../../../core/shaderLibrary/shading/ReadShadowMap.glsl.js";import"../../../core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import"../../../core/shaderLibrary/terrain/Overlay.glsl.js";import"../../../core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import"../../../core/shaderModules/BooleanDrawUniform.js";import"../../../core/shaderModules/glsl.js";import"../../../core/shaderModules/Texture2DBindUniform.js";import"../../../effects/weather/SnowCover.glsl.js";import"../../../shaders/OutputColorHighlightOLID.glsl.js";import"../../../shaders/SphereDepthInterpolate.glsl.js";import"../../../../../webgl/ShaderBuilder.js";import"../../../../../../webscene/support/AlphaCutoff.js";export{b as build}from"../../../../../../chunks/ComponentShader.glsl.js";
|
package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js
CHANGED
|
@@ -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
|
|
5
|
+
import{__decorate as e}from"tslib";import{isColorHighlightOrOLID as t}from"../../../core/shaderLibrary/ShaderOutput.js";import{parameter as o}from"../../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{SphereDepthInterpolateConfiguration as i}from"../../../shaders/SphereDepthInterpolate.glsl.js";class s extends i{constructor(e){super(),this.sphericalSR=e,this.output=0,this.textureCoordinateType=0,this.componentData=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.oitPass=0,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.hasEmission=!1,this.hasVertexColors=!1,this.hasNormals=!1,this.shadeNormals=!0,this.hasSlicePlane=!1,this.isGroundSlice=!1,this.hasColorTexture=!1,this.hasHighlightMixTexture=!1,this.receiveAmbientOcclusion=!0,this.receiveShadows=!0,this.blendingEnabled=!0,this.screenSpaceReflections=!1,this.hasPolygonOffset=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasNormalTextureTransform=!1,this.cloudReflections=!0,this.snowCover=!1,this.olidColor=!1,this.renderOccluded=!1,this.sphereDepthInterpolate=!1,this.discardInvisibleFragments=!1,this.oitPremultipliedAlpha=!1,this.occlusionPass=!1,this.bindType=2,this.useCustomDTRExponentForWater=!1,this.hasVertexTangents=!1,this.hasSliceTranslatedView=!1,this.highStepCount=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.useFillLights=!0,this.draped=!1}get spherical(){return 0!==this.sphericalSR}get overlayEnabled(){return(2===this.integratedMeshMode||3===this.integratedMeshMode)&&t(this.output)}get hasWater(){return 3===this.pbrMode||4===this.pbrMode||6===this.pbrMode}}e([o({count:10})],s.prototype,"output",void 0),e([o({count:3})],s.prototype,"textureCoordinateType",void 0),e([o({count:2})],s.prototype,"componentData",void 0),e([o({count:3})],s.prototype,"cullFace",void 0),e([o({count:3})],s.prototype,"vertexDiscardMode",void 0),e([o({count:3})],s.prototype,"doubleSidedMode",void 0),e([o({count:4})],s.prototype,"alphaDiscardMode",void 0),e([o({count:4})],s.prototype,"integratedMeshMode",void 0),e([o({count:3})],s.prototype,"oitPass",void 0),e([o({count:7})],s.prototype,"pbrMode",void 0),e([o({count:3})],s.prototype,"normalType",void 0),e([o({count:8})],s.prototype,"emissionSource",void 0),e([o()],s.prototype,"hasEmission",void 0),e([o()],s.prototype,"hasVertexColors",void 0),e([o()],s.prototype,"hasNormals",void 0),e([o()],s.prototype,"shadeNormals",void 0),e([o()],s.prototype,"hasSlicePlane",void 0),e([o()],s.prototype,"isGroundSlice",void 0),e([o()],s.prototype,"hasColorTexture",void 0),e([o()],s.prototype,"hasHighlightMixTexture",void 0),e([o()],s.prototype,"receiveAmbientOcclusion",void 0),e([o()],s.prototype,"receiveShadows",void 0),e([o()],s.prototype,"blendingEnabled",void 0),e([o()],s.prototype,"screenSpaceReflections",void 0),e([o()],s.prototype,"hasPolygonOffset",void 0),e([o()],s.prototype,"hasMetallicRoughnessTexture",void 0),e([o()],s.prototype,"hasOcclusionTexture",void 0),e([o()],s.prototype,"hasNormalTexture",void 0),e([o()],s.prototype,"hasOccludees",void 0),e([o()],s.prototype,"terrainDepthTest",void 0),e([o()],s.prototype,"cullAboveTerrain",void 0),e([o()],s.prototype,"hasNormalTextureTransform",void 0),e([o()],s.prototype,"cloudReflections",void 0),e([o()],s.prototype,"snowCover",void 0),e([o()],s.prototype,"olidColor",void 0),e([o()],s.prototype,"renderOccluded",void 0),e([o()],s.prototype,"sphereDepthInterpolate",void 0);export{s as ComponentTechniqueConfiguration};
|
|
@@ -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{newLayout as e}from"../../../support/buffer/InterleavedLayout.js";import{NoParameters as s}from"../../../../webgl/NoParameters.js";class t{constructor(e,s,t,o,r){this.vertices=e,this.positions=s,this.indices=t,this.componentOffsets=o,this.parameters=r}}class o extends s{constructor(e,s,t,o){super(),this.layout=e,this.shadeNormals=s,this.applySSAO=t,this.textureCoordinateType=o}get hasVertexColors(){return this.layout.some(({name:e})=>"color"===e)}get hasNormals(){return this.layout.some(({name:e})=>"normalCompressed"===e)}}class r extends s{constructor(e,s,t,o,r){super(),this.hasVertexColors=e,this.textureCoordinateType=s,this.hasNormals=t,this.shadeNormals=o,this.applySSAO=r}}function a(s){const t=e().vec3f("position");return s.hasNormals&&t.vec2i16("normalCompressed",{glNormalized:!0}),1===s.textureCoordinateType?t.vec2f("uv0"):2===s.textureCoordinateType&&(t.vec2f("uv0"),t.vec4u16("uvRegion",{glNormalized:!0})),s.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),t.freeze()}export{r as GeometryParameters,t as SourceGeometry,
|
|
5
|
+
import{newLayout as e}from"../../../support/buffer/InterleavedLayout.js";import{NoParameters as s}from"../../../../webgl/NoParameters.js";class t{constructor(e,s,t,o,r){this.vertices=e,this.positions=s,this.indices=t,this.componentOffsets=o,this.parameters=r}}class o extends s{constructor(e,s,t,o){super(),this.layout=e,this.shadeNormals=s,this.applySSAO=t,this.textureCoordinateType=o}get hasVertexColors(){return this.layout.some(({name:e})=>"color"===e)}get hasNormals(){return this.layout.some(({name:e})=>"normalCompressed"===e)}}class r extends s{constructor(e,s,t,o,r){super(),this.hasVertexColors=e,this.textureCoordinateType=s,this.hasNormals=t,this.shadeNormals=o,this.applySSAO=r}}function a(s){const t=e().vec3f("position");return s.hasNormals&&t.vec2i16("normalCompressed",{glNormalized:!0}),1===s.textureCoordinateType?t.vec2f("uv0"):2===s.textureCoordinateType&&(t.vec2f("uv0"),t.vec4u16("uvRegion",{glNormalized:!0})),s.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),t.freeze()}export{o as ComponentGeometryParameters,r as GeometryParameters,t as SourceGeometry,a as createVertexBufferLayout};
|
|
@@ -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 s}from"tslib";import{subclass as e}from"../../../../../core/accessorSupport/decorators.js";import{fromMat4 as t,transpose as r,invert as a}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{h,d as o}from"../../../../../chunks/vec32.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{MaterialPassParameters as c,ShadowMapPassParameters as m,HighlightPassParameters as u,ViewshedShadowMapPassParameters as l,AllRenderPasses as p}from"./AllRenderPasses.js";import{TwoVectorPosition as _}from"../util/TwoVectorPosition.js";import{SyncRenderPlugin as d}from"../../effects/RenderPlugin.js";import{DepthRange as P}from"../../lib/DepthRange.js";let f=class extends d{constructor(){super(...arguments),this.produces=new Map([[2,s=>this._produces(s,2)],[4,s=>this._produces(s,4)],[0,s=>this._produces(s,0)],[8,s=>this._produces(s,8)],[10,s=>this._produces(s,10)]]),this._materialPassParameters=new c,this._shadowPassParameters=new m,this._highlightPassParameters=new u,this._viewshedPassParameters=new l,this._systems=new Set}initializeRenderContext(s){this._context=s,this._passes=new p(s)}get rctx(){return this._context.renderContext.rctx}uninitializeRenderContext(){}dispose(){this._context=null,this._systems.clear(),this._passes=null}register(s){this._systems.add(s)}_produces(s,e){return!!this._invoke(s,e,s=>s.count>0)}prepareRender(s){const{_systems:e,_passes:t}=this;if(0!==e.size&&null!=t){for(const s of Object.values(t))s.prepareSubmit();e.forEach(e=>e.submit(t,s.bind));for(const s of Object.values(t))s.finishSubmit()}}acquireTechniques(s){if(0===this._systems.size)return null;const e=3===s.output||4===s.output||5===s.output?this._shadowPassParameters:6===s.output?this._viewshedPassParameters:8===s.output?this._highlightPassParameters:this._materialPassParameters,t=s
|
|
5
|
+
import{__decorate as s}from"tslib";import{subclass as e}from"../../../../../core/accessorSupport/decorators.js";import{fromMat4 as t,transpose as r,invert as a}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{h,d as o}from"../../../../../chunks/vec32.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{MaterialPassParameters as c,ShadowMapPassParameters as m,HighlightPassParameters as u,ViewshedShadowMapPassParameters as l,AllRenderPasses as p}from"./AllRenderPasses.js";import{TwoVectorPosition as _}from"../util/TwoVectorPosition.js";import{SyncRenderPlugin as d}from"../../effects/RenderPlugin.js";import{DepthRange as P}from"../../lib/DepthRange.js";let f=class extends d{constructor(){super(...arguments),this.produces=new Map([[2,s=>this._produces(s,2)],[4,s=>this._produces(s,4)],[0,s=>this._produces(s,0)],[8,s=>this._produces(s,8)],[10,s=>this._produces(s,10)]]),this._materialPassParameters=new c,this._shadowPassParameters=new m,this._highlightPassParameters=new u,this._viewshedPassParameters=new l,this._systems=new Set}initializeRenderContext(s){this._context=s,this._passes=new p(s)}get rctx(){return this._context.renderContext.rctx}uninitializeRenderContext(){}dispose(){this._context=null,this._systems.clear(),this._passes=null}register(s){this._systems.add(s)}_produces(s,e){return!!this._invoke(s,e,s=>s.count>0)}prepareRender(s){const{_systems:e,_passes:t}=this;if(0!==e.size&&null!=t){for(const s of Object.values(t))s.prepareSubmit();e.forEach(e=>e.submit(t,s.bind));for(const s of Object.values(t))s.finishSubmit()}}acquireTechniques(s){if(0===this._systems.size)return null;const e=3===s.output||4===s.output||5===s.output?this._shadowPassParameters:6===s.output?this._viewshedPassParameters:8===s.output?this._highlightPassParameters:this._materialPassParameters,{bind:t}=s;return this._updateParameters(t.camera,e,t.slot),this._materialPassParameters.output=s.output,this._invoke(s.output,s.bind.slot,(e,t)=>e.acquire(t,s.bind))}render(s,e){this._invoke(s.output,s.bind.slot,(t,r)=>t.dispatch(r,s.bind,e))}_invoke(s,e,t){if(null==this._passes)return null;switch(e){case 2:switch(s){case 0:case 1:case 2:case 9:return t(this._passes.opaque,this._materialPassParameters);case 8:return t(this._passes.highlight,this._highlightPassParameters);case 3:return t(this._passes.shadowMap,this._shadowPassParameters);case 4:return t(this._passes.highlightShadowMap,this._shadowPassParameters);case 5:return t(this._passes.defaultShadowMap,this._shadowPassParameters);case 6:return t(this._passes.viewshedShadowMap,this._viewshedPassParameters)}break;case 4:switch(s){case 0:case 1:case 2:case 9:return t(this._passes.transparent,this._materialPassParameters)}break;case 0:switch(s){case 0:case 1:case 2:case 9:case 7:return t(this._passes.integratedMesh,this._materialPassParameters);case 8:return t(this._passes.highlightIntegratedMesh,this._highlightPassParameters)}break;case 8:if(0===s)return t(this._passes.transparentIntegratedMesh,this._materialPassParameters);break;case 10:switch(s){case 0:case 1:case 2:case 9:return t(this._passes.occludedGround,this._materialPassParameters)}}return null}notifyDirty(){this._context.requestRender()}queryDepthRange(s){const e=new P;return this._systems.forEach(t=>e.union(t.queryDepthRange(s))),e}get hasEmitters(){let s=!1;return this._systems.forEach(e=>s=e.hasEmissions||s),s}_updateParameters(s,e,i){const n=s.viewInverseTransposeMatrix,c=4===i,m=10===i;h(w,n[3],n[7],n[11]),b.set(w),o(e.transformWorldFromViewTH,b.high),o(e.transformWorldFromViewTL,b.low),o(e.slicePlaneLocalOrigin,w),t(e.transformViewFromCameraRelativeRS,s.viewMatrix),0===e.identifier&&(this._materialPassParameters.transparent=c,this._materialPassParameters.occludedGround=m,r(g,e.transformViewFromCameraRelativeRS),a(e.transformNormalViewFromGlobal,g))}hasHighlight(s){for(const e of this._systems)if(e.hasHighlight(s))return!0;return!1}};f=s([e("esri.views.3d.webgl-engine.core.renderPasses.RenderPassManager")],f);const w=n(),g=i(),b=new _;export{f as RenderPassManager};
|
|
@@ -2,7 +2,7 @@
|
|
|
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{ForwardLinearDepth as r}from"./ForwardLinearDepth.glsl.js";import{
|
|
5
|
+
import{ForwardLinearDepth as r}from"./ForwardLinearDepth.glsl.js";import{isShadowLike as e}from"./ShaderOutput.js";import{VertexPosition as a}from"./attributes/VertexPosition.glsl.js";import{Float2BindUniform as o}from"../shaderModules/Float2BindUniform.js";import{glsl as t,If as n}from"../shaderModules/glsl.js";function i(r){r.vertex.uniforms.add(new o("nearFar",r=>r.camera.nearFar))}function d(r){r.vertex.code.add(t`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
6
6
|
return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
7
7
|
}`)}function s(o,s){const{vertex:l}=o,u=e(s.output);u&&(o.include(a,s),r(o,!0),i(o),d(o)),l.code.add(t`
|
|
8
8
|
void forwardLinearDepthToWriteShadowMap() {
|
|
@@ -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
|
-
function n(n){return 3===n||4===n||5===n||6===
|
|
5
|
+
function n(n){return 3===n||4===n||5===n}function r(r){return n(r)||6===r||7===r}function t(n){return x(n)||2===n}function u(n){return 8===n||9===n}function e(n){return o(n)||u(n)}function o(n){return 0===n}function c(n){return o(n)||9===n}function f(n){return o(n)||8===n}function i(n){return f(n)||a(n)}function p(n){return o(n)||u(n)}function x(n){return p(n)||a(n)}function a(n){return 1===n}function b(n){return a(n)||r(n)}export{e as is2DGeometryOutput,t as is3DGeometryOutputMRT,o as isColor,x as isColorHighlightOLIDOrDepth,i as isColorHighlightOrDepth,p as isColorHighlightOrOLID,f as isColorOrHighlight,c as isColorOrOLID,a as isDepth,b as isDepthOrShadowLike,u as isHighlightOrOLID,n as isShadow,r as isShadowLike};
|
|
@@ -2,7 +2,7 @@
|
|
|
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{translate as
|
|
5
|
+
import{__decorate as e}from"tslib";import has from"../../../../../core/has.js";import{translate as s}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as i}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{i as a,p as l,e as o,h as n}from"../../../../../chunks/vec32.js";import{ZEROS as c,create as r}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{InstancedDoubleConfiguration as t}from"./attributes/InstancedDoubleConfiguration.js";import{Float3DrawUniform as f}from"../shaderModules/Float3DrawUniform.js";import{Float3PassUniform as d}from"../shaderModules/Float3PassUniform.js";import{glsl as u}from"../shaderModules/glsl.js";import{parameter as p}from"../shaderTechnique/ShaderTechniqueConfiguration.js";import{NoParameters as P}from"../../../../webgl/NoParameters.js";class m extends t{constructor(){super(...arguments),this.hasSlicePlane=!1,this.hasSliceTranslatedView=!1}}e([p()],m.prototype,"hasSlicePlane",void 0);class b extends P{constructor(e){super(),this.slicePlaneLocalOrigin=e}}function v(e,s){g(e,s,new d("slicePlaneOrigin",(e,i)=>x(s,e,i)),new d("slicePlaneBasis1",(e,i)=>O(s,e,i,i.slicePlane?.basis1)),new d("slicePlaneBasis2",(e,i)=>O(s,e,i,i.slicePlane?.basis2)))}function h(e,s){g(e,s,new f("slicePlaneOrigin",(e,i)=>x(s,e,i)),new f("slicePlaneBasis1",(e,i)=>O(s,e,i,i.slicePlane?.basis1)),new f("slicePlaneBasis2",(e,i)=>O(s,e,i,i.slicePlane?.basis2)))}function w(e,s){B(e,s,new f("slicePlaneOrigin",(e,i)=>x(s,e,i)),new f("slicePlaneBasis1",(e,i)=>O(s,e,i,i.slicePlane?.basis1)),new f("slicePlaneBasis2",(e,i)=>O(s,e,i,i.slicePlane?.basis2)))}const S=u`struct SliceFactors {
|
|
6
6
|
float front;
|
|
7
7
|
float side0;
|
|
8
8
|
float side1;
|
|
@@ -37,5 +37,5 @@ return dot(slicePlaneBasis1, slicePlaneBasis1) != 0.0;
|
|
|
37
37
|
}
|
|
38
38
|
bool rejectBySlice(vec3 pos) {
|
|
39
39
|
return sliceEnabled() && sliceByFactors(calculateSliceFactors(pos));
|
|
40
|
-
}`;function
|
|
41
|
-
vec4 applySlice(vec4 color, vec3 pos) { return color; }`)}function
|
|
40
|
+
}`;function B(e,s,...i){s.hasSlicePlane?(e.uniforms.add(...i),e.code.add(S)):e.code.add("bool rejectBySlice(vec3 pos) { return false; }")}function g(e,s,...i){e.constants.add("groundSliceOpacity","float",has("enable-feature:oit-ground")?.25:.2),B(e,s,...i),s.hasSlicePlane?e.code.add("\n void discardBySlice(vec3 pos) {\n if (rejectBySlice(pos)) {\n discard;\n }\n }\n\n vec4 applySliceOutline(vec4 color, vec3 pos) {\n SliceFactors factors = calculateSliceFactors(pos);\n\n factors.front /= 2.0 * fwidth(factors.front);\n factors.side0 /= 2.0 * fwidth(factors.side0);\n factors.side1 /= 2.0 * fwidth(factors.side1);\n factors.side2 /= 2.0 * fwidth(factors.side2);\n factors.side3 /= 2.0 * fwidth(factors.side3);\n\n // return after calling fwidth, to avoid aliasing caused by discontinuities in the input to fwidth\n if (sliceByFactors(factors)) {\n return color;\n }\n\n float outlineFactor = (1.0 - step(0.5, factors.front))\n * (1.0 - step(0.5, factors.side0))\n * (1.0 - step(0.5, factors.side1))\n * (1.0 - step(0.5, factors.side2))\n * (1.0 - step(0.5, factors.side3));\n\n return mix(color, vec4(vec3(0.0), color.a), outlineFactor * 0.3);\n }\n\n vec4 applySlice(vec4 color, vec3 pos) {\n return sliceEnabled() ? applySliceOutline(color, pos) : color;\n }\n "):e.code.add(u`void discardBySlice(vec3 pos) { }
|
|
41
|
+
vec4 applySlice(vec4 color, vec3 pos) { return color; }`)}function y(e,s,i){return e.instancedDoublePrecision?n(D,i.camera.viewInverseTransposeMatrix[3],i.camera.viewInverseTransposeMatrix[7],i.camera.viewInverseTransposeMatrix[11]):s.slicePlaneLocalOrigin}function F(e,s){return null!=e?o(L,s.origin,e):s.origin}function j(e,i,a){return e.hasSliceTranslatedView?null!=i?s(T,a.camera.viewMatrix,i):a.camera.viewMatrix:null}function x(e,s,i){if(null==i.slicePlane)return c;const a=y(e,s,i),o=F(a,i.slicePlane),n=j(e,a,i);return null!=n?l(L,o,n):o}function O(e,s,i,n){if(null==n||null==i.slicePlane)return c;const r=y(e,s,i),t=F(r,i.slicePlane),f=j(e,r,i);return null!=f?(a(M,n,t),l(L,t,f),l(M,M,f),o(M,M,L)):n}const D=r(),L=r(),M=r(),T=i();export{w as RejectBySlice,m as SliceConfiguration,h as SliceDraw,v as SlicePass,b as SlicePlaneParameters};
|
|
@@ -2,17 +2,17 @@
|
|
|
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{IDENTITY as e}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{ONES as t}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{VertexTextureCoordinates as a}from"../attributes/VertexTextureCoordinates.glsl.js";import{
|
|
5
|
+
import{IDENTITY as e}from"../../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{ONES as t}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{VertexTextureCoordinates as a}from"../attributes/VertexTextureCoordinates.glsl.js";import{Float2DrawUniform as r}from"../../shaderModules/Float2DrawUniform.js";import{Float2PassUniform as n}from"../../shaderModules/Float2PassUniform.js";import{glsl as o}from"../../shaderModules/glsl.js";import{Matrix3PassUniform as s}from"../../shaderModules/Matrix3PassUniform.js";import{Texture2DDrawUniform as m}from"../../shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as d}from"../../shaderModules/Texture2DPassUniform.js";function l(e,t){return i(e,t)}function c(e,t){return i(e,t)}function i(l,c){const i=l.fragment,{hasVertexTangents:u,doubleSidedMode:x,hasNormalTexture:T,textureCoordinateType:g,bindType:f,hasNormalTextureTransform:v}=c;u?(l.attributes.add("tangent","vec4"),l.varyings.add("vTangent","vec4"),2===x?i.code.add(o`mat3 computeTangentSpace(vec3 normal) {
|
|
6
6
|
float tangentHeadedness = gl_FrontFacing ? vTangent.w : -vTangent.w;
|
|
7
7
|
vec3 tangent = normalize(gl_FrontFacing ? vTangent.xyz : -vTangent.xyz);
|
|
8
8
|
vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
|
|
9
9
|
return mat3(tangent, bitangent, normal);
|
|
10
|
-
}`):
|
|
10
|
+
}`):i.code.add(o`mat3 computeTangentSpace(vec3 normal) {
|
|
11
11
|
float tangentHeadedness = vTangent.w;
|
|
12
12
|
vec3 tangent = normalize(vTangent.xyz);
|
|
13
13
|
vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
|
|
14
14
|
return mat3(tangent, bitangent, normal);
|
|
15
|
-
}`)):
|
|
15
|
+
}`)):i.code.add(o`mat3 computeTangentSpace(vec3 normal, vec3 pos, vec2 st) {
|
|
16
16
|
vec3 Q1 = dFdx(pos);
|
|
17
17
|
vec3 Q2 = dFdy(pos);
|
|
18
18
|
vec2 stx = dFdx(st);
|
|
@@ -23,9 +23,9 @@ T = T - normal * dot(normal, T);
|
|
|
23
23
|
T *= inversesqrt(max(dot(T,T), 1.e-10));
|
|
24
24
|
vec3 B = sign(det) * cross(normal, T);
|
|
25
25
|
return mat3(T, B, normal);
|
|
26
|
-
}`),T&&0!==
|
|
27
|
-
vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;`),v&&
|
|
26
|
+
}`),T&&0!==g&&(l.include(a,c),i.uniforms.add(1===f?new d("normalTexture",e=>e.textureNormal):new m("normalTexture",e=>e.textureNormal)),v&&(i.uniforms.add(1===f?new n("scale",e=>e.scale??t):new r("scale",e=>e.scale??t)),i.uniforms.add(new s("normalTextureTransformMatrix",t=>t.normalTextureTransformMatrix??e))),i.code.add(o`vec3 computeTextureNormal(mat3 tangentSpace, vec2 uv) {
|
|
27
|
+
vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;`),v&&i.code.add(o`mat3 normalRotation = mat3(normalTextureTransformMatrix[0][0]/scale[0], normalTextureTransformMatrix[0][1]/scale[1], 0.0,
|
|
28
28
|
normalTextureTransformMatrix[1][0]/scale[0], normalTextureTransformMatrix[1][1]/scale[1], 0.0,
|
|
29
29
|
0.0, 0.0, 0.0 );
|
|
30
|
-
rawNormal.xy = (normalRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),
|
|
31
|
-
}`))}export{
|
|
30
|
+
rawNormal.xy = (normalRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),i.code.add(o`return tangentSpace * rawNormal;
|
|
31
|
+
}`))}export{c as ComputeNormalTextureDraw,l as ComputeNormalTexturePass};
|
|
@@ -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 i from"../../../../../core/Accessor.js";import r from"../../../../../core/Logger.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{
|
|
5
|
+
import{__decorate as e}from"tslib";import i from"../../../../../core/Accessor.js";import r from"../../../../../core/Logger.js";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{isDepthOrShadowLike as o}from"../shaderLibrary/ShaderOutput.js";import{Pos2 as a}from"../../lib/DefaultVertexBufferLayouts.js";import{Program as n}from"../../lib/Program.js";import{PrimitiveType as l,DrawBufferNone as h}from"../../../../webgl/enums.js";import{makePipelineState as c,defaultColorWrite as p,premultipliedAlpha as m}from"../../../../webgl/renderState.js";import{fromLayout as u}from"../../../../webgl/VertexAttributeLocations.js";const d=()=>r.getLogger("esri.views.3d.webgl.ShaderTechnique");let g=class extends i{constructor(e,i,r){super({}),this._context=e,this._configuration=i,this.primitiveType=l.TRIANGLES,this.key=i.key,this.locations=u(r??a),this._pipeline=this.initializePipeline(i),this.reload=async r=>{if(r&&await this.shader.reload(),!this.key.equals(i.key))return void d().warn(`Configuration was changed after construction, cannot reload shader for ${this.declaredClass}.`);t(this._program);const s=this.shader.get().build(i);s.debugName=this.declaredClass,this._program=new n(e.rctx,s,this.locations),this._pipeline=this.initializePipeline(i)}}initialize(){const e=this.shader.get().build(this._configuration);e.debugName=this.declaredClass,this._program=new n(this._context.rctx,e,this.locations)}destroy(){this._program=t(this._program),this._pipeline=null}get program(){return this._program}get compiled(){return this.program.compiled}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,i){return this._pipeline}initializePipeline(e){return c({blending:m,colorWrite:p})}};function f(e,i){return o(e)?{buffers:[h]}:i??null}g=e([s("esri.views.3d.webgl-engine.core.shaderTechnique.ShaderTechnique")],g);export{g as ShaderTechnique,f as depthOnlyOutputBuffersOr};
|
|
@@ -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{m as e,h as r,d as t,n as s,e as a,b as i,j as o,g as n,t as l}from"../../../../chunks/vec32.js";import{ZEROS as u,create as c,fromValues as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{is3DGeometryOutputMRT as m,
|
|
5
|
+
import{m as e,h as r,d as t,n as s,e as a,b as i,j as o,g as n,t as l}from"../../../../chunks/vec32.js";import{ZEROS as u,create as c,fromValues as h}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{is3DGeometryOutputMRT as m,isShadowLike as p,isColor as d}from"../core/shaderLibrary/ShaderOutput.js";import{GLTextureMaterial as f}from"../lib/GLTextureMaterial.js";import{Material as T}from"../lib/Material.js";import{intersectTriangleGeometry as x}from"../lib/RayIntersections.js";import{getVerticalOffsetObject3D as g}from"../lib/verticalOffsetUtils.js";import{DefaultBufferWriter as v}from"./DefaultBufferWriter.js";import{verticalOffsetAtDistance as S}from"./internal/MaterialUtil.js";import{getLayout as b,DefaultMaterialPassParameters as M,DefaultMaterialTechnique as O}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as C}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as w}from"../shaders/RealisticTreeTechnique.js";import{alphaCutoff as y}from"../../../../webscene/support/AlphaCutoff.js";class R extends T{constructor(e,r){super(e,D),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>(m(e)||p(e))&&!this.transparent],[4,e=>(m(e)||p(e))&&this.transparent&&this.parameters.writeDepth],[9,e=>(m(e)||p(e))&&this.transparent&&!this.parameters.writeDepth]]),this._layout=b(this.parameters),this._configuration=new C(r.spherical)}isVisibleForOutput(e){return 3!==e&&5!==e&&4!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:r,opacity:t,externalColor:s}=this.parameters;return e*("replace"===r?1:t)*("ignore"===r||isNaN(s[3])?1:s[3])>=y}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!e(this.parameters.emissiveBaseColor,u)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)}getConfiguration(e,r){const{parameters:t,_configuration:s}=this,{treeRendering:a,doubleSided:i,doubleSidedType:o}=t;return super.getConfiguration(e,r,this._configuration),s.hasNormalTexture=t.hasNormalTexture,s.hasColorTexture=t.hasColorTexture,s.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,s.hasOcclusionTexture=t.hasOcclusionTexture,s.hasVertexTangents=!a&&t.hasVertexTangents,s.instanced=t.instanced,s.instancedDoublePrecision=t.instancedDoublePrecision,s.hasVVColor=!!t.vvColor,s.hasVVSize=!!t.vvSize,s.hasVerticalOffset=null!=t.verticalOffset,s.hasScreenSizePerspective=null!=t.screenSizePerspective,s.hasSlicePlane=t.hasSlicePlane,s.alphaDiscardMode=t.textureAlphaMode,s.normalType=a?0:t.normalType,s.transparent=this.transparent,s.writeDepth=t.writeDepth,s.customDepthTest=t.customDepthTest??0,s.hasOccludees=r.hasOccludees,s.cullFace=t.hasSlicePlane?0:t.cullFace,s.cullAboveTerrain=r.cullAboveTerrain,s.hasModelTransformation=!a&&null!=t.modelTransformation,s.hasVertexColors=t.hasVertexColors,s.hasSymbolColors=t.hasSymbolColors,s.doubleSidedMode=a?2:i&&"normal"===o?1:i&&"winding-order"===o?2:0,s.instancedFeatureAttribute=t.instancedFeatureAttribute,s.instancedColor=t.instancedColor,d(e)?(s.terrainDepthTest=r.terrainDepthTest,s.receiveShadows=t.receiveShadows,s.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=r.ssao):(s.terrainDepthTest=!1,s.receiveShadows=s.receiveAmbientOcclusion=!1),s.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,s.pbrMode=t.usePBR?t.isSchematic?2:1:0,s.emissionSource=t.emissionSource,s.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),s.oitPass=r.oitPass,s.enableOffset=r.enableOffset,s.snowCover=r.snowCover>0,s.hasColorTextureTransform=!!t.colorTextureTransformMatrix,s.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,s.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,s.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,s.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix,s}intersect(e,u,c,h,m,p){if(null!=this.parameters.verticalOffset){const e=c.camera;r(N,u[12],u[13],u[14]);let p=null;switch(c.viewingMode){case 1:p=s(_,N);break;case 2:p=t(_,I)}const d=a(z,N,e.eye),f=i(d),T=o(d,d,1/f);let x=null;this.parameters.screenSizePerspective&&(x=n(p,T));const g=S(e,f,this.parameters.verticalOffset,x??0,this.parameters.screenSizePerspective,null);o(p,p,g),l(B,p,c.transform.inverseRotation),h=a(A,h,B),m=a(V,m,B)}x(e,c,h,m,g(c.verticalOffset),p)}createGLMaterial(e){return new P(e)}createBufferWriter(){return new v(this._layout)}get transparent(){return j(this.parameters)}}class P extends f{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const s=e.camera.viewInverseTransposeMatrix;return r(t.origin,s[3],s[7],s[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?w:O,e)}}class D extends M{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}function j(e){const{drivenOpacity:r,opacity:t,externalColor:s,layerOpacity:a,texture:i,textureId:o,textureAlphaMode:n,colorMixMode:l}=e,u=s[3];return r||t<1&&"replace"!==l||u<1&&"ignore"!==l||a<1||(null!=i||null!=o)&&1!==n&&2!==n&&"replace"!==l}const A=c(),V=c(),I=h(0,0,1),_=c(),B=c(),N=c(),z=c();export{P as DefaultGLMaterial,R as DefaultMaterial,D as DefaultMaterialParameters,j as isTransparent};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as
|
|
5
|
+
import{__decorate as i}from"tslib";import{SliceConfiguration as t}from"../core/shaderLibrary/Slice.glsl.js";import{parameter as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends t{constructor(){super(...arguments),this.oitPass=0,this.hasHighlightMixTexture=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}i([e({count:3})],r.prototype,"oitPass",void 0),i([e()],r.prototype,"hasHighlightMixTexture",void 0);export{r as DefaultTechniqueConfiguration};
|
|
@@ -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{clamp as t}from"../../../../core/mathUtils.js";import{clone as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as s}from"../../../../geometry/support/aaBoundingBox.js";import{
|
|
5
|
+
import{clamp as t}from"../../../../core/mathUtils.js";import{clone as e}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as s}from"../../../../geometry/support/aaBoundingBox.js";import{isShadowLike as r,is3DGeometryOutputMRT as a,isColor as o}from"../core/shaderLibrary/ShaderOutput.js";import n from"../lib/GLMaterial.js";import{Material as h}from"../lib/Material.js";import{isPathGeometry as c}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as p,intersectAabbInvDir as u}from"../lib/RayIntersections.js";import{DefaultBufferWriter as m}from"./DefaultBufferWriter.js";import{getLayout as l,PathPassParameters as f,PathTechnique as d}from"./PathTechnique.js";import{PathTechniqueConfiguration as b}from"./PathTechniqueConfiguration.js";import{alphaCutoff as g}from"../../../../webscene/support/AlphaCutoff.js";class _ extends h{constructor(t,e){super(t,w),this.supportsEdges=!0,this._pp0=i(0,0,1),this._pp1=i(0,0,0),this.produces=new Map([[2,t=>(this.parameters.castShadows&&r(t)||a(t))&&!this.transparent],[4,t=>(this.parameters.castShadows&&r(t)||a(t))&&this.transparent]]),this._configuration=new b(e.spherical)}get hasEmissions(){return this.parameters.emissiveStrength>0}getConfiguration(t,e){return super.getConfiguration(t,e,this._configuration),this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=e.hasOccludees,o(t)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?1:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?2:0,this._configuration.receiveShadows=e.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=e.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?2:0,this._configuration.emissionSource=this.parameters.usePBR?1:0,this._configuration.oitPass=e.oitPass,this._configuration.terrainDepthTest=e.terrainDepthTest,this._configuration.cullAboveTerrain=e.cullAboveTerrain,this._configuration.snowCover=e.snowCover>0,this._configuration}isVisibleForOutput(t){return 3!==t&&5!==t&&4!==t||this.parameters.castShadows}get visible(){return this.parameters.opacity>=g}intersect(t,e,i,s,r,a){this._intersect(t,i,s,r,a)}intersectDraped(t,e,i,s){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this._intersect(t,e,this._pp0,this._pp1,s)}_intersect(i,r,a,o,n){const h=i;if(!c(h))return;const m=h.path,l=e(this.parameters.size);if(this.parameters.vvSize){const{offset:e,factor:i,minSize:s,maxSize:r,fallback:a}=this.parameters.vvSize,o=m.sizeAttributeValue;Number.isNaN(o)?(l[0]*=a[0],l[1]*=a[2]):(l[0]*=t(e[0]+o*i[0],s[0],r[0]),l[1]*=t(e[2]+o*i[2],s[2],r[2]))}const f=new p(r.tolerance,!1,r.options.normalRequired),d=Math.max(l[0],l[1]),b=i.boundingInfo;if(null==b)return void v(m,l,a,o,f,n);const g=s(b.bbMin[0]-d,b.bbMin[1]-d,b.bbMin[2]-d,b.bbMax[0]+d,b.bbMax[1]+d,b.bbMax[2]+d),_=[o[0]-a[0],o[1]-a[1],o[2]-a[2]],S=Math.sqrt(_[0]*_[0]+_[1]*_[1]+_[2]*_[2]),w=[S/_[0],S/_[1],S/_[2]];u(g,a,w,r.tolerance)&&v(m,l,a,o,f,n)}createBufferWriter(){return new m(l(this.parameters))}createGLMaterial(t){return new S(t)}get transparent(){const{parameters:t}=this;return t.drivenOpacity||t.opacity<1}}class S extends n{beginSlot(t){return this.getTechnique(d,t)}}function v(t,e,i,s,r,a){t.baked.size&&t.baked.size[0]===e[0]&&t.baked.size[1]===e[1]||t.baked.bake(e),t.baked.intersect(i,s,r,a)}class w extends f{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}export{w as Parameters,_ as PathMaterial};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{ShaderTechniqueConfiguration as e}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends e{constructor(e){super(),this.spherical=e}}export{r as ViewingModeConfiguration};
|