@arcgis/core 5.1.0-next.36 → 5.1.0-next.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/applications/Components/analysisUtils.js +1 -1
- package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{e09722903e63f6cc2540.js → 03894992558d063d0d5e.js} +1 -1
- package/assets/esri/core/workers/chunks/{4490f8eeeb2ee04daa9d.js → 0dd12d6af0cf7707109c.js} +2 -2
- package/assets/esri/core/workers/chunks/13838b6c045425e73cf8.js +1 -0
- package/assets/esri/core/workers/chunks/{6f1c590abd0e3adeb8fc.js → 1bf3e787eafec318bd2b.js} +1 -1
- package/assets/esri/core/workers/chunks/1d54b71c43d9d6a5f713.js +1 -0
- package/assets/esri/core/workers/chunks/{64e1273e4e79c73ed579.js → 2ddfd406b9044390e9f7.js} +1 -1
- package/assets/esri/core/workers/chunks/2fa86dacc8a12a6a6c43.js +1 -0
- package/assets/esri/core/workers/chunks/34f79355145c8e4c59dd.js +1 -0
- package/assets/esri/core/workers/chunks/3be111488365768fd917.js +1 -0
- package/assets/esri/core/workers/chunks/448620052233e51b496c.js +1 -0
- package/assets/esri/core/workers/chunks/{6ca2064ea96bdb594f52.js → 4b0d6309abf273f1f79f.js} +1 -1
- package/assets/esri/core/workers/chunks/{973e3743cb7fdaa27f80.js → 4e07827ab870c65377d3.js} +1 -1
- package/assets/esri/core/workers/chunks/60e4312044fe40dfd41d.js +2 -0
- package/assets/esri/core/workers/chunks/67f95c57c1679935570b.js +1 -0
- package/assets/esri/core/workers/chunks/{04094d576bfa11d90f73.js → 6afdaa6c4555c467dca7.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7a9716582b256d76e5b.js → 873c1b705ac3d4e6c384.js} +1 -1
- package/assets/esri/core/workers/chunks/{527547fa10d52cb3a7b1.js → 888f6387e795d45a7ad3.js} +2 -2
- package/assets/esri/core/workers/chunks/{eb811adbc5243d293ef5.js → 93bf908f596140ea4c61.js} +1 -1
- package/assets/esri/core/workers/chunks/{2d49a611ad3441d7e759.js → 9ae9e9a65cb08b12caeb.js} +15 -15
- package/assets/esri/core/workers/chunks/{eaeb95be8d4032513247.js → b014f0b2385dc82dc683.js} +2 -2
- package/assets/esri/core/workers/chunks/{2128a66f522d15493ce2.js → b2303b2771fcd75f298b.js} +1 -1
- package/assets/esri/core/workers/chunks/{7c16493ea34c49a6291e.js → b8f624f8c975728d75e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5144e570952ca62a1b0.js → b98c24229463029504e8.js} +1 -1
- package/assets/esri/core/workers/chunks/bf668010f36179792592.js +1 -0
- package/assets/esri/core/workers/chunks/c0ecb68387e342dddf58.js +1 -0
- package/assets/esri/core/workers/chunks/{0f2d6f267d235db48767.js → cb482e20e10ab0f63617.js} +1 -1
- package/assets/esri/core/workers/chunks/d024278a1c2aa7d22be3.js +1 -0
- package/assets/esri/core/workers/chunks/{19955d064c17ba2fd9ad.js → d0da3a44f33f4d8e682b.js} +1 -1
- package/assets/esri/core/workers/chunks/{0e78678281bcb888964d.js → d456f06d0c6a5cc02be7.js} +1 -1
- package/assets/esri/core/workers/chunks/{a35d1be700ebd3109397.js → d82b543c96f09ded3bf9.js} +2 -2
- package/assets/esri/core/workers/chunks/{776a7179d32fe62a37e3.js → de9fea9b6f2269ee0703.js} +1 -1
- package/assets/esri/core/workers/chunks/{e8ae71e482b8d5f54a72.js → dec51409372764e7093d.js} +1 -1
- package/assets/esri/core/workers/chunks/e09f8b17cb0b92354de8.js +1 -0
- package/assets/esri/core/workers/chunks/{b859d98fa1c39f8e4099.js → e0a63b5861e8c975097e.js} +1 -1
- package/assets/esri/core/workers/chunks/{23cb0611abe1031c513c.js → fce30184f354fb7d11af.js} +1 -1
- package/assets/esri/core/workers/chunks/{67de5225b2c66c9c7bc9.js → ffc87a038712a4c9d2cb.js} +1 -1
- package/chunks/ChapmanAtmosphere.glsl.js +4 -4
- package/chunks/Clouds.glsl.js +14 -14
- package/chunks/ComponentShader.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/chunks/Fog.glsl.js +2 -1
- package/chunks/GaussianSplat.glsl.js +2 -2
- package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
- package/chunks/GeodeticUtils.js +1 -1
- package/chunks/GlowBlur.glsl.js +8 -8
- package/chunks/GlowComposition.glsl.js +7 -7
- package/chunks/HUDMaterial.glsl.js +4 -1
- package/chunks/Haze.glsl.js +4 -4
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/NoiseTextureAtlas.glsl.js +34 -34
- package/chunks/OITBlend.glsl.js +10 -10
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticLength.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/Path.glsl.js +2 -2
- package/chunks/Point2D.js +1 -1
- package/chunks/RealisticTree.glsl.js +1 -1
- package/chunks/SlicePlaneMaterial.glsl.js +6 -5
- package/chunks/SpatialReference.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/geometry/libtess.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
- package/intl.js +1 -1
- package/kernel.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/dehydratedPoint.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/libs/lyr3d/Lyr3DModule.js +1 -1
- package/package.json +4 -4
- package/rest/print.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/imagery/RasterBitmap.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/analysis/Dimension/DimensionController.js +1 -1
- package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshNormals.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/RasterTile.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/DepthRange.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/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/WeatherFader.js +2 -0
- package/views/3d/{environment → webgl-engine/effects/atmosphere}/ChapmanApproximation.glsl.js +3 -3
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +2 -0
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechniqueConfiguration.js +2 -0
- package/views/3d/{environment → webgl-engine/effects/atmosphere}/ChapmanRaymarching.glsl.js +5 -5
- package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +2 -0
- package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +2 -0
- package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphereTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphereTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/effects/atmosphere/atmosphereUtils.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/Clouds.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/CloudsCompositionTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/CloudsParameters.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/CloudsTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/CloudsTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlasConfiguration.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlasDimensions.js +2 -0
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlasTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/fog/Fog.js +2 -0
- package/views/3d/webgl-engine/effects/fog/FogTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/fog/FogTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/effects/glow/GlowBlurTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/precipitation/Precipitation.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +2 -0
- package/views/3d/webgl-engine/effects/precipitation/PrecipitationTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/precipitation/PrecipitationTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +2 -0
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +2 -0
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +10 -10
- package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +2 -0
- package/views/3d/webgl.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/interactive/sketch/normalizedPoint.js +1 -1
- package/views/interactive/snapping/LineSnapper.js +1 -1
- package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
- package/views/interactive/snapping/SelfSnappingEngine.js +1 -1
- package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/candidates/dehydrated/DehydratedVertexSnappingCandidate.js +1 -1
- package/views/interactive/tooltip/infos/TooltipInfoWithCoordinates.js +1 -1
- package/views/support/MeasurementWorker.js +1 -1
- package/views/support/MeasurementWorkerHandle.js +1 -1
- package/views/support/measurementWorkerUtils.js +1 -1
- package/views/webgl/WebGLDriverTest.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/assets/esri/core/workers/chunks/144acac9bb1aa78f1170.js +0 -1
- package/assets/esri/core/workers/chunks/2f20a21db44bd8448e9e.js +0 -1
- package/assets/esri/core/workers/chunks/5d87316d6f973d95745c.js +0 -1
- package/assets/esri/core/workers/chunks/63722607fbf8d411188d.js +0 -1
- package/assets/esri/core/workers/chunks/6ac84e6d33104e74398d.js +0 -1
- package/assets/esri/core/workers/chunks/a53979c45ee429e21b99.js +0 -2
- package/assets/esri/core/workers/chunks/b1ddc837a6805a09d0da.js +0 -1
- package/assets/esri/core/workers/chunks/bd278f8081be8304be8d.js +0 -1
- package/assets/esri/core/workers/chunks/bd902ae413887082b453.js +0 -1
- package/assets/esri/core/workers/chunks/ce3e192fbb53a9c6eb3b.js +0 -1
- package/assets/esri/core/workers/chunks/de5719ef663224860af5.js +0 -1
- package/assets/esri/core/workers/chunks/f7506c9d57b2ae0c5fd3.js +0 -1
- package/views/3d/environment/ChapmanAtmosphere.glsl.js +0 -2
- package/views/3d/environment/ChapmanAtmosphere.js +0 -2
- package/views/3d/environment/ChapmanAtmosphereTechnique.js +0 -2
- package/views/3d/environment/ChapmanAtmosphereTechniqueConfiguration.js +0 -2
- package/views/3d/environment/Clouds.glsl.js +0 -2
- package/views/3d/environment/CloudsComposition.glsl.js +0 -2
- package/views/3d/environment/CloudsComposition.js +0 -2
- package/views/3d/environment/CloudsCompositionTechnique.js +0 -2
- package/views/3d/environment/CloudsParameters.js +0 -2
- package/views/3d/environment/CloudsRenderer.js +0 -2
- package/views/3d/environment/CloudsTechnique.js +0 -2
- package/views/3d/environment/CloudsTechniqueConfiguration.js +0 -2
- package/views/3d/environment/EnvironmentRenderer.js +0 -2
- package/views/3d/environment/Fog.glsl.js +0 -2
- package/views/3d/environment/Fog.js +0 -2
- package/views/3d/environment/FogTechnique.js +0 -2
- package/views/3d/environment/FogTechniqueConfiguration.js +0 -2
- package/views/3d/environment/LocalAtmosphere.js +0 -2
- package/views/3d/environment/MarsAtmosphere.js +0 -2
- package/views/3d/environment/NoiseTextureAtlas.glsl.js +0 -2
- package/views/3d/environment/NoiseTextureAtlas.js +0 -2
- package/views/3d/environment/NoiseTextureAtlasConfiguration.js +0 -2
- package/views/3d/environment/NoiseTextureAtlasDimensions.js +0 -2
- package/views/3d/environment/NoiseTextureAtlasTechnique.js +0 -2
- package/views/3d/environment/Precipitation.glsl.js +0 -2
- package/views/3d/environment/Precipitation.js +0 -2
- package/views/3d/environment/PrecipitationTechnique.js +0 -2
- package/views/3d/environment/PrecipitationTechniqueConfiguration.js +0 -2
- package/views/3d/environment/SimpleAtmosphere.glsl.js +0 -2
- package/views/3d/environment/SimpleAtmosphereTechnique.js +0 -2
- package/views/3d/environment/SimpleAtmosphereTechniqueConfiguration.js +0 -2
- package/views/3d/environment/atmosphereUtils.js +0 -2
- package/views/3d/webgl-engine/lib/CutFillColor.js +0 -2
- package/views/3d/webgl-engine/lib/CutFillDepth.js +0 -2
- package/views/support/geodesicAreaMeasurementUtils.js +0 -2
- package/views/support/geodesicLengthMeasurementUtils.js +0 -2
- package/views/support/geodesicMeasurementUtils.js +0 -2
- package/views/webgl/AppleAmdDriverHelper.js +0 -2
- package/views/webgl/testAppleAmdDrawArrays.js +0 -2
- /package/assets/esri/core/workers/chunks/{4490f8eeeb2ee04daa9d.js.LICENSE.txt → 0dd12d6af0cf7707109c.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{a53979c45ee429e21b99.js.LICENSE.txt → 60e4312044fe40dfd41d.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{527547fa10d52cb3a7b1.js.LICENSE.txt → 888f6387e795d45a7ad3.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{eaeb95be8d4032513247.js.LICENSE.txt → b014f0b2385dc82dc683.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{a35d1be700ebd3109397.js.LICENSE.txt → d82b543c96f09ded3bf9.js.LICENSE.txt} +0 -0
- /package/views/3d/{environment/resources → webgl-engine/effects/atmosphere}/MarsAtmosphereTexture.js +0 -0
- /package/views/3d/{environment/resources → webgl-engine/effects/atmosphere}/SimpleAtmosphereTexture.js +0 -0
- /package/views/3d/{environment → webgl-engine/effects/clouds}/Clouds.js +0 -0
- /package/views/3d/{environment → webgl-engine/effects/clouds}/CloudsPresets.js +0 -0
- /package/views/3d/webgl-engine/effects/{weather → snowcover}/SnowCover.glsl.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import t from"../../../../../core/PooledArray.js";import{fromQuat as e,scale as r}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{conjugate as o}from"../../../../../core/libs/gl-matrix-2/math/quat.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{
|
|
2
|
+
import t from"../../../../../core/PooledArray.js";import{fromQuat as e,scale as r}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{conjugate as o}from"../../../../../core/libs/gl-matrix-2/math/quat.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{set as c,transformQuat as i,dot as l,sub as s,transformMat3 as f,add as u,lerp as m,copy as h}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{signedDistance as p}from"../../../../../geometry/support/plane.js";import{DepthRange as g}from"../../lib/DepthRange.js";function j(t,e){const r=new g,{eye:n,frustum:o,viewForward:a}=t;e.forAll(t=>{const e=null!=t.offsetObb?t.offsetObb:t.obb,c=(e.centerX-n[0])*a[0]+(e.centerY-n[1])*a[1]+(e.centerZ-n[2])*a[2],i=e.projectedRadius(a);if(r.within(c-i)&&r.within(c+i))return;const l=S(e,o);if(-1===l)return;if(0===l)return w.far=c+i,w.near=c-i,void r.union(w);const s=d.pushNew();s.near=c-i,s.far=c+i,s.mask=l,s.object=t});for(let i=0;i<d.length;i++){const t=d.data[i];if(r.within(t.near)&&r.within(t.far))continue;w.far=t.far,w.near=1/0;const e=z(null!=t.object.offsetObb?t.object.offsetObb:t.object.obb,n,v,e=>{let r=y;for(let n=0;n<R&&e.length>0;n++){if(!(t.mask&1<<n))continue;O(o[n],e,r);const a=e;e=r,r=a}for(let t=0;t<e.length;t+=3){c(x,e.data[t],e.data[t+1],e.data[t+2]);const r=l(s(x,x,n),a);w.near=Math.min(w.near,r)}});0===e&&(w.near=0),r.union(w)}return d.length=0,r}const d=new t({allocator:t=>t||{near:1/0,far:-1/0,mask:0,object:null},deallocator:t=>(t.object=null,t)}),w=new g,x=b(),q=b(),v=new t({deallocator:null}),y=new t({deallocator:null});function O(t,e,r){r.length=0;const n=e.length-3;k(x,e,n);const o=p(t,x);o<=0&&(r.push(x[0]),r.push(x[1]),r.push(x[2]));let a=0,c=o;for(;a<n;a+=3){k(q,e,a);const n=p(t,q);if(c*n<0){m(x,q,x,n/(n-c)),A(r,x)}n<=0&&A(r,q),c=n,h(x,q)}if(c*o<0){k(q,e,n);m(x,q,x,o/(o-c)),A(r,x)}}function k(t,e,r){return c(t,e.data[r],e.data[r+1],e.data[r+2])}function A(t,e){t.push(e[0]),t.push(e[1]),t.push(e[2])}function z(t,n,a,l){o(Y,t.quaternion),c(Z,n[0]-t.centerX,n[1]-t.centerY,n[2]-t.centerZ),i(Z,Z,Y);const s=t.halfSize,m=8*((Z[0]<-s[0]?-1:Z[0]>s[0]?1:0)+3*(Z[1]<-s[1]?-1:Z[1]>s[1]?1:0)+9*(Z[2]<-s[2]?-1:Z[2]>s[2]?1:0)+13),h=P[m];if(0===h)return h;e(X,t.quaternion),r(X,X,t.halfSize);const b=(e,r)=>{const n=P[m+r+1];return c(e,((1&n)<<1)-1,(2&n)-1,((4&n)>>1)-1),f(e,e,X),u(e,t.center,e)};return a.length=0,A(a,b(D,0)),A(a,b(F,1)),A(a,b(Z,2)),A(a,b(M,3)),l(a),1===h?h:(a.length=0,A(a,D),A(a,M),A(a,b(Z,4)),A(a,b(N,5)),l(a),2===h||(a.length=0,A(a,D),A(a,N),A(a,b(Z,6)),A(a,F),l(a)),h)}const P=(()=>{const t=new Array(216);let e=0;const r=r=>{for(let n=0;n<r.length;n++)t[e+n]=r[n];e+=8};return r([3,0,6,2,3,1,5,4]),r([2,0,2,3,1,5,4,0]),r([3,1,0,2,3,7,5,4]),r([2,0,1,3,2,6,4,0]),r([1,0,1,3,2,0,0,0]),r([2,1,5,7,3,2,0,0]),r([3,2,0,1,3,7,6,4]),r([2,2,0,1,3,7,6,0]),r([3,3,0,1,5,7,6,2]),r([2,0,1,5,4,6,2,0]),r([1,0,1,5,4,0,0,0]),r([2,1,3,7,5,4,0,0]),r([1,0,2,6,4,0,0,0]),r([0,0,0,0,0,0,0,0]),r([1,1,3,7,5,0,0,0]),r([2,2,3,7,6,4,0,0]),r([1,2,3,7,6,0,0,0]),r([2,3,1,5,7,6,2,0]),r([3,4,0,1,5,7,6,2]),r([2,5,7,6,4,0,1,0]),r([3,5,0,1,3,7,6,4]),r([2,4,5,7,6,2,0,0]),r([1,4,5,7,6,0,0,0]),r([2,5,1,3,7,6,4,0]),r([3,6,0,2,3,7,5,4]),r([2,6,2,3,7,5,4,0]),r([3,7,6,2,3,1,5,4]),t})(),R=4;function S(t,e){let r=0;for(let n=0;n<R;n++){const o=t.intersectPlane(e[n]);if(o>0)return-1;0===o&&(r|=1<<n)}return r}const X=n(),Y=a(),Z=b(),D=b(),F=b(),M=b(),N=b();export{j as computeDepthRange};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{exactEquals as e}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as t}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ComponentTechnique as r}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as s}from"./ComponentTechniqueConfiguration.js";import{MaterialBase as i}from"../../../core/material/MaterialBase.js";import{isColor as o}from"../../../core/shaderLibrary/ShaderOutput.js";class a extends i{constructor(e,t,r,i,o){super(),this.parameters=e,this.key=o,this.usePBR=e.usePBR,this.hasParametersFromSource=e.hasParametersFromSource,this.isGround=e.isGround,this.slicePlaneEnabled=e.slicePlaneEnabled,this.isIntegratedMesh=e.isIntegratedMesh,this.applySSAO=e.applySSAO,this.hasEmissions=u(e,r,i),this.materialPass=n(e,r),this._configuration=new s(i.sphericalSR),this._initializeMaterialConfiguration(e,t,r,i)}destroy(){}acquireTechnique(e,t,s,i){const o=this._updateConfiguration(t,s);return e.get(r,o,i.layout)}_initializeMaterialConfiguration(e,t,r,s){const i=this._configuration;i.hasMetallicRoughnessTexture=null!=e.metallicRoughnessTexture,i.hasOcclusionTexture=null!=e.occlusionTexture,i.hasNormalTexture=null!=e.normalTexture,i.sphereDepthInterpolate=e.sphereDepthInterpolate&&i.spherical,i.ellipsoidMode=e.ellipsoidMode,i.doubleSidedMode=e.doubleSided?1:0,i.hasColorTexture=null!=e.baseColorTexture,i.cullFace=e.cullFace,i.alphaDiscardMode=e.alphaDiscardMode,i.hasVertexColors=t.hasVertexColors,i.textureCoordinateType=t.textureCoordinateType,i.shadeNormals=t.shadeNormals,i.normalType=t.hasNormals?1:2,i.hasPolygonOffset=e.polygonOffsetEnabled,i.vertexPositionRotationType=t.vertexPositionRotationType,i.vertexNormalRotationType=t.vertexNormalRotationType,i.componentDataType=r.componentDataType,i.emissionSource=c(e,r,s)}_updateConfiguration(e,t){const r=this._configuration,{identifier:s,output:i}=e,a=0===s;r.output=i,r.hasEmission=t.hasEmission&&a,r.renderOccluded=10===t.slot,r.oitPass=a?t.oitPass:0,r.terrainDepthTest=a&&t.terrainDepthTest,r.cullAboveTerrain=!!a&&t.cullAboveTerrain;const n=this.isIntegratedMesh?d(t)?h(t)?3:2:1:0;r.integratedMeshMode=n,r.pbrMode=3===n?4:this.usePBR?this.hasParametersFromSource?0!==r.shadeNormals&&this.isIntegratedMesh?0:2:1:0,r.hasSlicePlane=null!=t.slicePlane&&this.slicePlaneEnabled,r.isGroundSlice=r.hasSlicePlane&&this.isGround;const{materialPass:l}=this;r.blendingEnabled=a&&(1===l||2===l&&e.transparent||4===l)||r.isGroundSlice,r.hasHighlightMixTexture=2===s&&null!=t.highlightMixTexture,r.snowCover=a&&t.snowCover>0,r.vertexDiscardMode=a&&2===l?e.transparent?2:1:0;const u=a&&o(i);return r.receiveAmbientOcclusion=u&&this.applySSAO&&!r.renderOccluded&&null!=t.ssao?.getTexture(),r.hasOccludees=u&&t.hasOccludees,r.receiveShadows=u&&t.shadowMap.ready,r.screenSpaceReflections=u&&null!=t.ssr.lastFrameColor,r.cloudReflections=u&&null!=t.clouds.data?.cubeMap?.colorTexture,r}}function n(e,t){const{alphaDiscardMode:r,isIntegratedMesh:s,slicePlaneEnabled:i}=e,{transparent:o,opaqueOverride:a}=t,n=e.opacity<1,l=e.baseColor[3]<1;if(s)return n||i?4:3;if(n)return 1;if(0===a)return 0;if(l||0===r||3===r)return 1;switch(o){case 2:return 0;case 0:return 1;case 1:return 2}}function l(r){return null!=r.emissionTexture||!e(r.emissiveBaseColor,t)}function u(e,t,r){const s=l(e);return r.floatBufferBlendSupported&&2!==t.emissiveOverride&&(s||2!==t.emissiveSourceOverride)}function c(e,t,r){const s=null!=e.emissionTexture,{emissiveSourceOverride:i}=t,o=1===i,a=2===i,n=u(e,t,r),c=l(e);return n?c?a?s?4:2:o?s?5:7:6:o?7:6:0}function h(e){return null!=e.overlay?.getTexture(3)}function d(e){return null!=e.overlay?.getTexture(1)}export{a as ComponentMaterial,c as calculateEmissionSource,u as calculateHasEmissions,l as calculateHasEmissiveBase,n as computeMaterialPass};
|
|
2
|
+
import{exactEquals as e}from"../../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as t}from"../../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ComponentTechnique as r}from"./ComponentTechnique.js";import{ComponentTechniqueConfiguration as s}from"./ComponentTechniqueConfiguration.js";import{MaterialBase as i}from"../../../core/material/MaterialBase.js";import{isColor as o}from"../../../core/shaderLibrary/ShaderOutput.js";class a extends i{constructor(e,t,r,i,o){super(),this.parameters=e,this.key=o,this.usePBR=e.usePBR,this.hasParametersFromSource=e.hasParametersFromSource,this.isGround=e.isGround,this.slicePlaneEnabled=e.slicePlaneEnabled,this.isIntegratedMesh=e.isIntegratedMesh,this.applySSAO=e.applySSAO,this.hasEmissions=u(e,r,i),this.materialPass=n(e,r),this._configuration=new s(i.sphericalSR,i.floatBufferBlendSupported),this._initializeMaterialConfiguration(e,t,r,i)}destroy(){}acquireTechnique(e,t,s,i){const o=this._updateConfiguration(t,s);return e.get(r,o,i.layout)}_initializeMaterialConfiguration(e,t,r,s){const i=this._configuration;i.hasMetallicRoughnessTexture=null!=e.metallicRoughnessTexture,i.hasOcclusionTexture=null!=e.occlusionTexture,i.hasNormalTexture=null!=e.normalTexture,i.sphereDepthInterpolate=e.sphereDepthInterpolate&&i.spherical,i.ellipsoidMode=e.ellipsoidMode,i.doubleSidedMode=e.doubleSided?1:0,i.hasColorTexture=null!=e.baseColorTexture,i.cullFace=e.cullFace,i.alphaDiscardMode=e.alphaDiscardMode,i.hasVertexColors=t.hasVertexColors,i.textureCoordinateType=t.textureCoordinateType,i.shadeNormals=t.shadeNormals,i.normalType=t.hasNormals?1:2,i.hasPolygonOffset=e.polygonOffsetEnabled,i.vertexPositionRotationType=t.vertexPositionRotationType,i.vertexNormalRotationType=t.vertexNormalRotationType,i.componentDataType=r.componentDataType,i.emissionSource=c(e,r,s)}_updateConfiguration(e,t){const r=this._configuration,{identifier:s,output:i}=e,a=0===s;r.output=i,r.hasEmission=t.hasEmission&&a,r.renderOccluded=10===t.slot,r.oitPass=a?t.oitPass:0,r.terrainDepthTest=a&&t.terrainDepthTest,r.cullAboveTerrain=!!a&&t.cullAboveTerrain;const n=this.isIntegratedMesh?d(t)?h(t)?3:2:1:0;r.integratedMeshMode=n,r.pbrMode=3===n?4:this.usePBR?this.hasParametersFromSource?0!==r.shadeNormals&&this.isIntegratedMesh?0:2:1:0,r.hasSlicePlane=null!=t.slicePlane&&this.slicePlaneEnabled,r.isGroundSlice=r.hasSlicePlane&&this.isGround;const{materialPass:l}=this;r.blendingEnabled=a&&(1===l||2===l&&e.transparent||4===l)||r.isGroundSlice,r.hasHighlightMixTexture=2===s&&null!=t.highlightMixTexture,r.snowCover=a&&t.snowCover>0,r.vertexDiscardMode=a&&2===l?e.transparent?2:1:0;const u=a&&o(i);return r.receiveAmbientOcclusion=u&&this.applySSAO&&!r.renderOccluded&&null!=t.ssao?.getTexture(),r.hasOccludees=u&&t.hasOccludees,r.receiveShadows=u&&t.shadowMap.ready,r.screenSpaceReflections=u&&null!=t.ssr.lastFrameColor,r.cloudReflections=u&&null!=t.clouds.data?.cubeMap?.colorTexture,r}}function n(e,t){const{alphaDiscardMode:r,isIntegratedMesh:s,slicePlaneEnabled:i}=e,{transparent:o,opaqueOverride:a}=t,n=e.opacity<1,l=e.baseColor[3]<1;if(s)return n||i?4:3;if(n)return 1;if(0===a)return 0;if(l||0===r||3===r)return 1;switch(o){case 2:return 0;case 0:return 1;case 1:return 2}}function l(r){return null!=r.emissionTexture||!e(r.emissiveBaseColor,t)}function u(e,t,r){const s=l(e);return r.floatBufferBlendSupported&&2!==t.emissiveOverride&&(s||2!==t.emissiveSourceOverride)}function c(e,t,r){const s=null!=e.emissionTexture,{emissiveSourceOverride:i}=t,o=1===i,a=2===i,n=u(e,t,r),c=l(e);return n?c?a?s?4:2:o?s?5:7:6:o?7:6:0}function h(e){return null!=e.overlay?.getTexture(3)}function d(e){return null!=e.overlay?.getTexture(1)}export{a as ComponentMaterial,c as calculateEmissionSource,u as calculateHasEmissions,l as calculateHasEmissiveBase,n as computeMaterialPass};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
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/
|
|
2
|
+
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/snowcover/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
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as t}from"tslib";import{isColorHighlightOrOLID as e}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(t,e){super(),this.sphericalSR=t,this.hasFloatOit=e,this.output=0,this.textureCoordinateType=0,this.componentDataType=0,this.cullFace=2,this.vertexDiscardMode=0,this.doubleSidedMode=2,this.alphaDiscardMode=1,this.integratedMeshMode=0,this.oitPass=0,this.pbrMode=0,this.normalType=0,this.emissionSource=0,this.shadeNormals=1,this.hasEmission=!1,this.hasVertexColors=!1,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.renderOccluded=!1,this.sphereDepthInterpolate=!1,this.vertexPositionRotationType=1,this.vertexNormalRotationType=0,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,this.useTransformationTexture=!0}get spherical(){return 0!==this.sphericalSR}get overlayEnabled(){return(2===this.integratedMeshMode||3===this.integratedMeshMode)&&e(this.output)}get hasWater(){return 3===this.pbrMode||4===this.pbrMode||6===this.pbrMode}}t([o({count:10})],s.prototype,"output",void 0),t([o({count:3})],s.prototype,"textureCoordinateType",void 0),t([o({count:2})],s.prototype,"componentDataType",void 0),t([o({count:3})],s.prototype,"cullFace",void 0),t([o({count:3})],s.prototype,"vertexDiscardMode",void 0),t([o({count:3})],s.prototype,"doubleSidedMode",void 0),t([o({count:4})],s.prototype,"alphaDiscardMode",void 0),t([o({count:4})],s.prototype,"integratedMeshMode",void 0),t([o({count:3})],s.prototype,"oitPass",void 0),t([o({count:7})],s.prototype,"pbrMode",void 0),t([o({count:3})],s.prototype,"normalType",void 0),t([o({count:8})],s.prototype,"emissionSource",void 0),t([o({count:3})],s.prototype,"shadeNormals",void 0),t([o()],s.prototype,"hasEmission",void 0),t([o()],s.prototype,"hasVertexColors",void 0),t([o()],s.prototype,"hasSlicePlane",void 0),t([o()],s.prototype,"isGroundSlice",void 0),t([o()],s.prototype,"hasColorTexture",void 0),t([o()],s.prototype,"hasHighlightMixTexture",void 0),t([o()],s.prototype,"receiveAmbientOcclusion",void 0),t([o()],s.prototype,"receiveShadows",void 0),t([o()],s.prototype,"blendingEnabled",void 0),t([o()],s.prototype,"screenSpaceReflections",void 0),t([o()],s.prototype,"hasPolygonOffset",void 0),t([o()],s.prototype,"hasMetallicRoughnessTexture",void 0),t([o()],s.prototype,"hasOcclusionTexture",void 0),t([o()],s.prototype,"hasNormalTexture",void 0),t([o()],s.prototype,"hasOccludees",void 0),t([o()],s.prototype,"terrainDepthTest",void 0),t([o()],s.prototype,"cullAboveTerrain",void 0),t([o()],s.prototype,"hasNormalTextureTransform",void 0),t([o()],s.prototype,"cloudReflections",void 0),t([o()],s.prototype,"snowCover",void 0),t([o()],s.prototype,"renderOccluded",void 0),t([o()],s.prototype,"sphereDepthInterpolate",void 0),t([o({count:2})],s.prototype,"vertexPositionRotationType",void 0),t([o({count:2})],s.prototype,"vertexNormalRotationType",void 0);export{s as ComponentTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{create as t}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{RenderPass as s}from"./RenderPass.js";import{VertexNormalPassParameters as e,VertexNormalDrawParameters as i}from"../shaderLibrary/attributes/VertexNormal.glsl.js";class r{constructor(t,e){const{rctx:i}=t.renderContext,{techniques:r}=t;this.opaque=new s(e,i,r),this.transparent=new s(e,i,r,1),this.integratedMesh=new s(e,i,r),this.transparentIntegratedMesh=new s(e,i,r),this.occludedGround=new s(e,i,r),this.shadowMap=new s(e,i,r),this.highlight=new s(e,i,r),this.highlightIntegratedMesh=new s(e,i,r),this.highlightShadowMap=new s(e,i,r),this.viewshedShadowMap=new s(e,i,r),this.defaultShadowMap=new s(e,i,r)}}class n extends e{constructor(){super(...arguments),this.slicePlaneLocalOrigin=t(),this.origin=this.slicePlaneLocalOrigin}
|
|
2
|
+
import{create as t}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{RenderPass as s}from"./RenderPass.js";import{VertexNormalPassParameters as e,VertexNormalDrawParameters as i}from"../shaderLibrary/attributes/VertexNormal.glsl.js";class r{constructor(t,e){const{rctx:i}=t.renderContext,{techniques:r}=t;this.opaque=new s(e,i,r),this.transparent=new s(e,i,r,1),this.integratedMesh=new s(e,i,r),this.transparentIntegratedMesh=new s(e,i,r),this.occludedGround=new s(e,i,r),this.shadowMap=new s(e,i,r),this.highlight=new s(e,i,r),this.highlightIntegratedMesh=new s(e,i,r),this.highlightShadowMap=new s(e,i,r),this.viewshedShadowMap=new s(e,i,r),this.defaultShadowMap=new s(e,i,r)}}class n extends e{constructor(){super(...arguments),this.slicePlaneLocalOrigin=t(),this.origin=this.slicePlaneLocalOrigin}}class h extends i{}class o extends n{constructor(){super(...arguments),this.identifier=0,this.output=0,this.transparent=!1,this.occludedGround=!1}}class a extends n{constructor(){super(...arguments),this.identifier=1,this.output=3}}class c extends n{constructor(){super(...arguments),this.identifier=2,this.output=8}}class d extends n{constructor(){super(...arguments),this.identifier=3,this.output=6}}export{r as AllRenderPasses,h as DrawParameters,c as HighlightPassParameters,o as MaterialPassParameters,n as PassParameters,a as ShadowMapPassParameters,d as ViewshedShadowMapPassParameters};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{getOrCreateMapValue as e}from"../../../../../core/MapUtils.js";import{DataType as t}from"../../../../webgl/enums.js";class
|
|
2
|
+
import{getOrCreateMapValue as e}from"../../../../../core/MapUtils.js";import{DataType as t}from"../../../../webgl/enums.js";class s{constructor(e,t,s,r=0){this._owner=e,this._rctx=t,this._techniques=s,this._sorting=r,this._draws=new Array,this._previouslyBoundDraw=new Map}destroy(){this._draws.length=0,this._previouslyBoundDraw.clear()}submitDraw(e,t,s,i,a,n){const o=(s.indexed?s.vao.indexBuffer.indexType:null)??0;this._owner.registerDrawParameters(t);const h=new r(e,t,s,i,a,o,n);this._draws.push(h)}acquire(t,s){const r=new Map;return this._draws.map(i=>e(r,i.material,()=>i.material.acquireTechnique(this._techniques,t,s,i.geometry.parameters)))}dispatch(e,t,s){const r=this._rctx;this._previouslyBoundDraw.clear();let a=null;const n=this._draws.length,o=t.highlight?.name;if(0!==n)for(let h=0;h<n;h++){const n=this._draws[h];if(2===e.identifier){const e=n.highlightName;if(e){if(e!==o)continue}else if(!o||!t.overlay?.hasHighlight(o))continue}const d=s[h];d===a&&0===t.oitPass||(r.bindTechnique(d,t,e),a=d);const{geometryRanges:u,indexType:c,geometry:l,drawParameters:m}=n;r.bindVAO(l.vao),this._previouslyBoundDraw.get(d)!==m&&(m.setTransformationDrawId(this._owner.getDrawParametersId(m)),d.program.bindDraw(t,e,m),this._previouslyBoundDraw.set(d,m));const w=u.length,{primitiveType:g}=l;for(let e=0;e<w;e+=2){const t=u[e],s=u[e+1];if(0!==c){const e=i.get(c);r.drawElements(g,s,c,t*e)}else r.drawArrays(g,t,s)}}}prepareSubmit(){this._draws.length=0}finishSubmit(){const e=0===this._sorting?1:-1;this._draws.sort((t,s)=>e*(t.depthSquaredHint-s.depthSquaredHint)||t.geometry.vao.usedMemory-s.geometry.vao.usedMemory)}get count(){return this._draws.length}}class r{constructor(e,t,s,r,i,a,n){this.material=e,this.drawParameters=t,this.geometry=s,this.geometryRanges=r,this.depthSquaredHint=i,this.indexType=a,this.highlightName=n}}const i=new Map;i.set(t.UNSIGNED_BYTE,1),i.set(t.UNSIGNED_SHORT,2),i.set(t.UNSIGNED_INT,4);export{s as RenderPass};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as s}from"tslib";import{disposeMaybe as e}from"../../../../../core/maybe.js";import{subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{fromMat4 as r,transpose as a,invert as i}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{set as h,copy as n}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as m}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{MaterialPassParameters as
|
|
2
|
+
import{__decorate as s}from"tslib";import{disposeMaybe as e}from"../../../../../core/maybe.js";import{subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{fromMat4 as r,transpose as a,invert as i}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{set as h,copy as n}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as m}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{MaterialPassParameters as u,ShadowMapPassParameters as d,HighlightPassParameters as p,ViewshedShadowMapPassParameters as c,AllRenderPasses as l}from"./AllRenderPasses.js";import{TwoVectorPosition as _}from"../util/TwoVectorPosition.js";import{SyncRenderPlugin as w}from"../../effects/RenderPlugin.js";import{DepthRange as f}from"../../lib/DepthRange.js";import{SizedPixelFormat as P,DataType as g}from"../../../../webgl/enums.js";import x from"../../../../webgl/Texture.js";import{TextureDescriptor as y}from"../../../../webgl/TextureDescriptor.js";let M=class extends w{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._drawParametersIdMap=new Map,this._drawParametersArray=new Array,this._transformationTexture=null,this._materialPassParameters=new u,this._shadowPassParameters=new d,this._highlightPassParameters=new p,this._viewshedPassParameters=new c,this._systems=new Set}initializeRenderContext(s){this._context=s,this._passes=new l(s,this)}get rctx(){return this._context.renderContext.rctx}uninitializeRenderContext(){}dispose(){this._context=null,this._systems.clear(),this._transformationTexture=e(this._transformationTexture),this._passes?.opaque.destroy(),this._passes?.transparent.destroy(),this._passes?.integratedMesh.destroy(),this._passes?.transparentIntegratedMesh.destroy(),this._passes?.occludedGround.destroy(),this._passes?.shadowMap.destroy(),this._passes?.highlight.destroy(),this._passes?.highlightIntegratedMesh.destroy(),this._passes?.highlightShadowMap.destroy(),this._passes?.viewshedShadowMap.destroy(),this._passes?.defaultShadowMap.destroy(),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:t,_passes:r}=this;if(0!==t.size&&null!=r){this._drawParametersIdMap.clear(),this._drawParametersArray.length=0,this._transformationTexture=e(this._transformationTexture);for(const s of Object.values(r))s.prepareSubmit();t.forEach(e=>e.submit(r,s.bind)),this._updateTransformationTexture();for(const s of Object.values(r))s.finishSubmit();this._context.techniques.frameUpdate()}}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)=>(t.transformationTexture=this._transformationTexture,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 f;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,t){const o=s.viewInverseTransposeMatrix,m=4===t,u=10===t;h(b,o[3],o[7],o[11]),v.set(b),n(e.transformWorldFromViewTH,v.high),n(e.transformWorldFromViewTL,v.low),n(e.slicePlaneLocalOrigin,b),r(e.transformViewFromCameraRelativeRS,s.viewMatrix),0===e.identifier&&(this._materialPassParameters.transparent=m,this._materialPassParameters.occludedGround=u,a(T,e.transformViewFromCameraRelativeRS),i(e.transformNormalViewFromGlobal,T))}hasHighlight(s){for(const e of this._systems)if(e.hasHighlight(s))return!0;return!1}registerDrawParameters(s){this._drawParametersIdMap.has(s)||(this._drawParametersIdMap.set(s,this._drawParametersArray.length),this._drawParametersArray.push(s))}getDrawParametersId(s){const e=this._drawParametersIdMap.get(s);if(null==e)throw new Error("Draw parameters not registered");return e}_updateTransformationTexture(){const s=this._drawParametersIdMap.size;if(0===s)return;const e=5,t=3*e,r=2**Math.ceil(Math.log2(s)),a=new Float32Array(r*t);for(let i=0;i<s;i++){const s=this._drawParametersArray[i];s.setTransformationDrawId(i);const e=i*t;a.set(s.transformationFloats,e)}if(this._transformationTexture&&this._transformationTexture.descriptor.height>=s)this._transformationTexture.updateData(0,0,0,e,s,a);else{this._transformationTexture?.dispose();const s=new y(e,r);s.internalFormat=P.RGB32F,s.dataType=g.FLOAT,s.hasMipmap=!1,s.isImmutable=!0,s.pixelFormat=6407,s.samplingMode=9728,this._transformationTexture=new x(this.rctx,s,a)}}};M=s([t("esri.views.3d.webgl-engine.core.renderPasses.RenderPassManager")],M);const b=m(),T=o(),v=new _;export{M as RenderPassManager};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{removeUnordered as e}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{sort as t}from"../../../../core/heapSort.js";import{isPromiseLike as r,createAbortError as s}from"../../../../core/promiseUtils.js";import{signal as n}from"../../../../core/signal.js";import{DepthRange as o}from"../lib/DepthRange.js";class i{constructor(e){this.context=e,this._renderPlugins=new Array,this._slots=new Array,this._version=n(0);for(let t=0;t<
|
|
2
|
+
import{removeUnordered as e}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{sort as t}from"../../../../core/heapSort.js";import{isPromiseLike as r,createAbortError as s}from"../../../../core/promiseUtils.js";import{signal as n}from"../../../../core/signal.js";import{DepthRange as o}from"../lib/DepthRange.js";class i{constructor(e){this.context=e,this._renderPlugins=new Array,this._slots=new Array,this._version=n(0);for(let t=0;t<21;++t)this._slots[t]=[]}destroy(){this._renderPlugins.forEach(e=>e.destroy()),this._renderPlugins.length=0}get plugins(){return this._renderPlugins}add(e,t){const n=()=>{if(t?.aborted)throw e.uninitializeRenderContext(),s();this._renderPlugins.push(e),e.produces.forEach((t,r)=>this._slots[r].push(e)),this.context.requestRender(),this._version.value++},o=e.initializeRenderContext(this.context,t);if(r(o))return o.then(n);n()}remove(t){e(this._renderPlugins,t),t.uninitializeRenderContext();for(let e=0;e<this._slots.length;++e)this._slots[e]=this._slots[e].filter(e=>e!==t);this.context.requestRender(),this._version.value++}sortTestsTransparentOrderedSlots(e){if("test"!==process.env.NODE_ENV)return;if(this._renderPlugins.some(e=>0!==e.testsTransparentRenderOrder))for(const r of e){const e=this._slots[r];t(e,0,e.length,(e,t)=>(e.testsTransparentRenderOrder??0)-(t.testsTransparentRenderOrder??0))}}prepareRender(){this._renderPlugins.forEach(e=>{e.prepareRender&&e.prepareRender(this.context.renderContext)})}updateAnimation(e){let t=!1;return this._renderPlugins.forEach(r=>t=r.updateAnimation?.(e)||t),t}precompile(...e){++this.context.techniques.precompiling;const t=this.context.renderContext.bind.slot;for(const r of e)this.context.renderContext.bind.slot=r,this._forEachRender(()=>{});this.context.renderContext.bind.slot=t,--this.context.techniques.precompiling}render(...e){for(const t of e)this.context.renderContext.bind.slot=t,this._forEachRender((e,t)=>e.render(this.context.renderContext,t))}_forEachRender(e){const t=this.context.renderContext.bind.slot,r=this.context.renderContext.output;this._slots[t].forEach(s=>{const n=s.produces.get(t);if(!n?.(r)||s.isDecoration&&!this.context.renderContext.bind.decorations)return;const o=s.acquireTechniques(this.context.renderContext);o&&e(s,o)})}queryDepthRange(e){return this._renderPlugins.reduce((t,r)=>t.union(r.queryDepthRange?.(e)),new o)}get updating(){return this._version.value>=0&&this._renderPlugins.some(e=>e.readyToRun)}produces(e,...t){return t.some(t=>this._slots[t].some(r=>{const s=r.produces.get(t);return!!s&&s(e)}))}consumes(e){return this._renderPlugins.some(t=>t.consumes().required.includes(e))}hasHighlight(e){return d.some(t=>this._slots[t].some(t=>t.hasHighlight(e)))}get hasDecorations(){return this._renderPlugins.some(e=>e.isDecoration)}get hasOccludees(){return this._renderPlugins.some(e=>e.hasOccludees)}get hasEmitters(){return this._renderPlugins.some(e=>e.hasEmitters)}get renderOccludedFlags(){return this._renderPlugins.reduce((e,t)=>e|(t.renderOccludedFlags??0),0)}get usedMemory(){return this._renderPlugins.reduce((e,t)=>t.material?e:e+(t.usedMemory??0),0)}get test(){}}const d=[2,4,19,13,14,15];export{i as RenderPluginManager};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as t}from"tslib";import"../../../../core/has.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{watch as i,sync as r}from"../../../../core/reactiveUtils.js";import{signal as n}from"../../../../core/signal.js";import{property as s,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{length as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{getReferenceEllipsoid as u}from"../../../../geometry/ellipsoidUtils.js";import{heightLimit as c}from"../../environment/weather.js";import{SyncRenderPlugin as p}from"./RenderPlugin.js";import{cloudPresets as h}from"./clouds/CloudsPresets.js";import{CloudsRenderer as l}from"./clouds/CloudsRenderer.js";import{Precipitation as d}from"./precipitation/Precipitation.js";let _=class extends p{constructor(t){super(t),this.produces=new Map([]),this._clouds=n(null),this._incarnation=0,this._precipitation=null}initialize(){this.view.stage?.addRenderPlugin(this)}destroy(){this.removeHandles(),this.uninitializeRenderContext(),this.view?.stage?.removeRenderPlugin(this),this._set("view",null)}get updating(){return!!this._clouds.value?.readyToRun}get weatherAvailable(){return a(this.view.state.camera.eye)-u(this.view.spatialReference).radius<=c}get usedMemory(){return this._clouds.value?.usedMemory??0}_fadeOutPrecipitation(){this._precipitation&&(this._precipitationOutgoing?.destroy(),this._precipitationOutgoing=this._precipitation,this._precipitationOutgoing.fadeOut(()=>this._precipitationOutgoing=e(this._precipitationOutgoing)),this._precipitation=null,++this._incarnation)}get _snowCover(){return this._precipitationOutgoing?.snowCover??this._precipitation?.snowCover??0}get weather(){return this.view?.environmentManager?.weatherEnabled?this.view.environment.weather:null}initializeRenderContext(t){this._context=t;const e=this.view,n=()=>this._requestRender();this.addHandles([i(()=>this._precipitation,n,r),i(()=>this._clouds.value?.state,n,r),i(()=>e.state.mode,n,r),i(()=>this._updateClouds(),n,r),i(()=>this._updatePrecipitation(),n,r),i(()=>this.weather,t=>this._initWeather(t))])}uninitializeRenderContext(){this._context=null,this._clouds.value=e(this._clouds.value),this._precipitation=e(this._precipitation),this._precipitationOutgoing=e(this._precipitationOutgoing)}prepareRender(t){const{bind:e,time:i}=t;if(1===this.view.state.viewingMode){if(e.clouds.data){e.clouds.fade(e.camera,i,this.view.qualitySettings.fadeDuration);const t=this._clouds.value;0!==t?.state||0!==t.coverage||t.readyToRun||t.destroyCubeMap()}e.snowCover=this._snowCover}}acquireTechniques(){return[]}render(){}_requestRender(){this._context?.requestRender()}_initWeather(t){const i=this._context;if(!t||!i)return void(this._clouds.value=e(this._clouds.value));if(this._clouds.value)return;const r=this.view;this._clouds.value=new l({context:i.renderContext,view:r,requestRender:()=>this._requestRender()})}_updateClouds(){const t=this.view.environment.weather;return null==t||null==this._clouds.value||this._clouds.value.applyPreset(h[t.type],v(t)),++this._incarnation}_updatePrecipitation(){const t=this.view.environment.weather;if(t.type===this._precipitation?.type)return this._incarnation;this._fadeOutPrecipitation();const e="rainy"===t.type||"snowy"===t.type,i=this._context;return e&&i&&(this._precipitation=new d({view:this.view,type:t.type}),++this._incarnation),this._incarnation}hasHighlight(){return!1}get test(){}};function v(t){switch(t.type){case"rainy":case"snowy":case"cloudy":case"sunny":return t.cloudCover;case"foggy":return t.fogStrength}}t([s({constructOnly:!0})],_.prototype,"view",void 0),t([s({type:Boolean,readOnly:!0})],_.prototype,"updating",null),t([s()],_.prototype,"weatherAvailable",null),t([s()],_.prototype,"_context",void 0),_=t([o("esri.views.3d.webgl-engine.effects.WeatherFader")],_);export{_ as WeatherFader};
|
package/views/3d/{environment → webgl-engine/effects/atmosphere}/ChapmanApproximation.glsl.js
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{clamp as e}from"
|
|
2
|
+
import{clamp as e}from"../../../../../core/mathUtils.js";import{create as t}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{squaredLength as r}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{earth as s}from"../../../../../geometry/support/Ellipsoid.js";import{Float2PassUniform as a}from"../../core/shaderModules/Float2PassUniform.js";import{Float3BindUniform as o}from"../../core/shaderModules/Float3BindUniform.js";import{FloatsPassUniform as i}from"../../core/shaderModules/FloatsPassUniform.js";import{glsl as n}from"../../core/shaderModules/glsl.js";import{SphereIntersect as c}from"../../shaders/SphereIntersect.glsl.js";import{NoParameters as h}from"../../../../webgl/NoParameters.js";class l extends h{constructor(){super(...arguments),this.radii=t()}}function m(e){e.code.add(n`float chapmanApproximation(float thickness, float height, float cosZenith) {
|
|
3
3
|
float c = sqrt(thickness + height);
|
|
4
4
|
float cExpH = c * exp(-height);
|
|
5
5
|
if (cosZenith >= 0.0) {
|
|
@@ -11,7 +11,7 @@ return 2.0 * c0 * exp(thickness - x0) - cExpH / (1.0 - c * cosZenith);
|
|
|
11
11
|
}
|
|
12
12
|
}`),e.constants.add("scaleHeight","float",s.scaleHeight*s.atmosphereHeight).uniforms.add(new a("radii",e=>e.radii)).code.add(n`float getOpticalDepth(vec3 position, vec3 dir, float h) {
|
|
13
13
|
return scaleHeight * chapmanApproximation(radii[0] / scaleHeight, h, dot(normalize(position), dir));
|
|
14
|
-
}`),e.include(c),e.constants.add("planetRadiusReduction","float",p).uniforms.add(new
|
|
14
|
+
}`),e.include(c),e.constants.add("planetRadiusReduction","float",p).uniforms.add(new i("heightParameters",5,(e,t)=>d(t,e)),new o("cameraPosition",e=>e.camera.eye)).code.add(n`vec4 planetIntersect(vec3 rayDir) {
|
|
15
15
|
float rayPlanetDistanceReduced = heightParameters[4];
|
|
16
16
|
vec2 rayPlanetIntersect = sphereIntersect(cameraPosition, rayDir, rayPlanetDistanceReduced);
|
|
17
17
|
vec2 rayAtmosphereIntersect = sphereIntersect(cameraPosition, rayDir, heightParameters[1]);
|
|
@@ -30,4 +30,4 @@ start = rayPlanetIntersect.y;
|
|
|
30
30
|
}
|
|
31
31
|
float end = hitsPlanet ? rayPlanetIntersect.x : rayAtmosphereIntersect.y;
|
|
32
32
|
return vec4(0.0, hitsPlanet ? 1.0 : 0.0, start, end);
|
|
33
|
-
}`)}function d({camera:t},{radii:a}){const
|
|
33
|
+
}`)}function d({camera:t},{radii:a}){const o=r(t.eye),i=Math.sqrt(o);return f[0]=i,f[1]=o-a[1]**2,f[2]=e((i-a[0])/s.atmosphereHeight,0,1),f[3]=o-a[0]**2,f[4]=o-(a[0]-p)**2,f}const p=2e4,f=new Array;export{m as ChapmanApproximation,l as ChapmanApproximationPassParameters,d as getHeightParameters};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderModules/Float2PassUniform.js";import"../../core/shaderModules/Float3BindUniform.js";import"../../core/shaderModules/Float3PassUniform.js";import"../../core/shaderModules/Float4PassUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/FloatsPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"./ChapmanApproximation.glsl.js";import"./ChapmanRaymarching.glsl.js";import"../../shaders/ScreenSpacePassAtmosphere.glsl.js";import"../../shaders/SphereIntersect.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/ChapmanAtmosphere.glsl.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{lerp as t}from"../../../../../core/mathUtils.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as s,syncAndInitial as i,initial as o}from"../../../../../core/reactiveUtils.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{set as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{set as m,length as h}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as c}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{earth as p}from"../../../../../geometry/support/Ellipsoid.js";import{InternalRenderCategory as d}from"../../../webgl.js";import{OpaqueEnvironment as u}from"../OpaqueEnvironment.js";import{computeInnerAltitudeFade as f,innerAtmosphereDepth as l}from"./atmosphereUtils.js";import{ChapmanAtmospherePassParameters as g,ChapmanAtmosphereTechnique as b}from"./ChapmanAtmosphereTechnique.js";import{ChapmanAtmosphereTechniqueConfiguration as _}from"./ChapmanAtmosphereTechniqueConfiguration.js";import{createQuadVAO as w}from"../../lib/glUtil3D.js";import{applyTextureResizeModulo as P}from"../../lib/textureUtils.js";import{A as j}from"../../../../../chunks/AtmosphereCompositing.glsl.js";import{AtmosphereCompositingTechnique as v}from"../../shaders/AtmosphereCompositingTechnique.js";import{DepthStencilAttachment as A,ColorAttachment0 as q,PrimitiveType as x}from"../../../../webgl/enums.js";import C from"../../../../../webscene/background/ColorBackground.js";let T=class extends u{constructor(){super(...arguments),this._compositingPassParameters=new j,this._vao=null,this._passParameters=new g,this._configuration=new _}initialize(){this.addHandles([s(()=>this.view.environment.background,e=>{const t=e instanceof C?e.color.toUnitRGBA():c;m(this._passParameters.backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3])},i),s(()=>this.view.stage?.renderer?.highResolutionAtmosphere,e=>this._configuration.reduced=!e,i),s(()=>this.view.map.ground.undergroundColor,e=>{this._passParameters.undergroundColor=e?.toUnitRGBA()??c,this.requestRender(1)},o),s(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),i)])}destroy(){this._vao=r(this._vao)}precompile(){this.techniques.precompile(b,this._configuration),this.techniques.precompile(v)}render(e){const r=e.find(({name:e})=>e===d.OPAQUE_ENVIRONMENT);if(!this.bindParameters.mainDepth)return r;const s=this.renderingContext;this._vao??=w(s,1);const i=r.getAttachment(A);this._update();const o=this.techniques.getCompiled(b,this._configuration);if(!o)return this.requestRender(1),r;if(!this._configuration.reduced)return r.detachDepth(),s.bindFramebuffer(r.fbo),s.bindTechnique(o,this.bindParameters,this._passParameters),s.setDrawBuffers([q]),s.bindVAO(this._vao),s.drawArrays(x.TRIANGLE_STRIP,0,4),r.attachDepth(i),r;const a=this.techniques.get(v);if(!a.compiled)return this.requestRender(1),r;const n=s.getViewport(),m=this.bindParameters.camera,c=h(m.eye)-p.radius;let u;const f=p.atmosphereHeight;if(c<f){const e=Math.min(1,Math.max(0,c/f));u=t(.2,.3,e)}else{const e=Math.min(1,Math.max(0,(c-f)/(15*f)));u=t(.3,.6,e)}const l=this.renderingContext.parameters.maxTextureSize,g=P(Math.round(u*m.fullViewport[2]),l),_=P(Math.round(u*m.fullViewport[3]),l);s.setViewport(0,0,g,_);const j=this.fboCache.acquire(g,_,"chapman",5);return s.bindFramebuffer(j.fbo),s.clearFramebuffer([0,0,0,1],!0,!0),s.bindTechnique(o,this.bindParameters,this._passParameters),s.bindVAO(this._vao),s.drawArrays(x.TRIANGLE_STRIP,0,4),s.setViewport(n.x,n.y,n.width,n.height),this._compositingPassParameters.color=j.getTexture(),r.detachDepth(),s.bindFramebuffer(r.fbo),s.bindTechnique(a,this.bindParameters,this._compositingPassParameters),s.setDrawBuffers([q]),s.screen.draw(),r.attachDepth(i),j.release(),r}_update(){const e=this.view.basemapTerrain?.getLowerBoundRadius()??0;n(this._passParameters.radii,e,e+p.atmosphereHeight);const t=h(this.bindParameters.camera.eye);this._passParameters.altitudeFade=f(t-e),this._passParameters.innerFadeDistance=2*Math.sqrt((2*e-l)*l)}};T=e([a("esri.views.3d.webgl-engine.effects.atmosphere.ChapmanAtmosphere")],T);export{T as ChapmanAtmosphere};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{create as o}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as s}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{ReloadableShader as t}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../../core/shaderTechnique/ShaderTechnique.js";import{ChapmanApproximationPassParameters as a}from"./ChapmanApproximation.glsl.js";import{C as m}from"../../../../../chunks/ChapmanAtmosphere.glsl.js";import{Pos2TexF16 as c}from"../../lib/DefaultVertexBufferLayouts.js";import{makePipelineState as n,defaultColorWrite as p,copySource as l,simpleBlendingParams as h}from"../../../../webgl/renderState.js";class d extends a{constructor(){super(...arguments),this.innerFadeDistance=0,this.altitudeFade=0,this.backgroundColor=o(),this.undergroundColor=s()}}let u=class extends i{constructor(e,r){super(e,r,c),this.shader=new t(m,()=>import("./ChapmanAtmosphere.glsl.js"))}initializePipeline(e){return n({blending:e.reduced?l:h(770,771),depthTest:{func:e.reduced?519:515},colorWrite:p})}};u=e([r("esri.views.3d.webgl-engine.effects.atmosphere.ChapmanAtmosphereTechnique")],u);export{d as ChapmanAtmospherePassParameters,u as ChapmanAtmosphereTechnique};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{parameter as r,ShaderTechniqueConfiguration as o}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class t extends o{constructor(){super(...arguments),this.reduced=!1}}e([r()],t.prototype,"reduced",void 0);export{t as ChapmanAtmosphereTechniqueConfiguration};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{
|
|
2
|
+
import{Float3BindUniform as e}from"../../core/shaderModules/Float3BindUniform.js";import{If as t,glsl as a}from"../../core/shaderModules/glsl.js";import{betaRayleigh as i,betaCombined as l,betaMie as r}from"./atmosphereUtils.js";import{ChapmanApproximation as s}from"./ChapmanApproximation.glsl.js";function o(o,p){o.include(s),o.constants.add("betaRayleigh","vec3",i),o.constants.add("betaCombined","vec3",l),o.constants.add("betaMie","float",r),o.constants.add("steps","int",6),o.uniforms.add(new e("cameraPosition",e=>e.camera.eye)).code.add(a`
|
|
3
3
|
vec3 raymarchAtmosphere(vec3 rayDir, vec3 lightDir, float terrainDepth) {
|
|
4
4
|
vec4 ray = planetIntersect(rayDir);
|
|
5
5
|
if(ray.x == 1.0) {
|
|
6
6
|
return vec3(0);
|
|
7
7
|
}
|
|
8
|
-
${
|
|
8
|
+
${t(p,"if (terrainDepth != -1.0) { ray.w = terrainDepth; }")}
|
|
9
9
|
|
|
10
10
|
vec3 samplePoint = cameraPosition + rayDir * ray.w;
|
|
11
11
|
float multiplier = ray.y == 1.0 ? -1.0 : 1.0;
|
|
@@ -22,14 +22,14 @@ import{betaRayleigh as e,betaCombined as t,betaMie as a}from"./atmosphereUtils.j
|
|
|
22
22
|
|
|
23
23
|
if (i > 0) {
|
|
24
24
|
scattering *= exp(-(mix(betaCombined, betaRayleigh, 0.5) + betaMie) * max(0.0, (opticalDepth - lastOpticalDepth)));
|
|
25
|
-
${
|
|
25
|
+
${t(!p,"scattering *= mix(2.5, 1.0, clamp((length(cameraPosition) - radii[0]) / 50e3, 0.0, 1.0))")};
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
if (dot(normalize(samplePoint), lightDir) > -0.3) {
|
|
29
29
|
float scale = exp(-scaleFract);
|
|
30
30
|
float lightDepth = getOpticalDepth(samplePoint, lightDir, scaleFract);
|
|
31
31
|
scattering += scale * exp(-(betaCombined + betaMie) * lightDepth);
|
|
32
|
-
${
|
|
32
|
+
${t(!p,"scattering += scale * exp(-(0.25 * betaCombined ) * lightDepth);")}
|
|
33
33
|
}
|
|
34
34
|
lastOpticalDepth = opticalDepth;
|
|
35
35
|
}
|
|
@@ -37,7 +37,7 @@ import{betaRayleigh as e,betaCombined as t,betaMie as a}from"./atmosphereUtils.j
|
|
|
37
37
|
float mu = dot(rayDir, lightDir);
|
|
38
38
|
float mumu = 1.0 + mu * mu;
|
|
39
39
|
float phaseRayleigh = 0.0596831 * mumu;
|
|
40
|
-
${
|
|
40
|
+
${t(p,"return 3.0 * scattering * stepSize * phaseRayleigh * betaRayleigh;",a`
|
|
41
41
|
const float g = 0.8;
|
|
42
42
|
const float gg = g * g;
|
|
43
43
|
float phaseMie = 0.1193662 * ((1.0 - gg) * mumu) / (pow(1.0 + gg - 2.0 * mu * g, 1.5) * (2.0 + gg));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as r,initial as s}from"../../../../../core/reactiveUtils.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{copy as o}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{InternalRenderCategory as m}from"../../../webgl.js";import{glLayout as n}from"../../../support/buffer/glUtil.js";import{OpaqueEnvironment as p}from"../OpaqueEnvironment.js";import{S as f}from"../../../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechnique as h,layout as c}from"./SimpleAtmosphereTechnique.js";import{SimpleAtmosphereTechniqueConfiguration as l}from"./SimpleAtmosphereTechniqueConfiguration.js";import{earthAtmosphereTextureSimple as u}from"./SimpleAtmosphereTexture.js";import{createPolySphereData as b}from"../../lib/GeometryUtil.js";import{VertexArrayObject as _}from"../../lib/VertexArrayObject.js";import{ColorAttachment0 as d,PrimitiveType as g}from"../../../../webgl/enums.js";import v from"../../../../webgl/Texture.js";import{TextureDescriptor as j}from"../../../../webgl/TextureDescriptor.js";import{VertexBuffer as w}from"../../../../webgl/VertexBuffer.js";let x=class extends p{constructor(){super(...arguments),this._configuration=new l,this._passParameters=new f,this._vao=null,this._vaoCount=0}initialize(){this._configuration.geometry=1,this.addHandles([r(()=>this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),s)])}destroy(){this._passParameters.texture=t(this._passParameters.texture),this._vao=t(this._vao)}precompile(){this.techniques.precompile(h,this._configuration)}render(e){const t=e.find(({name:e})=>e===m.OPAQUE_ENVIRONMENT),r=this.techniques.getCompiled(h,this._configuration);if(!r)return this.requestRender(1),t;const s=this.renderingContext;if(this._vao||(this._vao=A(s),this._vaoCount=this._vao.vertexCount("geometry")),!this._passParameters.texture){const e=new j(1,512);e.wrapMode=33071,e.flipped=!0,this._passParameters.texture=new v(s,e,u)}const i=s.bindTechnique(r,this.bindParameters,this._passParameters);return s.setDrawBuffers([d]),P(C,this.bindParameters.camera.viewMatrix),i.setUniformMatrix4fv("view",C),s.bindVAO(this._vao),i.assertCompatibleVertexAttributeLocations(this._vao),s.drawArrays(g.TRIANGLES,0,this._vaoCount),t}};function A(e){const t=b(1,2,!1),{data:r,indices:s}=t[0][1],i=c.createBuffer(s.length),o=i.position;for(let a=0;a<s.length;++a){const e=3*s[a%3==0?a+2:a%3==2?a-2:a];o.set(a,0,r[e]),o.set(a,1,r[e+1]),o.set(a,2,r[e+2])}return new _(e,new w(e,n(c),i.buffer))}function P(e,t){o(e,t),e[12]=0,e[13]=0,e[14]=0,e[15]=1}x=e([i("esri.views.3d.webgl-engine.effects.atmosphere.LocalAtmosphere")],x);const C=a();export{x as LocalAtmosphere};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as t}from"tslib";import{lerp as e,clamp as r}from"../../../../../core/mathUtils.js";import{disposeMaybe as s}from"../../../../../core/maybe.js";import{watch as i,initial as o}from"../../../../../core/reactiveUtils.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators.js";import{lookAt as m}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as h}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{length as p,scale as c,add as l,distance as u,cross as _,squaredLength as f}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as g}from"../../../../../geometry/ellipsoidUtils.js";import{newFloatArray as x}from"../../../../../geometry/support/FloatArray.js";import{InternalRenderCategory as b}from"../../../webgl.js";import{makePiecewiseLinearFunction as j}from"../../../support/mathUtils.js";import{glLayout as V}from"../../../support/buffer/glUtil.js";import{OpaqueEnvironment as P}from"../OpaqueEnvironment.js";import{computeInnerAltitudeFade as v,innerAtmosphereDepth as w}from"./atmosphereUtils.js";import{marsAtmosphereTextureSimple as R}from"./MarsAtmosphereTexture.js";import{S as A}from"../../../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechnique as y,layout as S}from"./SimpleAtmosphereTechnique.js";import{SimpleAtmosphereTechniqueConfiguration as q}from"./SimpleAtmosphereTechniqueConfiguration.js";import{createQuadVAO as F}from"../../lib/glUtil3D.js";import{project as M}from"../../lib/Util.js";import{VertexArrayObject as T}from"../../lib/VertexArrayObject.js";import{PrimitiveType as U}from"../../../../webgl/enums.js";import E from"../../../../webgl/Texture.js";import{TextureDescriptor as C}from"../../../../webgl/TextureDescriptor.js";import{VertexBuffer as O}from"../../../../webgl/VertexBuffer.js";const N=128,I=-w,W=0,B=50,D=()=>1-511/512,G=j([[50,.1015625],[500,.21875],[5e3,1-250/512],[5e4,.4140625]]);let L=class extends P{constructor(t){super(t),this._passParameters=new A,this._configuration=new q,this._vao=null,this._fadeVao=null,this._texV1=1;const e=t.view,r=g(e.spatialReference),{outerAtmosphereRimWidth:s,radius:i}=r;this._planetRadius=i,this._innerRimFactor=1+I/i,this._middleRimFactor=1+W/i,this._outerRimFactor=1+s/i,this._texV0=W/s,this._texVScale=this._texV1-this._texV0;const o=e.stage.renderView.techniques;o.precompile(y,this._configuration),this._configuration.geometry=2,o.precompile(y,this._configuration)}initialize(){this.addHandles(i(()=>this.view.environment.atmosphereEnabled,t=>t?this._enable():this._disable(),o))}destroy(){this._passParameters.texture=s(this._passParameters.texture),this._fadeVao=s(this._fadeVao),this._vao=s(this._vao)}render(t){const e=t.find(({name:t})=>t===b.OPAQUE_ENVIRONMENT);this._update();const r=this.renderingContext;if(!this._passParameters.texture){const t=new C(1,512);t.wrapMode=33071,t.flipped=!0,this._passParameters.texture=new E(r,t,R)}if(this._passParameters.undergroundFadeAlpha<1){this._vao??=this._createRibbon(r),this._configuration.geometry=0;const t=this.techniques.getCompiled(y,this._configuration);if(!t)return this.requestRender(1),e;r.bindTechnique(t,this.bindParameters,this._passParameters),r.bindVAO(this._vao),r.drawArrays(U.TRIANGLES,0,this._vao.vertexCount("geometry"))}if(this._passParameters.undergroundFadeAlpha>0){this._fadeVao??=F(r),this._configuration.geometry=2;const t=this.techniques.getCompiled(y,this._configuration);if(!t)return this.requestRender(1),e;r.bindTechnique(t,this.bindParameters,this._passParameters),r.bindVAO(this._fadeVao),r.drawArrays(U.TRIANGLE_STRIP,0,this._fadeVao.vertexCount("geometry"))}return e}_update(){const t=this.bindParameters.camera,s=d(),i=this._planetRadius,o=p(t.eye),a=o-i;if(a<0){const t=Math.min(-a/5e3,1);this._passParameters.undergroundFadeAlpha=t}else this._passParameters.undergroundFadeAlpha=0;const m=Math.max(B,a),n=i+I;this._passParameters.innerScale=J(i+m,i,n)-1,this._passParameters.altitudeFade=v(a),c(s,t.eye,(i+B)/o),k(s,t.center,t.up,i,this._passParameters.silhouette);const l=this._computeScreenRimWidth(t,s,t.up,this._passParameters.silhouette),u=D(),_=G(a);let f=this._texV0+u*this._texVScale,g=this._texV0+l*_*this._texVScale;if(a>B){k(t.eye,t.center,t.up,i,this._passParameters.silhouette);const s=this._computeScreenRimWidth(t,t.eye,t.up,this._passParameters.silhouette),o=r((s-1.5)/(l-1.5),0,1);f=this._texV0+o*u*this._texVScale,g=this._texV0+e(this._texV1,l*_,o)*this._texVScale}h(this._passParameters.texV,f,g)}_createRibbon(t){const e=x(3+3*N*3),r=new Uint32Array(3*N*5);e[0]=0,e[1]=0,e[2]=-1;for(let o=0;o<N;o++){const t=9*o+3;e[t]=o,e[t+1]=this._innerRimFactor,e[t+2]=-1,e[t+3]=o,e[t+4]=this._middleRimFactor,e[t+5]=0,e[t+6]=o,e[t+7]=this._outerRimFactor,e[t+8]=1;const s=3*o+1,i=o===N-1?1:s+3,a=15*o;r[a]=s,r[a+1]=s+1,r[a+2]=i+1,r[a+3]=i+1,r[a+4]=i,r[a+5]=s,r[a+6]=s+1,r[a+7]=s+2,r[a+8]=i+2,r[a+9]=i+2,r[a+10]=i+1,r[a+11]=s+1,r[a+12]=s,r[a+13]=i,r[a+14]=0}const s=S.createBuffer(r.length),i=s.position;for(let o=0;o<r.length;++o){const t=3*r[o];i.set(o,0,e[t]),i.set(o,1,e[t+1]),i.set(o,2,e[t+2])}return new T(t,new O(t,V(S),s.buffer))}_computeScreenRimWidth(t,e,r,s){return l(H,s.center,s.v2),c(Q,H,this._outerRimFactor),m(z,e,H,r),M(H,z,t.projectionMatrix,t.viewport,H),M(Q,z,t.projectionMatrix,t.viewport,Q),u(H,Q)/t.height}};function k(t,e,r,s,i){const o=p(t),a=s*Math.sqrt(o*o-s*s)/o,m=Math.sqrt(s*s-a*a),n=i.v1,h=i.v2;return c(i.center,t,m/o),_(n,t,e),f(n)<1&&_(n,t,r),c(n,n,a/p(n)),_(h,n,t),c(h,h,a/p(h)),a}L=t([a("esri.views.3d.webgl-engine.effects.atmosphere.MarsAtmosphere")],L);const z=n(),H=d(),Q=d();function J(t,e,r){return t*t/(Math.sqrt(t*t-e*e)*Math.sqrt(t*t-r*r)+e*r)}export{L as MarsAtmosphere};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../core/shaderLibrary/Transform.glsl.js";import"../../core/shaderLibrary/shading/MainLighting.glsl.js";import"../../core/shaderModules/Float2PassUniform.js";import"../../core/shaderModules/Float3BindUniform.js";import"../../core/shaderModules/Float3PassUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Matrix4BindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{b as SilhouetteCircle,S as SimpleAtmospherePassParameters,c as build}from"../../../../../chunks/SimpleAtmosphere.glsl.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{glLayout as o}from"../../../support/buffer/glUtil.js";import{newLayout as t}from"../../../support/buffer/InterleavedLayout.js";import{ReloadableShader as s}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as p}from"../../../../../chunks/SimpleAtmosphere.glsl.js";import{makePipelineState as m,defaultColorWrite as l,backFaceCullingParams as n,unpremultipliedAlphaToPremultipliedAlpha as c}from"../../../../webgl/renderState.js";let a=class extends i{constructor(e,r){super(e,r,o(f)),this.shader=new s(p,()=>import("./SimpleAtmosphere.glsl.js"))}initializePipeline(e){const r=1===e.geometry;return m({blending:c,culling:r?n:void 0,depthTest:{func:515},colorWrite:l})}};a=e([r("esri.views.3d.webgl-engine.effects.atmosphere.SimpleAtmosphereTechnique")],a);const f=t().vec3f("position").freeze();export{a as SimpleAtmosphereTechnique,f as layout};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{parameter as o}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as r}from"../../materials/DefaultTechniqueConfiguration.js";class t extends r{constructor(){super(...arguments),this.geometry=0}}e([o({count:3})],t.prototype,"geometry",void 0);export{t as SimpleAtmosphereTechniqueConfiguration};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{clamp as e}from"../../../../../core/mathUtils.js";import{fromValues as r}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";function o(r){return e((r-t)/i,0,1)}const t=1e5,i=1e6-t,c=1e4,m=r(5802e-9,13558e-9,331e-7),s=3,f=r(65e-8*s,1881e-9*s,85e-9*s),n=3996e-9,a=r(m[0]+f[0],m[1]+f[1],m[2]+f[2]);export{a as betaCombined,n as betaMie,f as betaOzone,m as betaRayleigh,o as computeInnerAltitudeFade,c as innerAtmosphereDepth,t as innerAtmosphereFadeStart};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"../../../../../core/has.js";import"../../../../../core/mathUtils.js";import"../../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import"../../../../../core/libs/gl-matrix-2/math/vec2.js";import"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/BooleanPassUniform.js";import"../../core/shaderModules/Float2PassUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Matrix3PassUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"./NoiseTextureAtlasDimensions.js";import"../../shaders/SphereIntersect.glsl.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{C as CloudsPassParameters,b as build,c as cubeMapSize}from"../../../../../chunks/Clouds.glsl.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"../../core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderLibrary/shading/PiUtils.glsl.js";import"../../core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import"../../core/shaderLibrary/util/ColorConversion.glsl.js";import"../../core/shaderModules/Float3BindUniform.js";import"../../core/shaderModules/FloatBindUniform.js";import"../../core/shaderModules/glsl.js";import"../../shaders/ScreenSpacePassAtmosphere.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{b as build}from"../../../../../chunks/CloudsComposition.glsl.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{disposeMaybe as t}from"../../../../../core/maybe.js";import{watch as i,initial as s}from"../../../../../core/reactiveUtils.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{OpaqueEnvironment as o}from"../OpaqueEnvironment.js";import{CloudsCompositionTechnique as n}from"./CloudsCompositionTechnique.js";import{createQuadVAO as a}from"../../lib/glUtil3D.js";import{ColorAttachment0 as m,PrimitiveType as d}from"../../../../webgl/enums.js";let h=class extends o{initialize(){this.addHandles([i(()=>null!=this.view.environment.weather&&this.view.environment.atmosphereEnabled,e=>e?this._enable():this._disable(),s)])}destroy(){this._vao=t(this._vao)}precompile(){this.bindParameters.clouds.data&&this.techniques.precompile(n)}render(e){const t=e.find(({name:e})=>e===this.produces),i=this.bindParameters.clouds;if(!i.data)return t;const s=this.techniques.getCompiled(n);if(!s)return this.requestRender(1),t;const r=this.renderingContext;this._vao??=a(r);const o=r.bindTechnique(s,this.bindParameters);return r.setDrawBuffers([m]),r.bindVAO(this._vao),o.assertCompatibleVertexAttributeLocations(this._vao),r.drawArrays(d.TRIANGLE_STRIP,0,4),i.isFading&&this.requestRender(2),t}};h=e([r("esri.views.3d.webgl-engine.effects.clouds.CloudsComposition")],h);export{h as CloudsComposition};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as r}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{C as i}from"../../../../../chunks/CloudsComposition.glsl.js";import{PrimitiveType as t}from"../../../../webgl/enums.js";import{makePipelineState as n,defaultColorWrite as l,separateBlendingParams as m}from"../../../../webgl/renderState.js";let p=class extends s{constructor(){super(...arguments),this.primitiveType=t.TRIANGLE_STRIP,this.shader=new r(i,()=>import("./CloudsComposition.glsl.js"))}initializePipeline(){return n({blending:m(1,0,770,1),depthTest:{func:515},colorWrite:l})}};p=e([o("esri.views.3d.webgl-engine.effects.clouds.CloudsCompositionTechnique")],p);export{p as CloudsCompositionTechnique};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{clamp as t}from"../../../../../core/mathUtils.js";import{signal as a}from"../../../../../core/signal.js";import{rotate as e}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as s,create as i}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{squaredLength as r,normalize as h,scale as o,copy as n,length as c,subtract as d}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as l,fromValues as _}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as u,fromPoints as f,axis as p}from"../../../../../geometry/support/axisAngleDegrees.js";import{earth as m}from"../../../../../geometry/support/Ellipsoid.js";import{heightLimit as F}from"../../../environment/weather.js";import{ensureClouds as P}from"./Clouds.js";class x{constructor(){this.startTime=0,this._data=a(null),this.coverage=0,this.absorption=0,this._readChannels=0,this.parallax=new v,this.parallaxNew=new v,this._anchorPoint=l(),this._fadeState=a(0),this._fadeFactor=a(1)}get data(){return this._data.value}set data(t){this._data.value=t}get readChannels(){return this._readChannels}get fadeState(){return this._fadeState.value}get fadeFactor(){return this._fadeFactor.value}get opacity(){switch(this.fadeState){case 0:return 0;case 4:return 1-this.fadeFactor;case 1:return this.fadeFactor;case 2:case 3:return 1}}fade(a,e,s){this.isFading&&this.fadeFactor<1&&(this._fadeFactor.value=s?t((e-this.startTime)/(b*s),0,1):1,1===this.fadeFactor&&this._endFade()),this._evaluateState(a,e),this._updateParallax(a)}_evaluateState(t,a){const e=t.relativeElevation,s=this._updateAnchorPoint(t);(Math.abs(e)>1.7*F||s>j)&&this.opacity>0?this._startFade(0,a):this.isFading||(Math.abs(e)>F||s>C*j?this.opacity>0&&this._startFade(4,a):P(this.data)&&(0===this.opacity?this._startFade(1,a):2===this.data.state&&(2===this.fadeState?this._startFade(3,a):this._startFade(2,a))))}_updateParallax(t){const a=r(t.eye);this.parallax.radiusCurvatureCorrection=.84*Math.sqrt(Math.max(a-m.radius*m.radius,0))/Math.sqrt(a),f(g,this.parallax.anchorPoint,w),e(this.parallax.transform,s,w[3],p(w)),f(g,this.parallaxNew.anchorPoint,w),e(this.parallaxNew.transform,s,w[3],p(w))}_updateAnchorPoint(t){return h(this._anchorPoint,t.eye),o(this._anchorPoint,this._anchorPoint,m.radius),0===this.fadeState&&2===this.data?.state?(n(this.parallax.anchorPoint,this._anchorPoint),0):c(d(S,this.parallax.anchorPoint,this._anchorPoint))}requestFade(){this._fadeFactor.value=0}_startFade(t,a){switch(this._fadeState.value=t,this.startTime=a,t){case 3:this.requestFade(),this._switchReadChannels(),n(this.parallaxNew.anchorPoint,this._anchorPoint);break;case 1:this.requestFade(),this._switchReadChannels(),n(this.parallax.anchorPoint,this._anchorPoint),n(this.parallaxNew.anchorPoint,this._anchorPoint);break;case 4:this.requestFade();break;case 2:this._switchReadChannels(),n(this.parallax.anchorPoint,this._anchorPoint),n(this.parallaxNew.anchorPoint,this._anchorPoint),this._endFade();break;case 0:this._endFade()}}_endFade(){switch(this._fadeFactor.value=1,this.data&&2!==this.data.state&&(this.data.state=0),this.fadeState){case 3:n(this.parallax.anchorPoint,this.parallaxNew.anchorPoint),this._fadeState.value=2;break;case 1:this._fadeState.value=2;break;case 4:this._fadeState.value=0;break;case 2:case 0:break;default:this.fadeState}}_switchReadChannels(){2===this.data?.state&&(this._readChannels=1-this._readChannels,this.data.state=3)}get isFading(){return 4===this.fadeState||1===this.fadeState||3===this.fadeState}}class v{constructor(){this.anchorPoint=l(),this.radiusCurvatureCorrection=0,this.transform=i()}}const g=_(0,0,1),w=u(),S=l(),b=1.25,C=.5,j=2e5;export{x as CloudsParameters};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import{lerp as s}from"../../../../../core/mathUtils.js";import{destroyMaybe as i,disposeMaybe as r}from"../../../../../core/maybe.js";import{watch as o,initial as a}from"../../../../../core/reactiveUtils.js";import{signal as h}from"../../../../../core/signal.js";import{property as n,subclass as l}from"../../../../../core/accessorSupport/decorators.js";import{fromMat4 as c}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{targetTo as u}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as d}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{equals as p,copy as m,set as f}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{clone as _,ZEROS as g,zeros as x}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as y}from"../../../../../core/libs/gl-matrix-2/factories/vec3f32.js";import{zeros as b}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as T}from"../../../../../geometry/ellipsoidUtils.js";import{C as v,c as S}from"../../../../../chunks/Clouds.glsl.js";import{cloudPresets as w}from"./CloudsPresets.js";import{CloudsTechnique as C}from"./CloudsTechnique.js";import{CloudsTechniqueConfiguration as P}from"./CloudsTechniqueConfiguration.js";import{NoiseTextureAtlas as j}from"./NoiseTextureAtlas.js";import{TaskPriority as z}from"../../../../support/Scheduler.js";import{Yield as I}from"../../../../support/Yield.js";import{ColorAttachment0 as M}from"../../../../webgl/enums.js";import{FramebufferObject as H}from"../../../../webgl/FramebufferObject.js";import{TextureDescriptor as q}from"../../../../webgl/TextureDescriptor.js";let R=class extends e{constructor(t){super(t),this._state=h(0),this._passParameters=new v,this._weatherTileCount=128,this._sliceIndex=0,this._tileIndex=0,this._tilesPerSlice=1,this.coverage=s(w.default.coverage[0],w.default.coverage[1],.5),this.density=s(w.default.density[0],w.default.density[1],.5),this.absorption=s(w.default.absorption[0],w.default.absorption[1],.5),this.cloudSize=s(w.default.cloudSize[0],w.default.cloudSize[1],.5),this.detailSize=s(w.default.detailSize[0],w.default.detailSize[1],.5),this.smoothness=s(w.default.smoothness[0],w.default.smoothness[1],.5),this.cloudHeight=s(w.default.cloudHeight[0],w.default.cloudHeight[1],.5),this.raymarchingSteps=w.default.raymarchingSteps,this._viewMatrix=d(),this._dirty=!0,this.readyToRun=!0,this._configuration=new P}initialize(){const t=T(this.view.spatialReference);this._passParameters.cloudRadius=.5*t.radius;const e=()=>this.setDirty();this.addHandles([this.view.resourceController.scheduler.registerTask(z.CLOUDS_GENERATOR,this),o(()=>this.coverage,e,a),o(()=>this.density,e,a),o(()=>this.absorption,e,a),o(()=>this.cloudSize,e,a),o(()=>this.detailSize,e,a),o(()=>this.smoothness,e,a),o(()=>this.cloudHeight,e,a),o(()=>this.raymarchingSteps,e,a)]);const s=_(this._computeWeatherTile());let i=0;this.addHandles(o(()=>{const t=this._computeWeatherTile();return p(s,t)||(++i,m(s,t)),i},e))}destroy(){this.destroyCubeMap(),this._passParameters.noiseTexture=i(this._passParameters.noiseTexture)}_precompile(){this._configuration.steps=this.raymarchingSteps,this._configuration.writeTextureChannels=1-this.parameters.readChannels,this.context.techniques.precompile(C,this._configuration)}_acquireTechnique(){switch(this.raymarchingSteps){case 0:this._tilesPerSlice=1;break;case 1:this._tilesPerSlice=4;break;case 3:case 2:this._tilesPerSlice=8;break;default:this.raymarchingSteps}return this._configuration.steps=this.raymarchingSteps,this._configuration.writeTextureChannels=1-this.parameters.readChannels,this.context.techniques.getCompiled(C,this._configuration)}_computeWeatherTile(){const{camera:t,environment:e}=this.view,{latitude:s,longitude:i}=t.position;if(null==s||null==i)return g;f(D,(s+90)/180,(i+180)/360);const r=Math.floor(this._weatherTileCount*Math.abs(2*D[0]-1));D[0]=Math.floor(2*this._weatherTileCount*D[0]),D[1]=Math.floor(4*(this._weatherTileCount-r)*D[1]);let o=0,a=0;if("virtual"!==e?.lighting?.type&&null!=e?.lighting?.date){const t=new Date(e.lighting.date);t.setUTCHours(e.lighting.date.getUTCHours()+(e.lighting.displayUTCOffset??0)),o=31*t.getUTCMonth()+t.getUTCDate(),a=t.getUTCFullYear()}return D[0]=(D[0]+o)%(2*this._weatherTileCount),D[1]=(D[1]+a%100)%(4*this._weatherTileCount),D}get state(){return this._state.value}set state(t){this._state.value=t}get usedMemory(){return(this._fbo?.usedMemory??0)+(this._passParameters.noiseTexture?.textureAtlas?.usedMemory??0)}_ensureNoiseTexture(){return this._passParameters.noiseTexture??=new j({context:this.context}),this._passParameters.noiseTexture}_ensureFrameBufferCube(t){const e=this.context.rctx;if(null==this._fbo){const s=new q(t,t/2);s.target=35866,s.depth=6,s.wrapMode=33071,this._fbo=new H(e,s),this.parameters.data=this,this.parameters.absorption=this.absorption,this.parameters.coverage=this.coverage}return e.unbindTexture(this._fbo.colorTexture),this._fbo}get cubeMap(){return this._fbo}get parameters(){return this.context.bind.clouds}destroyCubeMap(){this._fbo=r(this._fbo),this.parameters.data=null}applyPreset(t,e){const i=t.median,r=t=>{const r=s(t[0],t[1],i);return e<.5?s(t[0],r,2*e):s(r,t[1],2*(e-.5))};this.coverage=r(t.coverage),this.density=r(t.density),this.absorption=r(t.absorption),this.cloudSize=r(t.cloudSize),this.detailSize=r(t.detailSize),this.smoothness=r(t.smoothness),this.cloudHeight=r(t.cloudHeight),this.raymarchingSteps=t.raymarchingSteps}setDirty(){this._dirty=this.readyToRun=!0,this._precompile()}runTask(t){if(3===this.state)return I;this._dirty&&(this._sliceIndex=this._tileIndex=0,this.state=1,this._passParameters.absorption=this.absorption,this._passParameters.density=this.density,this._passParameters.cloudSize=this.cloudSize,this._passParameters.detailSize=this.detailSize,this._passParameters.smoothness=this.smoothness,this._passParameters.cloudHeight=this.cloudHeight,this._passParameters.coverage=this.coverage,this._ensureNoiseTexture().updateWeatherMap(this._computeWeatherTile()),this._dirty=!1);const e=this._acquireTechnique();if(!this._ensureNoiseTexture().textureAtlas||!e)return I;const s=U[this._sliceIndex],i=O[this._sliceIndex];u(this._viewMatrix,k,s,i),c(this._passParameters.viewMatrix,this._viewMatrix);const r=this.context.rctx,o=r.getViewport(),a=S/this._tilesPerSlice,h=this._tileIndex*a;r.setViewport(0,h,S,a);const n=this._ensureFrameBufferCube(S);r.bindFramebuffer(n),this._passParameters.lastSlice=5===this._sliceIndex,r.bindTechnique(e,this.context.bind,this._passParameters);const l=35866;return n.setColorTextureTarget(l,M,this._sliceIndex),r.screen.draw(),r.gl.flush(),r.setViewport(o.x,o.y,o.width,o.height),this.requestRender(),++this._tileIndex,5===this._sliceIndex&&this._tileIndex===this._tilesPerSlice?(this._sliceIndex=this._tileIndex=0,this.state=2,this.readyToRun=!1):this._tileIndex===this._tilesPerSlice&&(++this._sliceIndex,this._tileIndex=0),t.madeProgress(),I}};t([n({constructOnly:!0})],R.prototype,"context",void 0),t([n({constructOnly:!0})],R.prototype,"view",void 0),t([n({constructOnly:!0})],R.prototype,"requestRender",void 0),t([n()],R.prototype,"coverage",void 0),t([n()],R.prototype,"density",void 0),t([n()],R.prototype,"absorption",void 0),t([n()],R.prototype,"cloudSize",void 0),t([n()],R.prototype,"detailSize",void 0),t([n()],R.prototype,"smoothness",void 0),t([n()],R.prototype,"cloudHeight",void 0),t([n()],R.prototype,"raymarchingSteps",void 0),t([n()],R.prototype,"readyToRun",void 0),R=t([l("esri.views.3d.webgl-engine.effects.clouds.CloudsRenderer")],R);const U=[y(1,0,0),y(-1,0,0),y(0,1,0),y(0,-1,0),y(0,0,1),y(0,0,1)],O=[y(0,0,-1),y(0,0,-1),y(0,0,-1),y(0,0,-1),y(0,1,0),y(0,1,0)],k=b(),D=x();export{R as CloudsRenderer};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as i}from"../../../../../chunks/Clouds.glsl.js";import{makePipelineState as t,defaultColorWrite as n,simpleBlendingParams as l}from"../../../../webgl/renderState.js";let c=class extends o{constructor(){super(...arguments),this.shader=new s(i,()=>import("./Clouds.glsl.js")),this.ignoreUnused=!0}initializePipeline(e){return t({blending:l(32769,32770,32774,0===e.writeTextureChannels?[1,1,0,0]:[0,0,1,1]),depthTest:{func:515},colorWrite:n})}};c=e([r("esri.views.3d.webgl-engine.effects.clouds.CloudsTechnique")],c);export{c as CloudsTechnique};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{parameter as t,ShaderTechniqueConfiguration as o}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends o{constructor(){super(...arguments),this.steps=0,this.writeTextureChannels=0}}e([t({count:3})],r.prototype,"steps",void 0),e([t({count:2})],r.prototype,"writeTextureChannels",void 0);export{r as CloudsTechniqueConfiguration};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../../core/shaderModules/Float2PassUniform.js";import"../../core/shaderModules/glsl.js";import"./NoiseTextureAtlasDimensions.js";import"../../../../webgl/NoParameters.js";import"../../../../webgl/ShaderBuilder.js";export{N as NoiseTextureAtlasPassParameters,b as build}from"../../../../../chunks/NoiseTextureAtlas.glsl.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import{disposeMaybe as r}from"../../../../../core/maybe.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import{equals as i,copy as n}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{N as c}from"../../../../../chunks/NoiseTextureAtlas.glsl.js";import{NoiseTextureAtlasTechniqueConfiguration as a}from"./NoiseTextureAtlasConfiguration.js";import{atlasSize as u}from"./NoiseTextureAtlasDimensions.js";import{NoiseTextureAtlasTechnique as h}from"./NoiseTextureAtlasTechnique.js";import{FramebufferObject as m}from"../../../../webgl/FramebufferObject.js";import{TextureDescriptor as p}from"../../../../webgl/TextureDescriptor.js";let f=class extends e{constructor(t){super(t),this._passParameters=new c,this._configuration=new a,this._fbo=new m(t.context.rctx,new p(u)),t.context.techniques.precompile(h,this._configuration)}get textureAtlas(){if(this._texture)return this._texture;const t=this.context.techniques.getCompiled(h,this._configuration);return t&&(this._texture=this._render(t)),this._texture}updateWeatherMap(t){i(this._passParameters.weatherTile,t)||(n(this._passParameters.weatherTile,t),this._configuration.mode=this._texture?1:0,this._texture=null,this.context.techniques.precompile(h,this._configuration))}destroy(){this._fbo=r(this._fbo)}_render(t){if(!this._fbo)return null;const e=this.context.rctx,r=e.getViewport();return e.setViewport(0,0,u,u),e.bindFramebuffer(this._fbo),e.bindTechnique(t,this.context.bind,this._passParameters),e.screen.draw(),e.setViewport(r.x,r.y,r.width,r.height),this._fbo.colorTexture}};t([o({constructOnly:!0})],f.prototype,"context",void 0),f=t([s("esri.views.3d.webgl-engine.effects.clouds.NoiseTextureAtlas")],f);export{f as NoiseTextureAtlas};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as o}from"tslib";import{parameter as e,ShaderTechniqueConfiguration as r}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class t extends r{constructor(){super(...arguments),this.mode=0}}o([e({count:2})],t.prototype,"mode",void 0);export{t as NoiseTextureAtlasTechniqueConfiguration};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import has from"../../../../../core/has.js";const e=has("esri-mobile")?64:128,o=e/128,r=Math.ceil(Math.sqrt(e)),t=(e+2)*r,s=1e5,i=128,a=t/1560;export{t as atlasSize,o as textureScale,r as tileRows,e as tileSize,a as weatherMapScale,s as weatherMapSize,i as weatherTileSize};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as s}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as o}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as t}from"../../../../../chunks/NoiseTextureAtlas.glsl.js";import{makePipelineState as i,defaultColorWrite as l,copySource as c,separateBlendingParams as a}from"../../../../webgl/renderState.js";let n=class extends o{constructor(){super(...arguments),this.shader=new s(t,()=>import("./NoiseTextureAtlas.glsl.js"))}initializePipeline(e){return i({blending:0===e.mode?c:a(0,1,1,0),depthTest:{func:519},colorWrite:l})}};n=e([r("esri.views.3d.webgl-engine.effects.clouds.NoiseTextureAtlasTechnique")],n);export{n as NoiseTextureAtlasTechnique};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/Float3PassUniform.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../raymarching/RayDistanceFalloff.glsl.js";import"../../shaders/ScreenSpacePassAtmosphere.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{F as FogPassParameters,b as build}from"../../../../../chunks/Fog.glsl.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as t}from"tslib";import{lerp as e,smoothstep as s}from"../../../../../core/mathUtils.js";import{releaseMaybe as r}from"../../../../../core/maybe.js";import{watch as a,syncAndInitial as i}from"../../../../../core/reactiveUtils.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{copy as n,normalize as h,dot as m,scale as p,lerp as c,length as l}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d,fromValues as _}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as u}from"../../../../../geometry/ellipsoidUtils.js";import{InternalRenderCategory as f}from"../../../webgl.js";import{heightLimit as g}from"../../../environment/weather.js";import{TransparentEnvironment as P}from"../TransparentEnvironment.js";import{Blit as w}from"../blit/Blit.js";import{F as b}from"../../../../../chunks/Fog.glsl.js";import{FogTechnique as y}from"./FogTechnique.js";import{FogTechniqueConfiguration as v}from"./FogTechniqueConfiguration.js";import{ColorAttachment1 as F,DepthStencilAttachment as j,ColorAttachment0 as E}from"../../../../webgl/enums.js";const R=.95,q=1;let x=class extends P{constructor(t){super(t),this._configuration=new v,this._newParameters=new T,this._oldParameters=new T,this._fadedParameters=new T,this._parameters=this._newParameters,this._passParameters=new b,this._blit=null;const e=u(t.view.spatialReference);this._planetRadius=e.radius,this._atmosphereRadius=e.radius+e.atmosphereHeight}initialize(){this.addHandles([a(()=>this.view.environment.atmosphereEnabled,()=>this._updateEnabled(),i),a(()=>this.view.environment.weather,()=>this._updateEnabled(),i),a(()=>this._updateFogParameters(),()=>{},i)]),this.addHandles(a(()=>this._fadeFactor,t=>this._fade(t),i))}_updateEnabled(){this.view.environment.atmosphereEnabled&&this.view.environment.weather?this._enable():this._disable()}get _fadeFactor(){return this.view.stage?.renderer.renderContext.bind.clouds.fadeFactor??1}_fade(t){const{_newParameters:e,_oldParameters:s}=this;t>=1?(this._parameters=e,this._oldParameters.copyFrom(this._newParameters)):t<=0?this._parameters=s:(this._fadedParameters.lerp(s,e,t),this._parameters=this._fadedParameters)}_updateFogParameters(){const t=this.view.environment.weather,s="foggy"===t.type||"snowy"===t.type||"rainy"===t.type;this._newParameters.strength="foggy"===t.type?e(3e-5,.005,t.fogStrength**3):"snowy"===t.type||"rainy"===t.type?e(4e-6,2e-4,(t.precipitation??0)**3):0,this._newParameters.amount=s?1:0,"foggy"!==t.type&&"snowy"!==t.type||n(this._newParameters.color,H),"rainy"===t.type&&n(this._newParameters.color,A),this._fadeFactor>=1&&this._oldParameters.copyFrom(this._newParameters),this.requestRender(2)}precompile(){this._parameters.amount>0&&(this._configuration.hasEmissive=this.bindParameters.hasEmission,this.techniques.precompile(y,this._configuration))}render(t){const e=t.find(({name:t})=>t===f.TRANSPARENT_ENVIRONMENT);if(0===this._parameters.amount)return e;if(this._update(),this._passParameters.amount<=0)return e;const s=e.getAttachment(F);this._configuration.hasEmissive=null!=s;const a=this.techniques.getCompiled(y,this._configuration);if(!a)return this.requestRender(1),e;const i=e.getAttachment(j),o=this.renderingContext,{fullWidth:n,fullHeight:h}=this.bindParameters.camera,m=n,p=h;if(s){const t=this.bindParameters.hasFloatOit?8:5;this._passParameters.emission=this.fboCache.acquire(m,p,"glow horizontal",t),this._blit??=new w(this.techniques),this._blit.blitTexture(o,s?.attachment,this.bindParameters,this._passParameters.emission)}return e.attachDepth(null),o.bindFramebuffer(e.fbo),o.bindTechnique(a,this.bindParameters,this._passParameters),o.setDrawBuffers([E]),o.screen.draw(),e.attachDepth(i),this._passParameters.emission=r(this._passParameters.emission),e}_update(){const t=this.bindParameters.camera;h(C,t.eye);const e=Math.max(0,m(C,this.bindParameters.lighting.mainLight.direction)),r=this._parameters.color;p(N,r,.1),c(this._passParameters.color,N,r,e);const a=l(t.eye);this._passParameters.atmosphereC=a**2-this._atmosphereRadius**2,this._passParameters.amount=(1-s(R*g,q*g,Math.abs(a-this._planetRadius)))*this._parameters.amount,this._passParameters.strength=this._parameters.strength}get test(){return{parameters:this._passParameters}}};x=t([o("esri.views.3d.webgl-engine.effects.fog.Fog")],x);class T{constructor(){this.color=d(),this.strength=0,this.amount=0}copyFrom(t){this.amount=t.amount,this.strength=t.strength,n(this.color,t.color)}lerp(t,s,r){this.amount=e(t.amount,s.amount,r),this.strength=e(t.strength,s.strength,r),c(this.color,t.color,s.color,r)}}const C=d(),N=d(),A=_(.5,.5,.5),H=_(1.5,1.5,1.5);export{x as Fog,T as FogParameters};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{subclass as r}from"../../../../../core/accessorSupport/decorators.js";import{ReloadableShader as o}from"../../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as s}from"../../core/shaderTechnique/ShaderTechnique.js";import{a as i}from"../../../../../chunks/Fog.glsl.js";import{makePipelineState as t,defaultColorWrite as c,separateBlendingParams as n}from"../../../../webgl/renderState.js";let l=class extends s{constructor(){super(...arguments),this.shader=new o(i,()=>import("./Fog.glsl.js"))}initializePipeline(){return t({blending:n(770,0,771,1),colorWrite:c})}};l=e([r("esri.views.3d.webgl-engine.effects.fog.FogTechnique")],l);export{l as FogTechnique};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import{__decorate as s}from"tslib";import{parameter as e,ShaderTechniqueConfiguration as i}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class o extends i{constructor(){super(...arguments),this.hasEmissive=!1}}s([e()],o.prototype,"hasEmissive",void 0);export{o as FogTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as o}from"tslib";import{parameter as
|
|
2
|
+
import{__decorate as o}from"tslib";import{parameter as t,ShaderTechniqueConfiguration as e}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends e{constructor(o){super(),this.hasFloatOit=o,this.glowStage=0}}o([t({count:2})],r.prototype,"glowStage",void 0);export{r as GlowBlurTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/FloatsPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../raymarching/RayDistanceFalloff.glsl.js";import"../../shaders/ScreenSpacePassAtmosphere.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{G as GlowCompositionPassParameters,a as GlowLodFactors,c as build,m as mixPreset}from"../../../../../chunks/GlowComposition.glsl.js";
|
|
2
|
+
import"../../core/shaderLibrary/output/ReadDepth.glsl.js";import"../../core/shaderLibrary/shading/Gamma.glsl.js";import"../../core/shaderModules/FloatPassUniform.js";import"../../core/shaderModules/FloatsPassUniform.js";import"../../core/shaderModules/glsl.js";import"../../core/shaderModules/IntegerPassUniform.js";import"../../core/shaderModules/Texture2DBindUniform.js";import"../../core/shaderModules/Texture2DPassUniform.js";import"../raymarching/RayDistanceFalloff.glsl.js";import"../../shaders/oitResolution.glsl.js";import"../../shaders/ScreenSpacePassAtmosphere.glsl.js";import"../../shaders/ToneMapping.glsl.js";import"../../../../webgl/ShaderBuilder.js";export{G as GlowCompositionPassParameters,a as GlowLodFactors,c as build,m as mixPreset}from"../../../../../chunks/GlowComposition.glsl.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{parameter as o,ShaderTechniqueConfiguration as
|
|
2
|
+
import{__decorate as e}from"tslib";import{parameter as o,ShaderTechniqueConfiguration as t}from"../../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends t{constructor(e){super(),this.hasFloatOit=e,this.blurEnabled=!1,this.tonemappingEnabled=!0}}e([o()],r.prototype,"blurEnabled",void 0),e([o()],r.prototype,"tonemappingEnabled",void 0);export{r as GlowCompositionTechniqueConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import{lerp as e}from"../../../../../core/mathUtils.js";import{watch as i,syncAndInitial as s}from"../../../../../core/reactiveUtils.js";import{property as r,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{length as a}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as n}from"../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{getReferenceEllipsoid as h}from"../../../../../geometry/ellipsoidUtils.js";import{InternalRenderCategory as c}from"../../../webgl.js";import{TransparentEnvironment as m}from"../TransparentEnvironment.js";import{G as l}from"../../../../../chunks/GlowBlur.glsl.js";import{GlowBlurTechnique as u}from"./GlowBlurTechnique.js";import{GlowBlurTechniqueConfiguration as p}from"./GlowBlurTechniqueConfiguration.js";import{G as g,a as _,m as d}from"../../../../../chunks/GlowComposition.glsl.js";import{GlowCompositionTechnique as f}from"./GlowCompositionTechnique.js";import{GlowCompositionTechniqueConfiguration as b}from"./GlowCompositionTechniqueConfiguration.js";import{ColorAttachment1 as w,DepthStencilAttachment as
|
|
2
|
+
import{__decorate as t}from"tslib";import{lerp as e}from"../../../../../core/mathUtils.js";import{watch as i,syncAndInitial as s}from"../../../../../core/reactiveUtils.js";import{property as r,subclass as o}from"../../../../../core/accessorSupport/decorators.js";import{length as a}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as n}from"../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{getReferenceEllipsoid as h}from"../../../../../geometry/ellipsoidUtils.js";import{InternalRenderCategory as c}from"../../../webgl.js";import{TransparentEnvironment as m}from"../TransparentEnvironment.js";import{G as l}from"../../../../../chunks/GlowBlur.glsl.js";import{GlowBlurTechnique as u}from"./GlowBlurTechnique.js";import{GlowBlurTechniqueConfiguration as p}from"./GlowBlurTechniqueConfiguration.js";import{G as g,a as _,m as d}from"../../../../../chunks/GlowComposition.glsl.js";import{GlowCompositionTechnique as f}from"./GlowCompositionTechnique.js";import{GlowCompositionTechniqueConfiguration as b}from"./GlowCompositionTechniqueConfiguration.js";import{oitReductionFactor as P}from"../../shaders/oitResolution.glsl.js";import{ColorAttachment1 as w,DepthStencilAttachment as C}from"../../../../webgl/enums.js";let T=class extends m{constructor(t){super(t),this.consumes={required:[c.TRANSPARENT_ENVIRONMENT,"emissive"]},this.produces=c.TRANSPARENT_ENVIRONMENT,this._compositionParameters=new g,this._blurParameters=new l,this._blurScalePerLod=3.06,this._logicalBlurRadius=.0037,this._mode=0,this._intensity=.5,this._scatteringFactors={realistic:new _([.8,.12,.05,.02,.01,0]),maximumFog:new _([0,.27,.6,1.05,1.58,2.1],!1),cartographicMin:new _([.4,.18,.25,.12,.05,0],!1),cartographicDefault:new _([1.17,1.08,.78,.4,.26,.11],!1),cartographicMax:new _([3.59,3.9,2.46,1.4,.93,.44],!1)},this._glowResults=new Array;const e=t.view.stage.renderer.hasFloatOit;this._blurHorizontalConfiguration=new p(e),this._blurVerticalConfiguration=new p(e),this._compositionConfiguration=new b(e);const i=h(t.view.spatialReference);this._atmosphereRadius=i.radius+i.atmosphereHeight}initialize(){this.addHandles([i(()=>this._updateFogParameters(),()=>{},s),i(()=>this._updateParameters(),()=>{},s)])}_updateParameters(){const t=this.view.environment.lighting.glow;this._mode=null==t?this.view.environment.atmosphereEnabled?0:2:1,t&&(this._intensity=t.intensity),this._compositionParameters.minDisperse&&(this._compositionParameters.minDisperse.presets=this.getPreset(this._mode)),this.requestRender(1)}_updateFogParameters(){const t=this.view.environment.weather;"sunny"===t.type||"cloudy"===t.type?this._compositionParameters.distanceModifier=0:this._compositionParameters.distanceModifier="foggy"===t.type?e(3e-5,.005,t.fogStrength**3):e(4e-6,2e-4,(t.precipitation??0)**3),this._compositionParameters.maxDisperse=this._scatteringFactors.maximumFog,this.requestRender(1)}precompile(){this._compositionConfiguration.blurEnabled=2!==this._mode,this._compositionConfiguration.blurEnabled&&(this.techniques.precompile(u,this._blurHorizontalConfiguration),this._blurVerticalConfiguration.glowStage=1,this.techniques.precompile(u,this._blurVerticalConfiguration)),this.techniques.precompile(f,this._compositionConfiguration)}render(t){const e=t.find(({name:t})=>t===c.TRANSPARENT_ENVIRONMENT),i=e.getAttachment(w);if(!i?.attachment)return e;const s=e.getTexture(),r=e.getAttachment(C);if(2===this._mode){this._compositionConfiguration.blurEnabled=!1;const t=this.techniques.getCompiled(f,this._compositionConfiguration);if(!t)return this.requestRender(1),e;const o=this.fboCache,{fullWidth:a,fullHeight:n}=this.bindParameters.camera,h=this.renderingContext,c=o.acquire(s.descriptor.width,s.descriptor.height,this.produces);return this._prepareFBO(c,a,n),this._compositionParameters.color=s,this._compositionParameters.emission=i.attachment,h.bindTechnique(t,this.bindParameters,this._compositionParameters),h.screen.draw(),c.attachDepth(r),c.attachColor(i,w),c}this._compositionConfiguration.blurEnabled=!0;const o=this.techniques.getCompiled(u,this._blurHorizontalConfiguration),n=this.techniques.getCompiled(u,this._blurVerticalConfiguration),h=this.techniques.getCompiled(f,this._compositionConfiguration);if(!o||!n||!h)return this.requestRender(1),e;const m=this.fboCache,{fullWidth:l,fullHeight:p}=this.bindParameters.camera,g=this.renderingContext;let _=Math.ceil(l/2),d=Math.ceil(p/2);const b=5;this._blurParameters.emissionsToDownsample=i.attachment,this._blurParameters.inputScale=P,this._blurParameters.blurRadius=this._logicalBlurRadius;for(let a=0;a<b;a++){const t=m.acquire(_,d,"glow horizontal",8);this._prepareFBO(t,_,d),g.bindTechnique(o,this.bindParameters,this._blurParameters),g.screen.draw();const e=m.acquire(_,d,"glow vertical",8);this._blurParameters.inputScale=1,this._blurParameters.emissionsToDownsample=t.getTexture(),this._prepareFBO(e,_,d),g.bindTechnique(n,this.bindParameters,this._blurParameters),g.screen.draw(),t.release(),this._glowResults[a]=e,_=Math.ceil(_/2),d=Math.ceil(d/2),this._blurParameters.emissionsToDownsample=e.getTexture(),this._blurParameters.blurRadius*=this._blurScalePerLod}const T=this.bindParameters.camera,R=a(T.eye);this._compositionParameters.atmosphereC=R**2-this._atmosphereRadius**2,this._compositionParameters.color=s,this._compositionParameters.emission=i.attachment,this._compositionParameters.lodTexture0=this._glowResults[0].getTexture(),this._compositionParameters.lodTexture1=this._glowResults[1].getTexture(),this._compositionParameters.lodTexture2=this._glowResults[2].getTexture(),this._compositionParameters.lodTexture3=this._glowResults[3].getTexture(),this._compositionParameters.lodTexture4=this._glowResults[4].getTexture();const q=m.acquire(s.descriptor.width,s.descriptor.height,this.produces);return q.acquireColor(w,8,"emissive glow"),this._prepareFBO(q,l,p,!0),g.bindTechnique(h,this.bindParameters,this._compositionParameters),g.screen.draw(),this._glowResults.forEach(t=>t.release()),q.attachDepth(r),q}getPreset(t){return 0===t?this._scatteringFactors.realistic.presets:this._intensity<=.5?d(this._scatteringFactors.cartographicMin.presets,this._scatteringFactors.cartographicDefault.presets,2*this._intensity):d(this._scatteringFactors.cartographicDefault.presets,this._scatteringFactors.cartographicMax.presets,2*(this._intensity-.5))}_prepareFBO(t,e,i,s=!1){const r=this.renderingContext;r.bindFramebuffer(t.fbo),r.setViewport(0,0,e,i),r.setClearColor(0,0,0,0),r.clear(16384),s&&r.clearBuffer(1,n)}get test(){return{compositionParameters:this._compositionParameters,blurParameters:this._blurParameters,setBlurLodCombination:t=>{this._compositionParameters.dispersionWeight=t},getPresets:this.getPreset(this._mode),setMinDisperse:(t,e)=>{0===this._mode?this._scatteringFactors.realistic.presets[t]=e:(this._scatteringFactors.cartographicMin.presets[t]=e,this._scatteringFactors.cartographicMax.presets[t]=e)},toggleTonemapping:t=>{this._compositionConfiguration.tonemappingEnabled=t,this.requestRender(1)}}}};t([r()],T.prototype,"consumes",void 0),t([r()],T.prototype,"produces",void 0),T=t([o("esri.views.3d.webgl-engine.effects.glow.GlowRenderNode")],T);export{T as GlowRenderNode};
|