@cesium/engine 9.2.0 → 10.1.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 (301) hide show
  1. package/Build/Workers/{chunk-GOQEANLM.js → chunk-2GEAGYUY.js} +13 -13
  2. package/Build/Workers/{chunk-WOYQB5HM.js → chunk-2J3JKXCP.js} +5 -5
  3. package/Build/Workers/{chunk-IXYFH7DV.js → chunk-3WUV74WM.js} +2 -2
  4. package/Build/Workers/{chunk-WHDEZSAL.js → chunk-4MSUJ4I7.js} +8 -8
  5. package/Build/Workers/chunk-4RMIRG6T.js +1800 -0
  6. package/Build/Workers/{chunk-CVCVMOQA.js → chunk-4VFBBNQ3.js} +1 -1
  7. package/Build/Workers/{chunk-ZHJDE6JN.js → chunk-4YSNMHZ4.js} +6 -6
  8. package/Build/Workers/{chunk-YGNQJ4YI.js → chunk-5BLJ5ZM6.js} +5 -5
  9. package/Build/Workers/{chunk-4RG6WOXH.js → chunk-5KWHSZYL.js} +11 -11
  10. package/Build/Workers/{chunk-BBBTT36L.js → chunk-5O6JWQ4E.js} +14 -14
  11. package/Build/Workers/{chunk-GX2BWBN2.js → chunk-65MZOUNU.js} +14 -14
  12. package/Build/Workers/{chunk-K5F23SZO.js → chunk-6D66DPRV.js} +7 -7
  13. package/Build/Workers/{chunk-2TRB253J.js → chunk-6OFDHMHR.js} +7 -7
  14. package/Build/Workers/{chunk-U6MTSO6A.js → chunk-76BYYG7N.js} +424 -449
  15. package/Build/Workers/{chunk-3PV5HQ2R.js → chunk-A5CODJ4M.js} +6 -6
  16. package/Build/Workers/{chunk-IF2OX6R4.js → chunk-AA4GZKOT.js} +1 -1
  17. package/Build/Workers/{chunk-OYP23VAL.js → chunk-ACRTCBN5.js} +11 -11
  18. package/Build/Workers/chunk-B75IEX2S.js +390 -0
  19. package/Build/Workers/{chunk-EODIOQ35.js → chunk-BAVI3ZS2.js} +1 -1
  20. package/Build/Workers/{chunk-CFBGPZU6.js → chunk-BBDZYSZB.js} +10 -10
  21. package/Build/Workers/{chunk-LZFFO4KB.js → chunk-BGE4QVG7.js} +12 -12
  22. package/Build/Workers/chunk-BY3E4ONI.js +456 -0
  23. package/Build/Workers/{chunk-RDR4KVPA.js → chunk-C3Z23UUJ.js} +18 -18
  24. package/Build/Workers/{chunk-I6CW7ZE5.js → chunk-C45MU4GZ.js} +10 -8
  25. package/Build/Workers/chunk-CF7P7K7E.js +684 -0
  26. package/Build/Workers/{chunk-KTZK2UDR.js → chunk-D2U4RI64.js} +7 -7
  27. package/Build/Workers/{chunk-QZIWFSRM.js → chunk-D4K27X2M.js} +4 -4
  28. package/Build/Workers/{chunk-UYKG3UFK.js → chunk-DKVHRNFY.js} +5 -5
  29. package/Build/Workers/{chunk-5OK5JFDP.js → chunk-EB7PNZTK.js} +5 -5
  30. package/Build/Workers/{chunk-7PFZ4Z7C.js → chunk-ELI4BUOT.js} +11 -9
  31. package/Build/Workers/chunk-F3NDOSTZ.js +963 -0
  32. package/Build/Workers/{chunk-3VDHTBY5.js → chunk-FDCLACT5.js} +10 -10
  33. package/Build/Workers/{chunk-BNT2SNWU.js → chunk-FEVVHITK.js} +4 -4
  34. package/Build/Workers/{chunk-7HLZRYGD.js → chunk-FOZWUH4T.js} +7 -7
  35. package/Build/Workers/chunk-FQPSOOPH.js +258 -0
  36. package/Build/Workers/{chunk-A5CSB5ZE.js → chunk-G5V4GPZE.js} +9 -9
  37. package/Build/Workers/{chunk-TDIGL45B.js → chunk-GNHZH7HP.js} +1 -1
  38. package/Build/Workers/{chunk-26NE4LRW.js → chunk-GPJR7MPQ.js} +11 -8
  39. package/Build/Workers/chunk-GWT64LKY.js +171 -0
  40. package/Build/Workers/{chunk-PUQR43HZ.js → chunk-HGEEOMSC.js} +6 -6
  41. package/Build/Workers/{chunk-SC3TBKST.js → chunk-I2RC4XVN.js} +4 -4
  42. package/Build/Workers/chunk-IUROUBPA.js +300 -0
  43. package/Build/Workers/{chunk-G7IAO7CW.js → chunk-J7MQUQJY.js} +7 -7
  44. package/Build/Workers/chunk-JNLWLSTP.js +476 -0
  45. package/Build/Workers/{chunk-TP4FFUAH.js → chunk-JYQNWIQQ.js} +2 -2
  46. package/Build/Workers/{chunk-RRUO4QEK.js → chunk-KUN2ZA5X.js} +4 -4
  47. package/Build/Workers/chunk-KV4EQHK4.js +1477 -0
  48. package/Build/Workers/chunk-LSSWVB2X.js +138 -0
  49. package/Build/Workers/{chunk-EJZVBTX4.js → chunk-LXQ5QAEJ.js} +6 -6
  50. package/Build/Workers/chunk-MBZH7YZ7.js +945 -0
  51. package/Build/Workers/{chunk-WP3LCUOE.js → chunk-MKXWJTFQ.js} +13 -13
  52. package/Build/Workers/{chunk-AROLUUGS.js → chunk-MMV6TO3P.js} +2 -2
  53. package/Build/Workers/{chunk-ETC45PHH.js → chunk-MSKXMXJI.js} +4 -4
  54. package/Build/Workers/chunk-N4QEHO3U.js +75 -0
  55. package/Build/Workers/chunk-NVOABL76.js +100 -0
  56. package/Build/Workers/chunk-OAPA2RTG.js +239 -0
  57. package/Build/Workers/{chunk-PHT53MCH.js → chunk-OE4MCOC7.js} +13 -13
  58. package/Build/Workers/chunk-OJF4RTJG.js +634 -0
  59. package/Build/Workers/{chunk-UICVDDCQ.js → chunk-OOK53QUQ.js} +1 -1
  60. package/Build/Workers/{chunk-W4OS542B.js → chunk-OOMCT7OL.js} +13 -13
  61. package/Build/Workers/{chunk-YGTWKLFY.js → chunk-OWGTMVDB.js} +19 -19
  62. package/Build/Workers/{chunk-GUFV24F4.js → chunk-OXALEQPI.js} +61 -17
  63. package/Build/Workers/chunk-OXSI7N4C.js +768 -0
  64. package/Build/Workers/{chunk-26XJDV3D.js → chunk-PNFHVBSF.js} +15 -15
  65. package/Build/Workers/chunk-POSRARY7.js +834 -0
  66. package/Build/Workers/{chunk-GX5LMUGZ.js → chunk-PYHLO636.js} +42 -13
  67. package/Build/Workers/chunk-Q55ECN3Y.js +37 -0
  68. package/Build/Workers/chunk-QD4KM3GO.js +138 -0
  69. package/Build/Workers/chunk-QMLTCCYG.js +55 -0
  70. package/Build/Workers/chunk-QX5XS4LC.js +101 -0
  71. package/Build/Workers/{chunk-UKJCFXVV.js → chunk-QYQIVZBU.js} +6 -6
  72. package/Build/Workers/chunk-R3TKLC6E.js +1075 -0
  73. package/Build/Workers/chunk-R4OIEIPE.js +500 -0
  74. package/Build/Workers/chunk-R4ZEWO4I.js +122 -0
  75. package/Build/Workers/chunk-R6B7UCQB.js +44 -0
  76. package/Build/Workers/chunk-RCK55EDX.js +691 -0
  77. package/Build/Workers/chunk-RHBWXX7C.js +629 -0
  78. package/Build/Workers/chunk-RZLZWKFN.js +305 -0
  79. package/Build/Workers/{chunk-DIVFF6DK.js → chunk-S3PI2KFM.js} +2 -2
  80. package/Build/Workers/chunk-SAPFXU5X.js +102 -0
  81. package/Build/Workers/chunk-T6LPN7RI.js +2857 -0
  82. package/Build/Workers/{chunk-U2LSTOMA.js → chunk-T77JILCU.js} +2 -2
  83. package/Build/Workers/chunk-TBBFDFCS.js +368 -0
  84. package/Build/Workers/chunk-TF776XCO.js +1258 -0
  85. package/Build/Workers/chunk-TGY6H6N6.js +163 -0
  86. package/Build/Workers/{chunk-RTIT7UDN.js → chunk-TO2PVHKI.js} +2 -2
  87. package/Build/Workers/chunk-UCIPJSZX.js +398 -0
  88. package/Build/Workers/chunk-UOEUCKKU.js +59 -0
  89. package/Build/Workers/chunk-VE7BFUIX.js +39 -0
  90. package/Build/Workers/chunk-VFBNELXB.js +353 -0
  91. package/Build/Workers/chunk-VRZ46QZ5.js +781 -0
  92. package/Build/Workers/chunk-VYWUFRRR.js +1052 -0
  93. package/Build/Workers/chunk-WVSELU6O.js +2716 -0
  94. package/Build/Workers/chunk-X23FRWHJ.js +117 -0
  95. package/Build/Workers/chunk-X2ZQ7RJR.js +287 -0
  96. package/Build/Workers/chunk-X43SJLQL.js +10364 -0
  97. package/Build/Workers/chunk-XLTOBCDI.js +220 -0
  98. package/Build/Workers/chunk-XQI7XZHX.js +196 -0
  99. package/Build/Workers/chunk-XUOJCLOH.js +511 -0
  100. package/Build/Workers/chunk-XZZNKIEV.js +157 -0
  101. package/Build/Workers/chunk-YLYBLJ3Y.js +73 -0
  102. package/Build/Workers/chunk-ZEE2EIFD.js +430 -0
  103. package/Build/Workers/chunk-ZIKGV7EL.js +58 -0
  104. package/Build/Workers/chunk-ZU334IDQ.js +421 -0
  105. package/Build/Workers/combineGeometry.js +22 -22
  106. package/Build/Workers/createBoxGeometry.js +16 -16
  107. package/Build/Workers/createBoxOutlineGeometry.js +14 -14
  108. package/Build/Workers/createCircleGeometry.js +29 -25
  109. package/Build/Workers/createCircleOutlineGeometry.js +17 -17
  110. package/Build/Workers/createCoplanarPolygonGeometry.js +32 -32
  111. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
  112. package/Build/Workers/createCorridorGeometry.js +29 -29
  113. package/Build/Workers/createCorridorOutlineGeometry.js +27 -27
  114. package/Build/Workers/createCylinderGeometry.js +18 -18
  115. package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
  116. package/Build/Workers/createEllipseGeometry.js +24 -24
  117. package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
  118. package/Build/Workers/createEllipsoidGeometry.js +17 -17
  119. package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
  120. package/Build/Workers/createFrustumGeometry.js +16 -16
  121. package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
  122. package/Build/Workers/createGeometry.js +22 -22
  123. package/Build/Workers/createGroundPolylineGeometry.js +24 -24
  124. package/Build/Workers/createPlaneGeometry.js +14 -14
  125. package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
  126. package/Build/Workers/createPolygonGeometry.js +32 -32
  127. package/Build/Workers/createPolygonOutlineGeometry.js +29 -29
  128. package/Build/Workers/createPolylineGeometry.js +24 -24
  129. package/Build/Workers/createPolylineVolumeGeometry.js +30 -30
  130. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +26 -26
  131. package/Build/Workers/createRectangleGeometry.js +27 -27
  132. package/Build/Workers/createRectangleOutlineGeometry.js +19 -19
  133. package/Build/Workers/createSimplePolylineGeometry.js +22 -22
  134. package/Build/Workers/createSphereGeometry.js +17 -17
  135. package/Build/Workers/createSphereOutlineGeometry.js +16 -16
  136. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  137. package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
  138. package/Build/Workers/createVectorTileGeometries.js +22 -22
  139. package/Build/Workers/createVectorTilePoints.js +12 -12
  140. package/Build/Workers/createVectorTilePolygons.js +20 -20
  141. package/Build/Workers/createVectorTilePolylines.js +13 -13
  142. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
  143. package/Build/Workers/createVerticesFromHeightmap.js +21 -21
  144. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
  145. package/Build/Workers/createWallGeometry.js +23 -23
  146. package/Build/Workers/createWallOutlineGeometry.js +22 -22
  147. package/Build/Workers/decodeDraco.js +11 -11
  148. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  149. package/Build/Workers/decodeI3S.js +10 -10
  150. package/Build/Workers/transcodeKTX2.js +8 -11
  151. package/Build/Workers/transferTypedArrayTest.js +1 -1
  152. package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
  153. package/Source/Core/ApproximateTerrainHeights.js +4 -4
  154. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +12 -8
  155. package/Source/Core/BoundingRectangle.js +2 -0
  156. package/Source/Core/BoundingSphere.js +4 -2
  157. package/Source/Core/Cartesian3.js +13 -10
  158. package/Source/Core/Cartographic.js +11 -8
  159. package/Source/Core/CesiumTerrainProvider.js +3 -2
  160. package/Source/Core/CircleGeometry.js +6 -2
  161. package/Source/Core/CircleOutlineGeometry.js +1 -1
  162. package/Source/Core/CoplanarPolygonGeometry.js +3 -3
  163. package/Source/Core/CorridorGeometry.js +4 -4
  164. package/Source/Core/CorridorOutlineGeometry.js +2 -2
  165. package/Source/Core/Credit.js +3 -2
  166. package/Source/Core/CustomHeightmapTerrainProvider.js +17 -3
  167. package/Source/Core/EllipseGeometry.js +4 -4
  168. package/Source/Core/EllipseOutlineGeometry.js +2 -2
  169. package/Source/Core/Ellipsoid.js +34 -0
  170. package/Source/Core/EllipsoidGeodesic.js +2 -2
  171. package/Source/Core/EllipsoidRhumbLine.js +4 -4
  172. package/Source/Core/EllipsoidTangentPlane.js +3 -3
  173. package/Source/Core/EllipsoidTerrainProvider.js +3 -3
  174. package/Source/Core/GeographicProjection.js +4 -3
  175. package/Source/Core/GeographicTilingScheme.js +3 -3
  176. package/Source/Core/GeometryPipeline.js +2 -2
  177. package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -1
  178. package/Source/Core/GoogleMaps.js +1 -1
  179. package/Source/Core/GroundPolylineGeometry.js +1 -1
  180. package/Source/Core/HeightmapTessellator.js +2 -2
  181. package/Source/Core/Ion.js +1 -1
  182. package/Source/Core/Occluder.js +3 -3
  183. package/Source/Core/OrientedBoundingBox.js +2 -2
  184. package/Source/Core/PolygonGeometry.js +4 -4
  185. package/Source/Core/PolygonGeometryLibrary.js +1 -1
  186. package/Source/Core/PolygonOutlineGeometry.js +3 -3
  187. package/Source/Core/PolygonPipeline.js +2 -2
  188. package/Source/Core/PolylineGeometry.js +2 -2
  189. package/Source/Core/PolylinePipeline.js +6 -6
  190. package/Source/Core/PolylineVolumeGeometry.js +2 -2
  191. package/Source/Core/PolylineVolumeOutlineGeometry.js +2 -2
  192. package/Source/Core/Rectangle.js +6 -6
  193. package/Source/Core/RectangleGeometry.js +6 -6
  194. package/Source/Core/RectangleGeometryLibrary.js +3 -0
  195. package/Source/Core/RectangleOutlineGeometry.js +2 -2
  196. package/Source/Core/Simon1994PlanetaryPositions.js +4 -2
  197. package/Source/Core/SimplePolylineGeometry.js +2 -2
  198. package/Source/Core/Stereographic.js +2 -2
  199. package/Source/Core/Transforms.js +154 -19
  200. package/Source/Core/VRTheWorldTerrainProvider.js +2 -2
  201. package/Source/Core/WallGeometry.js +3 -3
  202. package/Source/Core/WallOutlineGeometry.js +3 -3
  203. package/Source/Core/WebMercatorTilingScheme.js +3 -3
  204. package/Source/Core/createWorldTerrainAsync.js +2 -0
  205. package/Source/DataSources/BillboardGraphics.js +16 -0
  206. package/Source/DataSources/BillboardVisualizer.js +7 -0
  207. package/Source/DataSources/BoxGeometryUpdater.js +2 -2
  208. package/Source/DataSources/CylinderGeometryUpdater.js +2 -2
  209. package/Source/DataSources/CzmlDataSource.js +8 -8
  210. package/Source/DataSources/EllipsoidGeometryUpdater.js +3 -3
  211. package/Source/DataSources/EntityCluster.js +1 -1
  212. package/Source/DataSources/EntityView.js +2 -2
  213. package/Source/DataSources/KmlDataSource.js +4 -4
  214. package/Source/DataSources/ModelVisualizer.js +1 -2
  215. package/Source/DataSources/PathVisualizer.js +4 -4
  216. package/Source/DataSources/PointGraphics.js +17 -0
  217. package/Source/DataSources/PointVisualizer.js +12 -0
  218. package/Source/DataSources/PolygonGeometryUpdater.js +1 -1
  219. package/Source/DataSources/PolylineGeometryUpdater.js +3 -2
  220. package/Source/DataSources/PositionProperty.js +4 -7
  221. package/Source/DataSources/RectangleGeometryUpdater.js +1 -1
  222. package/Source/DataSources/ScaledPositionProperty.js +2 -2
  223. package/Source/DataSources/TerrainOffsetProperty.js +3 -7
  224. package/Source/DataSources/VelocityOrientationProperty.js +2 -2
  225. package/Source/DataSources/exportKml.js +2 -2
  226. package/Source/Renderer/AutomaticUniforms.js +1 -1
  227. package/Source/Renderer/UniformState.js +6 -12
  228. package/Source/Scene/ArcGisMapServerImageryProvider.js +2 -2
  229. package/Source/Scene/ArcGisMapService.js +1 -1
  230. package/Source/Scene/Billboard.js +35 -6
  231. package/Source/Scene/BillboardCollection.js +49 -0
  232. package/Source/Scene/BingMapsImageryProvider.js +11 -2
  233. package/Source/Scene/Camera.js +16 -10
  234. package/Source/Scene/Cesium3DTileset.js +1 -1
  235. package/Source/Scene/ClippingPolygon.js +2 -2
  236. package/Source/Scene/ClippingPolygonCollection.js +1 -1
  237. package/Source/Scene/CreditDisplay.js +94 -104
  238. package/Source/Scene/Globe.js +16 -13
  239. package/Source/Scene/GltfLoaderUtil.js +2 -4
  240. package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +1 -1
  241. package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +1 -1
  242. package/Source/Scene/GridImageryProvider.js +2 -2
  243. package/Source/Scene/ImageBasedLighting.js +2 -2
  244. package/Source/Scene/ImageryLayerCollection.js +2 -2
  245. package/Source/Scene/MapboxImageryProvider.js +1 -1
  246. package/Source/Scene/MapboxStyleImageryProvider.js +1 -1
  247. package/Source/Scene/MetadataSemantic.js +4 -4
  248. package/Source/Scene/Model/InstancingPipelineStage.js +3 -3
  249. package/Source/Scene/Model/MaterialPipelineStage.js +49 -0
  250. package/Source/Scene/Model/Model.js +8 -5
  251. package/Source/Scene/Model/ModelSceneGraph.js +1 -1
  252. package/Source/Scene/Model/SceneMode2DPipelineStage.js +3 -3
  253. package/Source/Scene/Model/pickModel.js +2 -2
  254. package/Source/Scene/ModelComponents.js +9 -0
  255. package/Source/Scene/OctahedralProjectedCubeMap.js +5 -6
  256. package/Source/Scene/Picking.js +4 -13
  257. package/Source/Scene/PointPrimitive.js +33 -4
  258. package/Source/Scene/PointPrimitiveCollection.js +22 -9
  259. package/Source/Scene/Scene.js +39 -31
  260. package/Source/Scene/SceneTransforms.js +78 -20
  261. package/Source/Scene/SceneTransitioner.js +2 -2
  262. package/Source/Scene/ScreenSpaceCameraController.js +29 -19
  263. package/Source/Scene/SkyBox.js +26 -0
  264. package/Source/Scene/Sun.js +1 -1
  265. package/Source/Shaders/BillboardCollectionFS.glsl +4 -0
  266. package/Source/Shaders/BillboardCollectionFS.js +4 -0
  267. package/Source/Shaders/BillboardCollectionVS.glsl +3 -1
  268. package/Source/Shaders/BillboardCollectionVS.js +3 -1
  269. package/Source/Shaders/BrdfLutGeneratorFS.glsl +30 -13
  270. package/Source/Shaders/BrdfLutGeneratorFS.js +30 -13
  271. package/Source/Shaders/Builtin/CzmBuiltins.js +2 -2
  272. package/Source/Shaders/Builtin/Functions/ellipsoidTextureCoordinates.glsl +10 -0
  273. package/Source/Shaders/Builtin/Functions/{ellipsoidWgs84TextureCoordinates.js → ellipsoidTextureCoordinates.js} +3 -3
  274. package/Source/Shaders/Builtin/Functions/pbrLighting.glsl +40 -39
  275. package/Source/Shaders/Builtin/Functions/pbrLighting.js +40 -39
  276. package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.glsl +1 -1
  277. package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.js +1 -1
  278. package/Source/Shaders/Builtin/Structs/materialInput.glsl +1 -1
  279. package/Source/Shaders/Builtin/Structs/materialInput.js +1 -1
  280. package/Source/Shaders/Builtin/Structs/modelMaterial.glsl +2 -0
  281. package/Source/Shaders/Builtin/Structs/modelMaterial.js +2 -0
  282. package/Source/Shaders/EllipsoidFS.glsl +1 -1
  283. package/Source/Shaders/EllipsoidFS.js +1 -1
  284. package/Source/Shaders/GlobeFS.glsl +2 -2
  285. package/Source/Shaders/GlobeFS.js +2 -2
  286. package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +23 -23
  287. package/Source/Shaders/Model/ImageBasedLightingStageFS.js +23 -23
  288. package/Source/Shaders/Model/LightingStageFS.glsl +6 -5
  289. package/Source/Shaders/Model/LightingStageFS.js +6 -5
  290. package/Source/Shaders/Model/MaterialStageFS.glsl +31 -26
  291. package/Source/Shaders/Model/MaterialStageFS.js +31 -26
  292. package/Source/Shaders/PointPrimitiveCollectionFS.glsl +4 -0
  293. package/Source/Shaders/PointPrimitiveCollectionFS.js +4 -0
  294. package/Source/Shaders/PointPrimitiveCollectionVS.glsl +9 -7
  295. package/Source/Shaders/PointPrimitiveCollectionVS.js +9 -7
  296. package/Source/Widget/CesiumWidget.css +0 -5
  297. package/Source/Widget/CesiumWidget.js +29 -28
  298. package/index.d.ts +254 -117
  299. package/index.js +45 -45
  300. package/package.json +4 -4
  301. 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,
