@cesium/engine 11.1.0 → 12.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.
Files changed (159) hide show
  1. package/Build/Workers/{chunk-MXIZJAPH.js → chunk-2B5H7KIN.js} +1 -1
  2. package/Build/Workers/{chunk-DI5NGJUP.js → chunk-2RHMHHJH.js} +2 -2
  3. package/Build/Workers/{chunk-E6V6SQZW.js → chunk-3OHDXGFC.js} +6 -6
  4. package/Build/Workers/{chunk-GESF4OXQ.js → chunk-3OM5QZSI.js} +2 -2
  5. package/Build/Workers/{chunk-E63IIM5T.js → chunk-3UJV3W4Y.js} +1 -1
  6. package/Build/Workers/{chunk-O3E4OAOE.js → chunk-3X2LXRHU.js} +13 -13
  7. package/Build/Workers/{chunk-CKY7HOHV.js → chunk-4ESQ3DN2.js} +9 -9
  8. package/Build/Workers/{chunk-BHQJ2NT7.js → chunk-4IQPX22D.js} +6 -6
  9. package/Build/Workers/{chunk-JW4FOI6M.js → chunk-4XPGN5Y7.js} +11 -11
  10. package/Build/Workers/{chunk-DHYHSFFJ.js → chunk-56LALJCU.js} +2 -2
  11. package/Build/Workers/{chunk-YZ733KKS.js → chunk-5FSKL7US.js} +12 -12
  12. package/Build/Workers/{chunk-3Q2L65QU.js → chunk-5YKJKOFE.js} +7 -7
  13. package/Build/Workers/{chunk-GWCFU2SA.js → chunk-62YGXNGC.js} +7 -7
  14. package/Build/Workers/{chunk-M3GMB5OP.js → chunk-6DYMJ57Z.js} +10 -10
  15. package/Build/Workers/{chunk-IBLIYJZR.js → chunk-7DSVCRFD.js} +6 -6
  16. package/Build/Workers/{chunk-5PTXS2GO.js → chunk-7OISMGQF.js} +7 -7
  17. package/Build/Workers/{chunk-2ZGOQXYU.js → chunk-AL7BHP36.js} +6 -6
  18. package/Build/Workers/{chunk-TGONEMZO.js → chunk-AOCENJVH.js} +11 -11
  19. package/Build/Workers/{chunk-472HQ3EH.js → chunk-ARTM66DL.js} +5 -5
  20. package/Build/Workers/{chunk-K4GQUNB5.js → chunk-B4AZL6Q4.js} +5 -5
  21. package/Build/Workers/{chunk-GNBFYG7F.js → chunk-BQNTN4CC.js} +13 -13
  22. package/Build/Workers/{chunk-GGZJN2TI.js → chunk-C4IAULHW.js} +15 -15
  23. package/Build/Workers/{chunk-7BMOHCPM.js → chunk-ES6Q5HWK.js} +13 -13
  24. package/Build/Workers/{chunk-PGRPDNHG.js → chunk-GKBICLGC.js} +17 -17
  25. package/Build/Workers/{chunk-C6YYBQXW.js → chunk-GMGUR5GM.js} +4 -4
  26. package/Build/Workers/{chunk-FDOV2LBJ.js → chunk-GUW6BS72.js} +7 -7
  27. package/Build/Workers/{chunk-U72QNFOJ.js → chunk-GYHHNFW5.js} +10 -10
  28. package/Build/Workers/{chunk-YSGTGQQO.js → chunk-GZG526CC.js} +14 -14
  29. package/Build/Workers/{chunk-5ODQSF26.js → chunk-HILBDZUP.js} +2 -2
  30. package/Build/Workers/{chunk-TKVT5GQM.js → chunk-HYUTWUXN.js} +13 -13
  31. package/Build/Workers/{chunk-XY4BATBS.js → chunk-IL6SMMDD.js} +4 -4
  32. package/Build/Workers/{chunk-6CHGCNMW.js → chunk-IT6AWHFV.js} +2 -2
  33. package/Build/Workers/{chunk-7O373FFS.js → chunk-J64XIF5C.js} +8 -8
  34. package/Build/Workers/{chunk-I2ITFFPX.js → chunk-JGGZ3H4W.js} +1 -1
  35. package/Build/Workers/{chunk-26GA3JAM.js → chunk-JRULXFCC.js} +5 -5
  36. package/Build/Workers/{chunk-27HUZ7SA.js → chunk-MSY2AAW2.js} +4 -4
  37. package/Build/Workers/{chunk-SMDOP47J.js → chunk-QXBRZZQS.js} +10 -10
  38. package/Build/Workers/{chunk-5OOFQLKF.js → chunk-SXJ37VUC.js} +7 -7
  39. package/Build/Workers/{chunk-AD63PIY6.js → chunk-T6FZFMTF.js} +2 -2
  40. package/Build/Workers/{chunk-VU2MNO7L.js → chunk-TQK4D4AR.js} +7 -7
  41. package/Build/Workers/{chunk-E27BLMDD.js → chunk-US3L7FXC.js} +6 -6
  42. package/Build/Workers/{chunk-N5KJGGCM.js → chunk-VGT4ONMC.js} +17 -17
  43. package/Build/Workers/{chunk-PRGYLLJT.js → chunk-VJVTWBXB.js} +1 -1
  44. package/Build/Workers/{chunk-EJZTDTUH.js → chunk-VQZNBD3T.js} +4 -4
  45. package/Build/Workers/{chunk-NGPPMXRM.js → chunk-VUCVRDLD.js} +7 -7
  46. package/Build/Workers/{chunk-YFXQECWV.js → chunk-W2Q2F7JS.js} +5 -5
  47. package/Build/Workers/{chunk-VJZB3WAV.js → chunk-WQCX7U65.js} +7 -7
  48. package/Build/Workers/{chunk-7JO7GPJN.js → chunk-WW5RTJ72.js} +1 -1
  49. package/Build/Workers/{chunk-76BYBWHP.js → chunk-X67KKHI7.js} +4 -4
  50. package/Build/Workers/{chunk-7KTQP4VB.js → chunk-X7VRF25X.js} +5 -5
  51. package/Build/Workers/{chunk-S6MRMMQU.js → chunk-YANQEHO5.js} +6 -6
  52. package/Build/Workers/{chunk-FIGIZHAQ.js → chunk-ZZNBFQL5.js} +11 -11
  53. package/Build/Workers/combineGeometry.js +22 -22
  54. package/Build/Workers/createBoxGeometry.js +16 -16
  55. package/Build/Workers/createBoxOutlineGeometry.js +14 -14
  56. package/Build/Workers/createCircleGeometry.js +24 -24
  57. package/Build/Workers/createCircleOutlineGeometry.js +17 -17
  58. package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
  59. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
  60. package/Build/Workers/createCorridorGeometry.js +27 -27
  61. package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
  62. package/Build/Workers/createCylinderGeometry.js +18 -18
  63. package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
  64. package/Build/Workers/createEllipseGeometry.js +24 -24
  65. package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
  66. package/Build/Workers/createEllipsoidGeometry.js +17 -17
  67. package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
  68. package/Build/Workers/createFrustumGeometry.js +16 -16
  69. package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
  70. package/Build/Workers/createGeometry.js +22 -22
  71. package/Build/Workers/createGroundPolylineGeometry.js +20 -20
  72. package/Build/Workers/createPlaneGeometry.js +14 -14
  73. package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
  74. package/Build/Workers/createPolygonGeometry.js +30 -30
  75. package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
  76. package/Build/Workers/createPolylineGeometry.js +23 -23
  77. package/Build/Workers/createPolylineVolumeGeometry.js +29 -29
  78. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
  79. package/Build/Workers/createRectangleGeometry.js +25 -25
  80. package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
  81. package/Build/Workers/createSimplePolylineGeometry.js +21 -21
  82. package/Build/Workers/createSphereGeometry.js +17 -17
  83. package/Build/Workers/createSphereOutlineGeometry.js +16 -16
  84. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  85. package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
  86. package/Build/Workers/createVectorTileGeometries.js +22 -22
  87. package/Build/Workers/createVectorTilePoints.js +12 -12
  88. package/Build/Workers/createVectorTilePolygons.js +20 -20
  89. package/Build/Workers/createVectorTilePolylines.js +13 -13
  90. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
  91. package/Build/Workers/createVerticesFromHeightmap.js +20 -20
  92. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
  93. package/Build/Workers/createWallGeometry.js +22 -22
  94. package/Build/Workers/createWallOutlineGeometry.js +21 -21
  95. package/Build/Workers/decodeDraco.js +11 -11
  96. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  97. package/Build/Workers/decodeI3S.js +10 -10
  98. package/Build/Workers/transcodeKTX2.js +7 -7
  99. package/Build/Workers/transferTypedArrayTest.js +1 -1
  100. package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
  101. package/Source/Core/BoundingSphere.js +1 -1
  102. package/Source/Core/Color.js +1 -1
  103. package/Source/Core/CorridorGeometryLibrary.js +4 -4
  104. package/Source/Core/EllipseGeometry.js +1 -1
  105. package/Source/Core/EllipsoidGeodesic.js +1 -1
  106. package/Source/Core/FrustumGeometry.js +1 -1
  107. package/Source/Core/Ion.js +1 -1
  108. package/Source/Core/Math.js +2 -0
  109. package/Source/Core/PolylineVolumeGeometryLibrary.js +2 -2
  110. package/Source/Core/decodeGoogleEarthEnterpriseData.js +1 -1
  111. package/Source/DataSources/DataSourceDisplay.js +1 -1
  112. package/Source/DataSources/ModelGraphics.js +1 -0
  113. package/Source/Renderer/AutomaticUniforms.js +13 -0
  114. package/Source/Renderer/CubeMap.js +89 -12
  115. package/Source/Renderer/CubeMapFace.js +90 -13
  116. package/Source/Renderer/UniformState.js +13 -0
  117. package/Source/Scene/ArcGisMapService.js +1 -1
  118. package/Source/Scene/Atmosphere.js +22 -0
  119. package/Source/Scene/BingMapsImageryProvider.js +1 -1
  120. package/Source/Scene/Cesium3DTileset.js +39 -0
  121. package/Source/Scene/DynamicEnvironmentMapManager.js +852 -0
  122. package/Source/Scene/Fog.js +75 -82
  123. package/Source/Scene/FrameState.js +5 -3
  124. package/Source/Scene/ImageBasedLighting.js +7 -64
  125. package/Source/Scene/Model/AtmospherePipelineStage.js +10 -5
  126. package/Source/Scene/Model/ImageBasedLightingPipelineStage.js +43 -21
  127. package/Source/Scene/Model/Model.js +98 -25
  128. package/Source/Scene/Model/Model3DTileContent.js +5 -0
  129. package/Source/Scene/Model/ModelSceneGraph.js +1 -0
  130. package/Source/Scene/ScreenSpaceCameraController.js +20 -1
  131. package/Source/Shaders/Builtin/Functions/computeAtmosphereColor.glsl +44 -0
  132. package/Source/Shaders/Builtin/Functions/computeAtmosphereColor.js +44 -0
  133. package/Source/Shaders/Builtin/Functions/computeScattering.glsl +0 -1
  134. package/Source/Shaders/Builtin/Functions/computeScattering.js +0 -1
  135. package/Source/Shaders/Builtin/Functions/sphericalHarmonics.glsl +3 -1
  136. package/Source/Shaders/Builtin/Functions/sphericalHarmonics.js +3 -1
  137. package/Source/Shaders/ComputeIrradianceFS.glsl +103 -0
  138. package/Source/Shaders/ComputeIrradianceFS.js +105 -0
  139. package/Source/Shaders/ComputeRadianceMapFS.glsl +107 -0
  140. package/Source/Shaders/ComputeRadianceMapFS.js +109 -0
  141. package/Source/Shaders/ConvolveSpecularMapFS.glsl +70 -0
  142. package/Source/Shaders/ConvolveSpecularMapFS.js +72 -0
  143. package/Source/Shaders/ConvolveSpecularMapVS.glsl +24 -0
  144. package/Source/Shaders/ConvolveSpecularMapVS.js +26 -0
  145. package/Source/Shaders/GlobeFS.glsl +1 -2
  146. package/Source/Shaders/GlobeFS.js +1 -2
  147. package/Source/Shaders/Model/AtmosphereStageFS.glsl +1 -4
  148. package/Source/Shaders/Model/AtmosphereStageFS.js +1 -4
  149. package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +2 -155
  150. package/Source/Shaders/Model/ImageBasedLightingStageFS.js +3 -156
  151. package/Source/Shaders/Model/LightingStageFS.glsl +3 -22
  152. package/Source/Shaders/Model/LightingStageFS.js +3 -22
  153. package/Source/Shaders/SkyBoxVS.glsl +0 -1
  154. package/Source/Shaders/SkyBoxVS.js +0 -1
  155. package/Source/Widget/CesiumWidget.js +776 -1
  156. package/Source/Workers/decodeGoogleEarthEnterprisePacket.js +1 -1
  157. package/index.d.ts +266 -12
  158. package/index.js +15 -10
  159. package/package.json +2 -2
