@cesium/engine 14.0.0 → 15.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 (156) hide show
  1. package/Build/Workers/{chunk-EWDGNOJE.js → chunk-25TOENEE.js} +7 -7
  2. package/Build/Workers/{chunk-OMXHEJTK.js → chunk-2AVIUB5H.js} +2 -2
  3. package/Build/Workers/{chunk-LJBJM6VI.js → chunk-3JZGPJMZ.js} +6 -6
  4. package/Build/Workers/{chunk-DT5NFR5C.js → chunk-3LHBH4TC.js} +7 -7
  5. package/Build/Workers/{chunk-3QLSKXKF.js → chunk-3LZF23RY.js} +6 -6
  6. package/Build/Workers/{chunk-ED6GLQTK.js → chunk-5S2B46UQ.js} +1 -1
  7. package/Build/Workers/{chunk-B4GSRXE3.js → chunk-67ONR44K.js} +6 -6
  8. package/Build/Workers/{chunk-LOZ4NKY3.js → chunk-6EDBC234.js} +11 -11
  9. package/Build/Workers/{chunk-7ZB2RVIQ.js → chunk-6EV4VOET.js} +10 -10
  10. package/Build/Workers/{chunk-KHWLAQVA.js → chunk-7ITUZTFH.js} +1 -1
  11. package/Build/Workers/{chunk-JHBPC4LK.js → chunk-ARVZCY6X.js} +7 -7
  12. package/Build/Workers/{chunk-FFBJDW4A.js → chunk-B2UQN3DH.js} +6 -6
  13. package/Build/Workers/{chunk-VCNOFQYH.js → chunk-B2Y4ZS6X.js} +9 -9
  14. package/Build/Workers/{chunk-Q4ZVWJXX.js → chunk-BD2TPFGC.js} +5 -5
  15. package/Build/Workers/{chunk-K4AH3TDT.js → chunk-CHX2K5AC.js} +10 -10
  16. package/Build/Workers/{chunk-3LYROPON.js → chunk-CJGVEABL.js} +13 -13
  17. package/Build/Workers/{chunk-KSYBJA4M.js → chunk-DYJHEP3B.js} +5 -5
  18. package/Build/Workers/{chunk-CI2HEJFC.js → chunk-E3H7AVMK.js} +13 -13
  19. package/Build/Workers/{chunk-F4CUH4MR.js → chunk-EZNAJPP5.js} +4 -4
  20. package/Build/Workers/{chunk-YJX7X577.js → chunk-F7ZI463G.js} +15 -15
  21. package/Build/Workers/{chunk-HEZHXDYB.js → chunk-FMZ5CX6V.js} +1 -1
  22. package/Build/Workers/{chunk-G3BVMPWG.js → chunk-FRAWHNSR.js} +2 -2
  23. package/Build/Workers/{chunk-J7IH4EYI.js → chunk-GGV2XJHE.js} +7 -7
  24. package/Build/Workers/{chunk-5KWRW7YL.js → chunk-GK4QU6QI.js} +2 -2
  25. package/Build/Workers/{chunk-77XPS7ZA.js → chunk-HYPB7FAV.js} +10 -10
  26. package/Build/Workers/{chunk-MVM4JV5U.js → chunk-I4HO2ED2.js} +9 -9
  27. package/Build/Workers/{chunk-FX4R4MTH.js → chunk-IGINOLDX.js} +6 -6
  28. package/Build/Workers/{chunk-PWF4EY5P.js → chunk-ISQSYLZY.js} +4 -4
  29. package/Build/Workers/{chunk-7UHKH6M3.js → chunk-JZAMRL5I.js} +6 -6
  30. package/Build/Workers/{chunk-HUFQVUMY.js → chunk-K5G2WELR.js} +7 -7
  31. package/Build/Workers/{chunk-5S5OOA6U.js → chunk-L5SO4Y5V.js} +1 -1
  32. package/Build/Workers/{chunk-LNSWJ43X.js → chunk-LCMJQVIF.js} +11 -11
  33. package/Build/Workers/{chunk-WVNLSTOF.js → chunk-MWJW37I7.js} +2 -2
  34. package/Build/Workers/{chunk-ZGFIT57T.js → chunk-NAGMYRDW.js} +27 -20
  35. package/Build/Workers/{chunk-SDIDRZDG.js → chunk-OYO6TKMU.js} +7 -7
  36. package/Build/Workers/{chunk-HKHQ3EDR.js → chunk-PUTA3AE2.js} +4 -4
  37. package/Build/Workers/{chunk-JPDKYBLF.js → chunk-Q5BHMNKU.js} +13 -13
  38. package/Build/Workers/{chunk-XK4OP6VA.js → chunk-QTEX3Y4V.js} +17 -17
  39. package/Build/Workers/{chunk-TVL3F7IU.js → chunk-QZKN2RXM.js} +1 -1
  40. package/Build/Workers/{chunk-Z3QWTHI7.js → chunk-RO2Z3LCR.js} +14 -14
  41. package/Build/Workers/{chunk-N2XAJBC6.js → chunk-RRN6LRDX.js} +12 -12
  42. package/Build/Workers/{chunk-FYGLNDKG.js → chunk-SLIA3GQP.js} +7 -7
  43. package/Build/Workers/{chunk-7EO56M5R.js → chunk-TFCOEX3W.js} +2 -2
  44. package/Build/Workers/{chunk-KM6MITPF.js → chunk-TU6ZXHVU.js} +5 -5
  45. package/Build/Workers/{chunk-LS3KVHYY.js → chunk-VJ2PDF64.js} +6 -6
  46. package/Build/Workers/{chunk-D7ZBZPHV.js → chunk-VMVPONIV.js} +5 -5
  47. package/Build/Workers/{chunk-3PIZQT3I.js → chunk-WPXU45PH.js} +4 -4
  48. package/Build/Workers/{chunk-WEHZP4SE.js → chunk-XDHM4G3P.js} +7 -7
  49. package/Build/Workers/{chunk-TY4DKOWR.js → chunk-XED3RXKO.js} +2 -2
  50. package/Build/Workers/{chunk-ZMNLEL6W.js → chunk-YNYCGTQH.js} +5 -5
  51. package/Build/Workers/{chunk-4CHMVQTQ.js → chunk-Z4SI54EB.js} +4 -4
  52. package/Build/Workers/{chunk-3JBEPBPL.js → chunk-ZVDLC3T4.js} +13 -13
  53. package/Build/Workers/combineGeometry.js +22 -22
  54. package/Build/Workers/createBoxGeometry.js +16 -16
  55. package/Build/Workers/createBoxOutlineGeometry.js +14 -14
  56. package/Build/Workers/createCircleGeometry.js +24 -24
  57. package/Build/Workers/createCircleOutlineGeometry.js +17 -17
  58. package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
  59. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
  60. package/Build/Workers/createCorridorGeometry.js +27 -27
  61. package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
  62. package/Build/Workers/createCylinderGeometry.js +18 -18
  63. package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
  64. package/Build/Workers/createEllipseGeometry.js +24 -24
  65. package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
  66. package/Build/Workers/createEllipsoidGeometry.js +17 -17
  67. package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
  68. package/Build/Workers/createFrustumGeometry.js +16 -16
  69. package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
  70. package/Build/Workers/createGeometry.js +22 -22
  71. package/Build/Workers/createGroundPolylineGeometry.js +20 -20
  72. package/Build/Workers/createPlaneGeometry.js +14 -14
  73. package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
  74. package/Build/Workers/createPolygonGeometry.js +30 -30
  75. package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
  76. package/Build/Workers/createPolylineGeometry.js +23 -23
  77. package/Build/Workers/createPolylineVolumeGeometry.js +29 -29
  78. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
  79. package/Build/Workers/createRectangleGeometry.js +25 -25
  80. package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
  81. package/Build/Workers/createSimplePolylineGeometry.js +21 -21
  82. package/Build/Workers/createSphereGeometry.js +17 -17
  83. package/Build/Workers/createSphereOutlineGeometry.js +16 -16
  84. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  85. package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
  86. package/Build/Workers/createVectorTileGeometries.js +22 -22
  87. package/Build/Workers/createVectorTilePoints.js +12 -12
  88. package/Build/Workers/createVectorTilePolygons.js +20 -20
  89. package/Build/Workers/createVectorTilePolylines.js +13 -13
  90. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
  91. package/Build/Workers/createVerticesFromHeightmap.js +20 -20
  92. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
  93. package/Build/Workers/createWallGeometry.js +22 -22
  94. package/Build/Workers/createWallOutlineGeometry.js +21 -21
  95. package/Build/Workers/decodeDraco.js +11 -11
  96. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  97. package/Build/Workers/decodeI3S.js +10 -10
  98. package/Build/Workers/transcodeKTX2.js +50 -43
  99. package/Build/Workers/transferTypedArrayTest.js +1 -1
  100. package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
  101. package/Source/Core/EllipsoidRhumbLine.js +1 -1
  102. package/Source/Core/Ion.js +1 -1
  103. package/Source/Core/PolygonGeometryLibrary.js +26 -4
  104. package/Source/Core/TexturePacker.js +166 -0
  105. package/Source/DataSources/BillboardVisualizer.js +3 -3
  106. package/Source/DataSources/EntityCluster.js +44 -19
  107. package/Source/Renderer/Context.js +0 -4
  108. package/Source/Renderer/Texture.js +6 -5
  109. package/Source/Renderer/TextureAtlas.js +802 -0
  110. package/Source/Scene/ArcGisMapService.js +1 -1
  111. package/Source/Scene/Billboard.js +86 -141
  112. package/Source/Scene/BillboardCollection.js +132 -202
  113. package/Source/Scene/BillboardLoadState.js +44 -0
  114. package/Source/Scene/BillboardTexture.js +348 -0
  115. package/Source/Scene/Camera.js +2 -2
  116. package/Source/Scene/Cesium3DTilesVoxelProvider.js +380 -126
  117. package/Source/Scene/Cesium3DTilesetStatistics.js +0 -1
  118. package/Source/Scene/Expression.js +1 -0
  119. package/Source/Scene/GltfLoader.js +5 -7
  120. package/Source/Scene/ImplicitSubtree.js +2 -0
  121. package/Source/Scene/KeyframeNode.js +16 -2
  122. package/Source/Scene/LabelCollection.js +212 -182
  123. package/Source/Scene/Megatexture.js +145 -81
  124. package/Source/Scene/Model/CustomShader.js +0 -2
  125. package/Source/Scene/Model/Model.js +1 -1
  126. package/Source/Scene/Model/ModelUtility.js +5 -1
  127. package/Source/Scene/Scene.js +39 -15
  128. package/Source/Scene/ScreenSpaceCameraController.js +0 -8
  129. package/Source/Scene/SpatialNode.js +4 -11
  130. package/Source/Scene/Vector3DTilePoints.js +2 -5
  131. package/Source/Scene/VoxelBoxShape.js +12 -5
  132. package/Source/Scene/VoxelCell.js +6 -5
  133. package/Source/Scene/VoxelContent.js +171 -107
  134. package/Source/Scene/VoxelCylinderShape.js +65 -58
  135. package/Source/Scene/VoxelEllipsoidShape.js +15 -5
  136. package/Source/Scene/VoxelMetadataOrder.js +12 -0
  137. package/Source/Scene/VoxelPrimitive.js +122 -54
  138. package/Source/Scene/VoxelProvider.js +34 -29
  139. package/Source/Scene/VoxelRenderResources.js +30 -7
  140. package/Source/Scene/VoxelShape.js +10 -3
  141. package/Source/Scene/VoxelTraversal.js +264 -180
  142. package/Source/Scene/processVoxelProperties.js +3 -0
  143. package/Source/Shaders/GlobeFS.glsl +10 -1
  144. package/Source/Shaders/GlobeFS.js +10 -1
  145. package/Source/Shaders/Voxels/Megatexture.glsl +4 -16
  146. package/Source/Shaders/Voxels/Megatexture.js +4 -16
  147. package/Source/Shaders/Voxels/Octree.glsl +44 -7
  148. package/Source/Shaders/Voxels/Octree.js +44 -7
  149. package/Source/Shaders/Voxels/VoxelFS.glsl +9 -15
  150. package/Source/Shaders/Voxels/VoxelFS.js +9 -15
  151. package/Source/Shaders/Voxels/convertUvToCylinder.glsl +15 -15
  152. package/Source/Shaders/Voxels/convertUvToCylinder.js +15 -15
  153. package/index.d.ts +176 -79
  154. package/index.js +413 -409
  155. package/package.json +2 -2
  156. package/Source/Scene/TextureAtlas.js +0 -558
