@cesium/engine 9.1.0 → 10.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 (255) hide show
  1. package/Build/ThirdParty/Workers/pako_deflate.min.js +108 -210
  2. package/Build/ThirdParty/Workers/pako_inflate.min.js +466 -568
  3. package/Build/ThirdParty/Workers/z-worker-pako.js +54 -104
  4. package/Build/Workers/{chunk-TMMOULW3.js → chunk-2J3JKXCP.js} +5 -5
  5. package/Build/Workers/{chunk-ZDP32RQI.js → chunk-3WUV74WM.js} +95 -155
  6. package/Build/Workers/{chunk-FOZQIHZK.js → chunk-4BAE4PWO.js} +6 -6
  7. package/Build/Workers/{chunk-CYAJYEKW.js → chunk-4MSUJ4I7.js} +8 -8
  8. package/Build/Workers/{chunk-KPY4F4BW.js → chunk-4YSNMHZ4.js} +6 -6
  9. package/Build/Workers/{chunk-66E3H2KU.js → chunk-5S7OLEPK.js} +12 -12
  10. package/Build/Workers/{chunk-4AJGCQFX.js → chunk-7XGC6YB2.js} +14 -14
  11. package/Build/Workers/{chunk-BDUJXBVF.js → chunk-AA4GZKOT.js} +3 -5
  12. package/Build/Workers/{chunk-7LPEGKOF.js → chunk-AD5HBJ2F.js} +11 -8
  13. package/Build/Workers/{chunk-XHLDDE65.js → chunk-AVI4IUWC.js} +11 -11
  14. package/Build/Workers/{chunk-MWYZ64MH.js → chunk-BCL4PHHT.js} +10 -10
  15. package/Build/Workers/{chunk-PWF3YJJ5.js → chunk-BDFNKFOE.js} +13 -13
  16. package/Build/Workers/{chunk-7VZNXIKG.js → chunk-BJF5LOWE.js} +7 -7
  17. package/Build/Workers/{chunk-3S2MFY4B.js → chunk-C2CGMAIU.js} +13 -13
  18. package/Build/Workers/{chunk-UAJEGIWA.js → chunk-COYFZ5VA.js} +6 -6
  19. package/Build/Workers/{chunk-ZWPIM77Q.js → chunk-DGS5QNIO.js} +13 -13
  20. package/Build/Workers/{chunk-V7JB576Q.js → chunk-DKVHRNFY.js} +5 -5
  21. package/Build/Workers/{chunk-NI2R52QD.js → chunk-DOXCPOG4.js} +11 -9
  22. package/Build/Workers/{chunk-XWML5Y7N.js → chunk-FXIHSF7O.js} +9 -9
  23. package/Build/Workers/{chunk-LW7WGHEU.js → chunk-G3YR53LY.js} +13 -13
  24. package/Build/Workers/{chunk-34DGOKCO.js → chunk-GR3CDLCP.js} +7 -7
  25. package/Build/Workers/{chunk-AOIKO5Y7.js → chunk-GRAT5GE7.js} +5 -5
  26. package/Build/Workers/{chunk-AOFMPKUB.js → chunk-I2RC4XVN.js} +4 -4
  27. package/Build/Workers/{chunk-PK7TEP3J.js → chunk-JYAHOGGL.js} +15 -15
  28. package/Build/Workers/{chunk-4KIUON73.js → chunk-KUN2ZA5X.js} +4 -4
  29. package/Build/Workers/{chunk-POLFRINT.js → chunk-L6RTJ3RE.js} +14 -14
  30. package/Build/Workers/{chunk-LVJCR7DH.js → chunk-LCLJJ2MZ.js} +18 -18
  31. package/Build/Workers/{chunk-3RZK5NNV.js → chunk-LEABCTLP.js} +4 -4
  32. package/Build/Workers/{chunk-QKF7XXEQ.js → chunk-MDHQR3ZS.js} +10 -8
  33. package/Build/Workers/{chunk-4PHPQRSH.js → chunk-MSKXMXJI.js} +5 -6
  34. package/Build/Workers/{chunk-GIFJ77E4.js → chunk-NTXTUNEF.js} +4 -4
  35. package/Build/Workers/{chunk-I5TDPPC4.js → chunk-O3JCMSS3.js} +17 -17
  36. package/Build/Workers/{chunk-PEABJLCK.js → chunk-OOK53QUQ.js} +1 -1
  37. package/Build/Workers/{chunk-PS6AEMBR.js → chunk-OORVMGDU.js} +7 -7
  38. package/Build/Workers/{chunk-JI2445T5.js → chunk-PCP4YQST.js} +11 -11
  39. package/Build/Workers/{chunk-C5CE4OG6.js → chunk-PYHLO636.js} +42 -13
  40. package/Build/Workers/{chunk-S4XDCPKD.js → chunk-Q55ECN3Y.js} +1 -1
  41. package/Build/Workers/{chunk-WWP3I7R5.js → chunk-QD4KM3GO.js} +5 -5
  42. package/Build/Workers/{chunk-YLZTCEBJ.js → chunk-QMLTCCYG.js} +1 -1
  43. package/Build/Workers/{chunk-IBXGK4WV.js → chunk-QX5XS4LC.js} +2 -2
  44. package/Build/Workers/{chunk-RL73GOEF.js → chunk-R6B7UCQB.js} +2 -2
  45. package/Build/Workers/{chunk-RR7EOKGZ.js → chunk-RJYML24O.js} +48 -85
  46. package/Build/Workers/{chunk-U4IMCOF5.js → chunk-S3PI2KFM.js} +2 -2
  47. package/Build/Workers/{chunk-6HCAQOVK.js → chunk-STBBMQGG.js} +6 -6
  48. package/Build/Workers/{chunk-CE6GTZ4I.js → chunk-SYCPRK3D.js} +10 -10
  49. package/Build/Workers/{chunk-WFICTTOE.js → chunk-T77JILCU.js} +2 -2
  50. package/Build/Workers/{chunk-ZC4AGBZK.js → chunk-TO2PVHKI.js} +2 -2
  51. package/Build/Workers/{chunk-UCPPWV64.js → chunk-VE7BFUIX.js} +1 -1
  52. package/Build/Workers/{chunk-2CSEEWHN.js → chunk-VFBNELXB.js} +7 -7
  53. package/Build/Workers/{chunk-A6NCZSL3.js → chunk-VO3ACQB2.js} +19 -19
  54. package/Build/Workers/{chunk-WEGCQ5DY.js → chunk-X23FRWHJ.js} +6 -6
  55. package/Build/Workers/{chunk-G7CJQKKD.js → chunk-XD445VDH.js} +7 -7
  56. package/Build/Workers/combineGeometry.js +22 -22
  57. package/Build/Workers/createBoxGeometry.js +16 -16
  58. package/Build/Workers/createBoxOutlineGeometry.js +14 -14
  59. package/Build/Workers/createCircleGeometry.js +29 -25
  60. package/Build/Workers/createCircleOutlineGeometry.js +17 -17
  61. package/Build/Workers/createCoplanarPolygonGeometry.js +32 -32
  62. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
  63. package/Build/Workers/createCorridorGeometry.js +29 -29
  64. package/Build/Workers/createCorridorOutlineGeometry.js +27 -27
  65. package/Build/Workers/createCylinderGeometry.js +18 -18
  66. package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
  67. package/Build/Workers/createEllipseGeometry.js +24 -24
  68. package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
  69. package/Build/Workers/createEllipsoidGeometry.js +17 -17
  70. package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
  71. package/Build/Workers/createFrustumGeometry.js +16 -16
  72. package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
  73. package/Build/Workers/createGeometry.js +22 -22
  74. package/Build/Workers/createGroundPolylineGeometry.js +24 -24
  75. package/Build/Workers/createPlaneGeometry.js +14 -14
  76. package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
  77. package/Build/Workers/createPolygonGeometry.js +32 -32
  78. package/Build/Workers/createPolygonOutlineGeometry.js +29 -29
  79. package/Build/Workers/createPolylineGeometry.js +24 -24
  80. package/Build/Workers/createPolylineVolumeGeometry.js +30 -30
  81. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +26 -26
  82. package/Build/Workers/createRectangleGeometry.js +27 -27
  83. package/Build/Workers/createRectangleOutlineGeometry.js +19 -19
  84. package/Build/Workers/createSimplePolylineGeometry.js +22 -22
  85. package/Build/Workers/createSphereGeometry.js +17 -17
  86. package/Build/Workers/createSphereOutlineGeometry.js +16 -16
  87. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  88. package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
  89. package/Build/Workers/createVectorTileGeometries.js +22 -22
  90. package/Build/Workers/createVectorTilePoints.js +12 -12
  91. package/Build/Workers/createVectorTilePolygons.js +20 -20
  92. package/Build/Workers/createVectorTilePolylines.js +13 -13
  93. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
  94. package/Build/Workers/createVerticesFromHeightmap.js +21 -21
  95. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
  96. package/Build/Workers/createWallGeometry.js +23 -23
  97. package/Build/Workers/createWallOutlineGeometry.js +22 -22
  98. package/Build/Workers/decodeDraco.js +11 -11
  99. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +12 -19
  100. package/Build/Workers/decodeI3S.js +10 -10
  101. package/Build/Workers/transcodeKTX2.js +43 -79
  102. package/Build/Workers/transferTypedArrayTest.js +1 -1
  103. package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
  104. package/Source/Core/ApproximateTerrainHeights.js +4 -4
  105. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +12 -8
  106. package/Source/Core/BoundingRectangle.js +2 -0
  107. package/Source/Core/BoundingSphere.js +4 -2
  108. package/Source/Core/Cartesian3.js +13 -10
  109. package/Source/Core/Cartographic.js +11 -8
  110. package/Source/Core/CesiumTerrainProvider.js +3 -2
  111. package/Source/Core/CircleGeometry.js +6 -2
  112. package/Source/Core/CircleOutlineGeometry.js +1 -1
  113. package/Source/Core/CoplanarPolygonGeometry.js +3 -3
  114. package/Source/Core/CorridorGeometry.js +4 -4
  115. package/Source/Core/CorridorOutlineGeometry.js +2 -2
  116. package/Source/Core/Credit.js +3 -2
  117. package/Source/Core/CustomHeightmapTerrainProvider.js +17 -3
  118. package/Source/Core/EllipseGeometry.js +4 -4
  119. package/Source/Core/EllipseOutlineGeometry.js +2 -2
  120. package/Source/Core/Ellipsoid.js +34 -0
  121. package/Source/Core/EllipsoidGeodesic.js +2 -2
  122. package/Source/Core/EllipsoidRhumbLine.js +4 -4
  123. package/Source/Core/EllipsoidTangentPlane.js +3 -3
  124. package/Source/Core/EllipsoidTerrainProvider.js +3 -3
  125. package/Source/Core/GeographicProjection.js +4 -3
  126. package/Source/Core/GeographicTilingScheme.js +3 -3
  127. package/Source/Core/GeometryPipeline.js +2 -2
  128. package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -1
  129. package/Source/Core/GoogleMaps.js +1 -1
  130. package/Source/Core/GroundPolylineGeometry.js +1 -1
  131. package/Source/Core/HeightmapTessellator.js +2 -2
  132. package/Source/Core/Ion.js +1 -1
  133. package/Source/Core/Math.js +0 -5
  134. package/Source/Core/Occluder.js +3 -3
  135. package/Source/Core/OrientedBoundingBox.js +2 -2
  136. package/Source/Core/PolygonGeometry.js +4 -4
  137. package/Source/Core/PolygonGeometryLibrary.js +1 -1
  138. package/Source/Core/PolygonOutlineGeometry.js +3 -3
  139. package/Source/Core/PolygonPipeline.js +2 -2
  140. package/Source/Core/PolylineGeometry.js +2 -2
  141. package/Source/Core/PolylinePipeline.js +6 -6
  142. package/Source/Core/PolylineVolumeGeometry.js +2 -2
  143. package/Source/Core/PolylineVolumeOutlineGeometry.js +2 -2
  144. package/Source/Core/Rectangle.js +6 -6
  145. package/Source/Core/RectangleGeometry.js +6 -6
  146. package/Source/Core/RectangleGeometryLibrary.js +3 -0
  147. package/Source/Core/RectangleOutlineGeometry.js +2 -2
  148. package/Source/Core/Simon1994PlanetaryPositions.js +3 -2
  149. package/Source/Core/SimplePolylineGeometry.js +2 -2
  150. package/Source/Core/Stereographic.js +2 -2
  151. package/Source/Core/TaskProcessor.js +19 -3
  152. package/Source/Core/Transforms.js +17 -17
  153. package/Source/Core/VRTheWorldTerrainProvider.js +2 -2
  154. package/Source/Core/WallGeometry.js +3 -3
  155. package/Source/Core/WallOutlineGeometry.js +3 -3
  156. package/Source/Core/WebMercatorTilingScheme.js +3 -3
  157. package/Source/Core/createWorldTerrainAsync.js +2 -0
  158. package/Source/Core/sampleTerrain.js +3 -3
  159. package/Source/DataSources/BoxGeometryUpdater.js +2 -2
  160. package/Source/DataSources/CylinderGeometryUpdater.js +2 -2
  161. package/Source/DataSources/CzmlDataSource.js +8 -8
  162. package/Source/DataSources/EllipsoidGeometryUpdater.js +3 -3
  163. package/Source/DataSources/EntityCluster.js +1 -1
  164. package/Source/DataSources/EntityView.js +2 -2
  165. package/Source/DataSources/KmlDataSource.js +4 -4
  166. package/Source/DataSources/ModelVisualizer.js +1 -2
  167. package/Source/DataSources/PolygonGeometryUpdater.js +1 -1
  168. package/Source/DataSources/PolylineGeometryUpdater.js +3 -2
  169. package/Source/DataSources/RectangleGeometryUpdater.js +1 -1
  170. package/Source/DataSources/ScaledPositionProperty.js +2 -2
  171. package/Source/DataSources/TerrainOffsetProperty.js +3 -7
  172. package/Source/DataSources/VelocityOrientationProperty.js +2 -2
  173. package/Source/DataSources/exportKml.js +2 -2
  174. package/Source/Renderer/UniformState.js +1 -1
  175. package/Source/Scene/ArcGisMapServerImageryProvider.js +2 -2
  176. package/Source/Scene/ArcGisMapService.js +1 -1
  177. package/Source/Scene/Billboard.js +8 -6
  178. package/Source/Scene/BingMapsImageryProvider.js +1 -1
  179. package/Source/Scene/Camera.js +16 -10
  180. package/Source/Scene/Cesium3DTileset.js +1 -1
  181. package/Source/Scene/ClippingPolygon.js +2 -2
  182. package/Source/Scene/ClippingPolygonCollection.js +1 -1
  183. package/Source/Scene/CreditDisplay.js +94 -104
  184. package/Source/Scene/Globe.js +16 -13
  185. package/Source/Scene/GltfLoader.js +458 -435
  186. package/Source/Scene/GltfLoaderUtil.js +5 -16
  187. package/Source/Scene/GltfPipeline/forEachTextureInMaterial.js +23 -7
  188. package/Source/Scene/GltfStructuralMetadataLoader.js +11 -9
  189. package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +1 -1
  190. package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +1 -1
  191. package/Source/Scene/GridImageryProvider.js +2 -2
  192. package/Source/Scene/ImageryLayerCollection.js +2 -2
  193. package/Source/Scene/Label.js +1 -1
  194. package/Source/Scene/MapboxImageryProvider.js +1 -1
  195. package/Source/Scene/MapboxStyleImageryProvider.js +1 -1
  196. package/Source/Scene/MetadataSemantic.js +4 -4
  197. package/Source/Scene/Model/AlphaPipelineStage.js +1 -1
  198. package/Source/Scene/Model/GeometryPipelineStage.js +15 -43
  199. package/Source/Scene/Model/ImageBasedLightingPipelineStage.js +7 -0
  200. package/Source/Scene/Model/InstancingPipelineStage.js +3 -3
  201. package/Source/Scene/Model/LightingPipelineStage.js +2 -4
  202. package/Source/Scene/Model/MaterialPipelineStage.js +395 -29
  203. package/Source/Scene/Model/Model.js +15 -7
  204. package/Source/Scene/Model/ModelSceneGraph.js +1 -1
  205. package/Source/Scene/Model/ModelUtility.js +3 -0
  206. package/Source/Scene/Model/SceneMode2DPipelineStage.js +3 -3
  207. package/Source/Scene/Model/VerticalExaggerationPipelineStage.js +4 -6
  208. package/Source/Scene/Model/pickModel.js +2 -2
  209. package/Source/Scene/ModelComponents.js +178 -1
  210. package/Source/Scene/PickDepth.js +23 -15
  211. package/Source/Scene/Picking.js +4 -13
  212. package/Source/Scene/PointPrimitive.js +5 -2
  213. package/Source/Scene/ResourceCache.js +41 -50
  214. package/Source/Scene/ResourceCacheKey.js +41 -53
  215. package/Source/Scene/Scene.js +39 -31
  216. package/Source/Scene/SceneTransforms.js +78 -20
  217. package/Source/Scene/SceneTransitioner.js +2 -2
  218. package/Source/Scene/ScreenSpaceCameraController.js +29 -19
  219. package/Source/Scene/SkyBox.js +26 -0
  220. package/Source/Scene/Sun.js +1 -1
  221. package/Source/Shaders/Builtin/CzmBuiltins.js +4 -10
  222. package/Source/Shaders/Builtin/Functions/ellipsoidTextureCoordinates.glsl +10 -0
  223. package/Source/Shaders/Builtin/Functions/{ellipsoidWgs84TextureCoordinates.js → ellipsoidTextureCoordinates.js} +3 -3
  224. package/Source/Shaders/Builtin/Functions/maximumComponent.glsl +21 -0
  225. package/Source/Shaders/Builtin/Functions/maximumComponent.js +23 -0
  226. package/Source/Shaders/Builtin/Functions/pbrLighting.glsl +108 -44
  227. package/Source/Shaders/Builtin/Functions/pbrLighting.js +108 -44
  228. package/Source/Shaders/Builtin/Structs/materialInput.glsl +1 -1
  229. package/Source/Shaders/Builtin/Structs/materialInput.js +1 -1
  230. package/Source/Shaders/Builtin/Structs/modelMaterial.glsl +16 -0
  231. package/Source/Shaders/Builtin/Structs/modelMaterial.js +16 -0
  232. package/Source/Shaders/EllipsoidFS.glsl +1 -1
  233. package/Source/Shaders/EllipsoidFS.js +1 -1
  234. package/Source/Shaders/GlobeFS.glsl +3 -3
  235. package/Source/Shaders/GlobeFS.js +3 -3
  236. package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +211 -133
  237. package/Source/Shaders/Model/ImageBasedLightingStageFS.js +212 -133
  238. package/Source/Shaders/Model/LightingStageFS.glsl +113 -48
  239. package/Source/Shaders/Model/LightingStageFS.js +113 -48
  240. package/Source/Shaders/Model/MaterialStageFS.glsl +407 -136
  241. package/Source/Shaders/Model/MaterialStageFS.js +407 -136
  242. package/Source/Widget/CesiumWidget.css +0 -5
  243. package/Source/Widget/CesiumWidget.js +29 -28
  244. package/index.d.ts +184 -116
  245. package/index.js +92 -95
  246. package/package.json +2 -2
  247. package/Source/Shaders/Builtin/Functions/defaultPbrMaterial.glsl +0 -16
  248. package/Source/Shaders/Builtin/Functions/defaultPbrMaterial.js +0 -18
  249. package/Source/Shaders/Builtin/Functions/ellipsoidWgs84TextureCoordinates.glsl +0 -10
  250. package/Source/Shaders/Builtin/Functions/pbrMetallicRoughnessMaterial.glsl +0 -37
  251. package/Source/Shaders/Builtin/Functions/pbrMetallicRoughnessMaterial.js +0 -39
  252. package/Source/Shaders/Builtin/Functions/pbrSpecularGlossinessMaterial.glsl +0 -30
  253. package/Source/Shaders/Builtin/Functions/pbrSpecularGlossinessMaterial.js +0 -32
  254. package/Source/Shaders/Builtin/Structs/pbrParameters.glsl +0 -16
  255. package/Source/Shaders/Builtin/Structs/pbrParameters.js +0 -18
