@cesium/engine 9.2.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 (220) hide show
  1. package/Build/Workers/{chunk-WOYQB5HM.js → chunk-2J3JKXCP.js} +5 -5
  2. package/Build/Workers/{chunk-IXYFH7DV.js → chunk-3WUV74WM.js} +2 -2
  3. package/Build/Workers/{chunk-3PV5HQ2R.js → chunk-4BAE4PWO.js} +6 -6
  4. package/Build/Workers/{chunk-WHDEZSAL.js → chunk-4MSUJ4I7.js} +8 -8
  5. package/Build/Workers/{chunk-ZHJDE6JN.js → chunk-4YSNMHZ4.js} +6 -6
  6. package/Build/Workers/{chunk-LZFFO4KB.js → chunk-5S7OLEPK.js} +12 -12
  7. package/Build/Workers/{chunk-GX2BWBN2.js → chunk-7XGC6YB2.js} +14 -14
  8. package/Build/Workers/{chunk-IF2OX6R4.js → chunk-AA4GZKOT.js} +1 -1
  9. package/Build/Workers/{chunk-26NE4LRW.js → chunk-AD5HBJ2F.js} +11 -8
  10. package/Build/Workers/{chunk-4RG6WOXH.js → chunk-AVI4IUWC.js} +11 -11
  11. package/Build/Workers/{chunk-3VDHTBY5.js → chunk-BCL4PHHT.js} +10 -10
  12. package/Build/Workers/{chunk-WP3LCUOE.js → chunk-BDFNKFOE.js} +13 -13
  13. package/Build/Workers/{chunk-KTZK2UDR.js → chunk-BJF5LOWE.js} +7 -7
  14. package/Build/Workers/{chunk-W4OS542B.js → chunk-C2CGMAIU.js} +13 -13
  15. package/Build/Workers/{chunk-EJZVBTX4.js → chunk-COYFZ5VA.js} +6 -6
  16. package/Build/Workers/{chunk-PHT53MCH.js → chunk-DGS5QNIO.js} +13 -13
  17. package/Build/Workers/{chunk-UYKG3UFK.js → chunk-DKVHRNFY.js} +5 -5
  18. package/Build/Workers/{chunk-7PFZ4Z7C.js → chunk-DOXCPOG4.js} +11 -9
  19. package/Build/Workers/{chunk-A5CSB5ZE.js → chunk-FXIHSF7O.js} +9 -9
  20. package/Build/Workers/{chunk-GOQEANLM.js → chunk-G3YR53LY.js} +13 -13
  21. package/Build/Workers/{chunk-7HLZRYGD.js → chunk-GR3CDLCP.js} +7 -7
  22. package/Build/Workers/{chunk-YGNQJ4YI.js → chunk-GRAT5GE7.js} +5 -5
  23. package/Build/Workers/{chunk-SC3TBKST.js → chunk-I2RC4XVN.js} +4 -4
  24. package/Build/Workers/{chunk-26XJDV3D.js → chunk-JYAHOGGL.js} +15 -15
  25. package/Build/Workers/{chunk-RRUO4QEK.js → chunk-KUN2ZA5X.js} +4 -4
  26. package/Build/Workers/{chunk-BBBTT36L.js → chunk-L6RTJ3RE.js} +14 -14
  27. package/Build/Workers/{chunk-RDR4KVPA.js → chunk-LCLJJ2MZ.js} +18 -18
  28. package/Build/Workers/{chunk-BNT2SNWU.js → chunk-LEABCTLP.js} +4 -4
  29. package/Build/Workers/{chunk-I6CW7ZE5.js → chunk-MDHQR3ZS.js} +10 -8
  30. package/Build/Workers/{chunk-ETC45PHH.js → chunk-MSKXMXJI.js} +4 -4
  31. package/Build/Workers/{chunk-QZIWFSRM.js → chunk-NTXTUNEF.js} +4 -4
  32. package/Build/Workers/{chunk-GUFV24F4.js → chunk-O3JCMSS3.js} +17 -17
  33. package/Build/Workers/{chunk-UICVDDCQ.js → chunk-OOK53QUQ.js} +1 -1
  34. package/Build/Workers/{chunk-G7IAO7CW.js → chunk-OORVMGDU.js} +7 -7
  35. package/Build/Workers/{chunk-OYP23VAL.js → chunk-PCP4YQST.js} +11 -11
  36. package/Build/Workers/{chunk-GX5LMUGZ.js → chunk-PYHLO636.js} +42 -13
  37. package/Build/Workers/{chunk-TDIGL45B.js → chunk-Q55ECN3Y.js} +1 -1
  38. package/Build/Workers/{chunk-5OK5JFDP.js → chunk-QD4KM3GO.js} +5 -5
  39. package/Build/Workers/{chunk-CVCVMOQA.js → chunk-QMLTCCYG.js} +1 -1
  40. package/Build/Workers/{chunk-AROLUUGS.js → chunk-QX5XS4LC.js} +2 -2
  41. package/Build/Workers/{chunk-TP4FFUAH.js → chunk-R6B7UCQB.js} +2 -2
  42. package/Build/Workers/{chunk-U6MTSO6A.js → chunk-RJYML24O.js} +11 -11
  43. package/Build/Workers/{chunk-DIVFF6DK.js → chunk-S3PI2KFM.js} +2 -2
  44. package/Build/Workers/{chunk-PUQR43HZ.js → chunk-STBBMQGG.js} +6 -6
  45. package/Build/Workers/{chunk-CFBGPZU6.js → chunk-SYCPRK3D.js} +10 -10
  46. package/Build/Workers/{chunk-U2LSTOMA.js → chunk-T77JILCU.js} +2 -2
  47. package/Build/Workers/{chunk-RTIT7UDN.js → chunk-TO2PVHKI.js} +2 -2
  48. package/Build/Workers/{chunk-EODIOQ35.js → chunk-VE7BFUIX.js} +1 -1
  49. package/Build/Workers/{chunk-K5F23SZO.js → chunk-VFBNELXB.js} +7 -7
  50. package/Build/Workers/{chunk-YGTWKLFY.js → chunk-VO3ACQB2.js} +19 -19
  51. package/Build/Workers/{chunk-UKJCFXVV.js → chunk-X23FRWHJ.js} +6 -6
  52. package/Build/Workers/{chunk-2TRB253J.js → chunk-XD445VDH.js} +7 -7
  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 +29 -25
  57. package/Build/Workers/createCircleOutlineGeometry.js +17 -17
  58. package/Build/Workers/createCoplanarPolygonGeometry.js +32 -32
  59. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
  60. package/Build/Workers/createCorridorGeometry.js +29 -29
  61. package/Build/Workers/createCorridorOutlineGeometry.js +27 -27
  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 +24 -24
  72. package/Build/Workers/createPlaneGeometry.js +14 -14
  73. package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
  74. package/Build/Workers/createPolygonGeometry.js +32 -32
  75. package/Build/Workers/createPolygonOutlineGeometry.js +29 -29
  76. package/Build/Workers/createPolylineGeometry.js +24 -24
  77. package/Build/Workers/createPolylineVolumeGeometry.js +30 -30
  78. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +26 -26
  79. package/Build/Workers/createRectangleGeometry.js +27 -27
  80. package/Build/Workers/createRectangleOutlineGeometry.js +19 -19
  81. package/Build/Workers/createSimplePolylineGeometry.js +22 -22
  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 +21 -21
  92. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
  93. package/Build/Workers/createWallGeometry.js +23 -23
  94. package/Build/Workers/createWallOutlineGeometry.js +22 -22
  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/ApproximateTerrainHeights.js +4 -4
  102. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +12 -8
  103. package/Source/Core/BoundingRectangle.js +2 -0
  104. package/Source/Core/BoundingSphere.js +4 -2
  105. package/Source/Core/Cartesian3.js +13 -10
  106. package/Source/Core/Cartographic.js +11 -8
  107. package/Source/Core/CesiumTerrainProvider.js +3 -2
  108. package/Source/Core/CircleGeometry.js +6 -2
  109. package/Source/Core/CircleOutlineGeometry.js +1 -1
  110. package/Source/Core/CoplanarPolygonGeometry.js +3 -3
  111. package/Source/Core/CorridorGeometry.js +4 -4
  112. package/Source/Core/CorridorOutlineGeometry.js +2 -2
  113. package/Source/Core/Credit.js +3 -2
  114. package/Source/Core/CustomHeightmapTerrainProvider.js +17 -3
  115. package/Source/Core/EllipseGeometry.js +4 -4
  116. package/Source/Core/EllipseOutlineGeometry.js +2 -2
  117. package/Source/Core/Ellipsoid.js +34 -0
  118. package/Source/Core/EllipsoidGeodesic.js +2 -2
  119. package/Source/Core/EllipsoidRhumbLine.js +4 -4
  120. package/Source/Core/EllipsoidTangentPlane.js +3 -3
  121. package/Source/Core/EllipsoidTerrainProvider.js +3 -3
  122. package/Source/Core/GeographicProjection.js +4 -3
  123. package/Source/Core/GeographicTilingScheme.js +3 -3
  124. package/Source/Core/GeometryPipeline.js +2 -2
  125. package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -1
  126. package/Source/Core/GoogleMaps.js +1 -1
  127. package/Source/Core/GroundPolylineGeometry.js +1 -1
  128. package/Source/Core/HeightmapTessellator.js +2 -2
  129. package/Source/Core/Ion.js +1 -1
  130. package/Source/Core/Occluder.js +3 -3
  131. package/Source/Core/OrientedBoundingBox.js +2 -2
  132. package/Source/Core/PolygonGeometry.js +4 -4
  133. package/Source/Core/PolygonGeometryLibrary.js +1 -1
  134. package/Source/Core/PolygonOutlineGeometry.js +3 -3
  135. package/Source/Core/PolygonPipeline.js +2 -2
  136. package/Source/Core/PolylineGeometry.js +2 -2
  137. package/Source/Core/PolylinePipeline.js +6 -6
  138. package/Source/Core/PolylineVolumeGeometry.js +2 -2
  139. package/Source/Core/PolylineVolumeOutlineGeometry.js +2 -2
  140. package/Source/Core/Rectangle.js +6 -6
  141. package/Source/Core/RectangleGeometry.js +6 -6
  142. package/Source/Core/RectangleGeometryLibrary.js +3 -0
  143. package/Source/Core/RectangleOutlineGeometry.js +2 -2
  144. package/Source/Core/Simon1994PlanetaryPositions.js +3 -2
  145. package/Source/Core/SimplePolylineGeometry.js +2 -2
  146. package/Source/Core/Stereographic.js +2 -2
  147. package/Source/Core/Transforms.js +17 -17
  148. package/Source/Core/VRTheWorldTerrainProvider.js +2 -2
  149. package/Source/Core/WallGeometry.js +3 -3
  150. package/Source/Core/WallOutlineGeometry.js +3 -3
  151. package/Source/Core/WebMercatorTilingScheme.js +3 -3
  152. package/Source/Core/createWorldTerrainAsync.js +2 -0
  153. package/Source/DataSources/BoxGeometryUpdater.js +2 -2
  154. package/Source/DataSources/CylinderGeometryUpdater.js +2 -2
  155. package/Source/DataSources/CzmlDataSource.js +8 -8
  156. package/Source/DataSources/EllipsoidGeometryUpdater.js +3 -3
  157. package/Source/DataSources/EntityCluster.js +1 -1
  158. package/Source/DataSources/EntityView.js +2 -2
  159. package/Source/DataSources/KmlDataSource.js +4 -4
  160. package/Source/DataSources/ModelVisualizer.js +1 -2
  161. package/Source/DataSources/PolygonGeometryUpdater.js +1 -1
  162. package/Source/DataSources/PolylineGeometryUpdater.js +3 -2
  163. package/Source/DataSources/RectangleGeometryUpdater.js +1 -1
  164. package/Source/DataSources/ScaledPositionProperty.js +2 -2
  165. package/Source/DataSources/TerrainOffsetProperty.js +3 -7
  166. package/Source/DataSources/VelocityOrientationProperty.js +2 -2
  167. package/Source/DataSources/exportKml.js +2 -2
  168. package/Source/Renderer/UniformState.js +1 -1
  169. package/Source/Scene/ArcGisMapServerImageryProvider.js +2 -2
  170. package/Source/Scene/ArcGisMapService.js +1 -1
  171. package/Source/Scene/Billboard.js +6 -4
  172. package/Source/Scene/BingMapsImageryProvider.js +1 -1
  173. package/Source/Scene/Camera.js +16 -10
  174. package/Source/Scene/Cesium3DTileset.js +1 -1
  175. package/Source/Scene/ClippingPolygon.js +2 -2
  176. package/Source/Scene/ClippingPolygonCollection.js +1 -1
  177. package/Source/Scene/CreditDisplay.js +94 -104
  178. package/Source/Scene/Globe.js +16 -13
  179. package/Source/Scene/GltfLoaderUtil.js +2 -4
  180. package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +1 -1
  181. package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +1 -1
  182. package/Source/Scene/GridImageryProvider.js +2 -2
  183. package/Source/Scene/ImageryLayerCollection.js +2 -2
  184. package/Source/Scene/MapboxImageryProvider.js +1 -1
  185. package/Source/Scene/MapboxStyleImageryProvider.js +1 -1
  186. package/Source/Scene/MetadataSemantic.js +4 -4
  187. package/Source/Scene/Model/InstancingPipelineStage.js +3 -3
  188. package/Source/Scene/Model/MaterialPipelineStage.js +49 -0
  189. package/Source/Scene/Model/Model.js +7 -4
  190. package/Source/Scene/Model/ModelSceneGraph.js +1 -1
  191. package/Source/Scene/Model/SceneMode2DPipelineStage.js +3 -3
  192. package/Source/Scene/Model/pickModel.js +2 -2
  193. package/Source/Scene/ModelComponents.js +9 -0
  194. package/Source/Scene/Picking.js +4 -13
  195. package/Source/Scene/PointPrimitive.js +5 -2
  196. package/Source/Scene/Scene.js +39 -31
  197. package/Source/Scene/SceneTransforms.js +78 -20
  198. package/Source/Scene/SceneTransitioner.js +2 -2
  199. package/Source/Scene/ScreenSpaceCameraController.js +29 -19
  200. package/Source/Scene/SkyBox.js +26 -0
  201. package/Source/Scene/Sun.js +1 -1
  202. package/Source/Shaders/Builtin/CzmBuiltins.js +2 -2
  203. package/Source/Shaders/Builtin/Functions/ellipsoidTextureCoordinates.glsl +10 -0
  204. package/Source/Shaders/Builtin/Functions/{ellipsoidWgs84TextureCoordinates.js → ellipsoidTextureCoordinates.js} +3 -3
  205. package/Source/Shaders/Builtin/Structs/materialInput.glsl +1 -1
  206. package/Source/Shaders/Builtin/Structs/materialInput.js +1 -1
  207. package/Source/Shaders/Builtin/Structs/modelMaterial.glsl +2 -0
  208. package/Source/Shaders/Builtin/Structs/modelMaterial.js +2 -0
  209. package/Source/Shaders/EllipsoidFS.glsl +1 -1
  210. package/Source/Shaders/EllipsoidFS.js +1 -1
  211. package/Source/Shaders/GlobeFS.glsl +2 -2
  212. package/Source/Shaders/GlobeFS.js +2 -2
  213. package/Source/Shaders/Model/MaterialStageFS.glsl +21 -12
  214. package/Source/Shaders/Model/MaterialStageFS.js +21 -12
  215. package/Source/Widget/CesiumWidget.css +0 -5
  216. package/Source/Widget/CesiumWidget.js +29 -28
  217. package/index.d.ts +181 -113
  218. package/index.js +208 -208
  219. package/package.json +2 -2
  220. package/Source/Shaders/Builtin/Functions/ellipsoidWgs84TextureCoordinates.glsl +0 -10