package/index.d.ts CHANGED
@@ -6212,7 +6212,7 @@ export class EllipsoidRhumbLine {
6212
6212
  interpolateUsingFraction(fraction: number, result?: Cartographic): Cartographic;
6213
6213
  /**
6214
6214
  * Provides the location of a point at the indicated distance along the rhumb line.
6215
- * @param distance - The distance from the inital point to the point of interest along the rhumbLine.
6215
+ * @param distance - The distance from the initial point to the point of interest along the rhumbLine.
6216
6216
  * @param [result] - The object in which to store the result.
6217
6217
  * @returns The location of the point along the rhumb line.
6218
6218
  */
@@ -26383,11 +26383,11 @@ export class Billboard {
26383
26383
  /**
26384
26384
  * Gets or sets a width for the billboard. If undefined, the image width will be used.
26385
26385
  */
26386
- width: number;
26386
+ width: number | undefined;
26387
26387
  /**
26388
26388
  * Gets or sets a height for the billboard. If undefined, the image height will be used.
26389
26389
  */
26390
- height: number;
26390
+ height: number | undefined;
26391
26391
  /**
26392
26392
  * Gets or sets if the billboard size is in meters or pixels. <code>true</code> to size the billboard in meters;
26393
26393
  * otherwise, the size is in pixels.
@@ -26590,7 +26590,7 @@ export class BillboardCollection {
26590
26590
  * {@link BillboardCollection#get} to iterate over all the billboards
26591
26591
  * in the collection.
26592
26592
  */
26593
- length: number;
26593
+ readonly length: number;
26594
26594
  /**
26595
26595
  * Creates and adds a billboard with the specified initial properties to the collection.
26596
26596
  * The added billboard is returned so it can be modified or removed from the collection later.
@@ -27581,12 +27581,12 @@ export class Camera {
27581
27581
  getPixelSize(boundingSphere: BoundingSphere, drawingBufferWidth: number, drawingBufferHeight: number): number;
27582
27582
  /**
27583
27583
  * Cancels the current camera flight and leaves the camera at its current location.
27584
- * If no flight is in progress, this this function does nothing.
27584
+ * If no flight is in progress, this function does nothing.
27585
27585
  */
27586
27586
  cancelFlight(): void;
27587
27587
  /**
27588
27588
  * Completes the current camera flight and moves the camera immediately to its final destination.
27589
- * If no flight is in progress, this this function does nothing.
27589
+ * If no flight is in progress, this function does nothing.
27590
27590
  */
27591
27591
  completeFlight(): void;
27592
27592
  /**
@@ -29113,6 +29113,44 @@ export class Cesium3DTileStyle {
29113
29113
  meta: StyleExpression;
29114
29114
  }
29115
29115
 
29116
+ export namespace Cesium3DTilesVoxelProvider {
29117
+ /**
29118
+ * Initialization options for the Cesium3DTilesVoxelProvider constructor
29119
+ * @property className - The class in the tileset schema describing voxel metadata.
29120
+ * @property names - The metadata names.
29121
+ * @property types - The metadata types.
29122
+ * @property componentTypes - The metadata component types.
29123
+ * @property shape - The {@link VoxelShapeType}.
29124
+ * @property dimensions - The number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
29125
+ * @property [paddingBefore = Cartesian3.ZERO] - The number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
29126
+ * @property [paddingAfter = Cartesian3.ZERO] - The number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
29127
+ * @property [globalTransform = Matrix4.IDENTITY] - A transform from local space to global space.
29128
+ * @property [shapeTransform = Matrix4.IDENTITY] - A transform from shape space to local space.
29129
+ * @property [minBounds] - The minimum bounds.
29130
+ * @property [maxBounds] - The maximum bounds.
29131
+ * @property [minimumValues] - The metadata minimum values.
29132
+ * @property [maximumValues] - The metadata maximum values.
29133
+ * @property [maximumTileCount] - The maximum number of tiles that exist for this provider. This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory. If this value is not known it can be undefined.
29134
+ */
29135
+ type ConstructorOptions = {
29136
+ className: string;
29137
+ names: string[];
29138
+ types: MetadataType[];
29139
+ componentTypes: MetadataComponentType[];
29140
+ shape: VoxelShapeType;
29141
+ dimensions: Cartesian3;
29142
+ paddingBefore?: Cartesian3;
29143
+ paddingAfter?: Cartesian3;
29144
+ globalTransform?: Matrix4;
29145
+ shapeTransform?: Matrix4;
29146
+ minBounds?: Cartesian3;
29147
+ maxBounds?: Cartesian3;
29148
+ minimumValues?: number[][];
29149
+ maximumValues?: number[][];
29150
+ maximumTileCount?: number;
29151
+ };
29152
+ }
29153
+
29116
29154
  /**
29117
29155
  * A {@link VoxelProvider} that fetches voxel data from a 3D Tiles tileset.
29118
29156
  * <p>
@@ -29121,102 +29159,116 @@ export class Cesium3DTileStyle {
29121
29159
  * <div class="notice">
29122
29160
  * This object is normally not instantiated directly, use {@link Cesium3DTilesVoxelProvider.fromUrl}.
29123
29161
  * </div>
29124
- * @param options - Object with the following properties:
29162
+ * @param options - An object describing initialization options
29125
29163
  */
29126
29164
  export class Cesium3DTilesVoxelProvider extends VoxelProvider {
29127
- constructor(options: any);
29128
- /**
29129
- * Creates a {@link VoxelProvider} that fetches voxel data from a 3D Tiles tileset.
29130
- * @param url - The URL to a tileset JSON file
29131
- * @returns The created provider
29132
- */
29133
- static fromUrl(url: Resource | string): Promise<Cesium3DTilesVoxelProvider>;
29165
+ constructor(options: Cesium3DTilesVoxelProvider.ConstructorOptions);
29134
29166
  /**
29135
- * A transform from local space to global space. If undefined, the identity matrix will be used instead.
29167
+ * A transform from local space to global space.
29136
29168
  */
29137
- readonly globalTransform: Matrix4 | undefined;
29169
+ readonly globalTransform: Matrix4;
29138
29170
  /**
29139
- * A transform from shape space to local space. If undefined, the identity matrix will be used instead.
29171
+ * A transform from shape space to local space.
29140
29172
  */
29141
- readonly shapeTransform: Matrix4 | undefined;
29173
+ readonly shapeTransform: Matrix4;
29142
29174
  /**
29143
29175
  * Gets the {@link VoxelShapeType}
29144
- * This should not be called before {@link VoxelProvider#ready} returns true.
29145
29176
  */
29146
29177
  readonly shape: VoxelShapeType;
29147
29178
  /**
29148
29179
  * Gets the minimum bounds.
29149
29180
  * If undefined, the shape's default minimum bounds will be used instead.
29150
- * This should not be called before {@link VoxelProvider#ready} returns true.
29151
29181
  */
29152
29182
  readonly minBounds: Cartesian3 | undefined;
29153
29183
  /**
29154
29184
  * Gets the maximum bounds.
29155
29185
  * If undefined, the shape's default maximum bounds will be used instead.
29156
- * This should not be called before {@link VoxelProvider#ready} returns true.
29157
29186
  */
29158
29187
  readonly maxBounds: Cartesian3 | undefined;
29159
29188
  /**
29160
29189
  * Gets the number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
29161
- * This should not be called before {@link VoxelProvider#ready} returns true.
29162
29190
  */
29163
29191
  readonly dimensions: Cartesian3;
29164
29192
  /**
29165
29193
  * Gets the number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
29166
- * This should not be called before {@link VoxelProvider#ready} returns true.
29167
29194
  */
29168
- readonly paddingBefore: Cartesian3 | undefined;
29195
+ readonly paddingBefore: Cartesian3;
29169
29196
  /**
29170
29197
  * Gets the number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
29171
- * This should not be called before {@link VoxelProvider#ready} returns true.
29172
29198
  */
29173
- readonly paddingAfter: Cartesian3 | undefined;
29199
+ readonly paddingAfter: Cartesian3;
29200
+ /**
29201
+ * The metadata class for this tileset.
29202
+ */
29203
+ readonly className: string;
29174
29204
  /**
29175
29205
  * Gets the metadata names.
29176
- * This should not be called before {@link VoxelProvider#ready} returns true.
29177
29206
  */
29178
29207
  readonly names: string[];
29179
29208
  /**
29180
29209
  * Gets the metadata types.
29181
- * This should not be called before {@link VoxelProvider#ready} returns true.
29182
29210
  */
29183
29211
  readonly types: MetadataType[];
29184
29212
  /**
29185
29213
  * Gets the metadata component types.
29186
- * This should not be called before {@link VoxelProvider#ready} returns true.
29187
29214
  */
29188
29215
  readonly componentTypes: MetadataComponentType[];
29216
+ /**
29217
+ * Gets the ordering of the metadata in the buffers.
29218
+ */
29219
+ readonly metadataOrder: VoxelMetadataOrder;
29189
29220
  /**
29190
29221
  * Gets the metadata minimum values.
29191
- * This should not be called before {@link VoxelProvider#ready} returns true.
29192
29222
  */
29193
29223
  readonly minimumValues: number[][] | undefined;
29194
29224
  /**
29195
29225
  * Gets the metadata maximum values.
29196
- * This should not be called before {@link VoxelProvider#ready} returns true.
29197
29226
  */
29198
29227
  readonly maximumValues: number[][] | undefined;
29199
29228
  /**
29200
- * The maximum number of tiles that exist for this provider. This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory. If this value is not known it can be undefined.
29201
- * This should not be called before {@link VoxelProvider#ready} returns true.
29229
+ * The maximum number of tiles that exist for this provider.
29230
+ * This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory.
29231
+ * If this value is not known it can be undefined.
29202
29232
  */
29203
29233
  readonly maximumTileCount: number | undefined;
29204
29234
  /**
29205
- * Requests the data for a given tile. The data is a flattened 3D array ordered by X, then Y, then Z.
29206
- * This function should not be called before {@link VoxelProvider#ready} returns true.
29235
+ * The number of levels of detail containing available tiles in the tileset.
29236
+ */
29237
+ readonly availableLevels: number | undefined;
29238
+ /**
29239
+ * Creates a {@link Cesium3DTilesVoxelProvider} that fetches voxel data from a 3D Tiles tileset.
29240
+ * @example
29241
+ * try {
29242
+ * const voxelProvider = await Cesium3DTilesVoxelProvider.fromUrl(
29243
+ * "http://localhost:8002/tilesets/voxel/tileset.json"
29244
+ * );
29245
+ * const voxelPrimitive = new VoxelPrimitive({
29246
+ * provider: voxelProvider,
29247
+ * customShader: customShader,
29248
+ * });
29249
+ * scene.primitives.add(voxelPrimitive);
29250
+ * } catch (error) {
29251
+ * console.error(`Error creating voxel primitive: ${error}`);
29252
+ * }
29253
+ * @param url - The URL to a tileset JSON file
29254
+ * @returns The created provider
29255
+ */
29256
+ static fromUrl(url: Resource | string): Promise<Cesium3DTilesVoxelProvider>;
29257
+ /**
29258
+ * Requests the data for a given tile.
29207
29259
  * @param [options] - Object with the following properties:
29208
29260
  * @param [options.tileLevel = 0] - The tile's level.
29209
29261
  * @param [options.tileX = 0] - The tile's X coordinate.
29210
29262
  * @param [options.tileY = 0] - The tile's Y coordinate.
29211
29263
  * @param [options.tileZ = 0] - The tile's Z coordinate.
29212
- * @returns A promise to an array of typed arrays containing the requested voxel data or undefined if there was a problem loading the data.
29264
+ * @returns A promise resolving to a VoxelContent containing the data for the tile, or undefined if the request could not be scheduled this frame.
29213
29265
  */
29214
29266
  requestData(options?: {
29215
29267
  tileLevel?: number;
29216
29268
  tileX?: number;
29217
29269
  tileY?: number;
29218
29270
  tileZ?: number;
29219
- }): Promise<any[][]> | undefined;
29271
+ }): Promise<VoxelContent> | undefined;
29220
29272
  }