@@ -1436,7 +1436,7 @@ const scratchHpr = new HeadingPitchRoll();
1436
1436
  * Sets the camera position, orientation and transform.
1437
1437
  *
1438
1438
  * @param {object} options Object with the following properties:
1439
- * @param {Cartesian3|Rectangle} [options.destination] The final position of the camera in WGS84 (world) coordinates or a rectangle that would be visible from a top-down view.
1439
+ * @param {Cartesian3|Rectangle} [options.destination] The final position of the camera in world coordinates or a rectangle that would be visible from a top-down view.
1440
1440
  * @param {HeadingPitchRollValues|DirectionUp} [options.orientation] An object that contains either direction and up properties or heading, pitch and roll properties. By default, the direction will point
1441
1441
  * towards the center of the frame in 3D and in the negative z direction in Columbus view. The up direction will point towards local north in 3D and in the positive
1442
1442
  * y direction in Columbus view. Orientation is not used in 2D when in infinite scrolling mode.
@@ -2343,9 +2343,12 @@ Camera.prototype.lookAt = function (target, offset) {
2343
2343
  }
2344
2344
  //>>includeEnd('debug');
2345
2345
 
2346
+ const scene = this._scene;
2347
+ const ellipsoid = defaultValue(scene.ellipsoid, Ellipsoid.default);
2348
+
2346
2349
  const transform = Transforms.eastNorthUpToFixedFrame(
2347
2350
  target,
2348
- Ellipsoid.WGS84,
2351
+ ellipsoid,
2349
2352
  scratchLookAtMatrix4
2350
2353
  );