@@ -441,8 +441,7 @@ ModelVisualizer.prototype.getBoundingSphere = function (entity, result) {
441
441
  }
442
442
 
443
443
  const scene = this._scene;
444
- const globe = scene.globe;
445
- const ellipsoid = defaultValue(globe?.ellipsoid, Ellipsoid.WGS84);
444
+ const ellipsoid = defaultValue(scene.ellipsoid, Ellipsoid.default);
446
445
 
447
446
  const hasHeightReference = model.heightReference !== HeightReference.NONE;
448
447
  if (hasHeightReference) {
@@ -243,7 +243,7 @@ PolygonGeometryUpdater.prototype._computeCenter = function (time, result) {
243
243
  if (positions.length === 0) {
244
244
  return;
245
245
  }
246
- const ellipsoid = this._scene.mapProjection.ellipsoid;
246
+ const ellipsoid = this._scene.ellipsoid;
247
247
 
248
248
  const tangentPlane = EllipsoidTangentPlane.fromPoints(positions, ellipsoid);
249
249
  const positions2D = tangentPlane.projectPointsOntoPlane(
@@ -789,8 +789,9 @@ DynamicGeometryUpdater.prototype.update = function (time) {
789
789
  arcType = Property.getValueOrDefault(polyline._arcType, time, arcType);
790
790
 
791
791
  const globe = geometryUpdater._scene.globe;
792
+ const ellipsoid = geometryUpdater._scene.ellipsoid;
792
793
  if (arcType !== ArcType.NONE && defined(globe)) {
793
- generateCartesianArcOptions.ellipsoid = globe.ellipsoid;
794
+ generateCartesianArcOptions.ellipsoid = ellipsoid;
794
795
  generateCartesianArcOptions.positions = positions;
795
796
  generateCartesianArcOptions.granularity = Property.getValueOrUndefined(
796
797
  polyline._granularity,
@@ -798,7 +799,7 @@ DynamicGeometryUpdater.prototype.update = function (time) {
798
799
  );
799
800
  generateCartesianArcOptions.height = PolylinePipeline.extractHeights(
800
801
  positions,
801
- globe.ellipsoid
802
+ ellipsoid
802
803
  );
803
804
  if (arcType === ArcType.GEODESIC) {
804
805
  positions = PolylinePipeline.generateCartesianArc(
@@ -220,7 +220,7 @@ RectangleGeometryUpdater.prototype._computeCenter = function (time, result) {
220
220
  return;
221
221
  }
222
222
  const center = Rectangle.center(rect, scratchCarto);
223
- return Cartographic.toCartesian(center, Ellipsoid.WGS84, result);
223
+ return Cartographic.toCartesian(center, Ellipsoid.default, result);
224
224
  };
225
225
 
226
226
  RectangleGeometryUpdater.prototype._isHidden = function (entity, rectangle) {
@@ -6,7 +6,7 @@ import ReferenceFrame from "../Core/ReferenceFrame.js";
6
6
  import Property from "./Property.js";
7
7
 
8
8
  /**
9
- * This is a temporary class for scaling position properties to the WGS84 surface.
9
+ * This is a temporary class for scaling position properties to the ellipsoid surface.
10
10
  * It will go away or be refactored to support data with arbitrary height references.
11
11
  * @private
12
12
  */
@@ -80,7 +80,7 @@ ScaledPositionProperty.prototype.getValueInReferenceFrame = function (
80
80
 
81
81
  result = this._value.getValueInReferenceFrame(time, referenceFrame, result);
82
82
  return defined(result)
83
- ? Ellipsoid.WGS84.scaleToGeodeticSurface(result, result)
83
+ ? Ellipsoid.default.scaleToGeodeticSurface(result, result)
84
84
  : undefined;
85
85
  };
86
86
 
@@ -72,7 +72,7 @@ function TerrainOffsetProperty(
72
72
 
73
73
  this._updateClamping();
74
74
 
75
- this._normal = scene.globe.ellipsoid.geodeticSurfaceNormal(
75
+ this._normal = scene.ellipsoid.geodeticSurfaceNormal(
76
76
  position,
77
77
  this._normal
78
78
  );
@@ -115,14 +115,13 @@ TerrainOffsetProperty.prototype._updateClamping = function () {
115
115
  }
116
116
 
117
117
  const scene = this._scene;
118
- const globe = scene.globe;
119
118
  const position = this._position;
120
119
 
121
120
  if (Cartesian3.equals(position, Cartesian3.ZERO)) {
122
121
  this._terrainHeight = 0;
123
122
  return;
124
123
  }
125
- const ellipsoid = globe.ellipsoid;
124
+ const ellipsoid = scene.ellipsoid;
126
125
  const cartographicPosition = ellipsoid.cartesianToCartographic(
127
126
  position,
128
127
  this._cartographicPosition
@@ -204,10 +203,7 @@ TerrainOffsetProperty.prototype.getValue = function (time, result) {
204
203
 
205
204
  this._updateClamping();
206
205
 
207
- const normal = scene.globe.ellipsoid.geodeticSurfaceNormal(
208
- position,
209
- this._normal
210
- );
206
+ const normal = scene.ellipsoid.geodeticSurfaceNormal(position, this._normal);
211
207
  return Cartesian3.multiplyByScalar(normal, this._terrainHeight, result);
212
208
  };
213
209
 
@@ -17,7 +17,7 @@ import VelocityVectorProperty from "./VelocityVectorProperty.js";
17
17
  * @constructor
18
18
  *
19
19
  * @param {PositionProperty} [position] The position property used to compute the orientation.
20
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid used to determine which way is up.
20
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid used to determine which way is up.
21
21
  *
22
22
  * @example
23
23
  * //Create an entity with position and orientation.
@@ -34,7 +34,7 @@ function VelocityOrientationProperty(position, ellipsoid) {
34
34
  this._ellipsoid = undefined;
35
35
  this._definitionChanged = new Event();
36
36
 
37
- this.ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
37
+ this.ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
38
38
 
39
39
  const that = this;
40
40
  this._velocityVectorProperty.definitionChanged.addEventListener(function () {
@@ -249,7 +249,7 @@ IdManager.prototype.get = function (id) {
249
249
  *
250
250
  * @param {object} options An object with the following properties:
251
251
  * @param {EntityCollection} options.entities The EntityCollection to export as KML.
252
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for the output file.
252
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid for the output file.
253
253
  * @param {exportKmlModelCallback} [options.modelCallback] A callback that will be called with a {@link ModelGraphics} instance and should return the URI to use in the KML. Required if a model exists in the entity collection.
254
254
  * @param {JulianDate} [options.time=entities.computeAvailability().start] The time value to use to get properties that are not time varying in KML.
255
255
  * @param {TimeInterval} [options.defaultAvailability=entities.computeAvailability()] The interval that will be sampled if an entity doesn't have an availability.
@@ -405,7 +405,7 @@ exportKml._createState = function (options) {
405
405
  const kmlDoc = document.implementation.createDocument(kmlNamespace, "kml");
406
406
  return {
407
407
  kmlDoc: kmlDoc,
408
- ellipsoid: defaultValue(options.ellipsoid, Ellipsoid.WGS84),
408
+ ellipsoid: defaultValue(options.ellipsoid, Ellipsoid.default),
409
409
  idManager: new IdManager(),
410
410
  styleCache: styleCache,
411
411
  externalFileHandler: externalFileHandler,
@@ -1173,7 +1173,7 @@ Object.defineProperties(UniformState.prototype, {
1173
1173
  */
1174
1174
  ellipsoid: {
1175
1175
  get: function () {
1176
- return defaultValue(this._ellipsoid, Ellipsoid.WGS84);
1176
+ return defaultValue(this._ellipsoid, Ellipsoid.default);
1177
1177
  },
1178
1178
  },
1179
1179
  });
@@ -49,9 +49,9 @@ import DeveloperError from "../Core/DeveloperError.js";
49
49
  * a tiled layer.
50
50
  * @property {TilingScheme} [tilingScheme=new GeographicTilingScheme()] The tiling scheme to use to divide the world into tiles.
51
51
  * This parameter is ignored when accessing a tiled server.
52
- * @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified and used,
52
+ * @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If the tilingScheme is specified and used,
53
53
  * this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
54
- * parameter is specified, the WGS84 ellipsoid is used.
54
+ * parameter is specified, the default ellipsoid is used.
55
55
  * @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas. This parameter is ignored when accessing a tiled server.
56
56
  * @property {number} [tileWidth=256] The width of each tile in pixels. This parameter is ignored when accessing a tiled server.
57
57
  * @property {number} [tileHeight=256] The height of each tile in pixels. This parameter is ignored when accessing a tiled server.
@@ -4,7 +4,7 @@ import Resource from "../Core/Resource.js";
4
4
 
5
5
  let defaultTokenCredit;
6
6
  const defaultAccessToken =
7
- "AAPKe5e6f1571ad74096bfacbdf289c5cdb687BUrehhWYnNo9tN4coC66_qhHDNruh3ygZV90buspkWdOqZUq6tb0kCb_dms9Ir";
7
+ "AAPTxy8BH1VEsoebNVZXo8HurEOF051kAEKlhkOhBEc9BmRcs5cw5x8CvIyg2oiotXJmY_GjoEUuuKAUvdWxusIx25kUy2AttkOs0FgosGzFJSsjafpWC40GiE5hiD0FLNSh3kxIW6w-5qqUQCEAwGY1t4yH7Fj-PjrkjPfSpw0_r2xF3lKLd0_LSmPWXCkYhqV1O67tWLNImHyr7SurJ92sA5YIG1pMJKEQU3Qv5k18p0g.AT1_sGbfSYDL";
8
8
  /**
9
9
  * Default options for accessing the ArcGIS image tile service.
10
10
  *
@@ -1104,8 +1104,7 @@ Billboard._updateClamping = function (collection, owner) {
1104
1104
  return;
1105
1105
  }
1106
1106
 
1107
- const globe = scene.globe;
1108
- const ellipsoid = defaultValue(globe?.ellipsoid, Ellipsoid.WGS84);
1107
+ const ellipsoid = defaultValue(scene.ellipsoid, Ellipsoid.default);
1109
1108
 
1110
1109
  const mode = scene.frameState.mode;
1111
1110
 
@@ -1375,7 +1374,10 @@ Billboard._computeActualPosition = function (
1375
1374
  }
1376
1375
 
1377
1376
  Matrix4.multiplyByPoint(modelMatrix, position, tempCartesian3);
1378
- return SceneTransforms.computeActualWgs84Position(frameState, tempCartesian3);
1377
+ return SceneTransforms.computeActualEllipsoidPosition(
1378
+ frameState,
1379
+ tempCartesian3
1380
+ );
1379
1381
  };
1380
1382
 
1381
1383
  const scratchCartesian3 = new Cartesian3();
@@ -1397,7 +1399,7 @@ Billboard._computeScreenSpacePosition = function (
1397
1399
  );
1398
1400
 
1399
1401
  // World to window coordinates
1400
- const positionWC = SceneTransforms.wgs84WithEyeOffsetToWindowCoordinates(
1402
+ const positionWC = SceneTransforms.worldWithEyeOffsetToWindowCoordinates(
1401
1403
  scene,
1402
1404
  positionWorld,
1403
1405
  eyeOffset,
@@ -28,7 +28,7 @@ import ImageryProvider from "./ImageryProvider.js";
28
28
  * @property {string} [culture=''] The culture to use when requesting Bing Maps imagery. Not
29
29
  * all cultures are supported. See {@link http://msdn.microsoft.com/en-us/library/hh441729.aspx}
30
30
  * for information on the supported cultures.
31
- * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
31
+ * @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
32
32
  * @property {TileDiscardPolicy} [tileDiscardPolicy] The policy that determines if a tile
33
33
  * is invalid and should be discarded. By default, a {@link DiscardEmptyTileImagePolicy}
34
34
  * will be used, with the expectation that the Bing Maps server will send a zero-length response for missing tiles.
@@ -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
  }