@cesium/engine 10.0.0 → 11.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/Workers/{chunk-AA4GZKOT.js → chunk-2EDC3QGH.js} +1 -1
- package/Build/Workers/{chunk-DKVHRNFY.js → chunk-2MKRG7L7.js} +5 -5
- package/Build/Workers/{chunk-X23FRWHJ.js → chunk-2RZYNSMR.js} +6 -6
- package/Build/Workers/{chunk-TO2PVHKI.js → chunk-4NBRIKB3.js} +2 -2
- package/Build/Workers/{chunk-GRAT5GE7.js → chunk-4TK5YR6Q.js} +5 -5
- package/Build/Workers/{chunk-XD445VDH.js → chunk-54VC7SCM.js} +7 -7
- package/Build/Workers/{chunk-G3YR53LY.js → chunk-5IY5BXCT.js} +13 -13
- package/Build/Workers/{chunk-O3JCMSS3.js → chunk-6FFGOENI.js} +54 -7
- package/Build/Workers/{chunk-7XGC6YB2.js → chunk-6PJIHPQB.js} +13 -13
- package/Build/Workers/{chunk-GR3CDLCP.js → chunk-6ZREIBKS.js} +7 -7
- package/Build/Workers/{chunk-4MSUJ4I7.js → chunk-AI3O7UN2.js} +6 -6
- package/Build/Workers/{chunk-COYFZ5VA.js → chunk-AS7P4BHI.js} +6 -6
- package/Build/Workers/{chunk-JYAHOGGL.js → chunk-AUM45VEG.js} +16 -15
- package/Build/Workers/{chunk-BDFNKFOE.js → chunk-BBO6BGLC.js} +13 -13
- package/Build/Workers/{chunk-AVI4IUWC.js → chunk-BH5ZEN4I.js} +10 -10
- package/Build/Workers/{chunk-4BAE4PWO.js → chunk-BJ3WF5RW.js} +6 -6
- package/Build/Workers/{chunk-Q55ECN3Y.js → chunk-BUOFSNFW.js} +1 -1
- package/Build/Workers/{chunk-QX5XS4LC.js → chunk-BZXF3GNX.js} +2 -2
- package/Build/Workers/{chunk-PYHLO636.js → chunk-DJXXI7UF.js} +5 -5
- package/Build/Workers/{chunk-LCLJJ2MZ.js → chunk-DVAIU7A4.js} +17 -17
- package/Build/Workers/{chunk-SYCPRK3D.js → chunk-FJT3ERV7.js} +9 -9
- package/Build/Workers/{chunk-L6RTJ3RE.js → chunk-GOHDOWU5.js} +14 -14
- package/Build/Workers/{chunk-MSKXMXJI.js → chunk-HA6TZ3XT.js} +4 -4
- package/Build/Workers/{chunk-PCP4YQST.js → chunk-HBZSCVZC.js} +11 -11
- package/Build/Workers/{chunk-5S7OLEPK.js → chunk-HC7RYWPZ.js} +12 -12
- package/Build/Workers/{chunk-VE7BFUIX.js → chunk-HFMJM3SX.js} +1 -1
- package/Build/Workers/{chunk-OOK53QUQ.js → chunk-HFPMX5L2.js} +1 -1
- package/Build/Workers/{chunk-VFBNELXB.js → chunk-HO2NTC7I.js} +6 -6
- package/Build/Workers/{chunk-DOXCPOG4.js → chunk-HZPMWR4H.js} +7 -7
- package/Build/Workers/{chunk-I2RC4XVN.js → chunk-IBG5FVXC.js} +4 -4
- package/Build/Workers/{chunk-LEABCTLP.js → chunk-IXLNNST6.js} +4 -4
- package/Build/Workers/{chunk-4YSNMHZ4.js → chunk-JYUCC5NV.js} +6 -6
- package/Build/Workers/{chunk-BCL4PHHT.js → chunk-KFW4UNQH.js} +10 -10
- package/Build/Workers/{chunk-R6B7UCQB.js → chunk-KKAEXHDY.js} +2 -2
- package/Build/Workers/{chunk-BJF5LOWE.js → chunk-L6FARMF6.js} +7 -7
- package/Build/Workers/{chunk-C2CGMAIU.js → chunk-N3BIL6WA.js} +13 -13
- package/Build/Workers/{chunk-STBBMQGG.js → chunk-O5SSW3B3.js} +6 -6
- package/Build/Workers/{chunk-S3PI2KFM.js → chunk-OC4MYPVW.js} +2 -2
- package/Build/Workers/{chunk-MDHQR3ZS.js → chunk-OOA6GXKD.js} +7 -7
- package/Build/Workers/{chunk-AD5HBJ2F.js → chunk-OSCHEWSG.js} +7 -7
- package/Build/Workers/{chunk-NTXTUNEF.js → chunk-QGT2GMOK.js} +4 -4
- package/Build/Workers/{chunk-VO3ACQB2.js → chunk-RFQYEYAL.js} +17 -17
- package/Build/Workers/{chunk-KUN2ZA5X.js → chunk-RJF5ZP76.js} +4 -4
- package/Build/Workers/{chunk-QD4KM3GO.js → chunk-SIZXFNJY.js} +6 -5
- package/Build/Workers/{chunk-FXIHSF7O.js → chunk-SRZJCF7G.js} +9 -9
- package/Build/Workers/{chunk-T77JILCU.js → chunk-T4MB73MC.js} +2 -2
- package/Build/Workers/{chunk-3WUV74WM.js → chunk-TTI2SUWJ.js} +2 -2
- package/Build/Workers/{chunk-QMLTCCYG.js → chunk-VHJ5ESXF.js} +1 -1
- package/Build/Workers/{chunk-2J3JKXCP.js → chunk-VSFFJGTA.js} +9 -5
- package/Build/Workers/{chunk-DGS5QNIO.js → chunk-WQRXRDCZ.js} +11 -11
- package/Build/Workers/{chunk-OORVMGDU.js → chunk-WXDGOYTT.js} +12 -7
- package/Build/Workers/{chunk-RJYML24O.js → chunk-XLCZE6DD.js} +423 -448
- package/Build/Workers/combineGeometry.js +22 -22
- package/Build/Workers/createBoxGeometry.js +16 -16
- package/Build/Workers/createBoxOutlineGeometry.js +14 -14
- package/Build/Workers/createCircleGeometry.js +24 -24
- package/Build/Workers/createCircleOutlineGeometry.js +17 -17
- package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createCorridorGeometry.js +27 -27
- package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
- package/Build/Workers/createCylinderGeometry.js +18 -18
- package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
- package/Build/Workers/createEllipseGeometry.js +24 -24
- package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
- package/Build/Workers/createEllipsoidGeometry.js +17 -17
- package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
- package/Build/Workers/createFrustumGeometry.js +16 -16
- package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
- package/Build/Workers/createGeometry.js +22 -22
- package/Build/Workers/createGroundPolylineGeometry.js +20 -20
- package/Build/Workers/createPlaneGeometry.js +14 -14
- package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
- package/Build/Workers/createPolygonGeometry.js +30 -30
- package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
- package/Build/Workers/createPolylineGeometry.js +23 -23
- package/Build/Workers/createPolylineVolumeGeometry.js +29 -29
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
- package/Build/Workers/createRectangleGeometry.js +25 -25
- package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
- package/Build/Workers/createSimplePolylineGeometry.js +21 -21
- package/Build/Workers/createSphereGeometry.js +17 -17
- package/Build/Workers/createSphereOutlineGeometry.js +16 -16
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
- package/Build/Workers/createVectorTileGeometries.js +22 -22
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +20 -20
- package/Build/Workers/createVectorTilePolylines.js +13 -13
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
- package/Build/Workers/createVerticesFromHeightmap.js +24 -20
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
- package/Build/Workers/createWallGeometry.js +22 -22
- package/Build/Workers/createWallOutlineGeometry.js +21 -21
- package/Build/Workers/decodeDraco.js +11 -11
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +28 -5
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/transcodeKTX2.js +20 -22
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
- package/Source/Core/CompressedTextureBuffer.js +11 -0
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/KTX2Transcoder.js +9 -16
- package/Source/Core/PixelFormat.js +1 -15
- package/Source/Core/Simon1994PlanetaryPositions.js +2 -1
- package/Source/Core/Transforms.js +137 -2
- package/Source/DataSources/BillboardGraphics.js +16 -0
- package/Source/DataSources/BillboardVisualizer.js +7 -0
- package/Source/DataSources/CallbackProperty.js +8 -2
- package/Source/DataSources/CheckerboardMaterialProperty.js +7 -1
- package/Source/DataSources/ColorMaterialProperty.js +7 -1
- package/Source/DataSources/CompositeMaterialProperty.js +5 -4
- package/Source/DataSources/CompositePositionProperty.js +7 -1
- package/Source/DataSources/CompositeProperty.js +5 -5
- package/Source/DataSources/ConstantPositionProperty.js +7 -1
- package/Source/DataSources/Entity.js +1 -1
- package/Source/DataSources/GridMaterialProperty.js +7 -1
- package/Source/DataSources/ImageMaterialProperty.js +8 -1
- package/Source/DataSources/MaterialProperty.js +7 -1
- package/Source/DataSources/NodeTransformationProperty.js +7 -1
- package/Source/DataSources/PathVisualizer.js +4 -4
- package/Source/DataSources/PointGraphics.js +17 -0
- package/Source/DataSources/PointVisualizer.js +12 -0
- package/Source/DataSources/PolylineArrowMaterialProperty.js +7 -1
- package/Source/DataSources/PolylineDashMaterialProperty.js +7 -1
- package/Source/DataSources/PolylineGlowMaterialProperty.js +7 -1
- package/Source/DataSources/PolylineOutlineMaterialProperty.js +7 -1
- package/Source/DataSources/PositionProperty.js +5 -8
- package/Source/DataSources/PositionPropertyArray.js +7 -1
- package/Source/DataSources/Property.js +1 -1
- package/Source/DataSources/PropertyArray.js +5 -5
- package/Source/DataSources/PropertyBag.js +5 -4
- package/Source/DataSources/ReferenceProperty.js +7 -1
- package/Source/DataSources/SampledPositionProperty.js +7 -1
- package/Source/DataSources/SampledProperty.js +6 -4
- package/Source/DataSources/ScaledPositionProperty.js +6 -0
- package/Source/DataSources/StripeMaterialProperty.js +7 -1
- package/Source/DataSources/TerrainOffsetProperty.js +9 -0
- package/Source/DataSources/TimeIntervalCollectionPositionProperty.js +7 -1
- package/Source/DataSources/TimeIntervalCollectionProperty.js +5 -5
- package/Source/DataSources/VelocityOrientationProperty.js +6 -1
- package/Source/DataSources/VelocityVectorProperty.js +3 -5
- package/Source/Renderer/AutomaticUniforms.js +3 -18
- package/Source/Renderer/Context.js +15 -0
- package/Source/Renderer/CubeMap.js +326 -348
- package/Source/Renderer/CubeMapFace.js +26 -48
- package/Source/Renderer/PixelDatatype.js +23 -0
- package/Source/Renderer/Sampler.js +7 -13
- package/Source/Renderer/ShaderProgram.js +7 -0
- package/Source/Renderer/Texture.js +396 -332
- package/Source/Renderer/UniformState.js +8 -33
- package/Source/Renderer/demodernizeShader.js +2 -0
- package/Source/Renderer/loadCubeMap.js +3 -8
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +29 -2
- package/Source/Scene/BillboardCollection.js +49 -0
- package/Source/Scene/BingMapsImageryProvider.js +10 -1
- package/Source/Scene/CameraEventAggregator.js +49 -5
- package/Source/Scene/Globe.js +1 -1
- package/Source/Scene/GlobeSurfaceShaderSet.js +29 -24
- package/Source/Scene/GlobeSurfaceTileProvider.js +5 -3
- package/Source/Scene/ImageBasedLighting.js +36 -36
- package/Source/Scene/Label.js +2 -2
- package/Source/Scene/Material.js +24 -2
- package/Source/Scene/Model/ImageBasedLightingPipelineStage.js +7 -15
- package/Source/Scene/Model/Model.js +1 -1
- package/Source/Scene/PointPrimitive.js +28 -2
- package/Source/Scene/PointPrimitiveCollection.js +22 -9
- package/Source/Scene/PostProcessStageCollection.js +45 -15
- package/Source/Scene/PostProcessStageLibrary.js +26 -0
- package/Source/Scene/Scene.js +20 -22
- package/Source/Scene/SceneTransforms.js +0 -62
- package/Source/Scene/ScreenSpaceCameraController.js +11 -4
- package/Source/Scene/SkyBox.js +13 -19
- package/Source/Scene/SpecularEnvironmentCubeMap.js +240 -0
- package/Source/Scene/Tonemapper.js +35 -23
- package/Source/Scene/VoxelPrimitive.js +0 -29
- package/Source/Scene/VoxelRenderResources.js +0 -3
- package/Source/Shaders/BillboardCollectionFS.glsl +4 -0
- package/Source/Shaders/BillboardCollectionFS.js +4 -0
- package/Source/Shaders/BillboardCollectionVS.glsl +3 -1
- package/Source/Shaders/BillboardCollectionVS.js +3 -1
- package/Source/Shaders/BrdfLutGeneratorFS.glsl +30 -13
- package/Source/Shaders/BrdfLutGeneratorFS.js +30 -13
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -2
- package/Source/Shaders/Builtin/Functions/pbrLighting.glsl +42 -41
- package/Source/Shaders/Builtin/Functions/pbrLighting.js +42 -41
- package/Source/Shaders/Builtin/Functions/pbrNeutralTonemapping.glsl +23 -0
- package/Source/Shaders/Builtin/Functions/pbrNeutralTonemapping.js +25 -0
- package/Source/Shaders/Builtin/Functions/textureCube.glsl +21 -2
- package/Source/Shaders/Builtin/Functions/textureCube.js +21 -2
- package/Source/Shaders/Builtin/Structs/materialInput.glsl +2 -0
- package/Source/Shaders/Builtin/Structs/materialInput.js +2 -0
- package/Source/Shaders/GlobeFS.glsl +10 -4
- package/Source/Shaders/GlobeFS.js +10 -4
- package/Source/Shaders/Materials/WaterMaskMaterial.glsl +15 -0
- package/Source/Shaders/Materials/WaterMaskMaterial.js +17 -0
- package/Source/Shaders/Model/AtmosphereStageFS.glsl +1 -1
- package/Source/Shaders/Model/AtmosphereStageFS.js +1 -1
- package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +57 -46
- package/Source/Shaders/Model/ImageBasedLightingStageFS.js +57 -46
- package/Source/Shaders/Model/LightingStageFS.glsl +8 -7
- package/Source/Shaders/Model/LightingStageFS.js +8 -7
- package/Source/Shaders/Model/MaterialStageFS.glsl +10 -14
- package/Source/Shaders/Model/MaterialStageFS.js +10 -14
- package/Source/Shaders/PointPrimitiveCollectionFS.glsl +4 -0
- package/Source/Shaders/PointPrimitiveCollectionFS.js +4 -0
- package/Source/Shaders/PointPrimitiveCollectionVS.glsl +9 -7
- package/Source/Shaders/PointPrimitiveCollectionVS.js +9 -7
- package/Source/Shaders/PostProcessStages/AcesTonemappingStage.glsl +4 -0
- package/Source/Shaders/PostProcessStages/AcesTonemappingStage.js +4 -0
- package/Source/Shaders/PostProcessStages/FilmicTonemapping.glsl +4 -0
- package/Source/Shaders/PostProcessStages/FilmicTonemapping.js +4 -0
- package/Source/Shaders/PostProcessStages/ModifiedReinhardTonemapping.glsl +4 -0
- package/Source/Shaders/PostProcessStages/ModifiedReinhardTonemapping.js +4 -0
- package/Source/Shaders/PostProcessStages/PbrNeutralTonemapping.glsl +25 -0
- package/Source/Shaders/PostProcessStages/PbrNeutralTonemapping.js +27 -0
- package/Source/Shaders/PostProcessStages/ReinhardTonemapping.glsl +4 -0
- package/Source/Shaders/PostProcessStages/ReinhardTonemapping.js +4 -0
- package/Source/Shaders/SkyAtmosphereFS.glsl +1 -1
- package/Source/Shaders/SkyAtmosphereFS.js +1 -1
- package/Source/Widget/CesiumWidget.js +1 -1
- package/index.d.ts +191 -106
- package/index.js +133 -134
- package/package.json +4 -4
- package/Source/Scene/OctahedralProjectedCubeMap.js +0 -445
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.glsl +0 -78
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.js +0 -80
- package/Source/Shaders/OctahedralProjectionAtlasFS.glsl +0 -89
- package/Source/Shaders/OctahedralProjectionAtlasFS.js +0 -91
- package/Source/Shaders/OctahedralProjectionFS.glsl +0 -14
- package/Source/Shaders/OctahedralProjectionFS.js +0 -16
- package/Source/Shaders/OctahedralProjectionVS.glsl +0 -10
- package/Source/Shaders/OctahedralProjectionVS.js +0 -12
|
@@ -157,7 +157,6 @@ function UniformState() {
|
|
|
157
157
|
|
|
158
158
|
this._sphericalHarmonicCoefficients = undefined;
|
|
159
159
|
this._specularEnvironmentMaps = undefined;
|
|
160
|
-
this._specularEnvironmentMapsDimensions = new Cartesian2();
|
|
161
160
|
this._specularEnvironmentMapsMaximumLOD = undefined;
|
|
162
161
|
|
|
163
162
|
this._fogDensity = undefined;
|
|
@@ -1084,7 +1083,7 @@ Object.defineProperties(UniformState.prototype, {
|
|
|
1084
1083
|
},
|
|
1085
1084
|
|
|
1086
1085
|
/**
|
|
1087
|
-
* The specular environment map
|
|
1086
|
+
* The specular environment cube map of the scene.
|
|
1088
1087
|
* @memberof UniformState.prototype
|
|
1089
1088
|
* @type {Texture}
|
|
1090
1089
|
*/
|
|
@@ -1095,18 +1094,7 @@ Object.defineProperties(UniformState.prototype, {
|
|
|
1095
1094
|
},
|
|
1096
1095
|
|
|
1097
1096
|
/**
|
|
1098
|
-
* The
|
|
1099
|
-
* @memberof UniformState.prototype
|
|
1100
|
-
* @type {Cartesian2}
|
|
1101
|
-
*/
|
|
1102
|
-
specularEnvironmentMapsDimensions: {
|
|
1103
|
-
get: function () {
|
|
1104
|
-
return this._specularEnvironmentMapsDimensions;
|
|
1105
|
-
},
|
|
1106
|
-
},
|
|
1107
|
-
|
|
1108
|
-
/**
|
|
1109
|
-
* The maximum level-of-detail of the specular environment map atlas of the scene.
|
|
1097
|
+
* The maximum level-of-detail of the specular environment cube map of the scene.
|
|
1110
1098
|
* @memberof UniformState.prototype
|
|
1111
1099
|
* @type {number}
|
|
1112
1100
|
*/
|
|
@@ -1305,19 +1293,13 @@ function setCamera(uniformState, camera) {
|
|
|
1305
1293
|
);
|
|
1306
1294
|
}
|
|
1307
1295
|
|
|
1308
|
-
|
|
1296
|
+
const transformMatrix = new Matrix3();
|
|
1309
1297
|
const sunCartographicScratch = new Cartographic();
|
|
1310
1298
|
function setSunAndMoonDirections(uniformState, frameState) {
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
) {
|
|
1316
|
-
transformMatrix = Transforms.computeTemeToPseudoFixedMatrix(
|
|
1317
|
-
frameState.time,
|
|
1318
|
-
transformMatrix
|
|
1319
|
-
);
|
|
1320
|
-
}
|
|
1299
|
+
Transforms.computeIcrfToCentralBodyFixedMatrix(
|
|
1300
|
+
frameState.time,
|
|
1301
|
+
transformMatrix
|
|
1302
|
+
);
|
|
1321
1303
|
|
|
1322
1304
|
let position = Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame(
|
|
1323
1305
|
frameState.time,
|
|
@@ -1497,7 +1479,7 @@ UniformState.prototype.update = function (frameState) {
|
|
|
1497
1479
|
);
|
|
1498
1480
|
|
|
1499
1481
|
// IE 11 doesn't optimize out uniforms that are #ifdef'd out. So undefined values for the spherical harmonic
|
|
1500
|
-
// coefficients
|
|
1482
|
+
// coefficients cause a crash.
|
|
1501
1483
|
this._sphericalHarmonicCoefficients = defaultValue(
|
|
1502
1484
|
frameState.sphericalHarmonicCoefficients,
|
|
1503
1485
|
EMPTY_ARRAY
|
|
@@ -1506,13 +1488,6 @@ UniformState.prototype.update = function (frameState) {
|
|
|
1506
1488
|
this._specularEnvironmentMapsMaximumLOD =
|
|
1507
1489
|
frameState.specularEnvironmentMapsMaximumLOD;
|
|
1508
1490
|
|
|
1509
|
-
if (defined(this._specularEnvironmentMaps)) {
|
|
1510
|
-
Cartesian2.clone(
|
|
1511
|
-
this._specularEnvironmentMaps.dimensions,
|
|
1512
|
-
this._specularEnvironmentMapsDimensions
|
|
1513
|
-
);
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
1491
|
this._fogDensity = frameState.fog.density;
|
|
1517
1492
|
this._fogMinimumBrightness = frameState.fog.minimumBrightness;
|
|
1518
1493
|
|
|
@@ -60,6 +60,8 @@ function demodernizeShader(input, isFragmentShader) {
|
|
|
60
60
|
output = output.replaceAll(/gl_FragDepth/g, `gl_FragDepthEXT`);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
// Enable the EXT_shader_texture_lod extension
|
|
64
|
+
output = `#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n#endif\n${output}`;
|
|
63
65
|
// Enable the OES_standard_derivatives extension
|
|
64
66
|
output = `#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n${output}`;
|
|
65
67
|
} else {
|
|
@@ -41,17 +41,12 @@ import CubeMap from "./CubeMap.js";
|
|
|
41
41
|
function loadCubeMap(context, urls, skipColorSpaceConversion) {
|
|
42
42
|
//>>includeStart('debug', pragmas.debug);
|
|
43
43
|
Check.defined("context", context);
|
|
44
|
+
Check.defined("urls", urls);
|
|
44
45
|
if (
|
|
45
|
-
!defined(urls)
|
|
46
|
-
!defined(urls.positiveX) ||
|
|
47
|
-
!defined(urls.negativeX) ||
|
|
48
|
-
!defined(urls.positiveY) ||
|
|
49
|
-
!defined(urls.negativeY) ||
|
|
50
|
-
!defined(urls.positiveZ) ||
|
|
51
|
-
!defined(urls.negativeZ)
|
|
46
|
+
Object.values(CubeMap.FaceName).some((faceName) => !defined(urls[faceName]))
|
|
52
47
|
) {
|
|
53
48
|
throw new DeveloperError(
|
|
54
|
-
"urls
|
|
49
|
+
"urls must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties."
|
|
55
50
|
);
|
|
56
51
|
}
|
|
57
52
|
//>>includeEnd('debug');
|
|
@@ -4,7 +4,7 @@ import Resource from "../Core/Resource.js";
|
|
|
4
4
|
|
|
5
5
|
let defaultTokenCredit;
|
|
6
6
|
const defaultAccessToken =
|
|
7
|
-
"
|
|
7
|
+
"AAPTxy8BH1VEsoebNVZXo8HurEOF051kAEKlhkOhBEc9BmSXu8_pRnGhnW6yZLct-ukUzbJaZRAVfnmUrxDcAu_FaFDIC3M57EwfRm_DuTw9D5oHdLBTYIMD3tpUeFsNDjHHqar5fb1FGIN9KIV1Gk64dNBmhHhuOHY8cq2IhI0XFLj2qnAlqtKnM-lLsO6JpHuHPVD799V1o9VFm9vMW6a66vEi8-e--2QzKQecPYiaq98.AT1_p4pHwb3n";
|
|
8
8
|
/**
|
|
9
9
|
* Default options for accessing the ArcGIS image tile service.
|
|
10
10
|
*
|
|
@@ -21,6 +21,7 @@ import HorizontalOrigin from "./HorizontalOrigin.js";
|
|
|
21
21
|
import SceneMode from "./SceneMode.js";
|
|
22
22
|
import SceneTransforms from "./SceneTransforms.js";
|
|
23
23
|
import VerticalOrigin from "./VerticalOrigin.js";
|
|
24
|
+
import SplitDirection from "./SplitDirection.js";
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* @typedef {object} Billboard.ConstructorOptions
|
|
@@ -49,6 +50,7 @@ import VerticalOrigin from "./VerticalOrigin.js";
|
|
|
49
50
|
* @property {BoundingRectangle} [imageSubRegion] A {@link BoundingRectangle} Specifying the sub-region of the image to use for the billboard, rather than the entire image.
|
|
50
51
|
* @property {DistanceDisplayCondition} [distanceDisplayCondition] A {@link DistanceDisplayCondition} Specifying the distance from the camera at which this billboard will be displayed.
|
|
51
52
|
* @property {number} [disableDepthTestDistance] A number specifying the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
|
|
53
|
+
* @property {SplitDirection} [splitDirection] A {@link SplitDirection} Specifying the split property of the billboard.
|
|
52
54
|
*/
|
|
53
55
|
|
|
54
56
|
/**
|
|
@@ -250,6 +252,11 @@ function Billboard(options, billboardCollection) {
|
|
|
250
252
|
this._outlineWidth = defaultValue(options.outlineWidth, 0.0);
|
|
251
253
|
|
|
252
254
|
this._updateClamping();
|
|
255
|
+
|
|
256
|
+
this._splitDirection = defaultValue(
|
|
257
|
+
options.splitDirection,
|
|
258
|
+
SplitDirection.NONE
|
|
259
|
+
);
|
|
253
260
|
}
|
|
254
261
|
|
|
255
262
|
const SHOW_INDEX = (Billboard.SHOW_INDEX = 0);
|
|
@@ -270,7 +277,8 @@ const DISTANCE_DISPLAY_CONDITION = (Billboard.DISTANCE_DISPLAY_CONDITION = 14);
|
|
|
270
277
|
const DISABLE_DEPTH_DISTANCE = (Billboard.DISABLE_DEPTH_DISTANCE = 15);
|
|
271
278
|
Billboard.TEXTURE_COORDINATE_BOUNDS = 16;
|
|
272
279
|
const SDF_INDEX = (Billboard.SDF_INDEX = 17);
|
|
273
|
-
Billboard.
|
|
280
|
+
const SPLIT_DIRECTION_INDEX = (Billboard.SPLIT_DIRECTION_INDEX = 18);
|
|
281
|
+
Billboard.NUMBER_OF_PROPERTIES = 19;
|
|
274
282
|
|
|
275
283
|
function makeDirty(billboard, propertyChanged) {
|
|
276
284
|
const billboardCollection = billboard._billboardCollection;
|
|
@@ -1072,6 +1080,24 @@ Object.defineProperties(Billboard.prototype, {
|
|
|
1072
1080
|
}
|
|
1073
1081
|
},
|
|
1074
1082
|
},
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Gets or sets the {@link SplitDirection} of this billboard.
|
|
1086
|
+
* @memberof Billboard.prototype
|
|
1087
|
+
* @type {SplitDirection}
|
|
1088
|
+
* @default {@link SplitDirection.NONE}
|
|
1089
|
+
*/
|
|
1090
|
+
splitDirection: {
|
|
1091
|
+
get: function () {
|
|
1092
|
+
return this._splitDirection;
|
|
1093
|
+
},
|
|
1094
|
+
set: function (value) {
|
|
1095
|
+
if (this._splitDirection !== value) {
|
|
1096
|
+
this._splitDirection = value;
|
|
1097
|
+
makeDirty(this, SPLIT_DIRECTION_INDEX);
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1100
|
+
},
|
|
1075
1101
|
});
|
|
1076
1102
|
|
|
1077
1103
|
Billboard.prototype.getPickId = function (context) {
|
|
@@ -1567,7 +1593,8 @@ Billboard.prototype.equals = function (other) {
|
|
|
1567
1593
|
this._distanceDisplayCondition,
|
|
1568
1594
|
other._distanceDisplayCondition
|
|
1569
1595
|
) &&
|
|
1570
|
-
this._disableDepthTestDistance === other._disableDepthTestDistance
|
|
1596
|
+
this._disableDepthTestDistance === other._disableDepthTestDistance &&
|
|
1597
|
+
this._splitDirection === other._splitDirection)
|
|
1571
1598
|
);
|
|
1572
1599
|
};
|
|
1573
1600
|
|
|
@@ -54,6 +54,7 @@ const DISTANCE_DISPLAY_CONDITION_INDEX = Billboard.DISTANCE_DISPLAY_CONDITION;
|
|
|
54
54
|
const DISABLE_DEPTH_DISTANCE = Billboard.DISABLE_DEPTH_DISTANCE;
|
|
55
55
|
const TEXTURE_COORDINATE_BOUNDS = Billboard.TEXTURE_COORDINATE_BOUNDS;
|
|
56
56
|
const SDF_INDEX = Billboard.SDF_INDEX;
|
|
57
|
+
const SPLIT_DIRECTION_INDEX = Billboard.SPLIT_DIRECTION_INDEX;
|
|
57
58
|
const NUMBER_OF_PROPERTIES = Billboard.NUMBER_OF_PROPERTIES;
|
|
58
59
|
|
|
59
60
|
let attributeLocations;
|
|
@@ -71,6 +72,7 @@ const attributeLocationsBatched = {
|
|
|
71
72
|
textureCoordinateBoundsOrLabelTranslate: 9,
|
|
72
73
|
a_batchId: 10,
|
|
73
74
|
sdf: 11,
|
|
75
|
+
splitDirection: 12,
|
|
74
76
|
};
|
|
75
77
|
|
|
76
78
|
const attributeLocationsInstanced = {
|
|
@@ -87,6 +89,7 @@ const attributeLocationsInstanced = {
|
|
|
87
89
|
textureCoordinateBoundsOrLabelTranslate: 10,
|
|
88
90
|
a_batchId: 11,
|
|
89
91
|
sdf: 12,
|
|
92
|
+
splitDirection: 13,
|
|
90
93
|
};
|
|
91
94
|
|
|
92
95
|
/**
|
|
@@ -311,6 +314,7 @@ function BillboardCollection(options) {
|
|
|
311
314
|
BufferUsage.STATIC_DRAW, // PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX
|
|
312
315
|
BufferUsage.STATIC_DRAW, // DISTANCE_DISPLAY_CONDITION_INDEX
|
|
313
316
|
BufferUsage.STATIC_DRAW, // TEXTURE_COORDINATE_BOUNDS
|
|
317
|
+
BufferUsage.STATIC_DRAW, // SPLIT_DIRECTION_INDEX
|
|
314
318
|
];
|
|
315
319
|
|
|
316
320
|
this._highlightColor = Color.clone(Color.WHITE); // Only used by Vector3DTilePoints
|
|
@@ -777,6 +781,12 @@ function createVAF(
|
|
|
777
781
|
componentDatatype: ComponentDatatype.FLOAT,
|
|
778
782
|
usage: buffersUsage[TEXTURE_COORDINATE_BOUNDS],
|
|
779
783
|
},
|
|
784
|
+
{
|
|
785
|
+
index: attributeLocations.splitDirection,
|
|
786
|
+
componentsPerAttribute: 1,
|
|
787
|
+
componentDatatype: ComponentDatatype.FLOAT,
|
|
788
|
+
usage: buffersUsage[SPLIT_DIRECTION_INDEX],
|
|
789
|
+
},
|
|
780
790
|
];
|
|
781
791
|
|
|
782
792
|
// Instancing requires one non-instanced attribute.
|
|
@@ -1586,6 +1596,34 @@ function writeSDF(
|
|
|
1586
1596
|
}
|
|
1587
1597
|
}
|
|
1588
1598
|
|
|
1599
|
+
function writeSplitDirection(
|
|
1600
|
+
billboardCollection,
|
|
1601
|
+
frameState,
|
|
1602
|
+
textureAtlasCoordinates,
|
|
1603
|
+
vafWriters,
|
|
1604
|
+
billboard
|
|
1605
|
+
) {
|
|
1606
|
+
const writer = vafWriters[attributeLocations.splitDirection];
|
|
1607
|
+
let direction = 0.0;
|
|
1608
|
+
|
|
1609
|
+
const split = billboard.splitDirection;
|
|
1610
|
+
if (defined(split)) {
|
|
1611
|
+
direction = split;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
let i;
|
|
1615
|
+
if (billboardCollection._instanced) {
|
|
1616
|
+
i = billboard._index;
|
|
1617
|
+
writer(i, direction);
|
|
1618
|
+
} else {
|
|
1619
|
+
i = billboard._index * 4;
|
|
1620
|
+
writer(i + 0, direction);
|
|
1621
|
+
writer(i + 1, direction);
|
|
1622
|
+
writer(i + 2, direction);
|
|
1623
|
+
writer(i + 3, direction);
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1589
1627
|
function writeBillboard(
|
|
1590
1628
|
billboardCollection,
|
|
1591
1629
|
frameState,
|
|
@@ -1670,6 +1708,13 @@ function writeBillboard(
|
|
|
1670
1708
|
vafWriters,
|
|
1671
1709
|
billboard
|
|
1672
1710
|
);
|
|
1711
|
+
writeSplitDirection(
|
|
1712
|
+
billboardCollection,
|
|
1713
|
+
frameState,
|
|
1714
|
+
textureAtlasCoordinates,
|
|
1715
|
+
vafWriters,
|
|
1716
|
+
billboard
|
|
1717
|
+
);
|
|
1673
1718
|
}
|
|
1674
1719
|
|
|
1675
1720
|
function recomputeActualPositions(
|
|
@@ -1981,6 +2026,10 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
1981
2026
|
writers.push(writeSDF);
|
|
1982
2027
|
}
|
|
1983
2028
|
|
|
2029
|
+
if (properties[SPLIT_DIRECTION_INDEX]) {
|
|
2030
|
+
writers.push(writeSplitDirection);
|
|
2031
|
+
}
|
|
2032
|
+
|
|
1984
2033
|
const numWriters = writers.length;
|
|
1985
2034
|
vafWriters = this._vaf.writers;
|
|
1986
2035
|
|
|
@@ -120,7 +120,16 @@ function metadataSuccess(data, imageryProviderBuilder) {
|
|
|
120
120
|
imageryProviderBuilder.maximumLevel = resource.zoomMax - 1;
|
|
121
121
|
imageryProviderBuilder.imageUrlSubdomains = resource.imageUrlSubdomains;
|
|
122
122
|
imageryProviderBuilder.imageUrlTemplate = resource.imageUrl;
|
|
123
|
-
|
|
123
|
+
|
|
124
|
+
let validProviders = resource.imageryProviders;
|
|
125
|
+
if (defined(resource.imageryProviders)) {
|
|
126
|
+
// prevent issues with the imagery API from crashing the viewer when the expected properties are not there
|
|
127
|
+
// See https://github.com/CesiumGS/cesium/issues/12088
|
|
128
|
+
validProviders = resource.imageryProviders.filter((provider) =>
|
|
129
|
+
provider.coverageAreas?.some((area) => defined(area.bbox))
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
imageryProviderBuilder.attributionList = validProviders;
|
|
124
133
|
}
|
|
125
134
|
|
|
126
135
|
function metadataFailure(metadataResource, error, provider) {
|
|
@@ -9,7 +9,7 @@ import ScreenSpaceEventType from "../Core/ScreenSpaceEventType.js";
|
|
|
9
9
|
import CameraEventType from "./CameraEventType.js";
|
|
10
10
|
|
|
11
11
|
function getKey(type, modifier) {
|
|
12
|
-
let key = type
|
|
12
|
+
let key = `${type}`;
|
|
13
13
|
if (defined(modifier)) {
|
|
14
14
|
key += `+${modifier}`;
|
|
15
15
|
}
|
|
@@ -178,7 +178,6 @@ function listenMouseButtonDownUp(aggregator, modifier, type) {
|
|
|
178
178
|
const isDown = aggregator._isDown;
|
|
179
179
|
const eventStartPosition = aggregator._eventStartPosition;
|
|
180
180
|
const pressTime = aggregator._pressTime;
|
|
181
|
-
const releaseTime = aggregator._releaseTime;
|
|
182
181
|
|
|
183
182
|
isDown[key] = false;
|
|
184
183
|
eventStartPosition[key] = new Cartesian2();
|
|
@@ -219,20 +218,64 @@ function listenMouseButtonDownUp(aggregator, modifier, type) {
|
|
|
219
218
|
|
|
220
219
|
aggregator._eventHandler.setInputAction(
|
|
221
220
|
function () {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
221
|
+
cancelMouseDownAction(getKey(type, undefined), aggregator);
|
|
222
|
+
for (const modifier of Object.values(KeyboardEventModifier)) {
|
|
223
|
+
const cancelKey = getKey(type, modifier);
|
|
224
|
+
cancelMouseDownAction(cancelKey, aggregator);
|
|
225
|
+
}
|
|
225
226
|
},
|
|
226
227
|
up,
|
|
227
228
|
modifier
|
|
228
229
|
);
|
|
229
230
|
}
|
|
230
231
|
|
|
232
|
+
function cancelMouseDownAction(cancelKey, aggregator) {
|
|
233
|
+
const releaseTime = aggregator._releaseTime;
|
|
234
|
+
const isDown = aggregator._isDown;
|
|
235
|
+
if (isDown[cancelKey]) {
|
|
236
|
+
aggregator._buttonsDown = Math.max(aggregator._buttonsDown - 1, 0);
|
|
237
|
+
}
|
|
238
|
+
isDown[cancelKey] = false;
|
|
239
|
+
releaseTime[cancelKey] = new Date();
|
|
240
|
+
}
|
|
241
|
+
|
|
231
242
|
function cloneMouseMovement(mouseMovement, result) {
|
|
232
243
|
Cartesian2.clone(mouseMovement.startPosition, result.startPosition);
|
|
233
244
|
Cartesian2.clone(mouseMovement.endPosition, result.endPosition);
|
|
234
245
|
}
|
|
235
246
|
|
|
247
|
+
function refreshMouseDownStatus(type, modifier, aggregator) {
|
|
248
|
+
// first: Judge if the mouse is pressed
|
|
249
|
+
const isDown = aggregator._isDown;
|
|
250
|
+
let anyButtonIsDown = false;
|
|
251
|
+
const currentKey = getKey(type, modifier);
|
|
252
|
+
for (const [downKey, downValue] of Object.entries(isDown)) {
|
|
253
|
+
if (downKey.startsWith(type) && downValue && downKey !== currentKey) {
|
|
254
|
+
anyButtonIsDown = true;
|
|
255
|
+
cancelMouseDownAction(downKey, aggregator);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (!anyButtonIsDown) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// second: If it is pressed, it will be transferred to the current modifier.
|
|
264
|
+
const pressTime = aggregator._pressTime;
|
|
265
|
+
let lastMovement = aggregator._lastMovement[currentKey];
|
|
266
|
+
if (!defined(lastMovement)) {
|
|
267
|
+
lastMovement = aggregator._lastMovement[currentKey] = {
|
|
268
|
+
startPosition: new Cartesian2(),
|
|
269
|
+
endPosition: new Cartesian2(),
|
|
270
|
+
valid: false,
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
aggregator._buttonsDown++;
|
|
274
|
+
lastMovement.valid = false;
|
|
275
|
+
isDown[currentKey] = true;
|
|
276
|
+
pressTime[currentKey] = new Date();
|
|
277
|
+
}
|
|
278
|
+
|
|
236
279
|
function listenMouseMove(aggregator, modifier) {
|
|
237
280
|
const update = aggregator._update;
|
|
238
281
|
const movement = aggregator._movement;
|
|
@@ -271,6 +314,7 @@ function listenMouseMove(aggregator, modifier) {
|
|
|
271
314
|
const type = CameraEventType[typeName];
|
|
272
315
|
if (defined(type)) {
|
|
273
316
|
const key = getKey(type, modifier);
|
|
317
|
+
refreshMouseDownStatus(type, modifier, aggregator);
|
|
274
318
|
if (isDown[key]) {
|
|
275
319
|
if (!update[key]) {
|
|
276
320
|
Cartesian2.clone(
|
package/Source/Scene/Globe.js
CHANGED
|
@@ -979,7 +979,6 @@ Globe.prototype.beginFrame = function (frameState) {
|
|
|
979
979
|
const tileProvider = surface.tileProvider;
|
|
980
980
|
const terrainProvider = this.terrainProvider;
|
|
981
981
|
const hasWaterMask =
|
|
982
|
-
this.showWaterEffect &&
|
|
983
982
|
defined(terrainProvider) &&
|
|
984
983
|
terrainProvider.hasWaterMask &&
|
|
985
984
|
terrainProvider.hasWaterMask;
|
|
@@ -1034,6 +1033,7 @@ Globe.prototype.beginFrame = function (frameState) {
|
|
|
1034
1033
|
tileProvider.zoomedOutOceanSpecularIntensity =
|
|
1035
1034
|
mode === SceneMode.SCENE3D ? this._zoomedOutOceanSpecularIntensity : 0.0;
|
|
1036
1035
|
tileProvider.hasWaterMask = hasWaterMask;
|
|
1036
|
+
tileProvider.showWaterEffect = this.showWaterEffect;
|
|
1037
1037
|
tileProvider.oceanNormalMap = this._oceanNormalMap;
|
|
1038
1038
|
tileProvider.enableLighting = this.enableLighting;
|
|
1039
1039
|
tileProvider.dynamicAtmosphereLighting = this.dynamicAtmosphereLighting;
|
|
@@ -109,6 +109,7 @@ GlobeSurfaceShaderSet.prototype.getShaderProgram = function (options) {
|
|
|
109
109
|
const applyAlpha = options.applyAlpha;
|
|
110
110
|
const applyDayNightAlpha = options.applyDayNightAlpha;
|
|
111
111
|
const applySplit = options.applySplit;
|
|
112
|
+
const hasWaterMask = options.hasWaterMask;
|
|
112
113
|
const showReflectiveOcean = options.showReflectiveOcean;
|
|
113
114
|
const showOceanWaves = options.showOceanWaves;
|
|
114
115
|
const enableLighting = options.enableLighting;
|
|
@@ -168,30 +169,31 @@ GlobeSurfaceShaderSet.prototype.getShaderProgram = function (options) {
|
|
|
168
169
|
(applySaturation << 5) |
|
|
169
170
|
(applyGamma << 6) |
|
|
170
171
|
(applyAlpha << 7) |
|
|
171
|
-
(
|
|
172
|
-
(
|
|
173
|
-
(
|
|
174
|
-
(
|
|
175
|
-
(
|
|
176
|
-
(
|
|
177
|
-
(
|
|
178
|
-
(
|
|
179
|
-
(
|
|
180
|
-
(
|
|
181
|
-
(
|
|
182
|
-
(
|
|
183
|
-
(
|
|
184
|
-
(
|
|
185
|
-
(
|
|
186
|
-
(
|
|
187
|
-
(
|
|
188
|
-
(
|
|
189
|
-
(
|
|
190
|
-
(
|
|
191
|
-
(
|
|
192
|
-
(
|
|
193
|
-
(
|
|
194
|
-
(
|
|
172
|
+
(hasWaterMask << 8) |
|
|
173
|
+
(showReflectiveOcean << 9) |
|
|
174
|
+
(showOceanWaves << 10) |
|
|
175
|
+
(enableLighting << 11) |
|
|
176
|
+
(dynamicAtmosphereLighting << 12) |
|
|
177
|
+
(dynamicAtmosphereLightingFromSun << 13) |
|
|
178
|
+
(showGroundAtmosphere << 14) |
|
|
179
|
+
(perFragmentGroundAtmosphere << 15) |
|
|
180
|
+
(hasVertexNormals << 16) |
|
|
181
|
+
(useWebMercatorProjection << 17) |
|
|
182
|
+
(enableFog << 18) |
|
|
183
|
+
(quantization << 19) |
|
|
184
|
+
(applySplit << 20) |
|
|
185
|
+
(enableClippingPlanes << 21) |
|
|
186
|
+
(enableClippingPolygons << 22) |
|
|
187
|
+
(cartographicLimitRectangleFlag << 23) |
|
|
188
|
+
(imageryCutoutFlag << 24) |
|
|
189
|
+
(colorCorrect << 25) |
|
|
190
|
+
(highlightFillTile << 26) |
|
|
191
|
+
(colorToAlpha << 27) |
|
|
192
|
+
(hasGeodeticSurfaceNormals << 28) |
|
|
193
|
+
(hasExaggeration << 29) |
|
|
194
|
+
(showUndergroundColor << 30) |
|
|
195
|
+
(translucent << 31) |
|
|
196
|
+
(applyDayNightAlpha << 32);
|
|
195
197
|
|
|
196
198
|
let currentClippingShaderState = 0;
|
|
197
199
|
if (defined(clippingPlanes) && clippingPlanes.length > 0) {
|
|
@@ -279,6 +281,9 @@ GlobeSurfaceShaderSet.prototype.getShaderProgram = function (options) {
|
|
|
279
281
|
if (applyDayNightAlpha) {
|
|
280
282
|
fs.defines.push("APPLY_DAY_NIGHT_ALPHA");
|
|
281
283
|
}
|
|
284
|
+
if (hasWaterMask) {
|
|
285
|
+
fs.defines.push("HAS_WATER_MASK");
|
|
286
|
+
}
|
|
282
287
|
if (showReflectiveOcean) {
|
|
283
288
|
fs.defines.push("SHOW_REFLECTIVE_OCEAN");
|
|
284
289
|
vs.defines.push("SHOW_REFLECTIVE_OCEAN");
|
|
@@ -83,6 +83,7 @@ function GlobeSurfaceTileProvider(options) {
|
|
|
83
83
|
this.lightingFadeOutDistance = 6500000.0;
|
|
84
84
|
this.lightingFadeInDistance = 9000000.0;
|
|
85
85
|
this.hasWaterMask = false;
|
|
86
|
+
this.showWaterEffect = false;
|
|
86
87
|
this.oceanNormalMap = undefined;
|
|
87
88
|
this.zoomedOutOceanSpecularIntensity = 0.5;
|
|
88
89
|
this.enableLighting = false;
|
|
@@ -2181,8 +2182,8 @@ function addDrawCommandsForTile(tileProvider, tile, frameState) {
|
|
|
2181
2182
|
const lambertDiffuseMultiplier = tileProvider.lambertDiffuseMultiplier;
|
|
2182
2183
|
const vertexShadowDarkness = tileProvider.vertexShadowDarkness;
|
|
2183
2184
|
|
|
2184
|
-
const
|
|
2185
|
-
|
|
2185
|
+
const hasWaterMask = tileProvider.hasWaterMask && defined(waterMaskTexture);
|
|
2186
|
+
const showReflectiveOcean = hasWaterMask && tileProvider.showWaterEffect;
|
|
2186
2187
|
const oceanNormalMap = tileProvider.oceanNormalMap;
|
|
2187
2188
|
const showOceanWaves = showReflectiveOcean && defined(oceanNormalMap);
|
|
2188
2189
|
const terrainProvider = tileProvider.terrainProvider;
|
|
@@ -2214,7 +2215,7 @@ function addDrawCommandsForTile(tileProvider, tile, frameState) {
|
|
|
2214
2215
|
perFragmentGroundAtmosphere = cameraDistance > fadeOutDistance;
|
|
2215
2216
|
}
|
|
2216
2217
|
|
|
2217
|
-
if (
|
|
2218
|
+
if (hasWaterMask) {
|
|
2218
2219
|
--maxTextures;
|
|
2219
2220
|
}
|
|
2220
2221
|
if (showOceanWaves) {
|
|
@@ -2329,6 +2330,7 @@ function addDrawCommandsForTile(tileProvider, tile, frameState) {
|
|
|
2329
2330
|
const surfaceShaderSetOptions = surfaceShaderSetOptionsScratch;
|
|
2330
2331
|
surfaceShaderSetOptions.frameState = frameState;
|
|
2331
2332
|
surfaceShaderSetOptions.surfaceTile = surfaceTile;
|
|
2333
|
+
surfaceShaderSetOptions.hasWaterMask = hasWaterMask;
|
|
2332
2334
|
surfaceShaderSetOptions.showReflectiveOcean = showReflectiveOcean;
|
|
2333
2335
|
surfaceShaderSetOptions.showOceanWaves = showOceanWaves;
|
|
2334
2336
|
surfaceShaderSetOptions.enableLighting = tileProvider.enableLighting;
|