@cesium/engine 9.1.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/Build/ThirdParty/Workers/pako_deflate.min.js +108 -210
  2. package/Build/ThirdParty/Workers/pako_inflate.min.js +466 -568
  3. package/Build/ThirdParty/Workers/z-worker-pako.js +54 -104
  4. package/Build/Workers/{chunk-TMMOULW3.js → chunk-2J3JKXCP.js} +5 -5
  5. package/Build/Workers/{chunk-ZDP32RQI.js → chunk-3WUV74WM.js} +95 -155
  6. package/Build/Workers/{chunk-FOZQIHZK.js → chunk-4BAE4PWO.js} +6 -6
  7. package/Build/Workers/{chunk-CYAJYEKW.js → chunk-4MSUJ4I7.js} +8 -8
  8. package/Build/Workers/{chunk-KPY4F4BW.js → chunk-4YSNMHZ4.js} +6 -6
  9. package/Build/Workers/{chunk-66E3H2KU.js → chunk-5S7OLEPK.js} +12 -12
  10. package/Build/Workers/{chunk-4AJGCQFX.js → chunk-7XGC6YB2.js} +14 -14
  11. package/Build/Workers/{chunk-BDUJXBVF.js → chunk-AA4GZKOT.js} +3 -5
  12. package/Build/Workers/{chunk-7LPEGKOF.js → chunk-AD5HBJ2F.js} +11 -8
  13. package/Build/Workers/{chunk-XHLDDE65.js → chunk-AVI4IUWC.js} +11 -11
  14. package/Build/Workers/{chunk-MWYZ64MH.js → chunk-BCL4PHHT.js} +10 -10
  15. package/Build/Workers/{chunk-PWF3YJJ5.js → chunk-BDFNKFOE.js} +13 -13
  16. package/Build/Workers/{chunk-7VZNXIKG.js → chunk-BJF5LOWE.js} +7 -7
  17. package/Build/Workers/{chunk-3S2MFY4B.js → chunk-C2CGMAIU.js} +13 -13
  18. package/Build/Workers/{chunk-UAJEGIWA.js → chunk-COYFZ5VA.js} +6 -6
  19. package/Build/Workers/{chunk-ZWPIM77Q.js → chunk-DGS5QNIO.js} +13 -13
  20. package/Build/Workers/{chunk-V7JB576Q.js → chunk-DKVHRNFY.js} +5 -5
  21. package/Build/Workers/{chunk-NI2R52QD.js → chunk-DOXCPOG4.js} +11 -9
  22. package/Build/Workers/{chunk-XWML5Y7N.js → chunk-FXIHSF7O.js} +9 -9
  23. package/Build/Workers/{chunk-LW7WGHEU.js → chunk-G3YR53LY.js} +13 -13
  24. package/Build/Workers/{chunk-34DGOKCO.js → chunk-GR3CDLCP.js} +7 -7
  25. package/Build/Workers/{chunk-AOIKO5Y7.js → chunk-GRAT5GE7.js} +5 -5
  26. package/Build/Workers/{chunk-AOFMPKUB.js → chunk-I2RC4XVN.js} +4 -4
  27. package/Build/Workers/{chunk-PK7TEP3J.js → chunk-JYAHOGGL.js} +15 -15
  28. package/Build/Workers/{chunk-4KIUON73.js → chunk-KUN2ZA5X.js} +4 -4
  29. package/Build/Workers/{chunk-POLFRINT.js → chunk-L6RTJ3RE.js} +14 -14
  30. package/Build/Workers/{chunk-LVJCR7DH.js → chunk-LCLJJ2MZ.js} +18 -18
  31. package/Build/Workers/{chunk-3RZK5NNV.js → chunk-LEABCTLP.js} +4 -4
  32. package/Build/Workers/{chunk-QKF7XXEQ.js → chunk-MDHQR3ZS.js} +10 -8
  33. package/Build/Workers/{chunk-4PHPQRSH.js → chunk-MSKXMXJI.js} +5 -6
  34. package/Build/Workers/{chunk-GIFJ77E4.js → chunk-NTXTUNEF.js} +4 -4
  35. package/Build/Workers/{chunk-I5TDPPC4.js → chunk-O3JCMSS3.js} +17 -17
  36. package/Build/Workers/{chunk-PEABJLCK.js → chunk-OOK53QUQ.js} +1 -1
  37. package/Build/Workers/{chunk-PS6AEMBR.js → chunk-OORVMGDU.js} +7 -7
  38. package/Build/Workers/{chunk-JI2445T5.js → chunk-PCP4YQST.js} +11 -11
  39. package/Build/Workers/{chunk-C5CE4OG6.js → chunk-PYHLO636.js} +42 -13
  40. package/Build/Workers/{chunk-S4XDCPKD.js → chunk-Q55ECN3Y.js} +1 -1
  41. package/Build/Workers/{chunk-WWP3I7R5.js → chunk-QD4KM3GO.js} +5 -5
  42. package/Build/Workers/{chunk-YLZTCEBJ.js → chunk-QMLTCCYG.js} +1 -1
  43. package/Build/Workers/{chunk-IBXGK4WV.js → chunk-QX5XS4LC.js} +2 -2
  44. package/Build/Workers/{chunk-RL73GOEF.js → chunk-R6B7UCQB.js} +2 -2
  45. package/Build/Workers/{chunk-RR7EOKGZ.js → chunk-RJYML24O.js} +48 -85
  46. package/Build/Workers/{chunk-U4IMCOF5.js → chunk-S3PI2KFM.js} +2 -2
  47. package/Build/Workers/{chunk-6HCAQOVK.js → chunk-STBBMQGG.js} +6 -6
  48. package/Build/Workers/{chunk-CE6GTZ4I.js → chunk-SYCPRK3D.js} +10 -10
  49. package/Build/Workers/{chunk-WFICTTOE.js → chunk-T77JILCU.js} +2 -2
  50. package/Build/Workers/{chunk-ZC4AGBZK.js → chunk-TO2PVHKI.js} +2 -2
  51. package/Build/Workers/{chunk-UCPPWV64.js → chunk-VE7BFUIX.js} +1 -1
  52. package/Build/Workers/{chunk-2CSEEWHN.js → chunk-VFBNELXB.js} +7 -7
  53. package/Build/Workers/{chunk-A6NCZSL3.js → chunk-VO3ACQB2.js} +19 -19
  54. package/Build/Workers/{chunk-WEGCQ5DY.js → chunk-X23FRWHJ.js} +6 -6
  55. package/Build/Workers/{chunk-G7CJQKKD.js → chunk-XD445VDH.js} +7 -7
  56. package/Build/Workers/combineGeometry.js +22 -22
  57. package/Build/Workers/createBoxGeometry.js +16 -16
  58. package/Build/Workers/createBoxOutlineGeometry.js +14 -14
  59. package/Build/Workers/createCircleGeometry.js +29 -25
  60. package/Build/Workers/createCircleOutlineGeometry.js +17 -17
  61. package/Build/Workers/createCoplanarPolygonGeometry.js +32 -32
  62. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
  63. package/Build/Workers/createCorridorGeometry.js +29 -29
  64. package/Build/Workers/createCorridorOutlineGeometry.js +27 -27
  65. package/Build/Workers/createCylinderGeometry.js +18 -18
  66. package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
  67. package/Build/Workers/createEllipseGeometry.js +24 -24
  68. package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
  69. package/Build/Workers/createEllipsoidGeometry.js +17 -17
  70. package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
  71. package/Build/Workers/createFrustumGeometry.js +16 -16
  72. package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
  73. package/Build/Workers/createGeometry.js +22 -22
  74. package/Build/Workers/createGroundPolylineGeometry.js +24 -24
  75. package/Build/Workers/createPlaneGeometry.js +14 -14
  76. package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
  77. package/Build/Workers/createPolygonGeometry.js +32 -32
  78. package/Build/Workers/createPolygonOutlineGeometry.js +29 -29
  79. package/Build/Workers/createPolylineGeometry.js +24 -24
  80. package/Build/Workers/createPolylineVolumeGeometry.js +30 -30
  81. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +26 -26
  82. package/Build/Workers/createRectangleGeometry.js +27 -27
  83. package/Build/Workers/createRectangleOutlineGeometry.js +19 -19
  84. package/Build/Workers/createSimplePolylineGeometry.js +22 -22
  85. package/Build/Workers/createSphereGeometry.js +17 -17
  86. package/Build/Workers/createSphereOutlineGeometry.js +16 -16
  87. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  88. package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
  89. package/Build/Workers/createVectorTileGeometries.js +22 -22
  90. package/Build/Workers/createVectorTilePoints.js +12 -12
  91. package/Build/Workers/createVectorTilePolygons.js +20 -20
  92. package/Build/Workers/createVectorTilePolylines.js +13 -13
  93. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
  94. package/Build/Workers/createVerticesFromHeightmap.js +21 -21
  95. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
  96. package/Build/Workers/createWallGeometry.js +23 -23
  97. package/Build/Workers/createWallOutlineGeometry.js +22 -22
  98. package/Build/Workers/decodeDraco.js +11 -11
  99. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +12 -19
  100. package/Build/Workers/decodeI3S.js +10 -10
  101. package/Build/Workers/transcodeKTX2.js +43 -79
  102. package/Build/Workers/transferTypedArrayTest.js +1 -1
  103. package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
  104. package/Source/Core/ApproximateTerrainHeights.js +4 -4
  105. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +12 -8
  106. package/Source/Core/BoundingRectangle.js +2 -0
  107. package/Source/Core/BoundingSphere.js +4 -2
  108. package/Source/Core/Cartesian3.js +13 -10
  109. package/Source/Core/Cartographic.js +11 -8
  110. package/Source/Core/CesiumTerrainProvider.js +3 -2
  111. package/Source/Core/CircleGeometry.js +6 -2
  112. package/Source/Core/CircleOutlineGeometry.js +1 -1
  113. package/Source/Core/CoplanarPolygonGeometry.js +3 -3
  114. package/Source/Core/CorridorGeometry.js +4 -4
  115. package/Source/Core/CorridorOutlineGeometry.js +2 -2
  116. package/Source/Core/Credit.js +3 -2
  117. package/Source/Core/CustomHeightmapTerrainProvider.js +17 -3
  118. package/Source/Core/EllipseGeometry.js +4 -4
  119. package/Source/Core/EllipseOutlineGeometry.js +2 -2
  120. package/Source/Core/Ellipsoid.js +34 -0
  121. package/Source/Core/EllipsoidGeodesic.js +2 -2
  122. package/Source/Core/EllipsoidRhumbLine.js +4 -4
  123. package/Source/Core/EllipsoidTangentPlane.js +3 -3
  124. package/Source/Core/EllipsoidTerrainProvider.js +3 -3
  125. package/Source/Core/GeographicProjection.js +4 -3
  126. package/Source/Core/GeographicTilingScheme.js +3 -3
  127. package/Source/Core/GeometryPipeline.js +2 -2
  128. package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -1
  129. package/Source/Core/GoogleMaps.js +1 -1
  130. package/Source/Core/GroundPolylineGeometry.js +1 -1
  131. package/Source/Core/HeightmapTessellator.js +2 -2
  132. package/Source/Core/Ion.js +1 -1
  133. package/Source/Core/Math.js +0 -5
  134. package/Source/Core/Occluder.js +3 -3
  135. package/Source/Core/OrientedBoundingBox.js +2 -2
  136. package/Source/Core/PolygonGeometry.js +4 -4
  137. package/Source/Core/PolygonGeometryLibrary.js +1 -1
  138. package/Source/Core/PolygonOutlineGeometry.js +3 -3
  139. package/Source/Core/PolygonPipeline.js +2 -2
  140. package/Source/Core/PolylineGeometry.js +2 -2
  141. package/Source/Core/PolylinePipeline.js +6 -6
  142. package/Source/Core/PolylineVolumeGeometry.js +2 -2
  143. package/Source/Core/PolylineVolumeOutlineGeometry.js +2 -2
  144. package/Source/Core/Rectangle.js +6 -6
  145. package/Source/Core/RectangleGeometry.js +6 -6
  146. package/Source/Core/RectangleGeometryLibrary.js +3 -0
  147. package/Source/Core/RectangleOutlineGeometry.js +2 -2
  148. package/Source/Core/Simon1994PlanetaryPositions.js +3 -2
  149. package/Source/Core/SimplePolylineGeometry.js +2 -2
  150. package/Source/Core/Stereographic.js +2 -2
  151. package/Source/Core/TaskProcessor.js +19 -3
  152. package/Source/Core/Transforms.js +17 -17
  153. package/Source/Core/VRTheWorldTerrainProvider.js +2 -2
  154. package/Source/Core/WallGeometry.js +3 -3
  155. package/Source/Core/WallOutlineGeometry.js +3 -3
  156. package/Source/Core/WebMercatorTilingScheme.js +3 -3
  157. package/Source/Core/createWorldTerrainAsync.js +2 -0
  158. package/Source/Core/sampleTerrain.js +3 -3
  159. package/Source/DataSources/BoxGeometryUpdater.js +2 -2
  160. package/Source/DataSources/CylinderGeometryUpdater.js +2 -2
  161. package/Source/DataSources/CzmlDataSource.js +8 -8
  162. package/Source/DataSources/EllipsoidGeometryUpdater.js +3 -3
  163. package/Source/DataSources/EntityCluster.js +1 -1
  164. package/Source/DataSources/EntityView.js +2 -2
  165. package/Source/DataSources/KmlDataSource.js +4 -4
  166. package/Source/DataSources/ModelVisualizer.js +1 -2
  167. package/Source/DataSources/PolygonGeometryUpdater.js +1 -1
  168. package/Source/DataSources/PolylineGeometryUpdater.js +3 -2
  169. package/Source/DataSources/RectangleGeometryUpdater.js +1 -1
  170. package/Source/DataSources/ScaledPositionProperty.js +2 -2
  171. package/Source/DataSources/TerrainOffsetProperty.js +3 -7
  172. package/Source/DataSources/VelocityOrientationProperty.js +2 -2
  173. package/Source/DataSources/exportKml.js +2 -2
  174. package/Source/Renderer/UniformState.js +1 -1
  175. package/Source/Scene/ArcGisMapServerImageryProvider.js +2 -2
  176. package/Source/Scene/ArcGisMapService.js +1 -1
  177. package/Source/Scene/Billboard.js +8 -6
  178. package/Source/Scene/BingMapsImageryProvider.js +1 -1
  179. package/Source/Scene/Camera.js +16 -10
  180. package/Source/Scene/Cesium3DTileset.js +1 -1
  181. package/Source/Scene/ClippingPolygon.js +2 -2
  182. package/Source/Scene/ClippingPolygonCollection.js +1 -1
  183. package/Source/Scene/CreditDisplay.js +94 -104
  184. package/Source/Scene/Globe.js +16 -13
  185. package/Source/Scene/GltfLoader.js +458 -435
  186. package/Source/Scene/GltfLoaderUtil.js +5 -16
  187. package/Source/Scene/GltfPipeline/forEachTextureInMaterial.js +23 -7
  188. package/Source/Scene/GltfStructuralMetadataLoader.js +11 -9
  189. package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +1 -1
  190. package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +1 -1
  191. package/Source/Scene/GridImageryProvider.js +2 -2
  192. package/Source/Scene/ImageryLayerCollection.js +2 -2
  193. package/Source/Scene/Label.js +1 -1
  194. package/Source/Scene/MapboxImageryProvider.js +1 -1
  195. package/Source/Scene/MapboxStyleImageryProvider.js +1 -1
  196. package/Source/Scene/MetadataSemantic.js +4 -4
  197. package/Source/Scene/Model/AlphaPipelineStage.js +1 -1
  198. package/Source/Scene/Model/GeometryPipelineStage.js +15 -43
  199. package/Source/Scene/Model/ImageBasedLightingPipelineStage.js +7 -0
  200. package/Source/Scene/Model/InstancingPipelineStage.js +3 -3
  201. package/Source/Scene/Model/LightingPipelineStage.js +2 -4
  202. package/Source/Scene/Model/MaterialPipelineStage.js +395 -29
  203. package/Source/Scene/Model/Model.js +15 -7
  204. package/Source/Scene/Model/ModelSceneGraph.js +1 -1
  205. package/Source/Scene/Model/ModelUtility.js +3 -0
  206. package/Source/Scene/Model/SceneMode2DPipelineStage.js +3 -3
  207. package/Source/Scene/Model/VerticalExaggerationPipelineStage.js +4 -6
  208. package/Source/Scene/Model/pickModel.js +2 -2
  209. package/Source/Scene/ModelComponents.js +178 -1
  210. package/Source/Scene/PickDepth.js +23 -15
  211. package/Source/Scene/Picking.js +4 -13
  212. package/Source/Scene/PointPrimitive.js +5 -2
  213. package/Source/Scene/ResourceCache.js +41 -50
  214. package/Source/Scene/ResourceCacheKey.js +41 -53
  215. package/Source/Scene/Scene.js +39 -31
  216. package/Source/Scene/SceneTransforms.js +78 -20
  217. package/Source/Scene/SceneTransitioner.js +2 -2
  218. package/Source/Scene/ScreenSpaceCameraController.js +29 -19
  219. package/Source/Scene/SkyBox.js +26 -0
  220. package/Source/Scene/Sun.js +1 -1
  221. package/Source/Shaders/Builtin/CzmBuiltins.js +4 -10
  222. package/Source/Shaders/Builtin/Functions/ellipsoidTextureCoordinates.glsl +10 -0
  223. package/Source/Shaders/Builtin/Functions/{ellipsoidWgs84TextureCoordinates.js → ellipsoidTextureCoordinates.js} +3 -3
  224. package/Source/Shaders/Builtin/Functions/maximumComponent.glsl +21 -0
  225. package/Source/Shaders/Builtin/Functions/maximumComponent.js +23 -0
  226. package/Source/Shaders/Builtin/Functions/pbrLighting.glsl +108 -44
  227. package/Source/Shaders/Builtin/Functions/pbrLighting.js +108 -44
  228. package/Source/Shaders/Builtin/Structs/materialInput.glsl +1 -1
  229. package/Source/Shaders/Builtin/Structs/materialInput.js +1 -1
  230. package/Source/Shaders/Builtin/Structs/modelMaterial.glsl +16 -0
  231. package/Source/Shaders/Builtin/Structs/modelMaterial.js +16 -0
  232. package/Source/Shaders/EllipsoidFS.glsl +1 -1
  233. package/Source/Shaders/EllipsoidFS.js +1 -1
  234. package/Source/Shaders/GlobeFS.glsl +3 -3
  235. package/Source/Shaders/GlobeFS.js +3 -3
  236. package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +211 -133
  237. package/Source/Shaders/Model/ImageBasedLightingStageFS.js +212 -133
  238. package/Source/Shaders/Model/LightingStageFS.glsl +113 -48
  239. package/Source/Shaders/Model/LightingStageFS.js +113 -48
  240. package/Source/Shaders/Model/MaterialStageFS.glsl +407 -136
  241. package/Source/Shaders/Model/MaterialStageFS.js +407 -136
  242. package/Source/Widget/CesiumWidget.css +0 -5
  243. package/Source/Widget/CesiumWidget.js +29 -28
  244. package/index.d.ts +184 -116
  245. package/index.js +92 -95
  246. package/package.json +2 -2
  247. package/Source/Shaders/Builtin/Functions/defaultPbrMaterial.glsl +0 -16
  248. package/Source/Shaders/Builtin/Functions/defaultPbrMaterial.js +0 -18
  249. package/Source/Shaders/Builtin/Functions/ellipsoidWgs84TextureCoordinates.glsl +0 -10
  250. package/Source/Shaders/Builtin/Functions/pbrMetallicRoughnessMaterial.glsl +0 -37
  251. package/Source/Shaders/Builtin/Functions/pbrMetallicRoughnessMaterial.js +0 -39
  252. package/Source/Shaders/Builtin/Functions/pbrSpecularGlossinessMaterial.glsl +0 -30
  253. package/Source/Shaders/Builtin/Functions/pbrSpecularGlossinessMaterial.js +0 -32
  254. package/Source/Shaders/Builtin/Structs/pbrParameters.glsl +0 -16
  255. package/Source/Shaders/Builtin/Structs/pbrParameters.js +0 -18
