@cesium/engine 21.0.1-ion.0 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/Build/Workers/{chunk-LSNF6CIP.js → chunk-2D3GLFZD.js} +12 -12
  2. package/Build/Workers/chunk-34YXP222.js +352 -0
  3. package/Build/Workers/{chunk-OLH67Z2S.js → chunk-3GL53OCU.js} +17 -18
  4. package/Build/Workers/{chunk-WIPOMPA5.js → chunk-5B7VZQZY.js} +6 -6
  5. package/Build/Workers/{chunk-NWJRIJQG.js → chunk-5T5SY63I.js} +2 -2
  6. package/Build/Workers/{chunk-DTYIUWZU.js → chunk-5ZF53EY6.js} +4 -4
  7. package/Build/Workers/{chunk-UTTKH2UG.js → chunk-6HBKE43B.js} +7 -7
  8. package/Build/Workers/{chunk-ZTGZMKAB.js → chunk-726NINF5.js} +16 -16
  9. package/Build/Workers/{chunk-L73TRTIG.js → chunk-75HAJIDT.js} +1 -1
  10. package/Build/Workers/{chunk-G5RX7BPJ.js → chunk-7KAXDKRU.js} +10 -10
  11. package/Build/Workers/chunk-7XEJGXX2.js +2759 -0
  12. package/Build/Workers/{chunk-ZOVMWDPW.js → chunk-A4DPJIWS.js} +18 -10
  13. package/Build/Workers/{chunk-UTL4WVC3.js → chunk-A6JAFSZT.js} +5 -5
  14. package/Build/Workers/{chunk-E6T4LSM6.js → chunk-AARZSH4V.js} +5 -5
  15. package/Build/Workers/{chunk-EEDSGIH7.js → chunk-AOM3FHBN.js} +6 -6
  16. package/Build/Workers/{chunk-WJV24LAS.js → chunk-BJSNGGBM.js} +4 -4
  17. package/Build/Workers/{chunk-VIDWZGD6.js → chunk-ECHAJNQJ.js} +12 -12
  18. package/Build/Workers/{chunk-MIFUV36K.js → chunk-EJO3NKMS.js} +1 -1
  19. package/Build/Workers/{chunk-ADADBRLI.js → chunk-EZ7NJXQN.js} +4 -4
  20. package/Build/Workers/{chunk-MJWRSKJV.js → chunk-FA3SCJDX.js} +2 -2
  21. package/Build/Workers/{chunk-XFS2ORSO.js → chunk-GYRDA3XK.js} +14 -14
  22. package/Build/Workers/{chunk-3XTJC4CV.js → chunk-H7B7FU2U.js} +7 -7
  23. package/Build/Workers/{chunk-HDBIC7IL.js → chunk-IGX772ZQ.js} +1 -1
  24. package/Build/Workers/{chunk-EHMAKCWQ.js → chunk-JDJAPBZP.js} +1 -1
  25. package/Build/Workers/{chunk-LK7H6V2E.js → chunk-JZFU2LEM.js} +4 -4
  26. package/Build/Workers/{chunk-3K4DRV7Y.js → chunk-KGLDJRSO.js} +9 -9
  27. package/Build/Workers/{chunk-LEFV6H2V.js → chunk-KUB64XW6.js} +11 -11
  28. package/Build/Workers/{chunk-26ZRRKTU.js → chunk-L7U26FFD.js} +16 -16
  29. package/Build/Workers/{chunk-T7WXNKIA.js → chunk-LEFQBK6H.js} +11 -11
  30. package/Build/Workers/{chunk-75UG66GR.js → chunk-LWJXCI3F.js} +5 -5
  31. package/Build/Workers/{chunk-ESPNIYL5.js → chunk-M7HRE4QR.js} +8 -8
  32. package/Build/Workers/{chunk-SGEAS4NZ.js → chunk-MXHRZHDF.js} +6 -6
  33. package/Build/Workers/{chunk-YFZMB6FZ.js → chunk-N52ZRKUE.js} +6 -6
  34. package/Build/Workers/{chunk-AQ4A5CMC.js → chunk-NE5JTQJP.js} +7 -7
  35. package/Build/Workers/{chunk-G74UMFQ4.js → chunk-NGKF5NTR.js} +5 -5
  36. package/Build/Workers/{chunk-TXK2FF6N.js → chunk-NHZNMTIR.js} +5 -5
  37. package/Build/Workers/{chunk-2PX2ULSM.js → chunk-OE22564R.js} +3 -3
  38. package/Build/Workers/{chunk-AGT6W3JS.js → chunk-OUBBMEWX.js} +6 -6
  39. package/Build/Workers/{chunk-JESBYOH5.js → chunk-P2H75UV5.js} +67 -33
  40. package/Build/Workers/{chunk-B56XVJRS.js → chunk-QCMRUVVF.js} +12 -12
  41. package/Build/Workers/{chunk-SDFGZML6.js → chunk-QSMIHPUM.js} +2 -2
  42. package/Build/Workers/{chunk-SF2XXYOB.js → chunk-RCCYW6E7.js} +12 -12
  43. package/Build/Workers/{chunk-EZJXK2UP.js → chunk-RQRODXVN.js} +4 -4
  44. package/Build/Workers/{chunk-WMG6UOCJ.js → chunk-SZN34LQ5.js} +10 -10
  45. package/Build/Workers/{chunk-XYBFMHXA.js → chunk-U4XMLGSR.js} +7 -7
  46. package/Build/Workers/{chunk-KGL66RWW.js → chunk-U7CX3HHE.js} +8 -8
  47. package/Build/Workers/{chunk-MFPT34BC.js → chunk-VCVA7BMD.js} +4 -4
  48. package/Build/Workers/{chunk-H3G7OYZY.js → chunk-VVZ667H6.js} +2 -2
  49. package/Build/Workers/{chunk-PQW63B2T.js → chunk-W4PIP5PG.js} +2 -2
  50. package/Build/Workers/{chunk-XPTKQIVN.js → chunk-XPVZWY4A.js} +8 -8
  51. package/Build/Workers/{chunk-OWCFUM4Z.js → chunk-XQ347YWU.js} +13 -13
  52. package/Build/Workers/{chunk-MBIUW42A.js → chunk-XZO6F23E.js} +1 -1
  53. package/Build/Workers/{chunk-6KX3IUUT.js → chunk-YLILBDWK.js} +2 -2
  54. package/Build/Workers/{chunk-RFZAUDYZ.js → chunk-YLXWC7OW.js} +4 -4
  55. package/Build/Workers/combineGeometry.js +21 -21
  56. package/Build/Workers/createBoxGeometry.js +15 -15
  57. package/Build/Workers/createBoxOutlineGeometry.js +13 -13
  58. package/Build/Workers/createCircleGeometry.js +23 -23
  59. package/Build/Workers/createCircleOutlineGeometry.js +16 -16
  60. package/Build/Workers/createCoplanarPolygonGeometry.js +30 -30
  61. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +28 -28
  62. package/Build/Workers/createCorridorGeometry.js +26 -26
  63. package/Build/Workers/createCorridorOutlineGeometry.js +25 -25
  64. package/Build/Workers/createCylinderGeometry.js +17 -17
  65. package/Build/Workers/createCylinderOutlineGeometry.js +15 -15
  66. package/Build/Workers/createEllipseGeometry.js +23 -23
  67. package/Build/Workers/createEllipseOutlineGeometry.js +16 -16
  68. package/Build/Workers/createEllipsoidGeometry.js +16 -16
  69. package/Build/Workers/createEllipsoidOutlineGeometry.js +15 -15
  70. package/Build/Workers/createFrustumGeometry.js +15 -15
  71. package/Build/Workers/createFrustumOutlineGeometry.js +15 -15
  72. package/Build/Workers/createGeometry.js +24 -22
  73. package/Build/Workers/createGroundPolylineGeometry.js +19 -19
  74. package/Build/Workers/createPlaneGeometry.js +13 -13
  75. package/Build/Workers/createPlaneOutlineGeometry.js +12 -12
  76. package/Build/Workers/createPolygonGeometry.js +29 -29
  77. package/Build/Workers/createPolygonOutlineGeometry.js +27 -27
  78. package/Build/Workers/createPolylineGeometry.js +22 -22
  79. package/Build/Workers/createPolylineVolumeGeometry.js +28 -28
  80. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +24 -24
  81. package/Build/Workers/createRectangleGeometry.js +24 -24
  82. package/Build/Workers/createRectangleOutlineGeometry.js +17 -17
  83. package/Build/Workers/createSimplePolylineGeometry.js +20 -20
  84. package/Build/Workers/createSphereGeometry.js +16 -16
  85. package/Build/Workers/createSphereOutlineGeometry.js +15 -15
  86. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  87. package/Build/Workers/createVectorTileClampedPolylines.js +12 -12
  88. package/Build/Workers/createVectorTileGeometries.js +21 -21
  89. package/Build/Workers/createVectorTilePoints.js +11 -11
  90. package/Build/Workers/createVectorTilePolygons.js +19 -19
  91. package/Build/Workers/createVectorTilePolylines.js +12 -12
  92. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +88 -0
  93. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +21 -21
  94. package/Build/Workers/createVerticesFromHeightmap.js +21 -21
  95. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -277
  96. package/Build/Workers/createWallGeometry.js +21 -21
  97. package/Build/Workers/createWallOutlineGeometry.js +20 -20
  98. package/Build/Workers/decodeDraco.js +10 -10
  99. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  100. package/Build/Workers/decodeI3S.js +9 -9
  101. package/Build/Workers/gaussianSplatSorter.js +4 -4
  102. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  103. package/Build/Workers/transcodeKTX2.js +6 -6
  104. package/Build/Workers/transferTypedArrayTest.js +1 -1
  105. package/Build/Workers/upsampleQuantizedTerrainMesh.js +19 -19
  106. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +92 -0
  107. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +2 -2
  108. package/Source/Core/Cesium3DTilesTerrainData.js +930 -0
  109. package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +1866 -0
  110. package/Source/Core/Cesium3DTilesTerrainProvider.js +1052 -0
  111. package/Source/Core/CesiumTerrainProvider.js +2 -2
  112. package/Source/Core/Color.js +23 -6
  113. package/Source/Core/EllipsoidalOccluder.js +2 -2
  114. package/Source/Core/FeatureDetection.js +0 -2
  115. package/Source/Core/GoogleEarthEnterpriseMetadata.js +1 -1
  116. package/Source/Core/GoogleEarthEnterpriseTerrainData.js +1 -1
  117. package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -1
  118. package/Source/Core/HeightmapTerrainData.js +10 -22
  119. package/Source/Core/HilbertOrder.js +0 -6
  120. package/Source/Core/ITwinPlatform.js +6 -6
  121. package/Source/Core/Ion.js +1 -1
  122. package/Source/Core/IonResource.js +35 -27
  123. package/Source/Core/PixelFormat.js +2 -2
  124. package/Source/Core/QuantizedMeshTerrainData.js +23 -57
  125. package/Source/Core/Resource.js +15 -11
  126. package/Source/Core/S2Cell.js +6 -18
  127. package/Source/Core/TaskProcessor.js +1 -1
  128. package/Source/Core/TerrainData.js +2 -1
  129. package/Source/Core/TerrainEncoding.js +215 -38
  130. package/Source/Core/TerrainMesh.js +8 -8
  131. package/Source/Core/TerrainProvider.js +151 -0
  132. package/Source/Core/VRTheWorldTerrainProvider.js +2 -2
  133. package/Source/Core/binarySearch.js +1 -1
  134. package/Source/Core/createWorldBathymetryAsync.js +2 -2
  135. package/Source/Core/createWorldTerrainAsync.js +3 -3
  136. package/Source/Core/loadImageFromTypedArray.js +9 -3
  137. package/Source/Core/mergeSort.js +1 -1
  138. package/Source/DataSources/PropertyArray.js +2 -2
  139. package/Source/Renderer/AutomaticUniforms.js +61 -0
  140. package/Source/Renderer/Context.js +13 -7
  141. package/Source/Renderer/Pass.js +10 -9
  142. package/Source/Renderer/UniformState.js +12 -0
  143. package/Source/Renderer/VertexArray.js +1 -1
  144. package/Source/Scene/ArcGisMapServerImageryProvider.js +1 -1
  145. package/Source/Scene/ArcGisMapService.js +1 -1
  146. package/Source/Scene/Azure2DImageryProvider.js +7 -5
  147. package/Source/Scene/BatchTable.js +2 -2
  148. package/Source/Scene/BillboardCollection.js +25 -21
  149. package/Source/Scene/BingMapsImageryProvider.js +1 -1
  150. package/Source/Scene/BoundingVolumeSemantics.js +54 -62
  151. package/Source/Scene/Cesium3DTile.js +3 -3
  152. package/Source/Scene/Cesium3DTilesVoxelProvider.js +1 -1
  153. package/Source/Scene/Cesium3DTileset.js +1 -1
  154. package/Source/Scene/EdgeFramebuffer.js +245 -0
  155. package/Source/Scene/FrameState.js +12 -0
  156. package/Source/Scene/GaussianSplat3DTileContent.js +12 -16
  157. package/Source/Scene/GaussianSplatPrimitive.js +12 -8
  158. package/Source/Scene/GaussianSplatSorter.js +2 -2
  159. package/Source/Scene/Globe.js +1 -1
  160. package/Source/Scene/GlobeSurfaceTile.js +10 -4
  161. package/Source/Scene/GltfBufferViewLoader.js +18 -0
  162. package/Source/Scene/GltfLoader.js +46 -8
  163. package/Source/Scene/Google2DImageryProvider.js +39 -27
  164. package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +1 -1
  165. package/Source/Scene/I3SDataProvider.js +1 -1
  166. package/Source/Scene/I3SDecoder.js +3 -3
  167. package/Source/Scene/ITwinData.js +4 -4
  168. package/Source/Scene/ImageryLayer.js +1 -1
  169. package/Source/Scene/Implicit3DTileContent.js +18 -7
  170. package/Source/Scene/ImplicitSubtree.js +3 -3
  171. package/Source/Scene/ImplicitTileset.js +2 -2
  172. package/Source/Scene/IonImageryProvider.js +15 -84
  173. package/Source/Scene/IonImageryProviderFactory.js +194 -0
  174. package/Source/Scene/LabelCollection.js +54 -36
  175. package/Source/Scene/MetadataComponentType.js +5 -5
  176. package/Source/Scene/MetadataTableProperty.js +3 -9
  177. package/Source/Scene/Model/EdgeDetectionPipelineStage.js +42 -0
  178. package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +800 -0
  179. package/Source/Scene/Model/MetadataPipelineStage.js +7 -7
  180. package/Source/Scene/Model/ModelDrawCommand.js +69 -0
  181. package/Source/Scene/Model/ModelImagery.js +4 -0
  182. package/Source/Scene/Model/ModelRuntimeNode.js +2 -2
  183. package/Source/Scene/Model/ModelRuntimePrimitive.js +13 -2
  184. package/Source/Scene/Model/ModelSceneGraph.js +15 -3
  185. package/Source/Scene/Model/ModelUtility.js +0 -1
  186. package/Source/Scene/Model/NodeRenderResources.js +1 -1
  187. package/Source/Scene/Model/PrimitiveRenderResources.js +1 -1
  188. package/Source/Scene/OIT.js +11 -1
  189. package/Source/Scene/PickFramebuffer.js +13 -17
  190. package/Source/Scene/Picking.js +104 -80
  191. package/Source/Scene/QuadtreePrimitive.js +34 -26
  192. package/Source/Scene/QuadtreeTile.js +66 -46
  193. package/Source/Scene/ResourceLoaderState.js +1 -1
  194. package/Source/Scene/Scene.js +124 -12
  195. package/Source/Scene/ScreenSpaceCameraController.js +1 -1
  196. package/Source/Scene/SensorVolumePortionToDisplay.js +6 -6
  197. package/Source/Scene/SingleTileImageryProvider.js +3 -3
  198. package/Source/Scene/Terrain.js +5 -5
  199. package/Source/Scene/TileMapServiceImageryProvider.js +2 -2
  200. package/Source/Scene/UrlTemplateImageryProvider.js +1 -1
  201. package/Source/Scene/View.js +3 -0
  202. package/Source/Scene/VoxelPrimitive.js +196 -189
  203. package/Source/Scene/VoxelShape.js +2 -0
  204. package/Source/Scene/createWorldImageryAsync.js +1 -1
  205. package/Source/Shaders/BillboardCollectionFS.glsl +102 -62
  206. package/Source/Shaders/BillboardCollectionFS.js +102 -63
  207. package/Source/Shaders/BillboardCollectionVS.glsl +44 -37
  208. package/Source/Shaders/BillboardCollectionVS.js +45 -38
  209. package/Source/Shaders/Builtin/Constants/passCesium3DTile.glsl +1 -1
  210. package/Source/Shaders/Builtin/Constants/passCesium3DTile.js +1 -1
  211. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.glsl +1 -1
  212. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.js +1 -1
  213. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.glsl +1 -1
  214. package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.js +1 -1
  215. package/Source/Shaders/Builtin/Constants/passCesium3DTileEdges.glsl +10 -0
  216. package/Source/Shaders/Builtin/Constants/passCesium3DTileEdges.js +12 -0
  217. package/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl +1 -1
  218. package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +1 -1
  219. package/Source/Shaders/Builtin/Constants/passOpaque.glsl +1 -1
  220. package/Source/Shaders/Builtin/Constants/passOpaque.js +1 -1
  221. package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
  222. package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
  223. package/Source/Shaders/Builtin/Constants/passTranslucent.glsl +1 -1
  224. package/Source/Shaders/Builtin/Constants/passTranslucent.js +1 -1
  225. package/Source/Shaders/Builtin/Constants/passVoxels.glsl +1 -1
  226. package/Source/Shaders/Builtin/Constants/passVoxels.js +1 -1
  227. package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
  228. package/Source/Shaders/GlobeVS.glsl +1 -1
  229. package/Source/Shaders/GlobeVS.js +1 -1
  230. package/Source/Shaders/Model/EdgeDetectionStageFS.glsl +58 -0
  231. package/Source/Shaders/Model/EdgeDetectionStageFS.js +60 -0
  232. package/Source/Shaders/Model/EdgeVisibilityStageFS.glsl +83 -0
  233. package/Source/Shaders/Model/EdgeVisibilityStageFS.js +85 -0
  234. package/Source/Shaders/Model/ModelFS.glsl +5 -0
  235. package/Source/Shaders/Model/ModelFS.js +5 -0
  236. package/Source/Shaders/Model/PrimitiveOutlineStageFS.glsl +0 -1
  237. package/Source/Shaders/Model/PrimitiveOutlineStageFS.js +0 -1
  238. package/Source/Shaders/ShadowVolumeAppearanceFS.glsl +7 -15
  239. package/Source/Shaders/ShadowVolumeAppearanceFS.js +7 -15
  240. package/Source/Workers/createVerticesFromCesium3DTilesTerrain.js +46 -0
  241. package/Source/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +55 -0
  242. package/index.d.ts +281 -27
  243. package/index.js +176 -166
  244. package/package.json +2 -1
