@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
@@ -28,6 +28,7 @@ import ImageryLayerCollection from "./ImageryLayerCollection.js";
28
28
  import QuadtreePrimitive from "./QuadtreePrimitive.js";
29
29
  import SceneMode from "./SceneMode.js";
30
30
  import ShadowMode from "./ShadowMode.js";
31
+ import CesiumMath from "../Core/Math.js";
31
32
 
32
33
  /**
33
34
  * The globe rendered in the scene, including its terrain ({@link Globe#terrainProvider})
@@ -36,11 +37,11 @@ import ShadowMode from "./ShadowMode.js";
36
37
  * @alias Globe
37
38
  * @constructor
38
39
  *
39
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] Determines the size and shape of the
40
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] Determines the size and shape of the
40
41
  * globe.
41
42
  */
42
43
  function Globe(ellipsoid) {
43
- ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
44
+ ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
44
45
  const terrainProvider = new EllipsoidTerrainProvider({
45
46
  ellipsoid: ellipsoid,
46
47
  });
@@ -191,9 +192,9 @@ function Globe(ellipsoid) {
191
192
  * Enable the ground atmosphere, which is drawn over the globe when viewed from a distance between <code>lightingFadeInDistance</code> and <code>lightingFadeOutDistance</code>.
192
193
  *
193
194
  * @type {boolean}
194
- * @default true
195
+ * @default true when using the WGS84 ellipsoid, false otherwise
195
196
  */
196
- this.showGroundAtmosphere = true;
197
+ this.showGroundAtmosphere = Ellipsoid.WGS84.equals(ellipsoid);
197
198
 
198
199
  /**
199
200
  * The intensity of the light that is used for computing the ground atmosphere color.
@@ -250,18 +251,19 @@ function Globe(ellipsoid) {
250
251
  * when <code>enableLighting</code> or <code>showGroundAtmosphere</code> is <code>true</code>.
251
252
  *
252
253
  * @type {number}
253
- * @default 10000000.0
254
+ * @default 1/2 * pi * ellipsoid.minimumRadius
254
255
  */
255
- this.lightingFadeOutDistance = 1.0e7;
256
+ this.lightingFadeOutDistance =
257
+ CesiumMath.PI_OVER_TWO * ellipsoid.minimumRadius;
256
258
 
257
259
  /**
258
260
  * The distance where lighting resumes. This only takes effect
259
261
  * when <code>enableLighting</code> or <code>showGroundAtmosphere</code> is <code>true</code>.
260
262
  *
261
263
  * @type {number}
262
- * @default 20000000.0
264
+ * @default pi * ellipsoid.minimumRadius
263
265
  */
264
- this.lightingFadeInDistance = 2.0e7;
266
+ this.lightingFadeInDistance = CesiumMath.PI * ellipsoid.minimumRadius;
265
267
 
266
268
  /**
267
269
  * The distance where the darkness of night from the ground atmosphere fades out to a lit ground atmosphere.
@@ -269,9 +271,9 @@ function Globe(ellipsoid) {
269
271
  * <code>dynamicAtmosphereLighting</code> are <code>true</code>.
270
272
  *
271
273
  * @type {number}
272
- * @default 10000000.0
274
+ * @default 1/2 * pi * ellipsoid.minimumRadius
273
275
  */
274
- this.nightFadeOutDistance = 1.0e7;
276
+ this.nightFadeOutDistance = CesiumMath.PI_OVER_TWO * ellipsoid.minimumRadius;
275
277
 
276
278
  /**
277
279
  * The distance where the darkness of night from the ground atmosphere fades in to an unlit ground atmosphere.
@@ -279,9 +281,10 @@ function Globe(ellipsoid) {
279
281
  * <code>dynamicAtmosphereLighting</code> are <code>true</code>.
280
282
  *
281
283
  * @type {number}
282
- * @default 50000000.0
284
+ * @default 5/2 * pi * ellipsoid.minimumRadius
283
285
  */
284
- this.nightFadeInDistance = 5.0e7;
286
+ this.nightFadeInDistance =
287
+ 5.0 * CesiumMath.PI_OVER_TWO * ellipsoid.minimumRadius;
285
288
 
286
289
  /**
287
290
  * True if an animated wave effect should be shown in areas of the globe
@@ -809,7 +812,7 @@ Globe.prototype.pick = function (ray, scene, result) {
809
812
  if (defined(result) && scene.mode !== SceneMode.SCENE3D) {
810
813
  result = Cartesian3.fromElements(result.y, result.z, result.x, result);
811
814
  const carto = scene.mapProjection.unproject(result, cartoScratch);
812
- result = scene.globe.ellipsoid.cartographicToCartesian(carto, result);
815
+ result = this._ellipsoid.cartographicToCartesian(carto, result);
813
816
  }
814
817
 
815
818
  return result;
@@ -142,10 +142,7 @@ GltfLoaderUtil.createModelTextureReader = function (options) {
142
142
  let texCoord = defaultValue(textureInfo.texCoord, 0);
143
143
  let transform;
144
144
 
145
- const textureTransform = defaultValue(
146
- textureInfo.extensions,
147
- defaultValue.EMPTY_OBJECT
148
- ).KHR_texture_transform;
145
+ const textureTransform = textureInfo.extensions?.KHR_texture_transform;
149
146
 
150
147
  if (defined(textureTransform)) {
151
148
  texCoord = defaultValue(textureTransform.texCoord, texCoord);
@@ -177,6 +174,7 @@ GltfLoaderUtil.createModelTextureReader = function (options) {
177
174
  modelTextureReader.index = textureInfo.index;
178
175
  modelTextureReader.texture = texture;
179
176
  modelTextureReader.texCoord = texCoord;
177
+ modelTextureReader.scale = textureInfo.scale;
180
178
  modelTextureReader.transform = transform;
181
179
  modelTextureReader.channels = channels;
182
180
 
@@ -45,7 +45,7 @@ GoogleEarthEnterpriseDiscardPolicy.prototype.shouldDiscardImage = function (
45
45
  *
46
46
  * Initialization options for the GoogleEarthEnterpriseImageryProvider constructor
47
47
  *
48
- * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
48
+ * @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
49
49
  * @property {TileDiscardPolicy} [tileDiscardPolicy] The policy that determines if a tile
50
50
  * is invalid and should be discarded. If this value is not specified, a default
51
51
  * is to discard tiles that fail to download.
@@ -41,7 +41,7 @@ import ImageryProvider from "./ImageryProvider.js";
41
41
  * @property {TileDiscardPolicy} [tileDiscardPolicy] The policy that determines if a tile
42
42
  * is invalid and should be discarded. To ensure that no tiles are discarded, construct and pass
43
43
  * a {@link NeverTileDiscardPolicy} for this parameter.
44
- * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
44
+ * @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
45
45
  */
46
46
 
47
47
  /**
@@ -14,9 +14,9 @@ const defaultBackgroundColor = new Color(0.0, 0.5, 0.0, 0.2);
14
14
  * Initialization options for the GridImageryProvider constructor
15
15
  *
16
16
  * @property {TilingScheme} [tilingScheme=new GeographicTilingScheme()] The tiling scheme for which to draw tiles.
17
- * @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
17
+ * @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If the tilingScheme is specified,
18
18
  * this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
19
- * parameter is specified, the WGS84 ellipsoid is used.
19
+ * parameter is specified, the default ellipsoid is used.
20
20
  * @property {number} [cells=8] The number of grids cells.
21
21
  * @property {Color} [color=Color(1.0, 1.0, 1.0, 0.4)] The color to draw grid lines.
22
22
  * @property {Color} [glowColor=Color(0.0, 1.0, 0.0, 0.05)] The color to draw glow for grid lines.
@@ -186,8 +186,8 @@ Object.defineProperties(ImageBasedLighting.prototype, {
186
186
  * </p>
187
187
  *
188
188
  * These values can be obtained by preprocessing the environment map using the <code>cmgen</code> tool of
189
- * {@link https://github.com/google/filament/releases|Google's Filament project}. This will also generate a KTX file that can be
190
- * supplied to {@link Model#specularEnvironmentMaps}.
189
+ * {@link https://github.com/google/filament/releases|Google's Filament project}.
190
+ * Be sure to use the <code>--no-mirror</code> option in <code>cmgen</code>.
191
191
  *
192
192
  * @memberof ImageBasedLighting.prototype
193
193
  *
@@ -436,7 +436,7 @@ ImageryLayerCollection.prototype.pickImageryLayers = function (ray, scene) {
436
436
  return;
437
437
  }
438
438
 
439
- const pickedLocation = scene.globe.ellipsoid.cartesianToCartographic(
439
+ const pickedLocation = scene.ellipsoid.cartesianToCartographic(
440
440
  pickedPosition
441
441
  );
442
442
 
@@ -491,7 +491,7 @@ ImageryLayerCollection.prototype.pickImageryLayerFeatures = function (
491
491
  return;
492
492
  }
493
493
 
494
- const pickedLocation = scene.globe.ellipsoid.cartesianToCartographic(
494
+ const pickedLocation = scene.ellipsoid.cartesianToCartographic(
495
495
  pickedPosition
496
496
  );
497
497
 
@@ -19,7 +19,7 @@ const defaultCredit = new Credit(
19
19
  * @property {string} mapId The Mapbox Map ID.
20
20
  * @property {string} accessToken The public access token for the imagery.
21
21
  * @property {string} [format='png'] The format of the image request.
22
- * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
22
+ * @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
23
23
  * @property {number} [minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
24
24
  * this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
25
25
  * to result in rendering problems.
@@ -21,7 +21,7 @@ const defaultCredit = new Credit(
21
21
  * @property {string} accessToken The public access token for the imagery.
22
22
  * @property {number} [tilesize=512] The size of the image tiles.
23
23
  * @property {boolean} [scaleFactor] Determines if tiles are rendered at a @2x scale factor.
24
- * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
24
+ * @property {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid. If not specified, the default ellipsoid is used.
25
25
  * @property {number} [minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
26
26
  * this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
27
27
  * to result in rendering problems.
@@ -65,7 +65,7 @@ const MetadataSemantic = {
65
65
  */
66
66
  TILE_BOUNDING_SPHERE: "TILE_BOUNDING_SPHERE",
67
67
  /**
68
- * The minimum height of a tile above (or below) the WGS84 ellipsoid, stored as a <code>FLOAT32</code> or a <code>FLOAT64</code>. This semantic is used to tighten bounding regions implicitly calculated in implicit tiling.
68
+ * The minimum height of a tile above (or below) the ellipsoid, stored as a <code>FLOAT32</code> or a <code>FLOAT64</code>. This semantic is used to tighten bounding regions implicitly calculated in implicit tiling.
69
69
  *
70
70
  * @type {string}
71
71
  * @constant
@@ -73,7 +73,7 @@ const MetadataSemantic = {
73
73
  */
74
74
  TILE_MINIMUM_HEIGHT: "TILE_MINIMUM_HEIGHT",
75
75
  /**
76
- * The maximum height of a tile above (or below) the WGS84 ellipsoid, stored as a <code>FLOAT32</code> or a <code>FLOAT64</code>. This semantic is used to tighten bounding regions implicitly calculated in implicit tiling.
76
+ * The maximum height of a tile above (or below) the ellipsoid, stored as a <code>FLOAT32</code> or a <code>FLOAT64</code>. This semantic is used to tighten bounding regions implicitly calculated in implicit tiling.
77
77
  *
78
78
  * @type {string}
79
79
  * @constant
@@ -123,7 +123,7 @@ const MetadataSemantic = {
123
123
  */
124
124
  CONTENT_BOUNDING_SPHERE: "CONTENT_BOUNDING_SPHERE",
125
125
  /**
126
- * The minimum height of the content of a tile above (or below) the WGS84 ellipsoid, stored as a <code>FLOAT32</code> or a <code>FLOAT64</code>
126
+ * The minimum height of the content of a tile above (or below) the ellipsoid, stored as a <code>FLOAT32</code> or a <code>FLOAT64</code>
127
127
  *
128
128
  * @type {string}
129
129
  * @constant
@@ -131,7 +131,7 @@ const MetadataSemantic = {
131
131
  */
132
132
  CONTENT_MINIMUM_HEIGHT: "CONTENT_MINIMUM_HEIGHT",
133
133
  /**
134
- * The maximum height of the content of a tile above (or below) the WGS84 ellipsoid, stored as a <code>FLOAT32</code> or a <code>FLOAT64</code>
134
+ * The maximum height of the content of a tile above (or below) the ellipsoid, stored as a <code>FLOAT32</code> or a <code>FLOAT64</code>
135
135
  *
136
136
  * @type {string}
137
137
  * @constant
@@ -276,7 +276,7 @@ function projectPositionTo2D(
276
276
  projectedPositionScratch
277
277
  );
278
278
 
279
- result = SceneTransforms.computeActualWgs84Position(
279
+ result = SceneTransforms.computeActualEllipsoidPosition(
280
280
  frameState,
281
281
  finalPosition,
282
282
  result
@@ -432,7 +432,7 @@ function computeReferencePoint2D(renderResources, frameState) {
432
432
  scratchProjectedMin
433
433
  );
434
434
 
435
- const projectedMin = SceneTransforms.computeActualWgs84Position(
435
+ const projectedMin = SceneTransforms.computeActualEllipsoidPosition(
436
436
  frameState,
437
437
  transformedPositionMin,
438
438
  transformedPositionMin
@@ -444,7 +444,7 @@ function computeReferencePoint2D(renderResources, frameState) {
444
444
  scratchProjectedMax
445
445
  );
446
446
 
447
- const projectedMax = SceneTransforms.computeActualWgs84Position(
447
+ const projectedMax = SceneTransforms.computeActualEllipsoidPosition(
448
448
  frameState,
449
449
  transformedPositionMax,
450
450
  transformedPositionMax
@@ -216,6 +216,44 @@ function processTextureTransform(
216
216
  };
217
217
  }
218
218
 
219
+ /**
220
+ * Process a single texture scale and add it to the shader and uniform map.
221
+ *
222
+ * @param {ShaderBuilder} shaderBuilder The shader builder to modify
223
+ * @param {Object<string, Function>} uniformMap The uniform map to modify.
224
+ * @param {ModelComponents.TextureReader} textureReader The texture to add to the shader
225
+ * @param {string} uniformName The name of the sampler uniform such as <code>u_baseColorTexture</code>
226
+ * @param {string} defineName The name of the texture for use in the defines, minus any prefix or suffix. For example, "BASE_COLOR" or "EMISSIVE"
227
+ *
228
+ * @private
229
+ */
230
+ function processTextureScale(
231
+ shaderBuilder,
232
+ uniformMap,
233
+ textureReader,
234
+ uniformName,
235
+ defineName
236
+ ) {
237
+ // Add a define to enable the texture transformation code in the shader.
238
+ const transformDefine = `HAS_${defineName}_TEXTURE_SCALE`;
239
+ shaderBuilder.addDefine(
240
+ transformDefine,
241
+ undefined,
242
+ ShaderDestination.FRAGMENT
243
+ );
244
+
245
+ // Add a uniform for the transformation matrix
246
+ const scaleUniformName = `${uniformName}Scale`;
247
+ shaderBuilder.addUniform(
248
+ "float",
249
+ scaleUniformName,
250
+ ShaderDestination.FRAGMENT
251
+ );
252
+ uniformMap[scaleUniformName] = function () {
253
+ return textureReader.scale;
254
+ };
255
+ }
256
+
219
257
  /**
220
258
  * Process a single texture and add it to the shader and uniform map.
221
259
  *
@@ -274,6 +312,17 @@ function processTexture(
274
312
  defineName
275
313
  );
276
314
  }
315
+
316
+ const { scale } = textureReader;
317
+ if (defined(scale) && scale !== 1.0) {
318
+ processTextureScale(
319
+ shaderBuilder,
320
+ uniformMap,
321
+ textureReader,
322
+ uniformName,
323
+ defineName
324
+ );
325
+ }
277
326
  }
278
327
 
279
328
  function processMaterialUniforms(
@@ -2123,8 +2123,7 @@ function updateClamping(model) {
2123
2123
  return;
2124
2124
  }
2125
2125
 
2126
- const globe = scene.globe;
2127
- const ellipsoid = defaultValue(globe?.ellipsoid, Ellipsoid.WGS84);
2126
+ const ellipsoid = defaultValue(scene.ellipsoid, Ellipsoid.default);
2128
2127
 
2129
2128
  // Compute cartographic position so we don't recompute every update
2130
2129
  const modelMatrix = model.modelMatrix;
@@ -2206,7 +2205,7 @@ function updateComputedScale(model, modelMatrix, frameState) {
2206
2205
  Matrix4.getTranslation(modelMatrix, scratchPosition);
2207
2206
 
2208
2207
  if (model._sceneMode !== SceneMode.SCENE3D) {
2209
- SceneTransforms.computeActualWgs84Position(
2208
+ SceneTransforms.computeActualEllipsoidPosition(
2210
2209
  frameState,
2211
2210
  scratchPosition,
2212
2211
  scratchPosition
@@ -2252,7 +2251,7 @@ function updatePickIds(model) {
2252
2251
 
2253
2252
  // Matrix3 is a row-major constructor.
2254
2253
  // The same constructor in GLSL will produce the transpose of this.
2255
- const yUpToZUp = new Matrix3(-1, 0, 0, 0, 0, 1, 0, -1, 0);
2254
+ const yUpToZUp = new Matrix3(1, 0, 0, 0, 0, 1, 0, -1, 0);
2256
2255
 
2257
2256
  function updateReferenceMatrices(model, frameState) {
2258
2257
  const modelMatrix = defined(model._clampedModelMatrix)
@@ -2465,7 +2464,11 @@ function passesDistanceDisplayCondition(model, frameState) {
2465
2464
 
2466
2465
  // This will project the position if the scene is in Columbus View,
2467
2466
  // but leave the position as-is in 3D mode.
2468
- SceneTransforms.computeActualWgs84Position(frameState, position, position);
2467
+ SceneTransforms.computeActualEllipsoidPosition(
2468
+ frameState,
2469
+ position,
2470
+ position
2471
+ );
2469
2472
 
2470
2473
  distanceSquared = Cartesian3.distanceSquared(
2471
2474
  position,
@@ -351,7 +351,7 @@ function computeModelMatrix2D(sceneGraph, frameState) {
351
351
  );
352
352
  } else {
353
353
  const center = sceneGraph.boundingSphere.center;
354
- const to2D = Transforms.wgs84To2DModelMatrix(
354
+ const to2D = Transforms.ellipsoidTo2DModelMatrix(
355
355
  frameState.mapProjection,
356
356
  center,
357
357
  sceneGraph._computedModelMatrix2D
@@ -145,7 +145,7 @@ function computeBoundingSphere2D(renderResources, modelMatrix, frameState) {
145
145
  scratchProjectedMin
146
146
  );
147
147
 
148
- const projectedMin = SceneTransforms.computeActualWgs84Position(
148
+ const projectedMin = SceneTransforms.computeActualEllipsoidPosition(
149
149
  frameState,
150
150
  transformedPositionMin,
151
151
  transformedPositionMin
@@ -157,7 +157,7 @@ function computeBoundingSphere2D(renderResources, modelMatrix, frameState) {
157
157
  scratchProjectedMax
158
158
  );
159
159
 
160
- const projectedMax = SceneTransforms.computeActualWgs84Position(
160
+ const projectedMax = SceneTransforms.computeActualEllipsoidPosition(
161
161
  frameState,
162
162
  transformedPositionMax,
163
163
  transformedPositionMax
@@ -244,7 +244,7 @@ function createPositionsTypedArrayFor2D(
244
244
  initialPosition
245
245
  );
246
246
 
247
- const projectedPosition = SceneTransforms.computeActualWgs84Position(
247
+ const projectedPosition = SceneTransforms.computeActualEllipsoidPosition(
248
248
  frameState,
249
249
  transformedPosition,
250
250
  transformedPosition
@@ -35,7 +35,7 @@ const scratchBoundingSphere = new BoundingSphere();
35
35
  * @param {FrameState} frameState The frame state.
36
36
  * @param {number} [verticalExaggeration=1.0] A scalar used to exaggerate the height of a position relative to the ellipsoid. If the value is 1.0 there will be no effect.
37
37
  * @param {number} [relativeHeight=0.0] The ellipsoid height relative to which a position is exaggerated. If the value is 0.0 the position will be exaggerated relative to the ellipsoid surface.
38
- * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to which the exaggerated position is relative.
38
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.default] The ellipsoid to which the exaggerated position is relative.
39
39
  * @param {Cartesian3|undefined} [result] The intersection or <code>undefined</code> if none was found.
40
40
  * @returns {Cartesian3|undefined} The intersection or <code>undefined</code> if none was found.
41
41
  *
@@ -280,7 +280,7 @@ export default function pickModel(
280
280
  return;
281
281
  }
282
282
 
283
- ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
283
+ ellipsoid = defaultValue(ellipsoid, Ellipsoid.default);
284
284
  verticalExaggeration = defaultValue(verticalExaggeration, 1.0);
285
285
  relativeHeight = defaultValue(relativeHeight, 0.0);
286
286
 
@@ -1187,6 +1187,15 @@ function TextureReader() {
1187
1187
  */
1188
1188
  this.transform = Matrix3.clone(Matrix3.IDENTITY);
1189
1189
 
1190
+ /**
1191
+ * Scale to apply to texture values.
1192
+ *
1193
+ * @type {number}
1194
+ * @default 1.0
1195
+ * @private
1196
+ */
1197
+ this.scale = 1.0;
1198
+
1190
1199
  /**
1191
1200
  * The texture channels to read from. When undefined all channels are read.
1192
1201
  *
@@ -337,11 +337,10 @@ OctahedralProjectedCubeMap.prototype.update = function (frameState) {
337
337
  },
338
338
  });
339
339
 
340
- // We only need up to 6 mip levels to avoid artifacts.
341
- const length = Math.min(cubeMapBuffers.length, 6);
342
- this._maximumMipmapLevel = length - 1;
343
- const cubeMaps = (this._cubeMaps = new Array(length));
344
- const mipTextures = (this._mipTextures = new Array(length));
340
+ const mipLevels = cubeMapBuffers.length;
341
+ this._maximumMipmapLevel = mipLevels - 1;
342
+ const cubeMaps = (this._cubeMaps = new Array(mipLevels));
343
+ const mipTextures = (this._mipTextures = new Array(mipLevels));
345
344
  const originalSize = cubeMapBuffers[0].positiveX.width * 2.0;
346
345
  const uniformMap = {
347
346
  originalSize: function () {
@@ -350,7 +349,7 @@ OctahedralProjectedCubeMap.prototype.update = function (frameState) {
350
349
  };
351
350
 
352
351
  // First we project each cubemap onto a flat octahedron, and write that to a texture.
353
- for (let i = 0; i < length; ++i) {
352
+ for (let i = 0; i < mipLevels; ++i) {
354
353
  // Swap +Y/-Y faces since the octahedral projection expects this order.
355
354
  const positiveY = cubeMapBuffers[i].positiveY;
356
355
  cubeMapBuffers[i].positiveY = cubeMapBuffers[i].negativeY;
@@ -525,7 +525,7 @@ Picking.prototype.pickPositionWorldCoordinates = function (
525
525
  uniformState.updateFrustum(frustum);
526
526
  }
527
527
 
528
- result = SceneTransforms.drawingBufferToWgs84Coordinates(
528
+ result = SceneTransforms.drawingBufferToWorldCoordinates(
529
529
  scene,
530
530
  drawingBufferPosition,
531
531
  depth,
@@ -1112,10 +1112,7 @@ const scratchSurfaceRay = new Ray();
1112
1112
  const scratchCartographic = new Cartographic();
1113
1113
 
1114
1114
  function getRayForSampleHeight(scene, cartographic) {
1115
- const globe = scene.globe;
1116
- const ellipsoid = defined(globe)
1117
- ? globe.ellipsoid
1118
- : scene.mapProjection.ellipsoid;
1115
+ const ellipsoid = scene.ellipsoid;
1119
1116
  const height = ApproximateTerrainHeights._defaultMaxTerrainHeight;
1120
1117
  const surfaceNormal = ellipsoid.geodeticSurfaceNormalCartographic(
1121
1118
  cartographic,
@@ -1136,10 +1133,7 @@ function getRayForSampleHeight(scene, cartographic) {
1136
1133
  }
1137
1134
 
1138
1135
  function getRayForClampToHeight(scene, cartesian) {
1139
- const globe = scene.globe;
1140
- const ellipsoid = defined(globe)
1141
- ? globe.ellipsoid
1142
- : scene.mapProjection.ellipsoid;
1136
+ const ellipsoid = scene.ellipsoid;
1143
1137
  const cartographic = Cartographic.fromCartesian(
1144
1138
  cartesian,
1145
1139
  ellipsoid,
@@ -1149,10 +1143,7 @@ function getRayForClampToHeight(scene, cartesian) {
1149
1143
  }
1150
1144
 
1151
1145
  function getHeightFromCartesian(scene, cartesian) {
1152
- const globe = scene.globe;
1153
- const ellipsoid = defined(globe)
1154
- ? globe.ellipsoid
1155
- : scene.mapProjection.ellipsoid;
1146
+ const ellipsoid = scene.ellipsoid;
1156
1147
  const cartographic = Cartographic.fromCartesian(
1157
1148
  cartesian,
1158
1149
  ellipsoid,
@@ -11,6 +11,7 @@ import Matrix4 from "../Core/Matrix4.js";
11
11
  import NearFarScalar from "../Core/NearFarScalar.js";
12
12
  import SceneMode from "./SceneMode.js";
13
13
  import SceneTransforms from "./SceneTransforms.js";
14
+ import SplitDirection from "./SplitDirection.js";
14
15
 
15
16
  /**
16
17
  * <div class="notice">
@@ -117,6 +118,11 @@ function PointPrimitive(options, pointPrimitiveCollection) {
117
118
  this._pointPrimitiveCollection = pointPrimitiveCollection;
118
119
  this._dirty = false;
119
120
  this._index = -1; //Used only by PointPrimitiveCollection
121
+
122
+ this._splitDirection = defaultValue(
123
+ options.splitDirection,
124
+ SplitDirection.NONE
125
+ );
120
126
  }
121
127
 
122
128
  const SHOW_INDEX = (PointPrimitive.SHOW_INDEX = 0);
@@ -129,7 +135,8 @@ const SCALE_BY_DISTANCE_INDEX = (PointPrimitive.SCALE_BY_DISTANCE_INDEX = 6);
129
135
  const TRANSLUCENCY_BY_DISTANCE_INDEX = (PointPrimitive.TRANSLUCENCY_BY_DISTANCE_INDEX = 7);
130
136
  const DISTANCE_DISPLAY_CONDITION_INDEX = (PointPrimitive.DISTANCE_DISPLAY_CONDITION_INDEX = 8);
131
137
  const DISABLE_DEPTH_DISTANCE_INDEX = (PointPrimitive.DISABLE_DEPTH_DISTANCE_INDEX = 9);
132
- PointPrimitive.NUMBER_OF_PROPERTIES = 10;
138
+ const SPLIT_DIRECTION_INDEX = (PointPrimitive.SPLIT_DIRECTION_INDEX = 10);
139
+ PointPrimitive.NUMBER_OF_PROPERTIES = 11;
133
140
 
134
141
  function makeDirty(pointPrimitive, propertyChanged) {
135
142
  const pointPrimitiveCollection = pointPrimitive._pointPrimitiveCollection;
@@ -486,6 +493,24 @@ Object.defineProperties(PointPrimitive.prototype, {
486
493
  }
487
494
  },
488
495
  },
496
+
497
+ /**
498
+ * The {@link SplitDirection} to apply to this point.
499
+ * @memberof PointPrimitive.prototype
500
+ * @type {SplitDirection}
501
+ * @default {@link SplitDirection.NONE}
502
+ */
503
+ splitDirection: {
504
+ get: function () {
505
+ return this._splitDirection;
506
+ },
507
+ set: function (value) {
508
+ if (this._splitDirection !== value) {
509
+ this._splitDirection = value;
510
+ makeDirty(this, SPLIT_DIRECTION_INDEX);
511
+ }
512
+ },
513
+ },
489
514
  });
