@cesium/engine 6.1.1 → 7.0.0
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/Build/ThirdParty/Workers/z-worker-pako.js +568 -407
- package/Build/Workers/{chunk-FRG2Z7DE.js → chunk-2HJWSU7B.js} +4 -4
- package/Build/Workers/{chunk-ZTYE74E2.js → chunk-46UD5ABS.js} +4 -4
- package/Build/Workers/{chunk-VODWDCX6.js → chunk-4EBHOMFX.js} +18 -20
- package/Build/Workers/{chunk-N7TYCDTR.js → chunk-5HDYHG3F.js} +13 -13
- package/Build/Workers/{chunk-C53JYYKX.js → chunk-5M3U6ZMA.js} +1 -1
- package/Build/Workers/{chunk-GTEXWEAP.js → chunk-5WQ523AW.js} +5 -5
- package/Build/Workers/{chunk-SEFDWMCW.js → chunk-5YLJ77FF.js} +31 -21
- package/Build/Workers/{chunk-VNRUVNIK.js → chunk-6HZQPRUS.js} +1 -1
- package/Build/Workers/{chunk-PB7BIXHI.js → chunk-6VJVYK2V.js} +2 -2
- package/Build/Workers/{chunk-PHQVHDVI.js → chunk-72SANQJV.js} +325 -5
- package/Build/Workers/{chunk-D325WRAY.js → chunk-7XEAYGZK.js} +35 -11
- package/Build/Workers/{chunk-FGUP2QEP.js → chunk-AIPU2VSX.js} +6 -6
- package/Build/Workers/{chunk-QUXSQQEF.js → chunk-AR5DNBJ4.js} +6 -6
- package/Build/Workers/{chunk-ZVUAJKAL.js → chunk-BZP4T2JJ.js} +11 -13
- package/Build/Workers/{chunk-K6Q5IRBK.js → chunk-DTAIXKTO.js} +6 -6
- package/Build/Workers/{chunk-D4YHO4NZ.js → chunk-F6SE42BK.js} +133 -101
- package/Build/Workers/{chunk-QY2WY5XJ.js → chunk-FP6GYBFX.js} +11 -11
- package/Build/Workers/{chunk-Z6LPXA7S.js → chunk-GEJTYLCO.js} +5 -5
- package/Build/Workers/{chunk-VKTKOIYG.js → chunk-GV56Q4LU.js} +11 -11
- package/Build/Workers/{chunk-KUB2HQXR.js → chunk-IQBYFRVW.js} +8 -8
- package/Build/Workers/{chunk-235MRXLH.js → chunk-IX2JCCNM.js} +1 -1
- package/Build/Workers/{chunk-3FCUUN6M.js → chunk-JCNXK6EL.js} +11 -11
- package/Build/Workers/{chunk-364TQORK.js → chunk-JJ4VBOQ3.js} +5 -7
- package/Build/Workers/{chunk-66CXKODF.js → chunk-JXDC723O.js} +2 -2
- package/Build/Workers/{chunk-OTBRPBCC.js → chunk-JY5YEZFA.js} +9 -9
- package/Build/Workers/{chunk-LSGUCCKJ.js → chunk-L2ZN645J.js} +6 -6
- package/Build/Workers/{chunk-VLDDXYKI.js → chunk-LZ7JIV3K.js} +18 -18
- package/Build/Workers/{chunk-36ESDRIZ.js → chunk-LZGHD6NY.js} +16 -16
- package/Build/Workers/{chunk-PXLFBN2Q.js → chunk-MY3VNFGQ.js} +7 -7
- package/Build/Workers/{chunk-W7F5VTH6.js → chunk-NKPBIX7F.js} +1 -1
- package/Build/Workers/{chunk-XBZSOW3F.js → chunk-NY3K4IM3.js} +12 -12
- package/Build/Workers/{chunk-AI3KSNM6.js → chunk-ODW7WYM4.js} +2 -2
- package/Build/Workers/{chunk-6PWSSCRA.js → chunk-OVLG3FRS.js} +6 -6
- package/Build/Workers/{chunk-MOLGJDJV.js → chunk-PNBGBETF.js} +11 -11
- package/Build/Workers/{chunk-T73B27DG.js → chunk-PTQQUQC3.js} +13 -13
- package/Build/Workers/{chunk-RSWBNJPT.js → chunk-QZAD5O7I.js} +8 -304
- package/Build/Workers/{chunk-I6TVJ6T7.js → chunk-R5X4OQT4.js} +8 -8
- package/Build/Workers/{chunk-DTNN3ODA.js → chunk-RAEV7K66.js} +5 -5
- package/Build/Workers/{chunk-IZED7ODV.js → chunk-RV7ZYPFT.js} +4 -4
- package/Build/Workers/{chunk-7FEGZO3D.js → chunk-S4MAZ3SS.js} +2 -2
- package/Build/Workers/{chunk-J3U6Z5YQ.js → chunk-S6SKF6DT.js} +5 -5
- package/Build/Workers/{chunk-CHDJ66UM.js → chunk-U2VCRRQW.js} +6 -6
- package/Build/Workers/{chunk-R22RQAAM.js → chunk-UAEW6HKG.js} +13 -13
- package/Build/Workers/{chunk-S7IBK36I.js → chunk-UDO6BFSF.js} +14 -16
- package/Build/Workers/{chunk-YS4KPNLC.js → chunk-UGK3FCDY.js} +1 -1
- package/Build/Workers/{chunk-SJDXMQSP.js → chunk-VK3EJHWI.js} +2 -2
- package/Build/Workers/{chunk-HEROVJML.js → chunk-VRGFV2UO.js} +7 -7
- package/Build/Workers/{chunk-VOAZN4IP.js → chunk-WBQCVXR3.js} +4 -4
- package/Build/Workers/{chunk-HSW63JN4.js → chunk-WZU2YLWG.js} +3 -3
- package/Build/Workers/{chunk-4EYB62WJ.js → chunk-XWXM2O2R.js} +6 -6
- package/Build/Workers/{chunk-ZGMOBRTG.js → chunk-YUCVWAY6.js} +7 -7
- package/Build/Workers/{chunk-CLVEIRXT.js → chunk-ZK5JOS3D.js} +15 -17
- package/Build/Workers/{chunk-5NZTU5YL.js → chunk-ZUA2UUNV.js} +2 -2
- package/Build/Workers/combineGeometry.js +23 -23
- package/Build/Workers/createBoxGeometry.js +17 -17
- package/Build/Workers/createBoxOutlineGeometry.js +15 -15
- package/Build/Workers/createCircleGeometry.js +25 -25
- package/Build/Workers/createCircleOutlineGeometry.js +18 -18
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -34
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createCorridorGeometry.js +28 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +27 -28
- package/Build/Workers/createCylinderGeometry.js +19 -19
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -19
- package/Build/Workers/createEllipseGeometry.js +25 -25
- package/Build/Workers/createEllipseOutlineGeometry.js +18 -18
- package/Build/Workers/createEllipsoidGeometry.js +18 -18
- package/Build/Workers/createEllipsoidOutlineGeometry.js +17 -17
- package/Build/Workers/createFrustumGeometry.js +17 -17
- package/Build/Workers/createFrustumOutlineGeometry.js +17 -17
- package/Build/Workers/createGeometry.js +23 -23
- package/Build/Workers/createGroundPolylineGeometry.js +22 -22
- package/Build/Workers/createPlaneGeometry.js +15 -15
- package/Build/Workers/createPlaneOutlineGeometry.js +14 -14
- package/Build/Workers/createPolygonGeometry.js +32 -167
- package/Build/Workers/createPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createPolylineGeometry.js +24 -24
- package/Build/Workers/createPolylineVolumeGeometry.js +32 -35
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -29
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +21 -23
- package/Build/Workers/createSimplePolylineGeometry.js +22 -22
- package/Build/Workers/createSphereGeometry.js +18 -18
- package/Build/Workers/createSphereOutlineGeometry.js +17 -17
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +23 -23
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +21 -21
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
- package/Build/Workers/createVerticesFromHeightmap.js +22 -22
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -19
- package/Build/Workers/createWallGeometry.js +23 -23
- package/Build/Workers/createWallOutlineGeometry.js +22 -22
- package/Build/Workers/decodeDraco.js +11 -11
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +9 -9
- package/Build/Workers/transcodeKTX2.js +7 -7
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/LICENSE.md +1 -1
- package/Source/Assets/approximateTerrainHeights.json +1 -1
- package/Source/Core/Ellipsoid.js +45 -0
- package/Source/Core/GregorianDate.js +85 -0
- package/Source/Core/HeadingPitchRange.js +2 -2
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/PolygonGeometry.js +0 -169
- package/Source/Core/Quaternion.js +6 -2
- package/Source/Core/RectangleOutlineGeometry.js +2 -4
- package/Source/Core/RequestScheduler.js +3 -9
- package/Source/Core/Resource.js +30 -69
- package/Source/Core/TerrainEncoding.js +2 -2
- package/Source/Core/Transforms.js +27 -18
- package/Source/Core/VerticalExaggeration.js +69 -0
- package/Source/Core/createWorldBathymetryAsync.js +45 -0
- package/Source/DataSources/EllipsoidGeometryUpdater.js +3 -4
- package/Source/DataSources/Entity.js +8 -5
- package/Source/DataSources/EntityCollection.js +1 -2
- package/Source/DataSources/GeometryUpdater.js +1 -2
- package/Source/DataSources/GroundGeometryUpdater.js +6 -3
- package/Source/DataSources/ModelVisualizer.js +19 -98
- package/Source/DataSources/PolygonGeometryUpdater.js +14 -2
- package/Source/DataSources/PolylineGeometryUpdater.js +9 -8
- package/Source/DataSources/TerrainOffsetProperty.js +15 -23
- package/Source/Renderer/AutomaticUniforms.js +173 -0
- package/Source/Renderer/UniformState.js +246 -1
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Atmosphere.js +127 -0
- package/Source/Scene/Billboard.js +29 -26
- package/Source/Scene/BillboardCollection.js +3 -3
- package/Source/Scene/Camera.js +1 -1
- package/Source/Scene/Cesium3DTile.js +123 -10
- package/Source/Scene/Cesium3DTileContent.js +14 -0
- package/Source/Scene/Cesium3DTileset.js +326 -45
- package/Source/Scene/Cesium3DTilesetTraversal.js +4 -0
- package/Source/Scene/Composite3DTileContent.js +42 -0
- package/Source/Scene/DynamicAtmosphereLightingType.js +56 -0
- package/Source/Scene/Empty3DTileContent.js +4 -0
- package/Source/Scene/Fog.js +1 -0
- package/Source/Scene/FrameState.js +13 -5
- package/Source/Scene/Geometry3DTileContent.js +4 -0
- package/Source/Scene/Globe.js +69 -21
- package/Source/Scene/GlobeSurfaceTile.js +4 -4
- package/Source/Scene/GlobeSurfaceTileProvider.js +24 -22
- package/Source/Scene/GltfLoader.js +15 -5
- package/Source/Scene/GroundPrimitive.js +5 -5
- package/Source/Scene/HeightReference.js +59 -2
- package/Source/Scene/ImageryLayer.js +3 -3
- package/Source/Scene/Implicit3DTileContent.js +4 -0
- package/Source/Scene/LabelCollection.js +2 -2
- package/Source/Scene/MapboxImageryProvider.js +2 -2
- package/Source/Scene/Megatexture.js +1 -1
- package/Source/Scene/Model/AtmospherePipelineStage.js +59 -0
- package/Source/Scene/Model/B3dmLoader.js +4 -0
- package/Source/Scene/Model/FeatureIdPipelineStage.js +25 -2
- package/Source/Scene/Model/I3dmLoader.js +4 -0
- package/Source/Scene/Model/InstancingPipelineStage.js +24 -6
- package/Source/Scene/Model/MetadataPipelineStage.js +31 -3
- package/Source/Scene/Model/Model.js +93 -32
- package/Source/Scene/Model/Model3DTileContent.js +31 -0
- package/Source/Scene/Model/ModelAnimationChannel.js +16 -15
- package/Source/Scene/Model/ModelRuntimePrimitive.js +6 -0
- package/Source/Scene/Model/ModelSceneGraph.js +6 -0
- package/Source/Scene/Model/VerticalExaggerationPipelineStage.js +60 -0
- package/Source/Scene/Model/pickModel.js +408 -0
- package/Source/Scene/Multiple3DTileContent.js +42 -0
- package/Source/Scene/QuadtreePrimitive.js +1 -1
- package/Source/Scene/Scene.js +226 -19
- package/Source/Scene/ScreenSpaceCameraController.js +14 -25
- package/Source/Scene/SkyAtmosphere.js +5 -6
- package/Source/Scene/Terrain.js +49 -0
- package/Source/Scene/TerrainFillMesh.js +2 -2
- package/Source/Scene/TileBoundingS2Cell.js +2 -2
- package/Source/Scene/TileOrientedBoundingBox.js +1 -1
- package/Source/Scene/Tileset3DTileContent.js +4 -0
- package/Source/Scene/Vector3DTileContent.js +4 -0
- package/Source/Scene/VoxelPrimitive.js +73 -2
- package/Source/Shaders/AtmosphereCommon.glsl +3 -11
- package/Source/Shaders/AtmosphereCommon.js +3 -11
- package/Source/Shaders/Builtin/CzmBuiltins.js +12 -0
- package/Source/Shaders/Builtin/Functions/applyHSBShift.glsl +32 -0
- package/Source/Shaders/Builtin/Functions/applyHSBShift.js +34 -0
- package/Source/Shaders/Builtin/Functions/approximateTanh.glsl +10 -0
- package/Source/Shaders/Builtin/Functions/approximateTanh.js +12 -0
- package/Source/Shaders/Builtin/Functions/computeAtmosphereColor.glsl +44 -0
- package/Source/Shaders/Builtin/Functions/computeAtmosphereColor.js +46 -0
- package/Source/Shaders/Builtin/Functions/computeGroundAtmosphereScattering.glsl +30 -0
- package/Source/Shaders/Builtin/Functions/computeGroundAtmosphereScattering.js +32 -0
- package/Source/Shaders/Builtin/Functions/computeScattering.glsl +150 -0
- package/Source/Shaders/Builtin/Functions/computeScattering.js +152 -0
- package/Source/Shaders/Builtin/Functions/getDynamicAtmosphereLightDirection.glsl +22 -0
- package/Source/Shaders/Builtin/Functions/getDynamicAtmosphereLightDirection.js +24 -0
- package/Source/Shaders/Builtin/Functions/translateRelativeToEye.glsl +5 -0
- package/Source/Shaders/Builtin/Functions/translateRelativeToEye.js +5 -0
- package/Source/Shaders/GlobeFS.glsl +16 -25
- package/Source/Shaders/GlobeFS.js +16 -25
- package/Source/Shaders/GlobeVS.glsl +4 -4
- package/Source/Shaders/GlobeVS.js +4 -4
- package/Source/Shaders/Model/AtmosphereStageFS.glsl +111 -0
- package/Source/Shaders/Model/AtmosphereStageFS.js +113 -0
- package/Source/Shaders/Model/AtmosphereStageVS.glsl +12 -0
- package/Source/Shaders/Model/AtmosphereStageVS.js +14 -0
- package/Source/Shaders/Model/GeometryStageFS.glsl +1 -1
- package/Source/Shaders/Model/GeometryStageFS.js +1 -1
- package/Source/Shaders/Model/GeometryStageVS.glsl +4 -4
- package/Source/Shaders/Model/GeometryStageVS.js +4 -4
- package/Source/Shaders/Model/ModelColorStageFS.glsl +1 -1
- package/Source/Shaders/Model/ModelColorStageFS.js +2 -1
- package/Source/Shaders/Model/ModelFS.glsl +4 -0
- package/Source/Shaders/Model/ModelFS.js +4 -0
- package/Source/Shaders/Model/ModelVS.glsl +13 -4
- package/Source/Shaders/Model/ModelVS.js +13 -4
- package/Source/Shaders/Model/VerticalExaggerationStageVS.glsl +39 -0
- package/Source/Shaders/Model/VerticalExaggerationStageVS.js +41 -0
- package/Source/Shaders/SkyAtmosphereCommon.glsl +3 -13
- package/Source/Shaders/SkyAtmosphereCommon.js +3 -13
- package/Source/Shaders/SkyAtmosphereFS.glsl +5 -10
- package/Source/Shaders/SkyAtmosphereFS.js +5 -10
- package/Source/Shaders/SkyAtmosphereVS.glsl +3 -2
- package/Source/Shaders/SkyAtmosphereVS.js +3 -2
- package/Source/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/Source/ThirdParty/draco_decoder.wasm +0 -0
- package/index.d.ts +318 -83
- package/index.js +77 -62
- package/package.json +3 -3
- package/Build/Workers/chunk-7ONRI7T4.js +0 -55
- package/Source/Core/TerrainExaggeration.js +0 -49
|
@@ -939,6 +939,60 @@ const AutomaticUniforms = {
|
|
|
939
939
|
},
|
|
940
940
|
}),
|
|
941
941
|
|
|
942
|
+
/**
|
|
943
|
+
* An automatic GLSL uniform containing the ellipsoid surface normal
|
|
944
|
+
* at the position below the eye (camera), in eye coordinates.
|
|
945
|
+
* This uniform is only valid when the {@link SceneMode} is <code>SCENE3D</code>.
|
|
946
|
+
*/
|
|
947
|
+
czm_eyeEllipsoidNormalEC: new AutomaticUniform({
|
|
948
|
+
size: 1,
|
|
949
|
+
datatype: WebGLConstants.FLOAT_VEC3,
|
|
950
|
+
getValue: function (uniformState) {
|
|
951
|
+
return uniformState.eyeEllipsoidNormalEC;
|
|
952
|
+
},
|
|
953
|
+
}),
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* An automatic GLSL uniform containing the ellipsoid radii of curvature at the camera position.
|
|
957
|
+
* The .x component is the prime vertical radius of curvature (east-west direction)
|
|
958
|
+
* .y is the meridional radius of curvature (north-south direction)
|
|
959
|
+
* This uniform is only valid when the {@link SceneMode} is <code>SCENE3D</code>.
|
|
960
|
+
*/
|
|
961
|
+
czm_eyeEllipsoidCurvature: new AutomaticUniform({
|
|
962
|
+
size: 1,
|
|
963
|
+
datatype: WebGLConstants.FLOAT_VEC2,
|
|
964
|
+
getValue: function (uniformState) {
|
|
965
|
+
return uniformState.eyeEllipsoidCurvature;
|
|
966
|
+
},
|
|
967
|
+
}),
|
|
968
|
+
|
|
969
|
+
/**
|
|
970
|
+
* An automatic GLSL uniform containing the transform from model coordinates
|
|
971
|
+
* to an east-north-up coordinate system centered at the position on the
|
|
972
|
+
* ellipsoid below the camera.
|
|
973
|
+
* This uniform is only valid when the {@link SceneMode} is <code>SCENE3D</code>.
|
|
974
|
+
*/
|
|
975
|
+
czm_modelToEnu: new AutomaticUniform({
|
|
976
|
+
size: 1,
|
|
977
|
+
datatype: WebGLConstants.FLOAT_MAT4,
|
|
978
|
+
getValue: function (uniformState) {
|
|
979
|
+
return uniformState.modelToEnu;
|
|
980
|
+
},
|
|
981
|
+
}),
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* An automatic GLSL uniform containing the the inverse of
|
|
985
|
+
* {@link AutomaticUniforms.czm_modelToEnu}.
|
|
986
|
+
* This uniform is only valid when the {@link SceneMode} is <code>SCENE3D</code>.
|
|
987
|
+
*/
|
|
988
|
+
czm_enuToModel: new AutomaticUniform({
|
|
989
|
+
size: 1,
|
|
990
|
+
datatype: WebGLConstants.FLOAT_MAT4,
|
|
991
|
+
getValue: function (uniformState) {
|
|
992
|
+
return uniformState.enuToModel;
|
|
993
|
+
},
|
|
994
|
+
}),
|
|
995
|
+
|
|
942
996
|
/**
|
|
943
997
|
* An automatic GLSL uniform containing the near distance (<code>x</code>) and the far distance (<code>y</code>)
|
|
944
998
|
* of the frustum defined by the camera. This is the largest possible frustum, not an individual
|
|
@@ -1538,6 +1592,125 @@ const AutomaticUniforms = {
|
|
|
1538
1592
|
},
|
|
1539
1593
|
}),
|
|
1540
1594
|
|
|
1595
|
+
/**
|
|
1596
|
+
* An automatic GLSL uniform scalar used to set a minimum brightness when dynamic lighting is applied to fog.
|
|
1597
|
+
*
|
|
1598
|
+
* @see czm_fog
|
|
1599
|
+
*/
|
|
1600
|
+
czm_fogMinimumBrightness: new AutomaticUniform({
|
|
1601
|
+
size: 1,
|
|
1602
|
+
datatype: WebGLConstants.FLOAT,
|
|
1603
|
+
getValue: function (uniformState) {
|
|
1604
|
+
return uniformState.fogMinimumBrightness;
|
|
1605
|
+
},
|
|
1606
|
+
}),
|
|
1607
|
+
|
|
1608
|
+
/**
|
|
1609
|
+
* An automatic uniform representing the color shift for the atmosphere in HSB color space
|
|
1610
|
+
*
|
|
1611
|
+
* @example
|
|
1612
|
+
* uniform vec3 czm_atmosphereHsbShift;
|
|
1613
|
+
*/
|
|
1614
|
+
czm_atmosphereHsbShift: new AutomaticUniform({
|
|
1615
|
+
size: 1,
|
|
1616
|
+
datatype: WebGLConstants.FLOAT_VEC3,
|
|
1617
|
+
getValue: function (uniformState) {
|
|
1618
|
+
return uniformState.atmosphereHsbShift;
|
|
1619
|
+
},
|
|
1620
|
+
}),
|
|
1621
|
+
/**
|
|
1622
|
+
* An automatic uniform representing the intensity of the light that is used for computing the atmosphere color
|
|
1623
|
+
*
|
|
1624
|
+
* @example
|
|
1625
|
+
* uniform float czm_atmosphereLightIntensity;
|
|
1626
|
+
*/
|
|
1627
|
+
czm_atmosphereLightIntensity: new AutomaticUniform({
|
|
1628
|
+
size: 1,
|
|
1629
|
+
datatype: WebGLConstants.FLOAT,
|
|
1630
|
+
getValue: function (uniformState) {
|
|
1631
|
+
return uniformState.atmosphereLightIntensity;
|
|
1632
|
+
},
|
|
1633
|
+
}),
|
|
1634
|
+
/**
|
|
1635
|
+
* An automatic uniform representing the Rayleigh scattering coefficient used when computing the atmosphere scattering
|
|
1636
|
+
*
|
|
1637
|
+
* @example
|
|
1638
|
+
* uniform vec3 czm_atmosphereRayleighCoefficient;
|
|
1639
|
+
*/
|
|
1640
|
+
czm_atmosphereRayleighCoefficient: new AutomaticUniform({
|
|
1641
|
+
size: 1,
|
|
1642
|
+
datatype: WebGLConstants.FLOAT_VEC3,
|
|
1643
|
+
getValue: function (uniformState) {
|
|
1644
|
+
return uniformState.atmosphereRayleighCoefficient;
|
|
1645
|
+
},
|
|
1646
|
+
}),
|
|
1647
|
+
/**
|
|
1648
|
+
* An automatic uniform representing the Rayleigh scale height in meters used for computing atmosphere scattering.
|
|
1649
|
+
*
|
|
1650
|
+
* @example
|
|
1651
|
+
* uniform vec3 czm_atmosphereRayleighScaleHeight;
|
|
1652
|
+
*/
|
|
1653
|
+
czm_atmosphereRayleighScaleHeight: new AutomaticUniform({
|
|
1654
|
+
size: 1,
|
|
1655
|
+
datatype: WebGLConstants.FLOAT,
|
|
1656
|
+
getValue: function (uniformState) {
|
|
1657
|
+
return uniformState.atmosphereRayleighScaleHeight;
|
|
1658
|
+
},
|
|
1659
|
+
}),
|
|
1660
|
+
/**
|
|
1661
|
+
* An automatic uniform representing the Mie scattering coefficient used when computing atmosphere scattering.
|
|
1662
|
+
*
|
|
1663
|
+
* @example
|
|
1664
|
+
* uniform vec3 czm_atmosphereMieCoefficient;
|
|
1665
|
+
*/
|
|
1666
|
+
czm_atmosphereMieCoefficient: new AutomaticUniform({
|
|
1667
|
+
size: 1,
|
|
1668
|
+
datatype: WebGLConstants.FLOAT_VEC3,
|
|
1669
|
+
getValue: function (uniformState) {
|
|
1670
|
+
return uniformState.atmosphereMieCoefficient;
|
|
1671
|
+
},
|
|
1672
|
+
}),
|
|
1673
|
+
/**
|
|
1674
|
+
* An automatic uniform storign the Mie scale height used when computing atmosphere scattering.
|
|
1675
|
+
*
|
|
1676
|
+
* @example
|
|
1677
|
+
* uniform float czm_atmosphereMieScaleHeight;
|
|
1678
|
+
*/
|
|
1679
|
+
czm_atmosphereMieScaleHeight: new AutomaticUniform({
|
|
1680
|
+
size: 1,
|
|
1681
|
+
datatype: WebGLConstants.FLOAT,
|
|
1682
|
+
getValue: function (uniformState) {
|
|
1683
|
+
return uniformState.atmosphereMieScaleHeight;
|
|
1684
|
+
},
|
|
1685
|
+
}),
|
|
1686
|
+
/**
|
|
1687
|
+
* An automatic uniform representing the anisotropy of the medium to consider for Mie scattering.
|
|
1688
|
+
*
|
|
1689
|
+
* @example
|
|
1690
|
+
* uniform float czm_atmosphereAnisotropy;
|
|
1691
|
+
*/
|
|
1692
|
+
czm_atmosphereMieAnisotropy: new AutomaticUniform({
|
|
1693
|
+
size: 1,
|
|
1694
|
+
datatype: WebGLConstants.FLOAT,
|
|
1695
|
+
getValue: function (uniformState) {
|
|
1696
|
+
return uniformState.atmosphereMieAnisotropy;
|
|
1697
|
+
},
|
|
1698
|
+
}),
|
|
1699
|
+
|
|
1700
|
+
/**
|
|
1701
|
+
* An automatic uniform representing which light source to use for dynamic lighting
|
|
1702
|
+
*
|
|
1703
|
+
* @example
|
|
1704
|
+
* uniform float czm_atmosphereDynamicLighting
|
|
1705
|
+
*/
|
|
1706
|
+
czm_atmosphereDynamicLighting: new AutomaticUniform({
|
|
1707
|
+
size: 1,
|
|
1708
|
+
datatype: WebGLConstants.FLOAT,
|
|
1709
|
+
getValue: function (uniformState) {
|
|
1710
|
+
return uniformState.atmosphereDynamicLighting;
|
|
1711
|
+
},
|
|
1712
|
+
}),
|
|
1713
|
+
|
|
1541
1714
|
/**
|
|
1542
1715
|
* An automatic GLSL uniform representing the splitter position to use when rendering with a splitter.
|
|
1543
1716
|
* This will be in pixel coordinates relative to the canvas.
|
|
@@ -144,6 +144,10 @@ function UniformState() {
|
|
|
144
144
|
this._frustum2DWidth = 0.0;
|
|
145
145
|
this._eyeHeight = 0.0;
|
|
146
146
|
this._eyeHeight2D = new Cartesian2();
|
|
147
|
+
this._eyeEllipsoidNormalEC = new Cartesian3();
|
|
148
|
+
this._eyeEllipsoidCurvature = new Cartesian2();
|
|
149
|
+
this._modelToEnu = new Matrix4();
|
|
150
|
+
this._enuToModel = new Matrix4();
|
|
147
151
|
this._pixelRatio = 1.0;
|
|
148
152
|
this._orthographicIn3D = false;
|
|
149
153
|
this._backgroundColor = new Color();
|
|
@@ -157,6 +161,16 @@ function UniformState() {
|
|
|
157
161
|
this._specularEnvironmentMapsMaximumLOD = undefined;
|
|
158
162
|
|
|
159
163
|
this._fogDensity = undefined;
|
|
164
|
+
this._fogMinimumBrightness = undefined;
|
|
165
|
+
|
|
166
|
+
this._atmosphereHsbShift = undefined;
|
|
167
|
+
this._atmosphereLightIntensity = undefined;
|
|
168
|
+
this._atmosphereRayleighCoefficient = new Cartesian3();
|
|
169
|
+
this._atmosphereRayleighScaleHeight = new Cartesian3();
|
|
170
|
+
this._atmosphereMieCoefficient = new Cartesian3();
|
|
171
|
+
this._atmosphereMieScaleHeight = undefined;
|
|
172
|
+
this._atmosphereMieAnisotropy = undefined;
|
|
173
|
+
this._atmosphereDynamicLighting = undefined;
|
|
160
174
|
|
|
161
175
|
this._invertClassificationColor = undefined;
|
|
162
176
|
|
|
@@ -696,6 +710,52 @@ Object.defineProperties(UniformState.prototype, {
|
|
|
696
710
|
},
|
|
697
711
|
},
|
|
698
712
|
|
|
713
|
+
/**
|
|
714
|
+
* The ellipsoid surface normal at the camera position, in model coordinates.
|
|
715
|
+
* @memberof UniformState.prototype
|
|
716
|
+
* @type {Cartesian3}
|
|
717
|
+
*/
|
|
718
|
+
eyeEllipsoidNormalEC: {
|
|
719
|
+
get: function () {
|
|
720
|
+
return this._eyeEllipsoidNormalEC;
|
|
721
|
+
},
|
|
722
|
+
},
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* The ellipsoid radii of curvature at the camera position.
|
|
726
|
+
* The .x component is the prime vertical radius, .y is the meridional.
|
|
727
|
+
* @memberof UniformState.prototype
|
|
728
|
+
* @type {Cartesian2}
|
|
729
|
+
*/
|
|
730
|
+
eyeEllipsoidCurvature: {
|
|
731
|
+
get: function () {
|
|
732
|
+
return this._eyeEllipsoidCurvature;
|
|
733
|
+
},
|
|
734
|
+
},
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* A transform from model coordinates to an east-north-up coordinate system
|
|
738
|
+
* centered at the position on the ellipsoid below the camera
|
|
739
|
+
* @memberof UniformState.prototype
|
|
740
|
+
* @type {Matrix4}
|
|
741
|
+
*/
|
|
742
|
+
modelToEnu: {
|
|
743
|
+
get: function () {
|
|
744
|
+
return this._modelToEnu;
|
|
745
|
+
},
|
|
746
|
+
},
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* The inverse of {@link UniformState.prototype.modelToEnu}
|
|
750
|
+
* @memberof UniformState.prototype
|
|
751
|
+
* @type {Matrix4}
|
|
752
|
+
*/
|
|
753
|
+
enuToModel: {
|
|
754
|
+
get: function () {
|
|
755
|
+
return this._enuToModel;
|
|
756
|
+
},
|
|
757
|
+
},
|
|
758
|
+
|
|
699
759
|
/**
|
|
700
760
|
* The sun position in 3D world coordinates at the current scene time.
|
|
701
761
|
* @memberof UniformState.prototype
|
|
@@ -865,6 +925,99 @@ Object.defineProperties(UniformState.prototype, {
|
|
|
865
925
|
},
|
|
866
926
|
},
|
|
867
927
|
|
|
928
|
+
/**
|
|
929
|
+
* A scalar used as a minimum value when brightening fog
|
|
930
|
+
* @memberof UniformState.prototype
|
|
931
|
+
* @type {number}
|
|
932
|
+
*/
|
|
933
|
+
fogMinimumBrightness: {
|
|
934
|
+
get: function () {
|
|
935
|
+
return this._fogMinimumBrightness;
|
|
936
|
+
},
|
|
937
|
+
},
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* A color shift to apply to the atmosphere color in HSB.
|
|
941
|
+
* @memberof UniformState.prototype
|
|
942
|
+
* @type {Cartesian3}
|
|
943
|
+
*/
|
|
944
|
+
atmosphereHsbShift: {
|
|
945
|
+
get: function () {
|
|
946
|
+
return this._atmosphereHsbShift;
|
|
947
|
+
},
|
|
948
|
+
},
|
|
949
|
+
/**
|
|
950
|
+
* The intensity of the light that is used for computing the atmosphere color
|
|
951
|
+
* @memberof UniformState.prototype
|
|
952
|
+
* @type {number}
|
|
953
|
+
*/
|
|
954
|
+
atmosphereLightIntensity: {
|
|
955
|
+
get: function () {
|
|
956
|
+
return this._atmosphereLightIntensity;
|
|
957
|
+
},
|
|
958
|
+
},
|
|
959
|
+
/**
|
|
960
|
+
* The Rayleigh scattering coefficient used in the atmospheric scattering equations for the sky atmosphere.
|
|
961
|
+
* @memberof UniformState.prototype
|
|
962
|
+
* @type {Cartesian3}
|
|
963
|
+
*/
|
|
964
|
+
atmosphereRayleighCoefficient: {
|
|
965
|
+
get: function () {
|
|
966
|
+
return this._atmosphereRayleighCoefficient;
|
|
967
|
+
},
|
|
968
|
+
},
|
|
969
|
+
/**
|
|
970
|
+
* The Rayleigh scale height used in the atmospheric scattering equations for the sky atmosphere, in meters.
|
|
971
|
+
* @memberof UniformState.prototype
|
|
972
|
+
* @type {number}
|
|
973
|
+
*/
|
|
974
|
+
atmosphereRayleighScaleHeight: {
|
|
975
|
+
get: function () {
|
|
976
|
+
return this._atmosphereRayleighScaleHeight;
|
|
977
|
+
},
|
|
978
|
+
},
|
|
979
|
+
/**
|
|
980
|
+
* The Mie scattering coefficient used in the atmospheric scattering equations for the sky atmosphere.
|
|
981
|
+
* @memberof UniformState.prototype
|
|
982
|
+
* @type {Cartesian3}
|
|
983
|
+
*/
|
|
984
|
+
atmosphereMieCoefficient: {
|
|
985
|
+
get: function () {
|
|
986
|
+
return this._atmosphereMieCoefficient;
|
|
987
|
+
},
|
|
988
|
+
},
|
|
989
|
+
/**
|
|
990
|
+
* The Mie scale height used in the atmospheric scattering equations for the sky atmosphere, in meters.
|
|
991
|
+
* @memberof UniformState.prototype
|
|
992
|
+
* @type {number}
|
|
993
|
+
*/
|
|
994
|
+
atmosphereMieScaleHeight: {
|
|
995
|
+
get: function () {
|
|
996
|
+
return this._atmosphereMieScaleHeight;
|
|
997
|
+
},
|
|
998
|
+
},
|
|
999
|
+
/**
|
|
1000
|
+
* The anisotropy of the medium to consider for Mie scattering.
|
|
1001
|
+
* @memberof UniformState.prototype
|
|
1002
|
+
* @type {number}
|
|
1003
|
+
*/
|
|
1004
|
+
atmosphereMieAnisotropy: {
|
|
1005
|
+
get: function () {
|
|
1006
|
+
return this._atmosphereMieAnisotropy;
|
|
1007
|
+
},
|
|
1008
|
+
},
|
|
1009
|
+
/**
|
|
1010
|
+
* Which light source to use for dynamically lighting the atmosphere
|
|
1011
|
+
*
|
|
1012
|
+
* @memberof UniformState.prototype
|
|
1013
|
+
* @type {DynamicAtmosphereLightingType}
|
|
1014
|
+
*/
|
|
1015
|
+
atmosphereDynamicLighting: {
|
|
1016
|
+
get: function () {
|
|
1017
|
+
return this._atmosphereDynamicLighting;
|
|
1018
|
+
},
|
|
1019
|
+
},
|
|
1020
|
+
|
|
868
1021
|
/**
|
|
869
1022
|
* A scalar that represents the geometric tolerance per meter
|
|
870
1023
|
* @memberof UniformState.prototype
|
|
@@ -1068,20 +1221,88 @@ function setInfiniteProjection(uniformState, matrix) {
|
|
|
1068
1221
|
uniformState._modelViewInfiniteProjectionDirty = true;
|
|
1069
1222
|
}
|
|
1070
1223
|
|
|
1224
|
+
const surfacePositionScratch = new Cartesian3();
|
|
1225
|
+
const enuTransformScratch = new Matrix4();
|
|
1226
|
+
|
|
1071
1227
|
function setCamera(uniformState, camera) {
|
|
1072
1228
|
Cartesian3.clone(camera.positionWC, uniformState._cameraPosition);
|
|
1073
1229
|
Cartesian3.clone(camera.directionWC, uniformState._cameraDirection);
|
|
1074
1230
|
Cartesian3.clone(camera.rightWC, uniformState._cameraRight);
|
|
1075
1231
|
Cartesian3.clone(camera.upWC, uniformState._cameraUp);
|
|
1076
1232
|
|
|
1233
|
+
const ellipsoid = uniformState._ellipsoid;
|
|
1234
|
+
let surfacePosition;
|
|
1235
|
+
|
|
1077
1236
|
const positionCartographic = camera.positionCartographic;
|
|
1078
1237
|
if (!defined(positionCartographic)) {
|
|
1079
|
-
uniformState._eyeHeight = -
|
|
1238
|
+
uniformState._eyeHeight = -ellipsoid.maximumRadius;
|
|
1239
|
+
if (Cartesian3.magnitude(camera.positionWC) > 0.0) {
|
|
1240
|
+
uniformState._eyeEllipsoidNormalEC = Cartesian3.normalize(
|
|
1241
|
+
camera.positionWC,
|
|
1242
|
+
uniformState._eyeEllipsoidNormalEC
|
|
1243
|
+
);
|
|
1244
|
+
}
|
|
1245
|
+
surfacePosition = ellipsoid.scaleToGeodeticSurface(
|
|
1246
|
+
camera.positionWC,
|
|
1247
|
+
surfacePositionScratch
|
|
1248
|
+
);
|
|
1080
1249
|
} else {
|
|
1081
1250
|
uniformState._eyeHeight = positionCartographic.height;
|
|
1251
|
+
uniformState._eyeEllipsoidNormalEC = ellipsoid.geodeticSurfaceNormalCartographic(
|
|
1252
|
+
positionCartographic,
|
|
1253
|
+
uniformState._eyeEllipsoidNormalEC
|
|
1254
|
+
);
|
|
1255
|
+
surfacePosition = Cartesian3.fromRadians(
|
|
1256
|
+
positionCartographic.longitude,
|
|
1257
|
+
positionCartographic.latitude,
|
|
1258
|
+
0.0,
|
|
1259
|
+
ellipsoid,
|
|
1260
|
+
surfacePositionScratch
|
|
1261
|
+
);
|
|
1082
1262
|
}
|
|
1083
1263
|
|
|
1084
1264
|
uniformState._encodedCameraPositionMCDirty = true;
|
|
1265
|
+
|
|
1266
|
+
if (!defined(surfacePosition)) {
|
|
1267
|
+
return;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
uniformState._eyeEllipsoidNormalEC = Matrix3.multiplyByVector(
|
|
1271
|
+
uniformState._viewRotation,
|
|
1272
|
+
uniformState._eyeEllipsoidNormalEC,
|
|
1273
|
+
uniformState._eyeEllipsoidNormalEC
|
|
1274
|
+
);
|
|
1275
|
+
|
|
1276
|
+
const enuToWorld = Transforms.eastNorthUpToFixedFrame(
|
|
1277
|
+
surfacePosition,
|
|
1278
|
+
ellipsoid,
|
|
1279
|
+
enuTransformScratch
|
|
1280
|
+
);
|
|
1281
|
+
uniformState._enuToModel = Matrix4.multiplyTransformation(
|
|
1282
|
+
uniformState.inverseModel,
|
|
1283
|
+
enuToWorld,
|
|
1284
|
+
uniformState._enuToModel
|
|
1285
|
+
);
|
|
1286
|
+
uniformState._modelToEnu = Matrix4.inverseTransformation(
|
|
1287
|
+
uniformState._enuToModel,
|
|
1288
|
+
uniformState._modelToEnu
|
|
1289
|
+
);
|
|
1290
|
+
|
|
1291
|
+
if (
|
|
1292
|
+
!CesiumMath.equalsEpsilon(
|
|
1293
|
+
ellipsoid._radii.x,
|
|
1294
|
+
ellipsoid._radii.y,
|
|
1295
|
+
CesiumMath.EPSILON15
|
|
1296
|
+
)
|
|
1297
|
+
) {
|
|
1298
|
+
// Ellipsoid curvature calculations assume radii.x === radii.y as is true for WGS84
|
|
1299
|
+
return;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
uniformState._eyeEllipsoidCurvature = ellipsoid.getLocalCurvature(
|
|
1303
|
+
surfacePosition,
|
|
1304
|
+
uniformState._eyeEllipsoidCurvature
|
|
1305
|
+
);
|
|
1085
1306
|
}
|
|
1086
1307
|
|
|
1087
1308
|
let transformMatrix = new Matrix3();
|
|
@@ -1293,6 +1514,30 @@ UniformState.prototype.update = function (frameState) {
|
|
|
1293
1514
|
}
|
|
1294
1515
|
|
|
1295
1516
|
this._fogDensity = frameState.fog.density;
|
|
1517
|
+
this._fogMinimumBrightness = frameState.fog.minimumBrightness;
|
|
1518
|
+
|
|
1519
|
+
const atmosphere = frameState.atmosphere;
|
|
1520
|
+
if (defined(atmosphere)) {
|
|
1521
|
+
this._atmosphereHsbShift = Cartesian3.fromElements(
|
|
1522
|
+
atmosphere.hueShift,
|
|
1523
|
+
atmosphere.saturationShift,
|
|
1524
|
+
atmosphere.brightnessShift,
|
|
1525
|
+
this._atmosphereHsbShift
|
|
1526
|
+
);
|
|
1527
|
+
this._atmosphereLightIntensity = atmosphere.lightIntensity;
|
|
1528
|
+
this._atmosphereRayleighCoefficient = Cartesian3.clone(
|
|
1529
|
+
atmosphere.rayleighCoefficient,
|
|
1530
|
+
this._atmosphereRayleighCoefficient
|
|
1531
|
+
);
|
|
1532
|
+
this._atmosphereRayleighScaleHeight = atmosphere.rayleighScaleHeight;
|
|
1533
|
+
this._atmosphereMieCoefficient = Cartesian3.clone(
|
|
1534
|
+
atmosphere.mieCoefficient,
|
|
1535
|
+
this._atmosphereMieCoefficient
|
|
1536
|
+
);
|
|
1537
|
+
this._atmosphereMieScaleHeight = atmosphere.mieScaleHeight;
|
|
1538
|
+
this._atmosphereMieAnisotropy = atmosphere.mieAnisotropy;
|
|
1539
|
+
this._atmosphereDynamicLighting = atmosphere.dynamicLighting;
|
|
1540
|
+
}
|
|
1296
1541
|
|
|
1297
1542
|
this._invertClassificationColor = frameState.invertClassificationColor;
|
|
1298
1543
|
|
|
@@ -4,7 +4,7 @@ import Resource from "../Core/Resource.js";
|
|
|
4
4
|
|
|
5
5
|
let defaultTokenCredit;
|
|
6
6
|
const defaultAccessToken =
|
|
7
|
-
"
|
|
7
|
+
"AAPK997c8ac9b63f486188c3bede0b85ba5b2SiLv1qk7ZCEiBYZ_1i90XplcyGpzezMhO7wTadCKmemjXjb1Mtj112fAt6gbfL-";
|
|
8
8
|
/**
|
|
9
9
|
* Default options for accessing the ArcGIS image tile service.
|
|
10
10
|
*
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import Cartesian3 from "../Core/Cartesian3.js";
|
|
2
|
+
import DynamicAtmosphereLightingType from "./DynamicAtmosphereLightingType.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Common atmosphere settings used by 3D Tiles and models for rendering sky atmosphere, ground atmosphere, and fog.
|
|
6
|
+
*
|
|
7
|
+
* <p>
|
|
8
|
+
* This class is not to be confused with {@link SkyAtmosphere}, which is responsible for rendering the sky.
|
|
9
|
+
* </p>
|
|
10
|
+
* <p>
|
|
11
|
+
* While the atmosphere settings affect the color of fog, see {@link Fog} to control how fog is rendered.
|
|
12
|
+
* </p>
|
|
13
|
+
*
|
|
14
|
+
* @alias Atmosphere
|
|
15
|
+
* @constructor
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* // Turn on dynamic atmosphere lighting using the sun direction
|
|
19
|
+
* scene.atmosphere.dynamicLighting = Cesium.DynamicAtmosphereLightingType.SUNLIGHT;
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // Turn on dynamic lighting using whatever light source is in the scene
|
|
23
|
+
* scene.light = new Cesium.DirectionalLight({
|
|
24
|
+
* direction: new Cesium.Cartesian3(1, 0, 0)
|
|
25
|
+
* });
|
|
26
|
+
* scene.atmosphere.dynamicLighting = Cesium.DynamicAtmosphereLightingType.SCENE_LIGHT;
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* // Adjust the color of the atmosphere effects.
|
|
30
|
+
* scene.atmosphere.hueShift = 0.4; // Cycle 40% around the color wheel
|
|
31
|
+
* scene.atmosphere.brightnessShift = 0.25; // Increase the brightness
|
|
32
|
+
* scene.atmosphere.saturationShift = -0.1; // Desaturate the colors
|
|
33
|
+
*
|
|
34
|
+
* @see SkyAtmosphere
|
|
35
|
+
* @see Globe
|
|
36
|
+
* @see Fog
|
|
37
|
+
*/
|
|
38
|
+
function Atmosphere() {
|
|
39
|
+
/**
|
|
40
|
+
* The intensity of the light that is used for computing the ground atmosphere color.
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @default 10.0
|
|
44
|
+
*/
|
|
45
|
+
this.lightIntensity = 10.0;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The Rayleigh scattering coefficient used in the atmospheric scattering equations for the ground atmosphere.
|
|
49
|
+
*
|
|
50
|
+
* @type {Cartesian3}
|
|
51
|
+
* @default Cartesian3(5.5e-6, 13.0e-6, 28.4e-6)
|
|
52
|
+
*/
|
|
53
|
+
this.rayleighCoefficient = new Cartesian3(5.5e-6, 13.0e-6, 28.4e-6);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The Mie scattering coefficient used in the atmospheric scattering equations for the ground atmosphere.
|
|
57
|
+
*
|
|
58
|
+
* @type {Cartesian3}
|
|
59
|
+
* @default Cartesian3(21e-6, 21e-6, 21e-6)
|
|
60
|
+
*/
|
|
61
|
+
this.mieCoefficient = new Cartesian3(21e-6, 21e-6, 21e-6);
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The Rayleigh scale height used in the atmospheric scattering equations for the ground atmosphere, in meters.
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @default 10000.0
|
|
68
|
+
*/
|
|
69
|
+
this.rayleighScaleHeight = 10000.0;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The Mie scale height used in the atmospheric scattering equations for the ground atmosphere, in meters.
|
|
73
|
+
*
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @default 3200.0
|
|
76
|
+
*/
|
|
77
|
+
this.mieScaleHeight = 3200.0;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The anisotropy of the medium to consider for Mie scattering.
|
|
81
|
+
* <p>
|
|
82
|
+
* Valid values are between -1.0 and 1.0.
|
|
83
|
+
* </p>
|
|
84
|
+
*
|
|
85
|
+
* @type {number}
|
|
86
|
+
* @default 0.9
|
|
87
|
+
*/
|
|
88
|
+
this.mieAnisotropy = 0.9;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The hue shift to apply to the atmosphere. Defaults to 0.0 (no shift).
|
|
92
|
+
* A hue shift of 1.0 indicates a complete rotation of the hues available.
|
|
93
|
+
*
|
|
94
|
+
* @type {number}
|
|
95
|
+
* @default 0.0
|
|
96
|
+
*/
|
|
97
|
+
this.hueShift = 0.0;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The saturation shift to apply to the atmosphere. Defaults to 0.0 (no shift).
|
|
101
|
+
* A saturation shift of -1.0 is monochrome.
|
|
102
|
+
*
|
|
103
|
+
* @type {number}
|
|
104
|
+
* @default 0.0
|
|
105
|
+
*/
|
|
106
|
+
this.saturationShift = 0.0;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The brightness shift to apply to the atmosphere. Defaults to 0.0 (no shift).
|
|
110
|
+
* A brightness shift of -1.0 is complete darkness, which will let space show through.
|
|
111
|
+
*
|
|
112
|
+
* @type {number}
|
|
113
|
+
* @default 0.0
|
|
114
|
+
*/
|
|
115
|
+
this.brightnessShift = 0.0;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* When not DynamicAtmosphereLightingType.NONE, the selected light source will
|
|
119
|
+
* be used for dynamically lighting all atmosphere-related rendering effects.
|
|
120
|
+
*
|
|
121
|
+
* @type {DynamicAtmosphereLightingType}
|
|
122
|
+
* @default DynamicAtmosphereLightingType.NONE
|
|
123
|
+
*/
|
|
124
|
+
this.dynamicLighting = DynamicAtmosphereLightingType.NONE;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export default Atmosphere;
|