package/index.d.ts CHANGED
@@ -2801,6 +2801,234 @@ export class CatmullRomSpline {
2801
2801
  evaluate(time: number, result?: Cartesian3): Cartesian3;
2802
2802
  }
2803
2803
 
2804
+ /**
2805
+ * Terrain data for a single tile where the terrain data is represented as a glb (binary glTF).
2806
+ * @param options - Object with the following properties:
2807
+ * @param options.gltf - The parsed glTF JSON.
2808
+ * @param options.minimumHeight - The minimum terrain height within the tile, in meters above the ellipsoid.
2809
+ * @param options.maximumHeight - The maximum terrain height within the tile, in meters above the ellipsoid.
2810
+ * @param options.boundingSphere - A sphere bounding all of the vertices in the mesh.
2811
+ * @param options.orientedBoundingBox - An oriented bounding box containing all of the vertices in the mesh.
2812
+ * @param options.horizonOcclusionPoint - The horizon occlusion point of the mesh. If this point
2813
+ * is below the horizon, the entire tile is assumed to be below the horizon as well.
2814
+ * The point is expressed in ellipsoid-scaled coordinates.
2815
+ * @param options.skirtHeight - The height of the skirt to add on the edges of the tile.
2816
+ * @param [options.requestVertexNormals = false] - Indicates whether normals should be loaded.
2817
+ * @param [options.requestWaterMask = false] - Indicates whether water mask data should be loaded.
2818
+ * @param [options.credits] - Array of credits for this tile.
2819
+ * @param [options.childTileMask = 15] - A bit mask indicating which of this tile's four children exist.
2820
+ * If a child's bit is set, geometry will be requested for that tile as well when it
2821
+ * is needed. If the bit is cleared, the child tile is not requested and geometry is
2822
+ * instead upsampled from the parent. The bit values are as follows:
2823
+ * <table>
2824
+ * <tr><th>Bit Position</th><th>Bit Value</th><th>Child Tile</th></tr>
2825
+ * <tr><td>0</td><td>1</td><td>Southwest</td></tr>
2826
+ * <tr><td>1</td><td>2</td><td>Southeast</td></tr>
2827
+ * <tr><td>2</td><td>4</td><td>Northwest</td></tr>
2828
+ * <tr><td>3</td><td>8</td><td>Northeast</td></tr>
2829
+ * </table>
2830
+ * @param [options.waterMask] - The buffer containing the water mask.
2831
+ */
2832
+ export class Cesium3DTilesTerrainData {
2833
+ constructor(options: {
2834
+ gltf: {
2835
+ [key: string]: any;
2836
+ };
2837
+ minimumHeight: number;
2838
+ maximumHeight: number;
2839
+ boundingSphere: BoundingSphere;
2840
+ orientedBoundingBox: OrientedBoundingBox;
2841
+ horizonOcclusionPoint: Cartesian3;
2842
+ skirtHeight: number;
2843
+ requestVertexNormals?: boolean;
2844
+ requestWaterMask?: boolean;
2845
+ credits?: Credit[];
2846
+ childTileMask?: number;
2847
+ waterMask?: Uint8Array;
2848
+ });
2849
+ /**
2850
+ * An array of credits for this tile.
2851
+ */
2852
+ credits: Credit[] | undefined;
2853
+ /**
2854
+ * The water mask included in this terrain data, if any. A water mask is a rectangular
2855
+ * Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
2856
+ * Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
2857
+ */
2858
+ waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement | ImageBitmap | undefined;
2859
+ /**
2860
+ * Returns the terrain height at a specified longitude and latitude, or undefined if the mesh is undefined.
2861
+ * @param rectangle - The rectangle covered by this terrain data.
2862
+ * @param longitude - The longitude in radians.
2863
+ * @param latitude - The latitude in radians.
2864
+ * @returns The terrain height at the specified position, or undefined if the mesh is undefined.
2865
+ * If the position is outside the rectangle, this method will extrapolate the height,
2866
+ * which is likely to be wildly incorrect for positions far outside the rectangle.
2867
+ */
2868
+ interpolateHeight(rectangle: Rectangle, longitude: number, latitude: number): number | undefined;
2869
+ /**
2870
+ * Determines if a given child tile is available, based on the
2871
+ * {@link TerrainData#childTileMask}. The given child tile coordinates are assumed
2872
+ * to be one of the four children of this tile. If non-child tile coordinates are
2873
+ * given, the availability of the southeast child tile is returned.
2874
+ * @param thisX - The tile X coordinate of this (the parent) tile.
2875
+ * @param thisY - The tile Y coordinate of this (the parent) tile.
2876
+ * @param childX - The tile X coordinate of the child tile to check for availability.
2877
+ * @param childY - The tile Y coordinate of the child tile to check for availability.
2878
+ * @returns True if the child tile is available; otherwise, false.
2879
+ */
2880
+ isChildAvailable(thisX: number, thisY: number, childX: number, childY: number): boolean;
2881
+ /**
2882
+ * Upsamples this terrain data for use by a descendant tile.
2883
+ * @param tilingScheme - The tiling scheme of this terrain data.
2884
+ * @param thisX - The X coordinate of this tile in the tiling scheme.
2885
+ * @param thisY - The Y coordinate of this tile in the tiling scheme.
2886
+ * @param thisLevel - The level of this tile in the tiling scheme.
2887
+ * @param descendantX - The X coordinate within the tiling scheme of the descendant tile for which we are upsampling.
2888
+ * @param descendantY - The Y coordinate within the tiling scheme of the descendant tile for which we are upsampling.
2889
+ * @param descendantLevel - The level within the tiling scheme of the descendant tile for which we are upsampling.
2890
+ * @returns A promise for upsampled terrain data for the descendant tile, or undefined if createMesh has not been called yet or too many asynchronous upsample operations are in progress and the request has been deferred.
2891
+ */
2892
+ upsample(tilingScheme: TilingScheme, thisX: number, thisY: number, thisLevel: number, descendantX: number, descendantY: number, descendantLevel: number): Promise<TerrainData> | undefined;
2893
+ /**
2894
+ * Gets a value indicating whether or not this terrain data was created by upsampling lower resolution
2895
+ * terrain data. If this value is false, the data was obtained from some other source, such
2896
+ * as by downloading it from a remote server. This method should return true for instances
2897
+ * returned from a call to {@link Cesium3DTilesTerrainData#upsample}.
2898
+ * @returns True if this instance was created by upsampling; otherwise, false.
2899
+ */
2900
+ wasCreatedByUpsampling(): boolean;
2901
+ }
2902
+
2903
+ export namespace Cesium3DTilesTerrainProvider {
2904
+ /**
2905
+ * Initialization options for the Cesium3DTilesTerrainProvider constructor
2906
+ * @property [requestVertexNormals = false] - Flag that indicates if the client should request additional lighting information from the server, in the form of per vertex normals if available.
2907
+ * @property [requestWaterMask = false] - Flag that indicates if the client should request per tile water masks from the server, if available.
2908
+ * @property [ellipsoid = Ellipsoid.default] - The ellipsoid. If not specified, the WGS84 ellipsoid is used.
2909
+ * @property [credit] - A credit for the data source, which is displayed on the canvas.
2910
+ */
2911
+ type ConstructorOptions = {
2912
+ requestVertexNormals?: boolean;
2913
+ requestWaterMask?: boolean;
2914
+ ellipsoid?: Ellipsoid;
2915
+ credit?: Credit | string;
2916
+ };
2917
+ }
2918
+
2919
+ /**
2920
+ * <div class="notice">
2921
+ * To construct a Cesium3DTilesTerrainProvider, call {@link Cesium3DTilesTerrainProvider.fromIonAssetId} or {@link Cesium3DTilesTerrainProvider.fromUrl}. Do not call the constructor directly.
2922
+ * </div>
2923
+ *
2924
+ * A {@link TerrainProvider} that accesses terrain data in a 3D Tiles format.
2925
+ * @param [options] - An object describing initialization options
2926
+ */
2927
+ export class Cesium3DTilesTerrainProvider {
2928
+ constructor(options?: Cesium3DTilesTerrainProvider.ConstructorOptions);
2929
+ /**
2930
+ * Creates a {@link TerrainProvider} that accesses terrain data in a Cesium 3D Tiles format.
2931
+ * @example
2932
+ * // Create terrain with normals.
2933
+ * try {
2934
+ * const viewer = new Cesium.Viewer("cesiumContainer", {
2935
+ * terrainProvider: await Cesium.Cesium3DTilesTerrainProvider.fromUrl(
2936
+ * Cesium.IonResource.fromAssetId(3956), {
2937
+ * requestVertexNormals: true
2938
+ * })
2939
+ * });
2940
+ * } catch (error) {
2941
+ * console.log(error);
2942
+ * }
2943
+ * @param url - The URL of the Cesium terrain server.
2944
+ * @param [options] - An object describing initialization options.
2945
+ * @returns A promise that resolves to the terrain provider.
2946
+ */
2947
+ static fromUrl(url: Resource | string | Promise<Resource> | Promise<string>, options?: Cesium3DTilesTerrainProvider.ConstructorOptions): Promise<Cesium3DTilesTerrainProvider>;
2948
+ /**
2949
+ * Creates a {@link TerrainProvider} from a Cesium ion asset ID that accesses terrain data in a Cesium 3D Tiles format
2950
+ * @example
2951
+ * // Create GTOPO30 with vertex normals
2952
+ * try {
2953
+ * const viewer = new Cesium.Viewer("cesiumContainer", {
2954
+ * terrainProvider: await Cesium.Cesium3DTilesTerrainProvider.fromIonAssetId(2732686, {
2955
+ * requestVertexNormals: true
2956
+ * })
2957
+ * });
2958
+ * } catch (error) {
2959
+ * console.log(error);
2960
+ * }
2961
+ * @param assetId - The Cesium ion asset id.
2962
+ * @param [options] - An object describing initialization options.
2963
+ */
2964
+ static fromIonAssetId(assetId: number, options?: CesiumTerrainProvider.ConstructorOptions): Promise<CesiumTerrainProvider>;
2965
+ /**
2966
+ * Requests the geometry for a given tile. This function should not be called before
2967
+ * {@link Cesium3DTilesTerrainProvider#ready} returns true. The result must include terrain data and
2968
+ * may optionally include a water mask and an indication of which child tiles are available.
2969
+ * @param x - The X coordinate of the tile for which to request geometry.
2970
+ * @param y - The Y coordinate of the tile for which to request geometry.
2971
+ * @param level - The level of the tile for which to request geometry.
2972
+ * @param [request] - The request object. Intended for internal use only.
2973
+ * @returns A promise for the requested geometry. If this method
2974
+ * returns undefined instead of a promise, it is an indication that too many requests are already
2975
+ * pending and the request will be retried later.
2976
+ */
2977
+ requestTileGeometry(x: number, y: number, level: number, request?: Request): Promise<Cesium3DTilesTerrainData> | undefined;
2978
+ /**
2979
+ * Determines whether data for a tile is available to be loaded.
2980
+ * @param x - The X coordinate of the tile for which to request geometry.
2981
+ * @param y - The Y coordinate of the tile for which to request geometry.
2982
+ * @param level - The level of the tile for which to request geometry.
2983
+ * @returns Undefined if not supported or availability is unknown, otherwise true or false.
2984
+ */
2985
+ getTileDataAvailable(x: number, y: number, level: number): boolean | undefined;
2986
+ /**
2987
+ * Make sure we load availability data for a tile
2988
+ * @param _x - The X coordinate of the tile for which to request geometry.
2989
+ * @param _y - The Y coordinate of the tile for which to request geometry.
2990
+ * @param _level - The level of the tile for which to request geometry.
2991
+ * @returns Undefined if nothing need to be loaded or a Promise that resolves when all required tiles are loaded
2992
+ */
2993
+ loadTileDataAvailability(_x: number, _y: number, _level: number): Promise<void> | undefined;
2994
+ /**
2995
+ * Get the maximum geometric error allowed in a tile at a given level.
2996
+ * @param level - The tile level for which to get the maximum geometric error.
2997
+ * @returns The maximum geometric error.
2998
+ */
2999
+ getLevelMaximumGeometricError(level: number): number;
3000
+ /**
3001
+ * Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
3002
+ * to the event, you will be notified of the error and can potentially recover from it. Event listeners
3003
+ * are passed an instance of {@link TileProviderError}.
3004
+ */
3005
+ errorEvent: Event;
3006
+ /**
3007
+ * Gets the credit to display when this terrain provider is active. Typically this is used to credit
3008
+ * the source of the terrain.
3009
+ */
3010
+ credit: Credit;
3011
+ /**
3012
+ * Gets the tiling scheme used by the provider.
3013
+ */
3014
+ tilingScheme: TilingScheme;
3015
+ /**
3016
+ * Gets a value indicating whether or not the provider includes a water mask. The water mask
3017
+ * indicates which areas of the globe are water rather than land, so they can be rendered
3018
+ * as a reflective surface with animated waves.
3019
+ */
3020
+ hasWaterMask: boolean;
3021
+ /**
3022
+ * Gets a value indicating whether or not the requested tiles include vertex normals.
3023
+ */
3024
+ hasVertexNormals: boolean;
3025
+ /**
3026
+ * Gets an object that can be used to determine availability of terrain from this provider, such as
3027
+ * at points and in rectangles.
3028
+ */
3029
+ availability: TileAvailability | undefined;
3030
+ }
3031
+
2804
3032
  export namespace CesiumTerrainProvider {
2805
3033
  /**
2806
3034
  * Initialization options for the CesiumTerrainProvider constructor
@@ -3602,6 +3830,12 @@ export class Color {
3602
3830
  * @returns The modified result parameter or a new instance if result was undefined.
3603
3831
  */
3604
3832
  toBytes(result?: number[]): number[];
3833
+ /**
3834
+ * Converts RGBA values in bytes to a single numeric unsigned 32-bit RGBA value, using the endianness
3835
+ * of the system.
3836
+ * @returns A single numeric unsigned 32-bit RGBA value.
3837
+ */
3838
+ static bytesToRgba(): number;
3605
3839
  /**
3606
3840
  * Converts this color to a single numeric unsigned 32-bit RGBA value, using the endianness
3607
3841
  * of the system.
@@ -7620,7 +7854,7 @@ export class GoogleEarthEnterpriseTerrainData {
7620
7854
  upsample(tilingScheme: TilingScheme, thisX: number, thisY: number, thisLevel: number, descendantX: number, descendantY: number, descendantLevel: number): Promise<HeightmapTerrainData> | undefined;
7621
7855
  /**
7622
7856
  * Determines if a given child tile is available, based on the
7623
- * {@link HeightmapTerrainData.childTileMask}. The given child tile coordinates are assumed
7857
+ * {@link GoogleEarthEnterpriseTerrainData.childTileMask}. The given child tile coordinates are assumed
7624
7858
  * to be one of the four children of this tile. If non-child tile coordinates are
7625
7859
  * given, the availability of the southeast child tile is returned.
7626
7860
  * @param thisX - The tile X coordinate of this (the parent) tile.
@@ -8133,7 +8367,7 @@ export class HeightmapTerrainData {
8133
8367
  * Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
8134
8368
  * Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
8135
8369
  */
8136
- waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement | undefined;
8370
+ waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement | ImageBitmap | undefined;
8137
8371
  /**
8138
8372
  * Computes the terrain height at a specified longitude and latitude.
8139
8373
  * @param rectangle - The rectangle covered by this terrain data.
@@ -8821,7 +9055,7 @@ export class IonGeocoderService {
8821
9055
  * A {@link Resource} instance that encapsulates Cesium ion asset access.
8822
9056
  * This object is normally not instantiated directly, use {@link IonResource.fromAssetId}.
8823
9057
  * @param endpoint - The result of the Cesium ion asset endpoint service.
8824
- * @param endpointResource - The resource used to retrieve the endpoint.
9058
+ * @param endpointResource - The original resource used to retrieve the endpoint.
8825
9059
  */
8826
9060
  export class IonResource extends Resource {
8827
9061
  constructor(endpoint: any, endpointResource: Resource);
@@ -16462,7 +16696,7 @@ export class TerrainData {
16462
16696
  * Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
16463
16697
  * Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
16464
16698
  */
16465
- waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement | undefined;
16699
+ waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement | ImageBitmap | undefined;
16466
16700
  /**
16467
16701
  * Computes the terrain height at a specified longitude and latitude.
16468
16702
  * @param rectangle - The rectangle covered by this terrain data.
@@ -18385,7 +18619,7 @@ export function barycentricCoordinates(point: Cartesian2 | Cartesian3, p0: Carte
18385
18619
  * of the index before which the itemToFind should be inserted in order to maintain the
18386
18620
  * sorted order of the array.
18387
18621
  */
18388
- export function binarySearch(array: any[], itemToFind: any, comparator: binarySearchComparator): number;
18622
+ export function binarySearch(array: any[] | Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, itemToFind: any, comparator: binarySearchComparator): number;
18389
18623
 
18390
18624
  /**
18391
18625
  * A function used to compare two items while performing a binary search.
@@ -18649,7 +18883,7 @@ export function isLeapYear(year: number): boolean;
18649
18883
  * @param comparator - The function to use to compare elements in the array.
18650
18884
  * @param [userDefinedObject] - Any item to pass as the third parameter to <code>comparator</code>.
18651
18885
  */
18652
- export function mergeSort(array: any[], comparator: mergeSortComparator, userDefinedObject?: any): void;
18886
+ export function mergeSort(array: any[] | Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array, comparator: mergeSortComparator, userDefinedObject?: any): void;
18653
18887
 
18654
18888
  /**
18655
18889
  * A function used to compare two items while performing a merge sort.
@@ -25639,6 +25873,8 @@ export type WebGLOptions = {
25639
25873
  failIfMajorPerformanceCaveat?: boolean;
25640
25874
  };
25641
25875
 
25876
+ export function PickId(pickObjects: Map<number, object>, key: number, color: Color): void;
25877
+
25642
25878
  /**
25643
25879
  * The data type of a pixel.
25644
25880
  */
@@ -32872,31 +33108,28 @@ export function removeExtension(gltf: any, extension: string): any;
32872
33108
  export namespace Google2DImageryProvider {
32873
33109
  /**
32874
33110
  * Initialization options for the Google2DImageryProvider constructor
32875
- * @property options - Object with the following properties:
32876
- * @property options.key - The Google api key to send with tile requests.
32877
- * @property options.session - The Google session token that tracks the current state of your map and viewport.
32878
- * @property options.url - The Google 2D maps endpoint.
32879
- * @property options.tileWidth - The width of each tile in pixels.
32880
- * @property options.tileHeight - The height of each tile in pixels.
32881
- * @property [options.ellipsoid = Ellipsoid.default] - The ellipsoid. If not specified, the default ellipsoid is used.
32882
- * @property [options.minimumLevel = 0] - The minimum level-of-detail supported by the imagery provider. Take care when specifying
33111
+ * @property key - The Google api key to send with tile requests.
33112
+ * @property session - The Google session token that tracks the current state of your map and viewport.
33113
+ * @property url - The Google 2D maps endpoint.
33114
+ * @property tileWidth - The width of each tile in pixels.
33115
+ * @property tileHeight - The height of each tile in pixels.
33116
+ * @property [ellipsoid = Ellipsoid.default] - The ellipsoid. If not specified, the default ellipsoid is used.
33117
+ * @property [minimumLevel = 0] - The minimum level-of-detail supported by the imagery provider. Take care when specifying
32883
33118
  * this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
32884
33119
  * to result in rendering problems.
32885
- * @property [options.maximumLevel = 22] - The maximum level-of-detail supported by the imagery provider.
32886
- * @property [options.rectangle = Rectangle.MAX_VALUE] - The rectangle, in radians, covered by the image.
33120
+ * @property [maximumLevel = 22] - The maximum level-of-detail supported by the imagery provider.
33121
+ * @property [rectangle = Rectangle.MAX_VALUE] - The rectangle, in radians, covered by the image.
32887
33122
  */
32888
33123
  type ConstructorOptions = {
32889
- options: {
32890
- key: string;
32891
- session: string;
32892
- url: string | Resource | IonResource;
32893
- tileWidth: string;
32894
- tileHeight: string;
32895
- ellipsoid?: Ellipsoid;
32896
- minimumLevel?: number;
32897
- maximumLevel?: number;
32898
- rectangle?: Rectangle;
32899
- };
33124
+ key: string;
33125
+ session: string;
33126
+ url: string | Resource | IonResource;
33127
+ tileWidth: string;
33128
+ tileHeight: string;
33129
+ ellipsoid?: Ellipsoid;
33130
+ minimumLevel?: number;
33131
+ maximumLevel?: number;
33132
+ rectangle?: Rectangle;
32900
33133
  };
32901
33134
  }
32902
33135
 
@@ -39737,6 +39970,21 @@ export type PickedMetadataInfo = {
39737
39970
  classProperty: MetadataClassProperty;
39738
39971
  };
39739
39972
 
39973
+ /**
39974
+ * @param pickedResults - the results from the pickCallback
39975
+ * @param limit - If supplied, stop drilling after collecting this many picks.
39976
+ * @returns whether picking should end
39977
+ */
39978
+ export function addDrillPickedResults(pickedResults: object[], limit: number, results: object[], pickedPrimitives: object[], pickedAttributes: object[], pickedFeatures: object[]): boolean;
39979
+
39980
+ /**
39981
+ * Drill pick by repeatedly calling a given `pickCallback`, each time stripping away the previously picked objects.
39982
+ * @param pickCallback - Pick callback to execute each iteration
39983
+ * @param [limit = Number.MAX_VALUE] - If supplied, stop drilling after collecting this many picks
39984
+ * @returns List of picked results
39985
+ */
39986
+ export function drillPick(pickCallback: (...params: any[]) => any, limit?: number): object[];
39987
+
39740
39988
  /**
39741
39989
  * Remove all invalid binary body references from the batch table
39742
39990
  * JSON of the given parsed content.
@@ -41877,6 +42125,12 @@ export class Scene {
41877
42125
  * The light source for shading. Defaults to a directional light from the Sun.
41878
42126
  */
41879
42127
  light: Light;
42128
+ /**
42129
+ * Whether or not to enable edge visibility rendering for 3D tiles.
42130
+ * When enabled, creates a framebuffer with multiple render targets
42131
+ * for advanced edge detection and visibility techniques.
42132
+ */
42133
+ _enableEdgeVisibility: boolean;
41880
42134
  /**
41881
42135
  * Use this to set the default value for {@link Scene#logarithmicDepthBuffer} in newly constructed Scenes
41882
42136
  * This property relies on fragmentDepth being supported.