490
515
 
491
516
  PointPrimitive.prototype.getPickId = function (context) {
@@ -520,7 +545,10 @@ PointPrimitive._computeActualPosition = function (
520
545
  }
521
546
 
522
547
  Matrix4.multiplyByPoint(modelMatrix, position, tempCartesian3);
523
- return SceneTransforms.computeActualWgs84Position(frameState, tempCartesian3);
548
+ return SceneTransforms.computeActualEllipsoidPosition(
549
+ frameState,
550
+ tempCartesian3
551
+ );
524
552
  };
525
553
 
526
554
  const scratchCartesian4 = new Cartesian4();
@@ -544,7 +572,7 @@ PointPrimitive._computeScreenSpacePosition = function (
544
572
  ),
545
573
  scratchCartesian4
546
574
  );
547
- const positionWC = SceneTransforms.wgs84ToWindowCoordinates(
575
+ const positionWC = SceneTransforms.worldToWindowCoordinates(
548
576
  scene,
549
577
  positionWorld,
550
578
  result
@@ -657,7 +685,8 @@ PointPrimitive.prototype.equals = function (other) {
657
685
  this._distanceDisplayCondition,
658
686
  other._distanceDisplayCondition
659
687
  ) &&
660
- this._disableDepthTestDistance === other._disableDepthTestDistance)
688
+ this._disableDepthTestDistance === other._disableDepthTestDistance &&
689
+ this._splitDirection === other._splitDirection)
661
690
  );
662
691
  };
663
692