@@ -627,6 +627,7 @@ const axesTransformation = new Matrix3(
627
627
  0.9174820620691819
628
628
  );
629
629
  let translation = new Cartesian3();
630
+
630
631
  /**
631
632
  * Computes the position of the Sun in the Earth-centered inertial frame
632
633
  *
@@ -662,7 +663,7 @@ Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame = function (
662
663
  /**
663
664
  * Computes the position of the Moon in the Earth-centered inertial frame
664
665
  *
665
- * @param {JulianDate} [julianDate] The time at which to compute the Sun's position, if not provided the current system time is used.
666
+ * @param {JulianDate} [julianDate] The time at which to compute the Moon's position, if not provided the current system time is used.
666
667
  * @param {Cartesian3} [result] The object onto which to store the result.
667
668
  * @returns {Cartesian3} Calculated moon position
668
669
  */
@@ -679,4 +680,5 @@ Simon1994PlanetaryPositions.computeMoonPositionInEarthInertialFrame = function (
679
680
 
680
681
  return result;
681
682
  };
683
+
682
684
  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
@@ -538,6 +538,35 @@ const wgs84WRPrecessing = 7.2921158553e-5;
538
538
  const twoPiOverSecondsInDay = CesiumMath.TWO_PI / 86400.0;
539
539
  let dateInUtc = new JulianDate();