29221
29273
 
29222
29274
  export namespace Cesium3DTileset {
@@ -35364,7 +35416,7 @@ export class LabelCollection {
35364
35416
  * {@link LabelCollection#get} to iterate over all the labels
35365
35417
  * in the collection.
35366
35418
  */
35367
- length: number;
35419
+ readonly length: number;
35368
35420
  /**
35369
35421
  * Creates and adds a label with the specified initial properties to the collection.
35370
35422
  * The added label is returned so it can be modified or removed from the collection later.
@@ -36931,6 +36983,25 @@ export class CustomShader {
36931
36983
  * @param value - The new value of the uniform.
36932
36984
  */
36933
36985
  setUniform(uniformName: string, value: boolean | number | Cartesian2 | Cartesian3 | Cartesian4 | Matrix2 | Matrix3 | Matrix4 | string | Resource | TextureUniform): void;
36986
+ /**
36987
+ * Returns true if this object was destroyed; otherwise, false.
36988
+ * <br /><br />
36989
+ * If this object was destroyed, it should not be used; calling any function other than
36990
+ * <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
36991
+ * @returns True if this object was destroyed; otherwise, false.
36992
+ */
36993
+ isDestroyed(): boolean;
36994
+ /**
36995
+ * Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
36996
+ * release of WebGL resources, instead of relying on the garbage collector to destroy this object.
36997
+ * <br /><br />
36998
+ * Once an object is destroyed, it should not be used; calling any function other than
36999
+ * <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
37000
+ * assign the return value (<code>undefined</code>) to the object as done in the example.
37001
+ * @example
37002
+ * customShader = customShader && customShader.destroy();
37003
+ */
37004
+ destroy(): void;
36934
37005
  }
36935
37006
 
36936
37007
  /**
@@ -43518,6 +43589,40 @@ export class VoxelCell {
43518
43589
  getProperty(name: string): any;
43519
43590
  }
43520
43591
 
43592
+ /**
43593
+ * <div class="notice">
43594
+ * To construct a VoxelContent, call {@link VoxelContent.fromMetadataArray} or {@link VoxelContent.fromGltf}. Do not call the constructor directly.
43595
+ * </div>
43596
+ * An object representing voxel content for a {@link Cesium3DTilesVoxelProvider}.
43597
+ */
43598
+ export class VoxelContent {
43599
+ constructor();
43600
+ /**
43601
+ * Constructs a VoxelContent from an array of metadata.
43602
+ * @param metadata - The metadata to use for this voxel content.
43603
+ * @returns A VoxelContent containing the specified metadata.
43604
+ */
43605
+ static fromMetadataArray(metadata: Int8Array[] | Uint8Array[] | Int16Array[] | Uint16Array[] | Int32Array[] | Uint32Array[] | Float32Array[] | Float64Array[]): VoxelContent;
43606
+ }
43607
+
43608
+ /**
43609
+ * The metadata for this voxel content.
43610
+ * The metadata is an array of typed arrays, one for each field.
43611
+ * The data for one field is a flattened 3D array ordered by X, then Y, then Z.
43612
+ */
43613
+ export const metadata: Int8Array[] | Uint8Array[] | Int16Array[] | Uint16Array[] | Int32Array[] | Uint32Array[] | Float32Array[] | Float64Array[];
43614
+
43615
+ /**
43616
+ * Metadata ordering for voxel content.
43617
+ * In all cases, x data is contiguous in strides along the y axis,
43618
+ * and each group of y strides represents a z slice.
43619
+ * However, the orientation of the axes follows different conventions.
43620
+ */
43621
+ export enum VoxelMetadataOrder {
43622
+ XYZ = 0,
43623
+ GLTF = 1
43624
+ }
43625
+
43521
43626
  /**
43522
43627
  * A primitive that renders voxel data from a {@link VoxelProvider}.
43523
43628
  * @param [options] - Object with the following properties:
@@ -43525,6 +43630,7 @@ export class VoxelCell {
43525
43630
  * @param [options.modelMatrix = Matrix4.IDENTITY] - The model matrix used to transform the primitive.
43526
43631
  * @param [options.customShader] - The custom shader used to style the primitive.
43527
43632
  * @param [options.clock] - The clock used to control time dynamic behavior.
43633
+ * @param [options.calculateStatistics] - Generate statistics for performance profile.
43528
43634
  */
43529
43635
  export class VoxelPrimitive {
43530
43636
  constructor(options?: {
@@ -43532,11 +43638,8 @@ export class VoxelPrimitive {
43532
43638
  modelMatrix?: Matrix4;
43533
43639
  customShader?: CustomShader;
43534
43640
  clock?: Clock;
43641
+ calculateStatistics?: boolean;
43535
43642
  });
43536
- /**
43537
- * The number of levels of detail containing available tiles in the tileset.
43538
- */
43539
- readonly availableLevels: number | undefined;
43540
43643
  /**
43541
43644
  * The event fired to indicate that a tile's content was loaded.
43542
43645
  * <p>
@@ -43647,9 +43750,23 @@ export class VoxelPrimitive {
43647
43750
  */
43648
43751
  readonly shape: VoxelShapeType;
43649
43752
  /**
43650
- * Gets the voxel dimensions.
43753
+ * Gets the dimensions of each voxel tile, in z-up orientation.
43754
+ * Does not include padding.
43651
43755
  */
43652
43756
  readonly dimensions: Cartesian3;
43757
+ /**
43758
+ * Gets the dimensions of one tile of the input voxel data, in the input orientation.
43759
+ * Includes padding.
43760
+ */
43761
+ readonly inputDimensions: Cartesian3;
43762
+ /**
43763
+ * Gets the padding before the voxel data.
43764
+ */
43765
+ readonly paddingBefore: Cartesian3;
43766
+ /**
43767
+ * Gets the padding after the voxel data.
43768
+ */
43769
+ readonly paddingAfter: Cartesian3;
43653
43770
  /**
43654
43771
  * Gets the minimum value per channel of the voxel data.
43655
43772
  */
@@ -43751,91 +43868,84 @@ export class VoxelPrimitive {
43751
43868
  export class VoxelProvider {
43752
43869
  constructor();
43753
43870
  /**
43754
- * A transform from local space to global space. If undefined, the identity matrix will be used instead.
43871
+ * A transform from local space to global space.
43755
43872
  */
43756
- readonly globalTransform: Matrix4 | undefined;
43873
+ readonly globalTransform: Matrix4;
43757
43874
  /**
43758
- * A transform from shape space to local space. If undefined, the identity matrix will be used instead.
43875
+ * A transform from shape space to local space.
43759
43876
  */
43760
- readonly shapeTransform: Matrix4 | undefined;
43877
+ readonly shapeTransform: Matrix4;
43761
43878
  /**
43762
43879
  * Gets the {@link VoxelShapeType}
43763
- * This should not be called before {@link VoxelProvider#ready} returns true.
43764
43880
  */
43765
43881
  readonly shape: VoxelShapeType;
43766
43882
  /**
43767
43883
  * Gets the minimum bounds.
43768
43884
  * If undefined, the shape's default minimum bounds will be used instead.
43769
- * This should not be called before {@link VoxelProvider#ready} returns true.
43770
43885
  */
43771
43886
  readonly minBounds: Cartesian3 | undefined;
43772
43887
  /**
43773
43888
  * Gets the maximum bounds.
43774
43889
  * If undefined, the shape's default maximum bounds will be used instead.
43775
- * This should not be called before {@link VoxelProvider#ready} returns true.
43776
43890
  */
43777
43891
  readonly maxBounds: Cartesian3 | undefined;
43778
43892
  /**
43779
43893
  * Gets the number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
43780
- * This should not be called before {@link VoxelProvider#ready} returns true.
43781
43894
  */
43782
43895
  readonly dimensions: Cartesian3;
43783
43896
  /**
43784
43897
  * Gets the number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
43785
- * This should not be called before {@link VoxelProvider#ready} returns true.
43786
43898
  */
43787
- readonly paddingBefore: Cartesian3 | undefined;
43899
+ readonly paddingBefore: Cartesian3;
43788
43900
  /**
43789
43901
  * Gets the number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
43790
- * This should not be called before {@link VoxelProvider#ready} returns true.
43791
43902
  */
43792
- readonly paddingAfter: Cartesian3 | undefined;
43903
+ readonly paddingAfter: Cartesian3;
43793
43904
  /**
43794
43905
  * Gets the metadata names.
43795
- * This should not be called before {@link VoxelProvider#ready} returns true.
43796
43906
  */
43797
43907
  readonly names: string[];
43798
43908
  /**
43799
43909
  * Gets the metadata types.
43800
- * This should not be called before {@link VoxelProvider#ready} returns true.
43801
43910
  */
43802
43911
  readonly types: MetadataType[];
43803
43912
  /**
43804
43913
  * Gets the metadata component types.
43805
- * This should not be called before {@link VoxelProvider#ready} returns true.
43806
43914
  */
43807
43915
  readonly componentTypes: MetadataComponentType[];
43916
+ /**
43917
+ * Gets the ordering of the metadata in the buffers.
43918
+ */
43919
+ readonly metadataOrder: VoxelMetadataOrder;
43808
43920
  /**
43809
43921
  * Gets the metadata minimum values.
43810
- * This should not be called before {@link VoxelProvider#ready} returns true.
43811
43922
  */
43812
43923
  readonly minimumValues: number[][] | undefined;
43813
43924
  /**
43814
43925
  * Gets the metadata maximum values.
43815
- * This should not be called before {@link VoxelProvider#ready} returns true.
43816
43926
  */
43817
43927
  readonly maximumValues: number[][] | undefined;
43818
43928
  /**
43819
- * The maximum number of tiles that exist for this provider. This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory. If this value is not known it can be undefined.
43820
- * This should not be called before {@link VoxelProvider#ready} returns true.
43929
+ * The maximum number of tiles that exist for this provider.
43930
+ * This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory.
43931
+ * If this value is not known it can be undefined.
43821
43932
  */
43822
43933
  readonly maximumTileCount: number | undefined;
43823
43934
  /**
43824
- * Requests the data for a given tile. The data is a flattened 3D array ordered by X, then Y, then Z.
43825
- * This function should not be called before {@link VoxelProvider#ready} returns true.
43935
+ * Requests the data for a given tile.
43826
43936
  * @param [options] - Object with the following properties:
43827
43937
  * @param [options.tileLevel = 0] - The tile's level.
43828
43938
  * @param [options.tileX = 0] - The tile's X coordinate.
43829
43939
  * @param [options.tileY = 0] - The tile's Y coordinate.
43830
43940
  * @param [options.tileZ = 0] - The tile's Z coordinate.
43831
- * @returns A promise to an array of typed arrays containing the requested voxel data or undefined if there was a problem loading the data.
43941
+ * @returns A promise resolving to a VoxelContent containing the data for the tile, or undefined if the request could not be scheduled this frame.
43832
43942
  */
43833
43943
  requestData(options?: {
43834
43944
  tileLevel?: number;
43835
43945
  tileX?: number;
43836
43946
  tileY?: number;
43837
43947
  tileZ?: number;
43838
- }): Promise<any[][]> | undefined;
43948
+ }): Promise<VoxelContent> | undefined;
43839
43949
  }
43840
43950
 
43841
43951
  /**
@@ -43843,19 +43953,6 @@ export class VoxelProvider {
43843
43953
  */
43844
43954
  export const availableLevels: number | undefined;
43845
43955
 
43846
- export const shaderUniforms: {
43847
- [key: string]: any;
43848
- };
43849
-
43850
- export const shaderDefines: {
43851
- [key: string]: any;
43852
- };
43853
-
43854
- /**
43855
- * The maximum number of intersections against the shape for any ray direction.
43856
- */
43857
- export const shaderMaximumIntersectionsLength: number;
43858
-
43859
43956
  /**
43860
43957
  * An enum of voxel shapes. The shape controls how the voxel grid is mapped to 3D space.
43861
43958
  */