@@ -245,25 +245,22 @@ CubeMapFace.prototype.copyFrom = function (options) {
245
245
 
246
246
  /**
247
247
  * Copies texels from the framebuffer to the cubemap's face.
248
- *
249
248
  * @param {number} [xOffset=0] An offset in the x direction in the cubemap where copying begins.
250
249
  * @param {number} [yOffset=0] An offset in the y direction in the cubemap where copying begins.
251
250
  * @param {number} [framebufferXOffset=0] An offset in the x direction in the framebuffer where copying begins from.
252
251
  * @param {number} [framebufferYOffset=0] An offset in the y direction in the framebuffer where copying begins from.
253
252
  * @param {number} [width=CubeMap's width] The width of the subimage to copy.
254
253
  * @param {number} [height=CubeMap's height] The height of the subimage to copy.
255
- *
256
- * @exception {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.
257
- * @exception {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.
258
- * @exception {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
259
- * @exception {DeveloperError} xOffset must be greater than or equal to zero.
260
- * @exception {DeveloperError} yOffset must be greater than or equal to zero.
261
- * @exception {DeveloperError} framebufferXOffset must be greater than or equal to zero.
262
- * @exception {DeveloperError} framebufferYOffset must be greater than or equal to zero.
263
- * @exception {DeveloperError} xOffset + source.width must be less than or equal to width.
264
- * @exception {DeveloperError} yOffset + source.height must be less than or equal to height.
265
- * @exception {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
266
- *
254
+ * @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.
255
+ * @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.
256
+ * @throws {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
257
+ * @throws {DeveloperError} xOffset must be greater than or equal to zero.
258
+ * @throws {DeveloperError} yOffset must be greater than or equal to zero.
259
+ * @throws {DeveloperError} framebufferXOffset must be greater than or equal to zero.
260
+ * @throws {DeveloperError} framebufferYOffset must be greater than or equal to zero.
261
+ * @throws {DeveloperError} xOffset + source.width must be less than or equal to width.
262
+ * @throws {DeveloperError} yOffset + source.height must be less than or equal to height.
263
+ * @throws {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
267
264
  * @example
268
265
  * // Copy the framebuffer contents to the +x cube map face.
269
266
  * cubeMap.positiveX.copyFromFramebuffer();
@@ -336,4 +333,84 @@ CubeMapFace.prototype.copyFromFramebuffer = function (
336
333
  gl.bindTexture(target, null);
337
334
  this._initialized = true;
338
335
  };
336
+
337
+ /**
338
+ * Copies texels from the framebuffer to the cubemap's face mipmap.
339
+ * @param {number} [xOffset=0] An offset in the x direction in the framebuffer where copying begins from.
340
+ * @param {number} [yOffset=0] An offset in the y direction in the framebuffer where copying begins from.
341
+ * @param {number} [width=CubeMap's width] The width of the subimage to copy.
342
+ * @param {number} [height=CubeMap's height] The height of the subimage to copy.
343
+ * @param {number} [level=0] The level of detail. Level 0 is the base image level and level n is the n-th mipmap reduction level.
344
+ * @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.
345
+ * @throws {DeveloperError} Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.
346
+ * @throws {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
347
+ * @throws {DeveloperError} xOffset must be greater than or equal to zero.
348
+ * @throws {DeveloperError} yOffset must be greater than or equal to zero.
349
+ * @throws {DeveloperError} framebufferXOffset must be greater than or equal to zero.
350
+ * @throws {DeveloperError} framebufferYOffset must be greater than or equal to zero.
351
+ * @throws {DeveloperError} xOffset + source.width must be less than or equal to width.
352
+ * @throws {DeveloperError} yOffset + source.height must be less than or equal to height.
353
+ * @throws {DeveloperError} This CubeMap was destroyed, i.e., destroy() was called.
354
+ *
355
+ * @example
356
+ * // Copy the framebuffer contents to the +x cube map face.
357
+ * cubeMap.positiveX.copyFromFramebuffer();
358
+ */
359
+ CubeMapFace.prototype.copyMipmapFromFramebuffer = function (
360
+ xOffset,
361
+ yOffset,
362
+ width,
363
+ height,
364
+ level,
365
+ ) {
366
+ xOffset = defaultValue(xOffset, 0);
367
+ yOffset = defaultValue(yOffset, 0);
368
+ width = defaultValue(width, this._size);
369
+ height = defaultValue(height, this._size);
370
+ level = defaultValue(level, 0);
371
+
372
+ //>>includeStart('debug', pragmas.debug);
373
+ Check.typeOf.number.greaterThanOrEquals("xOffset", xOffset, 0);
374
+ Check.typeOf.number.greaterThanOrEquals("yOffset", yOffset, 0);
375
+
376
+ if (xOffset + width > this._size) {
377
+ throw new DeveloperError(
378
+ "xOffset + source.width must be less than or equal to width.",
379
+ );
380
+ }
381
+ if (yOffset + height > this._size) {
382
+ throw new DeveloperError(
383
+ "yOffset + source.height must be less than or equal to height.",
384
+ );
385
+ }
386
+ if (this._pixelDatatype === PixelDatatype.FLOAT) {
387
+ throw new DeveloperError(
388
+ "Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.",
389
+ );
390
+ }
391
+ if (this._pixelDatatype === PixelDatatype.HALF_FLOAT) {
392
+ throw new DeveloperError(
393
+ "Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.",
394
+ );
395
+ }
396
+ //>>includeEnd('debug');
397
+
398
+ const gl = this._context._gl;
399
+ const target = this._textureTarget;
400
+
401
+ gl.activeTexture(gl.TEXTURE0);
402
+ gl.bindTexture(target, this._texture);
403
+ gl.copyTexImage2D(
404
+ this._targetFace,
405
+ level,
406
+ this._internalFormat,
407
+ xOffset,
408
+ yOffset,
409
+ width,
410
+ height,
411
+ 0,
412
+ );
413
+ gl.bindTexture(target, null);
414
+ this._initialized = true;
415
+ };
339
416
  export default CubeMapFace;
@@ -160,6 +160,7 @@ function UniformState() {
160
160
  this._specularEnvironmentMapsMaximumLOD = undefined;
161
161
 
162
162
  this._fogDensity = undefined;
163
+ this._fogVisualDensityScalar = undefined;
163
164
  this._fogMinimumBrightness = undefined;
164
165
 
165
166
  this._atmosphereHsbShift = undefined;
@@ -924,6 +925,17 @@ Object.defineProperties(UniformState.prototype, {
924
925
  },
925
926
  },
926
927
 
928
+ /**
929
+ * A scalar used to mix a color with the fog color based on the distance to the camera.
930
+ * @memberof UniformState.prototype
931
+ * @type {number}
932
+ */
933
+ fogVisualDensityScalar: {
934
+ get: function () {
935
+ return this._fogVisualDensityScalar;
936
+ },
937
+ },
938
+
927
939
  /**
928
940
  * A scalar used as a minimum value when brightening fog
929
941
  * @memberof UniformState.prototype
@@ -1495,6 +1507,7 @@ UniformState.prototype.update = function (frameState) {
1495
1507
  frameState.specularEnvironmentMapsMaximumLOD;
1496
1508
 
1497
1509
  this._fogDensity = frameState.fog.density;
1510
+ this._fogVisualDensityScalar = frameState.fog.visualDensityScalar;
1498
1511
  this._fogMinimumBrightness = frameState.fog.minimumBrightness;
1499
1512
 
1500
1513
  const atmosphere = frameState.atmosphere;
@@ -4,7 +4,7 @@ import Resource from "../Core/Resource.js";
4
4
 
5
5
  let defaultTokenCredit;
6
6
  const defaultAccessToken =
7
- "AAPTxy8BH1VEsoebNVZXo8HurEOF051kAEKlhkOhBEc9BmRQoHkV6yy7n-w7RwBvqWZInYtbyiKcHHbPb4eH54WQnfJ6TQhd3sKcL6dutvEZajLojeHefo1qcBMplg4hb9OtcvtchKPzwRyH1-W_12nt2rhP3xbk8peiMvgIWZ__JYvZ8Wqw-8UWulEjXnpLRjclKf3NYHCTQgaw6Y6labxudMrnBgOODrJ1WdRxek-flc8.AT1_UW44TSnh";
7
+ "AAPTxy8BH1VEsoebNVZXo8HurEOF051kAEKlhkOhBEc9BmQpcUfxe1Yndhf82d5oKkQJ4_7VPaBQGYSISOMaRew7Sy-eTX1JQ4XwaC8v5aCvV72O6LCPs5Ss1pXXH-0uEw6bSRhTeQYHOmikutC2OMyZt6lu0VfT7FA-jVMO_UsunWNTf2cycP2O4IeDN_UV9G-VNmUu2jRvCHioi8o72ua4238s2219cYLEmcoGRJGVJTA.AT1_PjLvyih0";
8
8
  /**
9
9
  * Default options for accessing the ArcGIS image tile service.
10
10
  *
@@ -1,4 +1,5 @@
1
1
  import Cartesian3 from "../Core/Cartesian3.js";
2
+ import CesiumMath from "../Core/Math.js";
2
3
  import DynamicAtmosphereLightingType from "./DynamicAtmosphereLightingType.js";
3
4
 
4
5
  /**
@@ -124,4 +125,25 @@ function Atmosphere() {
124
125
  this.dynamicLighting = DynamicAtmosphereLightingType.NONE;
125
126
  }
126
127
 
128
+ /**
129
+ * Returns <code>true</code> if the atmosphere shader requires a color correct step.
130
+ * @param {Atmosphere} atmosphere The atmosphere instance to check
131
+ * @returns {boolean} true if the atmosphere shader requires a color correct step
132
+ */
133
+ Atmosphere.requiresColorCorrect = function (atmosphere) {
134
+ return !(
135
+ CesiumMath.equalsEpsilon(atmosphere.hueShift, 0.0, CesiumMath.EPSILON7) &&
136
+ CesiumMath.equalsEpsilon(
137
+ atmosphere.saturationShift,
138
+ 0.0,
139
+ CesiumMath.EPSILON7,
140
+ ) &&
141
+ CesiumMath.equalsEpsilon(
142
+ atmosphere.brightnessShift,
143
+ 0.0,
144
+ CesiumMath.EPSILON7,
145
+ )
146
+ );
147
+ };
148
+
127
149
  export default Atmosphere;
@@ -230,7 +230,7 @@ function BingMapsImageryProvider(options) {
230
230
 
231
231
  this._proxy = options.proxy;
232
232
  this._credit = new Credit(
233
- `<a href="https://www.microsoft.com/en-us/maps/product/enduserterms"><img src="${BingMapsImageryProvider.logoUrl}" title="Bing Imagery"/></a>`,
233
+ `<a href="https://www.microsoft.com/en-us/maps/bing-maps/product"><img src="${BingMapsImageryProvider.logoUrl}" title="Bing Imagery"/></a>`,
234
234
  );
235
235
 
236
236
  this._tilingScheme = new WebMercatorTilingScheme({
@@ -61,6 +61,7 @@ import Cesium3DTilesetMostDetailedTraversal from "./Cesium3DTilesetMostDetailedT
61
61
  import Cesium3DTilesetBaseTraversal from "./Cesium3DTilesetBaseTraversal.js";
62
62
  import Cesium3DTilesetSkipTraversal from "./Cesium3DTilesetSkipTraversal.js";
63
63
  import Ray from "../Core/Ray.js";
64
+ import DynamicEnvironmentMapManager from "./DynamicEnvironmentMapManager.js";
64
65
 
65
66
  /**
66
67
  * @typedef {Object} Cesium3DTileset.ConstructorOptions
@@ -104,6 +105,7 @@ import Ray from "../Core/Ray.js";
104
105
  * @property {object} [pointCloudShading] Options for constructing a {@link PointCloudShading} object to control point attenuation based on geometric error and lighting.
105
106
  * @property {Cartesian3} [lightColor] The light color when shading models. When <code>undefined</code> the scene's light color is used instead.
106
107
  * @property {ImageBasedLighting} [imageBasedLighting] The properties for managing image-based lighting for this tileset.
108
+ * @param {DynamicEnvironmentMapManager.ConstructorOptions} [options.environmentMapOptions] The properties for managing dynamic environment maps on this model.
107
109
  * @property {boolean} [backFaceCulling=true] Whether to cull back-facing geometry. When true, back face culling is determined by the glTF material's doubleSided property; when false, back face culling is disabled.
108
110
  * @property {boolean} [enableShowOutline=true] Whether to enable outlines for models using the {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension. This can be set to false to avoid the additional processing of geometry at load time. When false, the showOutlines and outlineColor options are ignored.
109
111
  * @property {boolean} [showOutline=true] Whether to display the outline for models using the {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension. When true, outlines are displayed. When false, outlines are not displayed.
@@ -827,6 +829,10 @@ function Cesium3DTileset(options) {
827
829
  this._shouldDestroyImageBasedLighting = true;
828
830
  }
829
831
 
832
+ this._environmentMapManager = new DynamicEnvironmentMapManager(
833
+ options.environmentMapOptions,
834
+ );
835
+
830
836
  /**
831
837
  * The light color when shading models. When <code>undefined</code> the scene's light color is used instead.
832
838
  * <p>
@@ -1859,6 +1865,25 @@ Object.defineProperties(Cesium3DTileset.prototype, {
1859
1865
  },
1860
1866
  },
1861
1867
 
1868
+ /**
1869
+ * The properties for managing dynamic environment maps on this model. Affects lighting.
1870
+ *
1871
+ * @memberof Cesium3DTileset.prototype
1872
+ * @readonly
1873
+ *
1874
+ * @example
1875
+ * // Change the ground color used for a tileset's environment map to a forest green
1876
+ * const environmentMapManager = tileset.environmentMapManager;
1877
+ * environmentMapManager.groundColor = Cesium.Color.fromCssColorString("#203b34");
1878
+ *
1879
+ * @type {DynamicEnvironmentMapManager}
1880
+ */
1881
+ environmentMapManager: {
1882
+ get: function () {
1883
+ return this._environmentMapManager;
1884
+ },
1885
+ },
1886
+
1862
1887
  /**
1863
1888
  * Indicates that only the tileset's vector tiles should be used for classification.
1864
1889
  *
@@ -2644,6 +2669,7 @@ function handleTileFailure(error, tileset, tile) {
2644
2669
  } else {
2645
2670
  console.log(`A 3D tile failed to load: ${url}`);
2646
2671
  console.log(`Error: ${message}`);
2672
+ console.log(error.stack);
2647
2673
  }
2648
2674
  }
2649
2675
 
@@ -3409,6 +3435,14 @@ Cesium3DTileset.prototype.updateForPass = function (
3409
3435
  originalCullingVolume,
3410
3436
  );
3411
3437
 
3438
+ if (passOptions.isRender) {
3439
+ const environmentMapManager = this._environmentMapManager;
3440
+ if (defined(this._root)) {
3441
+ environmentMapManager.position = this.boundingSphere.center;
3442
+ }
3443
+ environmentMapManager.update(frameState);
3444
+ }
3445
+
3412
3446
  // Update clipping polygons
3413
3447
  const clippingPolygons = this._clippingPolygons;
3414
3448
  if (defined(clippingPolygons) && clippingPolygons.enabled) {
@@ -3511,6 +3545,11 @@ Cesium3DTileset.prototype.destroy = function () {
3511
3545
  }
3512
3546
  this._imageBasedLighting = undefined;
3513
3547
 
3548
+ if (!this._environmentMapManager.isDestroyed()) {
3549
+ this._environmentMapManager.destroy();
3550
+ }
3551
+ this._environmentMapManager = undefined;
3552
+
3514
3553
  return destroyObject(this);
3515
3554
  };
3516
3555