540
540
 
541
+ /**
542
+ * The default function to compute a rotation matrix to transform a point or vector from the International Celestial
543
+ * Reference Frame (GCRF/ICRF) inertial frame axes to the central body, typically Earth, fixed frame axis at a given
544
+ * time for use in lighting and transformation from inertial reference frames. This function may return undefined if
545
+ * the data necessary to do the transformation is not yet loaded.
546
+ *
547
+ * @param {JulianDate} date The time at which to compute the rotation matrix.
548
+ * @param {Matrix3} [result] The object onto which to store the result. If this parameter is
549
+ * not specified, a new instance is created and returned.
550
+ * @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the
551
+ * transformation is not yet loaded.
552
+ *
553
+ * @example
554
+ * // Set the default ICRF to fixed transformation to that of the Moon.
555
+ * Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;
556
+ *
557
+ * @see Transforms.computeIcrfToFixedMatrix
558
+ * @see Transforms.computeTemeToPseudoFixedMatrix
559
+ * @see Transforms.computeIcrfToMoonFixedMatrix
560
+ */
561
+ Transforms.computeIcrfToCentralBodyFixedMatrix = function (date, result) {
562
+ let transformMatrix = Transforms.computeIcrfToFixedMatrix(date, result);
563
+ if (!defined(transformMatrix)) {
564
+ transformMatrix = Transforms.computeTemeToPseudoFixedMatrix(date, result);
565
+ }
566
+
567
+ return transformMatrix;
568
+ };
569
+
541
570
  /**
542
571
  * Computes a rotation matrix to transform a point or vector from True Equator Mean Equinox (TEME) axes to the
543
572
  * pseudo-fixed axes at a given time. This method treats the UT1 time standard as equivalent to UTC.
@@ -691,7 +720,7 @@ Transforms.preloadIcrfFixed = function (timeInterval) {
691
720
  * @param {JulianDate} date The time at which to compute the rotation matrix.
692
721
  * @param {Matrix3} [result] The object onto which to store the result. If this parameter is
693
722
  * not specified, a new instance is created and returned.
694
- * @returns {Matrix3} The rotation matrix, or undefined if the data necessary to do the
723
+ * @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the
695
724
  * transformation is not yet loaded.
696
725
  *
697
726
  *
@@ -726,6 +755,112 @@ Transforms.computeIcrfToFixedMatrix = function (date, result) {
726
755
  return Matrix3.transpose(fixedToIcrfMtx, result);
727
756
  };
728
757
 
758
+ const TdtMinusTai = 32.184;
759
+ const J2000d = 2451545;
760
+ const scratchHpr = new HeadingPitchRoll();
761
+ const scratchRotationMatrix = new Matrix3();
762
+ const dateScratch = new JulianDate();
763
+
764
+ /**
765
+ * Computes a rotation matrix to transform a point or vector from the Moon-Fixed frame axes
766
+ * to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes
767
+ * at a given time.
768
+ *
769
+ * @param {JulianDate} date The time at which to compute the rotation matrix.
770
+ * @param {Matrix3} [result] The object onto which to store the result. If this parameter is
771
+ * not specified, a new instance is created and returned.
772
+ * @returns {Matrix3} The rotation matrix.
773
+ *
774
+ * @example
775
+ * // Transform a point from the Fixed axes to the ICRF axes.
776
+ * const now = Cesium.JulianDate.now();
777
+ * const pointInFixed = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
778
+ * const fixedToIcrf = Cesium.Transforms.computeMoonFixedToIcrfMatrix(now);
779
+ * let pointInInertial = new Cesium.Cartesian3();
780
+ * if (Cesium.defined(fixedToIcrf)) {
781
+ * pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed, pointInInertial);
782
+ * }
783
+ */
784
+ Transforms.computeMoonFixedToIcrfMatrix = function (date, result) {
785
+ //>>includeStart('debug', pragmas.debug);
786
+ if (!defined(date)) {
787
+ throw new DeveloperError("date is required.");
788
+ }
789
+ //>>includeEnd('debug');
790
+
791
+ if (!defined(result)) {
792
+ result = new Matrix3();
793
+ }
794
+
795
+ // Converts TAI to TT
796
+ const secondsTT = JulianDate.addSeconds(date, TdtMinusTai, dateScratch);
797
+
798
+ // Converts TT to TDB, interval in days since the standard epoch
799
+ const d = JulianDate.totalDays(secondsTT) - J2000d;
800
+
801
+ // Compute the approximate rotation, using https://articles.adsabs.harvard.edu//full/1980CeMec..22..205D/0000209.000.html
802
+ const e1 = CesiumMath.toRadians(12.112) - CesiumMath.toRadians(0.052992) * d;
803
+ const e2 = CesiumMath.toRadians(24.224) - CesiumMath.toRadians(0.105984) * d;
804
+ const e3 = CesiumMath.toRadians(227.645) + CesiumMath.toRadians(13.012) * d;
805
+ const e4 =
806
+ CesiumMath.toRadians(261.105) + CesiumMath.toRadians(13.340716) * d;
807
+ const e5 = CesiumMath.toRadians(358.0) + CesiumMath.toRadians(0.9856) * d;
808
+
809
+ scratchHpr.pitch =
810
+ CesiumMath.toRadians(270.0 - 90) -
811
+ CesiumMath.toRadians(3.878) * Math.sin(e1) -
812
+ CesiumMath.toRadians(0.12) * Math.sin(e2) +
813
+ CesiumMath.toRadians(0.07) * Math.sin(e3) -
814
+ CesiumMath.toRadians(0.017) * Math.sin(e4);
815
+ scratchHpr.roll =
816
+ CesiumMath.toRadians(66.53 - 90) +
817
+ CesiumMath.toRadians(1.543) * Math.cos(e1) +
818
+ CesiumMath.toRadians(0.24) * Math.cos(e2) -
819
+ CesiumMath.toRadians(0.028) * Math.cos(e3) +
820
+ CesiumMath.toRadians(0.007) * Math.cos(e4);
821
+ scratchHpr.heading =
822
+ CesiumMath.toRadians(244.375 - 90) +
823
+ CesiumMath.toRadians(13.17635831) * d +
824
+ CesiumMath.toRadians(3.558) * Math.sin(e1) +
825
+ CesiumMath.toRadians(0.121) * Math.sin(e2) -
826
+ CesiumMath.toRadians(0.064) * Math.sin(e3) +
827
+ CesiumMath.toRadians(0.016) * Math.sin(e4) +
828
+ CesiumMath.toRadians(0.025) * Math.sin(e5);
829
+ return Matrix3.fromHeadingPitchRoll(scratchHpr, scratchRotationMatrix);
830
+ };
831
+
832
+ /**
833
+ * Computes a rotation matrix to transform a point or vector from the International Celestial
834
+ * Reference Frame (GCRF/ICRF) inertial frame axes to the Moon-Fixed frame axes
835
+ * at a given time.
836
+ *
837
+ * @param {JulianDate} date The time at which to compute the rotation matrix.
838
+ * @param {Matrix3} [result] The object onto which to store the result. If this parameter is
839
+ * not specified, a new instance is created and returned.
840
+ * @returns {Matrix3} The rotation matrix.
841
+ *
842
+ * @example
843
+ * // Set the default ICRF to fixed transformation to that of the Moon.
844
+ * Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;
845
+ */
846
+ Transforms.computeIcrfToMoonFixedMatrix = function (date, result) {
847
+ //>>includeStart('debug', pragmas.debug);
848
+ if (!defined(date)) {
849
+ throw new DeveloperError("date is required.");
850
+ }
851
+ //>>includeEnd('debug');
852
+ if (!defined(result)) {
853
+ result = new Matrix3();
854
+ }
855
+
856
+ const fixedToIcrfMtx = Transforms.computeMoonFixedToIcrfMatrix(date, result);
857
+ if (!defined(fixedToIcrfMtx)) {
858
+ return undefined;
859
+ }
860
+
861
+ return Matrix3.transpose(fixedToIcrfMtx, result);
862
+ };
863
+
729
864
  const xysScratch = new Iau2006XysSample(0.0, 0.0, 0.0);