@@ -83,6 +83,7 @@ Cartographic.fromDegrees = function (longitude, latitude, height, result) {
83
83
  Check.typeOf.number("longitude", longitude);
84
84
  Check.typeOf.number("latitude", latitude);
85
85
  //>>includeEnd('debug');
86
+
86
87
  longitude = CesiumMath.toRadians(longitude);
87
88
  latitude = CesiumMath.toRadians(latitude);
88
89
 
@@ -92,37 +93,39 @@ Cartographic.fromDegrees = function (longitude, latitude, height, result) {
92
93
  const cartesianToCartographicN = new Cartesian3();
93
94
  const cartesianToCartographicP = new Cartesian3();
94
95
  const cartesianToCartographicH = new Cartesian3();
95
- const wgs84OneOverRadii = new Cartesian3(
96
+
97
+ // To avoid circular dependencies, these are set by Ellipsoid when Ellipsoid.default is set.
98
+ Cartographic._ellipsoidOneOverRadii = new Cartesian3(
96
99
  1.0 / 6378137.0,
97
100
  1.0 / 6378137.0,
98
101
  1.0 / 6356752.3142451793
99
102
  );
100
- const wgs84OneOverRadiiSquared = new Cartesian3(
103
+ Cartographic._ellipsoidOneOverRadiiSquared = new Cartesian3(
101
104
  1.0 / (6378137.0 * 6378137.0),
102
105
  1.0 / (6378137.0 * 6378137.0),
103
106
  1.0 / (6356752.3142451793 * 6356752.3142451793)
104
107
  );
105
- const wgs84CenterToleranceSquared = CesiumMath.EPSILON1;
108
+ Cartographic._ellipsoidCenterToleranceSquared = CesiumMath.EPSILON1;
106
109
 
107
110
  /**
108
111
  * Creates a new Cartographic instance from a Cartesian position. The values in the
109
112
  * resulting object will be in radians.
110
113
  *
111
114
  * @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.
112
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
115
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.
113
116
  * @param {Cartographic} [result] The object onto which to store the result.
114
117
  * @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.
115
118
  */
116
119
  Cartographic.fromCartesian = function (cartesian, ellipsoid, result) {
117
120
  const oneOverRadii = defined(ellipsoid)
118
121
  ? ellipsoid.oneOverRadii
119
- : wgs84OneOverRadii;
122
+ : Cartographic._ellipsoidOneOverRadii;
120
123
  const oneOverRadiiSquared = defined(ellipsoid)
121
124
  ? ellipsoid.oneOverRadiiSquared
122
- : wgs84OneOverRadiiSquared;
125
+ : Cartographic._ellipsoidOneOverRadiiSquared;
123
126
  const centerToleranceSquared = defined(ellipsoid)
124
127
  ? ellipsoid._centerToleranceSquared
125
- : wgs84CenterToleranceSquared;
128
+ : Cartographic._ellipsoidCenterToleranceSquared;
126
129
 
127
130
  //`cartesian is required.` is thrown from scaleToGeodeticSurface
128
131
  const p = scaleToGeodeticSurface(
@@ -165,7 +168,7 @@ Cartographic.fromCartesian = function (cartesian, ellipsoid, result) {
165
168
  * object should be in radians.
166
169
  *
167
170
  * @param {Cartographic} cartographic Input to be converted into a Cartesian3 output.
168
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
171
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the position lies.
169
172
  * @param {Cartesian3} [result] The object onto which to store the result.
170
173
  * @returns {Cartesian3} The position
171
174
  */
@@ -5,6 +5,7 @@ import Check from "./Check.js";
5
5
  import Credit from "./Credit.js";
6
6
  import defaultValue from "./defaultValue.js";
7
7
  import defined from "./defined.js";
8
+ import Ellipsoid from "./Ellipsoid.js";
8
9
  import Event from "./Event.js";
9
10
  import GeographicTilingScheme from "./GeographicTilingScheme.js";
10
11
  import WebMercatorTilingScheme from "./WebMercatorTilingScheme.js";
@@ -45,7 +46,7 @@ function LayerInformation(layer) {
45
46
  * @property {boolean} [requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server, in the form of per vertex normals if available.
46
47
  * @property {boolean} [requestWaterMask=false] Flag that indicates if the client should request per tile water masks from the server, if available.
47
48
  * @property {boolean} [requestMetadata=true] Flag that indicates if the client should request per tile metadata from the server, if available.
48
- * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
49
+ * @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
49
50
  * @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
50
51
  */
51
52
 
@@ -61,7 +62,7 @@ function TerrainProviderBuilder(options) {
61
62
  this.requestVertexNormals = defaultValue(options.requestVertexNormals, false);
62
63
  this.requestWaterMask = defaultValue(options.requestWaterMask, false);
63
64
  this.requestMetadata = defaultValue(options.requestMetadata, true);
64
- this.ellipsoid = options.ellipsoid;
65
+ this.ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
65
66
 
66
67
  this.heightmapWidth = 65;
67
68
  this.heightmapStructure = undefined;
@@ -15,7 +15,7 @@ import VertexFormat from "./VertexFormat.js";
15
15
  * @param {object} options Object with the following properties:
16
16
  * @param {Cartesian3} options.center The circle's center point in the fixed frame.
17
17
  * @param {number} options.radius The radius in meters.
18
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the circle will be on.
18
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid the circle will be on.
19
19
  * @param {number} [options.height=0.0] The distance in meters between the circle and the ellipsoid surface.
20
20
  * @param {number} [options.granularity=0.02] The angular distance between points on the circle in radians.
21
21
  * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
@@ -90,7 +90,7 @@ const scratchEllipseGeometry = new EllipseGeometry({
90
90
  const scratchOptions = {
91
91
  center: new Cartesian3(),
92
92
  radius: undefined,
93
- ellipsoid: Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),
93
+ ellipsoid: Ellipsoid.clone(Ellipsoid.default),
94
94
  height: undefined,
95
95
  extrudedHeight: undefined,
96
96
  granularity: undefined,
@@ -123,6 +123,10 @@ CircleGeometry.unpack = function (array, startingIndex, result) {
123
123
  ellipseGeometry._ellipsoid,
124
124
  scratchOptions.ellipsoid
125
125
  );
126
+ scratchOptions.ellipsoid = Ellipsoid.clone(
127
+ ellipseGeometry._ellipsoid,
128
+ scratchEllipseGeometry._ellipsoid
129
+ );
126
130
  scratchOptions.height = ellipseGeometry._height;
127
131
  scratchOptions.extrudedHeight = ellipseGeometry._extrudedHeight;
128
132
  scratchOptions.granularity = ellipseGeometry._granularity;
@@ -14,7 +14,7 @@ import Ellipsoid from "./Ellipsoid.js";
14
14
  * @param {object} options Object with the following properties:
15
15
  * @param {Cartesian3} options.center The circle's center point in the fixed frame.
16
16
  * @param {number} options.radius The radius in meters.
17
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the circle will be on.
17
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid the circle will be on.
18
18
  * @param {number} [options.height=0.0] The distance in meters between the circle and the ellipsoid surface.
19
19
  * @param {number} [options.granularity=0.02] The angular distance between points on the circle in radians.
20
20
  * @param {number} [options.extrudedHeight=0.0] The distance in meters between the circle's extruded face and the ellipsoid surface.
@@ -231,7 +231,7 @@ function createGeometryFromPolygon(
231
231
  * @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
232
232
  * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
233
233
  * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
234
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
234
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
235
235
  * @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points.
236
236
  *
237
237
  * @example
@@ -259,7 +259,7 @@ function CoplanarPolygonGeometry(options) {
259
259
  this._polygonHierarchy = polygonHierarchy;
260
260
  this._stRotation = defaultValue(options.stRotation, 0.0);
261
261
  this._ellipsoid = Ellipsoid.clone(
262
- defaultValue(options.ellipsoid, Ellipsoid.WGS84)
262
+ defaultValue(options.ellipsoid, Ellipsoid.default)
263
263
  );
264
264
  this._workerName = "createCoplanarPolygonGeometry";
265
265
  this._textureCoordinates = textureCoordinates;
@@ -291,7 +291,7 @@ function CoplanarPolygonGeometry(options) {
291
291
  * @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
292
292
  * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
293
293
  * @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
294
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
294
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
295
295
  * @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points.
296
296
  * @returns {CoplanarPolygonGeometry}
297
297
  *
@@ -1050,7 +1050,7 @@ function computeRectangle(positions, ellipsoid, width, cornerType, result) {
1050
1050
  * @param {object} options Object with the following properties:
1051
1051
  * @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor.
1052
1052
  * @param {number} options.width The distance between the edges of the corridor in meters.
1053
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
1053
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
1054
1054
  * @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.
1055
1055
  * @param {number} [options.height=0] The distance in meters between the ellipsoid surface and the positions.
1056
1056
  * @param {number} [options.extrudedHeight] The distance in meters between the ellipsoid surface and the extruded face.
@@ -1084,7 +1084,7 @@ function CorridorGeometry(options) {
1084
1084
 
1085
1085
  this._positions = positions;
1086
1086
  this._ellipsoid = Ellipsoid.clone(
1087
- defaultValue(options.ellipsoid, Ellipsoid.WGS84)
1087
+ defaultValue(options.ellipsoid, Ellipsoid.default)
1088
1088
  );
1089
1089
  this._vertexFormat = VertexFormat.clone(
1090
1090
  defaultValue(options.vertexFormat, VertexFormat.DEFAULT)
@@ -1246,7 +1246,7 @@ CorridorGeometry.unpack = function (array, startingIndex, result) {
1246
1246
  * @param {object} options Object with the following properties:
1247
1247
  * @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor.
1248
1248
  * @param {number} options.width The distance between the edges of the corridor in meters.
1249
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
1249
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
1250
1250
  * @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
1251
1251
  * @param {Rectangle} [result] An object in which to store the result.
1252
1252
  *
@@ -1262,7 +1262,7 @@ CorridorGeometry.computeRectangle = function (options, result) {
1262
1262
  Check.defined("options.width", width);
1263
1263
  //>>includeEnd('debug');
1264
1264
 
1265
- const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
1265
+ const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
1266
1266
  const cornerType = defaultValue(options.cornerType, CornerType.ROUNDED);
1267
1267
 
1268
1268
  return computeRectangle(positions, ellipsoid, width, cornerType, result);
@@ -361,7 +361,7 @@ function computePositionsExtruded(params) {
361
361
  * @param {object} options Object with the following properties:
362
362
  * @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor outline.
363
363
  * @param {number} options.width The distance between the edges of the corridor outline.
364
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
364
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to be used as a reference.
365
365
  * @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.
366
366
  * @param {number} [options.height=0] The distance in meters between the positions and the ellipsoid surface.
367
367
  * @param {number} [options.extrudedHeight] The distance in meters between the extruded face and the ellipsoid surface.
@@ -390,7 +390,7 @@ function CorridorOutlineGeometry(options) {
390
390
 
391
391
  this._positions = positions;
392
392
  this._ellipsoid = Ellipsoid.clone(
393
- defaultValue(options.ellipsoid, Ellipsoid.WGS84)
393
+ defaultValue(options.ellipsoid, Ellipsoid.default)
394
394
  );
395
395
  this._width = width;
396
396
  this._height = Math.max(height, extrudedHeight);
@@ -9,7 +9,7 @@ const creditToId = {};
9
9
  /**
10
10
  * A credit contains data pertaining to how to display attributions/credits for certain content on the screen.
11
11
  * @param {string} html An string representing an html code snippet
12
- * @param {boolean} [showOnScreen=false] If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover
12
+ * @param {boolean} [showOnScreen=false] If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover. All credits are displayed `inline`, if you have an image we recommend sizing it correctly to match the text or use css to `vertical-align` it.
13
13
  *
14
14
  * @alias Credit
15
15
  * @constructor
@@ -18,7 +18,7 @@ const creditToId = {};
18
18
  *
19
19
  * @example
20
20
  * // Create a credit with a tooltip, image and link
21
- * const credit = new Cesium.Credit('<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png" title="Cesium"/></a>');
21
+ * const credit = new Cesium.Credit('<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png" style="vertical-align: -7px" title="Cesium"/></a>');
22
22
  */
23
23
  function Credit(html, showOnScreen) {
24
24
  //>>includeStart('debug', pragmas.debug);
@@ -95,6 +95,7 @@ Object.defineProperties(Credit.prototype, {
95
95
  const html = DOMPurify.sanitize(this._html);
96
96
 
97
97
  const div = document.createElement("div");
98
+ div.className = "cesium-credit-wrapper";
98
99
  div._creditId = this._id;
99
100
  div.style.display = "inline";
100
101
  div.innerHTML = html;
@@ -35,9 +35,9 @@ import TerrainProvider from "./TerrainProvider.js";
35
35
  * @param {TilingScheme} [options.tilingScheme] The tiling scheme specifying how the ellipsoidal
36
36
  * surface is broken into tiles. If this parameter is not provided, a {@link GeographicTilingScheme}
37
37
  * is used.
38
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
38
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid. If the tilingScheme is specified,
39
39
  * this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
40
- * parameter is specified, the WGS84 ellipsoid is used.
40
+ * parameter is specified, the default ellipsoid is used.
41
41
  * @param {Credit|string} [options.credit] A credit for the data source, which is displayed on the canvas.
42
42
  *
43
43
  * @example
@@ -67,7 +67,7 @@ function CustomHeightmapTerrainProvider(options) {
67
67
  this._tilingScheme = options.tilingScheme;
68
68
  if (!defined(this._tilingScheme)) {
69
69
  this._tilingScheme = new GeographicTilingScheme({
70
- ellipsoid: defaultValue(options.ellipsoid, Ellipsoid.WGS84),
70
+ ellipsoid: defaultValue(options.ellipsoid, Ellipsoid.default),
71
71
  });
72
72
  }
73
73
 
@@ -160,6 +160,20 @@ Object.defineProperties(CustomHeightmapTerrainProvider.prototype, {
160
160
  },
161
161
  },
162
162
 
163
+ /**
164
+ * Gets an object that can be used to determine availability of terrain from this provider, such as
165
+ * at points and in rectangles. This property may be undefined if availability
166
+ * information is not available.
167
+ * @memberof CustomHeightmapTerrainProvider.prototype
168
+ * @type {TileAvailability}
169
+ * @readonly
170
+ */
171
+ availability: {
172
+ get: function () {
173
+ return undefined;
174
+ },
175
+ },
176
+
163
177
  /**
164
178
  * Gets the number of columns per heightmap tile.
165
179
  * @memberof CustomHeightmapTerrainProvider.prototype
@@ -892,7 +892,7 @@ function computeRectangle(
892
892
  * @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
893
893
  * @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
894
894
  * @param {number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
895
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the ellipse will be on.
895
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid the ellipse will be on.
896
896
  * @param {number} [options.height=0.0] The distance in meters between the ellipse and the ellipsoid surface.
897
897
  * @param {number} [options.extrudedHeight] The distance in meters between the ellipse's extruded face and the ellipsoid surface.
898
898
  * @param {number} [options.rotation=0.0] The angle of rotation counter-clockwise from north.
@@ -921,7 +921,7 @@ function EllipseGeometry(options) {
921
921
  options = defaultValue(options, defaultValue.EMPTY_OBJECT);
922
922
 
923
923
  const center = options.center;
924
- const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
924
+ const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
925
925
  const semiMajorAxis = options.semiMajorAxis;
926
926
  const semiMinorAxis = options.semiMinorAxis;
927
927
  const granularity = defaultValue(
@@ -1109,7 +1109,7 @@ EllipseGeometry.unpack = function (array, startingIndex, result) {
1109
1109
  * @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
1110
1110
  * @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
1111
1111
  * @param {number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
1112
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the ellipse will be on.
1112
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid the ellipse will be on.
1113
1113
  * @param {number} [options.rotation=0.0] The angle of rotation counter-clockwise from north.
1114
1114
  * @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The angular distance between points on the ellipse in radians.
1115
1115
  * @param {Rectangle} [result] An object in which to store the result
@@ -1120,7 +1120,7 @@ EllipseGeometry.computeRectangle = function (options, result) {
1120
1120
  options = defaultValue(options, defaultValue.EMPTY_OBJECT);
1121
1121
 
1122
1122
  const center = options.center;
1123
- const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
1123
+ const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
1124
1124
  const semiMajorAxis = options.semiMajorAxis;
1125
1125
  const semiMinorAxis = options.semiMinorAxis;
1126
1126
  const granularity = defaultValue(
@@ -188,7 +188,7 @@ function computeExtrudedEllipse(options) {
188
188
  * @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
189
189
  * @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
190
190
  * @param {number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
191
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the ellipse will be on.
191
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid the ellipse will be on.
192
192
  * @param {number} [options.height=0.0] The distance in meters between the ellipse and the ellipsoid surface.
193
193
  * @param {number} [options.extrudedHeight] The distance in meters between the ellipse's extruded face and the ellipsoid surface.
194
194
  * @param {number} [options.rotation=0.0] The angle from north (counter-clockwise) in radians.
@@ -214,7 +214,7 @@ function EllipseOutlineGeometry(options) {
214
214
  options = defaultValue(options, defaultValue.EMPTY_OBJECT);
215
215
 
216
216
  const center = options.center;
217
- const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
217
+ const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
218
218
  const semiMajorAxis = options.semiMajorAxis;
219
219
  const semiMinorAxis = options.semiMinorAxis;
220
220
  const granularity = defaultValue(
@@ -255,6 +255,40 @@ Ellipsoid.MOON = Object.freeze(
255
255
  )
256
256
  );
257
257
 
258
+ Ellipsoid._default = Ellipsoid.WGS84;
259
+ Object.defineProperties(Ellipsoid, {
260
+ /**
261
+ * The default ellipsoid used when not otherwise specified.
262
+ * @memberof Ellipsoid
263
+ * @type {Ellipsoid}
264
+ * @example
265
+ * Cesium.Ellipsoid.default = Cesium.Ellipsoid.MOON;
266
+ *
267
+ * // Apollo 11 landing site
268
+ * const position = Cesium.Cartesian3.fromRadians(
269
+ * 0.67416,
270
+ * 23.47315,
271
+ * );
272
+ */
273
+ default: {
274
+ get: function () {
275
+ return Ellipsoid._default;
276
+ },
277
+ set: function (value) {
278
+ //>>includeStart('debug', pragmas.debug);
279
+ Check.typeOf.object("value", value);
280
+ //>>includeEnd('debug');
281
+
282
+ Ellipsoid._default = value;
283
+ Cartesian3._ellipsoidRadiiSquared = value.radiiSquared;
284
+ Cartographic._ellipsoidOneOverRadii = value.oneOverRadii;
285
+ Cartographic._ellipsoidOneOverRadiiSquared = value.oneOverRadiiSquared;
286
+ Cartographic._ellipsoidCenterToleranceSquared =
287
+ value._centerToleranceSquared;
288
+ },
289
+ },
290
+ });
291
+
258
292
  /**
259
293
  * Duplicates an Ellipsoid instance.
260
294
  *
@@ -280,10 +280,10 @@ function computeProperties(ellipsoidGeodesic, start, end, ellipsoid) {
280
280
  *
281
281
  * @param {Cartographic} [start] The initial planetodetic point on the path.
282
282
  * @param {Cartographic} [end] The final planetodetic point on the path.
283
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the geodesic lies.
283
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the geodesic lies.
284
284
  */
285
285
  function EllipsoidGeodesic(start, end, ellipsoid) {
286
- const e = defaultValue(ellipsoid, Ellipsoid.WGS84);
286
+ const e = defaultValue(ellipsoid, Ellipsoid.default);
287
287
  this._ellipsoid = e;
288
288
  this._start = new Cartographic();
289
289
  this._end = new Cartographic();
@@ -385,12 +385,12 @@ function interpolateUsingSurfaceDistance(
385
385
  *
386
386
  * @param {Cartographic} [start] The initial planetodetic point on the path.
387
387
  * @param {Cartographic} [end] The final planetodetic point on the path.
388
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rhumb line lies.
388
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the rhumb line lies.
389
389
  *
390
390
  * @exception {DeveloperError} angle between start and end must be at least 0.0125 radians.
391
391
  */
392
392
  function EllipsoidRhumbLine(start, end, ellipsoid) {
393
- const e = defaultValue(ellipsoid, Ellipsoid.WGS84);
393
+ const e = defaultValue(ellipsoid, Ellipsoid.default);
394
394
  this._ellipsoid = e;
395
395
  this._start = new Cartographic();
396
396
  this._end = new Cartographic();
@@ -481,7 +481,7 @@ Object.defineProperties(EllipsoidRhumbLine.prototype, {
481
481
  * @param {Cartographic} start The initial planetodetic point on the path.
482
482
  * @param {number} heading The heading in radians.
483
483
  * @param {number} distance The rhumb line distance between the start and end point.
484
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rhumb line lies.
484
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid on which the rhumb line lies.
485
485
  * @param {EllipsoidRhumbLine} [result] The object in which to store the result.
486
486
  * @returns {EllipsoidRhumbLine} The EllipsoidRhumbLine object.
487
487
  */
@@ -499,7 +499,7 @@ EllipsoidRhumbLine.fromStartHeadingDistance = function (
499
499
  Check.typeOf.number.greaterThan("distance", distance, 0.0);
500
500
  //>>includeEnd('debug');
501
501
 
502
- const e = defaultValue(ellipsoid, Ellipsoid.WGS84);
502
+ const e = defaultValue(ellipsoid, Ellipsoid.default);
503
503
  const major = e.maximumRadius;
504
504
  const minor = e.minimumRadius;
505
505
  const majorSquared = major * major;
@@ -22,7 +22,7 @@ const scratchCart4 = new Cartesian4();
22
22
  * @constructor
23
23
  *
24
24
  * @param {Cartesian3} origin The point on the surface of the ellipsoid where the tangent plane touches.
25
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
25
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to use.
26
26
  *
27
27
  * @exception {DeveloperError} origin must not be at the center of the ellipsoid.
28
28
  */
@@ -31,7 +31,7 @@ function EllipsoidTangentPlane(origin, ellipsoid) {
31
31
  Check.defined("origin", origin);
32
32
  //>>includeEnd('debug');
33
33
 
34
- ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
34
+ ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
35
35
  origin = ellipsoid.scaleToGeodeticSurface(origin);
36
36
 
37
37
  //>>includeStart('debug', pragmas.debug);
@@ -136,7 +136,7 @@ const tmp = new AxisAlignedBoundingBox();
136
136
  * point of the provided Cartesians.
137
137
  *
138
138
  * @param {Cartesian3[]} cartesians The list of positions surrounding the center point.
139
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
139
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to use.
140
140
  * @returns {EllipsoidTangentPlane} The new instance of EllipsoidTangentPlane.
141
141
  */
142
142
  EllipsoidTangentPlane.fromPoints = function (cartesians, ellipsoid) {
@@ -17,9 +17,9 @@ import TerrainProvider from "./TerrainProvider.js";
17
17
  * @param {TilingScheme} [options.tilingScheme] The tiling scheme specifying how the ellipsoidal
18
18
  * surface is broken into tiles. If this parameter is not provided, a {@link GeographicTilingScheme}
19
19
  * is used.
20
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
20
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid. If the tilingScheme is specified,
21
21
  * this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
22
- * parameter is specified, the WGS84 ellipsoid is used.
22
+ * parameter is specified, the default ellipsoid is used.
23
23
  *
24
24
  * @see TerrainProvider
25
25
  */
@@ -29,7 +29,7 @@ function EllipsoidTerrainProvider(options) {
29
29
  this._tilingScheme = options.tilingScheme;
30
30
  if (!defined(this._tilingScheme)) {
31
31
  this._tilingScheme = new GeographicTilingScheme({
32
- ellipsoid: defaultValue(options.ellipsoid, Ellipsoid.WGS84),
32
+ ellipsoid: defaultValue(options.ellipsoid, Ellipsoid.default),
33
33
  });
34
34
  }
35
35
 
@@ -8,18 +8,18 @@ import Ellipsoid from "./Ellipsoid.js";
8
8
  /**
9
9
  * A simple map projection where longitude and latitude are linearly mapped to X and Y by multiplying
10
10
  * them by the {@link Ellipsoid#maximumRadius}. This projection
11
- * is commonly known as geographic, equirectangular, equidistant cylindrical, or plate carrée. It
11
+ * is commonly known as geographic, equirectangular, equidistant cylindrical, or plate carrée. When using the WGS84 ellipsoid, it
12
12
  * is also known as EPSG:4326.
13
13
  *
14
14
  * @alias GeographicProjection
15
15
  * @constructor
16
16
  *
17
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid.
17
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid.
18
18
  *
19
19
  * @see WebMercatorProjection
20
20
  */
21
21
  function GeographicProjection(ellipsoid) {
22
- this._ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
22
+ this._ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
23
23
  this._semimajorAxis = this._ellipsoid.maximumRadius;
24
24
  this._oneOverSemimajorAxis = 1.0 / this._semimajorAxis;
25
25
  }
@@ -102,4 +102,5 @@ GeographicProjection.prototype.unproject = function (cartesian, result) {
102
102
  result.height = height;
103
103
  return result;
104
104
  };
105
+
105
106
  export default GeographicProjection;
@@ -16,8 +16,8 @@ import Rectangle from "./Rectangle.js";
16
16
  * @constructor
17
17
  *
18
18
  * @param {object} [options] Object with the following properties:
19
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid whose surface is being tiled. Defaults to
20
- * the WGS84 ellipsoid.
19
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid whose surface is being tiled. Defaults to
20
+ * the default ellipsoid.
21
21
  * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the tiling scheme.
22
22
  * @param {number} [options.numberOfLevelZeroTilesX=2] The number of tiles in the X direction at level zero of
23
23
  * the tile tree.
@@ -27,7 +27,7 @@ import Rectangle from "./Rectangle.js";
27
27
  function GeographicTilingScheme(options) {
28
28
  options = defaultValue(options, defaultValue.EMPTY_OBJECT);
29
29
 
30
- this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
30
+ this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
31
31
  this._rectangle = defaultValue(options.rectangle, Rectangle.MAX_VALUE);
32
32
  this._projection = new GeographicProjection(this._ellipsoid);
33
33
  this._numberOfLevelZeroTilesX = defaultValue(
@@ -687,7 +687,7 @@ GeometryPipeline.projectTo2D = function (
687
687
  projectedValues[index++] = projectedLonLat.z;
688
688
  }
689
689
 
690
- // Rename original cartesians to WGS84 cartesians.
690
+ // Rename original cartesians to ellipsoid cartesians.
691
691
  geometry.attributes[attributeName3D] = attribute;
692
692
 
693
693
  // Replace original cartesians with 2D projected cartesians
@@ -1902,7 +1902,7 @@ const splitTriangleResult = {
1902
1902
  };
1903
1903
 
1904
1904
  function splitTriangle(p0, p1, p2) {
1905
- // In WGS84 coordinates, for a triangle approximately on the
1905
+ // In ellipsoid coordinates, for a triangle approximately on the
1906
1906
  // ellipsoid to cross the IDL, first it needs to be on the
1907
1907
  // negative side of the plane x = 0.
1908
1908
  if (p0.x >= 0.0 || p1.x >= 0.0 || p2.x >= 0.0) {
@@ -69,7 +69,7 @@ TerrainCache.prototype.tidy = function () {
69
69
  *
70
70
  * Initialization options for GoogleEarthEnterpriseTerrainProvider constructor
71
71
  *
72
- * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
72
+ * @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
73
73
  * @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
74
74
  */
75
75
 
@@ -33,7 +33,7 @@ GoogleMaps.mapTilesApiEndpoint = new Resource({
33
33
 
34
34
  GoogleMaps.getDefaultCredit = function () {
35
35
  return new Credit(
36
- `<img src="https://assets.ion-development.cesium.com/google-credit.png" alt="Google">`,
36
+ `<img src="https://assets.ion.cesium.com/google-credit.png" style="vertical-align: -5px" alt="Google">`,
37
37
  true
38
38
  );
39
39
  };
@@ -121,7 +121,7 @@ function GroundPolylineGeometry(options) {
121
121
  */
122
122
  this.arcType = defaultValue(options.arcType, ArcType.GEODESIC);
123
123
 
124
- this._ellipsoid = Ellipsoid.WGS84;
124
+ this._ellipsoid = Ellipsoid.default;
125
125
 
126
126
  // MapProjections can't be packed, so store the index to a known MapProjection.
127
127
  this._projectionIndex = 0;
@@ -62,7 +62,7 @@ const maximumScratch = new Cartesian3();
62
62
  * @param {boolean} [options.isGeographic=true] True if the heightmap uses a {@link GeographicProjection}, or false if it uses
63
63
  * a {@link WebMercatorProjection}.
64
64
  * @param {Cartesian3} [options.relativeToCenter=Cartesian3.ZERO] The positions will be computed as <code>Cartesian3.subtract(worldPosition, relativeToCenter)</code>.
65
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to which the heightmap applies.
65
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.default] The ellipsoid to which the heightmap applies.
66
66
  * @param {object} [options.structure] An object describing the structure of the height data.
67
67
  * @param {number} [options.structure.heightScale=1.0] The factor by which to multiply height samples in order to obtain
68
68
  * the height above the heightOffset, in meters. The heightOffset is added to the resulting
@@ -149,7 +149,7 @@ HeightmapTessellator.computeVertices = function (options) {
149
149
  const hasSkirts = skirtHeight > 0.0;
150
150
 
151
151
  const isGeographic = defaultValue(options.isGeographic, true);
152
- const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
152
+ const ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.default);
153
153
 
154
154
  const oneOverGlobeSemimajorAxis = 1.0 / ellipsoid.maximumRadius;
155
155
 
@@ -4,7 +4,7 @@ import Resource from "./Resource.js";
4
4
 
5
5
  let defaultTokenCredit;
6
6
  const defaultAccessToken =
7
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkYzAzYzE4NS0yZmJiLTQ5NzUtOWJlYS0zNjdkMzc2ODBmZDgiLCJpZCI6MjU5LCJpYXQiOjE3MTQ1NzE1MDN9.tIhlyfC7MHSWrQmoAqkvQdXMbg3igaC2HIbQp1HKCVM";
7
+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyYTI3ZDMxOS1mODc4LTQ5NzktOGUzNy04OTA0ZGI5MmM1NGIiLCJpZCI6MjU5LCJpYXQiOjE3MTk4NDM5OTN9.FDHD-mZOIAzA9J_kzOz6AkKK2PHzl2yoMbFqbpsfH6Q";
8
8
  /**
9
9
  * Default settings for accessing the Cesium ion API.
10
10
  *
@@ -205,7 +205,6 @@ CesiumMath.FOUR_GIGABYTES = 4 * 1024 * 1024 * 1024;
205
205
  * @param {number} value The value to return the sign of.
206
206
  * @returns {number} The sign of value.
207
207
  */
208
- // eslint-disable-next-line es/no-math-sign
209
208
  CesiumMath.sign = defaultValue(Math.sign, function sign(value) {
210
209
  value = +value; // coerce to number
211
210
  if (value === 0 || value !== value) {
@@ -292,7 +291,6 @@ CesiumMath.normalize = function (value, rangeMinimum, rangeMaximum) {
292
291
  * @param {number} value The number whose hyperbolic sine is to be returned.
293
292
  * @returns {number} The hyperbolic sine of <code>value</code>.
294
293
  */
295
- // eslint-disable-next-line es/no-math-sinh
296
294
  CesiumMath.sinh = defaultValue(Math.sinh, function sinh(value) {
297
295
  return (Math.exp(value) - Math.exp(-value)) / 2.0;
298
296
  });
@@ -317,7 +315,6 @@ CesiumMath.sinh = defaultValue(Math.sinh, function sinh(value) {
317
315
  * @param {number} value The number whose hyperbolic cosine is to be returned.
318
316
  * @returns {number} The hyperbolic cosine of <code>value</code>.
319
317
  */
320
- // eslint-disable-next-line es/no-math-cosh
321
318
  CesiumMath.cosh = defaultValue(Math.cosh, function cosh(value) {
322
319
  return (Math.exp(value) + Math.exp(-value)) / 2.0;
323
320
  });
@@ -1034,7 +1031,6 @@ CesiumMath.logBase = function (number, base) {
1034
1031
  * @param {number} [number] The number.
1035
1032
  * @returns {number} The result.
1036
1033
  */
1037
- // eslint-disable-next-line es/no-math-cbrt
1038
1034
  CesiumMath.cbrt = defaultValue(Math.cbrt, function cbrt(number) {
1039
1035
  const result = Math.pow(Math.abs(number), 1.0 / 3.0);
1040
1036
  return number < 0.0 ? -result : result;
@@ -1047,7 +1043,6 @@ CesiumMath.cbrt = defaultValue(Math.cbrt, function cbrt(number) {
1047
1043
  * @param {number} number The number.
1048
1044
  * @returns {number} The result.
1049
1045
  */
1050
- // eslint-disable-next-line es/no-math-log2
1051
1046
  CesiumMath.log2 = defaultValue(Math.log2, function log2(number) {
1052
1047
  return Math.log(number) * Math.LOG2E;
1053
1048
  });