@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
@@ -285,7 +285,7 @@ Rectangle.fromCartographicArray = function (cartographics, result) {
285
285
  * Creates the smallest possible Rectangle that encloses all positions in the provided array.
286
286
  *
287
287
  * @param {Cartesian3[]} cartesians The list of Cartesian instances.
288
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid the cartesians are on.
288
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid the cartesians are on.
289
289
  * @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
290
290
  * @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
291
291
  */
@@ -293,7 +293,7 @@ Rectangle.fromCartesianArray = function (cartesians, ellipsoid, result) {
293
293
  //>>includeStart('debug', pragmas.debug);
294
294
  Check.defined("cartesians", cartesians);
295
295
  //>>includeEnd('debug');
296
- ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
296
+ ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
297
297
 
298
298
  let west = Number.MAX_VALUE;
299
299
  let east = -Number.MAX_VALUE;
@@ -354,7 +354,7 @@ for (let n = 0; n < fromBoundingSpherePositionsScratch.length; ++n) {
354
354
  *
355
355
  *
356
356
  * @param {BoundingSphere} boundingSphere The bounding sphere.
357
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid.
357
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid.
358
358
  * @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
359
359
  * @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
360
360
  */
@@ -367,7 +367,7 @@ Rectangle.fromBoundingSphere = function (boundingSphere, ellipsoid, result) {
367
367
  const radius = boundingSphere.radius;
368
368
 
369
369
  if (!defined(ellipsoid)) {
370
- ellipsoid = Ellipsoid.WGS84;
370
+ ellipsoid = Ellipsoid.default;
371
371
  }
372
372
 
373
373
  if (!defined(result)) {
@@ -912,7 +912,7 @@ const subsampleLlaScratch = new Cartographic();
912
912
  * for rectangles that cover the poles or cross the equator.
913
913
  *
914
914
  * @param {Rectangle} rectangle The rectangle to subsample.
915
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
915
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to use.
916
916
  * @param {number} [surfaceHeight=0.0] The height of the rectangle above the ellipsoid.
917
917
  * @param {Cartesian3[]} [result] The array of Cartesians onto which to store the result.
918
918
  * @returns {Cartesian3[]} The modified result parameter or a new Array of Cartesians instances if none was provided.
@@ -922,7 +922,7 @@ Rectangle.subsample = function (rectangle, ellipsoid, surfaceHeight, result) {
922
922
  Check.typeOf.object("rectangle", rectangle);
923
923
  //>>includeEnd('debug');
924
924
 
925
- ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
925
+ ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
926
926
  surfaceHeight = defaultValue(surfaceHeight, 0.0);
927
927
 
928
928
  if (!defined(result)) {
@@ -978,7 +978,7 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
978
978
  * @param {object} options Object with the following properties:
979
979
  * @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
980
980
  * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
981
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
981
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid on which the rectangle lies.
982
982
  * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
983
983
  * @param {number} [options.height=0.0] The distance in meters between the rectangle and the ellipsoid surface.
984
984
  * @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
@@ -998,7 +998,7 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
998
998
  * @example
999
999
  * // 1. create a rectangle
1000
1000
  * const rectangle = new Cesium.RectangleGeometry({
1001
- * ellipsoid : Cesium.Ellipsoid.WGS84,
1001
+ * ellipsoid : Cesium.Ellipsoid.default,
1002
1002
  * rectangle : Cesium.Rectangle.fromDegrees(-80.0, 39.0, -74.0, 42.0),
1003
1003
  * height : 10000.0
1004
1004
  * });
@@ -1006,7 +1006,7 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
1006
1006
  *
1007
1007
  * // 2. create an extruded rectangle without a top
1008
1008
  * const rectangle = new Cesium.RectangleGeometry({
1009
- * ellipsoid : Cesium.Ellipsoid.WGS84,
1009
+ * ellipsoid : Cesium.Ellipsoid.default,
1010
1010
  * rectangle : Cesium.Rectangle.fromDegrees(-80.0, 39.0, -74.0, 42.0),
1011
1011
  * height : 10000.0,
1012
1012
  * extrudedHeight: 300000
@@ -1037,7 +1037,7 @@ function RectangleGeometry(options) {
1037
1037
  CesiumMath.RADIANS_PER_DEGREE
1038
1038
  );
1039
1039
  this._ellipsoid = Ellipsoid.clone(
1040
- defaultValue(options.ellipsoid, Ellipsoid.WGS84)
1040
+ defaultValue(options.ellipsoid, Ellipsoid.default)
1041
1041
  );
1042
1042
  this._surfaceHeight = Math.max(height, extrudedHeight);
1043
1043
  this._rotation = defaultValue(options.rotation, 0.0);
@@ -1185,7 +1185,7 @@ RectangleGeometry.unpack = function (array, startingIndex, result) {
1185
1185
  *
1186
1186
  * @param {object} options Object with the following properties:
1187
1187
  * @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
1188
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
1188
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid on which the rectangle lies.
1189
1189
  * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
1190
1190
  * @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
1191
1191
  * @param {Rectangle} [result] An object in which to store the result.
@@ -1211,7 +1211,7 @@ RectangleGeometry.computeRectangle = function (options, result) {
1211
1211
  options.granularity,
1212
1212
  CesiumMath.RADIANS_PER_DEGREE
1213
1213
  );
1214
- const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
1214
+ const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
1215
1215
  const rotation = defaultValue(options.rotation, 0.0);
1216
1216
 
1217
1217
  return computeRectangle(rectangle, granularity, rotation, ellipsoid, result);
@@ -2,6 +2,7 @@ import Cartesian3 from "./Cartesian3.js";
2
2
  import Cartographic from "./Cartographic.js";
3
3
  import defined from "./defined.js";
4
4
  import DeveloperError from "./DeveloperError.js";
5
+ import Ellipsoid from "./Ellipsoid.js";
5
6
  import GeographicProjection from "./GeographicProjection.js";
6
7
  import CesiumMath from "./Math.js";
7
8
  import Matrix2 from "./Matrix2.js";
@@ -100,6 +101,7 @@ function getRotationOptions(
100
101
  const granYSin = granularityY * sinRotation;
101
102
  const granXSin = granularityX * sinRotation;
102
103
 
104
+ proj._ellipsoid = Ellipsoid.default;
103
105
  nwCartesian = proj.project(nwCorner, nwCartesian);
104
106
 
105
107
  nwCartesian = Cartesian3.subtract(nwCartesian, centerCartesian, nwCartesian);
@@ -190,6 +192,7 @@ RectangleGeometryLibrary.computeOptions = function (
190
192
  if (center.longitude < nwCorner.longitude) {
191
193
  center.longitude += CesiumMath.TWO_PI;
192
194
  }
195
+ proj._ellipsoid = Ellipsoid.default;
193
196
  centerCartesian = proj.project(center, centerCartesian);
194
197
  }
195
198
 
@@ -247,7 +247,7 @@ function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
247
247
  *
248
248
  * @param {object} options Object with the following properties:
249
249
  * @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
250
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
250
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid on which the rectangle lies.
251
251
  * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
252
252
  * @param {number} [options.height=0.0] The distance in meters between the rectangle and the ellipsoid surface.
253
253
  * @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
@@ -277,7 +277,7 @@ function RectangleOutlineGeometry(options) {
277
277
  options.granularity,
278
278
  CesiumMath.RADIANS_PER_DEGREE
279
279
  );
280
- const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
280
+ const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
281
281
  const rotation = defaultValue(options.rotation, 0.0);
282
282
 
283
283
  //>>includeStart('debug', pragmas.debug);
@@ -613,7 +613,7 @@ function computeSimonEarth(date, result) {
613
613
  }
614
614
 
615
615
  // Values for the <code>axesTransformation</code> needed for the rotation were found using the STK Components
616
- // GreographicTransformer on the position of the sun center of mass point and the earth J2000 frame.
616
+ // GeographicTransformer on the position of the sun center of mass point and the earth J2000 frame.
617
617
 
618
618
  const axesTransformation = new Matrix3(
619
619
  1.0000000000000002,
@@ -662,7 +662,7 @@ Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame = function (
662
662
  /**
663
663
  * Computes the position of the Moon in the Earth-centered inertial frame
664
664
  *
665
- * @param {JulianDate} [julianDate] The time at which to compute the Sun's position, if not provided the current system time is used.
665
+ * @param {JulianDate} [julianDate] The time at which to compute the moon's position, if not provided the current system time is used.
666
666
  * @param {Cartesian3} [result] The object onto which to store the result.
667
667
  * @returns {Cartesian3} Calculated moon position
668
668
  */
@@ -679,4 +679,5 @@ Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame = function (
679
679
 
680
680
  return result;
681
681
  };
682
+
682
683
  export default Simon1994PlanetaryPositions;
@@ -68,7 +68,7 @@ function interpolateColors(p0, p1, color0, color1, minDistance, array, offset) {
68
68
  * @param {boolean} [options.colorsPerVertex=false] A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices.
69
69
  * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow.
70
70
  * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
71
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
71
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
72
72
  *
73
73
  * @exception {DeveloperError} At least two positions are required.
74
74
  * @exception {DeveloperError} colors has an invalid length.
@@ -114,7 +114,7 @@ function SimplePolylineGeometry(options) {
114
114
  options.granularity,
115
115
  CesiumMath.RADIANS_PER_DEGREE
116
116
  );
117
- this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
117
+ this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
118
118
  this._workerName = "createSimplePolylineGeometry";
119
119
 
120
120
  let numComponents = 1 + positions.length * Cartesian3.packedLength;
@@ -99,12 +99,12 @@ const scratchCartesian = new Cartesian3();
99
99
  /**
100
100
  * Computes the latitude based on an ellipsoid.
101
101
  *
102
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which to compute the longitude.
102
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which to compute the longitude.
103
103
  * @returns {number} The latitude
104
104
  */
105
105
  Stereographic.prototype.getLatitude = function (ellipsoid) {
106
106
  if (!defined(ellipsoid)) {
107
- ellipsoid = Ellipsoid.WGS84;
107
+ ellipsoid = Ellipsoid.default;
108
108
  }
109
109
 
110
110
  scratchCartographic.latitude = this.conformalLatitude;
@@ -113,7 +113,7 @@ Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
113
113
  * centered at the provided origin to the provided ellipsoid's fixed reference frame.
114
114
  * @callback Transforms.LocalFrameToFixedFrame
115
115
  * @param {Cartesian3} origin The center point of the local reference frame.
116
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
116
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
117
117
  * @param {Matrix4} [result] The object onto which to store the result.
118
118
  * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
119
119
  */
@@ -199,7 +199,7 @@ Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
199
199
  );
200
200
  }
201
201
  } else {
202
- ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
202
+ ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
203
203
  ellipsoid.geodeticSurfaceNormal(origin, scratchCalculateCartesian.up);
204
204
 
205
205
  const up = scratchCalculateCartesian.up;
@@ -265,7 +265,7 @@ Transforms.localFrameToFixedFrameGenerator = function (firstAxis, secondAxis) {
265
265
  *
266
266
  * @function
267
267
  * @param {Cartesian3} origin The center point of the local reference frame.
268
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
268
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
269
269
  * @param {Matrix4} [result] The object onto which to store the result.
270
270
  * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
271
271
  *
@@ -291,7 +291,7 @@ Transforms.eastNorthUpToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
291
291
  *
292
292
  * @function
293
293
  * @param {Cartesian3} origin The center point of the local reference frame.
294
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
294
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
295
295
  * @param {Matrix4} [result] The object onto which to store the result.
296
296
  * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
297
297
  *
@@ -317,7 +317,7 @@ Transforms.northEastDownToFixedFrame = Transforms.localFrameToFixedFrameGenerato
317
317
  *
318
318
  * @function
319
319
  * @param {Cartesian3} origin The center point of the local reference frame.
320
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
320
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
321
321
  * @param {Matrix4} [result] The object onto which to store the result.
322
322
  * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
323
323
  *
@@ -343,7 +343,7 @@ Transforms.northUpEastToFixedFrame = Transforms.localFrameToFixedFrameGenerator(
343
343
  *
344
344
  * @function
345
345
  * @param {Cartesian3} origin The center point of the local reference frame.
346
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
346
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
347
347
  * @param {Matrix4} [result] The object onto which to store the result.
348
348
  * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if none was provided.
349
349
  *
@@ -369,7 +369,7 @@ const scratchHPRMatrix4 = new Matrix4();
369
369
  *
370
370
  * @param {Cartesian3} origin The center point of the local reference frame.
371
371
  * @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.
372
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
372
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
373
373
  * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
374
374
  * matrix from a reference frame to the provided ellipsoid's fixed reference frame
375
375
  * @param {Matrix4} [result] The object onto which to store the result.
@@ -424,7 +424,7 @@ const scratchHPRMatrix3 = new Matrix3();
424
424
  *
425
425
  * @param {Cartesian3} origin The center point of the local reference frame.
426
426
  * @param {HeadingPitchRoll} headingPitchRoll The heading, pitch, and roll.
427
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
427
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
428
428
  * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
429
429
  * matrix from a reference frame to the provided ellipsoid's fixed reference frame
430
430
  * @param {Quaternion} [result] The object onto which to store the result.
@@ -473,7 +473,7 @@ const hprQuaternionScratch = new Quaternion();
473
473
  * are above the plane. Negative pitch angles are below the plane. Roll is the first rotation applied about the local east axis.
474
474
  *
475
475
  * @param {Matrix4} transform The transform
476
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
476
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
477
477
  * @param {Transforms.LocalFrameToFixedFrame} [fixedFrameTransform=Transforms.eastNorthUpToFixedFrame] A 4x4 transformation
478
478
  * matrix from a reference frame to the provided ellipsoid's fixed reference frame
479
479
  * @param {HeadingPitchRoll} [result] The object onto which to store the result.
@@ -489,7 +489,7 @@ Transforms.fixedFrameToHeadingPitchRoll = function (
489
489
  Check.defined("transform", transform);
490
490
  //>>includeEnd('debug');
491
491
 
492
- ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
492
+ ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
493
493
  fixedFrameTransform = defaultValue(
494
494
  fixedFrameTransform,
495
495
  Transforms.eastNorthUpToFixedFrame
@@ -950,7 +950,7 @@ const upScratch = new Cartesian3();
950
950
  *
951
951
  * @param {Cartesian3} position The position to transform.
952
952
  * @param {Cartesian3} velocity The velocity vector to transform.
953
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
953
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
954
954
  * @param {Matrix3} [result] The object onto which to store the result.
955
955
  * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.
956
956
  */
@@ -970,10 +970,10 @@ Transforms.rotationMatrixFromPositionVelocity = function (
970
970
  }
971
971
  //>>includeEnd('debug');
972
972
 
973
- const normal = defaultValue(ellipsoid, Ellipsoid.WGS84).geodeticSurfaceNormal(
974
- position,
975
- normalScratch
976
- );
973
+ const normal = defaultValue(
974
+ ellipsoid,
975
+ Ellipsoid.default
976
+ ).geodeticSurfaceNormal(position, normalScratch);
977
977
  let right = Cartesian3.cross(velocity, normal, rightScratch);
978
978
 
979
979
  if (Cartesian3.equalsEpsilon(right, Cartesian3.ZERO, CesiumMath.EPSILON6)) {
@@ -1073,7 +1073,7 @@ Transforms.basisTo2D = function (projection, matrix, result) {
1073
1073
  );
1074
1074
  }
1075
1075
 
1076
- // Assuming the instance are positioned in WGS84, invert the WGS84 transform to get the local transform and then convert to 2D
1076
+ // Assuming the instance are positioned on the ellipsoid, invert the ellipsoidal transform to get the local transform and then convert to 2D
1077
1077
  const fromENU = Transforms.eastNorthUpToFixedFrame(
1078
1078
  rtcCenter,
1079
1079
  ellipsoid,
@@ -1091,7 +1091,7 @@ Transforms.basisTo2D = function (projection, matrix, result) {
1091
1091
  /**
1092
1092
  * @private
1093
1093
  */
1094
- Transforms.wgs84To2DModelMatrix = function (projection, center, result) {
1094
+ Transforms.ellipsoidTo2DModelMatrix = function (projection, center, result) {
1095
1095
  //>>includeStart('debug', pragmas.debug);
1096
1096
  if (!defined(projection)) {
1097
1097
  throw new DeveloperError("projection is required.");
@@ -24,7 +24,7 @@ function DataRectangle(rectangle, maxLevel) {
24
24
  *
25
25
  * Initialization options for the VRTheWorldTerrainProvider constructor
26
26
  *
27
- * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
27
+ * @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
28
28
  * @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
29
29
  */
30
30
 
@@ -37,7 +37,7 @@ function DataRectangle(rectangle, maxLevel) {
37
37
  * @param {VRTheWorldTerrainProvider.ConstructorOptions} options An object describing initialization options
38
38
  */
39
39
  function TerrainProviderBuilder(options) {
40
- this.ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
40
+ this.ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
41
41
  this.tilingScheme = undefined;
42
42
  this.heightmapWidth = undefined;
43
43
  this.heightmapHeight = undefined;
@@ -36,7 +36,7 @@ const scratchNormal = new Cartesian3();
36
36
  * wall at <code>positions</code>. If undefined, the height of each position in used.
37
37
  * @param {number[]} [options.minimumHeights] An array parallel to <code>positions</code> that give the minimum height of the
38
38
  * wall at <code>positions</code>. If undefined, the height at each position is 0.0.
39
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for coordinate manipulation
39
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid for coordinate manipulation
40
40
  * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
41
41
  *
42
42
  * @exception {DeveloperError} positions length must be greater than or equal to 2.
@@ -95,7 +95,7 @@ function WallGeometry(options) {
95
95
  options.granularity,
96
96
  CesiumMath.RADIANS_PER_DEGREE
97
97
  );
98
- const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
98
+ const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
99
99
 
100
100
  this._positions = wallPositions;
101
101
  this._minimumHeights = minimumHeights;
@@ -280,7 +280,7 @@ WallGeometry.unpack = function (array, startingIndex, result) {
280
280
  * wall at <code>positions</code>. If undefined, the height of each position in used.
281
281
  * @param {number} [options.minimumHeight] A constant that defines the minimum height of the
282
282
  * wall at <code>positions</code>. If undefined, the height at each position is 0.0.
283
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for coordinate manipulation
283
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid for coordinate manipulation
284
284
  * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
285
285
  * @returns {WallGeometry}
286
286
  *
@@ -30,7 +30,7 @@ const scratchCartesian3Position2 = new Cartesian3();
30
30
  * wall at <code>positions</code>. If undefined, the height of each position in used.
31
31
  * @param {number[]} [options.minimumHeights] An array parallel to <code>positions</code> that give the minimum height of the
32
32
  * wall at <code>positions</code>. If undefined, the height at each position is 0.0.
33
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for coordinate manipulation
33
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid for coordinate manipulation
34
34
  *
35
35
  * @exception {DeveloperError} positions length must be greater than or equal to 2.
36
36
  * @exception {DeveloperError} positions and maximumHeights must have the same length.
@@ -85,7 +85,7 @@ function WallOutlineGeometry(options) {
85
85
  options.granularity,
86
86
  CesiumMath.RADIANS_PER_DEGREE
87
87
  );
88
- const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
88
+ const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
89
89
 
90
90
  this._positions = wallPositions;
91
91
  this._minimumHeights = minimumHeights;
@@ -255,7 +255,7 @@ WallOutlineGeometry.unpack = function (array, startingIndex, result) {
255
255
  * wall at <code>positions</code>. If undefined, the height of each position in used.
256
256
  * @param {number} [options.minimumHeight] A constant that defines the minimum height of the
257
257
  * wall at <code>positions</code>. If undefined, the height at each position is 0.0.
258
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for coordinate manipulation
258
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid for coordinate manipulation
259
259
  * @returns {WallOutlineGeometry}
260
260
  *
261
261
  *
@@ -13,8 +13,8 @@ import WebMercatorProjection from "./WebMercatorProjection.js";
13
13
  * @constructor
14
14
  *
15
15
  * @param {object} [options] Object with the following properties:
16
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid whose surface is being tiled. Defaults to
17
- * the WGS84 ellipsoid.
16
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid whose surface is being tiled. Defaults to
17
+ * the default ellipsoid.
18
18
  * @param {number} [options.numberOfLevelZeroTilesX=1] The number of tiles in the X direction at level zero of
19
19
  * the tile tree.
20
20
  * @param {number} [options.numberOfLevelZeroTilesY=1] The number of tiles in the Y direction at level zero of
@@ -31,7 +31,7 @@ import WebMercatorProjection from "./WebMercatorProjection.js";
31
31
  function WebMercatorTilingScheme(options) {
32
32
  options = defaultValue(options, defaultValue.EMPTY_OBJECT);
33
33
 
34
- this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
34
+ this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
35
35
  this._numberOfLevelZeroTilesX = defaultValue(
36
36
  options.numberOfLevelZeroTilesX,
37
37
  1
@@ -1,5 +1,6 @@
1
1
  import CesiumTerrainProvider from "./CesiumTerrainProvider.js";
2
2
  import defaultValue from "./defaultValue.js";
3
+ import Ellipsoid from "./Ellipsoid.js";
3
4
 
4
5
  /**
5
6
  * Creates a {@link CesiumTerrainProvider} instance for the {@link https://cesium.com/content/#cesium-world-terrain|Cesium World Terrain}.
@@ -43,6 +44,7 @@ function createWorldTerrainAsync(options) {
43
44
  return CesiumTerrainProvider.fromIonAssetId(1, {
44
45
  requestVertexNormals: defaultValue(options.requestVertexNormals, false),
45
46
  requestWaterMask: defaultValue(options.requestWaterMask, false),
47
+ ellipsoid: Ellipsoid.WGS84,
46
48
  });
47
49
  }
48
50
  export default createWorldTerrainAsync;
@@ -147,7 +147,7 @@ BoxGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
147
147
  time,
148
148
  entity.box.heightReference,
149
149
  this._options.dimensions.z * 0.5,
150
- this._scene.mapProjection.ellipsoid
150
+ this._scene.ellipsoid
151
151
  ),
152
152
  attributes: attributes,
153
153
  });
@@ -215,7 +215,7 @@ BoxGeometryUpdater.prototype.createOutlineGeometryInstance = function (time) {
215
215
  time,
216
216
  entity.box.heightReference,
217
217
  this._options.dimensions.z * 0.5,
218
- this._scene.mapProjection.ellipsoid
218
+ this._scene.ellipsoid
219
219
  ),
220
220
  attributes: attributes,
221
221
  });
@@ -157,7 +157,7 @@ CylinderGeometryUpdater.prototype.createFillGeometryInstance = function (time) {
157
157
  time,
158
158
  entity.cylinder.heightReference,
159
159
  this._options.length * 0.5,
160
- this._scene.mapProjection.ellipsoid
160
+ this._scene.ellipsoid
161
161
  ),
162
162
  attributes: attributes,
163
163
  });
@@ -227,7 +227,7 @@ CylinderGeometryUpdater.prototype.createOutlineGeometryInstance = function (
227
227
  time,
228
228
  entity.cylinder.heightReference,
229
229
  this._options.length * 0.5,
230
- this._scene.mapProjection.ellipsoid
230
+ this._scene.ellipsoid
231
231
  ),
232
232
  attributes: attributes,
233
233
  });
@@ -279,7 +279,7 @@ function convertCartographicRadiansToCartesian(cartographicRadians) {
279
279
  scratchCartographic.longitude = cartographicRadians[0];
280
280
  scratchCartographic.latitude = cartographicRadians[1];
281
281
  scratchCartographic.height = cartographicRadians[2];
282
- Ellipsoid.WGS84.cartographicToCartesian(
282
+ Ellipsoid.default.cartographicToCartesian(
283
283
  scratchCartographic,
284
284
  scratchCartesian
285
285
  );
@@ -293,7 +293,7 @@ function convertCartographicRadiansToCartesian(cartographicRadians) {
293
293
  scratchCartographic.longitude = cartographicRadians[i + 1];
294
294
  scratchCartographic.latitude = cartographicRadians[i + 2];
295
295
  scratchCartographic.height = cartographicRadians[i + 3];
296
- Ellipsoid.WGS84.cartographicToCartesian(
296
+ Ellipsoid.default.cartographicToCartesian(
297
297
  scratchCartographic,
298
298
  scratchCartesian
299
299
  );
@@ -313,7 +313,7 @@ function convertCartographicDegreesToCartesian(cartographicDegrees) {
313
313
  );
314
314
  scratchCartographic.latitude = CesiumMath.toRadians(cartographicDegrees[1]);
315
315
  scratchCartographic.height = cartographicDegrees[2];
316
- Ellipsoid.WGS84.cartographicToCartesian(
316
+ Ellipsoid.default.cartographicToCartesian(
317
317
  scratchCartographic,
318
318
  scratchCartesian
319
319
  );
@@ -331,7 +331,7 @@ function convertCartographicDegreesToCartesian(cartographicDegrees) {
331
331
  cartographicDegrees[i + 2]
332
332
  );
333
333
  scratchCartographic.height = cartographicDegrees[i + 3];
334
- Ellipsoid.WGS84.cartographicToCartesian(
334
+ Ellipsoid.default.cartographicToCartesian(
335
335
  scratchCartographic,
336
336
  scratchCartesian
337
337
  );
@@ -1828,12 +1828,12 @@ function processPositionArrayPacketData(
1828
1828
  } else if (defined(packetData.cartographicRadians)) {
1829
1829
  packetData.array = Cartesian3.fromRadiansArrayHeights(
1830
1830
  packetData.cartographicRadians,
1831
- Ellipsoid.WGS84
1831
+ Ellipsoid.default
1832
1832
  );
1833
1833
  } else if (defined(packetData.cartographicDegrees)) {
1834
1834
  packetData.array = Cartesian3.fromDegreesArrayHeights(
1835
1835
  packetData.cartographicDegrees,
1836
- Ellipsoid.WGS84
1836
+ Ellipsoid.default
1837
1837
  );
1838
1838
  }
1839
1839
 
@@ -1885,11 +1885,11 @@ function unpackCartesianArray(array) {
1885
1885
  }
1886
1886
 
1887
1887
  function unpackCartographicRadiansArray(array) {
1888
- return Cartesian3.fromRadiansArrayHeights(array, Ellipsoid.WGS84);
1888
+ return Cartesian3.fromRadiansArrayHeights(array, Ellipsoid.default);
1889
1889
  }
1890
1890
 
1891
1891
  function unpackCartographicDegreesArray(array) {
1892
- return Cartesian3.fromDegreesArrayHeights(array, Ellipsoid.WGS84);
1892
+ return Cartesian3.fromDegreesArrayHeights(array, Ellipsoid.default);
1893
1893
  }
1894
1894
 
1895
1895
  function processPositionArrayOfArraysPacketData(
@@ -178,7 +178,7 @@ EllipsoidGeometryUpdater.prototype.createFillGeometryInstance = function (
178
178
  time,
179
179
  entity.ellipsoid.heightReference,
180
180
  this._options.radii.z * 0.5,
181
- this._scene.mapProjection.ellipsoid,
181
+ this._scene.ellipsoid,
182
182
  modelMatrixResult
183
183
  ),
184
184
  attributes: attributes,
@@ -250,7 +250,7 @@ EllipsoidGeometryUpdater.prototype.createOutlineGeometryInstance = function (
250
250
  time,
251
251
  entity.ellipsoid.heightReference,
252
252
  this._options.radii.z * 0.5,
253
- this._scene.mapProjection.ellipsoid,
253
+ this._scene.ellipsoid,
254
254
  modelMatrixResult
255
255
  ),
256
256
  attributes: attributes,
@@ -413,7 +413,7 @@ DynamicEllipsoidGeometryUpdater.prototype.update = function (time) {
413
413
  time,
414
414
  ellipsoid.heightReference,
415
415
  radii.z * 0.5,
416
- this._scene.mapProjection.ellipsoid,
416
+ this._scene.ellipsoid,
417
417
  this._modelMatrix
418
418
  )
419
419
  : undefined;
@@ -280,7 +280,7 @@ function createDeclutterCallback(entityCluster) {
280
280
  const previousHeight = entityCluster._previousHeight;
281
281
  const currentHeight = scene.camera.positionCartographic.height;
282
282
 
283
- const ellipsoid = scene.mapProjection.ellipsoid;
283
+ const ellipsoid = scene.ellipsoid;
284
284
  const cameraPosition = scene.camera.positionWC;
285
285
  const occluder = new EllipsoidalOccluder(ellipsoid, cameraPosition);
286
286
 
@@ -277,7 +277,7 @@ function updateTransform(
277
277
  *
278
278
  * @param {Entity} entity The entity to track with the camera.
279
279
  * @param {Scene} scene The scene to use.
280
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use for orienting the camera.
280
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to use for orienting the camera.
281
281
  */
282
282
  function EntityView(entity, scene, ellipsoid) {
283
283
  //>>includeStart('debug', pragmas.debug);
@@ -301,7 +301,7 @@ function EntityView(entity, scene, ellipsoid) {
301
301
  * The ellipsoid to use for orienting the camera.
302
302
  * @type {Ellipsoid}
303
303
  */
304
- this.ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
304
+ this.ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
305
305
 
306
306
  /**
307
307
  * The bounding sphere of the object.
@@ -3545,7 +3545,7 @@ function load(dataSource, entityCollection, data, options) {
3545
3545
  *
3546
3546
  * @property {string} [sourceUri] Overrides the url to use for resolving relative links and other KML network features.
3547
3547
  * @property {boolean} [clampToGround=false] true if we want the geometry features (Polygons, LineStrings and LinearRings) clamped to the ground.
3548
- * @property {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The global ellipsoid used for geographical calculations.
3548
+ * @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The global ellipsoid used for geographical calculations.
3549
3549
  * @property {Element|string} [screenOverlayContainer] A container for ScreenOverlay images.
3550
3550
  */
3551
3551
 
@@ -3560,7 +3560,7 @@ function load(dataSource, entityCollection, data, options) {
3560
3560
  *
3561
3561
  * @property {string} [sourceUri] Overrides the url to use for resolving relative links and other KML network features.
3562
3562
  * @property {boolean} [clampToGround=false] true if we want the geometry features (Polygons, LineStrings and LinearRings) clamped to the ground.
3563
- * @property {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The global ellipsoid used for geographical calculations.
3563
+ * @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The global ellipsoid used for geographical calculations.
3564
3564
  * @property {Element|string} [screenOverlayContainer] A container for ScreenOverlay images.
3565
3565
 
3566
3566
  */
@@ -3647,7 +3647,7 @@ function KmlDataSource(options) {
3647
3647
  : Rectangle.clone(Rectangle.MAX_VALUE),
3648
3648
  };
3649
3649
 
3650
- this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
3650
+ this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
3651
3651
 
3652
3652
  // User specified credit
3653
3653
  let credit = options.credit;
@@ -4204,7 +4204,7 @@ KmlDataSource.prototype.update = function (time) {
4204
4204
  const href = networkLink.href.clone();
4205
4205
 
4206
4206
  href.setQueryParameters(networkLink.cookie);
4207
- const ellipsoid = defaultValue(that._ellipsoid, Ellipsoid.WGS84);
4207
+ const ellipsoid = defaultValue(that._ellipsoid, Ellipsoid.default);
4208
4208
  processNetworkLinkQueryString(
4209
4209
  href,
4210
4210
  that.camera,