730
865
  const eopScratch = new EarthOrientationParametersSample(
731
866
  0.0,
@@ -747,7 +882,7 @@ const rotation2Scratch = new Matrix3();
747
882
  * @param {JulianDate} date The time at which to compute the rotation matrix.
748
883
  * @param {Matrix3} [result] The object onto which to store the result. If this parameter is
749
884
  * not specified, a new instance is created and returned.
750
- * @returns {Matrix3} The rotation matrix, or undefined if the data necessary to do the
885
+ * @returns {Matrix3|undefined} The rotation matrix, or undefined if the data necessary to do the
751
886
  * transformation is not yet loaded.
752
887
  *
753
888
  *
@@ -950,7 +1085,7 @@ const upScratch = new Cartesian3();
950
1085
  *
951
1086
  * @param {Cartesian3} position The position to transform.
952
1087
  * @param {Cartesian3} velocity The velocity vector to transform.
953
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid whose fixed frame is used in the transformation.
1088
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid whose fixed frame is used in the transformation.
954
1089
  * @param {Matrix3} [result] The object onto which to store the result.
955
1090
  * @returns {Matrix3} The modified result parameter or a new Matrix3 instance if none was provided.
956
1091
  */
@@ -970,10 +1105,10 @@ Transforms.rotationMatrixFromPositionVelocity = function (
970
1105
  }
971
1106
  //>>includeEnd('debug');
972
1107
 
973
- const normal = defaultValue(ellipsoid, Ellipsoid.WGS84).geodeticSurfaceNormal(
974
- position,
975
- normalScratch
976
- );
1108
+ const normal = defaultValue(
1109
+ ellipsoid,
1110
+ Ellipsoid.default
1111
+ ).geodeticSurfaceNormal(position, normalScratch);
977
1112
  let right = Cartesian3.cross(velocity, normal, rightScratch);
978
1113
 
979
1114
  if (Cartesian3.equalsEpsilon(right, Cartesian3.ZERO, CesiumMath.EPSILON6)) {
@@ -1073,7 +1208,7 @@ Transforms.basisTo2D = function (projection, matrix, result) {
1073
1208
  );
1074
1209
  }
1075
1210
 
1076
- // Assuming the instance are positioned in WGS84, invert the WGS84 transform to get the local transform and then convert to 2D
1211
+ // Assuming the instance are positioned on the ellipsoid, invert the ellipsoidal transform to get the local transform and then convert to 2D
1077
1212
  const fromENU = Transforms.eastNorthUpToFixedFrame(
1078
1213
  rtcCenter,
1079
1214
  ellipsoid,
@@ -1091,7 +1226,7 @@ Transforms.basisTo2D = function (projection, matrix, result) {
1091
1226
  /**
1092
1227
  * @private
1093
1228
  */
1094
- Transforms.wgs84To2DModelMatrix = function (projection, center, result) {
1229
+ Transforms.ellipsoidTo2DModelMatrix = function (projection, center, result) {
1095
1230
  //>>includeStart('debug', pragmas.debug);
1096
1231
  if (!defined(projection)) {
1097
1232
  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;