2351
2354
  this.lookAtTransform(transform, offset);
@@ -2841,7 +2844,7 @@ Camera.prototype.getRectangleCameraCoordinates = function (rectangle, result) {
2841
2844
 
2842
2845
  const pickEllipsoid3DRay = new Ray();
2843
2846
  function pickEllipsoid3D(camera, windowPosition, ellipsoid, result) {
2844
- ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
2847
+ ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
2845
2848
  const ray = camera.getPickRay(windowPosition, pickEllipsoid3DRay);
2846
2849
  const intersection = IntersectionTests.rayEllipsoid(ray, ellipsoid);
2847
2850
  if (!intersection) {
@@ -2893,7 +2896,7 @@ function pickMapColumbusView(camera, windowPosition, projection, result) {
2893
2896
  * Pick an ellipsoid or map.
2894
2897
  *
2895
2898
  * @param {Cartesian2} windowPosition The x and y coordinates of a pixel.
2896
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to pick.
2899
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to pick.
2897
2900
  * @param {Cartesian3} [result] The object onto which to store the result.
2898
2901
  * @returns {Cartesian3 | undefined} If the ellipsoid or map was picked,
2899
2902
  * returns the point on the surface of the ellipsoid or map in world
@@ -2902,7 +2905,7 @@ function pickMapColumbusView(camera, windowPosition, projection, result) {
2902
2905
  * @example
2903
2906
  * const canvas = viewer.scene.canvas;
2904
2907
  * const center = new Cesium.Cartesian2(canvas.clientWidth / 2.0, canvas.clientHeight / 2.0);
2905
- * const ellipsoid = viewer.scene.globe.ellipsoid;
2908
+ * const ellipsoid = viewer.scene.ellipsoid;
2906
2909
  * const result = viewer.camera.pickEllipsoid(center, ellipsoid);
2907
2910
  */
2908
2911
  Camera.prototype.pickEllipsoid = function (windowPosition, ellipsoid, result) {
@@ -2921,7 +2924,7 @@ Camera.prototype.pickEllipsoid = function (windowPosition, ellipsoid, result) {
2921
2924
  result = new Cartesian3();
2922
2925
  }
2923
2926
 
2924
- ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
2927
+ ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
2925
2928
 
2926
2929
  if (this._mode === SceneMode.SCENE3D) {
2927
2930
  result = pickEllipsoid3D(this, windowPosition, ellipsoid, result);
@@ -3316,7 +3319,7 @@ Camera.prototype.completeFlight = function () {
3316
3319
  * Flies the camera from its current position to a new position.
3317
3320
  *
3318
3321
  * @param {object} options Object with the following properties:
3319
- * @param {Cartesian3|Rectangle} options.destination The final position of the camera in WGS84 (world) coordinates or a rectangle that would be visible from a top-down view.
3322
+ * @param {Cartesian3|Rectangle} options.destination The final position of the camera in world coordinates or a rectangle that would be visible from a top-down view.
3320
3323
  * @param {object} [options.orientation] An object that contains either direction and up properties or heading, pitch and roll properties. By default, the direction will point
3321
3324
  * towards the center of the frame in 3D and in the negative z direction in Columbus view. The up direction will point towards local north in 3D and in the positive
3322
3325
  * y direction in Columbus view. Orientation is not used in 2D when in infinite scrolling mode.
@@ -3632,9 +3635,12 @@ Camera.prototype.flyToBoundingSphere = function (boundingSphere, options) {
3632
3635
  );
3633
3636
  }
3634
3637
 
3638
+ const scene = this._scene;
3639
+ const ellipsoid = defaultValue(scene.ellipsoid, Ellipsoid.default);
3640
+
3635
3641
  const transform = Transforms.eastNorthUpToFixedFrame(
3636
3642
  boundingSphere.center,
3637
- Ellipsoid.WGS84,
3643
+ ellipsoid,
3638
3644
  scratchflyToBoundingSphereTransform
3639
3645
  );
3640
3646
  Matrix4.multiplyByPoint(transform, position, position);
@@ -3814,13 +3820,13 @@ function addToResult(x, y, index, camera, ellipsoid, computedHorizonQuad) {
3814
3820
  /**
3815
3821
  * Computes the approximate visible rectangle on the ellipsoid.
3816
3822
  *
3817
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid that you want to know the visible region.
3823
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid that you want to know the visible region.
3818
3824
  * @param {Rectangle} [result] The rectangle in which to store the result
3819
3825
  *
3820
3826
  * @returns {Rectangle|undefined} The visible rectangle or undefined if the ellipsoid isn't visible at all.
3821
3827
  */
3822
3828
  Camera.prototype.computeViewRectangle = function (ellipsoid, result) {
3823
- ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
3829
+ ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
3824
3830
  const cullingVolume = this.frustum.computeCullingVolume(
3825
3831
  this.positionWC,
3826
3832
  this.directionWC,
@@ -3568,7 +3568,7 @@ Cesium3DTileset.prototype.getHeight = function (cartographic, scene) {
3568
3568
  Check.typeOf.object("scene", scene);
3569
3569
  //>>includeEnd('debug');
3570
3570
 
3571
- let ellipsoid = scene.globe?.ellipsoid;
3571
+ let ellipsoid = scene.ellipsoid;
3572
3572
  if (!defined(ellipsoid)) {
3573
3573
  ellipsoid = Ellipsoid.WGS84;
3574
3574
  }
@@ -15,7 +15,7 @@ import Rectangle from "../Core/Rectangle.js";
15
15
  *
16
16
  * @param {object} options Object with the following properties:
17
17
  * @param {Cartesian3[]} options.positions A list of three or more Cartesian coordinates defining the outer ring of the clipping polygon.
18
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84]
18
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default]
19
19
  *
20
20
  * @example
21
21
  * const positions = Cesium.Cartesian3.fromRadiansArray([
@@ -46,7 +46,7 @@ function ClippingPolygon(options) {
46
46
  );
47
47
  //>>includeEnd('debug');
48
48
 
49
- this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
49
+ this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
50
50
  this._positions = [...options.positions];
51
51
  }
52
52
 
@@ -737,7 +737,7 @@ const scratchRectangleIntersection = new Rectangle();
737
737
  * @private
738
738
  *
739
739
  * @param {object} tileBoundingVolume The volume to determine the intersection with the polygons.
740
- * @param {Ellipsoid} [ellipsoid=WGS84] The ellipsoid on which the bounding volumes are defined.
740
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the bounding volumes are defined.
741
741
  * @returns {Intersect} The intersection type: {@link Intersect.OUTSIDE} if the entire volume is not clipped, {@link Intersect.INSIDE}
742
742
  * if the entire volume should be clipped, and {@link Intersect.INTERSECTING} if the volume intersects the polygons and will partially clipped.
743
743
  */
@@ -163,112 +163,102 @@ function styleLightboxContainer(that) {
163
163
  }
164
164
  }
165
165
 
166
- function addStyle(selector, styles) {
167
- let style = `${selector} {`;
168
- for (const attribute in styles) {
169
- if (styles.hasOwnProperty(attribute)) {
170
- style += `${attribute}: ${styles[attribute]}; `;
171
- }
172
- }
173
- style += " }\n";
174
- return style;
175
- }
176
-
177
166
  function appendCss(container) {
178
- let style = "";
179
- style += addStyle(".cesium-credit-lightbox-overlay", {
180
- display: "none",
181
- "z-index": "1", //must be at least 1 to draw over top other Cesium widgets
182
- position: "absolute",
183
- top: "0",
184
- left: "0",
185
- width: "100%",
186
- height: "100%",
187
- "background-color": "rgba(80, 80, 80, 0.8)",
188
- });
189
-
190
- style += addStyle(".cesium-credit-lightbox", {
191
- "background-color": "#303336",
192
- color: textColor,
193
- position: "relative",
194
- "min-height": `${lightboxHeight}px`,
195
- margin: "auto",
196
- });
197
-
198
- style += addStyle(
199
- ".cesium-credit-lightbox > ul > li a, .cesium-credit-lightbox > ul > li a:visited",
200
- {
201
- color: textColor,
202
- }
203
- );
204
-
205
- style += addStyle(".cesium-credit-lightbox > ul > li a:hover", {
206
- color: highlightColor,
207
- });
208
-
209
- style += addStyle(".cesium-credit-lightbox.cesium-credit-lightbox-expanded", {
210
- border: "1px solid #444",
211
- "border-radius": "5px",
212
- "max-width": "370px",
213
- });
214
-
215
- style += addStyle(".cesium-credit-lightbox.cesium-credit-lightbox-mobile", {
216
- height: "100%",
217
- width: "100%",
218
- });
219
-
220
- style += addStyle(".cesium-credit-lightbox-title", {
221
- padding: "20px 20px 0 20px",
222
- });
223
-
224
- style += addStyle(".cesium-credit-lightbox-close", {
225
- "font-size": "18pt",
226
- cursor: "pointer",
227
- position: "absolute",
228
- top: "0",
229
- right: "6px",
230
- color: textColor,
231
- });
167
+ const style = /*css*/ `
168
+ .cesium-credit-lightbox-overlay {
169
+ display: none;
170
+ z-index: 1;
171
+ position: absolute;
172
+ top: 0;
173
+ left: 0;
174
+ width: 100%;
175
+ height: 100%;
176
+ background-color: rgba(80, 80, 80, 0.8);
177
+ }
232
178
 
233
- style += addStyle(".cesium-credit-lightbox-close:hover", {
234
- color: highlightColor,
235
- });
179
+ .cesium-credit-lightbox {
180
+ background-color: #303336;
181
+ color: ${textColor};
182
+ position: relative;
183
+ min-height: ${lightboxHeight}px;
184
+ margin: auto;
185
+ }
186
+ .cesium-credit-lightbox > ul > li a,
187
+ .cesium-credit-lightbox > ul > li a:visited,
188
+ .cesium-credit-wrapper a,
189
+ .cesium-credit-wrapper a:visited {
190
+ color: ${textColor};
191
+ }
192
+ .cesium-credit-lightbox > ul > li a:hover {
193
+ color: ${highlightColor};
194
+ }
195
+ .cesium-credit-lightbox.cesium-credit-lightbox-expanded {
196
+ border: 1px solid #444;
197
+ border-radius: 5px;
198
+ max-width: 370px;
199
+ }
200
+ .cesium-credit-lightbox.cesium-credit-lightbox-mobile {
201
+ height: 100%;
202
+ width: 100%;
203
+ }
204
+ .cesium-credit-lightbox-title {
205
+ padding: 20px 20px 0 20px;
206
+ }
207
+ .cesium-credit-lightbox-close {
208
+ font-size: 18pt;
209
+ cursor: pointer;
210
+ position: absolute;
211
+ top: 0;
212
+ right: 6px;
213
+ color: ${textColor};
214
+ }
215
+ .cesium-credit-lightbox-close:hover {
216
+ color: ${highlightColor};
217
+ }
218
+ .cesium-credit-lightbox > ul {
219
+ margin: 0;
220
+ padding: 12px 20px 12px 40px;
221
+ font-size: 13px;
222
+ }
223
+ .cesium-credit-lightbox > ul > li {
224
+ padding-bottom: 6px;
225
+ }
226
+ .cesium-credit-lightbox > ul > li * {
227
+ padding: 0;
228
+ margin: 0;
229
+ }
236
230
 
237
- style += addStyle(".cesium-credit-lightbox > ul", {
238
- margin: "0",
239
- padding: "12px 20px 12px 40px",
240
- "font-size": "13px",
241
- });
231
+ .cesium-credit-expand-link {
232
+ padding-left: 5px;
233
+ cursor: pointer;
234
+ text-decoration: underline;
235
+ color: ${textColor};
236
+ }
237
+ .cesium-credit-expand-link:hover {
238
+ color: ${highlightColor};
239
+ }
242
240
 
243
- style += addStyle(".cesium-credit-lightbox > ul > li", {
244
- "padding-bottom": "6px",
245
- });
241
+ .cesium-credit-text {
242
+ color: ${textColor};
243
+ }
246
244
 
247
- style += addStyle(".cesium-credit-lightbox > ul > li *", {
248
- padding: "0",
249
- margin: "0",
250
- });
245
+ .cesium-credit-delimiter {
246
+ padding: 0 5px;
247
+ }
251
248
 
252
- style += addStyle(".cesium-credit-expand-link", {
253
- "padding-left": "5px",
254
- cursor: "pointer",
255
- "text-decoration": "underline",
256
- color: textColor,
257
- });
258
- style += addStyle(".cesium-credit-expand-link:hover", {
259
- color: highlightColor,
260
- });
249
+ .cesium-credit-textContainer *,
250
+ .cesium-credit-logoContainer * {
251
+ display: inline;
252
+ }
261
253
 
262
- style += addStyle(".cesium-credit-text", {
263
- color: textColor,
264
- });
254
+ .cesium-credit-textContainer a:hover {
255
+ color: ${highlightColor}
256
+ }
265
257
 
266
- style += addStyle(
267
- ".cesium-credit-textContainer *, .cesium-credit-logoContainer *",
268
- {
269
- display: "inline",
270
- }
271
- );
258
+ .cesium-credit-textContainer .cesium-credit-wrapper:first-of-type {
259
+ padding-left: 5px;
260
+ }
261
+ `;
272
262
 
273
263
  function getShadowRoot(container) {
274
264
  if (container.shadowRoot) {
@@ -287,16 +277,16 @@ function appendCss(container) {
287
277
  getShadowRoot(container),
288
278
  document.head
289
279
  );
290
- const css = document.createElement("style");
291
- css.innerHTML = style;
292
- shadowRootOrDocumentHead.appendChild(css);
280
+ const styleElem = document.createElement("style");
281
+ styleElem.innerHTML = style;
282
+ shadowRootOrDocumentHead.appendChild(styleElem);
293
283
  }
294
284
 
295
285
  /**
296
286
  * The credit display is responsible for displaying credits on screen.
297
287
  *
298
288
  * @param {HTMLElement} container The HTML element where credits will be displayed
299
- * @param {string} [delimiter= ' '] The string to separate text credits
289
+ * @param {string} [delimiter= '•'] The string to separate text credits
300
290
  * @param {HTMLElement} [viewport=document.body] The HTML element that will contain the credits popup
301
291
  *
302
292
  * @alias CreditDisplay
@@ -369,7 +359,7 @@ function CreditDisplay(container, delimiter, viewport) {
369
359
  appendCss(container);
370
360
  const cesiumCredit = Credit.clone(CreditDisplay.cesiumCredit);
371
361
 
372
- this._delimiter = defaultValue(delimiter, " ");
362
+ this._delimiter = defaultValue(delimiter, "•");
373
363
  this._screenContainer = screenContainer;
374
364
  this._cesiumCreditContainer = cesiumCreditContainer;
375
365
  this._lastViewportHeight = undefined;
@@ -634,7 +624,7 @@ function getDefaultCredit() {
634
624
  }
635
625
 
636
626
  defaultCredit = new Credit(
637
- `<a href="https://cesium.com/" target="_blank"><img src="${logo}" title="Cesium ion"/></a>`,
627
+ `<a href="https://cesium.com/" target="_blank"><img src="${logo}" style="vertical-align: -7px" title="Cesium ion"/></a>`,
638
628
  true
639
629
  );
640
630
  }
@@ -28,6 +28,7 @@ import ImageryLayerCollection from "./ImageryLayerCollection.js";
28
28
  import QuadtreePrimitive from "./QuadtreePrimitive.js";
29
29
  import SceneMode from "./SceneMode.js";
30
30
  import ShadowMode from "./ShadowMode.js";
31
+ import CesiumMath from "../Core/Math.js";
31
32
 
32
33
  /**
33
34
  * The globe rendered in the scene, including its terrain ({@link Globe#terrainProvider})
@@ -36,11 +37,11 @@ import ShadowMode from "./ShadowMode.js";
36
37
  * @alias Globe
37
38
  * @constructor
38
39
  *
39
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] Determines the size and shape of the
40
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] Determines the size and shape of the
40
41
  * globe.
41
42
  */
42
43
  function Globe(ellipsoid) {
43
- ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
44
+ ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
44
45
  const terrainProvider = new EllipsoidTerrainProvider({
45
46
  ellipsoid: ellipsoid,
46
47
  });
@@ -191,9 +192,9 @@ function Globe(ellipsoid) {
191
192
  * Enable the ground atmosphere, which is drawn over the globe when viewed from a distance between <code>lightingFadeInDistance</code> and <code>lightingFadeOutDistance</code>.
192
193
  *
193
194
  * @type {boolean}
194
- * @default true
195
+ * @default true when using the WGS84 ellipsoid, false otherwise
195
196
  */
196
- this.showGroundAtmosphere = true;
197
+ this.showGroundAtmosphere = Ellipsoid.WGS84.equals(ellipsoid);
197
198
 
198
199
  /**
199
200
  * The intensity of the light that is used for computing the ground atmosphere color.
@@ -250,18 +251,19 @@ function Globe(ellipsoid) {
250
251
  * when <code>enableLighting</code> or <code>showGroundAtmosphere</code> is <code>true</code>.
251
252
  *
252
253
  * @type {number}
253
- * @default 10000000.0
254
+ * @default 1/2 * pi * ellipsoid.minimumRadius
254
255
  */
255
- this.lightingFadeOutDistance = 1.0e7;
256
+ this.lightingFadeOutDistance =
257
+ CesiumMath.PI_OVER_TWO * ellipsoid.minimumRadius;
256
258
 
257
259
  /**
258
260
  * The distance where lighting resumes. This only takes effect
259
261
  * when <code>enableLighting</code> or <code>showGroundAtmosphere</code> is <code>true</code>.
260
262
  *
261
263
  * @type {number}
262
- * @default 20000000.0
264
+ * @default pi * ellipsoid.minimumRadius
263
265
  */
264
- this.lightingFadeInDistance = 2.0e7;
266
+ this.lightingFadeInDistance = CesiumMath.PI * ellipsoid.minimumRadius;
265
267
 
266
268
  /**
267
269
  * The distance where the darkness of night from the ground atmosphere fades out to a lit ground atmosphere.
@@ -269,9 +271,9 @@ function Globe(ellipsoid) {
269
271
  * <code>dynamicAtmosphereLighting</code> are <code>true</code>.
270
272
  *
271
273
  * @type {number}
272
- * @default 10000000.0
274
+ * @default 1/2 * pi * ellipsoid.minimumRadius
273
275
  */
274
- this.nightFadeOutDistance = 1.0e7;
276
+ this.nightFadeOutDistance = CesiumMath.PI_OVER_TWO * ellipsoid.minimumRadius;
275
277
 
276
278
  /**
277
279
  * The distance where the darkness of night from the ground atmosphere fades in to an unlit ground atmosphere.
@@ -279,9 +281,10 @@ function Globe(ellipsoid) {
279
281
  * <code>dynamicAtmosphereLighting</code> are <code>true</code>.
280
282
  *
281
283
  * @type {number}
282
- * @default 50000000.0
284
+ * @default 5/2 * pi * ellipsoid.minimumRadius
283
285
  */
284
- this.nightFadeInDistance = 5.0e7;
286
+ this.nightFadeInDistance =
287
+ 5.0 * CesiumMath.PI_OVER_TWO * ellipsoid.minimumRadius;
285
288
 
286
289
  /**
287
290
  * True if an animated wave effect should be shown in areas of the globe
@@ -809,7 +812,7 @@ Globe.prototype.pick = function (ray, scene, result) {
809
812
  if (defined(result) && scene.mode !== SceneMode.SCENE3D) {
810
813
  result = Cartesian3.fromElements(result.y, result.z, result.x, result);
811
814
  const carto = scene.mapProjection.unproject(result, cartoScratch);
812
- result = scene.globe.ellipsoid.cartographicToCartesian(carto, result);
815
+ result = this._ellipsoid.cartographicToCartesian(carto, result);
813
816
  }
814
817
 
815
818
  return result;